hexsha
stringlengths
40
40
size
int64
7
1.05M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
269
max_stars_repo_name
stringlengths
5
109
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
9
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
269
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
9
max_issues_count
int64
1
48.5k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
269
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
9
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
7
1.05M
avg_line_length
float64
1.21
330k
max_line_length
int64
6
990k
alphanum_fraction
float64
0.01
0.99
author_id
stringlengths
2
40
3af7842be2b30fb41be226f632e03381332423b8
424
hpp
C++
Base/temp/listener_net.hpp
Ring-r/sandbox
f3233916268c3240bb8589073d1afbfad9e37966
[ "CC0-1.0" ]
null
null
null
Base/temp/listener_net.hpp
Ring-r/sandbox
f3233916268c3240bb8589073d1afbfad9e37966
[ "CC0-1.0" ]
null
null
null
Base/temp/listener_net.hpp
Ring-r/sandbox
f3233916268c3240bb8589073d1afbfad9e37966
[ "CC0-1.0" ]
null
null
null
#ifndef LISTENER_NET_H #define LISTENER_NET_H #include "../_.hpp" class ListenerNet { protected: bool init; uint16_t port; UDPsocket socket; UDPpacket* packet; std::map<uint16_t, void(ListenerNet::*)(UDPpacket* packet)> commands; void Clear(); public: ListenerNet(); ~ListenerNet(); void Init(uint16_t port); void DoStep(); }; const int MAX_PACKET_LEN = 1024; // TODO: Remove this. #endif // LISTENER_NET_H
15.703704
70
0.716981
Ring-r
3af9a4a8093182b488e80861a4a824cdd94c9c7e
8,858
cpp
C++
src/plssvm/backends/HIP/csvm.hip.cpp
SC-SGS/PLSSVM
f55b7007fc28ee671026d255f7dc202e8c0e5ba8
[ "MIT" ]
3
2021-11-22T10:31:59.000Z
2022-03-20T04:11:35.000Z
src/plssvm/backends/HIP/csvm.hip.cpp
SC-SGS/PLSSVM
f55b7007fc28ee671026d255f7dc202e8c0e5ba8
[ "MIT" ]
null
null
null
src/plssvm/backends/HIP/csvm.hip.cpp
SC-SGS/PLSSVM
f55b7007fc28ee671026d255f7dc202e8c0e5ba8
[ "MIT" ]
6
2021-10-04T11:53:15.000Z
2022-02-27T00:02:32.000Z
/** * @author Alexander Van Craen * @author Marcel Breyer * @copyright 2018-today The PLSSVM project - All Rights Reserved * @license This file is part of the PLSSVM project which is released under the MIT license. * See the LICENSE.md file in the project root for full license information. */ #include "plssvm/backends/HIP/csvm.hpp" #include "plssvm/backends/HIP/detail/device_ptr.hip.hpp" // plssvm::hip::detail::device_ptr #include "plssvm/backends/HIP/detail/utility.hip.hpp" // plssvm::hip::detail::device_synchronize, plssvm::detail::hip::get_device_count, plssvm::detail::hip::set_device, plssvm::detail::hip::peek_at_last_error #include "plssvm/backends/HIP/exceptions.hpp" // plssvm::hip::backend_exception #include "plssvm/backends/HIP/predict_kernel.hip.hpp" // plssvm::hip::kernel_w, plssvm::hip::predict_points_poly, plssvm::hip::predict_points_rbf #include "plssvm/backends/HIP/q_kernel.hip.hpp" // plssvm::hip::device_kernel_q_linear, plssvm::hip::device_kernel_q_poly, plssvm::hip::device_kernel_q_radial #include "plssvm/backends/HIP/svm_kernel.hip.hpp" // plssvm::hip::device_kernel_linear, plssvm::hip::device_kernel_poly, plssvm::hip::device_kernel_radial #include "plssvm/backends/gpu_csvm.hpp" // plssvm::detail::gpu_csvm #include "plssvm/detail/assert.hpp" // PLSSVM_ASSERT #include "plssvm/detail/execution_range.hpp" // plssvm::detail::execution_range #include "plssvm/exceptions/exceptions.hpp" // plssvm::exception #include "plssvm/kernel_types.hpp" // plssvm::kernel_type #include "plssvm/parameter.hpp" // plssvm::parameter #include "plssvm/target_platforms.hpp" // plssvm::target_platform #include "hip/hip_runtime_api.h" #include "fmt/core.h" // fmt::print, fmt::format #include "fmt/ostream.h" // can use fmt using operator<< overloads #include <exception> // std::terminate #include <numeric> // std::iota #include <utility> // std::pair, std::make_pair #include <vector> // std::vector namespace plssvm::hip { template <typename T> csvm<T>::csvm(const parameter<T> &params) : base_type{ params } { // check if supported target platform has been selected if (target_ != target_platform::automatic && target_ != target_platform::gpu_amd) { throw backend_exception{ fmt::format("Invalid target platform '{}' for the HIP backend!", target_) }; } else { #if !defined(PLSSVM_HAS_AMD_TARGET) throw backend_exception{ fmt::format("Requested target platform {} that hasn't been enabled using PLSSVM_TARGET_PLATFORMS!", target_) }; #endif } if (print_info_) { fmt::print("Using HIP as backend.\n"); } // get all available devices wrt the requested target platform devices_.resize(std::min<std::size_t>(detail::get_device_count(), num_features_)); std::iota(devices_.begin(), devices_.end(), 0); // throw exception if no HIP devices could be found if (devices_.empty()) { throw backend_exception{ "HIP backend selected but no HIP devices were found!" }; } // polynomial and rbf kernel currently only support single GPU execution if (kernel_ == kernel_type::polynomial || kernel_ == kernel_type::rbf) { devices_.resize(1); } // resize vectors accordingly data_d_.resize(devices_.size()); data_last_d_.resize(devices_.size()); if (print_info_) { // print found HIP devices fmt::print("Found {} HIP device(s):\n", devices_.size()); for (typename std::vector<queue_type>::size_type device = 0; device < devices_.size(); ++device) { hipDeviceProp_t prop{}; PLSSVM_HIP_ERROR_CHECK(hipGetDeviceProperties(&prop, devices_[device])); fmt::print(" [{}, {}, {}.{}]\n", devices_[device], prop.name, prop.major, prop.minor); } fmt::print("\n"); } } template <typename T> csvm<T>::~csvm() { try { // be sure that all operations on the HIP devices have finished before destruction for (const queue_type &device : devices_) { detail::device_synchronize(device); } } catch (const plssvm::exception &e) { fmt::print("{}\n", e.what_with_loc()); std::terminate(); } } template <typename T> void csvm<T>::device_synchronize(queue_type &queue) { detail::device_synchronize(queue); } std::pair<dim3, dim3> execution_range_to_native(const ::plssvm::detail::execution_range &range) { dim3 grid(range.grid[0], range.grid[1], range.grid[2]); dim3 block(range.block[0], range.block[1], range.block[2]); return std::make_pair(grid, block); } template <typename T> void csvm<T>::run_q_kernel(const std::size_t device, const ::plssvm::detail::execution_range &range, device_ptr_type &q_d, const std::size_t num_features) { auto [grid, block] = execution_range_to_native(range); detail::set_device(device); switch (kernel_) { case kernel_type::linear: hip::device_kernel_q_linear<<<grid, block>>>(q_d.get(), data_d_[device].get(), data_last_d_[device].get(), num_rows_, num_features); break; case kernel_type::polynomial: PLSSVM_ASSERT(device == 0, "The polynomial kernel function currently only supports single GPU execution!"); hip::device_kernel_q_poly<<<grid, block>>>(q_d.get(), data_d_[device].get(), data_last_d_[device].get(), num_rows_, num_cols_, degree_, gamma_, coef0_); break; case kernel_type::rbf: PLSSVM_ASSERT(device == 0, "The radial basis function kernel function currently only supports single GPU execution!"); hip::device_kernel_q_radial<<<grid, block>>>(q_d.get(), data_d_[device].get(), data_last_d_[device].get(), num_rows_, num_cols_, gamma_); break; } detail::peek_at_last_error(); } template <typename T> void csvm<T>::run_svm_kernel(const std::size_t device, const ::plssvm::detail::execution_range &range, const device_ptr_type &q_d, device_ptr_type &r_d, const device_ptr_type &x_d, const real_type add, const std::size_t num_features) { auto [grid, block] = execution_range_to_native(range); detail::set_device(device); switch (kernel_) { case kernel_type::linear: hip::device_kernel_linear<<<grid, block>>>(q_d.get(), r_d.get(), x_d.get(), data_d_[device].get(), QA_cost_, 1 / cost_, num_rows_, num_features, add, device); break; case kernel_type::polynomial: PLSSVM_ASSERT(device == 0, "The polynomial kernel function currently only supports single GPU execution!"); hip::device_kernel_poly<<<grid, block>>>(q_d.get(), r_d.get(), x_d.get(), data_d_[device].get(), QA_cost_, 1 / cost_, num_rows_, num_cols_, add, degree_, gamma_, coef0_); break; case kernel_type::rbf: PLSSVM_ASSERT(device == 0, "The radial basis function kernel function currently only supports single GPU execution!"); hip::device_kernel_radial<<<grid, block>>>(q_d.get(), r_d.get(), x_d.get(), data_d_[device].get(), QA_cost_, 1 / cost_, num_rows_, num_cols_, add, gamma_); break; } detail::peek_at_last_error(); } template <typename T> void csvm<T>::run_w_kernel(const std::size_t device, const ::plssvm::detail::execution_range &range, device_ptr_type &w_d, const device_ptr_type &alpha_d, const std::size_t num_features) { auto [grid, block] = execution_range_to_native(range); detail::set_device(device); hip::device_kernel_w_linear<<<grid, block>>>(w_d.get(), data_d_[device].get(), data_last_d_[device].get(), alpha_d.get(), num_data_points_, num_features); detail::peek_at_last_error(); } template <typename T> void csvm<T>::run_predict_kernel(const ::plssvm::detail::execution_range &range, device_ptr_type &out_d, const device_ptr_type &alpha_d, const device_ptr_type &point_d, const std::size_t num_predict_points) { auto [grid, block] = execution_range_to_native(range); detail::set_device(0); switch (kernel_) { case kernel_type::linear: break; case kernel_type::polynomial: hip::device_kernel_predict_poly<<<grid, block>>>(out_d.get(), data_d_[0].get(), data_last_d_[0].get(), alpha_d.get(), num_data_points_, point_d.get(), num_predict_points, num_features_, degree_, gamma_, coef0_); break; case kernel_type::rbf: hip::device_kernel_predict_radial<<<grid, block>>>(out_d.get(), data_d_[0].get(), data_last_d_[0].get(), alpha_d.get(), num_data_points_, point_d.get(), num_predict_points, num_features_, gamma_); break; } detail::peek_at_last_error(); } template class csvm<float>; template class csvm<double>; } // namespace plssvm::hip
49.211111
235
0.675773
SC-SGS
3afcc0fd677dc608f41b823c979406fcdf7b4633
643
cpp
C++
TestPrograms/test_cxx11_noexcept.cpp
ex0ample/cryptopp
9ea66ce4d97d59d61e49c93f5af191107ebd1925
[ "BSL-1.0" ]
3,573
2015-06-03T22:09:51.000Z
2022-03-31T17:43:45.000Z
TestPrograms/test_cxx11_noexcept.cpp
ex0ample/cryptopp
9ea66ce4d97d59d61e49c93f5af191107ebd1925
[ "BSL-1.0" ]
1,012
2015-06-29T17:59:36.000Z
2022-03-30T03:10:38.000Z
TestPrograms/test_cxx11_noexcept.cpp
ex0ample/cryptopp
9ea66ce4d97d59d61e49c93f5af191107ebd1925
[ "BSL-1.0" ]
1,200
2015-06-29T01:32:06.000Z
2022-03-31T12:10:01.000Z
#if defined(__GNUC__) # define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10) #endif #if defined(__clang__) && defined(__apple_build_version__) # undef GNUC_VERSION # define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10) #elif defined(__clang__) # undef GNUC_VERSION # define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10) #endif #if (GNUC_VERSION >= 7030) # pragma GCC diagnostic ignored "-Wterminate" #endif #include <stdexcept> void f(int n) noexcept(false) { if (n > 2) throw std::runtime_error("Oops"); } int main(int argc, char* argv[]) { f(argc); return 0; }
21.433333
67
0.690513
ex0ample
d70494bd5d5900557a1b9858d417251e0d4d4624
1,921
cpp
C++
examples/simple/main.cpp
SharpLinesTech/Phys
17e5925311e86488efba351df290150b2a9e6d25
[ "BSD-3-Clause" ]
null
null
null
examples/simple/main.cpp
SharpLinesTech/Phys
17e5925311e86488efba351df290150b2a9e6d25
[ "BSD-3-Clause" ]
null
null
null
examples/simple/main.cpp
SharpLinesTech/Phys
17e5925311e86488efba351df290150b2a9e6d25
[ "BSD-3-Clause" ]
null
null
null
#include "phys/phys.h" #include <iostream> int main(int argc, const char* argv[]) { // This config determines math primitives. using Cfg = phys::DefaultConfig; // Choose the default broadphase and solver using Algos = phys::DefaultAlgos<Cfg>; using World = phys::World<Cfg, Algos>; using DynamicBody = World::DynamicBody; using StaticBody = World::StaticBody; // Narrowphase algorithms can be shared between multiple worlds, // so the algorithm factory is an injected dependency. phys::col::NarrowphaseFactory<Cfg> narrowphases; narrowphases.registerDefaultShapesAndAlgorithms(); // Insert user shape types and collision algorithms here. // ... // Prepopulate narrowphases, this is necessary for thread safety. narrowphases.prepopulate(); // Create a world World world(2, // Announce that we expect 2 objects. (This is just a hint) &narrowphases); // Provide our narrowphase factory. // We'll need two shapes: // 1. a plane, for the floor. // 2. a cube, for the box. phys::shapes::AxisAlignedPlane<Cfg> plane_shape(1, 0.0f); phys::shapes::Box<Cfg> box_shape({1.0f, 1.0f, 1.0f}); // Create the floor. StaticBody::Config floor_cfg(&plane_shape); world.createBody(floor_cfg); // Create the box. DynamicBody::Config box_cfg(&box_shape); box_cfg.initial_transform.setTranslation({ 0.0f, 2.0f, 0.0f }); auto* box = world.createBody(box_cfg); for(int t = 0 ; t < 100; ++t) { // Apply gravity to all dynamic objects in the world. // Gravity needs to be reapplied every step because accumulated forces // are reset. Cfg::vec3_t gravity = { 0.0f, -9.81f, 0.0f }; for (auto b : world.dynamicBodies()) { b->applyForce(gravity * b->getMass()); } world.step(1.0f/60.0f); std::cout << "Box position at time " << t << " is " << box->getPosition().y << std::endl; } return 0; }
27.84058
93
0.662676
SharpLinesTech
d705418d471ebbf8d3e31a66b21fbfab8b55d2b4
33,571
cpp
C++
src/vector_builtins.cpp
jcd-as/deva
54e988684d74bfae22870466ae6b6adc87f9c567
[ "MIT" ]
null
null
null
src/vector_builtins.cpp
jcd-as/deva
54e988684d74bfae22870466ae6b6adc87f9c567
[ "MIT" ]
null
null
null
src/vector_builtins.cpp
jcd-as/deva
54e988684d74bfae22870466ae6b6adc87f9c567
[ "MIT" ]
null
null
null
// Copyright (c) 2010 Joshua C. Shepard // // 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. // vector_builtins.cpp // builtin vector methods for the deva language // created by jcs, january 3, 2011 // TODO: // * #include "vector_builtins.h" #include "builtins_helpers.h" #include <algorithm> #include <sstream> using namespace std; namespace deva { const string vector_builtin_names[] = { string( "append" ), string( "length" ), string( "copy" ), string( "concat" ), string( "min" ), string( "max" ), string( "pop" ), string( "insert" ), string( "remove" ), string( "find" ), string( "rfind" ), string( "count" ), string( "reverse" ), string( "sort" ), string( "map" ), string( "filter" ), string( "reduce" ), string( "any" ), string( "all" ), string( "slice" ), string( "join" ), string( "rewind" ), string( "next" ), }; // ...and function pointers to the executor functions for them NativeFunctionPtr vector_builtin_fcns[] = { do_vector_append, do_vector_length, do_vector_copy, do_vector_concat, do_vector_min, do_vector_max, do_vector_pop, do_vector_insert, do_vector_remove, do_vector_find, do_vector_rfind, do_vector_count, do_vector_reverse, do_vector_sort, do_vector_map, do_vector_filter, do_vector_reduce, do_vector_any, do_vector_all, do_vector_slice, do_vector_join, do_vector_rewind, do_vector_next, }; Object vector_builtin_fcn_objs[] = { Object( do_vector_append ), Object( do_vector_length ), Object( do_vector_copy ), Object( do_vector_concat ), Object( do_vector_min ), Object( do_vector_max ), Object( do_vector_pop ), Object( do_vector_insert ), Object( do_vector_remove ), Object( do_vector_find ), Object( do_vector_rfind ), Object( do_vector_count ), Object( do_vector_reverse ), Object( do_vector_sort ), Object( do_vector_map ), Object( do_vector_filter ), Object( do_vector_reduce ), Object( do_vector_any ), Object( do_vector_all ), Object( do_vector_slice ), Object( do_vector_join ), Object( do_vector_rewind ), Object( do_vector_next ), }; const int num_of_vector_builtins = sizeof( vector_builtin_names ) / sizeof( vector_builtin_names[0] ); bool IsVectorBuiltin( const string & name ) { const string* i = find( vector_builtin_names, vector_builtin_names + num_of_vector_builtins, name ); if( i != vector_builtin_names + num_of_vector_builtins ) return true; else return false; } NativeFunction GetVectorBuiltin( const string & name ) { const string* i = find( vector_builtin_names, vector_builtin_names + num_of_vector_builtins, name ); if( i == vector_builtin_names + num_of_vector_builtins ) { NativeFunction nf; nf.p = NULL; return nf; } // compute the index of the function in the look-up table(s) long l = (long)i; l -= (long)&vector_builtin_names; int idx = l / sizeof( string ); if( idx > num_of_vector_builtins ) { NativeFunction nf; nf.p = NULL; return nf; } else { // return the function NativeFunction nf; nf.p = vector_builtin_fcns[idx]; nf.is_method = true; return nf; } } Object* GetVectorBuiltinObjectRef( const string & name ) { const string* i = find( vector_builtin_names, vector_builtin_names + num_of_vector_builtins, name ); if( i == vector_builtin_names + num_of_vector_builtins ) { return NULL; } // compute the index of the function in the look-up table(s) long l = (long)i; l -= (long)&vector_builtin_names; int idx = l / sizeof( string ); if( idx > num_of_vector_builtins ) { return NULL; } else { // return the function object return &vector_builtin_fcn_objs[idx]; } } ///////////////////////////////////////////////////////////////////////////// // vector builtins ///////////////////////////////////////////////////////////////////////////// void do_vector_append( Frame *frame ) { BuiltinHelper helper( "vector", "append", frame ); helper.CheckNumberOfArguments( 2 ); Object* vec = helper.GetLocalN( 0 ); helper.ExpectType( vec, obj_vector ); Object* po = helper.GetLocalN( 1 ); vec->v->push_back( *po ); // inc ref the item being appended IncRef( *po ); helper.ReturnVal( Object( obj_null ) ); } void do_vector_length( Frame *frame ) { BuiltinHelper helper( "vector", "length", frame ); helper.CheckNumberOfArguments( 1 ); Object* po = helper.GetLocalN( 0 ); helper.ExpectType( po, obj_vector ); int len = (int)po->v->size(); helper.ReturnVal( Object( (double)len ) ); } void do_vector_copy( Frame *frame ) { BuiltinHelper helper( "vector", "copy", frame ); helper.CheckNumberOfArguments( 1 ); Object* po = helper.GetLocalN( 0 ); helper.ExpectType( po, obj_vector ); Object copy = Object( CreateVector( *po->v ) ); helper.ReturnVal( copy ); } void do_vector_concat( Frame *frame ) { BuiltinHelper helper( "vector", "concat", frame ); helper.CheckNumberOfArguments( 2 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* in = helper.GetLocalN( 1 ); helper.ExpectType( in, obj_vector ); // nothing in <algorithm> to help us with this... // make sure there's enough reserve size if( self->v->capacity() < self->v->size() + in->v->size() ) self->v->reserve( self->v->size() + in->v->size() ); // append each element for( Vector::iterator i = in->v->begin(); i != in->v->end(); ++i ) { self->v->push_back( *i ); // inc ref each item being added IncRef( *i ); } helper.ReturnVal( Object( obj_null ) ); } struct MinComparator { static ObjectType type; bool operator()( const Object & lhs, const Object & rhs ) { if( lhs.type != type || rhs.type != type ) throw RuntimeException( "Vector built-in method 'min' called on a vector with non-homogenous contents." ); return lhs < rhs; } }; ObjectType MinComparator::type = obj_end; void do_vector_min( Frame *frame ) { BuiltinHelper helper( "vector", "min", frame ); helper.CheckNumberOfArguments( 1 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); if( self->v->size() == 0 ) throw RuntimeException( "Vector builtin method 'min' called on an empty vector." ); // find the min element MinComparator::type = self->v->operator[]( 0 ).type; Vector::iterator it = min_element( self->v->begin(), self->v->end(), MinComparator() ); helper.ReturnVal( *it ); } void do_vector_max( Frame *frame ) { BuiltinHelper helper( "vector", "max", frame ); helper.CheckNumberOfArguments( 1 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); if( self->v->size() == 0 ) throw RuntimeException( "Vector builtin method 'max' called on an empty vector." ); // find the max element MinComparator::type = self->v->operator[]( 0 ).type; Vector::iterator it = max_element( self->v->begin(), self->v->end(), MinComparator() ); helper.ReturnVal( *it ); } void do_vector_pop( Frame *frame ) { BuiltinHelper helper( "vector", "pop", frame ); helper.CheckNumberOfArguments( 1 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); if( self->v->size() == 0 ) throw RuntimeException( "Vector builtin method 'pop' called on an empty vector." ); Object o = self->v->back(); self->v->pop_back(); helper.ReturnVal( o ); } void do_vector_insert( Frame *frame ) { BuiltinHelper helper( "vector", "insert", frame ); helper.CheckNumberOfArguments( 3 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* pos = helper.GetLocalN( 1 ); helper.ExpectIntegralNumber( pos ); Object* val = helper.GetLocalN( 2 ); size_t i = (size_t)pos->d; if( i > self->v->size() ) throw RuntimeException( "Position argument greater than vector size in vector built-in method 'insert'." ); // insert the value self->v->insert( self->v->begin() + i, *val ); helper.ReturnVal( Object( obj_null ) ); } void do_vector_remove( Frame *frame ) { BuiltinHelper helper( "vector", "remove", frame ); helper.CheckNumberOfArguments( 2, 3 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* startobj = helper.GetLocalN( 1 ); helper.ExpectPositiveIntegralNumber( startobj ); int start = (int)startobj->d; int end = -1; if( frame->NumArgsPassed() == 3 ) { Object* endobj = helper.GetLocalN( 2 ); helper.ExpectIntegralNumber( endobj ); end = (int)endobj->d; } size_t sz = self->v->size(); if( end == -1 ) end = (int)sz; if( (size_t)start >= sz || start < 0 ) throw RuntimeException( "Invalid 'start' argument in vector built-in method 'remove'." ); if( (size_t)end > sz || end < 0 ) throw RuntimeException( "Invalid 'end' argument in vector built-in method 'remove'." ); if( end < start ) throw RuntimeException( "Invalid arguments in vector built-in method 'remove': start is greater than end." ); // remove the value if( start == end ) self->v->erase( self->v->begin() + start ); else self->v->erase( self->v->begin() + start, self->v->begin() + end ); helper.ReturnVal( Object( obj_null ) ); } void do_vector_find( Frame *frame ) { BuiltinHelper helper( "vector", "find", frame ); helper.CheckNumberOfArguments( 2, 4 ); int num_args = frame->NumArgsPassed(); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* value = helper.GetLocalN( 1 ); int start = 0; int end = -1; if( num_args > 2 ) { Object* startobj = helper.GetLocalN( 2 ); helper.ExpectPositiveIntegralNumber( startobj ); start = (int)startobj->d; } if( num_args > 3 ) { Object* endobj = helper.GetLocalN( 3 ); helper.ExpectIntegralNumber( endobj ); end = (int)endobj->d; } size_t sz = self->v->size(); if( end == -1 ) end = (int)sz; if( (size_t)start >= sz || start < 0 ) throw RuntimeException( "Invalid 'start' argument in vector built-in method 'find'." ); if( (size_t)end > sz || end < 0 ) throw RuntimeException( "Invalid 'end' argument in vector built-in method 'find'." ); if( end < start ) throw RuntimeException( "Invalid arguments in vector built-in method 'find': start is greater than end." ); // find the element that matches // find/find_xxx from <algorithm> won't help us, we need an index, not an iterator Object ret; bool found = false; for( int i = start; i < end; ++i ) { if( self->v->operator[]( i ) == *value ) { ret = Object( (double)i ); found = true; break; } } if( !found ) ret = Object( obj_null ); helper.ReturnVal( ret ); } void do_vector_rfind( Frame *frame ) { BuiltinHelper helper( "vector", "rfind", frame ); helper.CheckNumberOfArguments( 2, 4 ); int num_args = frame->NumArgsPassed(); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* value = helper.GetLocalN( 1 ); int start = 0; int end = -1; if( num_args > 2 ) { Object* startobj = helper.GetLocalN( 2 ); helper.ExpectPositiveIntegralNumber( startobj ); start = (int)startobj->d; } if( num_args > 3 ) { Object* endobj = helper.GetLocalN( 3 ); helper.ExpectIntegralNumber( endobj ); end = (int)endobj->d; } size_t sz = self->v->size(); if( end == -1 ) end = (int)sz; if( (size_t)start >= sz || start < 0 ) throw RuntimeException( "Invalid 'start' argument in vector built-in method 'rfind'." ); if( (size_t)end > sz || end < 0 ) throw RuntimeException( "Invalid 'end' argument in vector built-in method 'rfind'." ); if( end < start ) throw RuntimeException( "Invalid arguments in vector built-in method 'rfind': start is greater than end." ); // find the element that matches // find/find_xxx from <algorithm> won't help us, we need an index, not an iterator Object ret; bool found = false; for( int i = end-1; i >= start; --i ) { if( self->v->operator[]( i ) == *value ) { ret = Object( (double)i ); found = true; break; } } if( !found ) ret = Object( obj_null ); helper.ReturnVal( ret ); } void do_vector_count( Frame *frame ) { BuiltinHelper helper( "vector", "count", frame ); helper.CheckNumberOfArguments( 2, 4 ); int num_args = frame->NumArgsPassed(); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* value = helper.GetLocalN( 1 ); int start = 0; int end = -1; if( num_args > 2 ) { Object* startobj = helper.GetLocalN( 2 ); helper.ExpectPositiveIntegralNumber( startobj ); start = (int)startobj->d; } if( num_args > 3 ) { Object* endobj = helper.GetLocalN( 3 ); helper.ExpectIntegralNumber( endobj ); end = (int)endobj->d; } size_t sz = self->v->size(); if( end == -1 ) end = (int)sz; if( (size_t)start >= sz || start < 0 ) throw RuntimeException( "Invalid 'start' argument in vector built-in method 'count'." ); if( (size_t)end > sz || end < 0 ) throw RuntimeException( "Invalid 'end' argument in vector built-in method 'count'." ); if( end < start ) throw RuntimeException( "Invalid arguments in vector built-in method 'count': start is greater than end." ); // count the value int num = (int)count( self->v->begin() + start, self->v->begin() + end, *value ); helper.ReturnVal( Object( (double)num ) ); } void do_vector_reverse( Frame *frame ) { BuiltinHelper helper( "vector", "reverse", frame ); helper.CheckNumberOfArguments( 1, 3 ); int num_args = frame->NumArgsPassed(); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); int start = 0; int end = -1; if( num_args > 1 ) { Object* startobj = helper.GetLocalN( 1 ); helper.ExpectPositiveIntegralNumber( startobj ); start = (int)startobj->d; } if( num_args > 2 ) { Object* endobj = helper.GetLocalN( 2 ); helper.ExpectIntegralNumber( endobj ); end = (int)endobj->d; } size_t sz = self->v->size(); if( end == -1 ) end = (int)sz; if( (size_t)start >= sz || start < 0 ) throw RuntimeException( "Invalid 'start' argument in vector built-in method 'reverse'." ); if( (size_t)end > sz || end < 0 ) throw RuntimeException( "Invalid 'end' argument in vector built-in method 'reverse'." ); if( end < start ) throw RuntimeException( "Invalid arguments in vector built-in method 'reverse': start is greater than end." ); reverse( self->v->begin() + start, self->v->begin() + end ); helper.ReturnVal( Object( obj_null ) ); } // helper class for sorting with user-defined predicate class sort_predicate { Object* o; Object* method_self; public: sort_predicate( Object* ob ) : o( ob ), method_self( NULL ) {} sort_predicate( Object* ob, Object* ms ) : o( ob ), method_self( ms ) {} bool operator() ( Object i, Object j ) { // push the items IncRef( i ); ex->PushStack( i ); IncRef( j ); ex->PushStack( j ); bool is_method = method_self != NULL; // push 'self', for methods if( is_method ) { IncRef( *method_self ); ex->PushStack( *method_self ); } // call the function given // (*must* be a two-arg fcn to be used as sort predicate) if( o->type == obj_function ) ex->ExecuteFunctionToReturn( o->f, 2, is_method ? true : false ); else if( o->type == obj_native_function ) ex->ExecuteFunction( o->nf, 2, is_method ? true : false ); // return the return value of the predicate fcn Object retval = ex->PopStack(); if( retval.CoerceToBool() ) { DecRef( retval ); return true; } else { DecRef( retval ); return false; } } }; void do_vector_sort( Frame *frame ) { BuiltinHelper helper( "vector", "sort", frame ); helper.CheckNumberOfArguments( 1, 5 ); int num_args = frame->NumArgsPassed(); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); int start = 0; int end = -1; Object* o = NULL; Object* method_self = NULL; if( num_args > 1 ) { Object* startobj = helper.GetLocalN( 1 ); helper.ExpectPositiveIntegralNumber( startobj ); start = (int)startobj->d; } if( num_args > 2 ) { Object* endobj = helper.GetLocalN( 2 ); helper.ExpectIntegralNumber( endobj ); end = (int)endobj->d; } if( num_args > 3 ) { o = helper.GetLocalN( 3 ); helper.ExpectTypes( o, obj_function, obj_native_function ); } if( num_args > 4 ) { method_self = helper.GetLocalN( 4 ); helper.ExpectTypes( method_self, obj_class, obj_instance ); } size_t sz = self->v->size(); if( sz == 0 ) { helper.ReturnVal( Object( obj_null ) ); return; } if( end == -1 ) end = (int)sz; if( (size_t)start >= sz || start < 0 ) throw RuntimeException( "Invalid 'start' argument in vector built-in method 'sort'." ); if( (size_t)end > sz || end < 0 ) throw RuntimeException( "Invalid 'end' argument in vector built-in method 'sort'." ); if( end < start ) throw RuntimeException( "Invalid arguments in vector built-in method 'sort': start is greater than end." ); // if we didn't get a 'less-than' predicate function, do a 'normal' sort if( !o ) sort( self->v->begin() + start, self->v->begin() + end ); else { bool is_method = false; int num_args = frame->NumArgsPassed(); if( o->type == obj_function ) is_method = o->f->IsMethod(); else if( o->type == obj_native_function ) is_method = o->nf.is_method; // a non-method can't have an object passed as argument #4 if( !is_method && num_args == 5 ) throw RuntimeException( "Too many arguments passed to vector built-in method 'sort' for a predicate argument which is not a method." ); // method predicate if( is_method ) { // create our sort predicate object sort_predicate pred( o, method_self ); // do the sort sort( self->v->begin() + start, self->v->begin() + end, pred ); } // non-method predicate else { // create our sort predicate object sort_predicate pred( o ); // do the sort sort( self->v->begin() + start, self->v->begin() + end, pred ); } } helper.ReturnVal( Object( obj_null ) ); } void do_vector_map( Frame *frame ) { BuiltinHelper helper( "vector", "map", frame ); helper.CheckNumberOfArguments( 2, 3 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* o = helper.GetLocalN( 1 ); helper.ExpectTypes( o, obj_function, obj_native_function ); // return vector Vector* ret = CreateVector(); ret->reserve( self->v->size() ); bool is_method = false; int num_args = frame->NumArgsPassed(); if( o->type == obj_function ) is_method = o->f->IsMethod(); else if( o->type == obj_native_function ) is_method = o->nf.is_method; bool has_self = is_method && num_args == 3; // a non-method can't have an object passed as argument #2 if( !is_method && num_args == 3 ) throw RuntimeException( "Too many arguments passed to vector built-in method 'map' for a first argument which is not a method." ); Object* method_self; if( num_args == 3 ) { method_self = helper.GetLocalN( 2 ); helper.ExpectTypes( method_self, obj_string, obj_vector, obj_map, obj_class, obj_instance ); } // walk each item in the vector for( Vector::iterator i = self->v->begin(); i != self->v->end(); ++i ) { // push the item ex->PushStack( *i ); // push 'self', for methods if( has_self ) { // push the object ("self") first IncRef( *method_self ); ex->PushStack( *method_self ); } // call the function given (*must* be a single arg fcn to be used with map // builtin) if( o->type == obj_function ) ex->ExecuteFunctionToReturn( o->f, 1, has_self ? true : false ); else if( o->type == obj_native_function ) ex->ExecuteFunction( o->nf, 1, has_self ? true : false ); // get the result (return value) and push it onto our return collection Object retval = ex->PopStack(); // if we got a string back, we need to allocate a copy in our parent's // frame so it doesn't get deleted when we return if( retval.type == obj_string ) { const char* str = frame->GetParent()->AddString( string( retval.s ) ); retval.s = const_cast<char*>(str); } ret->push_back( retval ); } helper.ReturnVal( Object( ret ) ); } void do_vector_filter( Frame *frame ) { BuiltinHelper helper( "vector", "filter", frame ); helper.CheckNumberOfArguments( 2, 3 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* o = helper.GetLocalN( 1 ); helper.ExpectTypes( o, obj_function, obj_native_function ); bool is_method = false; int num_args = frame->NumArgsPassed(); if( o->type == obj_function ) is_method = o->f->IsMethod(); else if( o->type == obj_native_function ) is_method = o->nf.is_method; bool has_self = is_method && num_args == 3; // a non-method can't have an object passed as argument #2 if( !is_method && num_args == 3 ) throw RuntimeException( "Too many arguments passed to vector built-in method 'filter' for a first argument which is not a method." ); // allow methods Object* method_self; if( num_args == 3 ) { method_self = helper.GetLocalN( 2 ); helper.ExpectTypes( method_self, obj_string, obj_vector, obj_map, obj_class, obj_instance ); } // return vector Vector* ret = CreateVector(); ret->reserve( self->v->size() / 2 ); // walk each item in the vector for( Vector::iterator i = self->v->begin(); i != self->v->end(); ++i ) { // push the item IncRef( *i ); ex->PushStack( *i ); // push 'self', for methods if( has_self ) { // push the object ("self") first IncRef( *method_self ); ex->PushStack( *method_self ); } // call the function given (*must* be a single arg fcn to be used with filter // builtin) if( o->type == obj_function ) ex->ExecuteFunctionToReturn( o->f, 1, has_self ? true : false ); else if( o->type == obj_native_function ) ex->ExecuteFunction( o->nf, 1, has_self ? true : false ); // get the result (return value), but only add this item to the returned // vector if the function returned a 'true' value Object retval = ex->PopStack(); if( retval.CoerceToBool() ) { // if we got a string, we need to allocate a copy in our parent's // frame so it doesn't get deleted when we return if( i->type == obj_string ) { const char* str = frame->GetParent()->AddString( string( i->s ) ); i->s = const_cast<char*>(str); } IncRef( *i ); ret->push_back( *i ); } DecRef( retval ); } ret->resize( ret->size() ); helper.ReturnVal( Object( ret ) ); } void do_vector_reduce( Frame *frame ) { BuiltinHelper helper( "vector", "reduce", frame ); helper.CheckNumberOfArguments( 2, 3 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* o = helper.GetLocalN( 1 ); helper.ExpectTypes( o, obj_function, obj_native_function ); bool is_method = false; int num_args = frame->NumArgsPassed(); if( o->type == obj_function ) is_method = o->f->IsMethod(); else if( o->type == obj_native_function ) is_method = o->nf.is_method; bool has_self = is_method && num_args == 3; // a non-method can't have an object passed as argument #2 if( !is_method && num_args == 3 ) throw RuntimeException( "Too many arguments passed to vector built-in method 'reduce' for a first argument which is not a method." ); Object* method_self; if( num_args == 3 ) { method_self = helper.GetLocalN( 2 ); helper.ExpectTypes( method_self, obj_string, obj_vector, obj_map, obj_class, obj_instance ); } size_t sz = self->v->size(); if( sz < 2 ) throw RuntimeException( "A vector on which the built-in method 'reduce' is called must contain at least two items." ); // first iteration uses the last two items in the vector ex->PushStack( self->v->operator[]( sz-2 ) ); ex->PushStack( self->v->operator[]( sz-1 ) ); // push 'self', for methods if( has_self ) { // push the object ("self") first IncRef( *method_self ); ex->PushStack( *method_self ); } // call the function if( o->type == obj_function ) ex->ExecuteFunctionToReturn( o->f, 2, has_self ? true : false ); else if( o->type == obj_native_function ) ex->ExecuteFunction( o->nf, 2, has_self ? true : false ); Object retval = ex->PopStack(); // walk the rest of the items in the vector if( self->v->size() > 2 ) { for( int i = (int)sz-3; i >= 0; i-- ) { // push the item ex->PushStack( self->v->operator[]( i ) ); // use the retval from the previous iteration as the first arg to the fcn ex->PushStack( retval ); // push 'self', for methods if( has_self ) { // push the object ("self") first IncRef( *method_self ); ex->PushStack( *method_self ); } // call the function given (*must* be a double arg fcn to be used with // reduce builtin) if( o->type == obj_function ) ex->ExecuteFunctionToReturn( o->f, 2, has_self ? true : false ); else if( o->type == obj_native_function ) ex->ExecuteFunction( o->nf, 2, has_self ? true : false ); // get the result (return value) and push it onto our return collection retval = ex->PopStack(); } } // if we're returning a string, ensure memory will exist in frame returned to if( retval.type == obj_string ) { const char* str = frame->GetParent()->AddString( string( retval.s ) ); retval.s = const_cast<char*>(str); } helper.ReturnVal( retval ); } void do_vector_any( Frame *frame ) { BuiltinHelper helper( "vector", "any", frame ); helper.CheckNumberOfArguments( 2, 3 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* o = helper.GetLocalN( 1 ); helper.ExpectTypes( o, obj_function, obj_native_function ); bool is_method = false; int num_args = frame->NumArgsPassed(); if( o->type == obj_function ) is_method = o->f->IsMethod(); else if( o->type == obj_native_function ) is_method = o->nf.is_method; bool has_self = is_method && num_args == 3; // a non-method can't have an object passed as argument #2 if( !is_method && num_args == 3 ) throw RuntimeException( "Too many arguments passed to vector built-in method 'any' for a first argument which is not a method." ); Object* method_self; if( num_args == 3 ) { method_self = helper.GetLocalN( 2 ); helper.ExpectTypes( method_self, obj_string, obj_vector, obj_map, obj_class, obj_instance ); } bool value = false; // walk each item in the vector for( Vector::iterator i = self->v->begin(); i != self->v->end(); ++i ) { // push the item ex->PushStack( *i ); // push 'self', for methods if( has_self ) { // push the object ("self") first IncRef( *method_self ); ex->PushStack( *method_self ); } // call the function given (*must* be a single arg fcn to be used with // 'any' builtin) if( o->type == obj_function ) ex->ExecuteFunctionToReturn( o->f, 1, has_self ? true : false ); else if( o->type == obj_native_function ) ex->ExecuteFunction( o->nf, 1, has_self ? true : false ); // get the result (return value) Object retval = ex->PopStack(); // if it evaluates to true, bail if( retval.CoerceToBool() ) { value = true; break; } } helper.ReturnVal( Object( value ) ); } void do_vector_all( Frame *frame ) { BuiltinHelper helper( "vector", "all", frame ); helper.CheckNumberOfArguments( 2, 3 ); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); Object* o = helper.GetLocalN( 1 ); helper.ExpectTypes( o, obj_function, obj_native_function ); bool is_method = false; int num_args = frame->NumArgsPassed(); if( o->type == obj_function ) is_method = o->f->IsMethod(); else if( o->type == obj_native_function ) is_method = o->nf.is_method; bool has_self = is_method && num_args == 3; // a non-method can't have an object passed as argument #2 if( !is_method && num_args == 3 ) throw RuntimeException( "Too many arguments passed to vector built-in method 'all' for a first argument which is not a method." ); Object* method_self; if( num_args == 3 ) { method_self = helper.GetLocalN( 2 ); helper.ExpectTypes( method_self, obj_string, obj_vector, obj_map, obj_class, obj_instance ); } bool value = true; // walk each item in the vector for( Vector::iterator i = self->v->begin(); i != self->v->end(); ++i ) { // push the item ex->PushStack( *i ); // push 'self', for methods if( has_self ) { // push the object ("self") first IncRef( *method_self ); ex->PushStack( *method_self ); } // call the function given (*must* be a single arg fcn to be used with 'all' // builtin) if( o->type == obj_function ) ex->ExecuteFunctionToReturn( o->f, 1, has_self ? true : false ); else if( o->type == obj_native_function ) ex->ExecuteFunction( o->nf, 1, has_self ? true : false ); // get the result (return value) Object retval = ex->PopStack(); // if it evaluates to false, bail if( !retval.CoerceToBool() ) { value = false; break; } } helper.ReturnVal( Object( value ) ); } // helper for slicing in steps static size_t s_step = 1; static size_t s_i = 0; bool if_step( Object ) { if( s_i++ % s_step == 0 ) return false; else return true; } void do_vector_slice( Frame *frame ) { BuiltinHelper helper( "vector", "slice", frame ); helper.CheckNumberOfArguments( 3, 4 ); int num_args = frame->NumArgsPassed(); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); int start = 0; int end = -1; int step = 1; Object* startobj = helper.GetLocalN( 1 ); helper.ExpectPositiveIntegralNumber( startobj ); start = (int)startobj->d; Object* endobj = helper.GetLocalN( 2 ); helper.ExpectIntegralNumber( endobj ); end = (int)endobj->d; if( num_args > 3 ) { Object* stepobj = helper.GetLocalN( 3 ); helper.ExpectIntegralNumber( stepobj ); step = (int)stepobj->d; } size_t sz = self->v->size(); if( end == -1 ) end = (int)sz; if( (size_t)start >= sz || start < 0 ) throw RuntimeException( "Invalid 'start' argument in vector built-in method 'slice'." ); if( (size_t)end > sz || end < 0 ) throw RuntimeException( "Invalid 'end' argument in vector built-in method 'slice'." ); if( end < start ) throw RuntimeException( "Invalid arguments in vector built-in method 'slice': start is greater than end." ); if( step < 0 ) throw RuntimeException( "Invalid 'step' argument in vector built-in method 'slice': must be a positive integral number." ); // slice the vector Object ret; // if 'step' is '1' (the default) if( step == 1 ) { // create a new vector object that is a copy of the 'sub-vector' we're // looking for Vector* v = CreateVector( *(self->v), start, end ); ret = Object( v ); } // otherwise the vector class doesn't help us, have to do it manually else { Vector* v = CreateVector(); s_i = 0; s_step = step; remove_copy_if( self->v->begin() + start, self->v->begin() + end, back_inserter( *v ), if_step ); ret = Object( v ); } helper.ReturnVal( ret ); } void do_vector_join( Frame *frame ) { BuiltinHelper helper( "vector", "join", frame ); helper.CheckNumberOfArguments( 1, 2 ); int num_args = frame->NumArgsPassed(); Object* self = helper.GetLocalN( 0 ); helper.ExpectType( self, obj_vector ); const char* separator = ""; if( num_args == 2 ) { Object* sep = helper.GetLocalN( 1 ); helper.ExpectType( sep, obj_string ); separator = sep->s; } // build the return string string ret; for( Vector::iterator i = self->v->begin(); i != self->v->end(); ++i ) { ostringstream s; if( i != self->v->begin() ) s << separator; s << *i; ret += s.str(); } // add the string to the parent frame char* s = copystr( ret.c_str() ); frame->GetParent()->AddString( s ); helper.ReturnVal( Object( s ) ); } // 'enumerable interface' void do_vector_rewind( Frame *frame ) { BuiltinHelper helper( "vector", "rewind", frame ); helper.CheckNumberOfArguments( 1 ); Object* po = helper.GetLocalN( 0 ); helper.ExpectType( po, obj_vector ); po->v->index = 0; helper.ReturnVal( Object( obj_null ) ); } void do_vector_next( Frame *frame ) { BuiltinHelper helper( "vector", "next", frame ); helper.CheckNumberOfArguments( 1 ); Object* po = helper.GetLocalN( 0 ); helper.ExpectType( po, obj_vector ); size_t idx = po->v->index; size_t size = po->v->size(); bool last = (idx == size); // return a vector with the first item being a boolean indicating whether // there are more items or not (i.e. returns false when done enumerating) // and the second item is the object (null if we're done enumerating) Vector* ret = CreateVector(); // if we have an object, return true and the object if( !last ) { Object out = po->v->operator[]( po->v->index ); IncRef( out ); ret->push_back( Object( true ) ); ret->push_back( out ); } // otherwise return false and null else { ret->push_back( Object( false ) ); ret->push_back( Object( obj_null ) ); } // move to the next item po->v->index++; helper.ReturnVal( Object( ret ) ); } } // end namespace deva
26.643651
138
0.660779
jcd-as
d706d8b65dc7e5fe8250782eca6200ec43278633
3,495
hpp
C++
QuantLib/ql/termstructures/volatility/optionlet/optionletstripper.hpp
frannuca/quantlib
63e66f5f767397e5b7c79fa78eaed4e3e0a6b7c6
[ "BSD-3-Clause" ]
null
null
null
QuantLib/ql/termstructures/volatility/optionlet/optionletstripper.hpp
frannuca/quantlib
63e66f5f767397e5b7c79fa78eaed4e3e0a6b7c6
[ "BSD-3-Clause" ]
null
null
null
QuantLib/ql/termstructures/volatility/optionlet/optionletstripper.hpp
frannuca/quantlib
63e66f5f767397e5b7c79fa78eaed4e3e0a6b7c6
[ "BSD-3-Clause" ]
1
2022-02-24T04:54:18.000Z
2022-02-24T04:54:18.000Z
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2007 Ferdinando Ametrano Copyright (C) 2007 Giorgio Facchinetti This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email <quantlib-dev@lists.sf.net>. The license is also available online at <http://quantlib.org/license.shtml>. 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 license for more details. */ /*! \file optionletstripper.hpp \brief optionlet (caplet/floorlet) volatility stripper */ #ifndef quantlib_optionletstripper_hpp #define quantlib_optionletstripper_hpp #include <ql/termstructures/volatility/optionlet/strippedoptionletbase.hpp> #include <ql/termstructures/volatility/capfloor/capfloortermvolsurface.hpp> #include <ql/termstructures/yieldtermstructure.hpp> namespace QuantLib { class IborIndex; /*! StrippedOptionletBase specialization. It's up to derived classes to implement LazyObject::performCalculations */ class OptionletStripper : public StrippedOptionletBase { public: //! \name StrippedOptionletBase interface //@{ const std::vector<Rate>& optionletStrikes(Size i) const; const std::vector<Volatility>& optionletVolatilities(Size i) const; const std::vector<Date>& optionletFixingDates() const; const std::vector<Time>& optionletFixingTimes() const; Size optionletMaturities() const; const std::vector<Rate>& atmOptionletRates() const; DayCounter dayCounter() const; Calendar calendar() const; Natural settlementDays() const; BusinessDayConvention businessDayConvention() const; //@} const std::vector<Period>& optionletFixingTenors() const; const std::vector<Date>& optionletPaymentDates() const; const std::vector<Time>& optionletAccrualPeriods() const; boost::shared_ptr<CapFloorTermVolSurface> termVolSurface() const; boost::shared_ptr<IborIndex> iborIndex() const; protected: OptionletStripper(const boost::shared_ptr<CapFloorTermVolSurface>&, const boost::shared_ptr<IborIndex>& iborIndex_, const Handle<YieldTermStructure>& discount = Handle<YieldTermStructure>()); boost::shared_ptr<CapFloorTermVolSurface> termVolSurface_; boost::shared_ptr<IborIndex> iborIndex_; Handle<YieldTermStructure> discount_; Size nStrikes_; Size nOptionletTenors_; mutable std::vector<std::vector<Rate> > optionletStrikes_; mutable std::vector<std::vector<Volatility> > optionletVolatilities_; mutable std::vector<Time> optionletTimes_; mutable std::vector<Date> optionletDates_; std::vector<Period> optionletTenors_; mutable std::vector<Rate> atmOptionletRate_; mutable std::vector<Date> optionletPaymentDates_; mutable std::vector<Time> optionletAccrualPeriods_; std::vector<Period> capFloorLengths_; }; } #endif
37.98913
79
0.703863
frannuca
d7091a4e083cb8075571eae024a2131d3b042b75
8,363
cpp
C++
pwiz/analysis/spectrum_processing/SpectrumList_ScanSummerTest.cpp
vagisha/pwiz
aa65186bf863cdebde3d15c293d137085365bead
[ "Apache-2.0" ]
null
null
null
pwiz/analysis/spectrum_processing/SpectrumList_ScanSummerTest.cpp
vagisha/pwiz
aa65186bf863cdebde3d15c293d137085365bead
[ "Apache-2.0" ]
null
null
null
pwiz/analysis/spectrum_processing/SpectrumList_ScanSummerTest.cpp
vagisha/pwiz
aa65186bf863cdebde3d15c293d137085365bead
[ "Apache-2.0" ]
null
null
null
// // $Id$ // // // Original author: William French <william.r.french <a.t> vanderbilt.edu> // // Copyright 2008 Vanderbilt University - Nashville, TN 37232 // // 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 "SpectrumList_ScanSummer.hpp" #include "pwiz/utility/misc/unit.hpp" #include "pwiz/data/msdata/examples.hpp" #include "pwiz/data/msdata/TextWriter.hpp" #include "pwiz/data/common/CVTranslator.hpp" #include "pwiz/utility/misc/Std.hpp" using namespace pwiz::util; using namespace pwiz::msdata; using namespace pwiz::analysis; ostream* os_ = 0; ostream& operator<< (ostream& os, const vector<double>& v) { os << "("; for (size_t i=0; i < v.size(); ++i) os << " " << v[i]; os << " )"; return os; } struct TestScanSummerCalculator { // space-delimited doubles const char* inputMZArray; const char* inputIntensityArray; double inputPrecursorMZ; double rTime; double ionMobility; int msLevel; }; TestScanSummerCalculator testScanSummerCalculators[] = { { "112 112.0000001 112.1 120 121 123 124 128 129 112 112.0000001 112.1 120 121 123 124 128 129", " 3 2 6 0 1 4 2 1 7 3 2 6 0 1 4 2 1 7", 0, 20.0, 0.0, 1}, { "112.0001 119 120 121 122 123 124 127 128 129", " 1 4 5 6 7 8 9 10 11 12", 0, 20.1, 0.0, 1}, { "112 112.0000001 112.1 120 121 123 124 128 129", " 3 2 5 0 1 4 2 1 7", 120.0, 20.0, 0.0, 2}, { "112.0001 119 120 121 122 123 124 127 128 129", " 1 4 5 6 7 8 9 10 11 12", 120.01, 20.1, 0.0, 2}, { "200 200.1 200.2 200.9 202", "1.0 3.0 1.0 0.0 3.0", 401.23, 21.1, 1.0, 2}, { "120 126 127", "7 7 7", 119.96, 21.05, 0.0, 2}, { "200.1 200.2 200.3 200.8 200.9", "1.0 3.0 1.0 1.0 4.0", 401.19, 21.2, 1.01, 2}, { "200.1 200.2 200.3 200.8 200.9", "1.0 3.0 1.0 1.0 4.0", 401.21, 21.3, 2.0, 2}, }; TestScanSummerCalculator goldStandard[] = { { "112 112.1 120 121 123 124 128 129", " 10 12 0 2 8 4 2 14", 0, 20.0, 0.0, 1}, { "112.0001 119 120 121 122 123 124 127 128 129", " 1 4 5 6 7 8 9 10 11 12", 0, 20.1, 0.0, 1}, { "112 112.1 119 120 121 122 123 124 126 127 128 129", "6 5 4 12 7 7 12 11 7 17 12 19", 120.0, 20.1, // median of 20 20.1 21.05 0.0, 2}, { "200 200.1 200.2 200.3 200.8 200.9 202", "1.0 4.0 4.0 1.0 1.0 4.0 3.0", 401.21, // median of 401.19 401.23 21.15, // median of 21.1 21.2 1.005, // median of 1 1.01 2}, { "200.1 200.2 200.3 200.8 200.9", "1.0 3.0 1.0 1.0 4.0", 401.21, 21.3, 2.0, 2}, }; const size_t testScanSummerSize = sizeof(testScanSummerCalculators) / sizeof(TestScanSummerCalculator); const size_t goldStandardSize = sizeof(goldStandard) / sizeof(TestScanSummerCalculator); vector<double> parseDoubleArray(const string& doubleArray) { vector<double> doubleVector; vector<string> tokens; bal::split(tokens, doubleArray, bal::is_space(), bal::token_compress_on); if (!tokens.empty()) for (size_t i=0; i < tokens.size(); ++i) if (!tokens[i].empty()) doubleVector.push_back(lexical_cast<double>(tokens[i])); return doubleVector; } int test() { int failedTests = 0; // create the spectrum list SpectrumListSimple* sl = new SpectrumListSimple; SpectrumListPtr originalList(sl); for (size_t i=0; i < testScanSummerSize; ++i) { TestScanSummerCalculator& t = testScanSummerCalculators[i]; SpectrumPtr s(new Spectrum); s->set(MS_MSn_spectrum); s->set(MS_ms_level, t.msLevel); s->index = sl->spectra.size(); s->scanList.scans.push_back(Scan()); Scan& scanRef = s->scanList.scans[0]; scanRef.set(MS_scan_start_time,t.rTime,UO_second); if (t.ionMobility > 0) scanRef.set(MS_inverse_reduced_ion_mobility, t.ionMobility, MS_volt_second_per_square_centimeter); if (t.msLevel > 1) s->precursors.push_back(Precursor(t.inputPrecursorMZ)); vector<double> inputMZArray = parseDoubleArray(t.inputMZArray); vector<double> inputIntensityArray = parseDoubleArray(t.inputIntensityArray); s->setMZIntensityArrays(inputMZArray, inputIntensityArray, MS_number_of_detector_counts); s->defaultArrayLength = inputMZArray.size(); auto mobilityArray = boost::make_shared<BinaryDataArray>(); mobilityArray->data.resize(inputMZArray.size(), 0); mobilityArray->set(MS_raw_ion_mobility_array); s->binaryDataArrayPtrs.push_back(mobilityArray); scanRef.scanWindows.push_back(ScanWindow()); scanRef.scanWindows[0].set(MS_scan_window_lower_limit,inputMZArray[0]); scanRef.scanWindows[0].set(MS_scan_window_upper_limit,inputMZArray[inputMZArray.size()-1]); sl->spectra.push_back(s); } vector<double> goldMZArray = parseDoubleArray(goldStandard[0].inputMZArray); vector<double> goldIntensityArray = parseDoubleArray(goldStandard[0].inputIntensityArray); // run spectral summation try { SpectrumListPtr calculator(new SpectrumList_ScanSummer(originalList, 0.05, 10, 0.5, true)); for (size_t i=0; i < calculator->size(); ++i) { SpectrumPtr s = calculator->spectrum(i,true); BinaryData<double>& mzs = s->getMZArray()->data; BinaryData<double>& intensities = s->getIntensityArray()->data; double rTime = s->scanList.scans[0].cvParam(MS_scan_start_time).timeInSeconds(); double ionMobility = s->scanList.scans[0].cvParamValueOrDefault(MS_inverse_reduced_ion_mobility, 0.0); vector<double> goldMZArray = parseDoubleArray(goldStandard[i].inputMZArray); vector<double> goldIntensityArray = parseDoubleArray(goldStandard[i].inputIntensityArray); unit_assert_operator_equal(2, s->binaryDataArrayPtrs.size()); // mobility array dropped unit_assert_operator_equal(goldMZArray.size(), mzs.size()); unit_assert_operator_equal(goldIntensityArray.size(), intensities.size()); unit_assert_equal(goldStandard[i].rTime, rTime, 1e-8); unit_assert_equal(goldStandard[i].ionMobility, ionMobility, 1e-8); if (goldStandard[i].msLevel > 1) { Precursor& precursor = s->precursors[0]; SelectedIon& selectedIon = precursor.selectedIons[0]; double precursorMZ = selectedIon.cvParam(MS_selected_ion_m_z).valueAs<double>(); unit_assert_equal(goldStandard[i].inputPrecursorMZ, precursorMZ, 1e-8); } for (size_t j=0; j < mzs.size(); ++j) { unit_assert_equal(mzs[j], goldMZArray[j], 1e-5); unit_assert_equal(intensities[j], goldIntensityArray[j], 1e-5); } } } catch (exception& e) { cerr << "Test failed:\n" << e.what() << endl; ++failedTests; } return failedTests; } int main(int argc, char* argv[]) { TEST_PROLOG(argc, argv) try { if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout; int failedTests = test(); unit_assert_operator_equal(0, failedTests); } catch (exception& e) { TEST_FAILED(e.what()) } catch (...) { TEST_FAILED("Caught unknown exception.") } TEST_EPILOG }
29.241259
114
0.593926
vagisha
d70cfa7b1454e3cdd7a83df8d80437ca9530f506
8,785
hpp
C++
openstudiocore/src/model/AirflowNetworkDetailedOpening.hpp
hellok-coder/OS-Testing
e9e18ad9e99f709a3f992601ed8d2e0662175af4
[ "blessing" ]
1
2019-11-12T02:07:03.000Z
2019-11-12T02:07:03.000Z
openstudiocore/src/model/AirflowNetworkDetailedOpening.hpp
hellok-coder/OS-Testing
e9e18ad9e99f709a3f992601ed8d2e0662175af4
[ "blessing" ]
1
2019-02-04T23:30:45.000Z
2019-02-04T23:30:45.000Z
openstudiocore/src/model/AirflowNetworkDetailedOpening.hpp
hellok-coder/OS-Testing
e9e18ad9e99f709a3f992601ed8d2e0662175af4
[ "blessing" ]
null
null
null
/*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2019, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following * disclaimer. * * (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided with the distribution. * * (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products * derived from this software without specific prior written permission from the respective party. * * (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other derivative works * may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar designation without specific prior * written permission from Alliance for Sustainable Energy, LLC. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED * STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************************************************************/ #ifndef MODEL_AIRFLOWNETWORKDETAILEDOPENING_HPP #define MODEL_AIRFLOWNETWORKDETAILEDOPENING_HPP #include "ModelAPI.hpp" #include "AirflowNetworkComponent.hpp" namespace openstudio { namespace model { class MODEL_API DetailedOpeningFactorData { public: /** @name Constructor */ //@{ DetailedOpeningFactorData(double openingFactor, double dischargeCoefficient, double widthFactor, double heightFactor, double startHeightFactor); //@} /** @name Getters */ //@{ /** For a rectangular non-pivoted window or door (LVO Type 1), the opening factor corresponds to the fraction of the * window or door that is opened. For rectangular horizontally-pivoted windows (LVO Type 2), the opening factor is * the angular fraction that window is open. For example, an opening angle of 45 degrees corresponds to an opening * factor of 0.50 since the maximum opening angle is 90 degrees. */ double openingFactor() const; /** The discharge coefficient indicates the fractional effectiveness for air flow through a window or door at * that Opening Factor. */ double dischargeCoefficient() const; /** The width factor is the opening width divided by the window or door width. */ double widthFactor() const; /** The height factor is the opening height divided by the window or door height. */ double heightFactor() const; /** The start height factor is the start height divided by the window or door height. * Start height is the distance between the bottom of the window or door and the * bottom of the window or door opening. The sum of the height factor and the start height * factor must be less than 1.0 in order to have the opening within the window or door dimensions. */ double startHeightFactor() const; //@} /** @name Setters */ //@{ /** Sets the opening factor. */ bool setOpeningFactor(double openingFactor); /** Sets the discharge coefficient. */ bool setDischargeCoefficient(double dischargeCoefficient); /** Sets the width factor. */ bool setWidthFactor(double widthFactor); /** Sets the height factor. */ bool setHeightFactor(double heightFactor); /** Sets the start height factor. */ bool setStartHeightFactor(double startHeightFactor); //@} private: double m_openingFactor; double m_dischargeCoefficient; double m_widthFactor; double m_heightFactor; double m_startHeightFactor; }; namespace detail { class AirflowNetworkDetailedOpening_Impl; } // detail /** AirflowNetworkDetailedOpening is a ModelObject that wraps the OpenStudio IDD object 'OS:AirflowNetworkDetailedOpening'. */ class MODEL_API AirflowNetworkDetailedOpening : public AirflowNetworkComponent { public: /** @name Constructors and Destructors */ //@{ /** Construct a detailed opening object. */ AirflowNetworkDetailedOpening(const Model& model, double massFlowCoefficientWhenOpeningisClosed, double massFlowExponentWhenOpeningisClosed, std::string typeofRectangularLargeVerticalOpening, double extraCrackLengthorHeightofPivotingAxis, std::vector<DetailedOpeningFactorData>& openingFactors); /** Construct a detailed opening object with defaulted values. */ AirflowNetworkDetailedOpening(const Model& model, double massFlowCoefficientWhenOpeningisClosed, std::vector<DetailedOpeningFactorData>& openingFactors); virtual ~AirflowNetworkDetailedOpening() {} //@} static IddObjectType iddObjectType(); static std::vector<std::string> typeofRectangularLargeVerticalOpeningValues(); /** @name Getters */ //@{ /** Returns the air mass flow coefficient when the opening is closed. */ double airMassFlowCoefficientWhenOpeningisClosed() const; /** Returns the air mass flow exponent when the opening is closed. */ double airMassFlowExponentWhenOpeningisClosed() const; /** Returns true if the air mass flow exponent when the opening is closed is defaulted. */ bool isAirMassFlowExponentWhenOpeningisClosedDefaulted() const; /** Returns the LVO type. */ std::string typeofRectangularLargeVerticalOpening() const; /** Returns true if the LVO type is defaulted. */ bool isTypeofRectangularLargeVerticalOpeningDefaulted() const; /** Returns the extra crack length or height of pivoting axis. */ double extraCrackLengthorHeightofPivotingAxis() const; /** Returns true if the extra crack length or height of pivoting axis is defaulted. */ bool isExtraCrackLengthorHeightofPivotingAxisDefaulted() const; /** Returns the opening factor data. */ std::vector<DetailedOpeningFactorData> openingFactors() const; //@} /** @name Setters */ //@{ /** Sets the air mass flow coefficient when the opening is closed. */ bool setAirMassFlowCoefficientWhenOpeningisClosed(double airMassFlowCoefficientWhenOpeningisClosed); /** Sets the air mass flow exponent when the opening is closed. */ bool setAirMassFlowExponentWhenOpeningisClosed(double airMassFlowExponentWhenOpeningisClosed); /** Resets the air mass flow exponent when the opening is closed. */ void resetAirMassFlowExponentWhenOpeningisClosed(); /** Sets the LVO type. */ bool setTypeofRectangularLargeVerticalOpening(std::string typeofRectangularLargeVerticalOpening); /** Resets the LVO type. */ void resetTypeofRectangularLargeVerticalOpening(); /** Sets the extra crack length or height of pivoting axis. */ bool setExtraCrackLengthorHeightofPivotingAxis(double extraCrackLengthorHeightofPivotingAxis); /** Resets the extra crack length or height of pivoting axis. */ void resetExtraCrackLengthorHeightofPivotingAxis(); /** Sets the opening factor data. */ bool setOpeningFactors(std::vector<DetailedOpeningFactorData>& factors); //@} protected: /// @cond typedef detail::AirflowNetworkDetailedOpening_Impl ImplType; explicit AirflowNetworkDetailedOpening(std::shared_ptr<detail::AirflowNetworkDetailedOpening_Impl> impl); friend class detail::AirflowNetworkDetailedOpening_Impl; friend class Model; friend class IdfObject; friend class openstudio::detail::IdfObject_Impl; /// @endcond private: REGISTER_LOGGER("openstudio.model.AirflowNetworkDetailedOpening"); }; /** \relates AirflowNetworkDetailedOpening*/ typedef boost::optional<AirflowNetworkDetailedOpening> OptionalAirflowNetworkDetailedOpening; /** \relates AirflowNetworkDetailedOpening*/ typedef std::vector<AirflowNetworkDetailedOpening> AirflowNetworkDetailedOpeningVector; } // model } // openstudio #endif // MODEL_AIRFLOWNETWORKDETAILEDOPENING_HPP
45.283505
126
0.753102
hellok-coder
d70e16834bcd0e03f155649b8f4d3e32d5afc387
470
hpp
C++
waterbox/bsnescore/bsnes/nall/decode/mtf.hpp
Fortranm/BizHawk
8cb0ffb6f8964cc339bbe1784838918fb0aa7e27
[ "MIT" ]
1,414
2015-06-28T09:57:51.000Z
2021-10-14T03:51:10.000Z
waterbox/bsnescore/bsnes/nall/decode/mtf.hpp
Fortranm/BizHawk
8cb0ffb6f8964cc339bbe1784838918fb0aa7e27
[ "MIT" ]
2,369
2015-06-25T01:45:44.000Z
2021-10-16T08:44:18.000Z
waterbox/bsnescore/bsnes/nall/decode/mtf.hpp
Fortranm/BizHawk
8cb0ffb6f8964cc339bbe1784838918fb0aa7e27
[ "MIT" ]
430
2015-06-29T04:28:58.000Z
2021-10-05T18:24:17.000Z
#pragma once //move to front namespace nall::Decode { inline auto MTF(array_view<uint8_t> input) -> vector<uint8_t> { vector<uint8_t> output; output.resize(input.size()); uint8_t order[256]; for(uint n : range(256)) order[n] = n; for(uint offset : range(input.size())) { uint data = input[offset]; uint value = order[data]; output[offset] = value; memory::move(&order[1], &order[0], data); order[0] = value; } return output; } }
18.076923
63
0.629787
Fortranm
d70f0f6b2b6417e0bb89fa829085622c4562b9d6
88
cpp
C++
src/graphics/Camera.cpp
RamilHinshaw/LotusEngine
2bdd6ba9c67b70c6e0f4d5fea213ca113b869a5e
[ "MIT" ]
1
2019-11-07T14:57:04.000Z
2019-11-07T14:57:04.000Z
src/graphics/Camera.cpp
RamilHinshaw/LotusEngine
2bdd6ba9c67b70c6e0f4d5fea213ca113b869a5e
[ "MIT" ]
null
null
null
src/graphics/Camera.cpp
RamilHinshaw/LotusEngine
2bdd6ba9c67b70c6e0f4d5fea213ca113b869a5e
[ "MIT" ]
null
null
null
// #include "Camera.hpp" // Camera::Camera() // { // } // Camera::~Camera() // { // }
8.8
24
0.454545
RamilHinshaw
d7147e7633599f90788b3070251793fe9477e856
4,881
cpp
C++
geometry/pointcloud.cpp
tomas2211/libgeometry
003c58cf92e46ac01d506987f47b770929cc799b
[ "BSD-2-Clause" ]
2
2021-05-27T12:55:56.000Z
2022-02-17T20:40:56.000Z
externals/browser/externals/browser/externals/libgeometry/geometry/pointcloud.cpp
HanochZhu/vts-browser-unity-plugin
32a22d41e21b95fb015326f95e401d87756d0374
[ "BSD-2-Clause" ]
3
2021-02-23T02:20:26.000Z
2022-03-04T10:25:19.000Z
externals/browser/externals/browser/externals/libgeometry/geometry/pointcloud.cpp
HanochZhu/vts-browser-unity-plugin
32a22d41e21b95fb015326f95e401d87756d0374
[ "BSD-2-Clause" ]
3
2019-09-25T05:22:12.000Z
2022-02-17T16:43:00.000Z
/** * Copyright (c) 2017 Melown Technologies SE * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* pointcloud.cpp */ #include "pointcloud.hpp" #include <dbglog/dbglog.hpp> #include <boost/foreach.hpp> #include <fstream> namespace geometry { void PointCloud::push_back( const math::Point3 & x ) { updateExtents( x ); std::vector<math::Point3>::push_back( x ); } PointCloud::iterator PointCloud::insert( iterator position, const math::Point3 & x ) { updateExtents( x ); return std::vector<math::Point3>::insert( position, x ); } void PointCloud::insert( iterator position, size_type n, const math::Point3 & x ) { updateExtents( x ); std::vector<math::Point3>::insert( position, n, x ); } void PointCloud::clear() { extents_ = math::Extents3(); } void PointCloud::dump( const std::string & path ) { std::fstream f; f.exceptions( std::ios::badbit | std::ios::failbit ); try { f.open( path, std::ios_base::out | std::ios_base::trunc ); for ( const_iterator it = begin(); it < end(); ++it ) { f << (*it)(0) << "\t" << (*it)(1) << "\t" << (*it)(2) << "\n"; } } catch ( std::ios_base::failure & e ) { LOG( err2 ) << "Failed to write to '" << path << "', error: " << e.what(); throw; } } void PointCloud::load( const std::string & path ) { std::ifstream f; f.exceptions( std::ios::badbit ); try { f.open( path ); clear(); double x, y, z; while (f >> x >> y >> z) { push_back( math::Point3(x, y, z) ); } } catch ( std::ios_base::failure & e ) { LOG( err2 ) << "Failed to read '" << path << "', error: " << e.what(); throw; } } void PointCloud::updateExtents( const math::Point3 & x ) { if ( empty() ) { extents_ = math::Extents3(x, x); return; } update(extents_, x); } double PointCloud::samplingDelta( float bulkThreshold ) const { ThreeDistance * distArray = new ThreeDistance[ size() ]; // sanity assert( ! empty() ); // obtain array of closest neighbour distances double maxDist = ublas::norm_2( extents_.ur - extents_.ll ); for ( unsigned int i = 0; i < size(); i++ ) distArray[i] = ThreeDistance( maxDist ); for ( unsigned int i = 0; i < size(); i++ ) for ( unsigned int j = 0; j < i; j++ ) { distArray[i].update( at( i ) - at( j ) ); distArray[j].update( at( i ) - at( j ) ); } // sort array std::sort( distArray, distArray + size() ); // return delta double retval = distArray[ int( floor( bulkThreshold * ( size() - 1 ) ) ) ].value(); delete[] distArray; return retval; } /* PointCloud::ThreeDistance */ void PointCloud::ThreeDistance::update( const math::Point3 diff ) { double dist = ublas::norm_2( diff ); if ( dist < 1E-15 ) return; int code = ( fabs( diff[0] ) > fabs( diff[1] ) ) << 0 | ( fabs( diff[1] ) > fabs( diff[2] ) ) << 1 | ( fabs( diff[2] ) > fabs( diff[0] ) ) << 2; if ( code == 0 || code == 1 || code == 3 ) { if ( dist < distX ) distX = dist; } if ( code == 2 || code == 6 ) { if ( dist < distY ) distY = dist; } if ( code == 4 || code == 5 ) { if ( dist < distZ ) distZ = dist; } } double PointCloud::ThreeDistance::value() const { double dists[3]; dists[0] = distX; dists[1] = distY; dists[2] = distZ; std::sort( dists, dists + 3 ); return dists[ 1 ]; } } // namespace geometry
26.527174
89
0.592297
tomas2211
d7175378fd1b4da99aad27c3016a7be967ad8f89
1,558
cpp
C++
dep/skse/skse/SafeWrite.cpp
SilverIce/JContainers
98ca31304a74e299d1f7f003602c55fb07e866ee
[ "MIT" ]
39
2015-01-16T09:17:05.000Z
2021-12-15T23:02:00.000Z
dep/skse/skse/SafeWrite.cpp
Verteiron/JContainers
a5c83198c782458a7c2ae683319558cc88959d25
[ "MIT" ]
26
2015-01-03T20:26:27.000Z
2019-12-30T22:46:15.000Z
dep/skse/skse/SafeWrite.cpp
SilverIce/JContainers
98ca31304a74e299d1f7f003602c55fb07e866ee
[ "MIT" ]
14
2015-10-23T08:46:01.000Z
2022-03-24T18:08:24.000Z
#include "SafeWrite.h" void SafeWrite8(UInt32 addr, UInt32 data) { UInt32 oldProtect; VirtualProtect((void *)addr, 4, PAGE_EXECUTE_READWRITE, &oldProtect); *((UInt8 *)addr) = data; VirtualProtect((void *)addr, 4, oldProtect, &oldProtect); } void SafeWrite16(UInt32 addr, UInt32 data) { UInt32 oldProtect; VirtualProtect((void *)addr, 4, PAGE_EXECUTE_READWRITE, &oldProtect); *((UInt16 *)addr) = data; VirtualProtect((void *)addr, 4, oldProtect, &oldProtect); } void SafeWrite32(UInt32 addr, UInt32 data) { UInt32 oldProtect; VirtualProtect((void *)addr, 4, PAGE_EXECUTE_READWRITE, &oldProtect); *((UInt32 *)addr) = data; VirtualProtect((void *)addr, 4, oldProtect, &oldProtect); } void SafeWriteBuf(UInt32 addr, void * data, UInt32 len) { UInt32 oldProtect; VirtualProtect((void *)addr, len, PAGE_EXECUTE_READWRITE, &oldProtect); memcpy((void *)addr, data, len); VirtualProtect((void *)addr, len, oldProtect, &oldProtect); } void WriteRelJump(UInt32 jumpSrc, UInt32 jumpTgt) { // jmp rel32 SafeWrite8(jumpSrc, 0xE9); SafeWrite32(jumpSrc + 1, jumpTgt - jumpSrc - 1 - 4); } void WriteRelCall(UInt32 jumpSrc, UInt32 jumpTgt) { // call rel32 SafeWrite8(jumpSrc, 0xE8); SafeWrite32(jumpSrc + 1, jumpTgt - jumpSrc - 1 - 4); } void WriteRelJnz(UInt32 jumpSrc, UInt32 jumpTgt) { // jnz rel32 SafeWrite16(jumpSrc, 0x850F); SafeWrite32(jumpSrc + 2, jumpTgt - jumpSrc - 2 - 4); } void WriteRelJle(UInt32 jumpSrc, UInt32 jumpTgt) { // jle rel32 SafeWrite16(jumpSrc, 0x8E0F); SafeWrite32(jumpSrc + 2, jumpTgt - jumpSrc - 2 - 4); }
23.606061
72
0.715661
SilverIce
d71a444833f34d0a6061140049797aebcdbbda51
1,423
cpp
C++
cmdstan/stan/lib/stan_math/test/unit/math/fwd/mat/fun/rows_test.cpp
yizhang-cae/torsten
dc82080ca032325040844cbabe81c9a2b5e046f9
[ "BSD-3-Clause" ]
null
null
null
cmdstan/stan/lib/stan_math/test/unit/math/fwd/mat/fun/rows_test.cpp
yizhang-cae/torsten
dc82080ca032325040844cbabe81c9a2b5e046f9
[ "BSD-3-Clause" ]
null
null
null
cmdstan/stan/lib/stan_math/test/unit/math/fwd/mat/fun/rows_test.cpp
yizhang-cae/torsten
dc82080ca032325040844cbabe81c9a2b5e046f9
[ "BSD-3-Clause" ]
null
null
null
#include <stan/math/fwd/mat.hpp> #include <gtest/gtest.h> TEST(AgradFwdMatrixRows,fd_vector) { using stan::math::vector_fd; using stan::math::row_vector_fd; using stan::math::rows; vector_fd v(5); v << 0, 1, 2, 3, 4; EXPECT_EQ(5U, rows(v)); v.resize(0); EXPECT_EQ(0U, rows(v)); } TEST(AgradFwdMatrixRows,fd_rowvector) { using stan::math::row_vector_fd; using stan::math::rows; row_vector_fd rv(5); rv << 0, 1, 2, 3, 4; EXPECT_EQ(1U, rows(rv)); rv.resize(0); EXPECT_EQ(1U, rows(rv)); } TEST(AgradFwdMatrixRows,fd_matrix) { using stan::math::matrix_fd; using stan::math::rows; matrix_fd m(2,3); m << 0, 1, 2, 3, 4, 5; EXPECT_EQ(2U, rows(m)); m.resize(0,2); EXPECT_EQ(0U, rows(m)); } TEST(AgradFwdMatrixRows,ffd_vector) { using stan::math::vector_ffd; using stan::math::row_vector_ffd; using stan::math::rows; vector_ffd v(5); v << 0, 1, 2, 3, 4; EXPECT_EQ(5U, rows(v)); v.resize(0); EXPECT_EQ(0U, rows(v)); } TEST(AgradFwdMatrixRows,ffd_rowvector) { using stan::math::row_vector_ffd; using stan::math::rows; row_vector_ffd rv(5); rv << 0, 1, 2, 3, 4; EXPECT_EQ(1U, rows(rv)); rv.resize(0); EXPECT_EQ(1U, rows(rv)); } TEST(AgradFwdMatrixRows,ffd_matrix) { using stan::math::matrix_ffd; using stan::math::rows; matrix_ffd m(2,3); m << 0, 1, 2, 3, 4, 5; EXPECT_EQ(2U, rows(m)); m.resize(0,2); EXPECT_EQ(0U, rows(m)); }
19.763889
40
0.635278
yizhang-cae
d7211c38c0cad72d83a2517825079980f0b00b61
3,974
cpp
C++
testeve-api-proxy/tests/crest/MarketOrderSlim.cpp
SyncViews/eve-api-proxy
b42e77417c3dddded466f4aad73884fbfdebac29
[ "MIT" ]
null
null
null
testeve-api-proxy/tests/crest/MarketOrderSlim.cpp
SyncViews/eve-api-proxy
b42e77417c3dddded466f4aad73884fbfdebac29
[ "MIT" ]
null
null
null
testeve-api-proxy/tests/crest/MarketOrderSlim.cpp
SyncViews/eve-api-proxy
b42e77417c3dddded466f4aad73884fbfdebac29
[ "MIT" ]
null
null
null
#include <boost/test/unit_test.hpp> #include "crest/MarketOrderSlim.hpp" #include <iostream> using namespace crest; BOOST_AUTO_TEST_SUITE(TestCrestMarketOrderSlim) BOOST_AUTO_TEST_CASE(read) { MarketOrderSlim order; json::read_json( "{" " \"buy\": true," " \"duration\": 365," " \"id\": 911203398," " \"issued\": \"2016-07-27T21:58:21\"," " \"minVolume\": 1," " \"price\": 120.72," " \"range\": \"station\"," " \"stationID\": 60000382," " \"type\": 3673," " \"volume\": 70156," " \"volumeEntered\": 70376" "}" , &order); BOOST_CHECK_EQUAL(true, order.buy); BOOST_CHECK_EQUAL(365, order.duration); BOOST_CHECK_EQUAL(911203398, order.id); BOOST_CHECK_EQUAL(1469656701, order.issued); BOOST_CHECK_EQUAL(1, order.min_volume); BOOST_CHECK_CLOSE(120.72, order.price, 0.00001); BOOST_CHECK_EQUAL((int)MarketOrderSlim::RANGE_STATION, order.range); BOOST_CHECK_EQUAL(60000382, order.station_id); BOOST_CHECK_EQUAL(3673, order.type); BOOST_CHECK_EQUAL(70156, order.volume); BOOST_CHECK_EQUAL(70376, order.volume_entered); json::read_json( "{" " \"buy\": true," " \"duration\": 365," " \"id\": 911203398," " \"issued\": \"2016-07-27T21:58:21\"," " \"minVolume\": 1," " \"price\": 120.72," " \"range\": \"region\"," " \"stationID\": 60000382," " \"type\": 3673," " \"volume\": 70156," " \"volumeEntered\": 70376" "}" , &order); BOOST_CHECK_EQUAL((int)MarketOrderSlim::RANGE_REGION, order.range); json::read_json( "{" " \"buy\": true," " \"duration\": 365," " \"id\": 911203398," " \"issued\": \"2016-07-27T21:58:21\"," " \"minVolume\": 1," " \"price\": 120.72," " \"range\": \"3\"," " \"stationID\": 60000382," " \"type\": 3673," " \"volume\": 70156," " \"volumeEntered\": 70376" "}" , &order); BOOST_CHECK_EQUAL(3, order.range); } BOOST_AUTO_TEST_CASE(write) { MarketOrderSlim order; order.buy = false; order.id = 911203398; order.issued = 1469656701; order.min_volume= 2; order.price = 120; order.range = MarketOrderSlim::RANGE_STATION; order.station_id = 60000382; order.type = 3673; order.duration = 365; order.volume = 70156; order.volume_entered = 70376; auto json = json::to_json(order); BOOST_CHECK_EQUAL( "{" "\"id\":911203398," "\"station_id\":60000382," "\"range\":\"station\"," "\"issued\":\"2016-07-27T21:58:21Z\"," "\"buy\":false," "\"price\":120," "\"type\":3673," "\"duration\":365," "\"volume\":70156," "\"min_volume\":2," "\"volume_entered\":70376" "}", json); order.range = MarketOrderSlim::RANGE_REGION; json = json::to_json(order); BOOST_CHECK_EQUAL( "{" "\"id\":911203398," "\"station_id\":60000382," "\"range\":\"region\"," "\"issued\":\"2016-07-27T21:58:21Z\"," "\"buy\":false," "\"price\":120," "\"type\":3673," "\"duration\":365," "\"volume\":70156," "\"min_volume\":2," "\"volume_entered\":70376" "}", json); order.range = 5; json = json::to_json(order); BOOST_CHECK_EQUAL( "{" "\"id\":911203398," "\"station_id\":60000382," "\"range\":\"5\"," "\"issued\":\"2016-07-27T21:58:21Z\"," "\"buy\":false," "\"price\":120," "\"type\":3673," "\"duration\":365," "\"volume\":70156," "\"min_volume\":2," "\"volume_entered\":70376" "}", json); } BOOST_AUTO_TEST_SUITE_END()
27.597222
72
0.501007
SyncViews
d7236a4c2f5a1c4caba52df9be0daca45f45d347
1,470
cpp
C++
src/model/sequencemanager.cpp
fanghaocong/GitlHEVCAnalyzer
1dbf3adca4822b0a55af03c7a7f49c92798c91d6
[ "Apache-2.0" ]
394
2015-01-08T01:26:39.000Z
2022-03-16T03:07:30.000Z
src/model/sequencemanager.cpp
fanghaocong/GitlHEVCAnalyzer
1dbf3adca4822b0a55af03c7a7f49c92798c91d6
[ "Apache-2.0" ]
14
2016-11-30T08:24:39.000Z
2021-11-06T14:12:58.000Z
src/model/sequencemanager.cpp
fanghaocong/GitlHEVCAnalyzer
1dbf3adca4822b0a55af03c7a7f49c92798c91d6
[ "Apache-2.0" ]
151
2015-01-17T01:07:00.000Z
2022-03-20T08:11:07.000Z
#include "sequencemanager.h" SequenceManager::SequenceManager() { m_pcCurrentSequence = NULL; } SequenceManager::~SequenceManager() { while(!m_apSequences.empty()) { delete m_apSequences.back(); m_apSequences.pop_back(); } } ComSequence* SequenceManager::getCurrentSequence() { if(m_pcCurrentSequence == NULL) qCritical() << "No Video Sequence Found.."; //throw NoSequenceFoundException(); return m_pcCurrentSequence; } void SequenceManager::setCurrentSequence(ComSequence *pcSequence) { m_pcCurrentSequence = pcSequence; } void SequenceManager::addSequence(ComSequence *pcSequence) { m_apSequences.push_back(pcSequence); } bool SequenceManager::delSequence(ComSequence *pcSequence) { for(int i = 0; i < m_apSequences.size(); i++) { if( m_apSequences[i] == pcSequence) { m_apSequences.remove(i); if(pcSequence == m_pcCurrentSequence) m_pcCurrentSequence = NULL; delete pcSequence; return true; } } return false; } QVector<ComSequence *> &SequenceManager::getAllSequences() { return m_apSequences; } ComSequence* SequenceManager::getSequenceByFilename(const QString &strFilename) { foreach(ComSequence* p, m_apSequences) { if(p->getFileName() == strFilename) return p; } return NULL; }
22.615385
80
0.626531
fanghaocong
d7239e4eec6493a73d45110b2756124f7c82c199
512
cpp
C++
src/snabl/error.cpp
ricelang/snabl
488591099faf089d4deba30f90017305ff31598c
[ "MIT" ]
1
2021-10-20T07:44:36.000Z
2021-10-20T07:44:36.000Z
src/snabl/error.cpp
ricelang/snabl
488591099faf089d4deba30f90017305ff31598c
[ "MIT" ]
null
null
null
src/snabl/error.cpp
ricelang/snabl
488591099faf089d4deba30f90017305ff31598c
[ "MIT" ]
null
null
null
#include "snabl/fmt.hpp" #include "snabl/pos.hpp" #include "snabl/error.hpp" namespace snabl { Error::Error(const string &msg): runtime_error(msg) { } CompileError::CompileError(Pos pos, const string &msg): Error(fmt("Compile error in row %0, col %1: %2", {pos.row, pos.col, msg})) { } CompileError::CompileError(const string &msg): Error(msg) { } SyntaxError::SyntaxError(Pos pos, const string &msg): CompileError(fmt("Syntax error in row %0, col %1: %2", {pos.row, pos.col, msg})) { } }
30.117647
80
0.664063
ricelang
d725ee56f490aeb2c4409b6f1f059ef7b9cba9fa
313
cpp
C++
c++/ex5.cpp
PedroHenrique-git/c
b8a9fcd988a80e0738506bb2fdea43ed7fcd5ece
[ "MIT" ]
null
null
null
c++/ex5.cpp
PedroHenrique-git/c
b8a9fcd988a80e0738506bb2fdea43ed7fcd5ece
[ "MIT" ]
null
null
null
c++/ex5.cpp
PedroHenrique-git/c
b8a9fcd988a80e0738506bb2fdea43ed7fcd5ece
[ "MIT" ]
null
null
null
#include<iostream> using namespace std; int square(int x) { cout<<"quadrado do int "<<x<<" e "; return x * x; } double square( double y ) { cout<<"quandrado do double "<<y<<" e "; return y * y; } int main ( void ) { cout<<square(7); cout<<endl; cout<<square(7.5); cout<<endl; }
15.65
43
0.549521
PedroHenrique-git
d726d2c33475e5ed59b70145872a37e691b08ea3
674
hpp
C++
immer/refcount/no_refcount_policy.hpp
ikrima/immer
2076affd9d814afc019ba8cd8c2b18a6c79c9589
[ "BSL-1.0" ]
1,964
2016-11-19T19:04:31.000Z
2022-03-31T16:31:00.000Z
immer/refcount/no_refcount_policy.hpp
ikrima/immer
2076affd9d814afc019ba8cd8c2b18a6c79c9589
[ "BSL-1.0" ]
180
2016-11-26T22:46:10.000Z
2022-03-10T10:23:57.000Z
immer/refcount/no_refcount_policy.hpp
ikrima/immer
2076affd9d814afc019ba8cd8c2b18a6c79c9589
[ "BSL-1.0" ]
133
2016-11-27T17:33:20.000Z
2022-03-07T03:12:49.000Z
// // immer: immutable data structures for C++ // Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente // // This software is distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt // #pragma once namespace immer { struct disowned {}; /*! * Disables reference counting, to be used with an alternative garbage * collection strategy like a `gc_heap`. */ struct no_refcount_policy { no_refcount_policy(){}; no_refcount_policy(disowned) {} void inc() {} bool dec() { return false; } void dec_unsafe() {} bool unique() { return false; } }; } // namespace immer
21.0625
78
0.689911
ikrima
c018e60681b3ae0f0fb1c78b65d18329a67d0c8e
8,910
cpp
C++
src/filters/ground_filter.cpp
earthrover/er_vision_pipeline
bdc1cc9e90be4dfaef78253828288e96dbd95cb1
[ "BSD-3-Clause" ]
null
null
null
src/filters/ground_filter.cpp
earthrover/er_vision_pipeline
bdc1cc9e90be4dfaef78253828288e96dbd95cb1
[ "BSD-3-Clause" ]
null
null
null
src/filters/ground_filter.cpp
earthrover/er_vision_pipeline
bdc1cc9e90be4dfaef78253828288e96dbd95cb1
[ "BSD-3-Clause" ]
3
2019-01-18T15:55:59.000Z
2019-09-01T21:33:52.000Z
//############################################################################# /*-:::--.` -+shmMMNmmddmmNMNmho/. `yyo++osddMms: `/yNNy- yo +mMy: `./dMMdyssssso- oy -dMy. `-+ssso:.`:mMy` .ys ho+MN: `:osso/. oMm- +h +Mmd- `/syo- :MNhs` `NM-.hs` :syo: sMh oMh :ho``/yy+. `MM. hM+ `yNN/` dM+ dM/ -sy/`/ho` hMo hMo/ho. :yy- dM/ :dNM/ :yy: yMy sy`:MN. `+ys- +Mm` oy` :NM+ .+ys/` `hMd.ys /sssssyNMm: `:sys:` `oNN+ m- .sNMh+. `:sNMdyysssssy: -odMNhs+:-.` `.-/oydMNh+. `-+shdNMMMMMMMNmdyo/. `````*/ //############################################################################# // Ground extraction process_unit //############################################################################# // // See er-pipeline.h to get more information on the functionality and structure // #include <limits> #include "../er-pipeline.h" #include "../application_state.h" #include <igl/fit_plane.h> #include "ground_filter.h" using namespace er; #define NVDI -0.345f #define IR (0.361f * 255.f) #define MAX_LUMINOSITY (150.0f*3.0f) #define MAX_Z 3 //------ BASIC FLOOR DISCOVERY & MAPPING ------ // Create floor grid // Width x Height // Algorithm of floor removal and floor discovery // Split in two clusters // 1. Some green + and nvdi = Plant // 2. No color, just ground // // Find the plane defined by the ground plane // // Adjust the plane to fit the current view using the Minimun coefficients // Find the angle X to align the plane on that axis // Find the angle Y to align the plane on that axis // // Create a transformation matrix to fit orientate the plane // Transfor every position to fit the new axis base. // Next steps: // Reduce floor cloud density with a voxelgrid // Raytrace points from floor grid up to find the right position in space // Classify between floor and plants bool ground_filter::process() { #ifdef DEBUG std::cout << " ground_filter::process() " << std::endl; #endif start_process(); // TODO: Do not clear and reuse points cloud_out->clear(); if (cloud_render == nullptr) { pcl_ptr cloud_tmp(new pcl::PointCloud<pcl::PointXYZRGBA>); cloud_render = cloud_tmp; } else { cloud_render->clear(); } Eigen::RowVector3d cp; for (auto& p : cloud_in->points) { bool add_point = true; // TODO Check why I invert this!? p.x = -p.x; if (p.r + p.g + p.b > MAX_LUMINOSITY) { add_point = false; } else if (p.a > IR) { add_point = false; } else { float nvdi = float(p.a - p.r) / (p.a + p.r); if (nvdi > NVDI) { add_point = false; } } if (p.z >= 0.01f) { if (add_point) { cloud_render->points.push_back(p); } else { cloud_out->points.push_back(p); } } } pcl::PassThrough<pcl::PointXYZRGBA> pass; pass.setInputCloud(cloud_out); pass.setFilterFieldName("z"); pass.setFilterLimits(0, MAX_Z); pass.filter(*cloud_out); #define Z_POS 2.5 bool sanity_check = false; is_ground_transform = false; view.invalidate_cloud(cloud_render); if (view.V.size() == 0) { end_process(); return true; } Eigen::Vector3d bbx_m; Eigen::Vector3d bbx_M; Eigen::RowVector3d N; igl::fit_plane(view.V, N, plane_centre); ground_plane = plane::fromPointNormal(plane_centre, N); //------------------------------------------------------------- // https://en.wikipedia.org/wiki/Direction_cosine // cos A = ax/|a|; cos B = ay/|a|; cos Y = az/|a| plane new_plane = plane::fromPointNormal(plane_centre, N); float dot = std::sqrt(ground_plane.a * ground_plane.a + ground_plane.b * ground_plane.b + ground_plane.c * ground_plane.c); float cosy = std::acos(ground_plane.c / dot); /* if (cosy > M_PI / 2.0f) cosy = M_PI - cosy; if (cosy > 1.0f) { std::cout << " Reverse normal" << std::endl; ground_plane.a = -ground_plane.a; ground_plane.b = -ground_plane.b; ground_plane.c = -ground_plane.c; } */ float cosa = std::acos(ground_plane.a / dot); cosa = (cosa - M_PI / 2.0f); float cosb = std::acos(ground_plane.b / dot); if (cosb > M_PI / 2.0f) cosb = M_PI - cosb; if (er::app_state::get().bool_debug_verbose) { std::cout << "-------------" << std::endl; std::cout << "cosa = " << cosa * (360 / (2 * M_PI)) << std::endl; std::cout << "cosb = " << cosb * (360 / (2 * M_PI)) << std::endl; std::cout << "cosy = " << cosy * (360 / (2 * M_PI)) << std::endl; } if (cosa > 0) cosa = 2 * M_PI - cosa; sanity_check = true; if (cosa > M_PI / 4.0f && cosa < -M_PI / 4.0f) { std::cout << "Out of range on COSA calculation" << std::endl; sanity_check = false; } if (cosb > M_PI / 4.0f && cosb < -M_PI / 4.0f) { std::cout << "Out of range on COSB calculation" << std::endl; sanity_check = false; } if (er::app_state::get().bool_override_rotation) { cosa = er::app_state::get().rot_x; cosb = er::app_state::get().rot_y; cosy = er::app_state::get().rot_z; } else { er::app_state::get().rot_x = cosa; er::app_state::get().rot_y = cosb; er::app_state::get().rot_z = cosy; } Tform3 X_Rot = Eigen::Affine3d(Eigen::AngleAxisd(cosa, Eigen::Vector3d::UnitZ())); Tform3 Y_Rot = Eigen::Affine3d(Eigen::AngleAxisd(cosb, Eigen::Vector3d::UnitX())); Tform3 Z_Rot = Eigen::Affine3d(Eigen::AngleAxisd(0, Eigen::Vector3d::UnitY())); Tform3 T = Tform3::Identity(); Tform3 T2 = Tform3::Identity(); if (er::app_state::get().bool_traslate) { T.translate(Vec3(-plane_centre(0), -plane_centre(1), -plane_centre(2))); T2.translate(Vec3(plane_centre(0), 0, plane_centre(2) / 2)); } //------------------------------------------------------------- Tform3 F = T2 * Z_Rot * X_Rot * Y_Rot * T; // TODO: Check if transformation is valid if (sanity_check) { is_ground_transform = true; ground_transform = F; } else { if (is_ground_transform) { std::cout << "Warning, failed calculating ground transform" << std::endl; } is_ground_transform = false; } // TODO: https://stackoverflow.com/questions/38841606/shorter-way-to-apply-transform-to-matrix-containing-vectors-in-eigen // Find how to do this properly if (er::app_state::get().ground_alignment) { for (int r = 0; r < view.V.rows(); r++) { Eigen::Vector3d v = view.V.row(r); v = ground_transform * v; view.V.row(r) = v; } bbx_m = view.V.colwise().minCoeff(); bbx_M = view.V.colwise().maxCoeff(); } else { } view.bbx_m = bbx_m = view.V.colwise().minCoeff(); view.bbx_M = bbx_M = view.V.colwise().maxCoeff(); //----------------------------------------------------------------- V_box.resize(8, 3); V_box << bbx_m(0), bbx_m(1), bbx_m(2), bbx_M(0), bbx_m(1), bbx_m(2), bbx_M(0), bbx_M(1), bbx_m(2), bbx_m(0), bbx_M(1), bbx_m(2), bbx_m(0), bbx_m(1), bbx_M(2), bbx_M(0), bbx_m(1), bbx_M(2), bbx_M(0), bbx_M(1), bbx_M(2), bbx_m(0), bbx_M(1), bbx_M(2); view.visible = er::app_state::get().show_ground; #ifdef USE_IMGUI view.f_external_render = [&] (void *viewer_ptr) { char text[256]; view.point_scale = 0.0f; if (!er::app_state::get().show_ground_plane) return; Eigen::Vector3d white = { 1, 1, 1 }; view.render_point(viewer_ptr, plane_centre, white, "Ground Centre"); //--------------------------------------------------------- // Intersection with ground at 0 position to create a vector Eigen::RowVector3d pos_intersection; double z_pos = ground_plane.get_z(0, 0); pos_intersection << 0, 0, z_pos; Eigen::Vector3d green = { 0, 1, 0 }; sprintf(text, "Intersection [%2.2f]", z_pos); view.render_point(viewer_ptr, pos_intersection, green, text); //--------------------------------------------------------- Eigen::RowVector3d pos; double y_pos = ground_plane.get_y(0, Z_POS); pos << 0, y_pos, Z_POS; double angleInRadians = std::atan2(y_pos, Z_POS - z_pos); double angleInDegrees = (angleInRadians / M_PI) * 180.0; Eigen::Vector3d color = { 1, 1, 0 }; sprintf(text, "Angle [%2.2f]", angleInDegrees); view.render_point(viewer_ptr, pos, color, text); view.render_plane(viewer_ptr, ground_plane, view.bbx_m, view.bbx_M); }; #endif if (f_callback_output != nullptr) f_callback_output(cloud_out); end_process(); return true; } void ground_filter::invalidate_view() { }
27.931034
123
0.545342
earthrover
c01cec416673f10556c7b7381aa5ae3b55b2fba8
501
cpp
C++
Game/src_lib/Entity/Attributes/TransformAttribute.cpp
andershub4/forestadventure
5efb3f831a94d7ed3e45cee4ef7cf6b32f3e4157
[ "MIT" ]
null
null
null
Game/src_lib/Entity/Attributes/TransformAttribute.cpp
andershub4/forestadventure
5efb3f831a94d7ed3e45cee4ef7cf6b32f3e4157
[ "MIT" ]
9
2021-01-06T19:24:40.000Z
2021-12-25T13:38:19.000Z
Game/src_lib/Entity/Attributes/TransformAttribute.cpp
andershub4/forestadventure
5efb3f831a94d7ed3e45cee4ef7cf6b32f3e4157
[ "MIT" ]
null
null
null
/* * Copyright (C) 2021 Anders Wennmo * This file is part of forestadventure which is released under MIT license. * See file LICENSE for full license details. */ #include "TransformAttribute.h" namespace FA { namespace Entity { TransformAttribute::TransformAttribute(EntityService *owner) : BasicAttribute(owner) {} void TransformAttribute::Move(const sf::Vector2f &offset) { position_ = {position_.x + offset.x, position_.y + offset.y}; } } // namespace Entity } // namespace FA
20.04
76
0.724551
andershub4
c01d9b17a85afe09f13c65ee60e59e9ed8b7ce22
4,097
cpp
C++
framework_c++/jugimap/jmScene.cpp
Jugilus/jugimapAPI
93fba7827b16169f858f7bd88c87236c5cf27183
[ "MIT" ]
8
2020-11-23T23:34:39.000Z
2022-02-23T12:14:02.000Z
framework_c++/jugimap/jmScene.cpp
Jugilus/jugimapAPI
93fba7827b16169f858f7bd88c87236c5cf27183
[ "MIT" ]
null
null
null
framework_c++/jugimap/jmScene.cpp
Jugilus/jugimapAPI
93fba7827b16169f858f7bd88c87236c5cf27183
[ "MIT" ]
3
2019-12-19T13:44:43.000Z
2020-05-15T01:02:10.000Z
#include <string> #include <sstream> #include "jmObjectFactory.h" #include "jmMapBinaryLoader.h" #include "jmSourceGraphics.h" #include "jmMap.h" #include "jmSprites.h" #include "jmFont.h" #include "jmInput.h" #include "jmCamera.h" #include "jmGuiCommon.h" #include "jmScene.h" namespace jugimap { Scene::Scene() { engineScene = objectFactory->NewEngineScene(this); } Scene::~Scene() { //delete engineScene; //for(Map* m : maps){ // delete m; //} //for(SourceGraphics* sg : sourceGraphics){ // delete sg; //} } void Scene::PreUpdate() { engineScene->PreUpdate(); //---- if(mouse.GetCursorSprite()){ mouse.GetCursorSprite()->SetPosition(Vec2f(mouse.GetX(), mouse.GetY())); } guiKeyboardAndJoystickInput.Update(); guiCursorDeviceInput._SetCursorScreenPosition(Vec2f(mouse.GetX(), mouse.GetY())); guiCursorDeviceInput._SetCursorPressed(mouse.IsButtonPressed(MouseButton::LEFT)); guiCursorDeviceInput._SetCursorDown(mouse.IsButtonDown(MouseButton::LEFT)); for(Map *m : maps){ if(m->IsVisible()==false) continue; Vec2f cursorInMapPosition = m->GetCamera()->MapPointFromScreenPoint(guiCursorDeviceInput.GetCursorScreenPosition()); //m->_SetCursorInMapPosition(cursorInMapPosition); guiCursorDeviceInput._SetCursorInMapPosition(cursorInMapPosition); //bool cursorInsideMapViewport = //if(m->GetName()=="commonWidgets"){ // DbgOutput("Cursor screen pos x:" + std::to_string(guiCursorDeviceInput.GetCursorScreenPosition().x) + " y:" + std::to_string(guiCursorDeviceInput.GetCursorScreenPosition().y) // + " map pos x:" + std::to_string(guiCursorDeviceInput.GetCursorInMapPosition().x) + " y:" + std::to_string(guiCursorDeviceInput.GetCursorInMapPosition().y)); //} m->UpdateWidgets(); } //---- time.UpdatePassedTimeMS(); } void Scene::PostUpdate() { for(Map *m : maps){ if(m->IsVisible()==false) continue; m->UpdateEngineObjects(); } engineScene->PostUpdate(); //---- for(Map *m : maps){ m->GetCamera()->ClearChangeFlags(); } mouse.ResetPerUpdateFlags(); keyboard.ResetPerUpdateFlags(); touch.ResetPerUpdateFlags(); for(Joystick &gc: joysticks) gc.ResetPerUpdateFlags(); GuiWidget::ResetInteractedPerUpdate(); } void Scene::Draw() { for(Map *m : maps){ if(m->IsVisible()==false) continue; m->DrawEngineObjects(); } } SourceGraphics* Scene::LoadAndAddSourceGraphics(const std::string &_filePath) { SourceGraphics* sg = new SourceGraphics(); if(JugiMapBinaryLoader::LoadSourceGraphics(_filePath, sg)){ sourceGraphics.push_back(sg); }else{ delete sg; sg = nullptr; settings.SetErrorMessage(JugiMapBinaryLoader::error); if(settings.GetErrorMessage()==""){ settings.SetErrorMessage("Error loading map: " + _filePath); } } return sg; } Map* Scene::LoadAndAddMap(const std::string &_filePath, SourceGraphics* _sourceGraphics, MapType _mapType, int _mapZOrder) { if(_mapZOrder==-1){ _mapZOrder = settings.GetMapZOrderStart() + maps.size() * settings.GetMapZOrderStep(); } Map *map = objectFactory->NewMap(_mapZOrder); if(JugiMapBinaryLoader::LoadMap(_filePath, map, _sourceGraphics)){ maps.push_back(map); map->InitEngineObjects(_mapType); }else{ delete map; map = nullptr; settings.SetErrorMessage(JugiMapBinaryLoader::error); if(settings.GetErrorMessage()==""){ settings.SetErrorMessage("Error loading map: " + _filePath); } } return map; } Map* Scene::AddMap(const std::string &_name, MapType _mapType, int _mapZOrder) { if(_mapZOrder==-1){ _mapZOrder = settings.GetMapZOrderStart() + maps.size() * settings.GetMapZOrderStep(); } Map *map = objectFactory->NewMap(_mapZOrder); maps.push_back(map); map->InitEngineObjects(_mapType); return map; } }
21.792553
188
0.650476
Jugilus
c01eeb26c0e828198c25ca1fe36e5819bfb8604f
754
cpp
C++
CodeChef/ZCO16001.cpp
wardoHans/Competitive
796549816b42637f286903e88264a71b74b3846d
[ "WTFPL" ]
null
null
null
CodeChef/ZCO16001.cpp
wardoHans/Competitive
796549816b42637f286903e88264a71b74b3846d
[ "WTFPL" ]
null
null
null
CodeChef/ZCO16001.cpp
wardoHans/Competitive
796549816b42637f286903e88264a71b74b3846d
[ "WTFPL" ]
null
null
null
/* NAME: HANS BALA ROLL: 11679 SCHOOL: LA MARTINIERE FOR BOYS, KOLKATA */ #include <bits/stdc++.h> #define rf freopen("inp.in", "r", stdin) typedef long long int ll; using namespace std; vector<ll> v[2]; int main(){ rf; ios_base::sync_with_stdio(false); cin.tie(NULL); ll i, j, temp, n, k; cin >> n >> k; for(i=0; i<2; ++i){ for(j=0; j<n; ++j){ cin >> temp; v[i].push_back(temp); } } sort(v[0].begin(), v[0].end()); sort(v[1].begin(), v[1].end()); ll result = v[0].back() + v[1].back(); for(i=1; i<=k; ++i){ result = min(result, max(v[0][n-1], v[1][n-1]) + max(v[0][i-1], v[1][n-i-1])); result = min(result, max(v[0][n-1], v[1][n-1]) + max(v[0][n-i-1], v[1][i-1])); } cout << result << endl; }
22.848485
81
0.519894
wardoHans
c02399eb5ad970d262e595b6b8088a0f5f8da4ed
1,290
cpp
C++
data/dailyCodingProblem780.cpp
vidit1999/daily_coding_problem
b90319cb4ddce11149f54010ba36c4bd6fa0a787
[ "MIT" ]
2
2020-09-04T20:56:23.000Z
2021-06-11T07:42:26.000Z
data/dailyCodingProblem780.cpp
vidit1999/daily_coding_problem
b90319cb4ddce11149f54010ba36c4bd6fa0a787
[ "MIT" ]
null
null
null
data/dailyCodingProblem780.cpp
vidit1999/daily_coding_problem
b90319cb4ddce11149f54010ba36c4bd6fa0a787
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; /* We're given a hashmap associating each courseId key with a list of courseIds values, which represents that the prerequisites of courseId are courseIds. Return a sorted ordering of courses such that we can finish all courses. Return null if there is no such ordering. For example, given {'CSC300': ['CSC100', 'CSC200'], 'CSC200': ['CSC100'], 'CSC100': []}, should return ['CSC100', 'CSC200', 'CSCS300']. */ void topologicalSort( string s, unordered_map<string, vector<string>>& graph, unordered_set<string>& visited, vector<string>& v ){ visited.insert(s); for(string nei : graph[s]){ if(visited.find(nei) == visited.end()){ topologicalSort(nei, graph, visited, v); } } v.push_back(s); } vector<string> courseOrdering(unordered_map<string, vector<string>>& graph){ unordered_set<string> visited; vector<string> v; for(auto course : graph){ if(visited.find(course.first) == visited.end()){ topologicalSort(course.first, graph, visited, v); } } return v; } // main function int main(){ unordered_map<string, vector<string>> graph = { {"CSC300", {"CSC100", "CSC200"}}, {"CSC200", {"CSC100"}}, {"CSC100", {}} }; for(string courseId : courseOrdering(graph)){ cout << courseId << "\n"; } return 0; }
22.631579
76
0.682171
vidit1999
c02747c788e6c23f35556c35c0a512383ff45c96
298,767
cc
C++
libs/tensorflow/include/tensorflow/core/protobuf/master.pb.cc
federicohyo/ofxTensorFlow
517d38e67bf12b5439468d5320c998f0714caaac
[ "Apache-2.0" ]
1
2019-05-19T06:25:26.000Z
2019-05-19T06:25:26.000Z
libs/tensorflow/include/tensorflow/core/protobuf/master.pb.cc
federicohyo/ofxTensorFlow
517d38e67bf12b5439468d5320c998f0714caaac
[ "Apache-2.0" ]
null
null
null
libs/tensorflow/include/tensorflow/core/protobuf/master.pb.cc
federicohyo/ofxTensorFlow
517d38e67bf12b5439468d5320c998f0714caaac
[ "Apache-2.0" ]
null
null
null
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: tensorflow/core/protobuf/master.proto #include "tensorflow/core/protobuf/master.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> // This is a temporary google only hack #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) namespace protobuf_tensorflow_2fcore_2fframework_2fdevice_5fattributes_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fframework_2fdevice_5fattributes_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DeviceAttributes; } // namespace protobuf_tensorflow_2fcore_2fframework_2fdevice_5fattributes_2eproto namespace protobuf_tensorflow_2fcore_2fframework_2fgraph_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fframework_2fgraph_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_GraphDef; } // namespace protobuf_tensorflow_2fcore_2fframework_2fgraph_2eproto namespace protobuf_tensorflow_2fcore_2fframework_2ftensor_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fframework_2ftensor_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_TensorProto; } // namespace protobuf_tensorflow_2fcore_2fframework_2ftensor_2eproto namespace protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_RunOptions; extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_RunMetadata; extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_CallableOptions; extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto ::google::protobuf::internal::SCCInfo<7> scc_info_ConfigProto; } // namespace protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto namespace protobuf_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_NamedTensorProto; } // namespace protobuf_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto namespace tensorflow { class CreateSessionRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CreateSessionRequest> _instance; } _CreateSessionRequest_default_instance_; class CreateSessionResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CreateSessionResponse> _instance; } _CreateSessionResponse_default_instance_; class ExtendSessionRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ExtendSessionRequest> _instance; } _ExtendSessionRequest_default_instance_; class ExtendSessionResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ExtendSessionResponse> _instance; } _ExtendSessionResponse_default_instance_; class RunStepRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<RunStepRequest> _instance; } _RunStepRequest_default_instance_; class RunStepResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<RunStepResponse> _instance; } _RunStepResponse_default_instance_; class PartialRunSetupRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<PartialRunSetupRequest> _instance; } _PartialRunSetupRequest_default_instance_; class PartialRunSetupResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<PartialRunSetupResponse> _instance; } _PartialRunSetupResponse_default_instance_; class CloseSessionRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CloseSessionRequest> _instance; } _CloseSessionRequest_default_instance_; class CloseSessionResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CloseSessionResponse> _instance; } _CloseSessionResponse_default_instance_; class ResetRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ResetRequest> _instance; } _ResetRequest_default_instance_; class ResetResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ResetResponse> _instance; } _ResetResponse_default_instance_; class ListDevicesRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListDevicesRequest> _instance; } _ListDevicesRequest_default_instance_; class ListDevicesResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListDevicesResponse> _instance; } _ListDevicesResponse_default_instance_; class MakeCallableRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<MakeCallableRequest> _instance; } _MakeCallableRequest_default_instance_; class MakeCallableResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<MakeCallableResponse> _instance; } _MakeCallableResponse_default_instance_; class RunCallableRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<RunCallableRequest> _instance; } _RunCallableRequest_default_instance_; class RunCallableResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<RunCallableResponse> _instance; } _RunCallableResponse_default_instance_; class ReleaseCallableRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ReleaseCallableRequest> _instance; } _ReleaseCallableRequest_default_instance_; class ReleaseCallableResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ReleaseCallableResponse> _instance; } _ReleaseCallableResponse_default_instance_; } // namespace tensorflow namespace protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto { static void InitDefaultsCreateSessionRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_CreateSessionRequest_default_instance_; new (ptr) ::tensorflow::CreateSessionRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::CreateSessionRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<2> scc_info_CreateSessionRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsCreateSessionRequest}, { &protobuf_tensorflow_2fcore_2fframework_2fgraph_2eproto::scc_info_GraphDef.base, &protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto::scc_info_ConfigProto.base,}}; static void InitDefaultsCreateSessionResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_CreateSessionResponse_default_instance_; new (ptr) ::tensorflow::CreateSessionResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::CreateSessionResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_CreateSessionResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCreateSessionResponse}, {}}; static void InitDefaultsExtendSessionRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ExtendSessionRequest_default_instance_; new (ptr) ::tensorflow::ExtendSessionRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ExtendSessionRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_ExtendSessionRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsExtendSessionRequest}, { &protobuf_tensorflow_2fcore_2fframework_2fgraph_2eproto::scc_info_GraphDef.base,}}; static void InitDefaultsExtendSessionResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ExtendSessionResponse_default_instance_; new (ptr) ::tensorflow::ExtendSessionResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ExtendSessionResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ExtendSessionResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsExtendSessionResponse}, {}}; static void InitDefaultsRunStepRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_RunStepRequest_default_instance_; new (ptr) ::tensorflow::RunStepRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::RunStepRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<2> scc_info_RunStepRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsRunStepRequest}, { &protobuf_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto::scc_info_NamedTensorProto.base, &protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto::scc_info_RunOptions.base,}}; static void InitDefaultsRunStepResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_RunStepResponse_default_instance_; new (ptr) ::tensorflow::RunStepResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::RunStepResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<2> scc_info_RunStepResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsRunStepResponse}, { &protobuf_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto::scc_info_NamedTensorProto.base, &protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto::scc_info_RunMetadata.base,}}; static void InitDefaultsPartialRunSetupRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_PartialRunSetupRequest_default_instance_; new (ptr) ::tensorflow::PartialRunSetupRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::PartialRunSetupRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_PartialRunSetupRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPartialRunSetupRequest}, {}}; static void InitDefaultsPartialRunSetupResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_PartialRunSetupResponse_default_instance_; new (ptr) ::tensorflow::PartialRunSetupResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::PartialRunSetupResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_PartialRunSetupResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPartialRunSetupResponse}, {}}; static void InitDefaultsCloseSessionRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_CloseSessionRequest_default_instance_; new (ptr) ::tensorflow::CloseSessionRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::CloseSessionRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_CloseSessionRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCloseSessionRequest}, {}}; static void InitDefaultsCloseSessionResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_CloseSessionResponse_default_instance_; new (ptr) ::tensorflow::CloseSessionResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::CloseSessionResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_CloseSessionResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCloseSessionResponse}, {}}; static void InitDefaultsResetRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ResetRequest_default_instance_; new (ptr) ::tensorflow::ResetRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ResetRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ResetRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsResetRequest}, {}}; static void InitDefaultsResetResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ResetResponse_default_instance_; new (ptr) ::tensorflow::ResetResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ResetResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ResetResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsResetResponse}, {}}; static void InitDefaultsListDevicesRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ListDevicesRequest_default_instance_; new (ptr) ::tensorflow::ListDevicesRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ListDevicesRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ListDevicesRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListDevicesRequest}, {}}; static void InitDefaultsListDevicesResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ListDevicesResponse_default_instance_; new (ptr) ::tensorflow::ListDevicesResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ListDevicesResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_ListDevicesResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListDevicesResponse}, { &protobuf_tensorflow_2fcore_2fframework_2fdevice_5fattributes_2eproto::scc_info_DeviceAttributes.base,}}; static void InitDefaultsMakeCallableRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_MakeCallableRequest_default_instance_; new (ptr) ::tensorflow::MakeCallableRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::MakeCallableRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_MakeCallableRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMakeCallableRequest}, { &protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto::scc_info_CallableOptions.base,}}; static void InitDefaultsMakeCallableResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_MakeCallableResponse_default_instance_; new (ptr) ::tensorflow::MakeCallableResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::MakeCallableResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_MakeCallableResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMakeCallableResponse}, {}}; static void InitDefaultsRunCallableRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_RunCallableRequest_default_instance_; new (ptr) ::tensorflow::RunCallableRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::RunCallableRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_RunCallableRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRunCallableRequest}, { &protobuf_tensorflow_2fcore_2fframework_2ftensor_2eproto::scc_info_TensorProto.base,}}; static void InitDefaultsRunCallableResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_RunCallableResponse_default_instance_; new (ptr) ::tensorflow::RunCallableResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::RunCallableResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<2> scc_info_RunCallableResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsRunCallableResponse}, { &protobuf_tensorflow_2fcore_2fframework_2ftensor_2eproto::scc_info_TensorProto.base, &protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto::scc_info_RunMetadata.base,}}; static void InitDefaultsReleaseCallableRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ReleaseCallableRequest_default_instance_; new (ptr) ::tensorflow::ReleaseCallableRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ReleaseCallableRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ReleaseCallableRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsReleaseCallableRequest}, {}}; static void InitDefaultsReleaseCallableResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::tensorflow::_ReleaseCallableResponse_default_instance_; new (ptr) ::tensorflow::ReleaseCallableResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::tensorflow::ReleaseCallableResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ReleaseCallableResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsReleaseCallableResponse}, {}}; void InitDefaults() { ::google::protobuf::internal::InitSCC(&scc_info_CreateSessionRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_CreateSessionResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_ExtendSessionRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ExtendSessionResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_RunStepRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_RunStepResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_PartialRunSetupRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_PartialRunSetupResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_CloseSessionRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_CloseSessionResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_ResetRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ResetResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_ListDevicesRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ListDevicesResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_MakeCallableRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_MakeCallableResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_RunCallableRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_RunCallableResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_ReleaseCallableRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ReleaseCallableResponse.base); } ::google::protobuf::Metadata file_level_metadata[20]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CreateSessionRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CreateSessionRequest, graph_def_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CreateSessionRequest, config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CreateSessionRequest, target_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CreateSessionResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CreateSessionResponse, session_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CreateSessionResponse, graph_version_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ExtendSessionRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ExtendSessionRequest, session_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ExtendSessionRequest, graph_def_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ExtendSessionRequest, current_graph_version_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ExtendSessionResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ExtendSessionResponse, new_graph_version_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, session_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, feed_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, fetch_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, target_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, options_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, partial_run_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepRequest, store_errors_in_response_body_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepResponse, tensor_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepResponse, metadata_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepResponse, status_code_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunStepResponse, status_error_message_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::PartialRunSetupRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::PartialRunSetupRequest, session_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::PartialRunSetupRequest, feed_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::PartialRunSetupRequest, fetch_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::PartialRunSetupRequest, target_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::PartialRunSetupResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::PartialRunSetupResponse, partial_run_handle_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CloseSessionRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CloseSessionRequest, session_handle_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::CloseSessionResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ResetRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ResetRequest, container_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ResetRequest, device_filters_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ResetResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ListDevicesRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ListDevicesRequest, session_handle_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ListDevicesResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ListDevicesResponse, local_device_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ListDevicesResponse, remote_device_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::MakeCallableRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::MakeCallableRequest, session_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::MakeCallableRequest, options_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::MakeCallableResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::MakeCallableResponse, handle_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunCallableRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunCallableRequest, session_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunCallableRequest, handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunCallableRequest, feed_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunCallableResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunCallableResponse, fetch_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::RunCallableResponse, metadata_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ReleaseCallableRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ReleaseCallableRequest, session_handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ReleaseCallableRequest, handle_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::ReleaseCallableResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::tensorflow::CreateSessionRequest)}, { 8, -1, sizeof(::tensorflow::CreateSessionResponse)}, { 15, -1, sizeof(::tensorflow::ExtendSessionRequest)}, { 23, -1, sizeof(::tensorflow::ExtendSessionResponse)}, { 29, -1, sizeof(::tensorflow::RunStepRequest)}, { 41, -1, sizeof(::tensorflow::RunStepResponse)}, { 50, -1, sizeof(::tensorflow::PartialRunSetupRequest)}, { 59, -1, sizeof(::tensorflow::PartialRunSetupResponse)}, { 65, -1, sizeof(::tensorflow::CloseSessionRequest)}, { 71, -1, sizeof(::tensorflow::CloseSessionResponse)}, { 76, -1, sizeof(::tensorflow::ResetRequest)}, { 83, -1, sizeof(::tensorflow::ResetResponse)}, { 88, -1, sizeof(::tensorflow::ListDevicesRequest)}, { 94, -1, sizeof(::tensorflow::ListDevicesResponse)}, { 101, -1, sizeof(::tensorflow::MakeCallableRequest)}, { 108, -1, sizeof(::tensorflow::MakeCallableResponse)}, { 114, -1, sizeof(::tensorflow::RunCallableRequest)}, { 122, -1, sizeof(::tensorflow::RunCallableResponse)}, { 129, -1, sizeof(::tensorflow::ReleaseCallableRequest)}, { 136, -1, sizeof(::tensorflow::ReleaseCallableResponse)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_CreateSessionRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_CreateSessionResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ExtendSessionRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ExtendSessionResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_RunStepRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_RunStepResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_PartialRunSetupRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_PartialRunSetupResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_CloseSessionRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_CloseSessionResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ResetRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ResetResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ListDevicesRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ListDevicesResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_MakeCallableRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_MakeCallableResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_RunCallableRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_RunCallableResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ReleaseCallableRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_ReleaseCallableResponse_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "tensorflow/core/protobuf/master.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, NULL, NULL); } void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 20); } void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n%tensorflow/core/protobuf/master.proto\022" "\ntensorflow\0321tensorflow/core/framework/d" "evice_attributes.proto\032%tensorflow/core/" "framework/graph.proto\032&tensorflow/core/f" "ramework/tensor.proto\032*tensorflow/core/l" "ib/core/error_codes.proto\032%tensorflow/co" "re/protobuf/config.proto\032+tensorflow/cor" "e/protobuf/named_tensor.proto\"x\n\024CreateS" "essionRequest\022\'\n\tgraph_def\030\001 \001(\0132\024.tenso" "rflow.GraphDef\022\'\n\006config\030\002 \001(\0132\027.tensorf" "low.ConfigProto\022\016\n\006target\030\003 \001(\t\"F\n\025Creat" "eSessionResponse\022\026\n\016session_handle\030\001 \001(\t" "\022\025\n\rgraph_version\030\002 \001(\003\"v\n\024ExtendSession" "Request\022\026\n\016session_handle\030\001 \001(\t\022\'\n\tgraph" "_def\030\002 \001(\0132\024.tensorflow.GraphDef\022\035\n\025curr" "ent_graph_version\030\003 \001(\003\"2\n\025ExtendSession" "Response\022\031\n\021new_graph_version\030\004 \001(\003\"\337\001\n\016" "RunStepRequest\022\026\n\016session_handle\030\001 \001(\t\022*" "\n\004feed\030\002 \003(\0132\034.tensorflow.NamedTensorPro" "to\022\r\n\005fetch\030\003 \003(\t\022\016\n\006target\030\004 \003(\t\022\'\n\007opt" "ions\030\005 \001(\0132\026.tensorflow.RunOptions\022\032\n\022pa" "rtial_run_handle\030\006 \001(\t\022%\n\035store_errors_i" "n_response_body\030\007 \001(\010\"\265\001\n\017RunStepRespons" "e\022,\n\006tensor\030\001 \003(\0132\034.tensorflow.NamedTens" "orProto\022)\n\010metadata\030\002 \001(\0132\027.tensorflow.R" "unMetadata\022+\n\013status_code\030\003 \001(\0162\026.tensor" "flow.error.Code\022\034\n\024status_error_message\030" "\004 \001(\t\"]\n\026PartialRunSetupRequest\022\026\n\016sessi" "on_handle\030\001 \001(\t\022\014\n\004feed\030\002 \003(\t\022\r\n\005fetch\030\003" " \003(\t\022\016\n\006target\030\004 \003(\t\"5\n\027PartialRunSetupR" "esponse\022\032\n\022partial_run_handle\030\001 \001(\t\"-\n\023C" "loseSessionRequest\022\026\n\016session_handle\030\001 \001" "(\t\"\026\n\024CloseSessionResponse\"9\n\014ResetReque" "st\022\021\n\tcontainer\030\001 \003(\t\022\026\n\016device_filters\030" "\002 \003(\t\"\017\n\rResetResponse\",\n\022ListDevicesReq" "uest\022\026\n\016session_handle\030\001 \001(\t\"~\n\023ListDevi" "cesResponse\0222\n\014local_device\030\001 \003(\0132\034.tens" "orflow.DeviceAttributes\0223\n\rremote_device" "\030\002 \003(\0132\034.tensorflow.DeviceAttributes\"[\n\023" "MakeCallableRequest\022\026\n\016session_handle\030\001 " "\001(\t\022,\n\007options\030\002 \001(\0132\033.tensorflow.Callab" "leOptions\"&\n\024MakeCallableResponse\022\016\n\006han" "dle\030\001 \001(\003\"c\n\022RunCallableRequest\022\026\n\016sessi" "on_handle\030\001 \001(\t\022\016\n\006handle\030\002 \001(\003\022%\n\004feed\030" "\003 \003(\0132\027.tensorflow.TensorProto\"h\n\023RunCal" "lableResponse\022&\n\005fetch\030\001 \003(\0132\027.tensorflo" "w.TensorProto\022)\n\010metadata\030\002 \001(\0132\027.tensor" "flow.RunMetadata\"@\n\026ReleaseCallableReque" "st\022\026\n\016session_handle\030\001 \001(\t\022\016\n\006handle\030\002 \001" "(\003\"\031\n\027ReleaseCallableResponseBy\n\032org.ten" "sorflow.distruntimeB\030DistributedRuntimeP" "rotosP\001Z<github.com/tensorflow/tensorflo" "w/tensorflow/go/core/protobuf\370\001\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( descriptor, 2120); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "tensorflow/core/protobuf/master.proto", &protobuf_RegisterTypes); ::protobuf_tensorflow_2fcore_2fframework_2fdevice_5fattributes_2eproto::AddDescriptors(); ::protobuf_tensorflow_2fcore_2fframework_2fgraph_2eproto::AddDescriptors(); ::protobuf_tensorflow_2fcore_2fframework_2ftensor_2eproto::AddDescriptors(); ::protobuf_tensorflow_2fcore_2flib_2fcore_2ferror_5fcodes_2eproto::AddDescriptors(); ::protobuf_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto::AddDescriptors(); ::protobuf_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto::AddDescriptors(); } void AddDescriptors() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); } // Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); } } static_descriptor_initializer; } // namespace protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto namespace tensorflow { // =================================================================== void CreateSessionRequest::InitAsDefaultInstance() { ::tensorflow::_CreateSessionRequest_default_instance_._instance.get_mutable()->graph_def_ = const_cast< ::tensorflow::GraphDef*>( ::tensorflow::GraphDef::internal_default_instance()); ::tensorflow::_CreateSessionRequest_default_instance_._instance.get_mutable()->config_ = const_cast< ::tensorflow::ConfigProto*>( ::tensorflow::ConfigProto::internal_default_instance()); } void CreateSessionRequest::unsafe_arena_set_allocated_graph_def( ::tensorflow::GraphDef* graph_def) { if (GetArenaNoVirtual() == NULL) { delete graph_def_; } graph_def_ = graph_def; if (graph_def) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CreateSessionRequest.graph_def) } void CreateSessionRequest::clear_graph_def() { if (GetArenaNoVirtual() == NULL && graph_def_ != NULL) { delete graph_def_; } graph_def_ = NULL; } void CreateSessionRequest::unsafe_arena_set_allocated_config( ::tensorflow::ConfigProto* config) { if (GetArenaNoVirtual() == NULL) { delete config_; } config_ = config; if (config) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CreateSessionRequest.config) } void CreateSessionRequest::clear_config() { if (GetArenaNoVirtual() == NULL && config_ != NULL) { delete config_; } config_ = NULL; } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CreateSessionRequest::kGraphDefFieldNumber; const int CreateSessionRequest::kConfigFieldNumber; const int CreateSessionRequest::kTargetFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CreateSessionRequest::CreateSessionRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CreateSessionRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.CreateSessionRequest) } CreateSessionRequest::CreateSessionRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CreateSessionRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.CreateSessionRequest) } CreateSessionRequest::CreateSessionRequest(const CreateSessionRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); target_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.target().size() > 0) { target_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.target(), GetArenaNoVirtual()); } if (from.has_graph_def()) { graph_def_ = new ::tensorflow::GraphDef(*from.graph_def_); } else { graph_def_ = NULL; } if (from.has_config()) { config_ = new ::tensorflow::ConfigProto(*from.config_); } else { config_ = NULL; } // @@protoc_insertion_point(copy_constructor:tensorflow.CreateSessionRequest) } void CreateSessionRequest::SharedCtor() { target_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&graph_def_, 0, static_cast<size_t>( reinterpret_cast<char*>(&config_) - reinterpret_cast<char*>(&graph_def_)) + sizeof(config_)); } CreateSessionRequest::~CreateSessionRequest() { // @@protoc_insertion_point(destructor:tensorflow.CreateSessionRequest) SharedDtor(); } void CreateSessionRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); target_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete graph_def_; if (this != internal_default_instance()) delete config_; } void CreateSessionRequest::ArenaDtor(void* object) { CreateSessionRequest* _this = reinterpret_cast< CreateSessionRequest* >(object); (void)_this; } void CreateSessionRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void CreateSessionRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CreateSessionRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CreateSessionRequest& CreateSessionRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CreateSessionRequest.base); return *internal_default_instance(); } void CreateSessionRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.CreateSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; target_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); if (GetArenaNoVirtual() == NULL && graph_def_ != NULL) { delete graph_def_; } graph_def_ = NULL; if (GetArenaNoVirtual() == NULL && config_ != NULL) { delete config_; } config_ = NULL; _internal_metadata_.Clear(); } bool CreateSessionRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.CreateSessionRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .tensorflow.GraphDef graph_def = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_graph_def())); } else { goto handle_unusual; } break; } // .tensorflow.ConfigProto config = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_config())); } else { goto handle_unusual; } break; } // string target = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_target())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target().data(), static_cast<int>(this->target().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.CreateSessionRequest.target")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.CreateSessionRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.CreateSessionRequest) return false; #undef DO_ } void CreateSessionRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.CreateSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .tensorflow.GraphDef graph_def = 1; if (this->has_graph_def()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->_internal_graph_def(), output); } // .tensorflow.ConfigProto config = 2; if (this->has_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_config(), output); } // string target = 3; if (this->target().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target().data(), static_cast<int>(this->target().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.CreateSessionRequest.target"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->target(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.CreateSessionRequest) } ::google::protobuf::uint8* CreateSessionRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CreateSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .tensorflow.GraphDef graph_def = 1; if (this->has_graph_def()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->_internal_graph_def(), deterministic, target); } // .tensorflow.ConfigProto config = 2; if (this->has_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_config(), deterministic, target); } // string target = 3; if (this->target().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target().data(), static_cast<int>(this->target().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.CreateSessionRequest.target"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->target(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CreateSessionRequest) return target; } size_t CreateSessionRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.CreateSessionRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string target = 3; if (this->target().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->target()); } // .tensorflow.GraphDef graph_def = 1; if (this->has_graph_def()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *graph_def_); } // .tensorflow.ConfigProto config = 2; if (this->has_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *config_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CreateSessionRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CreateSessionRequest) GOOGLE_DCHECK_NE(&from, this); const CreateSessionRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const CreateSessionRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CreateSessionRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CreateSessionRequest) MergeFrom(*source); } } void CreateSessionRequest::MergeFrom(const CreateSessionRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CreateSessionRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.target().size() > 0) { set_target(from.target()); } if (from.has_graph_def()) { mutable_graph_def()->::tensorflow::GraphDef::MergeFrom(from.graph_def()); } if (from.has_config()) { mutable_config()->::tensorflow::ConfigProto::MergeFrom(from.config()); } } void CreateSessionRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CreateSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CreateSessionRequest::CopyFrom(const CreateSessionRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CreateSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool CreateSessionRequest::IsInitialized() const { return true; } void CreateSessionRequest::Swap(CreateSessionRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { CreateSessionRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void CreateSessionRequest::UnsafeArenaSwap(CreateSessionRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void CreateSessionRequest::InternalSwap(CreateSessionRequest* other) { using std::swap; target_.Swap(&other->target_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(graph_def_, other->graph_def_); swap(config_, other->config_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CreateSessionRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CreateSessionResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CreateSessionResponse::kSessionHandleFieldNumber; const int CreateSessionResponse::kGraphVersionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CreateSessionResponse::CreateSessionResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CreateSessionResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.CreateSessionResponse) } CreateSessionResponse::CreateSessionResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CreateSessionResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.CreateSessionResponse) } CreateSessionResponse::CreateSessionResponse(const CreateSessionResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } graph_version_ = from.graph_version_; // @@protoc_insertion_point(copy_constructor:tensorflow.CreateSessionResponse) } void CreateSessionResponse::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); graph_version_ = GOOGLE_LONGLONG(0); } CreateSessionResponse::~CreateSessionResponse() { // @@protoc_insertion_point(destructor:tensorflow.CreateSessionResponse) SharedDtor(); } void CreateSessionResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void CreateSessionResponse::ArenaDtor(void* object) { CreateSessionResponse* _this = reinterpret_cast< CreateSessionResponse* >(object); (void)_this; } void CreateSessionResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void CreateSessionResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CreateSessionResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CreateSessionResponse& CreateSessionResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CreateSessionResponse.base); return *internal_default_instance(); } void CreateSessionResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.CreateSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); graph_version_ = GOOGLE_LONGLONG(0); _internal_metadata_.Clear(); } bool CreateSessionResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.CreateSessionResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.CreateSessionResponse.session_handle")); } else { goto handle_unusual; } break; } // int64 graph_version = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &graph_version_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.CreateSessionResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.CreateSessionResponse) return false; #undef DO_ } void CreateSessionResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.CreateSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.CreateSessionResponse.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } // int64 graph_version = 2; if (this->graph_version() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->graph_version(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.CreateSessionResponse) } ::google::protobuf::uint8* CreateSessionResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CreateSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.CreateSessionResponse.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } // int64 graph_version = 2; if (this->graph_version() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->graph_version(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CreateSessionResponse) return target; } size_t CreateSessionResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.CreateSessionResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } // int64 graph_version = 2; if (this->graph_version() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->graph_version()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CreateSessionResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CreateSessionResponse) GOOGLE_DCHECK_NE(&from, this); const CreateSessionResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const CreateSessionResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CreateSessionResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CreateSessionResponse) MergeFrom(*source); } } void CreateSessionResponse::MergeFrom(const CreateSessionResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CreateSessionResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } if (from.graph_version() != 0) { set_graph_version(from.graph_version()); } } void CreateSessionResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CreateSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } void CreateSessionResponse::CopyFrom(const CreateSessionResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CreateSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool CreateSessionResponse::IsInitialized() const { return true; } void CreateSessionResponse::Swap(CreateSessionResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { CreateSessionResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void CreateSessionResponse::UnsafeArenaSwap(CreateSessionResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void CreateSessionResponse::InternalSwap(CreateSessionResponse* other) { using std::swap; session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(graph_version_, other->graph_version_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CreateSessionResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ExtendSessionRequest::InitAsDefaultInstance() { ::tensorflow::_ExtendSessionRequest_default_instance_._instance.get_mutable()->graph_def_ = const_cast< ::tensorflow::GraphDef*>( ::tensorflow::GraphDef::internal_default_instance()); } void ExtendSessionRequest::unsafe_arena_set_allocated_graph_def( ::tensorflow::GraphDef* graph_def) { if (GetArenaNoVirtual() == NULL) { delete graph_def_; } graph_def_ = graph_def; if (graph_def) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ExtendSessionRequest.graph_def) } void ExtendSessionRequest::clear_graph_def() { if (GetArenaNoVirtual() == NULL && graph_def_ != NULL) { delete graph_def_; } graph_def_ = NULL; } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ExtendSessionRequest::kSessionHandleFieldNumber; const int ExtendSessionRequest::kGraphDefFieldNumber; const int ExtendSessionRequest::kCurrentGraphVersionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ExtendSessionRequest::ExtendSessionRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ExtendSessionRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ExtendSessionRequest) } ExtendSessionRequest::ExtendSessionRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ExtendSessionRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ExtendSessionRequest) } ExtendSessionRequest::ExtendSessionRequest(const ExtendSessionRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } if (from.has_graph_def()) { graph_def_ = new ::tensorflow::GraphDef(*from.graph_def_); } else { graph_def_ = NULL; } current_graph_version_ = from.current_graph_version_; // @@protoc_insertion_point(copy_constructor:tensorflow.ExtendSessionRequest) } void ExtendSessionRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&graph_def_, 0, static_cast<size_t>( reinterpret_cast<char*>(&current_graph_version_) - reinterpret_cast<char*>(&graph_def_)) + sizeof(current_graph_version_)); } ExtendSessionRequest::~ExtendSessionRequest() { // @@protoc_insertion_point(destructor:tensorflow.ExtendSessionRequest) SharedDtor(); } void ExtendSessionRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete graph_def_; } void ExtendSessionRequest::ArenaDtor(void* object) { ExtendSessionRequest* _this = reinterpret_cast< ExtendSessionRequest* >(object); (void)_this; } void ExtendSessionRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ExtendSessionRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ExtendSessionRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ExtendSessionRequest& ExtendSessionRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ExtendSessionRequest.base); return *internal_default_instance(); } void ExtendSessionRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ExtendSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); if (GetArenaNoVirtual() == NULL && graph_def_ != NULL) { delete graph_def_; } graph_def_ = NULL; current_graph_version_ = GOOGLE_LONGLONG(0); _internal_metadata_.Clear(); } bool ExtendSessionRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ExtendSessionRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.ExtendSessionRequest.session_handle")); } else { goto handle_unusual; } break; } // .tensorflow.GraphDef graph_def = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_graph_def())); } else { goto handle_unusual; } break; } // int64 current_graph_version = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &current_graph_version_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.ExtendSessionRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ExtendSessionRequest) return false; #undef DO_ } void ExtendSessionRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ExtendSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ExtendSessionRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } // .tensorflow.GraphDef graph_def = 2; if (this->has_graph_def()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_graph_def(), output); } // int64 current_graph_version = 3; if (this->current_graph_version() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->current_graph_version(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ExtendSessionRequest) } ::google::protobuf::uint8* ExtendSessionRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ExtendSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ExtendSessionRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } // .tensorflow.GraphDef graph_def = 2; if (this->has_graph_def()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_graph_def(), deterministic, target); } // int64 current_graph_version = 3; if (this->current_graph_version() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->current_graph_version(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ExtendSessionRequest) return target; } size_t ExtendSessionRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ExtendSessionRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } // .tensorflow.GraphDef graph_def = 2; if (this->has_graph_def()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *graph_def_); } // int64 current_graph_version = 3; if (this->current_graph_version() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->current_graph_version()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ExtendSessionRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ExtendSessionRequest) GOOGLE_DCHECK_NE(&from, this); const ExtendSessionRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const ExtendSessionRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ExtendSessionRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ExtendSessionRequest) MergeFrom(*source); } } void ExtendSessionRequest::MergeFrom(const ExtendSessionRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ExtendSessionRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } if (from.has_graph_def()) { mutable_graph_def()->::tensorflow::GraphDef::MergeFrom(from.graph_def()); } if (from.current_graph_version() != 0) { set_current_graph_version(from.current_graph_version()); } } void ExtendSessionRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ExtendSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ExtendSessionRequest::CopyFrom(const ExtendSessionRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ExtendSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool ExtendSessionRequest::IsInitialized() const { return true; } void ExtendSessionRequest::Swap(ExtendSessionRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ExtendSessionRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ExtendSessionRequest::UnsafeArenaSwap(ExtendSessionRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ExtendSessionRequest::InternalSwap(ExtendSessionRequest* other) { using std::swap; session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(graph_def_, other->graph_def_); swap(current_graph_version_, other->current_graph_version_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ExtendSessionRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ExtendSessionResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ExtendSessionResponse::kNewGraphVersionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ExtendSessionResponse::ExtendSessionResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ExtendSessionResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ExtendSessionResponse) } ExtendSessionResponse::ExtendSessionResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ExtendSessionResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ExtendSessionResponse) } ExtendSessionResponse::ExtendSessionResponse(const ExtendSessionResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); new_graph_version_ = from.new_graph_version_; // @@protoc_insertion_point(copy_constructor:tensorflow.ExtendSessionResponse) } void ExtendSessionResponse::SharedCtor() { new_graph_version_ = GOOGLE_LONGLONG(0); } ExtendSessionResponse::~ExtendSessionResponse() { // @@protoc_insertion_point(destructor:tensorflow.ExtendSessionResponse) SharedDtor(); } void ExtendSessionResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void ExtendSessionResponse::ArenaDtor(void* object) { ExtendSessionResponse* _this = reinterpret_cast< ExtendSessionResponse* >(object); (void)_this; } void ExtendSessionResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ExtendSessionResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ExtendSessionResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ExtendSessionResponse& ExtendSessionResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ExtendSessionResponse.base); return *internal_default_instance(); } void ExtendSessionResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ExtendSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; new_graph_version_ = GOOGLE_LONGLONG(0); _internal_metadata_.Clear(); } bool ExtendSessionResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ExtendSessionResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int64 new_graph_version = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &new_graph_version_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.ExtendSessionResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ExtendSessionResponse) return false; #undef DO_ } void ExtendSessionResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ExtendSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 new_graph_version = 4; if (this->new_graph_version() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->new_graph_version(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ExtendSessionResponse) } ::google::protobuf::uint8* ExtendSessionResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ExtendSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 new_graph_version = 4; if (this->new_graph_version() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->new_graph_version(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ExtendSessionResponse) return target; } size_t ExtendSessionResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ExtendSessionResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // int64 new_graph_version = 4; if (this->new_graph_version() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->new_graph_version()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ExtendSessionResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ExtendSessionResponse) GOOGLE_DCHECK_NE(&from, this); const ExtendSessionResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const ExtendSessionResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ExtendSessionResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ExtendSessionResponse) MergeFrom(*source); } } void ExtendSessionResponse::MergeFrom(const ExtendSessionResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ExtendSessionResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.new_graph_version() != 0) { set_new_graph_version(from.new_graph_version()); } } void ExtendSessionResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ExtendSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ExtendSessionResponse::CopyFrom(const ExtendSessionResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ExtendSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool ExtendSessionResponse::IsInitialized() const { return true; } void ExtendSessionResponse::Swap(ExtendSessionResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ExtendSessionResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ExtendSessionResponse::UnsafeArenaSwap(ExtendSessionResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ExtendSessionResponse::InternalSwap(ExtendSessionResponse* other) { using std::swap; swap(new_graph_version_, other->new_graph_version_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ExtendSessionResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void RunStepRequest::InitAsDefaultInstance() { ::tensorflow::_RunStepRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::tensorflow::RunOptions*>( ::tensorflow::RunOptions::internal_default_instance()); } void RunStepRequest::clear_feed() { feed_.Clear(); } void RunStepRequest::unsafe_arena_set_allocated_options( ::tensorflow::RunOptions* options) { if (GetArenaNoVirtual() == NULL) { delete options_; } options_ = options; if (options) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunStepRequest.options) } void RunStepRequest::clear_options() { if (GetArenaNoVirtual() == NULL && options_ != NULL) { delete options_; } options_ = NULL; } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RunStepRequest::kSessionHandleFieldNumber; const int RunStepRequest::kFeedFieldNumber; const int RunStepRequest::kFetchFieldNumber; const int RunStepRequest::kTargetFieldNumber; const int RunStepRequest::kOptionsFieldNumber; const int RunStepRequest::kPartialRunHandleFieldNumber; const int RunStepRequest::kStoreErrorsInResponseBodyFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RunStepRequest::RunStepRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunStepRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.RunStepRequest) } RunStepRequest::RunStepRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), feed_(arena), fetch_(arena), target_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunStepRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.RunStepRequest) } RunStepRequest::RunStepRequest(const RunStepRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), feed_(from.feed_), fetch_(from.fetch_), target_(from.target_) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } partial_run_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.partial_run_handle().size() > 0) { partial_run_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.partial_run_handle(), GetArenaNoVirtual()); } if (from.has_options()) { options_ = new ::tensorflow::RunOptions(*from.options_); } else { options_ = NULL; } store_errors_in_response_body_ = from.store_errors_in_response_body_; // @@protoc_insertion_point(copy_constructor:tensorflow.RunStepRequest) } void RunStepRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); partial_run_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&options_, 0, static_cast<size_t>( reinterpret_cast<char*>(&store_errors_in_response_body_) - reinterpret_cast<char*>(&options_)) + sizeof(store_errors_in_response_body_)); } RunStepRequest::~RunStepRequest() { // @@protoc_insertion_point(destructor:tensorflow.RunStepRequest) SharedDtor(); } void RunStepRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); partial_run_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } void RunStepRequest::ArenaDtor(void* object) { RunStepRequest* _this = reinterpret_cast< RunStepRequest* >(object); (void)_this; } void RunStepRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void RunStepRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* RunStepRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RunStepRequest& RunStepRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunStepRequest.base); return *internal_default_instance(); } void RunStepRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.RunStepRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; feed_.Clear(); fetch_.Clear(); target_.Clear(); session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); partial_run_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); if (GetArenaNoVirtual() == NULL && options_ != NULL) { delete options_; } options_ = NULL; store_errors_in_response_body_ = false; _internal_metadata_.Clear(); } bool RunStepRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.RunStepRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.RunStepRequest.session_handle")); } else { goto handle_unusual; } break; } // repeated .tensorflow.NamedTensorProto feed = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_feed())); } else { goto handle_unusual; } break; } // repeated string fetch = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_fetch())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->fetch(this->fetch_size() - 1).data(), static_cast<int>(this->fetch(this->fetch_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.RunStepRequest.fetch")); } else { goto handle_unusual; } break; } // repeated string target = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_target())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target(this->target_size() - 1).data(), static_cast<int>(this->target(this->target_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.RunStepRequest.target")); } else { goto handle_unusual; } break; } // .tensorflow.RunOptions options = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; } break; } // string partial_run_handle = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_partial_run_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->partial_run_handle().data(), static_cast<int>(this->partial_run_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.RunStepRequest.partial_run_handle")); } else { goto handle_unusual; } break; } // bool store_errors_in_response_body = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &store_errors_in_response_body_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.RunStepRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.RunStepRequest) return false; #undef DO_ } void RunStepRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.RunStepRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } // repeated .tensorflow.NamedTensorProto feed = 2; for (unsigned int i = 0, n = static_cast<unsigned int>(this->feed_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->feed(static_cast<int>(i)), output); } // repeated string fetch = 3; for (int i = 0, n = this->fetch_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->fetch(i).data(), static_cast<int>(this->fetch(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.fetch"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->fetch(i), output); } // repeated string target = 4; for (int i = 0, n = this->target_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target(i).data(), static_cast<int>(this->target(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.target"); ::google::protobuf::internal::WireFormatLite::WriteString( 4, this->target(i), output); } // .tensorflow.RunOptions options = 5; if (this->has_options()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->_internal_options(), output); } // string partial_run_handle = 6; if (this->partial_run_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->partial_run_handle().data(), static_cast<int>(this->partial_run_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.partial_run_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->partial_run_handle(), output); } // bool store_errors_in_response_body = 7; if (this->store_errors_in_response_body() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->store_errors_in_response_body(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.RunStepRequest) } ::google::protobuf::uint8* RunStepRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.RunStepRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } // repeated .tensorflow.NamedTensorProto feed = 2; for (unsigned int i = 0, n = static_cast<unsigned int>(this->feed_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->feed(static_cast<int>(i)), deterministic, target); } // repeated string fetch = 3; for (int i = 0, n = this->fetch_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->fetch(i).data(), static_cast<int>(this->fetch(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.fetch"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(3, this->fetch(i), target); } // repeated string target = 4; for (int i = 0, n = this->target_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target(i).data(), static_cast<int>(this->target(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.target"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(4, this->target(i), target); } // .tensorflow.RunOptions options = 5; if (this->has_options()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 5, this->_internal_options(), deterministic, target); } // string partial_run_handle = 6; if (this->partial_run_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->partial_run_handle().data(), static_cast<int>(this->partial_run_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepRequest.partial_run_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->partial_run_handle(), target); } // bool store_errors_in_response_body = 7; if (this->store_errors_in_response_body() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->store_errors_in_response_body(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.RunStepRequest) return target; } size_t RunStepRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.RunStepRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .tensorflow.NamedTensorProto feed = 2; { unsigned int count = static_cast<unsigned int>(this->feed_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->feed(static_cast<int>(i))); } } // repeated string fetch = 3; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->fetch_size()); for (int i = 0, n = this->fetch_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->fetch(i)); } // repeated string target = 4; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->target_size()); for (int i = 0, n = this->target_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->target(i)); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } // string partial_run_handle = 6; if (this->partial_run_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->partial_run_handle()); } // .tensorflow.RunOptions options = 5; if (this->has_options()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *options_); } // bool store_errors_in_response_body = 7; if (this->store_errors_in_response_body() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void RunStepRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.RunStepRequest) GOOGLE_DCHECK_NE(&from, this); const RunStepRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const RunStepRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.RunStepRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.RunStepRequest) MergeFrom(*source); } } void RunStepRequest::MergeFrom(const RunStepRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.RunStepRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; feed_.MergeFrom(from.feed_); fetch_.MergeFrom(from.fetch_); target_.MergeFrom(from.target_); if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } if (from.partial_run_handle().size() > 0) { set_partial_run_handle(from.partial_run_handle()); } if (from.has_options()) { mutable_options()->::tensorflow::RunOptions::MergeFrom(from.options()); } if (from.store_errors_in_response_body() != 0) { set_store_errors_in_response_body(from.store_errors_in_response_body()); } } void RunStepRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.RunStepRequest) if (&from == this) return; Clear(); MergeFrom(from); } void RunStepRequest::CopyFrom(const RunStepRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.RunStepRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool RunStepRequest::IsInitialized() const { return true; } void RunStepRequest::Swap(RunStepRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { RunStepRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void RunStepRequest::UnsafeArenaSwap(RunStepRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void RunStepRequest::InternalSwap(RunStepRequest* other) { using std::swap; CastToBase(&feed_)->InternalSwap(CastToBase(&other->feed_)); fetch_.InternalSwap(CastToBase(&other->fetch_)); target_.InternalSwap(CastToBase(&other->target_)); session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); partial_run_handle_.Swap(&other->partial_run_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); swap(store_errors_in_response_body_, other->store_errors_in_response_body_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata RunStepRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void RunStepResponse::InitAsDefaultInstance() { ::tensorflow::_RunStepResponse_default_instance_._instance.get_mutable()->metadata_ = const_cast< ::tensorflow::RunMetadata*>( ::tensorflow::RunMetadata::internal_default_instance()); } void RunStepResponse::clear_tensor() { tensor_.Clear(); } void RunStepResponse::unsafe_arena_set_allocated_metadata( ::tensorflow::RunMetadata* metadata) { if (GetArenaNoVirtual() == NULL) { delete metadata_; } metadata_ = metadata; if (metadata) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunStepResponse.metadata) } void RunStepResponse::clear_metadata() { if (GetArenaNoVirtual() == NULL && metadata_ != NULL) { delete metadata_; } metadata_ = NULL; } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RunStepResponse::kTensorFieldNumber; const int RunStepResponse::kMetadataFieldNumber; const int RunStepResponse::kStatusCodeFieldNumber; const int RunStepResponse::kStatusErrorMessageFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RunStepResponse::RunStepResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunStepResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.RunStepResponse) } RunStepResponse::RunStepResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), tensor_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunStepResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.RunStepResponse) } RunStepResponse::RunStepResponse(const RunStepResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), tensor_(from.tensor_) { _internal_metadata_.MergeFrom(from._internal_metadata_); status_error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.status_error_message().size() > 0) { status_error_message_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.status_error_message(), GetArenaNoVirtual()); } if (from.has_metadata()) { metadata_ = new ::tensorflow::RunMetadata(*from.metadata_); } else { metadata_ = NULL; } status_code_ = from.status_code_; // @@protoc_insertion_point(copy_constructor:tensorflow.RunStepResponse) } void RunStepResponse::SharedCtor() { status_error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&metadata_, 0, static_cast<size_t>( reinterpret_cast<char*>(&status_code_) - reinterpret_cast<char*>(&metadata_)) + sizeof(status_code_)); } RunStepResponse::~RunStepResponse() { // @@protoc_insertion_point(destructor:tensorflow.RunStepResponse) SharedDtor(); } void RunStepResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); status_error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete metadata_; } void RunStepResponse::ArenaDtor(void* object) { RunStepResponse* _this = reinterpret_cast< RunStepResponse* >(object); (void)_this; } void RunStepResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void RunStepResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* RunStepResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RunStepResponse& RunStepResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunStepResponse.base); return *internal_default_instance(); } void RunStepResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.RunStepResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; tensor_.Clear(); status_error_message_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); if (GetArenaNoVirtual() == NULL && metadata_ != NULL) { delete metadata_; } metadata_ = NULL; status_code_ = 0; _internal_metadata_.Clear(); } bool RunStepResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.RunStepResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .tensorflow.NamedTensorProto tensor = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_tensor())); } else { goto handle_unusual; } break; } // .tensorflow.RunMetadata metadata = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_metadata())); } else { goto handle_unusual; } break; } // .tensorflow.error.Code status_code = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_status_code(static_cast< ::tensorflow::error::Code >(value)); } else { goto handle_unusual; } break; } // string status_error_message = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_status_error_message())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_error_message().data(), static_cast<int>(this->status_error_message().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.RunStepResponse.status_error_message")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.RunStepResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.RunStepResponse) return false; #undef DO_ } void RunStepResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.RunStepResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tensorflow.NamedTensorProto tensor = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->tensor_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->tensor(static_cast<int>(i)), output); } // .tensorflow.RunMetadata metadata = 2; if (this->has_metadata()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_metadata(), output); } // .tensorflow.error.Code status_code = 3; if (this->status_code() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 3, this->status_code(), output); } // string status_error_message = 4; if (this->status_error_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_error_message().data(), static_cast<int>(this->status_error_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepResponse.status_error_message"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->status_error_message(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.RunStepResponse) } ::google::protobuf::uint8* RunStepResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.RunStepResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tensorflow.NamedTensorProto tensor = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->tensor_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->tensor(static_cast<int>(i)), deterministic, target); } // .tensorflow.RunMetadata metadata = 2; if (this->has_metadata()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_metadata(), deterministic, target); } // .tensorflow.error.Code status_code = 3; if (this->status_code() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 3, this->status_code(), target); } // string status_error_message = 4; if (this->status_error_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_error_message().data(), static_cast<int>(this->status_error_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunStepResponse.status_error_message"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->status_error_message(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.RunStepResponse) return target; } size_t RunStepResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.RunStepResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .tensorflow.NamedTensorProto tensor = 1; { unsigned int count = static_cast<unsigned int>(this->tensor_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->tensor(static_cast<int>(i))); } } // string status_error_message = 4; if (this->status_error_message().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->status_error_message()); } // .tensorflow.RunMetadata metadata = 2; if (this->has_metadata()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *metadata_); } // .tensorflow.error.Code status_code = 3; if (this->status_code() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->status_code()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void RunStepResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.RunStepResponse) GOOGLE_DCHECK_NE(&from, this); const RunStepResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const RunStepResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.RunStepResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.RunStepResponse) MergeFrom(*source); } } void RunStepResponse::MergeFrom(const RunStepResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.RunStepResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; tensor_.MergeFrom(from.tensor_); if (from.status_error_message().size() > 0) { set_status_error_message(from.status_error_message()); } if (from.has_metadata()) { mutable_metadata()->::tensorflow::RunMetadata::MergeFrom(from.metadata()); } if (from.status_code() != 0) { set_status_code(from.status_code()); } } void RunStepResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.RunStepResponse) if (&from == this) return; Clear(); MergeFrom(from); } void RunStepResponse::CopyFrom(const RunStepResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.RunStepResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool RunStepResponse::IsInitialized() const { return true; } void RunStepResponse::Swap(RunStepResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { RunStepResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void RunStepResponse::UnsafeArenaSwap(RunStepResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void RunStepResponse::InternalSwap(RunStepResponse* other) { using std::swap; CastToBase(&tensor_)->InternalSwap(CastToBase(&other->tensor_)); status_error_message_.Swap(&other->status_error_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(metadata_, other->metadata_); swap(status_code_, other->status_code_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata RunStepResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void PartialRunSetupRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int PartialRunSetupRequest::kSessionHandleFieldNumber; const int PartialRunSetupRequest::kFeedFieldNumber; const int PartialRunSetupRequest::kFetchFieldNumber; const int PartialRunSetupRequest::kTargetFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 PartialRunSetupRequest::PartialRunSetupRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_PartialRunSetupRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.PartialRunSetupRequest) } PartialRunSetupRequest::PartialRunSetupRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), feed_(arena), fetch_(arena), target_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_PartialRunSetupRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.PartialRunSetupRequest) } PartialRunSetupRequest::PartialRunSetupRequest(const PartialRunSetupRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), feed_(from.feed_), fetch_(from.fetch_), target_(from.target_) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } // @@protoc_insertion_point(copy_constructor:tensorflow.PartialRunSetupRequest) } void PartialRunSetupRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } PartialRunSetupRequest::~PartialRunSetupRequest() { // @@protoc_insertion_point(destructor:tensorflow.PartialRunSetupRequest) SharedDtor(); } void PartialRunSetupRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void PartialRunSetupRequest::ArenaDtor(void* object) { PartialRunSetupRequest* _this = reinterpret_cast< PartialRunSetupRequest* >(object); (void)_this; } void PartialRunSetupRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void PartialRunSetupRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* PartialRunSetupRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const PartialRunSetupRequest& PartialRunSetupRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_PartialRunSetupRequest.base); return *internal_default_instance(); } void PartialRunSetupRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.PartialRunSetupRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; feed_.Clear(); fetch_.Clear(); target_.Clear(); session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Clear(); } bool PartialRunSetupRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.PartialRunSetupRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.PartialRunSetupRequest.session_handle")); } else { goto handle_unusual; } break; } // repeated string feed = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_feed())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->feed(this->feed_size() - 1).data(), static_cast<int>(this->feed(this->feed_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.PartialRunSetupRequest.feed")); } else { goto handle_unusual; } break; } // repeated string fetch = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_fetch())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->fetch(this->fetch_size() - 1).data(), static_cast<int>(this->fetch(this->fetch_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.PartialRunSetupRequest.fetch")); } else { goto handle_unusual; } break; } // repeated string target = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_target())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target(this->target_size() - 1).data(), static_cast<int>(this->target(this->target_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.PartialRunSetupRequest.target")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.PartialRunSetupRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.PartialRunSetupRequest) return false; #undef DO_ } void PartialRunSetupRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.PartialRunSetupRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } // repeated string feed = 2; for (int i = 0, n = this->feed_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->feed(i).data(), static_cast<int>(this->feed(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.feed"); ::google::protobuf::internal::WireFormatLite::WriteString( 2, this->feed(i), output); } // repeated string fetch = 3; for (int i = 0, n = this->fetch_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->fetch(i).data(), static_cast<int>(this->fetch(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.fetch"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->fetch(i), output); } // repeated string target = 4; for (int i = 0, n = this->target_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target(i).data(), static_cast<int>(this->target(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.target"); ::google::protobuf::internal::WireFormatLite::WriteString( 4, this->target(i), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.PartialRunSetupRequest) } ::google::protobuf::uint8* PartialRunSetupRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.PartialRunSetupRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } // repeated string feed = 2; for (int i = 0, n = this->feed_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->feed(i).data(), static_cast<int>(this->feed(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.feed"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(2, this->feed(i), target); } // repeated string fetch = 3; for (int i = 0, n = this->fetch_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->fetch(i).data(), static_cast<int>(this->fetch(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.fetch"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(3, this->fetch(i), target); } // repeated string target = 4; for (int i = 0, n = this->target_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target(i).data(), static_cast<int>(this->target(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupRequest.target"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(4, this->target(i), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.PartialRunSetupRequest) return target; } size_t PartialRunSetupRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.PartialRunSetupRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated string feed = 2; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->feed_size()); for (int i = 0, n = this->feed_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->feed(i)); } // repeated string fetch = 3; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->fetch_size()); for (int i = 0, n = this->fetch_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->fetch(i)); } // repeated string target = 4; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->target_size()); for (int i = 0, n = this->target_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->target(i)); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void PartialRunSetupRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.PartialRunSetupRequest) GOOGLE_DCHECK_NE(&from, this); const PartialRunSetupRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const PartialRunSetupRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.PartialRunSetupRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.PartialRunSetupRequest) MergeFrom(*source); } } void PartialRunSetupRequest::MergeFrom(const PartialRunSetupRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.PartialRunSetupRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; feed_.MergeFrom(from.feed_); fetch_.MergeFrom(from.fetch_); target_.MergeFrom(from.target_); if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } } void PartialRunSetupRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.PartialRunSetupRequest) if (&from == this) return; Clear(); MergeFrom(from); } void PartialRunSetupRequest::CopyFrom(const PartialRunSetupRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.PartialRunSetupRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool PartialRunSetupRequest::IsInitialized() const { return true; } void PartialRunSetupRequest::Swap(PartialRunSetupRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { PartialRunSetupRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void PartialRunSetupRequest::UnsafeArenaSwap(PartialRunSetupRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void PartialRunSetupRequest::InternalSwap(PartialRunSetupRequest* other) { using std::swap; feed_.InternalSwap(CastToBase(&other->feed_)); fetch_.InternalSwap(CastToBase(&other->fetch_)); target_.InternalSwap(CastToBase(&other->target_)); session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata PartialRunSetupRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void PartialRunSetupResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int PartialRunSetupResponse::kPartialRunHandleFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 PartialRunSetupResponse::PartialRunSetupResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_PartialRunSetupResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.PartialRunSetupResponse) } PartialRunSetupResponse::PartialRunSetupResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_PartialRunSetupResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.PartialRunSetupResponse) } PartialRunSetupResponse::PartialRunSetupResponse(const PartialRunSetupResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); partial_run_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.partial_run_handle().size() > 0) { partial_run_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.partial_run_handle(), GetArenaNoVirtual()); } // @@protoc_insertion_point(copy_constructor:tensorflow.PartialRunSetupResponse) } void PartialRunSetupResponse::SharedCtor() { partial_run_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } PartialRunSetupResponse::~PartialRunSetupResponse() { // @@protoc_insertion_point(destructor:tensorflow.PartialRunSetupResponse) SharedDtor(); } void PartialRunSetupResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); partial_run_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void PartialRunSetupResponse::ArenaDtor(void* object) { PartialRunSetupResponse* _this = reinterpret_cast< PartialRunSetupResponse* >(object); (void)_this; } void PartialRunSetupResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void PartialRunSetupResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* PartialRunSetupResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const PartialRunSetupResponse& PartialRunSetupResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_PartialRunSetupResponse.base); return *internal_default_instance(); } void PartialRunSetupResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.PartialRunSetupResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; partial_run_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Clear(); } bool PartialRunSetupResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.PartialRunSetupResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string partial_run_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_partial_run_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->partial_run_handle().data(), static_cast<int>(this->partial_run_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.PartialRunSetupResponse.partial_run_handle")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.PartialRunSetupResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.PartialRunSetupResponse) return false; #undef DO_ } void PartialRunSetupResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.PartialRunSetupResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string partial_run_handle = 1; if (this->partial_run_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->partial_run_handle().data(), static_cast<int>(this->partial_run_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupResponse.partial_run_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->partial_run_handle(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.PartialRunSetupResponse) } ::google::protobuf::uint8* PartialRunSetupResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.PartialRunSetupResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string partial_run_handle = 1; if (this->partial_run_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->partial_run_handle().data(), static_cast<int>(this->partial_run_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.PartialRunSetupResponse.partial_run_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->partial_run_handle(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.PartialRunSetupResponse) return target; } size_t PartialRunSetupResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.PartialRunSetupResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string partial_run_handle = 1; if (this->partial_run_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->partial_run_handle()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void PartialRunSetupResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.PartialRunSetupResponse) GOOGLE_DCHECK_NE(&from, this); const PartialRunSetupResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const PartialRunSetupResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.PartialRunSetupResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.PartialRunSetupResponse) MergeFrom(*source); } } void PartialRunSetupResponse::MergeFrom(const PartialRunSetupResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.PartialRunSetupResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.partial_run_handle().size() > 0) { set_partial_run_handle(from.partial_run_handle()); } } void PartialRunSetupResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.PartialRunSetupResponse) if (&from == this) return; Clear(); MergeFrom(from); } void PartialRunSetupResponse::CopyFrom(const PartialRunSetupResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.PartialRunSetupResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool PartialRunSetupResponse::IsInitialized() const { return true; } void PartialRunSetupResponse::Swap(PartialRunSetupResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { PartialRunSetupResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void PartialRunSetupResponse::UnsafeArenaSwap(PartialRunSetupResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void PartialRunSetupResponse::InternalSwap(PartialRunSetupResponse* other) { using std::swap; partial_run_handle_.Swap(&other->partial_run_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata PartialRunSetupResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CloseSessionRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CloseSessionRequest::kSessionHandleFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CloseSessionRequest::CloseSessionRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CloseSessionRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.CloseSessionRequest) } CloseSessionRequest::CloseSessionRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CloseSessionRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.CloseSessionRequest) } CloseSessionRequest::CloseSessionRequest(const CloseSessionRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } // @@protoc_insertion_point(copy_constructor:tensorflow.CloseSessionRequest) } void CloseSessionRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } CloseSessionRequest::~CloseSessionRequest() { // @@protoc_insertion_point(destructor:tensorflow.CloseSessionRequest) SharedDtor(); } void CloseSessionRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void CloseSessionRequest::ArenaDtor(void* object) { CloseSessionRequest* _this = reinterpret_cast< CloseSessionRequest* >(object); (void)_this; } void CloseSessionRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void CloseSessionRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CloseSessionRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CloseSessionRequest& CloseSessionRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CloseSessionRequest.base); return *internal_default_instance(); } void CloseSessionRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.CloseSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Clear(); } bool CloseSessionRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.CloseSessionRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.CloseSessionRequest.session_handle")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.CloseSessionRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.CloseSessionRequest) return false; #undef DO_ } void CloseSessionRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.CloseSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.CloseSessionRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.CloseSessionRequest) } ::google::protobuf::uint8* CloseSessionRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CloseSessionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.CloseSessionRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CloseSessionRequest) return target; } size_t CloseSessionRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.CloseSessionRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CloseSessionRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CloseSessionRequest) GOOGLE_DCHECK_NE(&from, this); const CloseSessionRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const CloseSessionRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CloseSessionRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CloseSessionRequest) MergeFrom(*source); } } void CloseSessionRequest::MergeFrom(const CloseSessionRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CloseSessionRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } } void CloseSessionRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CloseSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CloseSessionRequest::CopyFrom(const CloseSessionRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CloseSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool CloseSessionRequest::IsInitialized() const { return true; } void CloseSessionRequest::Swap(CloseSessionRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { CloseSessionRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void CloseSessionRequest::UnsafeArenaSwap(CloseSessionRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void CloseSessionRequest::InternalSwap(CloseSessionRequest* other) { using std::swap; session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CloseSessionRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CloseSessionResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CloseSessionResponse::CloseSessionResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CloseSessionResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.CloseSessionResponse) } CloseSessionResponse::CloseSessionResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CloseSessionResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.CloseSessionResponse) } CloseSessionResponse::CloseSessionResponse(const CloseSessionResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tensorflow.CloseSessionResponse) } void CloseSessionResponse::SharedCtor() { } CloseSessionResponse::~CloseSessionResponse() { // @@protoc_insertion_point(destructor:tensorflow.CloseSessionResponse) SharedDtor(); } void CloseSessionResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void CloseSessionResponse::ArenaDtor(void* object) { CloseSessionResponse* _this = reinterpret_cast< CloseSessionResponse* >(object); (void)_this; } void CloseSessionResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void CloseSessionResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CloseSessionResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CloseSessionResponse& CloseSessionResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_CloseSessionResponse.base); return *internal_default_instance(); } void CloseSessionResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.CloseSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _internal_metadata_.Clear(); } bool CloseSessionResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.CloseSessionResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); } success: // @@protoc_insertion_point(parse_success:tensorflow.CloseSessionResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.CloseSessionResponse) return false; #undef DO_ } void CloseSessionResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.CloseSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.CloseSessionResponse) } ::google::protobuf::uint8* CloseSessionResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CloseSessionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CloseSessionResponse) return target; } size_t CloseSessionResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.CloseSessionResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CloseSessionResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CloseSessionResponse) GOOGLE_DCHECK_NE(&from, this); const CloseSessionResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const CloseSessionResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CloseSessionResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CloseSessionResponse) MergeFrom(*source); } } void CloseSessionResponse::MergeFrom(const CloseSessionResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CloseSessionResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; } void CloseSessionResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CloseSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } void CloseSessionResponse::CopyFrom(const CloseSessionResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CloseSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool CloseSessionResponse::IsInitialized() const { return true; } void CloseSessionResponse::Swap(CloseSessionResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { CloseSessionResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void CloseSessionResponse::UnsafeArenaSwap(CloseSessionResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void CloseSessionResponse::InternalSwap(CloseSessionResponse* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CloseSessionResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ResetRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ResetRequest::kContainerFieldNumber; const int ResetRequest::kDeviceFiltersFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ResetRequest::ResetRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ResetRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ResetRequest) } ResetRequest::ResetRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), container_(arena), device_filters_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ResetRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ResetRequest) } ResetRequest::ResetRequest(const ResetRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), container_(from.container_), device_filters_(from.device_filters_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tensorflow.ResetRequest) } void ResetRequest::SharedCtor() { } ResetRequest::~ResetRequest() { // @@protoc_insertion_point(destructor:tensorflow.ResetRequest) SharedDtor(); } void ResetRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void ResetRequest::ArenaDtor(void* object) { ResetRequest* _this = reinterpret_cast< ResetRequest* >(object); (void)_this; } void ResetRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ResetRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ResetRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ResetRequest& ResetRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ResetRequest.base); return *internal_default_instance(); } void ResetRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ResetRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; container_.Clear(); device_filters_.Clear(); _internal_metadata_.Clear(); } bool ResetRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ResetRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated string container = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_container())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->container(this->container_size() - 1).data(), static_cast<int>(this->container(this->container_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.ResetRequest.container")); } else { goto handle_unusual; } break; } // repeated string device_filters = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_device_filters())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->device_filters(this->device_filters_size() - 1).data(), static_cast<int>(this->device_filters(this->device_filters_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.ResetRequest.device_filters")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.ResetRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ResetRequest) return false; #undef DO_ } void ResetRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ResetRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string container = 1; for (int i = 0, n = this->container_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->container(i).data(), static_cast<int>(this->container(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ResetRequest.container"); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->container(i), output); } // repeated string device_filters = 2; for (int i = 0, n = this->device_filters_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->device_filters(i).data(), static_cast<int>(this->device_filters(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ResetRequest.device_filters"); ::google::protobuf::internal::WireFormatLite::WriteString( 2, this->device_filters(i), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ResetRequest) } ::google::protobuf::uint8* ResetRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ResetRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string container = 1; for (int i = 0, n = this->container_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->container(i).data(), static_cast<int>(this->container(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ResetRequest.container"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(1, this->container(i), target); } // repeated string device_filters = 2; for (int i = 0, n = this->device_filters_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->device_filters(i).data(), static_cast<int>(this->device_filters(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ResetRequest.device_filters"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(2, this->device_filters(i), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ResetRequest) return target; } size_t ResetRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ResetRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated string container = 1; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->container_size()); for (int i = 0, n = this->container_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->container(i)); } // repeated string device_filters = 2; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->device_filters_size()); for (int i = 0, n = this->device_filters_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->device_filters(i)); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ResetRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ResetRequest) GOOGLE_DCHECK_NE(&from, this); const ResetRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const ResetRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ResetRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ResetRequest) MergeFrom(*source); } } void ResetRequest::MergeFrom(const ResetRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ResetRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; container_.MergeFrom(from.container_); device_filters_.MergeFrom(from.device_filters_); } void ResetRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ResetRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ResetRequest::CopyFrom(const ResetRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ResetRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool ResetRequest::IsInitialized() const { return true; } void ResetRequest::Swap(ResetRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ResetRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ResetRequest::UnsafeArenaSwap(ResetRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ResetRequest::InternalSwap(ResetRequest* other) { using std::swap; container_.InternalSwap(CastToBase(&other->container_)); device_filters_.InternalSwap(CastToBase(&other->device_filters_)); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ResetRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ResetResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ResetResponse::ResetResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ResetResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ResetResponse) } ResetResponse::ResetResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ResetResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ResetResponse) } ResetResponse::ResetResponse(const ResetResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tensorflow.ResetResponse) } void ResetResponse::SharedCtor() { } ResetResponse::~ResetResponse() { // @@protoc_insertion_point(destructor:tensorflow.ResetResponse) SharedDtor(); } void ResetResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void ResetResponse::ArenaDtor(void* object) { ResetResponse* _this = reinterpret_cast< ResetResponse* >(object); (void)_this; } void ResetResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ResetResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ResetResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ResetResponse& ResetResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ResetResponse.base); return *internal_default_instance(); } void ResetResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ResetResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _internal_metadata_.Clear(); } bool ResetResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ResetResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); } success: // @@protoc_insertion_point(parse_success:tensorflow.ResetResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ResetResponse) return false; #undef DO_ } void ResetResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ResetResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ResetResponse) } ::google::protobuf::uint8* ResetResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ResetResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ResetResponse) return target; } size_t ResetResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ResetResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ResetResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ResetResponse) GOOGLE_DCHECK_NE(&from, this); const ResetResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const ResetResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ResetResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ResetResponse) MergeFrom(*source); } } void ResetResponse::MergeFrom(const ResetResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ResetResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; } void ResetResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ResetResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ResetResponse::CopyFrom(const ResetResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ResetResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool ResetResponse::IsInitialized() const { return true; } void ResetResponse::Swap(ResetResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ResetResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ResetResponse::UnsafeArenaSwap(ResetResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ResetResponse::InternalSwap(ResetResponse* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ResetResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListDevicesRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListDevicesRequest::kSessionHandleFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListDevicesRequest::ListDevicesRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ListDevicesRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ListDevicesRequest) } ListDevicesRequest::ListDevicesRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ListDevicesRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ListDevicesRequest) } ListDevicesRequest::ListDevicesRequest(const ListDevicesRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } // @@protoc_insertion_point(copy_constructor:tensorflow.ListDevicesRequest) } void ListDevicesRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ListDevicesRequest::~ListDevicesRequest() { // @@protoc_insertion_point(destructor:tensorflow.ListDevicesRequest) SharedDtor(); } void ListDevicesRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void ListDevicesRequest::ArenaDtor(void* object) { ListDevicesRequest* _this = reinterpret_cast< ListDevicesRequest* >(object); (void)_this; } void ListDevicesRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ListDevicesRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListDevicesRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListDevicesRequest& ListDevicesRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ListDevicesRequest.base); return *internal_default_instance(); } void ListDevicesRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ListDevicesRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Clear(); } bool ListDevicesRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ListDevicesRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.ListDevicesRequest.session_handle")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.ListDevicesRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ListDevicesRequest) return false; #undef DO_ } void ListDevicesRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ListDevicesRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ListDevicesRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ListDevicesRequest) } ::google::protobuf::uint8* ListDevicesRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ListDevicesRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ListDevicesRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ListDevicesRequest) return target; } size_t ListDevicesRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ListDevicesRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListDevicesRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ListDevicesRequest) GOOGLE_DCHECK_NE(&from, this); const ListDevicesRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListDevicesRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ListDevicesRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ListDevicesRequest) MergeFrom(*source); } } void ListDevicesRequest::MergeFrom(const ListDevicesRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ListDevicesRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } } void ListDevicesRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ListDevicesRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ListDevicesRequest::CopyFrom(const ListDevicesRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ListDevicesRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool ListDevicesRequest::IsInitialized() const { return true; } void ListDevicesRequest::Swap(ListDevicesRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ListDevicesRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ListDevicesRequest::UnsafeArenaSwap(ListDevicesRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ListDevicesRequest::InternalSwap(ListDevicesRequest* other) { using std::swap; session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListDevicesRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListDevicesResponse::InitAsDefaultInstance() { } void ListDevicesResponse::clear_local_device() { local_device_.Clear(); } void ListDevicesResponse::clear_remote_device() { remote_device_.Clear(); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListDevicesResponse::kLocalDeviceFieldNumber; const int ListDevicesResponse::kRemoteDeviceFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListDevicesResponse::ListDevicesResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ListDevicesResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ListDevicesResponse) } ListDevicesResponse::ListDevicesResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), local_device_(arena), remote_device_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ListDevicesResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ListDevicesResponse) } ListDevicesResponse::ListDevicesResponse(const ListDevicesResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), local_device_(from.local_device_), remote_device_(from.remote_device_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tensorflow.ListDevicesResponse) } void ListDevicesResponse::SharedCtor() { } ListDevicesResponse::~ListDevicesResponse() { // @@protoc_insertion_point(destructor:tensorflow.ListDevicesResponse) SharedDtor(); } void ListDevicesResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void ListDevicesResponse::ArenaDtor(void* object) { ListDevicesResponse* _this = reinterpret_cast< ListDevicesResponse* >(object); (void)_this; } void ListDevicesResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ListDevicesResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListDevicesResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListDevicesResponse& ListDevicesResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ListDevicesResponse.base); return *internal_default_instance(); } void ListDevicesResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ListDevicesResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; local_device_.Clear(); remote_device_.Clear(); _internal_metadata_.Clear(); } bool ListDevicesResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ListDevicesResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .tensorflow.DeviceAttributes local_device = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_local_device())); } else { goto handle_unusual; } break; } // repeated .tensorflow.DeviceAttributes remote_device = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_remote_device())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.ListDevicesResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ListDevicesResponse) return false; #undef DO_ } void ListDevicesResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ListDevicesResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tensorflow.DeviceAttributes local_device = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->local_device_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->local_device(static_cast<int>(i)), output); } // repeated .tensorflow.DeviceAttributes remote_device = 2; for (unsigned int i = 0, n = static_cast<unsigned int>(this->remote_device_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->remote_device(static_cast<int>(i)), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ListDevicesResponse) } ::google::protobuf::uint8* ListDevicesResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ListDevicesResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tensorflow.DeviceAttributes local_device = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->local_device_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->local_device(static_cast<int>(i)), deterministic, target); } // repeated .tensorflow.DeviceAttributes remote_device = 2; for (unsigned int i = 0, n = static_cast<unsigned int>(this->remote_device_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->remote_device(static_cast<int>(i)), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ListDevicesResponse) return target; } size_t ListDevicesResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ListDevicesResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .tensorflow.DeviceAttributes local_device = 1; { unsigned int count = static_cast<unsigned int>(this->local_device_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->local_device(static_cast<int>(i))); } } // repeated .tensorflow.DeviceAttributes remote_device = 2; { unsigned int count = static_cast<unsigned int>(this->remote_device_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->remote_device(static_cast<int>(i))); } } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListDevicesResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ListDevicesResponse) GOOGLE_DCHECK_NE(&from, this); const ListDevicesResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListDevicesResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ListDevicesResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ListDevicesResponse) MergeFrom(*source); } } void ListDevicesResponse::MergeFrom(const ListDevicesResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ListDevicesResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; local_device_.MergeFrom(from.local_device_); remote_device_.MergeFrom(from.remote_device_); } void ListDevicesResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ListDevicesResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ListDevicesResponse::CopyFrom(const ListDevicesResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ListDevicesResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool ListDevicesResponse::IsInitialized() const { return true; } void ListDevicesResponse::Swap(ListDevicesResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ListDevicesResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ListDevicesResponse::UnsafeArenaSwap(ListDevicesResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ListDevicesResponse::InternalSwap(ListDevicesResponse* other) { using std::swap; CastToBase(&local_device_)->InternalSwap(CastToBase(&other->local_device_)); CastToBase(&remote_device_)->InternalSwap(CastToBase(&other->remote_device_)); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListDevicesResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void MakeCallableRequest::InitAsDefaultInstance() { ::tensorflow::_MakeCallableRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::tensorflow::CallableOptions*>( ::tensorflow::CallableOptions::internal_default_instance()); } void MakeCallableRequest::unsafe_arena_set_allocated_options( ::tensorflow::CallableOptions* options) { if (GetArenaNoVirtual() == NULL) { delete options_; } options_ = options; if (options) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.MakeCallableRequest.options) } void MakeCallableRequest::clear_options() { if (GetArenaNoVirtual() == NULL && options_ != NULL) { delete options_; } options_ = NULL; } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MakeCallableRequest::kSessionHandleFieldNumber; const int MakeCallableRequest::kOptionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MakeCallableRequest::MakeCallableRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_MakeCallableRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.MakeCallableRequest) } MakeCallableRequest::MakeCallableRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_MakeCallableRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.MakeCallableRequest) } MakeCallableRequest::MakeCallableRequest(const MakeCallableRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } if (from.has_options()) { options_ = new ::tensorflow::CallableOptions(*from.options_); } else { options_ = NULL; } // @@protoc_insertion_point(copy_constructor:tensorflow.MakeCallableRequest) } void MakeCallableRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); options_ = NULL; } MakeCallableRequest::~MakeCallableRequest() { // @@protoc_insertion_point(destructor:tensorflow.MakeCallableRequest) SharedDtor(); } void MakeCallableRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } void MakeCallableRequest::ArenaDtor(void* object) { MakeCallableRequest* _this = reinterpret_cast< MakeCallableRequest* >(object); (void)_this; } void MakeCallableRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void MakeCallableRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* MakeCallableRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MakeCallableRequest& MakeCallableRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_MakeCallableRequest.base); return *internal_default_instance(); } void MakeCallableRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.MakeCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); if (GetArenaNoVirtual() == NULL && options_ != NULL) { delete options_; } options_ = NULL; _internal_metadata_.Clear(); } bool MakeCallableRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.MakeCallableRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.MakeCallableRequest.session_handle")); } else { goto handle_unusual; } break; } // .tensorflow.CallableOptions options = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.MakeCallableRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.MakeCallableRequest) return false; #undef DO_ } void MakeCallableRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.MakeCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.MakeCallableRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } // .tensorflow.CallableOptions options = 2; if (this->has_options()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_options(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.MakeCallableRequest) } ::google::protobuf::uint8* MakeCallableRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MakeCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.MakeCallableRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } // .tensorflow.CallableOptions options = 2; if (this->has_options()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_options(), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MakeCallableRequest) return target; } size_t MakeCallableRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.MakeCallableRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } // .tensorflow.CallableOptions options = 2; if (this->has_options()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *options_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MakeCallableRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MakeCallableRequest) GOOGLE_DCHECK_NE(&from, this); const MakeCallableRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const MakeCallableRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MakeCallableRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MakeCallableRequest) MergeFrom(*source); } } void MakeCallableRequest::MergeFrom(const MakeCallableRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MakeCallableRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } if (from.has_options()) { mutable_options()->::tensorflow::CallableOptions::MergeFrom(from.options()); } } void MakeCallableRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MakeCallableRequest) if (&from == this) return; Clear(); MergeFrom(from); } void MakeCallableRequest::CopyFrom(const MakeCallableRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MakeCallableRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool MakeCallableRequest::IsInitialized() const { return true; } void MakeCallableRequest::Swap(MakeCallableRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { MakeCallableRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void MakeCallableRequest::UnsafeArenaSwap(MakeCallableRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void MakeCallableRequest::InternalSwap(MakeCallableRequest* other) { using std::swap; session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata MakeCallableRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void MakeCallableResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MakeCallableResponse::kHandleFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MakeCallableResponse::MakeCallableResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_MakeCallableResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.MakeCallableResponse) } MakeCallableResponse::MakeCallableResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_MakeCallableResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.MakeCallableResponse) } MakeCallableResponse::MakeCallableResponse(const MakeCallableResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); handle_ = from.handle_; // @@protoc_insertion_point(copy_constructor:tensorflow.MakeCallableResponse) } void MakeCallableResponse::SharedCtor() { handle_ = GOOGLE_LONGLONG(0); } MakeCallableResponse::~MakeCallableResponse() { // @@protoc_insertion_point(destructor:tensorflow.MakeCallableResponse) SharedDtor(); } void MakeCallableResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void MakeCallableResponse::ArenaDtor(void* object) { MakeCallableResponse* _this = reinterpret_cast< MakeCallableResponse* >(object); (void)_this; } void MakeCallableResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void MakeCallableResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* MakeCallableResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MakeCallableResponse& MakeCallableResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_MakeCallableResponse.base); return *internal_default_instance(); } void MakeCallableResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.MakeCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; handle_ = GOOGLE_LONGLONG(0); _internal_metadata_.Clear(); } bool MakeCallableResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.MakeCallableResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int64 handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &handle_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.MakeCallableResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.MakeCallableResponse) return false; #undef DO_ } void MakeCallableResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.MakeCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 handle = 1; if (this->handle() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->handle(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.MakeCallableResponse) } ::google::protobuf::uint8* MakeCallableResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MakeCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 handle = 1; if (this->handle() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->handle(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MakeCallableResponse) return target; } size_t MakeCallableResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.MakeCallableResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // int64 handle = 1; if (this->handle() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->handle()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MakeCallableResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MakeCallableResponse) GOOGLE_DCHECK_NE(&from, this); const MakeCallableResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const MakeCallableResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MakeCallableResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MakeCallableResponse) MergeFrom(*source); } } void MakeCallableResponse::MergeFrom(const MakeCallableResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MakeCallableResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.handle() != 0) { set_handle(from.handle()); } } void MakeCallableResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MakeCallableResponse) if (&from == this) return; Clear(); MergeFrom(from); } void MakeCallableResponse::CopyFrom(const MakeCallableResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MakeCallableResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool MakeCallableResponse::IsInitialized() const { return true; } void MakeCallableResponse::Swap(MakeCallableResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { MakeCallableResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void MakeCallableResponse::UnsafeArenaSwap(MakeCallableResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void MakeCallableResponse::InternalSwap(MakeCallableResponse* other) { using std::swap; swap(handle_, other->handle_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata MakeCallableResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void RunCallableRequest::InitAsDefaultInstance() { } void RunCallableRequest::clear_feed() { feed_.Clear(); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RunCallableRequest::kSessionHandleFieldNumber; const int RunCallableRequest::kHandleFieldNumber; const int RunCallableRequest::kFeedFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RunCallableRequest::RunCallableRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunCallableRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.RunCallableRequest) } RunCallableRequest::RunCallableRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), feed_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunCallableRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.RunCallableRequest) } RunCallableRequest::RunCallableRequest(const RunCallableRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), feed_(from.feed_) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } handle_ = from.handle_; // @@protoc_insertion_point(copy_constructor:tensorflow.RunCallableRequest) } void RunCallableRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); handle_ = GOOGLE_LONGLONG(0); } RunCallableRequest::~RunCallableRequest() { // @@protoc_insertion_point(destructor:tensorflow.RunCallableRequest) SharedDtor(); } void RunCallableRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void RunCallableRequest::ArenaDtor(void* object) { RunCallableRequest* _this = reinterpret_cast< RunCallableRequest* >(object); (void)_this; } void RunCallableRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void RunCallableRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* RunCallableRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RunCallableRequest& RunCallableRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunCallableRequest.base); return *internal_default_instance(); } void RunCallableRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.RunCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; feed_.Clear(); session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); handle_ = GOOGLE_LONGLONG(0); _internal_metadata_.Clear(); } bool RunCallableRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.RunCallableRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.RunCallableRequest.session_handle")); } else { goto handle_unusual; } break; } // int64 handle = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &handle_))); } else { goto handle_unusual; } break; } // repeated .tensorflow.TensorProto feed = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_feed())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.RunCallableRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.RunCallableRequest) return false; #undef DO_ } void RunCallableRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.RunCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunCallableRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } // int64 handle = 2; if (this->handle() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->handle(), output); } // repeated .tensorflow.TensorProto feed = 3; for (unsigned int i = 0, n = static_cast<unsigned int>(this->feed_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->feed(static_cast<int>(i)), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.RunCallableRequest) } ::google::protobuf::uint8* RunCallableRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.RunCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.RunCallableRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } // int64 handle = 2; if (this->handle() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->handle(), target); } // repeated .tensorflow.TensorProto feed = 3; for (unsigned int i = 0, n = static_cast<unsigned int>(this->feed_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, this->feed(static_cast<int>(i)), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.RunCallableRequest) return target; } size_t RunCallableRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.RunCallableRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .tensorflow.TensorProto feed = 3; { unsigned int count = static_cast<unsigned int>(this->feed_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->feed(static_cast<int>(i))); } } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } // int64 handle = 2; if (this->handle() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->handle()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void RunCallableRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.RunCallableRequest) GOOGLE_DCHECK_NE(&from, this); const RunCallableRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const RunCallableRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.RunCallableRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.RunCallableRequest) MergeFrom(*source); } } void RunCallableRequest::MergeFrom(const RunCallableRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.RunCallableRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; feed_.MergeFrom(from.feed_); if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } if (from.handle() != 0) { set_handle(from.handle()); } } void RunCallableRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.RunCallableRequest) if (&from == this) return; Clear(); MergeFrom(from); } void RunCallableRequest::CopyFrom(const RunCallableRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.RunCallableRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool RunCallableRequest::IsInitialized() const { return true; } void RunCallableRequest::Swap(RunCallableRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { RunCallableRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void RunCallableRequest::UnsafeArenaSwap(RunCallableRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void RunCallableRequest::InternalSwap(RunCallableRequest* other) { using std::swap; CastToBase(&feed_)->InternalSwap(CastToBase(&other->feed_)); session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(handle_, other->handle_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata RunCallableRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void RunCallableResponse::InitAsDefaultInstance() { ::tensorflow::_RunCallableResponse_default_instance_._instance.get_mutable()->metadata_ = const_cast< ::tensorflow::RunMetadata*>( ::tensorflow::RunMetadata::internal_default_instance()); } void RunCallableResponse::clear_fetch() { fetch_.Clear(); } void RunCallableResponse::unsafe_arena_set_allocated_metadata( ::tensorflow::RunMetadata* metadata) { if (GetArenaNoVirtual() == NULL) { delete metadata_; } metadata_ = metadata; if (metadata) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.RunCallableResponse.metadata) } void RunCallableResponse::clear_metadata() { if (GetArenaNoVirtual() == NULL && metadata_ != NULL) { delete metadata_; } metadata_ = NULL; } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RunCallableResponse::kFetchFieldNumber; const int RunCallableResponse::kMetadataFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RunCallableResponse::RunCallableResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunCallableResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.RunCallableResponse) } RunCallableResponse::RunCallableResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), fetch_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunCallableResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.RunCallableResponse) } RunCallableResponse::RunCallableResponse(const RunCallableResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), fetch_(from.fetch_) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_metadata()) { metadata_ = new ::tensorflow::RunMetadata(*from.metadata_); } else { metadata_ = NULL; } // @@protoc_insertion_point(copy_constructor:tensorflow.RunCallableResponse) } void RunCallableResponse::SharedCtor() { metadata_ = NULL; } RunCallableResponse::~RunCallableResponse() { // @@protoc_insertion_point(destructor:tensorflow.RunCallableResponse) SharedDtor(); } void RunCallableResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); if (this != internal_default_instance()) delete metadata_; } void RunCallableResponse::ArenaDtor(void* object) { RunCallableResponse* _this = reinterpret_cast< RunCallableResponse* >(object); (void)_this; } void RunCallableResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void RunCallableResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* RunCallableResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RunCallableResponse& RunCallableResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_RunCallableResponse.base); return *internal_default_instance(); } void RunCallableResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.RunCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; fetch_.Clear(); if (GetArenaNoVirtual() == NULL && metadata_ != NULL) { delete metadata_; } metadata_ = NULL; _internal_metadata_.Clear(); } bool RunCallableResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.RunCallableResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .tensorflow.TensorProto fetch = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_fetch())); } else { goto handle_unusual; } break; } // .tensorflow.RunMetadata metadata = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_metadata())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.RunCallableResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.RunCallableResponse) return false; #undef DO_ } void RunCallableResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.RunCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tensorflow.TensorProto fetch = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->fetch_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->fetch(static_cast<int>(i)), output); } // .tensorflow.RunMetadata metadata = 2; if (this->has_metadata()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_metadata(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.RunCallableResponse) } ::google::protobuf::uint8* RunCallableResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.RunCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tensorflow.TensorProto fetch = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->fetch_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->fetch(static_cast<int>(i)), deterministic, target); } // .tensorflow.RunMetadata metadata = 2; if (this->has_metadata()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_metadata(), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.RunCallableResponse) return target; } size_t RunCallableResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.RunCallableResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .tensorflow.TensorProto fetch = 1; { unsigned int count = static_cast<unsigned int>(this->fetch_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->fetch(static_cast<int>(i))); } } // .tensorflow.RunMetadata metadata = 2; if (this->has_metadata()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *metadata_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void RunCallableResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.RunCallableResponse) GOOGLE_DCHECK_NE(&from, this); const RunCallableResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const RunCallableResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.RunCallableResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.RunCallableResponse) MergeFrom(*source); } } void RunCallableResponse::MergeFrom(const RunCallableResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.RunCallableResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; fetch_.MergeFrom(from.fetch_); if (from.has_metadata()) { mutable_metadata()->::tensorflow::RunMetadata::MergeFrom(from.metadata()); } } void RunCallableResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.RunCallableResponse) if (&from == this) return; Clear(); MergeFrom(from); } void RunCallableResponse::CopyFrom(const RunCallableResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.RunCallableResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool RunCallableResponse::IsInitialized() const { return true; } void RunCallableResponse::Swap(RunCallableResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { RunCallableResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void RunCallableResponse::UnsafeArenaSwap(RunCallableResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void RunCallableResponse::InternalSwap(RunCallableResponse* other) { using std::swap; CastToBase(&fetch_)->InternalSwap(CastToBase(&other->fetch_)); swap(metadata_, other->metadata_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata RunCallableResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ReleaseCallableRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ReleaseCallableRequest::kSessionHandleFieldNumber; const int ReleaseCallableRequest::kHandleFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ReleaseCallableRequest::ReleaseCallableRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ReleaseCallableRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ReleaseCallableRequest) } ReleaseCallableRequest::ReleaseCallableRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ReleaseCallableRequest.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ReleaseCallableRequest) } ReleaseCallableRequest::ReleaseCallableRequest(const ReleaseCallableRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.session_handle().size() > 0) { session_handle_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.session_handle(), GetArenaNoVirtual()); } handle_ = from.handle_; // @@protoc_insertion_point(copy_constructor:tensorflow.ReleaseCallableRequest) } void ReleaseCallableRequest::SharedCtor() { session_handle_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); handle_ = GOOGLE_LONGLONG(0); } ReleaseCallableRequest::~ReleaseCallableRequest() { // @@protoc_insertion_point(destructor:tensorflow.ReleaseCallableRequest) SharedDtor(); } void ReleaseCallableRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); session_handle_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void ReleaseCallableRequest::ArenaDtor(void* object) { ReleaseCallableRequest* _this = reinterpret_cast< ReleaseCallableRequest* >(object); (void)_this; } void ReleaseCallableRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ReleaseCallableRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ReleaseCallableRequest::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ReleaseCallableRequest& ReleaseCallableRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ReleaseCallableRequest.base); return *internal_default_instance(); } void ReleaseCallableRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ReleaseCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; session_handle_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); handle_ = GOOGLE_LONGLONG(0); _internal_metadata_.Clear(); } bool ReleaseCallableRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ReleaseCallableRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string session_handle = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_session_handle())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "tensorflow.ReleaseCallableRequest.session_handle")); } else { goto handle_unusual; } break; } // int64 handle = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &handle_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:tensorflow.ReleaseCallableRequest) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ReleaseCallableRequest) return false; #undef DO_ } void ReleaseCallableRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ReleaseCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ReleaseCallableRequest.session_handle"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->session_handle(), output); } // int64 handle = 2; if (this->handle() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->handle(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ReleaseCallableRequest) } ::google::protobuf::uint8* ReleaseCallableRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ReleaseCallableRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string session_handle = 1; if (this->session_handle().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->session_handle().data(), static_cast<int>(this->session_handle().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tensorflow.ReleaseCallableRequest.session_handle"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->session_handle(), target); } // int64 handle = 2; if (this->handle() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->handle(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ReleaseCallableRequest) return target; } size_t ReleaseCallableRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ReleaseCallableRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string session_handle = 1; if (this->session_handle().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->session_handle()); } // int64 handle = 2; if (this->handle() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->handle()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ReleaseCallableRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ReleaseCallableRequest) GOOGLE_DCHECK_NE(&from, this); const ReleaseCallableRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const ReleaseCallableRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ReleaseCallableRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ReleaseCallableRequest) MergeFrom(*source); } } void ReleaseCallableRequest::MergeFrom(const ReleaseCallableRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ReleaseCallableRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.session_handle().size() > 0) { set_session_handle(from.session_handle()); } if (from.handle() != 0) { set_handle(from.handle()); } } void ReleaseCallableRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ReleaseCallableRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ReleaseCallableRequest::CopyFrom(const ReleaseCallableRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ReleaseCallableRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool ReleaseCallableRequest::IsInitialized() const { return true; } void ReleaseCallableRequest::Swap(ReleaseCallableRequest* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ReleaseCallableRequest* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ReleaseCallableRequest::UnsafeArenaSwap(ReleaseCallableRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ReleaseCallableRequest::InternalSwap(ReleaseCallableRequest* other) { using std::swap; session_handle_.Swap(&other->session_handle_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(handle_, other->handle_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ReleaseCallableRequest::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ReleaseCallableResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ReleaseCallableResponse::ReleaseCallableResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ReleaseCallableResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:tensorflow.ReleaseCallableResponse) } ReleaseCallableResponse::ReleaseCallableResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ReleaseCallableResponse.base); SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tensorflow.ReleaseCallableResponse) } ReleaseCallableResponse::ReleaseCallableResponse(const ReleaseCallableResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tensorflow.ReleaseCallableResponse) } void ReleaseCallableResponse::SharedCtor() { } ReleaseCallableResponse::~ReleaseCallableResponse() { // @@protoc_insertion_point(destructor:tensorflow.ReleaseCallableResponse) SharedDtor(); } void ReleaseCallableResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == NULL); } void ReleaseCallableResponse::ArenaDtor(void* object) { ReleaseCallableResponse* _this = reinterpret_cast< ReleaseCallableResponse* >(object); (void)_this; } void ReleaseCallableResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) { } void ReleaseCallableResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ReleaseCallableResponse::descriptor() { ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ReleaseCallableResponse& ReleaseCallableResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::scc_info_ReleaseCallableResponse.base); return *internal_default_instance(); } void ReleaseCallableResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tensorflow.ReleaseCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _internal_metadata_.Clear(); } bool ReleaseCallableResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:tensorflow.ReleaseCallableResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); } success: // @@protoc_insertion_point(parse_success:tensorflow.ReleaseCallableResponse) return true; failure: // @@protoc_insertion_point(parse_failure:tensorflow.ReleaseCallableResponse) return false; #undef DO_ } void ReleaseCallableResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:tensorflow.ReleaseCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:tensorflow.ReleaseCallableResponse) } ::google::protobuf::uint8* ReleaseCallableResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ReleaseCallableResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ReleaseCallableResponse) return target; } size_t ReleaseCallableResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tensorflow.ReleaseCallableResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ReleaseCallableResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ReleaseCallableResponse) GOOGLE_DCHECK_NE(&from, this); const ReleaseCallableResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const ReleaseCallableResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ReleaseCallableResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ReleaseCallableResponse) MergeFrom(*source); } } void ReleaseCallableResponse::MergeFrom(const ReleaseCallableResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ReleaseCallableResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; } void ReleaseCallableResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ReleaseCallableResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ReleaseCallableResponse::CopyFrom(const ReleaseCallableResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ReleaseCallableResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool ReleaseCallableResponse::IsInitialized() const { return true; } void ReleaseCallableResponse::Swap(ReleaseCallableResponse* other) { if (other == this) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { ReleaseCallableResponse* temp = New(GetArenaNoVirtual()); temp->MergeFrom(*other); other->CopyFrom(*this); InternalSwap(temp); if (GetArenaNoVirtual() == NULL) { delete temp; } } } void ReleaseCallableResponse::UnsafeArenaSwap(ReleaseCallableResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); InternalSwap(other); } void ReleaseCallableResponse::InternalSwap(ReleaseCallableResponse* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ReleaseCallableResponse::GetMetadata() const { protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_tensorflow_2fcore_2fprotobuf_2fmaster_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) } // namespace tensorflow namespace google { namespace protobuf { template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::CreateSessionRequest* Arena::CreateMaybeMessage< ::tensorflow::CreateSessionRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::CreateSessionRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::CreateSessionResponse* Arena::CreateMaybeMessage< ::tensorflow::CreateSessionResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::CreateSessionResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ExtendSessionRequest* Arena::CreateMaybeMessage< ::tensorflow::ExtendSessionRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ExtendSessionRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ExtendSessionResponse* Arena::CreateMaybeMessage< ::tensorflow::ExtendSessionResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ExtendSessionResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::RunStepRequest* Arena::CreateMaybeMessage< ::tensorflow::RunStepRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::RunStepRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::RunStepResponse* Arena::CreateMaybeMessage< ::tensorflow::RunStepResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::RunStepResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::PartialRunSetupRequest* Arena::CreateMaybeMessage< ::tensorflow::PartialRunSetupRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::PartialRunSetupRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::PartialRunSetupResponse* Arena::CreateMaybeMessage< ::tensorflow::PartialRunSetupResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::PartialRunSetupResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::CloseSessionRequest* Arena::CreateMaybeMessage< ::tensorflow::CloseSessionRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::CloseSessionRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::CloseSessionResponse* Arena::CreateMaybeMessage< ::tensorflow::CloseSessionResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::CloseSessionResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ResetRequest* Arena::CreateMaybeMessage< ::tensorflow::ResetRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ResetRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ResetResponse* Arena::CreateMaybeMessage< ::tensorflow::ResetResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ResetResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ListDevicesRequest* Arena::CreateMaybeMessage< ::tensorflow::ListDevicesRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ListDevicesRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ListDevicesResponse* Arena::CreateMaybeMessage< ::tensorflow::ListDevicesResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ListDevicesResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::MakeCallableRequest* Arena::CreateMaybeMessage< ::tensorflow::MakeCallableRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::MakeCallableRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::MakeCallableResponse* Arena::CreateMaybeMessage< ::tensorflow::MakeCallableResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::MakeCallableResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::RunCallableRequest* Arena::CreateMaybeMessage< ::tensorflow::RunCallableRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::RunCallableRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::RunCallableResponse* Arena::CreateMaybeMessage< ::tensorflow::RunCallableResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::RunCallableResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ReleaseCallableRequest* Arena::CreateMaybeMessage< ::tensorflow::ReleaseCallableRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ReleaseCallableRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::tensorflow::ReleaseCallableResponse* Arena::CreateMaybeMessage< ::tensorflow::ReleaseCallableResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tensorflow::ReleaseCallableResponse >(arena); } } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope)
41.005627
168
0.735844
federicohyo
c02e30647955a28a986d8728c554976aa9489f2b
7,925
cpp
C++
LhaForge/ArchiverCode/ArchiverJACK.cpp
jarupxx/lhaforge
e6f9136eeabf9c00884c93b821ee330ac00ef35d
[ "MIT" ]
18
2015-04-21T13:38:16.000Z
2022-01-15T14:50:49.000Z
LhaForge/ArchiverCode/ArchiverJACK.cpp
jarupxx/lhaforge
e6f9136eeabf9c00884c93b821ee330ac00ef35d
[ "MIT" ]
36
2019-08-24T14:29:44.000Z
2022-03-03T14:14:19.000Z
LhaForge/ArchiverCode/ArchiverJACK.cpp
jarupxx/lhaforge
e6f9136eeabf9c00884c93b821ee330ac00ef35d
[ "MIT" ]
5
2019-02-25T12:33:04.000Z
2022-01-03T09:23:41.000Z
/* * MIT License * Copyright (c) 2005- Claybird * 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 "stdafx.h" #include "ArchiverJACK.h" #include "../resource.h" #include "../ConfigCode/ConfigExtract.h" #include "../ConfigCode/ConfigJACK.h" #include "../Dialogs/JackVolumeSizeDlg.h" #include "../Utilities/OSUtil.h" CArchiverJACK::CArchiverJACK() { m_nRequiredVersion=20; m_strDllName=_T("Jack32.dll"); m_AstrPrefix="Jack"; m_LoadLevel=LOAD_DLL_MINIMUM; } CArchiverJACK::~CArchiverJACK() { FreeDLL(); } /* formatの指定は、B2E32.dllでのみ有効 levelの指定は、B2E32.dll以外で有効 */ bool CArchiverJACK::Compress(LPCTSTR ArcFileName,std::list<CString> &ParamList,CConfigManager &ConfMan,const PARAMETER_TYPE Type,int Options,LPCTSTR lpszFormat,LPCTSTR,LPCTSTR,CString &strLog) { LPCTSTR lpszSplitSize = lpszFormat; if(!IsOK()){ return false; } //ArcFileNameは出力先フォルダ名 ASSERT(0!=_tcslen(ArcFileName)); TRACE(_T("ArcFileName=%s\n"),ArcFileName); //=========================== // DLLに渡すオプションの設定 //=========================== TRACE(_T("DLLに渡すオプションの設定\n")); CString Param;//コマンドライン パラメータ バッファ CConfigJACK Config; Config.load(ConfMan); Param+=_T("-r "); //分割 if(Options&COMPRESS_SFX){ Param+=_T("-m1 "); //SFX } else{ Param+=_T("-m0 "); //通常 } if(lpszSplitSize && _tcslen(lpszSplitSize)>0){ CString Buf; Buf.Format(_T("-v:%s "),lpszSplitSize); Param+=Buf;//分割サイズ指定 }else if(Config.SpecifyVolumeSizeAtCompress){ CJackVolumeSizeDialog vsd; if(IDOK!=vsd.DoModal()){ return false; } CString Buf; Buf.Format(_T("-v:%d "),vsd.VolumeSize); Param+=Buf;//分割サイズ指定 }else{ CString Buf; Buf.Format(_T("-v:%d "),Config.VolumeSize); Param+=Buf;//分割サイズ指定 } //分割対象ファイル名指定 Param+=_T("\""); Param+=*ParamList.begin(); Param+=_T("\" "); //出力フォルダ指定 Param+=_T("\""); Param+=ArcFileName; Param+=_T("\""); ASSERT(!Param.IsEmpty()); TRACE(_T("ArchiveHandler Commandline Parameter:%s\n"),Param); TRACE(_T("ArchiveHandler呼び出し\n")); //char szLog[LOG_BUFFER_SIZE]={0}; std::vector<char> szLog(LOG_BUFFER_SIZE); szLog[0]='\0'; int Ret=ArchiveHandler(NULL,CT2A(Param),&szLog[0],LOG_BUFFER_SIZE-1); strLog=&szLog[0]; return 0==Ret; } bool CArchiverJACK::Extract(LPCTSTR ArcFileName,CConfigManager&,const CConfigExtract &Config,bool bSafeArchive,LPCTSTR OutputDir,CString &strLog) { if(!IsOK()){ return false; } if(!bSafeArchive){ strLog.Format(IDS_ERROR_DANGEROUS_ARCHIVE,ArcFileName); return false; } //出力先移動 CCurrentDirManager currentDir(OutputDir); //=========================== // DLLに渡すオプションの設定 //=========================== TRACE(_T("DLLに渡すオプションの設定\n")); if(!Config.ForceOverwrite){//上書き確認する CString strFileName; //ファイルを読んで格納ファイル名を取得 if(!GetContainedFileName(ArcFileName,strFileName)){ //不正なファイル:CheckArchive()で弾かれていると期待できる return false; } //-------------- // 存在チェック //-------------- strFileName.Insert(0,OutputDir); if(PathFileExists(strFileName)){ CString msg; msg.Format(IDS_CONFIRM_OVERWRITE_MESSAGE_SIMPLE,strFileName); if(IDYES!=MessageBox(NULL,msg,CString(MAKEINTRESOURCE(IDS_MESSAGE_CAPTION)),MB_YESNO|MB_ICONQUESTION)){ return false; } } } CString Param;//コマンドライン パラメータ バッファ //結合パラメータ Param+=_T("-c "); //結合 //アーカイブファイル名指定 Param+=_T("\""); Param+=ArcFileName; Param+=_T("\" "); //出力先指定 Param+=_T("\""); Param+=_T(".\\");//OutputDir; Param+=_T("\""); ASSERT(!Param.IsEmpty()); TRACE(_T("ArchiveHandler Commandline Parameter:%s\n"),Param); TRACE(_T("ArchiveHandler呼び出し\n")); //char szLog[LOG_BUFFER_SIZE]={0}; std::vector<char> szLog(LOG_BUFFER_SIZE); szLog[0]='\0'; int Ret=ArchiveHandler(NULL,CT2A(Param),&szLog[0],LOG_BUFFER_SIZE-1); strLog=&szLog[0]; return 0==Ret; } bool CArchiverJACK::ExtractSpecifiedOnly(LPCTSTR ArcFileName,CConfigManager&,LPCTSTR OutputDir,std::list<CString>&,CString &,bool bUsePath) { return false; } //========================================================= // DTVの可能性のあるファイルかどうか直接確認する //========================================================= bool CArchiverJACK::ExamineArchive(LPCTSTR ArcFileName,CConfigManager& ConfMan,bool,bool &bInFolder,bool &bSafeArchive,CString &BaseDir,CString &strErr) { bInFolder=false; bSafeArchive=false; CString strFileName; //ファイルを読んで格納ファイル名を取得 if(!GetContainedFileName(ArcFileName,strFileName))return false; if(-1==strFileName.FindOneOf(_T(":\\/"))){//パス指定の文字が含まれていないので安全 bSafeArchive=true; } /* このコードでは解凍するファイル、一つしかファイル内容を確認していない。 これでも問題がない理由は、JACK32.dllは展開時に出力ファイル名の一貫性をチェックしている模様だからである。 [流れ] ・n-1番目までのファイルには細工がされていない ・n番目のファイルも細工されていない →正常解凍、n++ ・n番目のファイルが細工されている ・n-1番目までのファイルをLhaForgeに与えた →安全だとして解凍を始めたものの、JAKの同一性チェックにかかる ・n番目のファイルをLhaForgeに与えた →LhaForgeのDTVチェックにかかる [注意点] 現在のコードでは、上書き確認機能を使うとき、同じJAKファイルを2回読むことになる。 効率を求めるなら、ここのコードを無効化して、Extract()内部で安全かどうかチェックするようにすればよい。 いまのところは、効率よりも見通しの良さを優先している。 */ return true; } //ヘッダ検索 // Original:JakTool.cpp/XacRett #49/(C)k.inaba int CArchiverJACK::FindHeader(const BYTE* hdr,DWORD size) { static const char Magic[]="This_Is_Jack_File"; if(size<sizeof_JakHeader) return -1; if(0==strcmp((char*)hdr,Magic)){ if(sizeof_JakHeader+((JakHeader*)hdr)->FileNameLen<size) return 0; } else if(hdr[0]=='M' && hdr[1]=='Z') //自己解凍 { DWORD prev = 0xffffffff; for( DWORD i=0; i<size-sizeof_JakHeader; i++ ) { if( hdr[i]!='T' )continue; if( hdr[i+1]!='h' )continue; if( hdr[(++i)+1]!='i' )continue; if( hdr[(++i)+1]!='s' )continue; if( hdr[(++i)+1]!='_' )continue; if( 0!=strcmp((char*)hdr+(++i)+1,Magic+5) )continue; // スタブ内の文字列に引っかかることがあるので、 // 二個"This_Is_..."があるときは一個Skip if( prev==0xffffffff ) prev = (i-4); else return (i-4); } if(prev!=0xffffffff) return prev; } return -1; } bool CArchiverJACK::GetContainedFileName(LPCTSTR ArcFileName,CString &strFileName) { strFileName.Empty(); //ファイル内容バッファ std::vector<BYTE> Buffer; //ファイルオープン HANDLE hFile=CreateFile(ArcFileName,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); if(INVALID_HANDLE_VALUE==hFile)return false; DWORD dwSize=GetFileSize(hFile,NULL); //4GBより大きなファイルサイズは取得できないが、現実的にはそのような大きなファイルは扱わない(JACKは分割用) Buffer.resize(dwSize); DWORD dwRead=0; if(dwSize<0){ CloseHandle(hFile); return false; } //読み取り ReadFile(hFile,&Buffer[0],dwSize,&dwRead,NULL); CloseHandle(hFile); //ヘッダ検索 int iPos=FindHeader(&Buffer[0],dwRead); if(-1==iPos){ //Not Found return false; } JakHeader* lpHeader=(JakHeader*)&Buffer[iPos]; for(unsigned int i=0;i<lpHeader->FileNameLen;i++){ strFileName+=Buffer[iPos+sizeof_JakHeader+i]; } return true; }
25.814332
193
0.66776
jarupxx
c0334d6a44d6b3e0e5406a506374fc206f079e10
1,708
cc
C++
trader-desk/date-range-scale.cc
HitHub1991/-dmbcs-trader-desk
365ad5a560564220398ba8ab4b900eb1ca26c8cd
[ "FSFAP" ]
6
2020-03-23T12:32:32.000Z
2022-01-02T22:17:12.000Z
trader-desk/date-range-scale.cc
HitHub1991/-dmbcs-trader-desk
365ad5a560564220398ba8ab4b900eb1ca26c8cd
[ "FSFAP" ]
null
null
null
trader-desk/date-range-scale.cc
HitHub1991/-dmbcs-trader-desk
365ad5a560564220398ba8ab4b900eb1ca26c8cd
[ "FSFAP" ]
1
2022-02-27T19:07:50.000Z
2022-02-27T19:07:50.000Z
/* * Copyright (c) 2017, 2020 Dale Mellor * * This file is part of the trader-desk package. * * The trader-desk package is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * The trader-desk package is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */ #include <trader-desk/date-range-scale.h> namespace DMBCS::Trader_Desk { Date_Range_Scale::Date_Range_Scale (Chart_Data &d, Preferences& P) : Exponential_Scale (d, pgettext ("Label", "Date range = %.0f days"), Gdk::RGBA {"#0000ff"}, Gdk::RGBA {"#aaaaff"}, Gdk::RGBA {"#6666ff"}, 1, 6 * 30, P.time_horizon * 365, 50 /* Initial setting. */), db {P} { d . changed_signal . connect ([this] { on_data_changed (); }); value_adjustment -> signal_value_changed () . connect ([this] { on_value_changed (); }); } void Date_Range_Scale::on_value_changed () { db.check_connection (); data.timeseries__change_span (db, chrono::hours {24} * int (value ()->get_value ())); } } /* End of namespace DMBCS::Trader_Desk. */
32.226415
74
0.61534
HitHub1991
c033640eae500790ad0d1bdfdfa73963d1983750
33,992
cxx
C++
MITK/Plugins/uk.ac.ucl.cmic.dnddisplay/src/niftkSingleViewerEditor.cxx
NifTK/NifTK
2358b333c89ff1bba1c232eecbbcdc8003305dfe
[ "BSD-3-Clause" ]
13
2018-07-28T13:36:38.000Z
2021-11-01T19:17:39.000Z
MITK/Plugins/uk.ac.ucl.cmic.dnddisplay/src/niftkSingleViewerEditor.cxx
NifTK/NifTK
2358b333c89ff1bba1c232eecbbcdc8003305dfe
[ "BSD-3-Clause" ]
null
null
null
MITK/Plugins/uk.ac.ucl.cmic.dnddisplay/src/niftkSingleViewerEditor.cxx
NifTK/NifTK
2358b333c89ff1bba1c232eecbbcdc8003305dfe
[ "BSD-3-Clause" ]
10
2018-08-20T07:06:00.000Z
2021-07-07T07:55:27.000Z
/*============================================================================= NifTK: A software platform for medical image computing. Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt in the top level directory for details. =============================================================================*/ #include "niftkSingleViewerEditor.h" #include <berryUIException.h> #include <berryIWorkbenchPage.h> #include <berryIPreferencesService.h> #include <berryPlatform.h> #include <QGridLayout> #include <QToolButton> #include <mitkFocusManager.h> #include <mitkGlobalInteraction.h> #include <mitkIDataStorageService.h> #include <mitkNodePredicateNot.h> #include <mitkNodePredicateProperty.h> #include <niftkSingleViewerWidget.h> #include <niftkMultiViewerVisibilityManager.h> #include "niftkDnDDisplayPreferencePage.h" #include <ctkPopupWidget.h> #include <niftkSingleViewerControls.h> namespace niftk { const QString SingleViewerEditor::EDITOR_ID = "org.mitk.editors.dnddisplay"; class SingleViewerEditorPrivate { public: SingleViewerEditorPrivate(); ~SingleViewerEditorPrivate(); SingleViewerWidget* m_SingleViewer; MultiViewerVisibilityManager::Pointer m_VisibilityManager; mitk::RenderingManager::Pointer m_RenderingManager; QScopedPointer<berry::IPartListener> m_PartListener; mitk::IRenderingManager* m_RenderingManagerInterface; bool m_ShowCursor; double m_Magnification; unsigned long m_FocusManagerObserverTag; // Layouts QGridLayout* m_TopLevelLayout; QGridLayout* m_LayoutForRenderWindows; // Widgets QToolButton* m_PinButton; ctkPopupWidget* m_PopupWidget; SingleViewerControls* m_ControlPanel; }; //----------------------------------------------------------------------------- struct SingleViewerEditorPartListener : public berry::IPartListener { berryObjectMacro(SingleViewerEditorPartListener) //----------------------------------------------------------------------------- SingleViewerEditorPartListener(SingleViewerEditorPrivate* dd) : d(dd) {} //----------------------------------------------------------------------------- Events::Types GetPartEventTypes() const override { return Events::CLOSED | Events::HIDDEN | Events::VISIBLE; } //----------------------------------------------------------------------------- void PartClosed(const berry::IWorkbenchPartReference::Pointer& partRef) override { if (partRef->GetId() == SingleViewerEditor::EDITOR_ID) { SingleViewerEditor::Pointer dndDisplayEditor = partRef->GetPart(false).Cast<SingleViewerEditor>(); if (dndDisplayEditor.IsNotNull() && dndDisplayEditor->GetSingleViewer() == d->m_SingleViewer) { d->m_SingleViewer->SetLinkedNavigationEnabled(false); } } } //----------------------------------------------------------------------------- void PartHidden(const berry::IWorkbenchPartReference::Pointer& partRef) override { if (partRef->GetId() == SingleViewerEditor::EDITOR_ID) { SingleViewerEditor::Pointer dndDisplayEditor = partRef->GetPart(false).Cast<SingleViewerEditor>(); if (dndDisplayEditor.IsNotNull() && dndDisplayEditor->GetSingleViewer() == d->m_SingleViewer) { d->m_SingleViewer->SetLinkedNavigationEnabled(false); } } } //----------------------------------------------------------------------------- void PartVisible(const berry::IWorkbenchPartReference::Pointer& partRef) override { if (partRef->GetId() == SingleViewerEditor::EDITOR_ID) { SingleViewerEditor::Pointer dndDisplayEditor = partRef->GetPart(false).Cast<SingleViewerEditor>(); if (dndDisplayEditor.IsNotNull() && dndDisplayEditor->GetSingleViewer() == d->m_SingleViewer) { d->m_SingleViewer->SetLinkedNavigationEnabled(true); } } } private: SingleViewerEditorPrivate* const d; }; //----------------------------------------------------------------------------- SingleViewerEditorPrivate::SingleViewerEditorPrivate() : m_SingleViewer(0) , m_VisibilityManager(0) , m_RenderingManager(0) , m_PartListener(new SingleViewerEditorPartListener(this)) , m_RenderingManagerInterface(0) , m_ShowCursor(true) , m_Magnification(0.0) , m_FocusManagerObserverTag(0) , m_TopLevelLayout(0) , m_LayoutForRenderWindows(0) , m_PinButton(0) , m_PopupWidget(0) , m_ControlPanel(0) { m_RenderingManager = mitk::RenderingManager::GetInstance(); m_RenderingManager->SetConstrainedPaddingZooming(false); m_RenderingManagerInterface = mitk::MakeRenderingManagerInterface(m_RenderingManager); } //----------------------------------------------------------------------------- SingleViewerEditorPrivate::~SingleViewerEditorPrivate() { if (m_RenderingManagerInterface != NULL) { delete m_RenderingManagerInterface; } } //----------------------------------------------------------------------------- SingleViewerEditor::SingleViewerEditor() : d(new SingleViewerEditorPrivate) { } //----------------------------------------------------------------------------- SingleViewerEditor::~SingleViewerEditor() { this->GetSite()->GetPage()->RemovePartListener(d->m_PartListener.data()); // Deregister focus observer. mitk::FocusManager* focusManager = mitk::GlobalInteraction::GetInstance()->GetFocusManager(); focusManager->RemoveObserver(d->m_FocusManagerObserverTag); } //----------------------------------------------------------------------------- void SingleViewerEditor::CreateQtPartControl(QWidget* parent) { if (d->m_SingleViewer == NULL) { parent->setFocusPolicy(Qt::StrongFocus); /************************************ * Create stuff. ************************************/ d->m_TopLevelLayout = new QGridLayout(parent); d->m_TopLevelLayout->setObjectName(QString::fromUtf8("SingleViewerEditor::m_TopLevelLayout")); d->m_TopLevelLayout->setContentsMargins(0, 0, 0, 0); d->m_TopLevelLayout->setSpacing(0); d->m_LayoutForRenderWindows = new QGridLayout(); d->m_LayoutForRenderWindows->setObjectName(QString::fromUtf8("SingleViewerEditor::m_LayoutForRenderWindows")); d->m_LayoutForRenderWindows->setContentsMargins(0, 0, 0, 0); d->m_LayoutForRenderWindows->setSpacing(0); QWidget* pinButtonWidget = new QWidget(parent); pinButtonWidget->setContentsMargins(0, 0, 0, 0); QVBoxLayout* pinButtonWidgetLayout = new QVBoxLayout(pinButtonWidget); pinButtonWidgetLayout->setContentsMargins(0, 0, 0, 0); pinButtonWidgetLayout->setSpacing(0); pinButtonWidget->setLayout(pinButtonWidgetLayout); d->m_PopupWidget = new ctkPopupWidget(pinButtonWidget); d->m_PopupWidget->setOrientation(Qt::Vertical); d->m_PopupWidget->setAnimationEffect(ctkBasePopupWidget::ScrollEffect); d->m_PopupWidget->setHorizontalDirection(Qt::LeftToRight); d->m_PopupWidget->setVerticalDirection(ctkBasePopupWidget::TopToBottom); d->m_PopupWidget->setAutoShow(true); d->m_PopupWidget->setAutoHide(true); d->m_PopupWidget->setEffectDuration(100); d->m_PopupWidget->setContentsMargins(5, 5, 5, 1); d->m_PopupWidget->setLineWidth(0); #ifdef __APPLE__ QPalette popupPalette = parent->palette(); QColor windowColor = popupPalette.color(QPalette::Window); windowColor.setAlpha(64); popupPalette.setColor(QPalette::Window, windowColor); d->m_PopupWidget->setPalette(popupPalette); #else QPalette popupPalette = parent->palette(); QColor windowColor = popupPalette.color(QPalette::Window); windowColor.setAlpha(128); popupPalette.setColor(QPalette::Window, windowColor); d->m_PopupWidget->setPalette(popupPalette); d->m_PopupWidget->setAttribute(Qt::WA_TranslucentBackground, true); #endif int buttonRowHeight = 15; d->m_PinButton = new QToolButton(parent); d->m_PinButton->setContentsMargins(0, 0, 0, 0); d->m_PinButton->setCheckable(true); d->m_PinButton->setAutoRaise(true); d->m_PinButton->setFixedHeight(16); QSizePolicy pinButtonSizePolicy; pinButtonSizePolicy.setHorizontalPolicy(QSizePolicy::Expanding); d->m_PinButton->setSizePolicy(pinButtonSizePolicy); // These two lines ensure that the icon appears on the left on each platform. d->m_PinButton->setText(" "); d->m_PinButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QIcon pinButtonIcon; pinButtonIcon.addFile(":Icons/PushPinIn.png", QSize(), QIcon::Normal, QIcon::On); pinButtonIcon.addFile(":Icons/PushPinOut.png", QSize(), QIcon::Normal, QIcon::Off); d->m_PinButton->setIcon(pinButtonIcon); this->connect(d->m_PinButton, SIGNAL(toggled(bool)), SLOT(OnPinButtonToggled(bool))); d->m_PinButton->installEventFilter(this); d->m_ControlPanel = this->CreateControlPanel(d->m_PopupWidget); pinButtonWidgetLayout->addWidget(d->m_PinButton); d->m_TopLevelLayout->addWidget(pinButtonWidget, 0, 0); d->m_TopLevelLayout->setRowMinimumHeight(0, buttonRowHeight); d->m_TopLevelLayout->addLayout(d->m_LayoutForRenderWindows, 1, 0); d->m_LayoutForRenderWindows = new QGridLayout(); d->m_LayoutForRenderWindows->setObjectName(QString::fromUtf8("SingleViewerEditor::m_LayoutForRenderWindows")); d->m_LayoutForRenderWindows->setContentsMargins(0, 0, 0, 0); d->m_LayoutForRenderWindows->setVerticalSpacing(0); d->m_LayoutForRenderWindows->setHorizontalSpacing(0); d->m_TopLevelLayout->addLayout(d->m_LayoutForRenderWindows, 1, 0); mitk::DataStorage::Pointer dataStorage = this->GetDataStorage(); assert(dataStorage); berry::IPreferencesService* prefService = berry::Platform::GetPreferencesService(); berry::IBerryPreferences::Pointer prefs = prefService->GetSystemPreferences()->Node(EDITOR_ID).Cast<berry::IBerryPreferences>(); assert( prefs ); DnDDisplayInterpolationType defaultInterpolationType = (DnDDisplayInterpolationType)(prefs->GetInt(DnDDisplayPreferencePage::DNDDISPLAY_DEFAULT_INTERPOLATION_TYPE, 2)); WindowLayout defaultLayout = (WindowLayout)(prefs->GetInt(DnDDisplayPreferencePage::DNDDISPLAY_DEFAULT_WINDOW_LAYOUT, 2)); // default = coronal QString backgroundColourName = prefs->Get(DnDDisplayPreferencePage::DNDDISPLAY_BACKGROUND_COLOUR, "black"); QColor backgroundColour(backgroundColourName); bool showDirectionAnnotations = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_DIRECTION_ANNOTATIONS, true); bool showIntensityAnnotation = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_INTENSITY_ANNOTATION, true); bool showShowingOptions = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_SHOWING_OPTIONS, true); bool showWindowLayoutControls = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_WINDOW_LAYOUT_CONTROLS, true); bool showMagnificationSlider = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_MAGNIFICATION_SLIDER, true); bool show2DCursors = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_2D_CURSORS, true); bool rememberSettingsPerLayout = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_REMEMBER_VIEWER_SETTINGS_PER_WINDOW_LAYOUT, true); bool sliceIndexTracking = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SLICE_SELECT_TRACKING, true); bool magnificationTracking = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_MAGNIFICATION_SELECT_TRACKING, true); bool timeStepTracking = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_TIME_SELECT_TRACKING, true); d->m_VisibilityManager = MultiViewerVisibilityManager::New(dataStorage); d->m_VisibilityManager->SetInterpolationType(defaultInterpolationType); d->m_VisibilityManager->SetDefaultWindowLayout(defaultLayout); d->m_VisibilityManager->SetDropType(DNDDISPLAY_DROP_SINGLE); d->m_RenderingManager->SetDataStorage(dataStorage); d->m_ShowCursor = show2DCursors; // Create the SingleViewerWidget d->m_SingleViewer = new SingleViewerWidget(parent, d->m_RenderingManager); // Setup GUI a bit more. d->m_SingleViewer->SetBackgroundColour(backgroundColour); d->m_SingleViewer->SetDisplayInteractionsEnabled(true); d->m_SingleViewer->SetCursorPositionBinding(true); d->m_SingleViewer->SetScaleFactorBinding(true); d->m_ControlPanel->SetShowOptionsVisible(showShowingOptions); d->m_ControlPanel->SetWindowLayoutControlsVisible(showWindowLayoutControls); // d->m_SingleViewer->SetCursorDefaultVisibility(show2DCursors); d->m_SingleViewer->SetDirectionAnnotationsVisible(showDirectionAnnotations); d->m_ControlPanel->SetDirectionAnnotationsVisible(showDirectionAnnotations); d->m_SingleViewer->SetIntensityAnnotationVisible(showIntensityAnnotation); d->m_ControlPanel->SetIntensityAnnotationVisible(showIntensityAnnotation); d->m_ControlPanel->SetMagnificationControlsVisible(showMagnificationSlider); d->m_SingleViewer->SetRememberSettingsPerWindowLayout(rememberSettingsPerLayout); d->m_ControlPanel->SetSliceTracking(sliceIndexTracking); d->m_ControlPanel->SetTimeStepTracking(timeStepTracking); d->m_ControlPanel->SetMagnificationTracking(magnificationTracking); d->m_VisibilityManager->SetDefaultWindowLayout(defaultLayout); // d->m_SingleViewer->SetDefaultSingleWindowLayout(singleWindowLayout); // d->m_SingleViewer->SetDefaultMultiWindowLayout(multiWindowLayout); d->m_VisibilityManager->RegisterViewer(d->m_SingleViewer); this->GetSite()->GetPage()->AddPartListener(d->m_PartListener.data()); d->m_LayoutForRenderWindows->addWidget(d->m_SingleViewer, 0, 0); prefs->OnChanged.AddListener( berry::MessageDelegate1<SingleViewerEditor, const berry::IBerryPreferences*>( this, &SingleViewerEditor::OnPreferencesChanged ) ); this->OnPreferencesChanged(prefs.GetPointer()); // Connect Qt Signals to make it all hang together. this->connect(d->m_SingleViewer, SIGNAL(TimeGeometryChanged(const mitk::TimeGeometry*)), SLOT(OnTimeGeometryChanged(const mitk::TimeGeometry*))); this->connect(d->m_SingleViewer, SIGNAL(SelectedPositionChanged(const mitk::Point3D&)), SLOT(OnSelectedPositionChanged(const mitk::Point3D&))); this->connect(d->m_SingleViewer, SIGNAL(TimeStepChanged(int)), SLOT(OnTimeStepChanged(int))); this->connect(d->m_SingleViewer, SIGNAL(ScaleFactorChanged(WindowOrientation, double)), SLOT(OnScaleFactorChanged(WindowOrientation, double))); this->connect(d->m_SingleViewer, SIGNAL(WindowLayoutChanged(WindowLayout)), SLOT(OnWindowLayoutChanged(WindowLayout))); this->connect(d->m_SingleViewer, SIGNAL(CursorVisibilityChanged(bool)), SLOT(OnCursorVisibilityChanged(bool))); this->connect(d->m_SingleViewer, SIGNAL(DirectionAnnotationsVisibilityChanged(bool)), SLOT(OnDirectionAnnotationsVisibilityChanged(bool))); this->connect(d->m_SingleViewer, SIGNAL(IntensityAnnotationVisibilityChanged(bool)), SLOT(OnIntensityAnnotationVisibilityChanged(bool))); this->connect(d->m_ControlPanel, SIGNAL(SelectedSliceChanged(int)), SLOT(OnSelectedSliceControlChanged(int))); this->connect(d->m_ControlPanel, SIGNAL(TimeStepChanged(int)), SLOT(OnTimeStepControlChanged(int))); this->connect(d->m_ControlPanel, SIGNAL(MagnificationChanged(double)), SLOT(OnMagnificationControlChanged(double))); this->connect(d->m_ControlPanel, SIGNAL(ShowCursorChanged(bool)), SLOT(OnCursorVisibilityControlChanged(bool))); this->connect(d->m_ControlPanel, SIGNAL(ShowDirectionAnnotationsChanged(bool)), SLOT(OnShowDirectionAnnotationsControlChanged(bool))); this->connect(d->m_ControlPanel, SIGNAL(ShowIntensityAnnotationChanged(bool)), SLOT(OnShowIntensityAnnotationControlChanged(bool))); this->connect(d->m_ControlPanel, SIGNAL(WindowLayoutChanged(WindowLayout)), SLOT(OnWindowLayoutControlChanged(WindowLayout))); this->connect(d->m_ControlPanel, SIGNAL(WindowCursorBindingChanged(bool)), SLOT(OnWindowCursorBindingControlChanged(bool))); this->connect(d->m_ControlPanel, SIGNAL(WindowMagnificationBindingChanged(bool)), SLOT(OnWindowScaleFactorBindingControlChanged(bool))); this->connect(d->m_PopupWidget, SIGNAL(popupOpened(bool)), SLOT(OnPopupOpened(bool))); // Register focus observer. itk::SimpleMemberCommand<SingleViewerEditor>::Pointer onFocusChangedCommand = itk::SimpleMemberCommand<SingleViewerEditor>::New(); onFocusChangedCommand->SetCallbackFunction(this, &SingleViewerEditor::OnFocusChanged); mitk::FocusManager* focusManager = mitk::GlobalInteraction::GetInstance()->GetFocusManager(); d->m_FocusManagerObserverTag = focusManager->AddObserver(mitk::FocusEvent(), onFocusChangedCommand); } } //----------------------------------------------------------------------------- SingleViewerControls* SingleViewerEditor::CreateControlPanel(QWidget* parent) { SingleViewerControls* controlPanel = new SingleViewerControls(parent); controlPanel->SetWindowCursorsBound(true); controlPanel->SetWindowMagnificationsBound(true); return controlPanel; } //----------------------------------------------------------------------------- SingleViewerWidget* SingleViewerEditor::GetSingleViewer() { return d->m_SingleViewer; } //----------------------------------------------------------------------------- void SingleViewerEditor::SetFocus() { if (d->m_SingleViewer != 0) { d->m_SingleViewer->SetFocused(); } } //----------------------------------------------------------------------------- void SingleViewerEditor::OnTimeGeometryChanged(const mitk::TimeGeometry* timeGeometry) { Q_UNUSED(timeGeometry); d->m_ControlPanel->SetCursorVisible(d->m_ShowCursor); d->m_SingleViewer->SetCursorVisible(d->m_ShowCursor); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnPreferencesChanged( const berry::IBerryPreferences* prefs ) { if (d->m_SingleViewer != NULL) { QString backgroundColourName = prefs->Get(DnDDisplayPreferencePage::DNDDISPLAY_BACKGROUND_COLOUR, "black"); QColor backgroundColour(backgroundColourName); d->m_SingleViewer->SetBackgroundColour(backgroundColour); d->m_VisibilityManager->SetInterpolationType((DnDDisplayInterpolationType)(prefs->GetInt(DnDDisplayPreferencePage::DNDDISPLAY_DEFAULT_INTERPOLATION_TYPE, 2))); d->m_VisibilityManager->SetDefaultWindowLayout((WindowLayout)(prefs->GetInt(DnDDisplayPreferencePage::DNDDISPLAY_DEFAULT_WINDOW_LAYOUT, 2))); // default coronal d->m_ControlPanel->SetShowOptionsVisible(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_SHOWING_OPTIONS, true)); d->m_ControlPanel->SetWindowLayoutControlsVisible(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_WINDOW_LAYOUT_CONTROLS, true)); d->m_ControlPanel->SetMagnificationControlsVisible(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_MAGNIFICATION_SLIDER, true)); d->m_ShowCursor = prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_2D_CURSORS, true); d->m_SingleViewer->SetDirectionAnnotationsVisible(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_DIRECTION_ANNOTATIONS, true)); d->m_SingleViewer->SetIntensityAnnotationVisible(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SHOW_INTENSITY_ANNOTATION, true)); d->m_SingleViewer->SetRememberSettingsPerWindowLayout(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_REMEMBER_VIEWER_SETTINGS_PER_WINDOW_LAYOUT, true)); d->m_ControlPanel->SetSliceTracking(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_SLICE_SELECT_TRACKING, true)); d->m_ControlPanel->SetTimeStepTracking(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_TIME_SELECT_TRACKING, true)); d->m_ControlPanel->SetMagnificationTracking(prefs->GetBool(DnDDisplayPreferencePage::DNDDISPLAY_MAGNIFICATION_SELECT_TRACKING, true)); } } //----------------------------------------------------------------------------- // ------------------- mitk::IRenderWindowPart ------------------------------ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- QmitkRenderWindow *SingleViewerEditor::GetActiveQmitkRenderWindow() const { QmitkRenderWindow* activeRenderWindow = d->m_SingleViewer->GetSelectedRenderWindow(); if (!activeRenderWindow) { activeRenderWindow = d->m_SingleViewer->GetVisibleRenderWindows()[0]; } return activeRenderWindow; } //----------------------------------------------------------------------------- QHash<QString, QmitkRenderWindow *> SingleViewerEditor::GetQmitkRenderWindows() const { // NOTE: This MUST always return a non-empty map. QHash<QString, QmitkRenderWindow*> renderWindows; // See org.mitk.gui.qt.imagenavigator plugin. // // The assumption is that a QmitkStdMultiWidget has windows called // axial, sagittal, coronal, 3d. // // So, if we take the currently selected widget, and name these render windows // accordingly, then the MITK imagenavigator can be used to update it. renderWindows.insert("axial", d->m_SingleViewer->GetAxialWindow()); renderWindows.insert("sagittal", d->m_SingleViewer->GetSagittalWindow()); renderWindows.insert("coronal", d->m_SingleViewer->GetCoronalWindow()); renderWindows.insert("3d", d->m_SingleViewer->Get3DWindow()); return renderWindows; } //----------------------------------------------------------------------------- QmitkRenderWindow *SingleViewerEditor::GetQmitkRenderWindow(const QString& id) const { return this->GetQmitkRenderWindows()[id]; } //----------------------------------------------------------------------------- void SingleViewerEditor::OnFocusChanged() { mitk::BaseRenderer* focusedRenderer = mitk::GlobalInteraction::GetInstance()->GetFocus(); if (d->m_SingleViewer->GetSelectedRenderWindow()->GetRenderer() != focusedRenderer) { return; } WindowOrientation orientation = d->m_SingleViewer->GetOrientation(); if (orientation != WINDOW_ORIENTATION_UNKNOWN) { bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); int maxSlice = d->m_SingleViewer->GetMaxSlice(orientation); int selectedSlice = d->m_SingleViewer->GetSelectedSlice(orientation); d->m_ControlPanel->SetMaxSlice(maxSlice); d->m_ControlPanel->SetSelectedSlice(selectedSlice); d->m_ControlPanel->SetMagnificationControlsEnabled(true); double minMagnification = std::ceil(d->m_SingleViewer->GetMinMagnification()); double maxMagnification = std::floor(d->m_SingleViewer->GetMaxMagnification()); double magnification = d->m_SingleViewer->GetMagnification(orientation); d->m_ControlPanel->SetMinMagnification(minMagnification); d->m_ControlPanel->SetMaxMagnification(maxMagnification); d->m_ControlPanel->SetMagnification(magnification); d->m_ControlPanel->blockSignals(signalsWereBlocked); } else { d->m_ControlPanel->SetMagnificationControlsEnabled(false); } WindowLayout windowLayout = d->m_SingleViewer->GetWindowLayout(); if (windowLayout != WINDOW_LAYOUT_UNKNOWN) { bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); d->m_ControlPanel->SetWindowLayout(windowLayout); d->m_ControlPanel->blockSignals(signalsWereBlocked); } } //----------------------------------------------------------------------------- mitk::Point3D SingleViewerEditor::GetSelectedPosition(const QString& id) const { if (id.isNull() || this->GetQmitkRenderWindow(id)) { return d->m_SingleViewer->GetSelectedPosition(); } mitk::Point3D fallBackValue; fallBackValue.Fill(0.0); return fallBackValue; } //----------------------------------------------------------------------------- void SingleViewerEditor::SetSelectedPosition(const mitk::Point3D& position, const QString& id) { if (id.isNull() || this->GetQmitkRenderWindow(id)) { d->m_SingleViewer->SetSelectedPosition(position); } } //----------------------------------------------------------------------------- void SingleViewerEditor::EnableDecorations(bool enable, const QStringList &decorations) { // Deliberately do nothing. ToDo - maybe get SingleViewerWidget to support it. } //----------------------------------------------------------------------------- bool SingleViewerEditor::IsDecorationEnabled(const QString &decoration) const { // Deliberately deny having any decorations. ToDo - maybe get SingleViewerWidget to support it. return false; } //----------------------------------------------------------------------------- QStringList SingleViewerEditor::GetDecorations() const { // Deliberately return nothing. ToDo - maybe get SingleViewerWidget to support it. QStringList decorations; return decorations; } //----------------------------------------------------------------------------- mitk::IRenderingManager* SingleViewerEditor::GetRenderingManager() const { return d->m_RenderingManagerInterface; } //----------------------------------------------------------------------------- mitk::SlicesRotator* SingleViewerEditor::GetSlicesRotator() const { // Deliberately return nothing. ToDo - maybe get SingleViewerWidget to support it. return NULL; } //----------------------------------------------------------------------------- mitk::SlicesSwiveller* SingleViewerEditor::GetSlicesSwiveller() const { // Deliberately return nothing. ToDo - maybe get SingleViewerWidget to support it. return NULL; } //----------------------------------------------------------------------------- void SingleViewerEditor::EnableSlicingPlanes(bool enable) { // Deliberately do nothing. ToDo - maybe get SingleViewerWidget to support it. Q_UNUSED(enable); } //----------------------------------------------------------------------------- bool SingleViewerEditor::IsSlicingPlanesEnabled() const { // Deliberately do nothing. ToDo - maybe get SingleViewerWidget to support it. return false; } //----------------------------------------------------------------------------- void SingleViewerEditor::EnableLinkedNavigation(bool linkedNavigationEnabled) { d->m_SingleViewer->SetLinkedNavigationEnabled(linkedNavigationEnabled); } //----------------------------------------------------------------------------- bool SingleViewerEditor::IsLinkedNavigationEnabled() const { return d->m_SingleViewer->IsLinkedNavigationEnabled(); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnPopupOpened(bool opened) { if (!opened) { d->m_SingleViewer->repaint(); } } //----------------------------------------------------------------------------- void SingleViewerEditor::OnPinButtonToggled(bool checked) { if (checked) { d->m_PopupWidget->pinPopup(true); } else { d->m_PopupWidget->setAutoHide(true); } } //--------------------------------------------------------------------------- bool SingleViewerEditor::eventFilter(QObject* object, QEvent* event) { if (object == d->m_PinButton && event->type() == QEvent::Enter) { d->m_PopupWidget->showPopup(); } return this->QObject::eventFilter(object, event); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnSelectedSliceControlChanged(int selectedSlice) { WindowOrientation orientation = d->m_SingleViewer->GetOrientation(); if (orientation != WINDOW_ORIENTATION_UNKNOWN) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetSelectedSlice(orientation, selectedSlice); d->m_SingleViewer->blockSignals(signalsWereBlocked); } else { MITK_WARN << "Found an invalid orientation in viewer, so ignoring request to change to slice " << selectedSlice << std::endl; } } //----------------------------------------------------------------------------- void SingleViewerEditor::OnTimeStepControlChanged(int timeStep) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetTimeStep(timeStep); d->m_SingleViewer->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnMagnificationControlChanged(double magnification) { double roundedMagnification = std::floor(magnification); // If we are between two integers, we raise a new event: if (magnification != roundedMagnification) { // If the value has decreased, we have to increase the rounded value. if (magnification < d->m_Magnification) { roundedMagnification += 1.0; } magnification = roundedMagnification; d->m_ControlPanel->SetMagnification(magnification); } WindowOrientation orientation = d->m_SingleViewer->GetOrientation(); bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetMagnification(orientation, magnification); d->m_SingleViewer->blockSignals(signalsWereBlocked); d->m_Magnification = magnification; } //----------------------------------------------------------------------------- void SingleViewerEditor::OnShowDirectionAnnotationsControlChanged(bool visible) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetDirectionAnnotationsVisible(visible); d->m_SingleViewer->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnShowIntensityAnnotationControlChanged(bool visible) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetIntensityAnnotationVisible(visible); d->m_SingleViewer->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnCursorVisibilityControlChanged(bool visible) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetCursorVisible(visible); d->m_SingleViewer->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnWindowCursorBindingControlChanged(bool bound) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetCursorPositionBinding(bound); d->m_SingleViewer->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnWindowScaleFactorBindingControlChanged(bool bound) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetScaleFactorBinding(bound); d->m_SingleViewer->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnWindowLayoutControlChanged(WindowLayout windowLayout) { if (windowLayout != WINDOW_LAYOUT_UNKNOWN) { bool signalsWereBlocked = d->m_SingleViewer->blockSignals(true); d->m_SingleViewer->SetWindowLayout(windowLayout); d->m_SingleViewer->blockSignals(signalsWereBlocked); } } //----------------------------------------------------------------------------- void SingleViewerEditor::OnSelectedPositionChanged(const mitk::Point3D& selectedPosition) { SingleViewerWidget* viewer = qobject_cast<SingleViewerWidget*>(this->sender()); WindowOrientation orientation = d->m_SingleViewer->GetOrientation(); if (orientation != WINDOW_ORIENTATION_UNKNOWN) { bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); d->m_ControlPanel->SetSelectedSlice(viewer->GetSelectedSlice(orientation)); d->m_ControlPanel->blockSignals(signalsWereBlocked); } } //----------------------------------------------------------------------------- void SingleViewerEditor::OnTimeStepChanged(int timeStep) { bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); d->m_ControlPanel->SetTimeStep(timeStep); d->m_ControlPanel->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnScaleFactorChanged(WindowOrientation orientation, double scaleFactor) { double magnification = d->m_SingleViewer->GetMagnification(orientation); bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); d->m_ControlPanel->SetMagnification(magnification); d->m_ControlPanel->blockSignals(signalsWereBlocked); d->m_Magnification = magnification; } //----------------------------------------------------------------------------- void SingleViewerEditor::OnCursorVisibilityChanged(bool visible) { bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); d->m_ControlPanel->SetCursorVisible(visible); d->m_ControlPanel->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnDirectionAnnotationsVisibilityChanged(bool visible) { bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); d->m_ControlPanel->SetDirectionAnnotationsVisible(visible); d->m_ControlPanel->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnIntensityAnnotationVisibilityChanged(bool visible) { bool signalsWereBlocked = d->m_ControlPanel->blockSignals(true); d->m_ControlPanel->SetIntensityAnnotationVisible(visible); d->m_ControlPanel->blockSignals(signalsWereBlocked); } //----------------------------------------------------------------------------- void SingleViewerEditor::OnWindowLayoutChanged(WindowLayout windowLayout) { d->m_ControlPanel->SetWindowLayout(windowLayout); d->m_ControlPanel->SetWindowCursorsBound(d->m_SingleViewer->GetCursorPositionBinding()); d->m_ControlPanel->SetWindowMagnificationsBound(d->m_SingleViewer->GetScaleFactorBinding()); } }
39.206459
164
0.675688
NifTK
c0348ec545f93b60b8ba8a536fa0f4d4d486b289
23,305
cpp
C++
iceoryx_posh/test/moduletests/test_mepoo_memory_manager.cpp
timmylinux/iceoryx
160fb71c53a26e031b39a9d45ce9ea165049eba5
[ "Apache-2.0" ]
null
null
null
iceoryx_posh/test/moduletests/test_mepoo_memory_manager.cpp
timmylinux/iceoryx
160fb71c53a26e031b39a9d45ce9ea165049eba5
[ "Apache-2.0" ]
null
null
null
iceoryx_posh/test/moduletests/test_mepoo_memory_manager.cpp
timmylinux/iceoryx
160fb71c53a26e031b39a9d45ce9ea165049eba5
[ "Apache-2.0" ]
null
null
null
// Copyright (c) 2019 - 2021 by Robert Bosch GmbH. All rights reserved. // Copyright (c) 2020 - 2022 by Apex.AI Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // SPDX-License-Identifier: Apache-2.0 #include "iceoryx_hoofs/internal/posix_wrapper/shared_memory_object/allocator.hpp" #include "iceoryx_hoofs/testing/mocks/logger_mock.hpp" #include "iceoryx_posh/internal/mepoo/memory_manager.hpp" #include "iceoryx_posh/mepoo/mepoo_config.hpp" #include "test.hpp" namespace { using namespace ::testing; using iox::mepoo::ChunkHeader; using iox::mepoo::ChunkSettings; using UserPayloadOffset_t = iox::mepoo::ChunkHeader::UserPayloadOffset_t; class MemoryManager_test : public Test { public: void SetUp() override { rawMemory = malloc(rawMemorySize); allocator = new iox::posix::Allocator(rawMemory, rawMemorySize); sut = new iox::mepoo::MemoryManager(); }; void TearDown() override { delete sut; delete allocator; free(rawMemory); }; using ChunkStore = std::vector<iox::mepoo::SharedChunk>; ChunkStore getChunksFromSut(const uint32_t numberOfChunks, const iox::mepoo::ChunkSettings& chunkSettings) { ChunkStore chunkStore; for (uint32_t i = 0; i < numberOfChunks; ++i) { sut->getChunk(chunkSettings) .and_then([&](auto& chunk) { EXPECT_TRUE(chunk); chunkStore.push_back(chunk); }) .or_else([](const auto& error) { GTEST_FAIL() << "getChunk failed with: " << error; }); } return chunkStore; } static constexpr uint32_t CHUNK_SIZE_32{32U}; static constexpr uint32_t CHUNK_SIZE_64{64U}; static constexpr uint32_t CHUNK_SIZE_128{128}; static constexpr uint32_t CHUNK_SIZE_256{256U}; iox::posix::Allocator* allocator; void* rawMemory; size_t rawMemorySize = 1000000; iox::mepoo::MemoryManager* sut; iox::mepoo::MePooConfig mempoolconf; const iox::mepoo::ChunkSettings chunkSettings_32{ iox::mepoo::ChunkSettings::create(32U, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT).value()}; const iox::mepoo::ChunkSettings chunkSettings_64{ iox::mepoo::ChunkSettings::create(64U, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT).value()}; const iox::mepoo::ChunkSettings chunkSettings_128{ iox::mepoo::ChunkSettings::create(128U, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT).value()}; const iox::mepoo::ChunkSettings chunkSettings_256{ iox::mepoo::ChunkSettings::create(256, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT).value()}; }; TEST_F(MemoryManager_test, AddingMempoolNotInTheIncreasingOrderReturnsError) { ::testing::Test::RecordProperty("TEST_ID", "df439901-8d42-4532-8494-21d5447ef7d7"); constexpr uint32_t CHUNK_COUNT{10U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_256, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); iox::cxx::optional<iox::PoshError> detectedError; auto errorHandlerGuard = iox::ErrorHandlerMock::setTemporaryErrorHandler<iox::PoshError>( [&detectedError](const iox::PoshError error, const iox::ErrorLevel errorLevel) { detectedError.emplace(error); EXPECT_EQ(errorLevel, iox::ErrorLevel::FATAL); }); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); ASSERT_TRUE(detectedError.has_value()); EXPECT_EQ(detectedError.value(), iox::PoshError::MEPOO__MEMPOOL_CONFIG_MUST_BE_ORDERED_BY_INCREASING_SIZE); } TEST_F(MemoryManager_test, WrongCallOfConfigureMemoryManagerReturnsError) { ::testing::Test::RecordProperty("TEST_ID", "04cbf769-8721-454b-b038-96dd467ac3c2"); constexpr uint32_t CHUNK_COUNT{10U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); iox::cxx::optional<iox::PoshError> detectedError; auto errorHandlerGuard = iox::ErrorHandlerMock::setTemporaryErrorHandler<iox::PoshError>( [&detectedError](const iox::PoshError error, const iox::ErrorLevel errorLevel) { detectedError.emplace(error); EXPECT_EQ(errorLevel, iox::ErrorLevel::FATAL); }); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); ASSERT_TRUE(detectedError.has_value()); EXPECT_EQ(detectedError.value(), iox::PoshError::MEPOO__MEMPOOL_ADDMEMPOOL_AFTER_GENERATECHUNKMANAGEMENTPOOL); } TEST_F(MemoryManager_test, GetMempoolInfoMethodForOutOfBoundaryMempoolIndexReturnsZeroForAllMempoolAttributes) { ::testing::Test::RecordProperty("TEST_ID", "897e635e-d6df-46be-a3f0-7373b4116102"); constexpr uint32_t CHUNK_COUNT{10U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); constexpr uint32_t INVALID_MEMPOOL_INDEX = 2U; sut->configureMemoryManager(mempoolconf, *allocator, *allocator); iox::mepoo::MemPoolInfo poolInfo = sut->getMemPoolInfo(INVALID_MEMPOOL_INDEX); EXPECT_EQ(poolInfo.m_chunkSize, 0U); EXPECT_EQ(poolInfo.m_minFreeChunks, 0U); EXPECT_EQ(poolInfo.m_numChunks, 0U); EXPECT_EQ(poolInfo.m_usedChunks, 0U); } TEST_F(MemoryManager_test, GetNumberOfMemPoolsMethodReturnsTheNumberOfMemPools) { ::testing::Test::RecordProperty("TEST_ID", "e3c05153-add7-4098-8045-88960970d2a7"); constexpr uint32_t CHUNK_COUNT{10U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); EXPECT_EQ(sut->getNumberOfMemPools(), 3U); } TEST_F(MemoryManager_test, GetChunkMethodWithNoMemPoolInMemConfigReturnsError) { ::testing::Test::RecordProperty("TEST_ID", "dff31ea2-8ae0-4786-8c97-633af59c287d"); iox::cxx::optional<iox::PoshError> detectedError; auto errorHandlerGuard = iox::ErrorHandlerMock::setTemporaryErrorHandler<iox::PoshError>( [&detectedError](const iox::PoshError error, const iox::ErrorLevel errorLevel) { detectedError.emplace(error); EXPECT_EQ(errorLevel, iox::ErrorLevel::SEVERE); }); constexpr uint32_t USER_PAYLOAD_SIZE{15U}; auto chunkSettingsResult = ChunkSettings::create(USER_PAYLOAD_SIZE, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT); ASSERT_FALSE(chunkSettingsResult.has_error()); auto& chunkSettings = chunkSettingsResult.value(); constexpr auto EXPECTED_ERROR{iox::mepoo::MemoryManager::Error::NO_MEMPOOLS_AVAILABLE}; sut->getChunk(chunkSettings) .and_then( [&](auto&) { GTEST_FAIL() << "getChunk should fail with '" << EXPECTED_ERROR << "' but did not fail"; }) .or_else([&](const auto& error) { EXPECT_EQ(error, EXPECTED_ERROR); }); ASSERT_TRUE(detectedError.has_value()); EXPECT_EQ(detectedError.value(), iox::PoshError::MEPOO__MEMPOOL_GETCHUNK_CHUNK_WITHOUT_MEMPOOL); } TEST_F(MemoryManager_test, GetChunkMethodWithChunkSizeGreaterThanAvailableChunkSizeInMemPoolConfigReturnsError) { ::testing::Test::RecordProperty("TEST_ID", "d2104b74-5092-484d-bb9d-554996dffbc5"); constexpr uint32_t CHUNK_COUNT{10U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); iox::cxx::optional<iox::PoshError> detectedError; auto errorHandlerGuard = iox::ErrorHandlerMock::setTemporaryErrorHandler<iox::PoshError>( [&detectedError](const iox::PoshError error, const iox::ErrorLevel errorLevel) { detectedError.emplace(error); EXPECT_EQ(errorLevel, iox::ErrorLevel::SEVERE); }); constexpr uint32_t USER_PAYLOAD_SIZE{200U}; auto chunkSettingsResult = ChunkSettings::create(USER_PAYLOAD_SIZE, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT); ASSERT_FALSE(chunkSettingsResult.has_error()); auto& chunkSettings = chunkSettingsResult.value(); constexpr auto EXPECTED_ERROR{iox::mepoo::MemoryManager::Error::NO_MEMPOOL_FOR_REQUESTED_CHUNK_SIZE}; sut->getChunk(chunkSettings) .and_then( [&](auto&) { GTEST_FAIL() << "getChunk should fail with '" << EXPECTED_ERROR << "' but did not fail"; }) .or_else([&](const auto& error) { EXPECT_EQ(error, EXPECTED_ERROR); }); ASSERT_TRUE(detectedError.has_value()); EXPECT_EQ(detectedError.value(), iox::PoshError::MEPOO__MEMPOOL_GETCHUNK_CHUNK_IS_TOO_LARGE); } TEST_F(MemoryManager_test, GetChunkMethodWhenNoFreeChunksInMemPoolConfigReturnsError) { ::testing::Test::RecordProperty("TEST_ID", "0f201458-040e-43b1-a51b-698c2957ca7c"); constexpr uint32_t CHUNK_COUNT{1U}; constexpr uint32_t PAYLOAD_SIZE{100U}; mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); auto chunkSettingsResult = ChunkSettings::create(PAYLOAD_SIZE, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT); ASSERT_FALSE(chunkSettingsResult.has_error()); auto& chunkSettings = chunkSettingsResult.value(); auto chunkStore = getChunksFromSut(CHUNK_COUNT, chunkSettings); iox::cxx::optional<iox::PoshError> detectedError; auto errorHandlerGuard = iox::ErrorHandlerMock::setTemporaryErrorHandler<iox::PoshError>( [&detectedError](const iox::PoshError error, const iox::ErrorLevel errorLevel) { detectedError.emplace(error); EXPECT_EQ(errorLevel, iox::ErrorLevel::MODERATE); }); constexpr auto EXPECTED_ERROR{iox::mepoo::MemoryManager::Error::MEMPOOL_OUT_OF_CHUNKS}; sut->getChunk(chunkSettings) .and_then( [&](auto&) { GTEST_FAIL() << "getChunk should fail with '" << EXPECTED_ERROR << "' but did not fail"; }) .or_else([&](const auto& error) { EXPECT_EQ(error, EXPECTED_ERROR); }); ASSERT_TRUE(detectedError.has_value()); EXPECT_EQ(detectedError.value(), iox::PoshError::MEPOO__MEMPOOL_GETCHUNK_POOL_IS_RUNNING_OUT_OF_CHUNKS); } TEST_F(MemoryManager_test, VerifyGetChunkMethodWhenTheRequestedChunkIsAvailableInMemPoolConfig) { ::testing::Test::RecordProperty("TEST_ID", "a5069a9d-ae2f-4466-ae13-53b0794dd292"); constexpr uint32_t CHUNK_COUNT{10U}; mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); constexpr uint32_t USER_PAYLOAD_SIZE{50U}; auto chunkSettingsResult = ChunkSettings::create(USER_PAYLOAD_SIZE, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT); ASSERT_FALSE(chunkSettingsResult.has_error()); auto& chunkSettings = chunkSettingsResult.value(); sut->getChunk(chunkSettings).and_then([&](auto& chunk) { EXPECT_TRUE(chunk); }).or_else([](const auto& error) { GTEST_FAIL() << "getChunk failed with: " << error; }); } TEST_F(MemoryManager_test, getChunkSingleMemPoolAllChunks) { ::testing::Test::RecordProperty("TEST_ID", "6623841b-baf0-4636-a5d4-b21e4678b7e8"); constexpr uint32_t CHUNK_COUNT{100U}; mempoolconf.addMemPool({128, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); constexpr uint32_t USER_PAYLOAD_SIZE{50U}; auto chunkSettingsResult = ChunkSettings::create(USER_PAYLOAD_SIZE, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT); ASSERT_FALSE(chunkSettingsResult.has_error()); auto& chunkSettings = chunkSettingsResult.value(); auto chunkStore = getChunksFromSut(CHUNK_COUNT, chunkSettings); EXPECT_EQ(sut->getMemPoolInfo(0U).m_usedChunks, CHUNK_COUNT); } TEST_F(MemoryManager_test, getChunkSingleMemPoolToMuchChunks) { ::testing::Test::RecordProperty("TEST_ID", "8af072c7-425b-4820-bc28-0c1e6bad0441"); constexpr uint32_t CHUNK_COUNT{100U}; mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); auto chunkStore = getChunksFromSut(CHUNK_COUNT, chunkSettings_128); constexpr auto EXPECTED_ERROR{iox::mepoo::MemoryManager::Error::MEMPOOL_OUT_OF_CHUNKS}; sut->getChunk(chunkSettings_128) .and_then( [&](auto&) { GTEST_FAIL() << "getChunk should fail with '" << EXPECTED_ERROR << "' but did not fail"; }) .or_else([&](const auto& error) { EXPECT_EQ(error, EXPECTED_ERROR); }); } TEST_F(MemoryManager_test, freeChunkSingleMemPoolFullToEmptyToFull) { ::testing::Test::RecordProperty("TEST_ID", "0cbb56ae-c5a3-46b6-bfab-abbf91b0ed64"); constexpr uint32_t CHUNK_COUNT{100U}; // chunks are freed when they go out of scope { mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); auto chunkStore = getChunksFromSut(CHUNK_COUNT, chunkSettings_128); EXPECT_EQ(sut->getMemPoolInfo(0U).m_usedChunks, CHUNK_COUNT); } EXPECT_EQ(sut->getMemPoolInfo(0U).m_usedChunks, 0U); auto chunkStore = getChunksFromSut(CHUNK_COUNT, chunkSettings_128); EXPECT_EQ(sut->getMemPoolInfo(0U).m_usedChunks, CHUNK_COUNT); } TEST_F(MemoryManager_test, getChunkMultiMemPoolSingleChunk) { ::testing::Test::RecordProperty("TEST_ID", "b22f804d-2e12-40c3-8bec-f9a0ab375e98"); constexpr uint32_t CHUNK_COUNT{10U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_256, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); for (const auto& chunkSettings : {chunkSettings_32, chunkSettings_64, chunkSettings_128, chunkSettings_256}) { sut->getChunk(chunkSettings).and_then([&](auto& chunk) { EXPECT_TRUE(chunk); }).or_else([](const auto& error) { GTEST_FAIL() << "getChunk failed with: " << error; }); } } TEST_F(MemoryManager_test, getChunkMultiMemPoolAllChunks) { ::testing::Test::RecordProperty("TEST_ID", "cdb65377-7579-4c76-9931-9552071fff5c"); constexpr uint32_t CHUNK_COUNT{100U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_256, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); auto chunkStore_32 = getChunksFromSut(CHUNK_COUNT, chunkSettings_32); auto chunkStore_64 = getChunksFromSut(CHUNK_COUNT, chunkSettings_64); auto chunkStore_128 = getChunksFromSut(CHUNK_COUNT, chunkSettings_128); auto chunkStore_256 = getChunksFromSut(CHUNK_COUNT, chunkSettings_256); EXPECT_THAT(sut->getMemPoolInfo(0).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(1).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(2).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(3).m_usedChunks, Eq(CHUNK_COUNT)); } TEST_F(MemoryManager_test, getChunkMultiMemPoolTooMuchChunks) { ::testing::Test::RecordProperty("TEST_ID", "975e1347-9b39-4fda-a95a-0725b04f7d7d"); constexpr uint32_t CHUNK_COUNT{100U}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_256, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); auto chunkStore_32 = getChunksFromSut(CHUNK_COUNT, chunkSettings_32); auto chunkStore_64 = getChunksFromSut(CHUNK_COUNT, chunkSettings_64); auto chunkStore_128 = getChunksFromSut(CHUNK_COUNT, chunkSettings_128); auto chunkStore_256 = getChunksFromSut(CHUNK_COUNT, chunkSettings_256); constexpr auto EXPECTED_ERROR{iox::mepoo::MemoryManager::Error::MEMPOOL_OUT_OF_CHUNKS}; for (const auto& chunkSettings : {chunkSettings_32, chunkSettings_64, chunkSettings_128, chunkSettings_256}) { sut->getChunk(chunkSettings) .and_then([&](auto&) { GTEST_FAIL() << "getChunk for payload size " << chunkSettings.userPayloadSize() << " should fail with '" << EXPECTED_ERROR << "' but did not fail"; }) .or_else([&](const auto& error) { EXPECT_EQ(error, EXPECTED_ERROR); }); } } TEST_F(MemoryManager_test, emptyMemPoolDoesNotResultInAcquiringChunksFromOtherMemPools) { ::testing::Test::RecordProperty("TEST_ID", "c2ff3937-6cdf-43ad-bec6-5203521a8f57"); constexpr uint32_t CHUNK_COUNT{100}; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_256, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); auto chunkStore = getChunksFromSut(CHUNK_COUNT, chunkSettings_64); constexpr auto EXPECTED_ERROR{iox::mepoo::MemoryManager::Error::MEMPOOL_OUT_OF_CHUNKS}; sut->getChunk(chunkSettings_64) .and_then( [&](auto&) { GTEST_FAIL() << "getChunk should fail with '" << EXPECTED_ERROR << "' but did not fail"; }) .or_else([&](const auto& error) { EXPECT_EQ(error, EXPECTED_ERROR); }); EXPECT_THAT(sut->getMemPoolInfo(0).m_usedChunks, Eq(0U)); EXPECT_THAT(sut->getMemPoolInfo(1).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(2).m_usedChunks, Eq(0U)); EXPECT_THAT(sut->getMemPoolInfo(3).m_usedChunks, Eq(0U)); } TEST_F(MemoryManager_test, freeChunkMultiMemPoolFullToEmptyToFull) { ::testing::Test::RecordProperty("TEST_ID", "0eddc5b5-e28f-43df-9da7-2c12014284a5"); constexpr uint32_t CHUNK_COUNT{100U}; // chunks are freed when they go out of scope { std::vector<iox::mepoo::SharedChunk> chunkStore; mempoolconf.addMemPool({CHUNK_SIZE_32, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_64, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_128, CHUNK_COUNT}); mempoolconf.addMemPool({CHUNK_SIZE_256, CHUNK_COUNT}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); auto chunkStore_32 = getChunksFromSut(CHUNK_COUNT, chunkSettings_32); auto chunkStore_64 = getChunksFromSut(CHUNK_COUNT, chunkSettings_64); auto chunkStore_128 = getChunksFromSut(CHUNK_COUNT, chunkSettings_128); auto chunkStore_256 = getChunksFromSut(CHUNK_COUNT, chunkSettings_256); EXPECT_THAT(sut->getMemPoolInfo(0).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(1).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(2).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(3).m_usedChunks, Eq(CHUNK_COUNT)); } EXPECT_THAT(sut->getMemPoolInfo(0).m_usedChunks, Eq(0U)); EXPECT_THAT(sut->getMemPoolInfo(1).m_usedChunks, Eq(0U)); EXPECT_THAT(sut->getMemPoolInfo(2).m_usedChunks, Eq(0U)); EXPECT_THAT(sut->getMemPoolInfo(3).m_usedChunks, Eq(0U)); auto chunkStore_32 = getChunksFromSut(CHUNK_COUNT, chunkSettings_32); auto chunkStore_64 = getChunksFromSut(CHUNK_COUNT, chunkSettings_64); auto chunkStore_128 = getChunksFromSut(CHUNK_COUNT, chunkSettings_128); auto chunkStore_256 = getChunksFromSut(CHUNK_COUNT, chunkSettings_256); EXPECT_THAT(sut->getMemPoolInfo(0).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(1).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(2).m_usedChunks, Eq(CHUNK_COUNT)); EXPECT_THAT(sut->getMemPoolInfo(3).m_usedChunks, Eq(CHUNK_COUNT)); } TEST_F(MemoryManager_test, getChunkWithUserPayloadSizeZeroShouldNotFail) { ::testing::Test::RecordProperty("TEST_ID", "9fbfe1ff-9d59-449b-b164-433bbb031125"); constexpr uint32_t USER_PAYLOAD_SIZE{0U}; auto chunkSettingsResult = ChunkSettings::create(USER_PAYLOAD_SIZE, iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT); ASSERT_FALSE(chunkSettingsResult.has_error()); auto& chunkSettings = chunkSettingsResult.value(); mempoolconf.addMemPool({32, 10}); sut->configureMemoryManager(mempoolconf, *allocator, *allocator); sut->getChunk(chunkSettings).and_then([&](auto& chunk) { EXPECT_TRUE(chunk); }).or_else([](const auto& error) { GTEST_FAIL() << "getChunk failed with: " << error; }); } TEST_F(MemoryManager_test, addMemPoolWithChunkCountZeroShouldFail) { ::testing::Test::RecordProperty("TEST_ID", "be653b65-a2d1-42eb-98b5-d161c6ba7c08"); mempoolconf.addMemPool({32, 0}); EXPECT_DEATH({ sut->configureMemoryManager(mempoolconf, *allocator, *allocator); }, ".*"); } TEST(MemoryManagerEnumString_test, asStringLiteralConvertsEnumValuesToStrings) { ::testing::Test::RecordProperty("TEST_ID", "5f6c3942-0af5-4c48-b44c-7268191dbac5"); using Error = iox::mepoo::MemoryManager::Error; // each bit corresponds to an enum value and must be set to true on test uint64_t testedEnumValues{0U}; uint64_t loopCounter{0U}; for (const auto& sut : {Error::NO_MEMPOOLS_AVAILABLE, Error::NO_MEMPOOL_FOR_REQUESTED_CHUNK_SIZE, Error::MEMPOOL_OUT_OF_CHUNKS}) { auto enumString = iox::mepoo::asStringLiteral(sut); switch (sut) { case Error::NO_MEMPOOLS_AVAILABLE: EXPECT_THAT(enumString, StrEq("MemoryManager::Error::NO_MEMPOOLS_AVAILABLE")); break; case Error::NO_MEMPOOL_FOR_REQUESTED_CHUNK_SIZE: EXPECT_THAT(enumString, StrEq("MemoryManager::Error::NO_MEMPOOL_FOR_REQUESTED_CHUNK_SIZE")); break; case Error::MEMPOOL_OUT_OF_CHUNKS: EXPECT_THAT(enumString, StrEq("MemoryManager::Error::MEMPOOL_OUT_OF_CHUNKS")); break; } testedEnumValues |= 1U << static_cast<uint64_t>(sut); ++loopCounter; } uint64_t expectedTestedEnumValues = (1U << loopCounter) - 1; EXPECT_EQ(testedEnumValues, expectedTestedEnumValues); } TEST(MemoryManagerEnumString_test, LogStreamConvertsEnumValueToString) { ::testing::Test::RecordProperty("TEST_ID", "4a3539e5-5465-4352-b2b7-a850e104c173"); Logger_Mock loggerMock; auto sut = iox::mepoo::MemoryManager::Error::MEMPOOL_OUT_OF_CHUNKS; { auto logstream = iox::log::LogStream(loggerMock); logstream << sut; } ASSERT_THAT(loggerMock.m_logs.size(), Eq(1U)); EXPECT_THAT(loggerMock.m_logs[0].message, StrEq(iox::mepoo::asStringLiteral(sut))); } } // namespace
44.05482
120
0.732547
timmylinux
c035a7bc8af8fa2fa7a0a5e73c6cc6261fed7ef1
5,259
cpp
C++
repo/HOPE2/MeshManager.cpp
A12134/OpenGL-Engine-Hope2
f24f57e0b0e2606db7d8d2df42e4d79cef1554fa
[ "Apache-2.0" ]
null
null
null
repo/HOPE2/MeshManager.cpp
A12134/OpenGL-Engine-Hope2
f24f57e0b0e2606db7d8d2df42e4d79cef1554fa
[ "Apache-2.0" ]
null
null
null
repo/HOPE2/MeshManager.cpp
A12134/OpenGL-Engine-Hope2
f24f57e0b0e2606db7d8d2df42e4d79cef1554fa
[ "Apache-2.0" ]
null
null
null
#include "MeshManager.h" LogManager* MeshManager::mLogManager; TextureManager* MeshManager::mTexManager; unsigned int MeshManager::addMesh(Mesh * newMesh) { mMeshLibrary.push_back(newMesh); return this->mMeshLibrary.size() - 1; // return the index of the last element } unsigned int MeshManager::getMeshID(std::string meshName) { for (unsigned int i = 0; i < this->mMeshLibrary.size(); i++) { if (meshName == mMeshLibrary.at(i)->getName()) { return i; } } return 99999; } void MeshManager::renderMesh(unsigned int ID, ShaderProgram * sp, mat4 model, mat4 view, mat4 projection, unsigned int MaterialID) { this->mMeshLibrary.at(ID)->render(sp, model, view, projection, mTexManager->getMaterialByID(MaterialID)); // Material ID } MeshManager::MeshManager() { } MeshManager::~MeshManager() { } void MeshManager::loadModel(std::string fileName, MeshNode * rootNode) { Assimp::Importer import; const aiScene * scene = import.ReadFile(fileName, aiProcess_Triangulate | aiProcess_JoinIdenticalVertices | aiProcess_FlipUVs | aiProcess_CalcTangentSpace ); if (!scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode) { mLogManager->addLog(ELogType::E_ERROR, std::string(import.GetErrorString())); mLogManager->errorExit(); } std::string directory = fileName.substr(0, fileName.find_last_of('/')); processNode(scene->mRootNode, scene, fileName, directory, rootNode); } void MeshManager::processNode(aiNode * node, const aiScene * scene, std::string fileName, std::string directory, MeshNode * hNode) { MeshNode* currentNode = hNode; for (unsigned int i = 0; i < node->mNumMeshes; i++) { aiMesh* mesh = scene->mMeshes[node->mMeshes[i]]; this->mMeshLibrary.push_back(processMesh(mesh, scene, fileName, directory, currentNode)); currentNode->addMeshID(this->mMeshLibrary.size() - 1); } for (unsigned int i = 0; i < node->mNumChildren; i++) { processNode(node->mChildren[i], scene, fileName, directory, currentNode->addNewChild()); } } Mesh * MeshManager::processMesh(aiMesh * mesh, const aiScene * scene, std::string fileName, std::string directory, MeshNode * hNode) { std::vector<Vertex> vertices; std::vector<unsigned int> indices; for (unsigned int i = 0; i < mesh->mNumVertices; i++) { Vertex vertex; // position vertex.mPosition = vec3( mesh->mVertices[i].x, mesh->mVertices[i].y, mesh->mVertices[i].z ); // normals vertex.mNormal = vec3( mesh->mNormals[i].x, mesh->mNormals[i].y, mesh->mNormals[i].z ); // tangents /* vertex.mTangent = vec3( mesh->mTangents[i].x, mesh->mTangents[i].y, mesh->mTangents[i].z ); // bitangents vertex.mBiTangent = vec3( mesh->mBitangents[i].x, mesh->mBitangents[i].y, mesh->mBitangents[i].z );*/ // UVs if (mesh->mTextureCoords[0]) { vertex.mTexCoords = vec2( mesh->mTextureCoords[0][i].x, mesh->mTextureCoords[0][i].y ); } else { vertex.mTexCoords = vec2(0.0f); } vertices.push_back(vertex); } // indices for (unsigned int i = 0; i < mesh->mNumFaces; i++) { aiFace face = mesh->mFaces[i]; for (unsigned int j = 0; j < face.mNumIndices; j++) { indices.push_back(face.mIndices[j]); } } processTexture(mesh, scene, fileName, directory, hNode); return new Mesh(vertices, indices); } void MeshManager::processTexture(aiMesh * mesh, const aiScene * scene, std::string fileName, std::string directory, MeshNode * hNode) { if (mesh->mMaterialIndex >= 0) { aiMaterial* material = scene->mMaterials[mesh->mMaterialIndex]; Material* hMat = mTexManager->createMaterial(mesh->mName.C_Str()); // diffuse Maps for (unsigned int i = 0; i < material->GetTextureCount(aiTextureType_DIFFUSE); i++) { aiString str; material->GetTexture(aiTextureType_DIFFUSE, i, &str); std::string imagePath = directory + str.C_Str(); mTexManager->loadImage(imagePath.c_str(), E_TEX_TYPE::DIFFUSE, hMat); } // specular maps for (unsigned int i = 0; i < material->GetTextureCount(aiTextureType_SPECULAR); i++) { aiString str; material->GetTexture(aiTextureType_SPECULAR, i, &str); std::string imagePath = directory + str.C_Str(); mTexManager->loadImage(imagePath.c_str(), E_TEX_TYPE::SPECULAR, hMat); } // normal maps for (unsigned int i = 0; i < material->GetTextureCount(aiTextureType_HEIGHT); i++) { aiString str; material->GetTexture(aiTextureType_HEIGHT, i, &str); std::string imagePath = directory + str.C_Str(); mTexManager->loadImage(imagePath.c_str(), E_TEX_TYPE::NORMAL, hMat); } // amibent maps for (unsigned int i = 0; i < material->GetTextureCount(aiTextureType_AMBIENT); i++) { aiString str; material->GetTexture(aiTextureType_AMBIENT, i, &str); std::string imagePath = directory + str.C_Str(); mTexManager->loadImage(imagePath.c_str(), E_TEX_TYPE::AMBIENT, hMat); } // opacity maps for (unsigned int i = 0; i < material->GetTextureCount(aiTextureType_OPACITY); i++) { aiString str; material->GetTexture(aiTextureType_OPACITY, i, &str); std::string imagePath = directory + str.C_Str(); mTexManager->loadImage(imagePath.c_str(), E_TEX_TYPE::OPACITY, hMat); } } hNode->setMaterialID(mTexManager->getMaterialID(mesh->mName.C_Str())); }
26.695431
133
0.692147
A12134
c037be07cee4b65e5a7c61ad13deb6893ed4327a
1,814
cpp
C++
thirdparty/ULib/tests/ulib/test_options.cpp
liftchampion/nativejson-benchmark
6d575ffa4359a5c4230f74b07d994602a8016fb5
[ "MIT" ]
null
null
null
thirdparty/ULib/tests/ulib/test_options.cpp
liftchampion/nativejson-benchmark
6d575ffa4359a5c4230f74b07d994602a8016fb5
[ "MIT" ]
null
null
null
thirdparty/ULib/tests/ulib/test_options.cpp
liftchampion/nativejson-benchmark
6d575ffa4359a5c4230f74b07d994602a8016fb5
[ "MIT" ]
null
null
null
// test_options.cpp #include <ulib/base/utility.h> #include <ulib/options.h> #define OPTIONS \ "package " PACKAGE_NAME "\n" \ "version " ULIB_VERSION "\n" \ "purpose 'sample test for UOption class'\n" \ "report_bugs '\nReport bugs to <stefano.casazza@unirel.com>'\n" \ "option a option_a 0 'A option without arg' ''\n" \ "option b option_b 1 'A option with arg' ''\n" \ "option c option_c 2 'A option with optional arg' Hello\n" \ "option - option_with_no_short_1 0 'A option without short' ''\n" \ "option - option_with_no_short_2 1 'A option with default' Hello" int U_EXPORT main (int argc, char* argv[]) { U_ULIB_INIT(argv); U_TRACE(5,"main(%d)",argc) UOptions opt(1); UString x = U_STRING_FROM_CONSTANT(OPTIONS); opt.load(x); char buffer[1024]; const char* largv[128] = { "programma" }; strcpy(buffer, "-a -b pippo -c --option_with_no_short_1 --option_with_no_short_2 \"Bucaiolo a te\" argument_1 argument_2"); unsigned num_args = opt.getopt(u_split(buffer, strlen(buffer), (char**)largv+1, 0)+1, (char**)largv, &optind); U_ASSERT( num_args == 2 ) U_DUMP_ATTRS(largv) U_ASSERT( opt[(uint32_t)0U] == "1" ) U_ASSERT( opt[(uint32_t)1U] == "pippo" ) U_ASSERT( opt[(uint32_t)2U] == "Hello" ) U_ASSERT( opt[(uint32_t)3U] == "1" ) U_ASSERT( opt[(uint32_t)4U] == "Bucaiolo a te" ) U_ASSERT( opt['a'] == "1" ) U_ASSERT( opt['b'] == "pippo" ) U_ASSERT( opt['c'] == "Hello" ) U_ASSERT( opt[U_STRING_FROM_CONSTANT("option_with_no_short_1")] == "1" ) U_ASSERT( opt[U_STRING_FROM_CONSTANT("option_with_no_short_2")] == "Bucaiolo a te" ) U_ASSERT( strcmp(largv[optind], "argument_1") == 0 ) ++optind; U_ASSERT( strcmp(largv[optind], "argument_2") == 0 ) opt.getopt(argc, argv, &optind); }
29.737705
126
0.641676
liftchampion
c038664f0bb5d4ea3b814672b2bb4b3b55815f36
30,301
c++
C++
src/extern/inventor/apps/demos/gview/DisplayGraph.c++
OpenXIP/xip-libraries
9f0fef66038b20ff0c81c089d7dd0038e3126e40
[ "Apache-2.0" ]
2
2020-05-21T07:06:07.000Z
2021-06-28T02:14:34.000Z
src/extern/inventor/apps/demos/gview/DisplayGraph.c++
OpenXIP/xip-libraries
9f0fef66038b20ff0c81c089d7dd0038e3126e40
[ "Apache-2.0" ]
null
null
null
src/extern/inventor/apps/demos/gview/DisplayGraph.c++
OpenXIP/xip-libraries
9f0fef66038b20ff0c81c089d7dd0038e3126e40
[ "Apache-2.0" ]
6
2016-03-21T19:53:18.000Z
2021-06-08T18:06:03.000Z
/* * * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved. * * 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. * * 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. * * Further, this software is distributed without any warranty that it is * free of the rightful claim of any third person regarding infringement * or the like. Any license provided herein, whether implied or * otherwise, applies only to this software file. Patent licenses, if * any, provided herein do not apply to combinations of this program with * other software, or any other product whatsoever. * * 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 * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA 94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ * */ #include <stdlib.h> #include <Inventor/SbBox.h> #include <Inventor/SbDict.h> #include <Inventor/SoDB.h> #include <Inventor/SoInput.h> #include <Inventor/SoPath.h> #include <Inventor/SoType.h> #include <Inventor/actions/SoSearchAction.h> #include <Inventor/nodes/SoBaseColor.h> #include <Inventor/nodes/SoCoordinate3.h> #include <Inventor/nodes/SoCone.h> #include <Inventor/nodes/SoCube.h> #include <Inventor/nodes/SoDrawStyle.h> #include <Inventor/nodes/SoGroup.h> #include <Inventor/nodes/SoIndexedLineSet.h> #include <Inventor/nodes/SoLabel.h> #include <Inventor/nodes/SoLightModel.h> #include <Inventor/nodes/SoLineSet.h> #include <Inventor/nodes/SoPickStyle.h> #include <Inventor/nodes/SoSeparator.h> #include <Inventor/nodes/SoSphere.h> #include <Inventor/nodes/SoSwitch.h> #include "GraphIcon.h" #include "DisplayGraph.h" SbBool DisplayGraph::initialized = FALSE; SoNode *DisplayGraph::instanceIcon; SoNode *DisplayGraph::closedIcon; SoNode *DisplayGraph::otherIcon; SbDict *DisplayGraph::iconDict; #define ICON_FILE "gviewIcons.iv" #define ICON_INST_DIR IVPREFIX "/demos/data/Inventor" #define ICON_ENV_VAR "IV_GRAPH_DIR" //////////////////////////////////////////////////////////////////////// // // Description: // Constructor - passed scene to view graph of, so it can count // nodes and set up correspondences. Also takes another // DisplayGraph (may be NULL) from which to copy info about icons. // DisplayGraph::DisplayGraph(SoNode *sceneGraph) // //////////////////////////////////////////////////////////////////////// { int firstChildIndex; // Make sure icon stuff is initialized if (! initialized) init(); // Count nodes in scene. nodeDict is used to detect instances numIcons = countNodes(sceneGraph); // Allocate array of GraphIcon instances to represent the nodes icons = new GraphIcon[numIcons]; // Clear nodeDict, which will now be used to hold correspondences // to scene graph nodes to detect instances nodeDict.clear(); // First node goes in index 0. First child of it goes in index 1. // The childIndex of the root is -1 to distinguish it from children. firstChildIndex = 1; setNode(sceneGraph, NULL, 0, firstChildIndex, -1); // Set up default spacing iconSpacing.setValue(1.0, 1.0); // Not showing any instance line instShown = FALSE; } //////////////////////////////////////////////////////////////////////// // // Description: // Destructor. // DisplayGraph::~DisplayGraph() // //////////////////////////////////////////////////////////////////////// { if (numIcons > 0) delete [] icons; } //////////////////////////////////////////////////////////////////////// // // Description: // Initializes class. // void DisplayGraph::init() // //////////////////////////////////////////////////////////////////////// { SoSeparator *sep = new SoSeparator; SoBaseColor *color = new SoBaseColor; SoInput in; SoNode *inRoot, *parent; SoSearchAction sa; const SoLabel *label; SoType type; int i; // Build default closed icon graph sep = new SoSeparator; color = new SoBaseColor; color->rgb.setValue(0.7, 0.2, 0.3); sep->addChild(color); sep->addChild(new SoCone); closedIcon = sep; // Build default instance icon graph sep = new SoSeparator; color = new SoBaseColor; color->rgb.setValue(0.6, 0.6, 0.1); sep->addChild(color); sep->addChild(new SoSphere); instanceIcon = sep; // Build default unspecified node icon graph otherIcon = new SoCube; instanceIcon->ref(); closedIcon->ref(); otherIcon->ref(); // Set up icon dictionary iconDict = new SbDict; // Insert icon for unspecific nodes. The casting is because C++ // thinks the SoType is more than just an integer type = SoNode::getClassTypeId(); iconDict->enter((unsigned long) * (int *) &type, (void *) otherIcon); #if 0 // Tell input to look for icon file based on environment variable // (before looking in current directory) in.addEnvDirectoriesFirst(ICON_ENV_VAR); // If it's not found in any of those, look in the standard // installed place in.addDirectoryLast(ICON_INST_DIR); // Open file containing icon graphs if (! in.openFile(ICON_FILE)) { fprintf(stderr, "Can't open %s\n", ICON_FILE); exit(1); } #endif #include "gviewIcons.iv.h" // Set to read from included char array in.setBuffer((void *) gviewIcons, sizeof(gviewIcons)); // Read graph from file if (! SoDB::read(&in, inRoot)) { fprintf(stderr, "Error reading %s\n", ICON_FILE); exit(1); } inRoot->ref(); // Search for all labels sa.setType(SoLabel::getClassTypeId()); sa.setInterest(SoSearchAction::ALL); sa.apply(inRoot); // For each label, store its parent node as the root of the icon // graph for the named node class for (i = 0; i < sa.getPaths().getLength(); i++) { label = (const SoLabel *) sa.getPaths()[i]->getTail(); parent = sa.getPaths()[i]->getNodeFromTail(1); // Find the type id for the named class type = SoType::fromName(label->label.getValue()); // If such a type exists, add the parent to the dictionary if (! type.isBad()) { iconDict->enter((unsigned long) * (int *) &type, (void *) parent); parent->ref(); } // Otherwise, it might be the icon for instances or closed groups else if (label->label.getValue() == "Instance") { instanceIcon->unref(); instanceIcon = parent; instanceIcon->ref(); } else if (label->label.getValue() == "Closed") { closedIcon->unref(); closedIcon = parent; closedIcon->ref(); } } inRoot->unref(); GraphIcon::init(); } //////////////////////////////////////////////////////////////////////// // // Description: // Sets up correspondence between display graph icon and scene // graph node. Recurses to handle children. The second parameter is // the index of the graph icon to set. The third parameter is the // index into the "icons" array in which to put the first child of // the current icon. The fourth parameter is the index of this // child in its parent's list of children. // void DisplayGraph::setNode(SoNode *node, GraphIcon *parentIcon, int iconIndex, int &firstChildIndex, int childIndex) // //////////////////////////////////////////////////////////////////////// { GraphIcon *icon = &icons[iconIndex]; void *oldIconPtr; icon->setNode(node); icon->setParent(parentIcon); icon->setChildIndex(childIndex); icon->setGraph(findIconGraph(node)); // See if node was already counted - if so, it's an instance if (nodeDict.find((unsigned long) node, oldIconPtr)) icon->setInstance((GraphIcon *) oldIconPtr); else { nodeDict.enter((unsigned long) node, (void *) icon); // If it's a group, recurse on children if (node->isOfType(SoGroup::getClassTypeId())) { const SoGroup *g = (const SoGroup *) node; int childIndex = firstChildIndex, i; icon->setGroup(g->getNumChildren(), &icons[firstChildIndex]); firstChildIndex += g->getNumChildren(); for (i = 0; i < g->getNumChildren(); i++) setNode(g->getChild(i), icon, childIndex + i, firstChildIndex, i); } } } //////////////////////////////////////////////////////////////////////// // // Description: // Builds display graph. Returns root node. May be passed another // DisplayGraph from which to copy info about icons. (It is NULL // otherwise.) // SoNode * DisplayGraph::build(DisplayGraph *oldDisplayGraph) // //////////////////////////////////////////////////////////////////////// { SoSeparator *rootSep; // Root for the display graph SoPickStyle *pickStyle; // Makes lines unpickable SoLightModel *lightModel; // To turn off lighting for lines SoDrawStyle *drawStyle; // To make lines wider SoLineSet *instLine; // Line to show instance connection SoBaseColor *instColor; // Color of instance connection line SoSeparator *instSep; // Sub-root for instance stuff SoNode *iconGraph; int i; rootSep = new SoSeparator(3 + numIcons); rootSep->ref(); // Build subgraphs for all icons; add them to root. Also store // correspondence between GraphIcon and top node in icon graph in // dictionary. This lets us find the GraphIcon from a picked // geometry. for (i = 0; i < numIcons; i++) { iconGraph = icons[i].buildGraph(); rootSep->addChild(iconGraph); shapeDict.enter((unsigned long) iconGraph, (void *) &icons[i]); } // Start out with just the first level of children visible if (icons[0].isGroup()) icons[0].openGroup(FALSE); else icons[0].show(); // If we are to copy visibility info from an old display graph, do so if (oldDisplayGraph != NULL) { int i; GraphIcon *newIcon, *oldIcon; void *iconPtr; // Run through all icons in new display graph for (i = 0, newIcon = icons; i < numIcons; i++, newIcon++) { // If there was an old icon for the node that this icon represents if (oldDisplayGraph->nodeDict.find((unsigned long) newIcon->getNode(), iconPtr)) { oldIcon = (GraphIcon *) iconPtr; // Change state of icon if necessary if (oldIcon->isGroup()) { if (oldIcon->isOpen() && ! newIcon->isOpen()) newIcon->openGroup(FALSE); else if (oldIcon->isClosed() && ! newIcon->isClosed()) newIcon->closeGroup(); } } } // If nodes had been deleted from the old display graph, the // state of the graph can be inconsistent. Clean it up. checkIconState(&icons[0], FALSE); } // Compute sizes and positions of icons icons[0].computeSize(iconSpacing); icons[0].computePosition(SbVec2f(0.0, 0.0), iconSpacing); // Lines are unpickable, unlit, and wide pickStyle = new SoPickStyle; pickStyle->style = SoPickStyle::UNPICKABLE; drawStyle = new SoDrawStyle; drawStyle->lineWidth = 2; lightModel = new SoLightModel; lightModel->model = SoLightModel::BASE_COLOR; rootSep->addChild(pickStyle); rootSep->addChild(drawStyle); rootSep->addChild(lightModel); // Build the stuff to represent the lines connecting icons coords = new SoCoordinate3; lineSet = new SoIndexedLineSet; buildLines(); rootSep->addChild(coords); rootSep->addChild(lineSet); // Build a line set to display instance connection instSwitch = new SoSwitch; instSep = new SoSeparator; instColor = new SoBaseColor; instCoords = new SoCoordinate3; instLine = new SoLineSet; instColor->rgb.setValue(0.2, 0.2, 0.9); instSep->addChild(instColor); instSep->addChild(instCoords); instSep->addChild(instLine); instSwitch->addChild(instSep); rootSep->addChild(instSwitch); rootSep->unrefNoDelete(); root = rootSep; return root; } //////////////////////////////////////////////////////////////////////// // // Description: // Updates display graph when something changed in scene graph. // void DisplayGraph::update() // //////////////////////////////////////////////////////////////////////// { // Compute sizes and positions of icons icons[0].computeSize(iconSpacing); icons[0].computePosition(SbVec2f(0.0, 0.0), iconSpacing); // Just rebuild the stuff to represent the connecting lines buildLines(); // Make sure the instance line (if any) is ok if (instShown != NULL) { // Turn off line if either end is not visible if (! instShown->isVisible() || ! instShown->getInstance()->isVisible()) toggleInstance(instShown); // Otherwise, make sure coords are still correct else setInstanceCoords(); } } //////////////////////////////////////////////////////////////////////// // // Description: // Returns icon corresponding to given selected path. We search up // the path from the bottom until we find a node that was entered // in the dictionary. If we find one, we return the corresponding // GraphIcon. // GraphIcon * DisplayGraph::find(const SoPath *path) // //////////////////////////////////////////////////////////////////////// { void *iconPtr; int i; if (path == NULL) return NULL; // Check nodes from tail of path toward head for (i = path->getLength() - 1; i >= 0; --i) if (shapeDict.find((unsigned long) path->getNode(i), iconPtr)) return (GraphIcon *) iconPtr; // Not found return NULL; } //////////////////////////////////////////////////////////////////////// // // Description: // Returns the icon that corresponds to the given path that starts // at the root of the scene graph this is an iconic version of. // GraphIcon * DisplayGraph::findFromScenePath(const SoPath *path) // //////////////////////////////////////////////////////////////////////// { GraphIcon *icon; int i, index; SbBool needUpdate = FALSE; // Trace the icons down to the correct one. On the way, make sure // the icon is visible: no closed groups or instances. icon = icons; if (icon->isClosed()) { icon->openGroup(FALSE); needUpdate = TRUE; } for (i = 1; i < path->getLength(); i++) { index = path->getIndex(i); if (! icon->isGroup() || index >= icon->getNumChildren()) { fprintf(stderr, "Yipes! bad path in findFromScenePath()\n"); return icon; } icon = icon->getChild(index); // Last icon can be closed or an instance if (i < path->getLength() - 1) { if (icon->isClosed()) { icon->openGroup(FALSE); needUpdate = TRUE; } else if (icon->isInstance()) { swapInstance(icon); needUpdate = TRUE; } } } if (needUpdate) update(); return icon; } //////////////////////////////////////////////////////////////////////// // // Description: // Shows/hides what node an instance icon is an instance of. // Returns TRUE if graph needs to be rebuilt. // SbBool DisplayGraph::toggleInstance(GraphIcon *icon) // //////////////////////////////////////////////////////////////////////// { // If there already is an instance showing and it is this icon, // just turn it off if (instShown == icon) { instSwitch->whichChild = SO_SWITCH_NONE; instShown = NULL; return TRUE; } // Find node this icon is an instance of GraphIcon *instanceOf = icon->getInstance(); // Make sure that node is visible if (! instanceOf->isVisible()) { makeIconVisible(instanceOf); // Recompute positions and all update(); } // Save the pointer for later instShown = icon; // Set instance line to join the center of the two icons setInstanceCoords(); // Turn the line on by setting the switch instSwitch->whichChild = 0; return TRUE; } //////////////////////////////////////////////////////////////////////// // // Description: // Swaps instance icon with icon it is an instance of. This allows // selection under an instance of a group. // void DisplayGraph::swapInstance(GraphIcon *instanceIcon) // //////////////////////////////////////////////////////////////////////// { GraphIcon *instanceOf, *icon; int i; instanceOf = instanceIcon->getInstance(); // Make sure the instance line is still valid, if present if (instShown == instanceIcon) instShown = instanceIcon->getInstance(); // Swap the icon stuff instanceIcon->swapInstance(); // If any other icons were instances of the other icon, make them // instances of the given icon for (i = 0, icon = icons; i < numIcons; i++, icon++) if (icon->getInstance() == instanceOf) icon->setInstance(instanceIcon); // Recompute positions and all update(); } //////////////////////////////////////////////////////////////////////// // // Description: // Returns a path from the given root of the graph to the given // graph icon's root. The path is ref'ed. // SoPath * DisplayGraph::findPathToIcon(SoNode *root, GraphIcon *icon) // //////////////////////////////////////////////////////////////////////// { SoSearchAction sa; SoPath *path; // This may be called with a NULL icon pointer. if (icon == NULL) return NULL; sa.setNode(icon->getIconRoot()); sa.setInterest(SoSearchAction::FIRST); sa.apply(root); // Ref the path so it won't go away path = sa.getPath(); if (path == NULL) { fprintf(stderr, "Yow! Can't find path to node!\n"); return NULL; } path->ref(); return path; } //////////////////////////////////////////////////////////////////////// // // Description: // This is used by selection pasting to determine where to draw the // feedback icon and where in the graph to insert the selection. It // returns TRUE if it was able to find a good place to paste. The // parentIcon parameter returns the parent under which to paste, // and the childIndex parameter returns the index of the child that // the pasted selection will become. The xFeedback and yFeedback // parameters indicate where the feedback should be centered. // SbBool DisplayGraph::getPasteLocation(float x, float y, GraphIcon *&parentIcon, int &childIndex, float &xFeedback, float &yFeedback) // //////////////////////////////////////////////////////////////////////// { // X coordinate of feedback to right of given icon #define NEXT_X_RIGHT(rightIcon) \ (rightIcon->getPosition()[0] + \ .5 * (rightIcon->getSubgraphSize()[0] + iconSpacing[0])) // X coordinate of feedback to left of given icon #define NEXT_X_LEFT(leftIcon) \ (leftIcon->getPosition()[0] - \ .5 * (leftIcon->getSubgraphSize()[0] + iconSpacing[0])) // X coordinate of feedback between given icons #define X_BETWEEN(leftIcon, rightIcon) \ (.5 * (leftIcon->getPosition()[0] + rightIcon->getPosition()[0])) // Y coordinate of feedback to left or right of given icon #define NEXT_Y(icon) (icon->getPosition()[1] - .5 * icon->getSize()[1]) GraphIcon *icon, *nextChild, *lastChild; SbVec2f point(x, y); float xPos, yPos, xSize, ySize; float xl, xr, xFudge, yb, yt; SbBox2f iconBox; int index, i; for (i = 0, icon = icons; i < numIcons; i++, icon++) { if (! icon->isVisible()) continue; // Find the extent of the icon bounding box icon->getPosition(xPos, yPos); icon->getSize(xSize, ySize); xl = xPos - .5 * xSize; xr = xPos + .5 * xSize; yb = yPos - ySize; yt = yPos; iconBox.setBounds(xl, yb, xr, yt); //------------------------------------------------------------------ // The point is on the icon //------------------------------------------------------------------ if (iconBox.intersect(point)) { // See if it's a group if (icon->isGroup()) { parentIcon = icon; // If group has no children, draw feedback below icon if (icon->getNumChildren() == 0) { childIndex = 0; xFeedback = xPos; yFeedback = yb - iconSpacing[1]; return TRUE; } // If open group, draw feedback to right of last child else if (icon->isOpen()) { childIndex = icon->getNumChildren(); lastChild = icon->getChild(childIndex - 1); xFeedback = NEXT_X_RIGHT(lastChild); yFeedback = NEXT_Y(lastChild); } // If closed group, draw feedback below icon else { childIndex = icon->getNumChildren(); xFeedback = xPos; yFeedback = yb - iconSpacing[1]; } return TRUE; } // If non-group, draw feedback halfway to next sibling (if // any) to right or left, depending on whether the cursor // is to the right or left of the center of the icon else { parentIcon = icon->getParent(); index = icon->getChildIndex(); // Cursor is on left side if (x < xPos) { childIndex = index; if (index == 0) xFeedback = NEXT_X_LEFT(icon); else { nextChild = parentIcon->getChild(index - 1); xFeedback = X_BETWEEN(nextChild, icon); } } // Cursor is on right side else { childIndex = index + 1; if (index == parentIcon->getNumChildren() - 1) xFeedback = NEXT_X_RIGHT(icon); else { nextChild = parentIcon->getChild(index + 1); xFeedback = X_BETWEEN(icon, nextChild); } } yFeedback = yPos - .5 * ySize; return TRUE; } } //------------------------------------------------------------------ // The point is NOT on the icon, but it may be close enuf to one side //------------------------------------------------------------------ if ((parentIcon = icon->getParent()) != NULL) { index = icon->getChildIndex(); // If this is the first child of a group, see if the point // is close enough to its left if (index == 0) xFudge = 0.5 * icon->getSubgraphSize()[0] + iconSpacing[0]; // Otherwise, see if the point is between it and the next // icon to the left else { nextChild = parentIcon->getChild(index - 1); xFudge = xPos - nextChild->getPosition()[0]; } iconBox.setBounds(xPos - xFudge, yb, xl, yt); if (iconBox.intersect(point)) { childIndex = index; if (index == 0) xFeedback = NEXT_X_LEFT(icon); else xFeedback = X_BETWEEN(icon, nextChild); yFeedback = yPos - .5 * ySize; return TRUE; } // If this is the last child of a group, see if the point // is close enough to its right if (index == parentIcon->getNumChildren() - 1) { xFudge = 0.5 * (icon->getSubgraphSize()[0] + iconSpacing[0]); iconBox.setBounds(xr, yb, xPos + xFudge, yt); if (iconBox.intersect(point)) { childIndex = index + 1; xFeedback = xPos + xFudge; yFeedback = yPos - .5 * ySize; return TRUE; } } } //------------------------------------------------------------------ // Now see if it is below a closed or childless group icon //------------------------------------------------------------------ // See if the point is close below a closed or childless group if (icon->isGroup() && (icon->isClosed() || icon->getNumChildren() == 0)) { iconBox.setBounds(xl, yb - iconSpacing[1], xr, yb); if (iconBox.intersect(point)) { parentIcon = icon; childIndex = icon->getNumChildren(); xFeedback = xPos; yFeedback = yb - iconSpacing[1]; return TRUE; } } } //------------------------------------------------------------------ // None of the above... //------------------------------------------------------------------ return FALSE; } #undef NEXT_X_RIGHT #undef NEXT_X_LEFT #undef X_BETWEEN #undef NEXT_Y //////////////////////////////////////////////////////////////////////// // // Description: // Counts nodes in subgraph rooted by node // int DisplayGraph::countNodes(const SoNode *root) // //////////////////////////////////////////////////////////////////////// { int num = 1; // See if node was already counted - if so, it's an instance if (! nodeDict.enter((unsigned long) root, (void *) 1)) ; // Count children if this node is a group else if (root->isOfType(SoGroup::getClassTypeId())) { const SoGroup *g = (const SoGroup *) root; int i; for (i = 0; i < g->getNumChildren(); i++) num += countNodes(g->getChild(i)); } return num; } //////////////////////////////////////////////////////////////////////// // // Description: // Makes sure state of icons rooted by given icon is consistent. // void DisplayGraph::checkIconState(GraphIcon *root, SbBool shouldBeHidden) // //////////////////////////////////////////////////////////////////////// { if (shouldBeHidden && root->isVisible()) root->hide(); // Hide children if necessary if (root->isGroup()) { if (! shouldBeHidden && root->isClosed()) shouldBeHidden = TRUE; for (int i = 0; i < root->getNumChildren(); i++) checkIconState(root->getChild(i), shouldBeHidden); } } //////////////////////////////////////////////////////////////////////// // // Description: // Sets up the coordinate3 and lineset nodes to display connecting // lines between icons. // void DisplayGraph::buildLines() // //////////////////////////////////////////////////////////////////////// { int numVisible, numLines, i, j, c; SbVec3f *pts; int32_t *inds; GraphIcon *icon; float hy, yBar, x, y, sx, sy, cx1, cy1, cx2, cy2; // Count non-hidden icons numVisible = 0; for (i = 0; i < numIcons; i++) if (icons[i].isVisible()) numVisible++; // All nodes except the root have 1 line above them numLines = numVisible - 1; // All open groups with > 1 children have 2 lines below them for (i = 0; i < numIcons; i++) if (icons[i].isGroup() && icons[i].getNumChildren() > 1 && icons[i].isOpen()) numLines += 2; // No groups? We're done! if (numLines <= 0) { lineSet->coordIndex.deleteValues(0); return; } hy = iconSpacing[1] / 2.0; pts = new SbVec3f[numLines * 2]; inds = new int32_t[numLines * 3]; // Fill in coordinates for (i = c = 0, icon = icons; i < numIcons; i++, icon++) { icon->getPosition(x, y); icon->getSize(sx, sy); if (icons[i].isGroup() && icons[i].getNumChildren() > 1 && icons[i].isOpen()) { yBar = y - sy - hy; // Line from top icon down pts[c+0].setValue(x, yBar + hy, 0.0); pts[c+1].setValue(x, yBar, 0.0); // Horizontal bar icon->getChild(0)->getPosition(cx1, cy1); icon->getChild(icon->getNumChildren() - 1)->getPosition(cx2, cy2); pts[c+2].setValue(cx1, yBar, 0.0); pts[c+3].setValue(cx2, yBar, 0.0); c += 4; for (j = 0; j < icons[i].getNumChildren(); j++) { icon->getChild(j)->getPosition(cx1, cy1); pts[c+0].setValue(cx1, yBar, 0.0); pts[c+1].setValue(cx1, cy1, 0.0); c += 2; } } else if (icons[i].isGroup() && icons[i].getNumChildren() == 1 && icons[i].isOpen()) { // Line from top icon down to child icon->getChild(0)->getPosition(cx1, cy1); pts[c+0].setValue(x, y - sy, 0.0); pts[c+1].setValue(cx1, cy1, 0.0); c += 2; } } // Fill in indices c = 0; for (i = 0; i < numLines; i++) { inds[c+0] = i * 2; inds[c+1] = i * 2 + 1; inds[c+2] = SO_END_LINE_INDEX; c += 3; } coords->point.setValues(0, numLines * 2, pts); lineSet->coordIndex.setValues(0, numLines * 3, inds); // Delete old values if not needed any more if (lineSet->coordIndex.getNum() > numLines * 3) lineSet->coordIndex.deleteValues(numLines * 3); } //////////////////////////////////////////////////////////////////////// // // Description: // Makes sure the given icon is visible. // void DisplayGraph::makeIconVisible(GraphIcon *icon) // //////////////////////////////////////////////////////////////////////// { // Could this be called on the root? I think not! It's always visible! if (icon->getParent() == NULL) return; // Make sure parent is visible if (! icon->getParent()->isVisible()) makeIconVisible(icon->getParent()); // Make sure parent is open icon->getParent()->openGroup(FALSE); } //////////////////////////////////////////////////////////////////////// // // Description: // Sets instCoords so that line between current instance and what // is an instance of will be drawn correctly. // void DisplayGraph::setInstanceCoords() // //////////////////////////////////////////////////////////////////////// { // Find node the shown instance icon is an instance of GraphIcon *instanceOf = instShown->getInstance(); // Set instance line to join the center of the two icons float x1, y1, x2, y2; float sx1, sy1, sx2, sy2; instShown->getPosition(x1, y1); instShown->getSize(sx1, sy1); instanceOf->getPosition(x2, y2); instanceOf->getSize(sx2, sy2); // Line connects to center of icons y1 -= sy1 / 2.0; y2 -= sy2 / 2.0; instCoords->point.set1Value(0, x1, y1, 0.0); instCoords->point.set1Value(1, x1 + .2 * (x2-x1), y1 + .2 * (y2-y1), 3.0); instCoords->point.set1Value(2, x1 + .8 * (x2-x1), y1 + .8 * (y2-y1), 3.0); instCoords->point.set1Value(3, x2, y2, 0.0); } //////////////////////////////////////////////////////////////////////// // // Description: // Finds the icon graph to use for the given node. // SoNode * DisplayGraph::findIconGraph(SoNode *node) // //////////////////////////////////////////////////////////////////////// { // Look in dictionary for icon for this node class. If not found, // check parent class. Repeat until an icon is found. Since SoNode // always has a valid icon, this loop will always terminate // successfully. SoType type; void *graphPtr; type = node->getTypeId(); while (TRUE) { if (iconDict->find((unsigned long) * (int *) &type, graphPtr)) return (SoNode *) graphPtr; type = type.getParent(); } }
27.927189
78
0.58008
OpenXIP
c03b022446375a2ee2ea48433cd3168b12cb15fb
2,524
cpp
C++
Crimson/src/GPUDevice.cpp
A-RAVEN/Crimson
a170beb9bf43ba135468f9593f38cf0a21865afe
[ "MIT" ]
2
2020-10-19T15:59:27.000Z
2020-10-19T15:59:37.000Z
Crimson/src/GPUDevice.cpp
A-RAVEN/Crimson
a170beb9bf43ba135468f9593f38cf0a21865afe
[ "MIT" ]
null
null
null
Crimson/src/GPUDevice.cpp
A-RAVEN/Crimson
a170beb9bf43ba135468f9593f38cf0a21865afe
[ "MIT" ]
null
null
null
#include <include/GPUDevice.h> #include <headers/VulkanInstance.h> #include <headers/VulkanGPUDevice.h> namespace Crimson { GPUDeviceManager* GPUDeviceManager::p_Singleton = nullptr; GPUDeviceManager::GPUDeviceManager(){} GPUDeviceManager::~GPUDeviceManager() { } PGPUDevice GPUDeviceManager::CreateVulkanDevice(uint32_t physics_device_id, uint32_t prefered_graphics_queue_num, uint32_t prefered_compute_queue_num, uint32_t prefered_transfer_queue_num) { VulkanGPUDevice* new_device = new VulkanGPUDevice(); new_device->InitVulkanDevice(physics_device_id, prefered_graphics_queue_num, prefered_compute_queue_num, prefered_transfer_queue_num); return new_device; } void GPUDeviceManager::Init() { if (p_Singleton == nullptr) { p_Singleton = new GPUDeviceManager(); } } void GPUDeviceManager::InitAPIContext(EAPIType type, bool enable_debug_system) { switch (type) { case EAPIType::E_API_TYPE_VULKAN: #ifndef CRIMSON_NO_VULKAN VulkanInstance::Init(enable_debug_system); #endif break; case EAPIType::E_API_TYPE_D3D12: #ifndef CRIMSON_NO_D3D12 //init d3d12 instance #endif break; } } GPUDeviceManager* GPUDeviceManager::Get() { return p_Singleton; } void GPUDeviceManager::Dispose() { if (p_Singleton != nullptr) { delete p_Singleton; p_Singleton = nullptr; } } PGPUDevice GPUDeviceManager::CreateDevice(std::string const& name, uint32_t physics_device_id, EAPIType type, uint32_t prefered_graphics_queue_num, uint32_t prefered_compute_queue_num, uint32_t prefered_transfer_queue_num) { PGPUDevice return_device = nullptr; switch (type) { case EAPIType::E_API_TYPE_VULKAN: #ifndef CRIMSON_NO_VULKAN return_device = CreateVulkanDevice(physics_device_id, prefered_graphics_queue_num, prefered_compute_queue_num, prefered_transfer_queue_num); return_device->m_Name = name; #endif break; case EAPIType::E_API_TYPE_D3D12: #ifndef CRIMSON_NO_D3D12 #endif break; } if (return_device == nullptr) { //Debug Log } else { m_DeviceList.push_back(return_device); m_DeviceMap.insert(std::make_pair(name, m_DeviceList.size() - 1)); } return return_device; } PGPUDevice GPUDeviceManager::GetDevice(std::string const& name) { auto find = m_DeviceMap.find(name); if (find != m_DeviceMap.end()) { return m_DeviceList[find->second]; } return nullptr; } PGPUDevice GPUDeviceManager::GetDevice(uint32_t id) { if (id < m_DeviceList.size()) { return m_DeviceList[id]; } return nullptr; } }
24.745098
223
0.759509
A-RAVEN
c03ce19fb8816949fd843abdfc463ce0d52ee49e
745
hpp
C++
include/Pomdog/Graphics/ShaderCompilers/GLSLCompiler.hpp
bis83/pomdog
133a9262958d539ae6d93664e6cb2207b5b6c7ff
[ "MIT" ]
null
null
null
include/Pomdog/Graphics/ShaderCompilers/GLSLCompiler.hpp
bis83/pomdog
133a9262958d539ae6d93664e6cb2207b5b6c7ff
[ "MIT" ]
null
null
null
include/Pomdog/Graphics/ShaderCompilers/GLSLCompiler.hpp
bis83/pomdog
133a9262958d539ae6d93664e6cb2207b5b6c7ff
[ "MIT" ]
null
null
null
// Copyright (c) 2013-2015 mogemimi. // Distributed under the MIT license. See LICENSE.md file for details. #ifndef POMDOG_GLSLCOMPILER_9FED2927_HPP #define POMDOG_GLSLCOMPILER_9FED2927_HPP #include "Pomdog/Graphics/ShaderPipelineStage.hpp" #include "Pomdog/Basic/Export.hpp" #include <memory> #include <cstddef> namespace Pomdog { class GraphicsDevice; class Shader; namespace ShaderCompilers { struct POMDOG_EXPORT GLSLCompiler final { static std::unique_ptr<Shader> CreateShader( GraphicsDevice & graphicsDevice, void const* shaderSource, std::size_t byteLength, ShaderPipelineStage pipelineStage); }; } // namespace ShaderCompilers } // namespace Pomdog #endif // POMDOG_GLSLCOMPILER_9FED2927_HPP
24.032258
70
0.767785
bis83
c03e3f9109d43c5b2aed97de8c057ed61a4521f8
357
cpp
C++
solutions/485.cpp
tdakhran/leetcode
ed680059661faae32857eaa791ca29c1d9c16120
[ "MIT" ]
null
null
null
solutions/485.cpp
tdakhran/leetcode
ed680059661faae32857eaa791ca29c1d9c16120
[ "MIT" ]
null
null
null
solutions/485.cpp
tdakhran/leetcode
ed680059661faae32857eaa791ca29c1d9c16120
[ "MIT" ]
null
null
null
#include <vector> class Solution { public: int findMaxConsecutiveOnes(std::vector<int>& nums) { size_t last_zero = 0; size_t result = 0; for (size_t pos = 0; pos < nums.size(); ++pos) { last_zero = nums[pos] ? last_zero : pos + 1; result = std::max(result, pos - last_zero + 1); } return static_cast<int>(result); } };
23.8
54
0.602241
tdakhran
c03e483a44e9c3630a08aecc49203299900e5ea5
10,503
cpp
C++
libs/obs/src/VelodyneCalibration.cpp
zarmomin/mrpt
1baff7cf8ec9fd23e1a72714553bcbd88c201966
[ "BSD-3-Clause" ]
1
2019-09-05T05:20:51.000Z
2019-09-05T05:20:51.000Z
libs/obs/src/VelodyneCalibration.cpp
gao-ouyang/mrpt
4af5fdf7e45b00be4a64c3d4f009acb9ef415ec7
[ "BSD-3-Clause" ]
null
null
null
libs/obs/src/VelodyneCalibration.cpp
gao-ouyang/mrpt
4af5fdf7e45b00be4a64c3d4f009acb9ef415ec7
[ "BSD-3-Clause" ]
1
2019-09-11T02:55:04.000Z
2019-09-11T02:55:04.000Z
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file | | See: https://www.mrpt.org/Authors - All rights reserved. | | Released under BSD License. See: https://www.mrpt.org/License | +------------------------------------------------------------------------+ */ #include "obs-precomp.h" // Precompiled headers #include <mrpt/config.h> #include <mrpt/core/bits_math.h> #include <mrpt/core/exceptions.h> #include <mrpt/obs/VelodyneCalibration.h> #include <cmath> #include <fstream> #include <iostream> #include <map> #include <sstream> #if MRPT_HAS_YAMLCPP #include <yaml-cpp/yaml.h> #endif #undef _UNICODE // JLBC, for xmlParser #include "xmlparser/xmlParser.h" // ======= Default calibration files ======================== #include "velodyne_default_calib_HDL-32.h" #include "velodyne_default_calib_VLP-16.h" #include "velodyne_default_calib_hdl64e-s3.h" // ======= End of default calibration files ================= using namespace std; using namespace mrpt::obs; VelodyneCalibration::PerLaserCalib::PerLaserCalib() = default; VelodyneCalibration::VelodyneCalibration() : laser_corrections(0) {} bool VelodyneCalibration::internal_loadFromXMLNode(void* node_ptr) { XMLNode& root = *reinterpret_cast<XMLNode*>(node_ptr); XMLNode node_bs = root.getChildNode("boost_serialization"); if (node_bs.isEmpty()) throw std::runtime_error("Cannot find XML node: 'boost_serialization'"); XMLNode node_DB = node_bs.getChildNode("DB"); if (node_DB.isEmpty()) throw std::runtime_error("Cannot find XML node: 'DB'"); XMLNode node_enabled_ = node_DB.getChildNode("enabled_"); if (node_enabled_.isEmpty()) throw std::runtime_error("Cannot find XML node: 'enabled_'"); // Clear previous contents: clear(); XMLNode node_enabled_count = node_enabled_.getChildNode("count"); if (node_enabled_count.isEmpty()) throw std::runtime_error("Cannot find XML node: 'enabled_::count'"); const int nEnabled = atoi(node_enabled_count.getText()); if (nEnabled <= 0 || nEnabled > 10000) throw std::runtime_error( "Senseless value found reading 'enabled_::count'"); int enabledCount = 0; for (int i = 0; i < nEnabled; i++) { XMLNode node_enabled_ith = node_enabled_.getChildNode("item", i); if (node_enabled_ith.isEmpty()) throw std::runtime_error( "Cannot find the expected number of XML nodes: " "'enabled_::item'"); const int enable_val = atoi(node_enabled_ith.getText()); if (enable_val) ++enabledCount; } // enabledCount = number of lasers in the LIDAR this->laser_corrections.resize(enabledCount); XMLNode node_points_ = node_DB.getChildNode("points_"); if (node_points_.isEmpty()) throw std::runtime_error("Cannot find XML node: 'points_'"); for (int i = 0;; ++i) { XMLNode node_points_item = node_points_.getChildNode("item", i); if (node_points_item.isEmpty()) break; XMLNode node_px = node_points_item.getChildNode("px"); if (node_px.isEmpty()) throw std::runtime_error( "Cannot find XML node: 'points_::item::px'"); XMLNode node_px_id = node_px.getChildNode("id_"); if (node_px_id.isEmpty()) throw std::runtime_error( "Cannot find XML node: 'points_::item::px::id_'"); const int id = atoi(node_px_id.getText()); ASSERT_ABOVEEQ_(id, 0); if (id >= enabledCount) continue; // ignore PerLaserCalib* plc = &laser_corrections[id]; { XMLNode node = node_px.getChildNode("rotCorrection_"); if (node.isEmpty()) throw std::runtime_error( "Cannot find XML node: " "'points_::item::px::rotCorrection_'"); plc->azimuthCorrection = atof(node.getText()); } { XMLNode node = node_px.getChildNode("vertCorrection_"); if (node.isEmpty()) throw std::runtime_error( "Cannot find XML node: " "'points_::item::px::vertCorrection_'"); plc->verticalCorrection = atof(node.getText()); } { XMLNode node = node_px.getChildNode("distCorrection_"); if (node.isEmpty()) throw std::runtime_error( "Cannot find XML node: " "'points_::item::px::distCorrection_'"); plc->distanceCorrection = 0.01f * atof(node.getText()); } { XMLNode node = node_px.getChildNode("vertOffsetCorrection_"); if (node.isEmpty()) throw std::runtime_error( "Cannot find XML node: " "'points_::item::px::vertOffsetCorrection_'"); plc->verticalOffsetCorrection = 0.01f * atof(node.getText()); } { XMLNode node = node_px.getChildNode("horizOffsetCorrection_"); if (node.isEmpty()) throw std::runtime_error( "Cannot find XML node: " "'points_::item::px::horizOffsetCorrection_'"); plc->horizontalOffsetCorrection = 0.01f * atof(node.getText()); } plc->sinVertCorrection = std::sin(mrpt::DEG2RAD(plc->verticalCorrection)); plc->cosVertCorrection = std::cos(mrpt::DEG2RAD(plc->verticalCorrection)); plc->sinVertOffsetCorrection = plc->sinVertCorrection * plc->sinVertOffsetCorrection; plc->cosVertOffsetCorrection = plc->cosVertCorrection * plc->sinVertOffsetCorrection; } return true; // Ok } bool VelodyneCalibration::loadFromXMLText(const std::string& xml_file_contents) { try { XMLResults results; XMLNode root = XMLNode::parseString(xml_file_contents.c_str(), nullptr, &results); if (results.error != eXMLErrorNone) { cerr << "[VelodyneCalibration::loadFromXMLText] Error parsing XML " "content: " << XMLNode::getError(results.error) << " at line " << results.nLine << ":" << results.nColumn << endl; return false; } return internal_loadFromXMLNode(reinterpret_cast<void*>(&root)); } catch (exception& e) { cerr << "[VelodyneCalibration::loadFromXMLFile] Exception:" << endl << e.what() << endl; return false; } } /** Loads calibration from file. \return false on any error, true on success */ // See reference code in: // vtkVelodyneHDLReader::vtkInternal::LoadCorrectionsFile() bool VelodyneCalibration::loadFromXMLFile( const std::string& velodyne_calibration_xml_filename) { try { XMLResults results; XMLNode root = XMLNode::parseFile( velodyne_calibration_xml_filename.c_str(), nullptr, &results); if (results.error != eXMLErrorNone) { cerr << "[VelodyneCalibration::loadFromXMLFile] Error loading XML " "file: " << XMLNode::getError(results.error) << " at line " << results.nLine << ":" << results.nColumn << endl; return false; } return internal_loadFromXMLNode(reinterpret_cast<void*>(&root)); } catch (exception& e) { cerr << "[VelodyneCalibration::loadFromXMLFile] Exception:" << endl << e.what() << endl; return false; } } bool VelodyneCalibration::loadFromYAMLText(const std::string& str) { #if MRPT_HAS_YAMLCPP try { YAML::Node root = YAML::Load(str); // Clear previous contents: clear(); const auto num_lasers = root["num_lasers"].as<unsigned int>(0); ASSERT_(num_lasers > 0); this->laser_corrections.resize(num_lasers); auto lasers = root["lasers"]; ASSERT_EQUAL_(lasers.size(), num_lasers); for (auto item : lasers) { const auto id = item["laser_id"].as<unsigned int>(9999999); ASSERT_(id < num_lasers); PerLaserCalib* plc = &laser_corrections[id]; plc->azimuthCorrection = item["rot_correction"].as<double>(); plc->verticalCorrection = item["vert_correction"].as<double>(); plc->distanceCorrection = item["dist_correction"].as<double>(); plc->verticalOffsetCorrection = item["vert_offset_correction"].as<double>(); plc->horizontalOffsetCorrection = item["horiz_offset_correction"].as<double>(); plc->sinVertCorrection = std::sin(plc->verticalCorrection); plc->cosVertCorrection = std::cos(plc->verticalCorrection); plc->sinVertOffsetCorrection = plc->sinVertCorrection * plc->sinVertOffsetCorrection; plc->cosVertOffsetCorrection = plc->cosVertCorrection * plc->sinVertOffsetCorrection; } return true; // all ok } catch (const std::exception& e) { std::cerr << "[VelodyneCalibration::loadFromYAMLText]" << e.what() << "\n"; return false; } #else THROW_EXCEPTION("This method requires building MRPT with YAML-CPP."); #endif } bool VelodyneCalibration::loadFromYAMLFile(const std::string& filename) { #if MRPT_HAS_YAMLCPP try { std::ifstream f(filename); if (!f.is_open()) THROW_EXCEPTION_FMT("Cannot open file: '%s'", filename.c_str()); // Load file: std::string str( (std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>()); return loadFromYAMLText(str); } catch (const std::exception& e) { std::cerr << "[VelodyneCalibration::loadFromYAMLFile]" << e.what() << "\n"; return false; } #else THROW_EXCEPTION("This method requires building MRPT with YAML-CPP."); #endif } bool VelodyneCalibration::empty() const { return laser_corrections.empty(); } void VelodyneCalibration::clear() { laser_corrections.clear(); } static std::map<std::string, VelodyneCalibration> cache_default_calibs; // It always return a calibration structure, but it may be empty if the model // name is unknown. const VelodyneCalibration& VelodyneCalibration::LoadDefaultCalibration( const std::string& lidar_model) { // Cached calib data? auto it = cache_default_calibs.find(lidar_model); if (it != cache_default_calibs.end()) return it->second; VelodyneCalibration result; // Leave empty to indicate unknown model std::string xml_contents, yaml_contents; if (lidar_model == "VLP16") xml_contents = velodyne_default_calib_VLP16; else if (lidar_model == "HDL32") xml_contents = velodyne_default_calib_HDL32; else if (lidar_model == "HDL64") yaml_contents = velodyne_default_calib_HDL64E_S3; if (!xml_contents.empty()) { if (!result.loadFromXMLText(xml_contents)) std::cerr << "[VelodyneCalibration::LoadDefaultCalibration] Error " "parsing default XML calibration file for model '" << lidar_model << "'\n"; } else if (!yaml_contents.empty()) { if (!result.loadFromYAMLText(yaml_contents)) std::cerr << "[VelodyneCalibration::LoadDefaultCalibration] Error " "parsing default YAML calibration file for model '" << lidar_model << "'\n"; } cache_default_calibs[lidar_model] = result; return cache_default_calibs[lidar_model]; }
30.531977
80
0.679996
zarmomin
c054fea5ce70b6c81c605493ba9f5e7f6f277bc4
1,614
hpp
C++
Cpp_and_Hpp_files/joyStick.hpp
ThePatman3/IPASS_repository
08fb3c2b40a5b8b1191f6bc1bf52b4251dd03510
[ "MIT" ]
null
null
null
Cpp_and_Hpp_files/joyStick.hpp
ThePatman3/IPASS_repository
08fb3c2b40a5b8b1191f6bc1bf52b4251dd03510
[ "MIT" ]
null
null
null
Cpp_and_Hpp_files/joyStick.hpp
ThePatman3/IPASS_repository
08fb3c2b40a5b8b1191f6bc1bf52b4251dd03510
[ "MIT" ]
null
null
null
#ifndef JOYSTICK_HPP #define JOYSTICK_HPP #include "hwlib.hpp" /// @file namespace jstlib{ /// \brief /// joyStick class /// \details /// This class represents a analog xy-axis joystick without button. /// This class has functions to get the angle of the x and y axis rated using a number between -10 and 10 and functions to return the analog data directly. class joyStick{ private: hwlib::target::pin_adc & pinX; hwlib::target::pin_adc & pinY; public: /// \brief /// joyStick constructor /// \details /// This constructor constructs a joyStick from two hwlib::pin_adc for the x and y axis of the joystick. joyStick(hwlib::target::pin_adc & _pinX, hwlib::target::pin_adc & _pinY): pinX(_pinX), pinY(_pinY) {} /// \brief /// getX function /// \details /// This function returns a value between -10 and 10 to represent the angle the joystick currently has on its x-axis, /// where -10 is all the way to the left, and 10 is all the way to the right. int getX(); /// \brief /// getY function /// \details /// This function returns a value between -10 and 10 to represent the angle the joystick currently has on its y-axis, /// where -10 is all the way down, and 10 is all the way up. int getY(); /// \brief /// getXRaw function /// \details /// This function returns a value between 0 and 4096 to represent the angle the joystick currently has on its x-axis int getXRaw(); /// \brief /// getYRaw function /// \details /// This function returns a value between 0 and 4096 to represent the angle the joystick currently has on its y-axis. int getYRaw(); }; } // jstlib; #endif
28.821429
155
0.698885
ThePatman3
c0563d54c2e60c190cb3bc5930845d7b59f6f8ce
4,178
cpp
C++
src/integration_tests/camera_take_photo.cpp
hamishwillee/MAVSDK
e7f4e27bdd4442b91b623abf6ac86d1cbb188244
[ "BSD-3-Clause" ]
115
2018-07-11T00:18:12.000Z
2019-06-05T22:10:23.000Z
src/integration_tests/camera_take_photo.cpp
hamishwillee/MAVSDK
e7f4e27bdd4442b91b623abf6ac86d1cbb188244
[ "BSD-3-Clause" ]
228
2018-07-09T12:03:21.000Z
2019-06-07T09:51:14.000Z
src/integration_tests/camera_take_photo.cpp
hamishwillee/MAVSDK
e7f4e27bdd4442b91b623abf6ac86d1cbb188244
[ "BSD-3-Clause" ]
104
2018-07-19T09:45:16.000Z
2019-06-05T18:40:35.000Z
#include "integration_test_helper.h" #include "mavsdk.h" #include "system.h" #include "plugins/camera/camera.h" #include "plugins/camera_server/camera_server.h" using namespace mavsdk; static void receive_capture_info(Camera::CaptureInfo capture_info, bool& received_capture_info); TEST(CameraTest, TakePhotoSingle) { Mavsdk mavsdk_groundstation; mavsdk_groundstation.set_configuration( Mavsdk::Configuration{Mavsdk::Configuration::UsageType::GroundStation}); Mavsdk mavsdk_camera; mavsdk_camera.set_configuration( Mavsdk::Configuration{Mavsdk::Configuration::UsageType::Camera}); ASSERT_EQ(mavsdk_groundstation.add_any_connection("udp://:17000"), ConnectionResult::Success); ASSERT_EQ(mavsdk_camera.add_any_connection("udp://127.0.0.1:17000"), ConnectionResult::Success); auto camera_server = CameraServer{mavsdk_camera.server_component_by_type(Mavsdk::ServerComponentType::Camera)}; camera_server.subscribe_take_photo([&camera_server](int32_t index) { LogInfo() << "Let's take photo " << index; CameraServer::CaptureInfo info; info.index = index; info.is_success = true; camera_server.respond_take_photo(CameraServer::TakePhotoFeedback::Ok, info); }); // Wait for system to connect via heartbeat. std::this_thread::sleep_for(std::chrono::seconds(2)); ASSERT_EQ(mavsdk_groundstation.systems().size(), 1); auto system = mavsdk_groundstation.systems().at(0); ASSERT_TRUE(system->has_camera()); auto camera = Camera{system}; // We want to take the picture in photo mode. EXPECT_EQ(camera.set_mode(Camera::Mode::Photo), Camera::Result::Success); bool received_capture_info = false; camera.subscribe_capture_info([&received_capture_info](Camera::CaptureInfo capture_info) { receive_capture_info(capture_info, received_capture_info); }); EXPECT_EQ(camera.take_photo(), Camera::Result::Success); std::this_thread::sleep_for(std::chrono::seconds(1)); EXPECT_TRUE(received_capture_info); } TEST(CameraTest, TakePhotosMultiple) { Mavsdk mavsdk; const int num_photos_to_take = 3; ConnectionResult ret = mavsdk.add_udp_connection(); ASSERT_EQ(ret, ConnectionResult::Success); // Wait for system to connect via heartbeat. std::this_thread::sleep_for(std::chrono::seconds(2)); auto system = mavsdk.systems().at(0); ASSERT_TRUE(system->has_camera()); auto camera = std::make_shared<Camera>(system); // We want to take the picture in photo mode. EXPECT_EQ(camera->set_mode(Camera::Mode::Photo), Camera::Result::Success); std::this_thread::sleep_for(std::chrono::seconds(1)); bool received_capture_info = false; camera->subscribe_capture_info([&received_capture_info](Camera::CaptureInfo capture_info) { receive_capture_info(capture_info, received_capture_info); }); for (unsigned i = 0; i < num_photos_to_take; ++i) { const auto result = camera->take_photo(); EXPECT_EQ(result, Camera::Result::Success); LogDebug() << "taking picture: " << i; std::this_thread::sleep_for(std::chrono::seconds(5)); EXPECT_TRUE(received_capture_info); received_capture_info = false; } } void receive_capture_info(Camera::CaptureInfo capture_info, bool& received_capture_info) { LogInfo() << "New capture at " << capture_info.position.latitude_deg << ", " << capture_info.position.longitude_deg << ", " << capture_info.position.absolute_altitude_m << " m, " << capture_info.position.relative_altitude_m << " m (relative to home)."; LogInfo() << "Time: " << capture_info.time_utc_us << " us."; LogInfo() << "Attitude: " << capture_info.attitude_quaternion.w << ", " << capture_info.attitude_quaternion.x << ", " << capture_info.attitude_quaternion.y << ", " << capture_info.attitude_quaternion.z << "."; LogInfo() << "Result: " << (capture_info.is_success ? "success" : "fail") << "."; LogInfo() << "Saved to " << capture_info.file_url << " (" << capture_info.index << ")."; received_capture_info = true; }
38.330275
100
0.692676
hamishwillee
c058e70b74405a236a908b79b42ae8a02f853c31
11,400
cpp
C++
src/module_loader/test/function_offer.cpp
RobertLeahy/Module-Loader
50c9aa4d00b5c827d31c83fd3ff3294c3d4e7c3b
[ "Unlicense" ]
2
2017-02-15T05:28:34.000Z
2017-11-06T15:25:00.000Z
src/module_loader/test/function_offer.cpp
RobertLeahy/Module-Loader
50c9aa4d00b5c827d31c83fd3ff3294c3d4e7c3b
[ "Unlicense" ]
null
null
null
src/module_loader/test/function_offer.cpp
RobertLeahy/Module-Loader
50c9aa4d00b5c827d31c83fd3ff3294c3d4e7c3b
[ "Unlicense" ]
null
null
null
#include <module_loader/function_offer.hpp> #include <functional> #include <typeinfo> #include <utility> #include <catch.hpp> namespace module_loader { namespace test { namespace { SCENARIO("module_loader::function_offer objects wrap a functor and provide a module_loader::object from its return value when fulfilled","[module_loader][function_offer]") { GIVEN("A module_loader::function_offer which wraps a functor which returns a value") { using function_type = std::function<int (int)>; int i = 0; function_type function = [&] (int n) noexcept { i = n; return n + 1; }; function_offer<function_type,int> offer(function); THEN("Its name is correct") { CHECK(offer.name() == "int"); } THEN("Its type is correct") { CHECK(offer.type() == typeid(int)); } THEN("It provides the correct types") { auto && set = offer.provides(); CHECK(set.size() == 1U); CHECK(set.count(typeid(int)) == 1U); } THEN("It requests the correct types") { auto && rs = offer.requests(); REQUIRE(rs.size() == 1U); auto && r = rs.front(); CHECK(r.type() == typeid(int)); CHECK(r.lower_bound() == 1U); CHECK(r.upper_bound() == 1U); } WHEN("It is fulfilled and a std::unique_ptr is requested") { int j = 5; void * p = &j; decltype(offer)::fulfill_type fulfill; fulfill.push_back(std::make_pair(&p,1U)); auto ptr = offer.fulfill(fulfill); THEN("The wrapped functor is invoked") { CHECK(i == 5); } THEN("An object is returned") { REQUIRE(ptr); AND_THEN("Its type is correct") { CHECK(ptr->type() == typeid(int)); } AND_THEN("It provides the correct types") { auto && set = ptr->provides(); CHECK(set.size() == 1U); CHECK(set.count(typeid(int)) == 1U); } AND_THEN("Its name is correct") { CHECK(ptr->name() == "int"); } AND_THEN("Its value is correct") { auto p = ptr->get(); REQUIRE(p); CHECK(*static_cast<int *>(p) == 6); } } } WHEN("It is fulfilled and a std::shared_ptr is requested") { int j = 5; void * p = &j; decltype(offer)::fulfill_type fulfill; fulfill.push_back(std::make_pair(&p,1U)); auto ptr = offer.fulfill_shared(fulfill); THEN("The wrapped functor is invoked") { CHECK(i == 5); } THEN("An object is returned") { REQUIRE(ptr); AND_THEN("Its type is correct") { CHECK(ptr->type() == typeid(int)); } AND_THEN("It provides the correct types") { auto && set = ptr->provides(); CHECK(set.size() == 1U); CHECK(set.count(typeid(int)) == 1U); } AND_THEN("Its name is correct") { CHECK(ptr->name() == "int"); } AND_THEN("Its value is correct") { auto p = ptr->get(); REQUIRE(p); CHECK(*static_cast<int *>(p) == 6); } } } } } SCENARIO("module_loader::function_offer objects may wrap a functor which does not return a value","[module_loader][function_offer]") { GIVEN("A module_loader::function_offer which wraps a functor which does not return a value") { using function_type = std::function<void (int)>; int i = 0; function_type function = [&] (int n) noexcept { i = n; }; function_offer<function_type,int> offer(function); THEN("Its name is correct") { CHECK(offer.name() == "void"); } THEN("Its type is correct") { CHECK(offer.type() == typeid(void)); } THEN("It provides the correct types") { CHECK(offer.provides().empty()); } THEN("It requests the correct types") { auto && rs = offer.requests(); REQUIRE(rs.size() == 1U); auto && r = rs.front(); CHECK(r.type() == typeid(int)); CHECK(r.lower_bound() == 1U); CHECK(r.upper_bound() == 1U); } WHEN("It is fulfilled and a std::unique_ptr is requested") { int j = 5; void * p = &j; decltype(offer)::fulfill_type fulfill; fulfill.push_back(std::make_pair(&p,1U)); auto ptr = offer.fulfill(fulfill); THEN("The wrapped functor is invoked") { CHECK(i == 5); } THEN("An object is returned") { REQUIRE(ptr); AND_THEN("module_loader::object::get returns a null pointer") { CHECK_FALSE(ptr->get()); const auto & o = *ptr; CHECK_FALSE(o.get()); } AND_THEN("module_loader::object::type returns the std::type_info for void") { CHECK(ptr->type() == typeid(void)); } AND_THEN("module_loader::object::provides returns the empty set") { CHECK(ptr->provides().empty()); } AND_THEN("module_loader::object::name returns the correct value") { CHECK(ptr->name() == "void"); } } } WHEN("It is fulfilled and a std::shared_ptr is requested") { int j = 5; void * p = &j; decltype(offer)::fulfill_type fulfill; fulfill.push_back(std::make_pair(&p,1U)); auto ptr = offer.fulfill_shared(fulfill); THEN("The wrapped functor is invoked") { CHECK(i == 5); } THEN("An object is returned") { REQUIRE(ptr); AND_THEN("module_loader::object::get returns a null pointer") { CHECK_FALSE(ptr->get()); const auto & o = *ptr; CHECK_FALSE(o.get()); } AND_THEN("module_loader::object::type returns the std::type_info for void") { CHECK(ptr->type() == typeid(void)); } AND_THEN("module_loader::object::provides returns the empty set") { CHECK(ptr->provides().empty()); } AND_THEN("module_loader::object::name returns the correct value") { CHECK(ptr->name() == "void"); } } } } GIVEN("A module_loader::function_offer which wraps a function which does not return a value and which has a custom name") { using function_type = std::function<void ()>; function_type function = [] () noexcept { }; function_offer<function_type> offer(function,"foo"); THEN("Its name is correct") { CHECK(offer.name() == "foo"); } WHEN("It is fulfilled and a std::unique_ptr is requested") { auto ptr = offer.fulfill({}); THEN("An object is returned") { REQUIRE(ptr); AND_THEN("module_loader::object::name returns the correct value") { CHECK(ptr->name() == "foo"); } } } } } SCENARIO("module_loader::function_offer objects may wrap a functor which returns a reference","[module_loader][function_offer]") { GIVEN("A module_loader::function_offer which wraps a functor which returns a reference") { using function_type = std::function<int & (int &)>; int * i = nullptr; function_type function = [&] (int & n) noexcept -> int & { i = &n; return n; }; function_offer<function_type,int> offer(function); THEN("Its name is correct") { CHECK(offer.name() == "int"); } THEN("Its type is correct") { CHECK(offer.type() == typeid(int)); } THEN("It provides the correct types") { auto && set = offer.provides(); CHECK(set.size() == 1U); CHECK(set.count(typeid(int)) == 1U); } THEN("It requests the correct types") { auto && rs = offer.requests(); REQUIRE(rs.size() == 1U); auto && r = rs.front(); CHECK(r.type() == typeid(int)); CHECK(r.lower_bound() == 1U); CHECK(r.upper_bound() == 1U); } WHEN("It is fulfilled and a std::unique_ptr is requested") { int j = 5; void * p = &j; decltype(offer)::fulfill_type fulfill; fulfill.push_back(std::make_pair(&p,1U)); auto ptr = offer.fulfill(fulfill); THEN("The wrapped functor is invoked") { CHECK(i == &j); } THEN("An object is returned") { REQUIRE(ptr); AND_THEN("Its type is correct") { CHECK(ptr->type() == typeid(int)); } AND_THEN("It provides the correct types") { auto && set = ptr->provides(); CHECK(set.size() == 1U); CHECK(set.count(typeid(int)) == 1U); } AND_THEN("Its name is correct") { CHECK(ptr->name() == "int"); } AND_THEN("Its value is correct") { CHECK(ptr->get() == &j); } } } WHEN("It is fulfilled and a std::shared_ptr is requested") { int j = 5; void * p = &j; decltype(offer)::fulfill_type fulfill; fulfill.push_back(std::make_pair(&p,1U)); auto ptr = offer.fulfill_shared(fulfill); THEN("The wrapped functor is invoked") { CHECK(i == &j); } THEN("An object is returned") { REQUIRE(ptr); AND_THEN("Its type is correct") { CHECK(ptr->type() == typeid(int)); } AND_THEN("It provides the correct types") { auto && set = ptr->provides(); CHECK(set.size() == 1U); CHECK(set.count(typeid(int)) == 1U); } AND_THEN("Its name is correct") { CHECK(ptr->name() == "int"); } AND_THEN("Its value is correct") { CHECK(ptr->get() == &j); } } } } } SCENARIO("module_loader::function_offer objects may be provided with a custom name","[module_loader][function_offer]") { GIVEN("A module_loader::function_offer which is constructed with a custom name") { using function_type = std::function<int ()>; function_offer<function_type> offer([] () noexcept { return 5; },"foo"); THEN("Its name is correct") { CHECK(offer.name() == "foo"); } WHEN("It is fulfilled and a std::unique_ptr is requested") { auto ptr = offer.fulfill(decltype(offer)::fulfill_type{}); THEN("An object is returned") { REQUIRE(ptr); AND_THEN("Its name is correct") { CHECK(ptr->name() == "foo"); } } } WHEN("It is fulfilled and a std::shared_ptr is requested") { auto ptr = offer.fulfill_shared(decltype(offer)::fulfill_type{}); THEN("An object is returned") { REQUIRE(ptr); AND_THEN("Its name is correct") { CHECK(ptr->name() == "foo"); } } } } } SCENARIO("module_loader::make_unique_function_offer may be used to wrap functors","[module_loader][function_offer]") { GIVEN("A std::unique_ptr<module_loader::offer> obtained by calling module_loader::make_unique_function_offer") { auto ptr = module_loader::make_unique_function_offer([] () noexcept { }); THEN("Its name is correct") { CHECK(ptr->name() == "void"); } THEN("Its type is correct") { CHECK(ptr->type() == typeid(void)); } THEN("Its requests are correct") { CHECK(ptr->requests().empty()); } } GIVEN("A std::unique_ptr<module_loader::offer> obtained by calling module_loader::make_unique_function_offer with a custom name") { auto ptr = module_loader::make_unique_function_offer([] () noexcept { },"bar"); THEN("Its name is correct") { CHECK(ptr->name() == "bar"); } THEN("Its type is correct") { CHECK(ptr->type() == typeid(void)); } THEN("Its requests are correct") { CHECK(ptr->requests().empty()); } } } SCENARIO("module_loader::make_shared_function_offer may be used to wrap functors","[module_loader][function_offer]") { GIVEN("A std::shared_ptr<module_loader::offer> obtained by calling module_loader::make_shared_function_offer") { auto ptr = module_loader::make_shared_function_offer([] () noexcept { }); THEN("Its name is correct") { CHECK(ptr->name() == "void"); } THEN("Its type is correct") { CHECK(ptr->type() == typeid(void)); } THEN("Its requests are correct") { CHECK(ptr->requests().empty()); } } GIVEN("A std::shared_ptr<module_loader::offer> obtained by calling module_loader::make_shared_function_offer with a custom name") { auto ptr = module_loader::make_shared_function_offer([] () noexcept { },"bar"); THEN("Its name is correct") { CHECK(ptr->name() == "bar"); } THEN("Its type is correct") { CHECK(ptr->type() == typeid(void)); } THEN("Its requests are correct") { CHECK(ptr->requests().empty()); } } } } } }
31.06267
173
0.624737
RobertLeahy
c05a9a7bcbe2b8081cf075f4788afbb5ff9ea43c
2,050
hpp
C++
include/depthai/nnet/tensor_entry.hpp
InverseProject/depthai-core
2e15b69c80ca3a8673eba696346488d4a3eee987
[ "MIT" ]
null
null
null
include/depthai/nnet/tensor_entry.hpp
InverseProject/depthai-core
2e15b69c80ca3a8673eba696346488d4a3eee987
[ "MIT" ]
null
null
null
include/depthai/nnet/tensor_entry.hpp
InverseProject/depthai-core
2e15b69c80ca3a8673eba696346488d4a3eee987
[ "MIT" ]
null
null
null
#pragma once #include <iostream> #include <string> #include <unordered_map> #include <cmath> #include <cfloat> #include "tensor_info.hpp" #include "../types.hpp" struct TensorEntry { const unsigned char* raw_data = nullptr; Type output_properties_type = Type::UNDEFINED; unsigned output_properties_type_size = 0; unsigned properties_number = 0; int nnet_input_width = 0; int nnet_input_height = 0; const std::unordered_map<std::string, unsigned>* output_property_key_string_to_index = nullptr; const std::vector<std::unordered_map<std::string, unsigned>>* output_property_value_string_to_index = nullptr; unsigned getPropertiesNumber() const { return properties_number; } float getFloatByIndex(int index) const // TODO: make template { assert(output_properties_type == Type::F16); // TODO: remove this const void* void_ptr = raw_data + index * output_properties_type_size; const uint16_t* float_ptr = (uint16_t*) void_ptr; return float16to32(*float_ptr); } float getFloat(const std::string &str_index) const { assert(output_properties_type == Type::F16); // TODO: remove this assert(nullptr != output_property_key_string_to_index); assert(output_property_key_string_to_index->find(str_index) != output_property_key_string_to_index->end()); auto arr_index = output_property_key_string_to_index->at(str_index); return getFloatByIndex(arr_index); } bool checkValidTensorEntry() const { for(int idx = 0; idx < getPropertiesNumber(); idx++) { float tensorValue = getFloatByIndex(idx); if(std::isnan(tensorValue) || std::isinf(tensorValue)) { printf("invalid tensor packet, discarding \n"); return false; } } return true; } };
31.538462
115
0.619512
InverseProject
c05cb1ff6a9b39f951aa1bc33cb8e6ce1a37b205
1,915
cpp
C++
src/common.cpp
p4gauntlet/cdg-backend
09395409835cc6704acaa4e4c4a31360f45834d0
[ "Apache-2.0" ]
null
null
null
src/common.cpp
p4gauntlet/cdg-backend
09395409835cc6704acaa4e4c4a31360f45834d0
[ "Apache-2.0" ]
null
null
null
src/common.cpp
p4gauntlet/cdg-backend
09395409835cc6704acaa4e4c4a31360f45834d0
[ "Apache-2.0" ]
null
null
null
#include <cstdlib> #include <cstring> #include <random> #include <string> #include <boost/random.hpp> #include "common.h" #include "scope.h" const std::vector<cstring> str_keywords = {"if", "void", "else", "key", "actions", "true"}; static const char alphanum[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"; // "0123456789" namespace CODEGEN { static boost::random::mt19937 rng; void set_seed(int64_t seed) { rng = boost::mt19937(seed); } int64_t get_rnd_int(int64_t min, int64_t max) { boost::random::uniform_int_distribution<int64_t> distribution(min, max); return distribution(rng); } big_int get_rnd_big_int(big_int min, big_int max) { boost::random::uniform_int_distribution<big_int> distribution(min, max); return distribution(rng); } cstring randstr(size_t len) { cstring ret; std::stringstream ss; while (1) { ss.str(""); for (size_t i = 0; i < len; i++) { ss << alphanum[get_rnd_int(0, sizeof(alphanum) - 2)]; } ret = ss.str(); if (std::find(str_keywords.begin(), str_keywords.end(), ret) != str_keywords.end()) { continue; } // name is usable, break the loop if (P4Scope::used_names.count(ret) == 0) { break; } delete ret; } P4Scope::used_names.insert(ret); return ret; } int64_t randind(const std::vector<int64_t> &percent) { int sum = accumulate(percent.begin(), percent.end(), 0); // do not pick zero since that conflicts with zero percentage values auto rand_num = get_rnd_int(1, sum); int ret = 0; int64_t ret_sum = 0; for (auto i : percent) { ret_sum += i; if (ret_sum >= rand_num) { break; } ret = ret + 1; } return ret; } } // namespace CODEGEN
24.87013
76
0.586423
p4gauntlet
c05d3b2b1b3ee0ee50b4035b0ddcd8c3b85994bc
6,173
cpp
C++
test/shared_test/lib_battery_powerflow_test.cpp
yassineennassiri/ssc
b8b9353e3f1cfb3defe55677c0097ce5b65815c3
[ "MIT" ]
3
2017-09-04T12:19:13.000Z
2017-09-12T15:44:38.000Z
test/shared_test/lib_battery_powerflow_test.cpp
yassineennassiri/ssc
b8b9353e3f1cfb3defe55677c0097ce5b65815c3
[ "MIT" ]
1
2018-03-26T06:50:20.000Z
2018-03-26T06:50:20.000Z
test/shared_test/lib_battery_powerflow_test.cpp
yassineennassiri/ssc
b8b9353e3f1cfb3defe55677c0097ce5b65815c3
[ "MIT" ]
2
2018-02-12T22:23:55.000Z
2018-08-23T07:32:54.000Z
#include <gtest/gtest.h> #include "lib_battery_powerflow_test.h" #include "lib_ondinv.h" #include "lib_pvinv.h" #include "lib_sandia.h" #include "lib_shared_inverter.h" void BatteryPowerFlowTest::SetUp() { error = 0.02; double dtHour = 1.0; m_batteryPowerFlow = new BatteryPowerFlow(dtHour); m_batteryPower = m_batteryPowerFlow->getBatteryPower(); m_batteryPower->reset(); m_batteryPower->canDischarge = false; m_batteryPower->canPVCharge = false; m_batteryPower->canGridCharge = false; m_batteryPower->singlePointEfficiencyACToDC = 0.96; m_batteryPower->singlePointEfficiencyDCToAC = 0.96; m_batteryPower->singlePointEfficiencyDCToDC = 0.98; m_batteryPower->powerBatteryChargeMax = 100; m_batteryPower->powerBatteryDischargeMax = 50; m_batteryPower->connectionMode = ChargeController::AC_CONNECTED; // setup Sandia inverter using SMA America: SB3800TL-US-22 (240V) [CEC 2013] int numberOfInverters = 100; sandia = new sandia_inverter_t(); partload = new partload_inverter_t(); ond = new ond_inverter(); sandia->C0 = -3.18e-6; sandia->C1 = -5.12e-5; sandia->C2 = 0.000984; sandia->C3 = -0.00151; sandia->Paco = 3800; sandia->Pdco = 3928.11; sandia->Vdco = 398.497; sandia->Pso = 19.4516; sandia->Pntare = 0.99; m_sharedInverter = new SharedInverter(SharedInverter::SANDIA_INVERTER, numberOfInverters, sandia, partload, ond); m_batteryPower->setSharedInverter(m_sharedInverter); } TEST_F(BatteryPowerFlowTest, TestInitialize) { // PV Charging Scenario m_batteryPower->canPVCharge = true; m_batteryPower->powerPV = 100; m_batteryPower->powerLoad = 50; m_batteryPowerFlow->initialize(50); EXPECT_EQ(m_batteryPower->powerBatteryDC, -50); // Grid charging Scenario m_batteryPower->canGridCharge = true; m_batteryPowerFlow->initialize(50); EXPECT_EQ(m_batteryPower->powerBatteryDC, -m_batteryPower->powerBatteryChargeMax); // Discharging Scenario m_batteryPower->canDischarge = true; m_batteryPower->powerPV = 50; m_batteryPower->powerLoad = 100; m_batteryPowerFlow->initialize(50); EXPECT_EQ(m_batteryPower->powerBatteryDC, m_batteryPower->powerBatteryDischargeMax); } TEST_F(BatteryPowerFlowTest, TestACConnected) { m_batteryPower->connectionMode = ChargeController::AC_CONNECTED; // PV and Grid Charging Scenario m_batteryPower->canPVCharge = true; m_batteryPower->powerPV = 100; m_batteryPower->powerLoad = 50; m_batteryPowerFlow->initialize(50); m_batteryPowerFlow->calculate(); EXPECT_NEAR(m_batteryPower->powerBatteryAC, -52.08, error); // The extra 2.08 kW is due to conversion efficiency EXPECT_NEAR(m_batteryPower->powerPVToLoad, 50, error); EXPECT_NEAR(m_batteryPower->powerPVToBattery, 50, error); EXPECT_NEAR(m_batteryPower->powerGridToBattery, 2.08, error); // Note, grid power charging is NOT allowed here, but this model does not enforce. It is enforced elsewhere, where this would be iterated upon. EXPECT_NEAR(m_batteryPower->powerConversionLoss, 2.08, error); // Exclusive Grid Charging Scenario m_batteryPower->canGridCharge = true; m_batteryPower->canPVCharge = false; m_batteryPower->powerPV = 100; m_batteryPower->powerLoad = 50; m_batteryPowerFlow->initialize(50); m_batteryPowerFlow->calculate(); EXPECT_NEAR(m_batteryPower->powerBatteryAC, -104.166, error); EXPECT_NEAR(m_batteryPower->powerPVToLoad, 50, error); EXPECT_NEAR(m_batteryPower->powerPVToBattery, 0, error); EXPECT_NEAR(m_batteryPower->powerPVToGrid, 50, error); EXPECT_NEAR(m_batteryPower->powerGridToBattery, 104.166, error); EXPECT_NEAR(m_batteryPower->powerConversionLoss, 4.166, error); // Discharging Scenario m_batteryPower->canDischarge = true; m_batteryPower->powerPV = 50; m_batteryPower->powerLoad = 100; m_batteryPowerFlow->initialize(50); m_batteryPowerFlow->calculate(); EXPECT_NEAR(m_batteryPower->powerBatteryAC, 48 , error); EXPECT_NEAR(m_batteryPower->powerBatteryToLoad, 48, error); EXPECT_NEAR(m_batteryPower->powerPVToLoad, 50, error); EXPECT_NEAR(m_batteryPower->powerPVToBattery, 0, error); EXPECT_NEAR(m_batteryPower->powerPVToGrid, 0, error); EXPECT_NEAR(m_batteryPower->powerGridToBattery, 0, error); EXPECT_NEAR(m_batteryPower->powerGridToLoad, 2, error); EXPECT_NEAR(m_batteryPower->powerConversionLoss, 2, error); } TEST_F(BatteryPowerFlowTest, TestDCConnected) { m_batteryPower->connectionMode = ChargeController::DC_CONNECTED; // PV and Grid Charging Scenario m_batteryPower->canPVCharge = true; m_batteryPower->powerPV = 300; m_batteryPower->powerLoad = 200; m_batteryPowerFlow->initialize(50); m_batteryPowerFlow->calculate(); EXPECT_NEAR(m_batteryPower->powerBatteryAC, -102.04, error); EXPECT_NEAR(m_batteryPower->powerPVToLoad, 191.78, error); EXPECT_NEAR(m_batteryPower->powerPVToBattery, 102.04, error); EXPECT_NEAR(m_batteryPower->powerGridToBattery, 0.00, error); EXPECT_NEAR(m_batteryPower->powerConversionLoss, 8.22, error); // Exclusive Grid Charging Scenario m_batteryPower->canGridCharge = true; m_batteryPower->canPVCharge = false; m_batteryPower->powerPV = 300; m_batteryPower->powerLoad = 200; m_batteryPowerFlow->initialize(50); m_batteryPowerFlow->calculate(); EXPECT_NEAR(m_batteryPower->powerBatteryAC, -105.33, error); EXPECT_NEAR(m_batteryPower->powerPVToLoad, 200, error); EXPECT_NEAR(m_batteryPower->powerPVToBattery, 0, error); EXPECT_NEAR(m_batteryPower->powerPVToGrid, 90.63, error); EXPECT_NEAR(m_batteryPower->powerGridToBattery, 105.33, error); EXPECT_NEAR(m_batteryPower->powerConversionLoss, 8.22, error); // Discharging Scenario m_batteryPower->canDischarge = true; m_batteryPower->powerPV = 200; m_batteryPower->powerLoad = 300; m_batteryPowerFlow->initialize(50); m_batteryPowerFlow->calculate(); EXPECT_NEAR(m_batteryPower->powerBatteryAC, 47.49, error); EXPECT_NEAR(m_batteryPower->powerBatteryToLoad, 47.49, error); EXPECT_NEAR(m_batteryPower->powerPVToLoad, 193.83, error); EXPECT_NEAR(m_batteryPower->powerPVToBattery, 0, error); EXPECT_NEAR(m_batteryPower->powerPVToGrid, 0, error); EXPECT_NEAR(m_batteryPower->powerGridToBattery, 0, error); EXPECT_NEAR(m_batteryPower->powerGridToLoad, 58.68, error); EXPECT_NEAR(m_batteryPower->powerConversionLoss, 8.68, error); }
37.640244
208
0.7873
yassineennassiri
c05de678cb8aca04d62af7eb784d69cd7830c9c5
581
hpp
C++
JEBMath/JEBMath/Math/MatrixAlgorithms.hpp
jebreimo/JEBLib
9066403a9372951aa8ce4f129cd4877e2ae779ab
[ "BSD-3-Clause" ]
1
2019-12-25T05:30:20.000Z
2019-12-25T05:30:20.000Z
JEBMath/JEBMath/Math/MatrixAlgorithms.hpp
jebreimo/JEBLib
9066403a9372951aa8ce4f129cd4877e2ae779ab
[ "BSD-3-Clause" ]
null
null
null
JEBMath/JEBMath/Math/MatrixAlgorithms.hpp
jebreimo/JEBLib
9066403a9372951aa8ce4f129cd4877e2ae779ab
[ "BSD-3-Clause" ]
null
null
null
#ifndef JEB_MATH_MATRIXALGORITHM_HPP #define JEB_MATH_MATRIXALGORITHM_HPP #include "JEBMath/JEBMathDefinitions.hpp" namespace JEBMath { namespace MatrixAlgorithms { template <typename RndIt> void transposeInPlace(RndIt matrix, size_t rows, size_t cols); template <typename RndIt> void turnLeftInPlace(RndIt matrix, size_t rows, size_t cols); template <typename RndIt> void turnRightInPlace(RndIt matrix, size_t rows, size_t cols); template <typename RndIt> void turnUpsideDownInPlace(RndIt matrix, size_t rows, size_t cols); }} #include "MatrixAlgorithms.impl.hpp" #endif
23.24
67
0.810671
jebreimo
c05ecd705fad1343f055a9e311d4439f6205c258
563
cpp
C++
firmware/libraries/PWMMotor/PWMMotor.cpp
aribennett/PiNC
fede5ae7bccc161753db0ba31d358c2990a4f394
[ "MIT" ]
null
null
null
firmware/libraries/PWMMotor/PWMMotor.cpp
aribennett/PiNC
fede5ae7bccc161753db0ba31d358c2990a4f394
[ "MIT" ]
null
null
null
firmware/libraries/PWMMotor/PWMMotor.cpp
aribennett/PiNC
fede5ae7bccc161753db0ba31d358c2990a4f394
[ "MIT" ]
null
null
null
#include "PWMMotor.h" #include <arduino.h> #include <Motor.h> PWMMotor::PWMMotor(uint16_t en) { _en_pin = en; } void PWMMotor::coldStart() { pinMode(_en_pin, OUTPUT); digitalWrite(_en_pin, LOW); // Enable driver in hardware _timer_count = 0; } void PWMMotor::setEnable(bool enable) { } void PWMMotor::run() { ++_timer_count; if(_timer_count > _omega) { digitalWriteFast(_en_pin, LOW); } else { digitalWriteFast(_en_pin, HIGH); } if(_timer_count >= 100) { _timer_count = 0; } }
14.435897
60
0.60746
aribennett
c06187a08fbffc91a61993b35cdc887b6794507b
3,272
cpp
C++
samples/cpp/person/person_snd_events/src/person_snd_events.cpp
FlorianReimold/ecal
e21e52c14f58e1cae38e3867940bf0292f5ccb9a
[ "Apache-2.0" ]
null
null
null
samples/cpp/person/person_snd_events/src/person_snd_events.cpp
FlorianReimold/ecal
e21e52c14f58e1cae38e3867940bf0292f5ccb9a
[ "Apache-2.0" ]
null
null
null
samples/cpp/person/person_snd_events/src/person_snd_events.cpp
FlorianReimold/ecal
e21e52c14f58e1cae38e3867940bf0292f5ccb9a
[ "Apache-2.0" ]
null
null
null
/* ========================= eCAL LICENSE ================================= * * Copyright (C) 2016 - 2019 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ========================= eCAL LICENSE ================================= */ #include <ecal/ecal.h> #include <ecal/msg/protobuf/publisher.h> #include <iostream> #include "person.pb.h" void OnEvent(const char* topic_name_, const struct eCAL::SPubEventCallbackData* data_) { std::cout << "topic name : " << topic_name_ << std::endl; switch (data_->type) { case pub_event_connected: std::cout << "event : " << "pub_event_connected" << std::endl; break; case pub_event_disconnected: std::cout << "event : " << "pub_event_disconnected" << std::endl; break; // not implemented yet case pub_event_dropped: std::cout << "event : " << "pub_event_dropped" << std::endl; break; default: std::cout << "event : " << "unknown" << std::endl; break; } std::cout << std::endl; } int main(int argc, char **argv) { // initialize eCAL API eCAL::Initialize(argc, argv, "person publisher events"); // set process state eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "I feel good !"); // create a publisher (topic name "person") eCAL::protobuf::CPublisher<People::Person> pub("person"); // add event callback function (_1 = topic_name, _2 = event data struct) auto evt_callback = std::bind(OnEvent, std::placeholders::_1, std::placeholders::_2); pub.AddEventCallback(pub_event_connected, evt_callback); pub.AddEventCallback(pub_event_disconnected, evt_callback); // generate a class instance of Person People::Person person; // enter main loop auto cnt(0); while (eCAL::Ok()) { // set person object content person.set_id(++cnt); person.set_name("Max"); person.set_stype(People::Person_SType_MALE); person.set_email("max@mail.net"); person.mutable_dog()->set_name("Brandy"); person.mutable_house()->set_rooms(4); // send the person object pub.Send(person); // print content std::cout << "person id : " << person.id() << std::endl; std::cout << "person name : " << person.name() << std::endl; std::cout << "person stype : " << person.stype() << std::endl; std::cout << "person email : " << person.email() << std::endl; std::cout << "dog.name : " << person.dog().name() << std::endl; std::cout << "house.rooms : " << person.house().rooms() << std::endl; std::cout << std::endl; // sleep 500 ms eCAL::Process::SleepMS(500); } // finalize eCAL API eCAL::Finalize(); return(0); }
32.39604
87
0.607274
FlorianReimold
c0620eebeb403a19913d5d267542b15114bc6fa0
3,343
cpp
C++
gui/textbox.cpp
imranpopz/android_bootable_recovery-1
ec4512ad1e20f640b3dcd6faf8c04cae711e4f30
[ "Apache-2.0" ]
null
null
null
gui/textbox.cpp
imranpopz/android_bootable_recovery-1
ec4512ad1e20f640b3dcd6faf8c04cae711e4f30
[ "Apache-2.0" ]
null
null
null
gui/textbox.cpp
imranpopz/android_bootable_recovery-1
ec4512ad1e20f640b3dcd6faf8c04cae711e4f30
[ "Apache-2.0" ]
null
null
null
/* Copyright 2015 bigbiff/Dees_Troy/_that TeamWin This file is part of TWRP/TeamWin Recovery Project. TWRP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. TWRP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with TWRP. If not, see <http://www.gnu.org/licenses/>. */ // textbox.cpp - GUITextBox object #include <string> extern "C" { #include "../twcommon.h" } #include "minuitwrp/minui.h" #include "rapidxml.hpp" #include "objects.hpp" GUITextBox::GUITextBox(xml_node<>* node) : GUIScrollList(node) { xml_node<>* child; mLastCount = 0; mIsStatic = true; allowSelection = false; // textbox doesn't support list item selections child = FindNode(node, "color"); if (child) { mFontColor = LoadAttrColor(child, "foreground", mFontColor); mBackgroundColor = LoadAttrColor(child, "background", mBackgroundColor); //mScrollColor = LoadAttrColor(child, "scroll", mScrollColor); } child = FindNode(node, "text"); while (child) { string txt = child->value(); mText.push_back(txt); string lookup = gui_parse_text(txt); if (lookup != txt) mIsStatic = false; mLastValue.push_back(lookup); child = child->next_sibling("text"); } } int GUITextBox::Update(void) { if (AddLines(&mLastValue, NULL, &mLastCount, &rText, NULL)) { // someone added new text // at least the scrollbar must be updated, even if the new lines are currently not visible mUpdate = 1; } GUIScrollList::Update(); if (mUpdate) { mUpdate = 0; if (Render() == 0) return 2; } return 0; } size_t GUITextBox::GetItemCount() { return rText.size(); } void GUITextBox::RenderItem(size_t itemindex, int yPos, bool selected __unused) { if (!mFont || !mFont->GetResource()) return; // Set the color for the font gr_color(mFontColor.red, mFontColor.green, mFontColor.blue, mFontColor.alpha); // render text const char* text = rText[itemindex].c_str(); gr_textEx_scaleW(mRenderX, yPos, text, mFont->GetResource(), mRenderW, TOP_LEFT, 0); } void GUITextBox::NotifySelect(size_t item_selected __unused) { // do nothing - textbox ignores selections } int GUITextBox::NotifyVarChange(const std::string& varName, const std::string& value) { GUIScrollList::NotifyVarChange(varName, value); if (!isConditionTrue() || mIsStatic) return 0; // Check to see if the variable exists in mText for (size_t i = 0; i < mText.size(); i++) { string lookup = gui_parse_text(mText.at(i)); if (lookup != mText.at(i)) { mLastValue.at(i) = lookup; mUpdate = 1; // There are ways to improve efficiency here, but I am not // sure if we will even use this feature in the stock theme // at all except for language translation. If we start using // variables in textboxes in the stock theme, we can circle // back and make improvements here. mLastCount = 0; rText.clear(); } } return 0; }
26.959677
92
0.693987
imranpopz
c06561a0ca794ccba19b1da87135d62dd3de3ab9
61,475
cpp
C++
0.55.402/graysvr/CClientTarg.cpp
Jhobean/Source-Archive
ab24ba44ffd34c329accedb980699e94c196fceb
[ "Apache-2.0" ]
2
2020-12-22T17:03:14.000Z
2021-07-31T23:59:05.000Z
0.55.402/graysvr/CClientTarg.cpp
Jhobean/Source-Archive
ab24ba44ffd34c329accedb980699e94c196fceb
[ "Apache-2.0" ]
null
null
null
0.55.402/graysvr/CClientTarg.cpp
Jhobean/Source-Archive
ab24ba44ffd34c329accedb980699e94c196fceb
[ "Apache-2.0" ]
4
2021-04-21T19:43:48.000Z
2021-10-07T00:38:23.000Z
// // CClientTarg.cpp // Copyright Menace Software (www.menasoft.com). // // An item is targetted. #include "graysvr.h" // predef header. #include "CClient.h" //////////////////////////////////////////////////////// // Targetted GM functions. bool CClient::OnTarg_Obj_Set( CObjBase * pObj ) { // CLIMODE_TARG_OBJ_SET // Targettted a command at an CObjBase object // ARGS: // m_Targ_Text = new command and value. if ( pObj == NULL ) { SysMessage( "No object specified?" ); return( false ); } // Parse the command. CGString sLogMsg; sLogMsg.Format( "'%s' commands uid=0%lx (%s) to '%s'", (LPCTSTR) GetName(), (DWORD) pObj->GetUID(), (LPCTSTR) pObj->GetName(), (LPCTSTR) m_Targ_Text ); // Check priv level for the new verb. if ( ! g_Cfg.CanUsePrivVerb( pObj, m_Targ_Text, this )) { SysMessage( "You lack privilege to do this." ); g_Log.Event( LOGM_GM_CMDS, "%s=0\n", (LPCTSTR) sLogMsg ); return( false ); } // Special stuff to check for. static LPCTSTR const sm_szSpecialTable[] = { "COLOR", "REMOVE", "SHRINK", }; bool fDelete = false; CScript sCmd( m_Targ_Text ); switch ( FindTableHeadSorted( sCmd.GetKey(), sm_szSpecialTable, COUNTOF(sm_szSpecialTable))) { case 0: // "COLOR" if ( ! sCmd.HasArgs() ) { addDyeOption( pObj ); return true; } break; case 1: // "REMOVE" = the object is immediatly invalid so return immediatly. case 2: // "SHRINK" fDelete = true; break; } bool fRet = pObj->r_Verb( sCmd, this ); if ( ! fRet ) { SysMessage( "Invalid Set" ); } else if ( ! fDelete ) { // BANK command will be harmed by RemoveFromView if ( pObj->IsItemEquipped()) { pObj->RemoveFromView(); // strangly we need to remove this before color will take. pObj->Update(); } } if ( GetPrivLevel() >= g_Cfg.m_iCommandLog ) g_Log.Event( LOGM_GM_CMDS, "%s=%d\n", (LPCTSTR) sLogMsg, fRet ); return( fRet ); } bool CClient::OnTarg_Obj_Function( CObjBase * pObj, const CPointMap & pt, ITEMID_TYPE id ) { m_Targ_p = pt; LPCTSTR pSpace = strchr( m_Targ_Text, ' ' ); if ( !pSpace ) pSpace = strchr( m_Targ_Text, '\t' ); if ( pSpace ) GETNONWHITESPACE( pSpace ); CScriptTriggerArgs Args( pSpace ? pSpace : "" ); Args.m_VarsLocal.SetNum( "ID", id, true ); Args.m_pO1 = pObj; m_pChar->r_Call( (LPCTSTR) m_Targ_Text, this, &Args ); return true; } bool CClient::OnTarg_Obj_Info( CObjBase * pObj, const CPointMap & pt, ITEMID_TYPE id ) { // CLIMODE_TARG_OBJ_INFO "INFO" if ( pObj ) { SetTargMode(); addGumpDialogProps(pObj->GetUID()); } else { TCHAR szTemp[ SCRIPT_MAX_LINE_LEN ]; int len = 0; if ( id ) { len = sprintf( szTemp, "[Static z=%d, 0%x=", pt.m_z, id ); // static items have no uid's but we can still use them. CItemBase * pItemDef = CItemBase::FindItemBase(id); if ( pItemDef ) { len += sprintf( szTemp+len, "%s->%s], ", pItemDef->GetResourceName(), g_Cfg.ResourceGetName( RESOURCE_ID( RES_TYPEDEF, pItemDef->GetType() ))); } else { len += sprintf( szTemp+len, "NON scripted], " ); } } else { // tile info for location. len = strcpylen( szTemp, "[No static tile], " ); } const CUOMapMeter * pMeter = g_World.GetMapMeter( pt ); ASSERT(pMeter); len += sprintf( szTemp+len, "TERRAIN=0%x TYPE=%s", pMeter->m_wTerrainIndex, g_World.GetTerrainItemTypeDef( pMeter->m_wTerrainIndex )->GetResourceName() ); SysMessage(szTemp); } return true; } bool CClient::Cmd_Control( CChar * pChar2 ) { // I wish to control pChar2 // Leave my own body behind. if ( pChar2 == NULL ) return false; if ( pChar2->IsDisconnected()) return( false ); // char is not on-line. (then we should make it so !) if ( GetPrivLevel() < pChar2->GetPrivLevel()) return false; ASSERT(m_pChar); CChar * pChar1 = m_pChar; // Put my newbie equipped items on it. CItem* pItemNext; for ( CItem* pItem=pChar1->GetContentHead(); pItem!=NULL; pItem=pItemNext ) { pItemNext = pItem->GetNext(); if ( ! pItem->IsAttr(ATTR_MOVE_NEVER)) continue; // keep GM stuff. if ( ! CItemBase::IsVisibleLayer( pItem->GetEquipLayer())) continue; switch ( pItem->GetEquipLayer()) { case LAYER_BEARD: case LAYER_HAIR: case LAYER_PACK: continue; } pChar2->LayerAdd( pItem ); // add content } // Put my GM pack stuff in it's inventory. CItemContainer * pPack1 = pChar1->GetPack(); if ( pPack1 != NULL ) { CItemContainer * pPack2 = pChar2->GetPackSafe(); CItem* pItemNext; for ( CItem* pItem=pPack1->GetContentHead(); pItem!=NULL; pItem=pItemNext ) { pItemNext = pItem->GetNext(); if ( ! pItem->IsAttr(ATTR_MOVE_NEVER)) continue; // keep newbie stuff. pPack2->ContentAdd( pItem ); // add content } } pChar1->ClientDetach(); m_pChar = NULL; CClient * pClient2 = pChar2->GetClient(); if ( pClient2 ) // controled char is a player/client. { pChar2->ClientDetach(); pClient2->m_pChar = NULL; } CCharPlayer * pPlayer1 = pChar1->m_pPlayer; if ( pPlayer1 ) { pPlayer1->GetAccount()->DetachChar(pChar1); } CCharPlayer * pPlayer2 = pChar2->m_pPlayer; if ( pPlayer2 ) { pPlayer2->GetAccount()->DetachChar(pChar2); } // swap m_pPlayer (if they even are both players.) pChar1->m_pPlayer = pPlayer2; pChar2->m_pPlayer = pPlayer1; ASSERT( pChar1->m_pNPC == NULL ); pChar1->m_pNPC = pChar2->m_pNPC; // Turn my old body into a NPC. (if it was) pChar2->m_pNPC = NULL; if ( pPlayer1 ) { pPlayer1->GetAccount()->AttachChar(pChar2); } if ( pPlayer2 ) { pPlayer2->GetAccount()->AttachChar(pChar1); } if ( pClient2 ) { pClient2->addPlayerStart( pChar1 ); } else { // delete my ghost. if ( pChar1->GetID() == CREID_EQUIP_GM_ROBE || pChar1->GetID() == CREID_GHOSTMAN || pChar1->GetID() == CREID_GHOSTWOMAN ) // CREID_EQUIP_GM_ROBE { pChar1->Delete(); } else { pChar1->SetTimeout(1); // must kick start the npc. } } addPlayerStart( pChar2 ); return true; } bool CClient::OnTarg_UnExtract( CObjBase * pObj, const CPointMap & pt ) { // CLIMODE_TARG_UNEXTRACT // ??? Get rid of this in favor of a more .SCP file type approach. // result of the MULTI command. // Break a multi out of the multi.txt files and turn it into items. if ( ! pt.IsValidPoint()) return( false ); CScript s; // It is not really a valid script type file. if ( ! g_Cfg.OpenResourceFind( s, m_Targ_Text )) return false; CGString sSec; sSec.Format( "%i template id", m_tmTile.m_id ); if ( ! s.FindTextHeader(sSec)) return false; if ( ! s.ReadKey()) return false; // throw this one away if ( ! s.ReadKeyParse()) return false; // this has the item count int iItemCount = atoi(s.GetKey()); // item count while (iItemCount > 0) { if ( ! s.ReadKeyParse()) return false; // this has the item count int piCmd[4]; // Maximum parameters in one line int iArgQty = Str_ParseCmds( s.GetArgStr(), piCmd, COUNTOF(piCmd)); CItem * pItem = CItem::CreateTemplate( (ITEMID_TYPE) atoi(s.GetKey()), NULL, m_pChar ); if ( pItem == NULL ) return( false ); CPointMap ptOffset( piCmd[0], piCmd[1], piCmd[2] ); ptOffset += pt; pItem->MoveTo( ptOffset ); pItem->Update(); iItemCount --; } return true; } bool CClient::OnTarg_Item_Add( CObjBase * pObj, const CPointMap & pt ) { // CLIMODE_ADDITEM // m_tmAdd.m_id = new item id if ( ! pt.IsValidPoint()) return( false ); ASSERT( m_pChar ); CItem * pItem = CItem::CreateTemplate( m_tmAdd.m_id, NULL, m_pChar ); if ( pItem == NULL ) return( false ); if ( m_tmAdd.m_fStatic == 1) { // Lock this item down pItem->SetAttr( ATTR_MOVE_NEVER ); } if ( pItem->IsType(IT_MULTI)) { CItem * pItemNew = OnTarg_Use_Multi( pItem->Item_GetDef(), pt, pItem->m_Attr, pItem->GetHue()); pItem->Delete(); if ( pItemNew == NULL ) return( false ); pItem = pItemNew; } else { if ( pObj && pObj->IsItemInContainer() && m_pChar->CanUse( STATIC_CAST<CItem*>(pObj), true )) { pItem->MoveNearObj( pObj ); } else { CPointMap ptNew = pt; ptNew.m_z ++; pItem->MoveToCheck( ptNew, m_pChar ); } } m_pChar->m_Act_Targ = pItem->GetUID(); // for last target stuff. (trigger stuff) return true; } bool CClient::OnTarg_Item_Link( CObjBase * pObj2 ) { // CLIMODE_LINK if ( pObj2 == NULL ) { SysMessage( "Must select a dynamic object." ); return( false ); } CItem * pItem2 = dynamic_cast <CItem*>(pObj2); CItem * pItem1 = m_Targ_UID.ItemFind(); if ( pItem1 == NULL ) { if ( pItem2 == NULL ) { m_Targ_UID.InitUID(); addTarget( CLIMODE_TARG_LINK, "First object must be a dynamic item, try again." ); } else { m_Targ_UID = pObj2->GetUID(); addTarget( CLIMODE_TARG_LINK, "What do you want to link it to ?" ); } return true; } if ( pItem2 == pItem1 ) { SysMessage( "That's the same object. Link cancelled." ); // Break any existing links. return false; } if ( pItem2 && ( pItem1->IsType(IT_KEY) || pItem2->IsType(IT_KEY))) { // Linking a key to something is a special case. if ( ! pItem1->IsType(IT_KEY)) { CItem * pTmp = pItem1; pItem1 = pItem2; pItem2 = pTmp; } // pItem1 = the IT_KEY if ( pItem2->m_itContainer.m_lockUID ) { pItem1->m_itKey.m_lockUID = pItem2->m_itContainer.m_lockUID; } else if ( pItem1->m_itKey.m_lockUID ) { pItem2->m_itContainer.m_lockUID = pItem1->m_itKey.m_lockUID; } else { pItem1->m_itKey.m_lockUID = pItem2->m_itContainer.m_lockUID = pItem2->GetUID(); } } else { pItem1->m_uidLink = pObj2->GetUID(); if ( pItem2 && ! pItem2->m_uidLink.IsValidUID()) { pItem2->m_uidLink = pItem1->GetUID(); } } SysMessage( "These items are now linked." ); return true; } int CClient::Cmd_Extract( CScript * pScript, CRectMap &rect, int & zlowest ) { // RETURN: Number of statics here. CPointMap ptCtr = rect.GetCenter(); int iCount = 0; for ( int mx = rect.m_left; mx <= rect.m_right; mx++) { for ( int my = rect.m_top; my <= rect.m_bottom; my++) { CPointMap ptCur( mx, my ); const CGrayMapBlock * pBlock = g_World.GetMapBlock( ptCur ); int iQty = pBlock->m_Statics.GetStaticQty(); if ( ! iQty ) // no static items here. continue; int x2=pBlock->GetOffsetX(mx); int y2=pBlock->GetOffsetY(my); for ( int i=0; i<iQty; i++ ) { if ( ! pBlock->m_Statics.IsStaticPoint( i, x2, y2 )) continue; const CUOStaticItemRec * pStatic = pBlock->m_Statics.GetStatic(i); ASSERT(pStatic); iCount ++; if ( pScript ) { // This static is at the coordinates in question. pScript->Printf( "%i %i %i %i 0\n", pStatic->GetDispID(), mx - ptCtr.m_x, my - ptCtr.m_y, pStatic->m_z - zlowest); } else { if ( pStatic->m_z < zlowest) { zlowest = pStatic->m_z; } } } } } // Extract Multi's ??? // Extract dynamics as well. int rx = 1 + abs( rect.m_right - rect.m_left ) / 2; int ry = 1 + abs( rect.m_bottom - rect.m_top ) / 2; CWorldSearch AreaItem( ptCtr, max( rx, ry )); while (true) { CItem * pItem = AreaItem.GetItem(); if ( pItem == NULL ) break; if ( ! rect.IsInside2d( pItem->GetTopPoint())) continue; CPointMap pt = pItem->GetTopPoint(); iCount ++; if ( pScript ) { // This static is at the coordinates in question. pScript->Printf( "%i %i %i %i 0\n", pItem->GetDispID(), pt.m_x - ptCtr.m_x, pt.m_y - ptCtr.m_y, pt.m_z - zlowest ); } else { if ( pt.m_z < zlowest) { zlowest = pt.m_z; } } } return iCount; } bool CClient::OnTarg_Tile( CObjBase * pObj, const CPointMap & pt ) { // CLIMODE_TARG_TILE // m_tmTile.m_Code = CV_TILE etc // CV_NUKE. CV_NUKECHAR, CV_EXTRACT, CV_NUDGE // ASSERT(m_pChar); if ( pObj && ! pObj->IsTopLevel()) return( false ); if ( ! pt.IsValidPoint()) return( false ); if ( !m_tmTile.m_ptFirst.IsValidPoint()) { m_tmTile.m_ptFirst = pt; addTarget( CLIMODE_TARG_TILE, "Pick other corner:", true ); return true; } if ( pt == m_tmTile.m_ptFirst && m_tmTile.m_Code != CV_EXTRACT ) // Extract can work with one square { SysMessage("Thats the same point."); addTarget( CLIMODE_TARG_TILE, "Pick other corner:", true ); return true; } CRectMap rect; rect.SetRect( m_tmTile.m_ptFirst.m_x, m_tmTile.m_ptFirst.m_y, pt.m_x, pt.m_y ); CPointMap ptCtr = rect.GetCenter(); ptCtr.m_mapplane = pt.m_mapplane; int rx = 1 + abs( rect.m_right - rect.m_left ) / 2; int ry = 1 + abs( rect.m_bottom - rect.m_top ) / 2; int iRadius = max( rx, ry ); int iCount = 0; switch ( m_tmTile.m_Code ) { case CV_EXTRACT: { // "EXTRACT" all map statics in the region. // First find the lowest Z to use as a base // and count the statics int zlowest = UO_SIZE_Z; iCount = Cmd_Extract( NULL, rect, zlowest ); if ( iCount ) { CScript s; if ( ! s.Open( m_Targ_Text, OF_WRITE|OF_TEXT )) return( false ); // Write a header for this multi in XXX format // (i have no idea what most of this means) s.Printf("6 version\n"); s.Printf("%d template id\n", m_tmTile.m_id ); s.Printf("-1 item version\n"); s.Printf("%i num components\n", iCount); Cmd_Extract( &s, rect, zlowest ); } SysMessagef( "%d Statics Extracted to '%s', id=%d", iCount, (LPCTSTR) m_Targ_Text, m_tmTile.m_id ); } break; case CV_NUDGE: { TCHAR szTmp[512]; strcpylen( szTmp, m_Targ_Text, sizeof(szTmp)); int piArgs[3]; // Maximum parameters in one line int iArgQty = Str_ParseCmds( szTmp, piArgs, COUNTOF( piArgs )); CPointMap ptNudge(piArgs[0],piArgs[1],piArgs[2] ); CWorldSearch AreaItem( ptCtr, iRadius ); AreaItem.SetAllShow( IsPriv( PRIV_ALLSHOW )); while (true) { CItem * pItem = AreaItem.GetItem(); if ( pItem == NULL ) break; if ( ! rect.IsInside2d( pItem->GetTopPoint())) continue; CPointMap ptMove = pItem->GetTopPoint(); ptMove += ptNudge; pItem->MoveToCheck( ptMove ); iCount++; } CWorldSearch AreaChar( ptCtr, iRadius ); AreaChar.SetAllShow( IsPriv( PRIV_ALLSHOW )); while (true) { CChar* pChar = AreaChar.GetChar(); if ( pChar == NULL ) break; if ( ! rect.IsInside2d( pChar->GetTopPoint())) continue; CPointMap ptMove = pChar->GetTopPoint(); ptMove += ptNudge; pChar->m_fClimbUpdated = false; // update climb height pChar->MoveToChar( ptMove ); iCount++; } SysMessagef( "%d Objects Nudged", iCount ); } break; case CV_NUKE: // NUKE all items in the region. { CWorldSearch AreaItem( ptCtr, iRadius ); AreaItem.SetAllShow( IsPriv( PRIV_ALLSHOW )); while (true) { CItem * pItem = AreaItem.GetItem(); if ( pItem == NULL ) break; if ( ! rect.IsInside2d( pItem->GetTopPoint())) continue; if ( m_Targ_Text.IsEmpty()) { pItem->Delete(); } else { CScript script(m_Targ_Text); if ( ! pItem->r_Verb( script, this )) continue; } iCount++; } SysMessagef( "%d Items Nuked!", iCount ); } break; case CV_NUKECHAR: { CWorldSearch AreaChar( ptCtr, iRadius ); AreaChar.SetAllShow( IsPriv( PRIV_ALLSHOW )); while (true) { CChar* pChar = AreaChar.GetChar(); if ( pChar == NULL ) break; if ( ! rect.IsInside2d( pChar->GetTopPoint())) continue; if ( pChar->m_pPlayer ) continue; if ( m_Targ_Text.IsEmpty()) { pChar->Delete(); } else { CScript script(m_Targ_Text); if ( ! pChar->r_Verb( script, this )) continue; } iCount++; } SysMessagef( "%d Chars Nuked!", iCount ); } break; case CV_TILE: { TCHAR szTmp[256]; strcpylen( szTmp, m_Targ_Text, sizeof(szTmp)); int piArgs[16]; // Maximum parameters in one line int iArgQty = Str_ParseCmds( szTmp, piArgs, COUNTOF( piArgs )); signed char z = piArgs[0]; // z height is the first arg. int iArg = 0; for ( int mx = rect.m_left; mx <= rect.m_right; mx++) { for(int my = rect.m_top; my <= rect.m_bottom; my++) { if ( ++iArg >= iArgQty ) iArg = 1; CItem * pItem = CItem::CreateTemplate( (ITEMID_TYPE) RES_GET_INDEX(piArgs[iArg]), NULL, m_pChar ); ASSERT(pItem); pItem->SetAttr( ATTR_MOVE_NEVER ); CPointMap ptCur( mx, my, z, pt.m_mapplane ); pItem->MoveTo( ptCur ); iCount++; } } SysMessagef( "%d Items Created", iCount ); } break; } return true; } //----------------------------------------------------------------------- // Targetted Informational skills int CClient::OnSkill_AnimalLore( CGrayUID uid, int iSkillLevel, bool fTest ) { // SKILL_ANIMALLORE // The creature is a "human" etc.. // How happy. // Well trained. // Who owns it ? // What it eats. // Other "lore" type things about a creature ? // ex. liche = the remnants of a powerful wizard CChar * pChar = uid.CharFind(); if ( pChar == NULL ) { SysMessageDefault( "non_alive" ); return( 1 ); } if ( fTest ) { if ( pChar == m_pChar ) return( 2 ); if ( pChar->IsHuman()) return( Calc_GetRandVal(10)); return Calc_GetRandVal(60); } LPCTSTR pszHe = pChar->GetPronoun(); LPCTSTR pszHis = pChar->GetPossessPronoun(); CGString sTmp; // What kind of animal. if ( pChar->IsIndividualName()) { sTmp.Format( g_Cfg.GetDefaultMsg( "animallore_result" ), (LPCTSTR) pChar->GetName(),(LPCTSTR) pChar->Char_GetDef()->GetTradeName()); addObjMessage( sTmp, pChar ); } // Who is master ? CChar * pCharOwner = pChar->NPC_PetGetOwner(); if ( pCharOwner == NULL ) { sTmp.Format( g_Cfg.GetDefaultMsg( "animallore_free" ), (LPCTSTR) pszHe, (LPCTSTR) pszHis ); } else { sTmp.Format( g_Cfg.GetDefaultMsg( "animallore_master" ), pszHe, ( pCharOwner == m_pChar ) ? "you" : (LPCTSTR) pCharOwner->GetName()); // How loyal to master ? } addObjMessage( sTmp, pChar ); // How well fed ? // Food count = 30 minute intervals. LPCTSTR pszText; int ifood = pChar-> Stat_GetVal(STAT_FOOD); if ( ifood > 7 ) ifood = 7; if ( pChar->IsStatFlag( STATF_Conjured )) { pszText = g_Cfg.GetDefaultMsg( "animallore_conjured" ); } else { pszText = pChar->Food_GetLevelMessage( pCharOwner ? true : false, true ); } sTmp.Format( g_Cfg.GetDefaultMsg( "animallore_food" ), (LPCTSTR) pszHe, (LPCTSTR) pszText ); addObjMessage( sTmp, pChar ); // How hard to tame ??? int iTameBase = pChar->Skill_GetBase(SKILL_TAMING); int iTameMe = m_pChar->Skill_GetAdjusted(SKILL_TAMING); // if ( return 0; } int CClient::OnSkill_ItemID( CGrayUID uid, int iSkillLevel, bool fTest ) { // SKILL_ITEMID CObjBase * pObj = uid.ObjFind(); if ( pObj == NULL ) { return( -1 ); } if ( pObj->IsChar()) { CChar * pChar = STATIC_CAST <CChar*>(pObj); ASSERT(pChar); if ( fTest ) { return( 1 ); } SysMessagef( g_Cfg.GetDefaultMsg( "itemid_result" ), (LPCTSTR) pChar->GetName()); return( 1 ); } CItem * pItem = STATIC_CAST <CItem*>(pObj); ASSERT( pItem ); if ( fTest ) { if ( pItem->IsAttr( ATTR_IDENTIFIED )) { // already identified so easier. return Calc_GetRandVal(20); } return Calc_GetRandVal(60); } #ifdef COMMENT if ( pItem->IsAttr(ATTR_MAGIC)) { len += strcpylen( szTemp+len, g_Cfg.GetDefaultMsg( "item_magic" ) ); } else if ( pItem->IsAttr(ATTR_NEWBIE|ATTR_MOVE_NEVER)) { len += strcpylen( szTemp+len, g_Cfg.GetDefaultMsg( "item_newbie" ) ); } #endif pItem->SetAttr(ATTR_IDENTIFIED); // ??? Estimate it's worth ? CItemVendable * pItemVend = dynamic_cast <CItemVendable *>(pItem); if ( pItemVend == NULL ) { SysMessagef( _TEXT( g_Cfg.GetDefaultMsg( "itemid_noval" ) )); } else { SysMessagef( _TEXT( g_Cfg.GetDefaultMsg( "itemid_gold" ) ), pItemVend->GetVendorPrice(-15), (LPCTSTR) pItemVend->GetNameFull(true)); } // Whats it made of ? CItemBase * pItemDef = pItem->Item_GetDef(); ASSERT(pItemDef); if ( iSkillLevel > 40 && pItemDef->m_BaseResources.GetCount()) { TCHAR szTemp[ SCRIPT_MAX_LINE_LEN ]; int iLen = sprintf( szTemp, g_Cfg.GetDefaultMsg( "itemid_madeof" ) ); pItemDef->m_BaseResources.WriteNames( szTemp+iLen ); SysMessage( szTemp ); } // It required what skills to make ? // "It requires lots of mining skill" return iSkillLevel; } int CClient::OnSkill_EvalInt( CGrayUID uid, int iSkillLevel, bool fTest ) { // SKILL_EVALINT // iSkillLevel = 0 to 1000 CChar * pChar = uid.CharFind(); if ( pChar == NULL ) { SysMessageDefault( "non_alive" ); return( 1 ); } if ( fTest ) { if ( pChar == m_pChar ) return( 2 ); return Calc_GetRandVal(60); } static LPCTSTR const sm_szIntDesc[] = { "evalint_int_1", "evalint_int_2", "evalint_int_3", "evalint_int_4", "evalint_int_5", "evalint_int_6", "evalint_int_7", "evalint_int_8", "evalint_int_9", "evalint_int_10", }; int iIntVal = pChar->Stat_GetAdjusted(STAT_INT); int iIntEntry = (iIntVal-1) / 10; if ( iIntEntry < 0 ) iIntEntry = 0; if ( iIntEntry >= COUNTOF( sm_szIntDesc )) iIntEntry = COUNTOF( sm_szIntDesc )-1; SysMessagef( g_Cfg.GetDefaultMsg( "evalint_result" ), (LPCTSTR) pChar->GetName(), (LPCTSTR) g_Cfg.GetDefaultMsg( sm_szIntDesc[iIntEntry] ) ); static LPCTSTR const sm_szMagicDesc[] = { "evalint_mag_1", "evalint_mag_2", "evalint_mag_3", "evalint_mag_4", "evalint_mag_5", "evalint_mag_6", }; static LPCTSTR const sm_szManaDesc[] = { "evalint_man_1", "evalint_man_2", "evalint_man_3", "evalint_man_4", "evalint_man_5", // 100 % "evalint_man_6", }; if ( iSkillLevel > 400 ) // magery skill and mana level ? { int iMagerySkill = pChar->Skill_GetAdjusted(SKILL_MAGERY); int iNecroSkill = pChar->Skill_GetAdjusted(SKILL_NECROMANCY); int iMagicSkill = max(iMagerySkill,iNecroSkill); int iMagicEntry = iMagicSkill / 200; if ( iMagicEntry < 0 ) iMagicEntry = 0; if ( iMagicEntry >= COUNTOF(sm_szMagicDesc)) iMagicEntry = COUNTOF(sm_szMagicDesc)-1; int iManaEntry = IMULDIV( pChar->Stat_GetVal(STAT_INT), COUNTOF(sm_szManaDesc)-1, iIntVal ); if ( iManaEntry < 0 ) iManaEntry = 0; if ( iManaEntry >= COUNTOF(sm_szManaDesc)) iManaEntry = COUNTOF(sm_szManaDesc)-1; SysMessagef( g_Cfg.GetDefaultMsg( "evalint_result_2" ), (LPCTSTR) g_Cfg.GetDefaultMsg( sm_szMagicDesc[iMagicEntry] ), (LPCTSTR) g_Cfg.GetDefaultMsg( sm_szManaDesc[iManaEntry] ) ); } return iSkillLevel; } static LPCTSTR const sm_szPoisonMessages[] = { "armslore_psn_1", "armslore_psn_2", "armslore_psn_3", "armslore_psn_4", "armslore_psn_5", "armslore_psn_6", "armslore_psn_7", "armslore_psn_8", "armslore_psn_9", "armslore_psn_10", }; int CClient::OnSkill_ArmsLore( CGrayUID uid, int iSkillLevel, bool fTest ) { // SKILL_ARMSLORE CItem * pItem = uid.ItemFind(); if ( pItem == NULL || ! pItem->IsTypeArmorWeapon()) { notweapon: SysMessageDefault( "armslore_unable" ); return( -SKTRIG_QTY ); } // MAKE SURE YOU ACCESS THESE AS g_Cfg.GetDefaultMsg( sm_szXXXMessages[i] ) !!!! static LPCTSTR const sm_szAttackMessages[] = { "armslore_dam_1", "armslore_dam_2", "armslore_dam_3", "armslore_dam_4", "armslore_dam_5", "armslore_dam_6", "armslore_dam_7", "armslore_dam_8", "armslore_dam_9", "armslore_dam_10", }; static LPCTSTR const sm_szDefenseMessages[] = { "armslore_def_1", "armslore_def_2", "armslore_def_3", "armslore_def_4", "armslore_def_5", "armslore_def_6", "armslore_def_7", "armslore_def_8", "armslore_def_9", "armslore_def_10", }; TCHAR szTemp[ SCRIPT_MAX_LINE_LEN ]; int len = 0; bool fWeapon; int iHitsCur; int iHitsMax; if ( fTest ) { return Calc_GetRandVal(60); } switch ( pItem->GetType() ) { case IT_ARMOR: // some type of armor. (no real action) case IT_SHIELD: case IT_ARMOR_LEATHER: case IT_CLOTHING: case IT_JEWELRY: fWeapon = false; iHitsCur = pItem->m_itArmor.m_Hits_Cur; iHitsMax = pItem->m_itArmor.m_Hits_Max; len += sprintf( szTemp+len, g_Cfg.GetDefaultMsg( "armslore_def" ), pItem->Armor_GetDefense()); break; case IT_WEAPON_MACE_CROOK: case IT_WEAPON_MACE_PICK: case IT_WEAPON_MACE_SMITH: // Can be used for smithing ? case IT_WEAPON_MACE_STAFF: case IT_WEAPON_MACE_SHARP: // war axe can be used to cut/chop trees. case IT_WEAPON_SWORD: case IT_WEAPON_AXE: case IT_WEAPON_FENCE: case IT_WEAPON_BOW: case IT_WEAPON_XBOW: fWeapon = true; iHitsCur = pItem->m_itWeapon.m_Hits_Cur; iHitsMax = pItem->m_itWeapon.m_Hits_Max; len += sprintf( szTemp+len, g_Cfg.GetDefaultMsg( "armslore_dam" ), pItem->Weapon_GetAttack()); break; default: goto notweapon; } len += sprintf( szTemp+len, g_Cfg.GetDefaultMsg( "armslore_rep" ), pItem->Armor_GetRepairDesc()); if ( iHitsCur <= 3 || iHitsMax <= 3 ) { len += strcpylen( szTemp+len, g_Cfg.GetDefaultMsg( "armslore_rep_0" ) ); } // Magical effects ? if ( pItem->IsAttr(ATTR_MAGIC)) { len += strcpylen( szTemp+len, g_Cfg.GetDefaultMsg( "item_magic" ) ); } else if ( pItem->IsAttr(ATTR_NEWBIE|ATTR_MOVE_NEVER)) { len += strcpylen( szTemp+len, g_Cfg.GetDefaultMsg( "item_newbie" ) ); } // Repairable ? if ( ! pItem->Armor_IsRepairable()) { len += strcpylen( szTemp+len, g_Cfg.GetDefaultMsg( "item_repair" ) ); } // Poisoned ? if ( fWeapon && pItem->m_itWeapon.m_poison_skill ) { int iLevel = IMULDIV( pItem->m_itWeapon.m_poison_skill, COUNTOF(sm_szPoisonMessages), 100 ); if ( iLevel < 0 ) iLevel = 0; if ( iLevel >= COUNTOF(sm_szPoisonMessages)) iLevel = COUNTOF(sm_szPoisonMessages)-1; len += sprintf( szTemp+len, " %s", g_Cfg.GetDefaultMsg( sm_szPoisonMessages[iLevel]) ); } SysMessage(szTemp); return iSkillLevel; } int CClient::OnSkill_Anatomy( CGrayUID uid, int iSkillLevel, bool fTest ) { // SKILL_ANATOMY CChar * pChar = uid.CharFind(); if ( pChar == NULL ) { addObjMessage( g_Cfg.GetDefaultMsg( "non_alive" ), pChar ); return( 1 ); } if ( fTest ) { // based on rareity ? if ( pChar == m_pChar ) return( 2 ); return Calc_GetRandVal(60); } // Add in error cased on your skill level. static LPCTSTR const sm_szStrEval[] = { "anatomy_str_1", "anatomy_str_2", "anatomy_str_3", "anatomy_str_4", "anatomy_str_5", "anatomy_str_6", "anatomy_str_7", "anatomy_str_8", "anatomy_str_9", "anatomy_str_10", }; static LPCTSTR const sm_szDexEval[] = { "anatomy_dex_1", "anatomy_dex_2", "anatomy_dex_3", "anatomy_dex_4", "anatomy_dex_5", "anatomy_dex_6", "anatomy_dex_7", "anatomy_dex_8", "anatomy_dex_9", "anatomy_dex_10", }; int iStrVal = pChar->Stat_GetAdjusted(STAT_STR); int iStrEntry = (iStrVal-1)/10; if ( iStrEntry < 0 ) iStrEntry = 0; if ( iStrEntry >= COUNTOF( sm_szStrEval )) iStrEntry = COUNTOF( sm_szStrEval )-1; int iDexVal = pChar->Stat_GetAdjusted(STAT_DEX); int iDexEntry = (iDexVal-1)/10; if ( iDexEntry < 0 ) iDexEntry = 0; if ( iDexEntry >= COUNTOF( sm_szDexEval )) iDexEntry = COUNTOF( sm_szDexEval )-1; CGString sTmp; sTmp.Format( g_Cfg.GetDefaultMsg( "anatomy_result" ), (LPCTSTR) pChar->GetName(), g_Cfg.GetDefaultMsg( sm_szStrEval[iStrEntry] ), g_Cfg.GetDefaultMsg( sm_szDexEval[iDexEntry] ) ); addObjMessage( sTmp, pChar ); if ( pChar->IsStatFlag( STATF_Conjured )) { addObjMessage( g_Cfg.GetDefaultMsg( "anatomy_magic" ), pChar ); } // ??? looks hungry ? return iSkillLevel; } int CClient::OnSkill_Forensics( CGrayUID uid, int iSkillLevel, bool fTest ) { // SKILL_FORENSICS // ! weird client issue targetting corpses ! CItemCorpse * pCorpse = dynamic_cast <CItemCorpse *>( uid.ItemFind()); if ( pCorpse == NULL ) { SysMessageDefault( "forensics_corpse" ); return( -SKTRIG_QTY ); } if ( ! m_pChar->CanTouch( pCorpse )) { SysMessageDefault( "forensics_reach" ); return( -SKTRIG_QTY ); } if ( fTest ) { if ( pCorpse->m_uidLink == m_pChar->GetUID() ) return( 2 ); return Calc_GetRandVal(60); } CGrayUID uidKiller( pCorpse->m_itCorpse.m_uidKiller ); CChar * pCharKiller = uidKiller.CharFind(); LPCTSTR pName = ( pCharKiller != NULL ) ? pCharKiller->GetName() : NULL; if ( pCorpse->IsCorpseSleeping()) { // "They are not dead but mearly unconscious" SysMessagef( g_Cfg.GetDefaultMsg( "forensics_alive" ), pName ? pName : "It" ); return 1; } TCHAR szTemp[ SCRIPT_MAX_LINE_LEN ]; if ( pCorpse->m_itCorpse.m_timeDeath.IsTimeValid() ) { int len = sprintf( szTemp, g_Cfg.GetDefaultMsg( "forensics_timer" ), pCorpse->GetName(), ( - g_World.GetTimeDiff( pCorpse->m_itCorpse.m_timeDeath )) / TICK_PER_SEC ); if ( pName == NULL ) { strcpy( szTemp+len, g_Cfg.GetDefaultMsg( "forensics_failname" ) ); } else { sprintf( szTemp+len, g_Cfg.GetDefaultMsg( "forensics_name" ), pName ); } } else { int len = sprintf( szTemp, g_Cfg.GetDefaultMsg( "forensics_carve_1" ), pCorpse->GetName()); if ( pName == NULL ) { strcpy( szTemp+len, g_Cfg.GetDefaultMsg( "forensics_failname" ) ); } else { sprintf( szTemp+len, g_Cfg.GetDefaultMsg( "forensics_carve_2" ), pName ); } } SysMessage( szTemp ); return iSkillLevel; } int CClient::OnSkill_TasteID( CGrayUID uid, int iSkillLevel, bool fTest ) { // SKILL_TASTEID // Try to taste for poisons I assume. // Maybe taste what it is made of for ingredients ? // Differntiate potion types ? CItem * pItem = uid.ItemFind(); if ( pItem == NULL ) { if ( uid == m_pChar->GetUID()) { SysMessageDefault( "tasteid_self" ); } else { SysMessageDefault( "tasteid_char" ); } return( -SKTRIG_QTY ); } if ( ! m_pChar->CanUse( pItem, true )) { SysMessageDefault( "tasteid_unable" ); return( -SKTRIG_QTY ); } int iPoisonLevel = 0; switch ( pItem->GetType()) { case IT_POTION: if ( RES_GET_INDEX(pItem->m_itPotion.m_Type) == SPELL_Poison ) { iPoisonLevel = pItem->m_itPotion.m_skillquality; } break; case IT_FRUIT: case IT_FOOD: case IT_FOOD_RAW: case IT_MEAT_RAW: iPoisonLevel = pItem->m_itFood.m_poison_skill*10; break; case IT_WEAPON_MACE_SHARP: case IT_WEAPON_SWORD: // 13 = case IT_WEAPON_FENCE: // 14 = can't be used to chop trees. (make kindling) case IT_WEAPON_AXE: // pItem->m_itWeapon.m_poison_skill = pPoison->m_itPotion.m_skillquality / 10; iPoisonLevel = pItem->m_itWeapon.m_poison_skill*10; break; default: if ( ! fTest ) { SysMessagef( g_Cfg.GetDefaultMsg( "tasteid_result" ), (LPCTSTR) pItem->GetNameFull(false) ); } return 1; } if ( fTest ) { return Calc_GetRandVal(60); } if ( iPoisonLevel ) { int iLevel = IMULDIV( iPoisonLevel, COUNTOF(sm_szPoisonMessages), 1000 ); if ( iLevel < 0 ) iLevel = 0; if ( iLevel >= COUNTOF(sm_szPoisonMessages)) iLevel = COUNTOF(sm_szPoisonMessages)-1; SysMessage( sm_szPoisonMessages[iLevel] ); } else { SysMessagef( g_Cfg.GetDefaultMsg( "tasteid_result" ), (LPCTSTR) pItem->GetNameFull(false) ); } return iSkillLevel; } int CClient::OnSkill_Info( SKILL_TYPE skill, CGrayUID uid, int iSkillLevel, bool fTest ) { // Skill timer has expired. // RETURN: difficulty credit. 0-100 // <0 = immediate failure. switch ( skill ) { case SKILL_ANIMALLORE: return OnSkill_AnimalLore( uid, iSkillLevel, fTest ); case SKILL_ARMSLORE: return OnSkill_ArmsLore( uid, iSkillLevel, fTest ); case SKILL_ANATOMY: return OnSkill_Anatomy( uid, iSkillLevel, fTest ); case SKILL_ITEMID: return OnSkill_ItemID( uid, iSkillLevel, fTest ); case SKILL_EVALINT: return OnSkill_EvalInt( uid, iSkillLevel, fTest ); case SKILL_FORENSICS: return OnSkill_Forensics( uid, iSkillLevel, fTest ); case SKILL_TASTEID: return OnSkill_TasteID( uid, iSkillLevel, fTest ); } DEBUG_CHECK(0); return( -SKTRIG_QTY ); } //////////////////////////////////////// // Targeted skills and actions. bool CClient::OnTarg_Skill( CObjBase * pObj ) { // targetted skill now has it's target. // response to CLIMODE_TARG_SKILL // from Event_Skill_Use() select button from skill window if ( pObj == NULL ) return( false ); bool fContinue = false; SetTargMode(); // just make sure last targ mode is gone. m_Targ_UID = pObj->GetUID(); // keep for 'last target' info. // targetting what skill ? switch ( m_tmSkillTarg.m_Skill ) { // Delayed response type skills. case SKILL_BEGGING: m_pChar->UpdateAnimate( ANIM_BOW ); case SKILL_STEALING: case SKILL_TAMING: case SKILL_ENTICEMENT: case SKILL_STEALTH: // Informational skills. (instant return) case SKILL_ANIMALLORE: case SKILL_ARMSLORE: case SKILL_ANATOMY: case SKILL_ITEMID: case SKILL_EVALINT: case SKILL_FORENSICS: case SKILL_TASTEID: m_pChar->m_Act_Targ = m_Targ_UID; return( m_pChar->Skill_Start( m_tmSkillTarg.m_Skill )); case SKILL_PROVOCATION: if ( ! pObj->IsChar()) { SysMessageDefault( "provoke_unable" ); return( false ); } addTarget( CLIMODE_TARG_SKILL_PROVOKE, g_Cfg.GetDefaultMsg( "provoke_select" ), false, true ); break; case SKILL_POISONING: // We now have to find the poison. addTarget( CLIMODE_TARG_SKILL_POISON, g_Cfg.GetDefaultMsg( "poisoning_select_1" ), false, true ); break; default: // This is not a targetted skill ! break; } return true; } bool CClient::OnTarg_Skill_Provoke( CObjBase * pObj ) { // CLIMODE_TARG_SKILL_PROVOKE if ( pObj == NULL ) return( false ); if ( ! pObj->IsChar() ) { SysMessageDefault( "provoke_unable" ); return( false ); } m_pChar->m_Act_TargPrv = m_Targ_UID; // provoke him m_pChar->m_Act_Targ = pObj->GetUID(); // against him return( m_pChar->Skill_Start( SKILL_PROVOCATION )); } bool CClient::OnTarg_Skill_Poison( CObjBase * pObj ) { // CLIMODE_TARG_SKILL_POISON if ( pObj == NULL ) return( false ); m_pChar->m_Act_TargPrv = m_Targ_UID; // poison this m_pChar->m_Act_Targ = pObj->GetUID(); // with this poison return( m_pChar->Skill_Start( SKILL_POISONING )); } bool CClient::OnTarg_Skill_Herd_Dest( CObjBase * pObj, const CPointMap & pt ) { // CLIMODE_TARG_SKILL_HERD_DEST m_pChar->m_Act_p = pt; m_pChar->m_Act_Targ = m_Targ_UID; // Who to herd? m_pChar->m_Act_TargPrv = m_Targ_PrvUID; // crook ? return( m_pChar->Skill_Start( SKILL_HERDING )); } bool CClient::OnTarg_Skill_Magery( CObjBase * pObj, const CPointMap & pt ) { // The client player has targeted a spell. // CLIMODE_TARG_SKILL_MAGERY CSpellDef * pSpell = g_Cfg.GetSpellDef( m_tmSkillMagery.m_Spell ); if ( ! pSpell ) return false; if ( pObj ) { if ( !pSpell->IsSpellType( SPELLFLAG_TARG_OBJ ) ) { SysMessageDefault( "magery_4" ); return true; } if ( pObj->IsItem() && !pSpell->IsSpellType( SPELLFLAG_TARG_ITEM ) ) { SysMessageDefault( "magery_1" ); return true; } if ( pObj->IsChar() && !pSpell->IsSpellType( SPELLFLAG_TARG_CHAR ) ) { SysMessageDefault( "magery_2" ); return true; } if ( pObj == (CObjBase*) m_pChar && pSpell->IsSpellType( SPELLFLAG_TARG_NOSELF ) && !IsPriv(PRIV_GM) ) { SysMessageDefault( "magery_3" ); return true; } } if ( m_tmSkillMagery.m_Spell == SPELL_Polymorph ) { return Cmd_Skill_Menu( g_Cfg.ResourceGetIDType( RES_SKILLMENU, "sm_polymorph" )); } m_pChar->m_atMagery.m_Spell = m_tmSkillMagery.m_Spell; m_pChar->m_atMagery.m_SummonID = m_tmSkillMagery.m_SummonID; m_pChar->m_atMagery.m_fSummonPet = m_tmSkillMagery.m_fSummonPet; m_pChar->m_Act_TargPrv = m_Targ_PrvUID; // Source (wand or you?) m_pChar->m_Act_Targ = pObj ? (DWORD) pObj->GetUID() : UID_CLEAR ; m_pChar->m_Act_p = pt; m_Targ_p = pt; if ( g_Cfg.IsSetOF( OF_Magic_PreCast ) ) return( m_pChar->Spell_CastDone() ); else return( m_pChar->Skill_Start( SKILL_MAGERY )); } bool CClient::OnTarg_Pet_Command( CObjBase * pObj, const CPointMap & pt ) { // CLIMODE_TARG_PET_CMD // Any pet command requiring a target. // m_Targ_UID = the pet i was instructing. // m_tmPetCmd = command index. // m_Targ_Text = the args to the command that got us here. if ( m_tmPetCmd.m_fAllPets ) { // All the pets that could hear me. bool fGhostSpeak = m_pChar->IsSpeakAsGhost(); CWorldSearch AreaChars( m_pChar->GetTopPoint(), UO_MAP_VIEW_SIGHT ); while (true) { CChar * pCharPet = AreaChars.GetChar(); if ( pCharPet == NULL ) break; if ( pCharPet == m_pChar ) continue; if ( fGhostSpeak && ! pCharPet->CanUnderstandGhost()) continue; if ( ! pCharPet->NPC_IsOwnedBy( GetChar(), true )) continue; pCharPet->NPC_OnHearPetCmdTarg( m_tmPetCmd.m_iCmd, GetChar(), pObj, pt, m_Targ_Text ); } return( true ); } else { CChar * pCharPet = m_Targ_UID.CharFind(); if ( pCharPet == NULL ) return false; return pCharPet->NPC_OnHearPetCmdTarg( m_tmPetCmd.m_iCmd, GetChar(), pObj, pt, m_Targ_Text ); } } bool CClient::OnTarg_Pet_Stable( CChar * pCharPet ) { // CLIMODE_PET_STABLE // NOTE: You are only allowed to stable x creatures here. // m_Targ_PrvUID = stable master. CChar * pCharMaster = m_Targ_PrvUID.CharFind(); if ( pCharMaster == NULL ) return( false ); if ( pCharPet == NULL || ! pCharPet->NPC_IsOwnedBy( m_pChar ) || pCharPet->m_pPlayer || pCharMaster == pCharPet ) { SysMessageDefault( "npc_stablemaster_select" ); return( false ); } if ( ! pCharMaster->CanSee(pCharPet)) { pCharMaster->Speak( g_Cfg.GetDefaultMsg( "npc_stablemaster_los" ) ); return( false ); } // Shink the pet and put it in the bank box of the stable master. CItem * pPetItem = pCharPet->Make_Figurine( m_pChar->GetUID()); if ( pPetItem == NULL ) { pCharMaster->Speak( g_Cfg.GetDefaultMsg( "npc_stablemaster_fail" ) ); return( false ); } pCharMaster->GetBank()->ContentAdd( pPetItem ); CGString sMsg; sMsg.Format( g_Cfg.GetDefaultMsg( "npc_stablemaster_rem" ), (LPCTSTR) pCharMaster->GetName()); pCharMaster->Speak( sMsg ); return( true ); } //----------------------------------------------------------------------- // Targetted items with special props. bool CClient::OnTarg_Use_Deed( CItem * pDeed, const CPointMap & pt ) { // Place the house/ship here. (if possible) // Can the structure go here ? // IT_DEED // if ( ! m_pChar->CanUse(pDeed, true )) return( false ); const CItemBase * pItemDef = CItemBase::FindItemBase( (ITEMID_TYPE) RES_GET_INDEX( pDeed->m_itDeed.m_Type )); if ( ! OnTarg_Use_Multi( pItemDef, pt, pDeed->m_Attr, pDeed->GetHue() )) return( false ); pDeed->Delete(); // consume the deed. return true; } CItem * CClient::OnTarg_Use_Multi( const CItemBase * pItemDef, const CPointMap & pt, WORD wAttr, HUE_TYPE wHue ) { // Might be a IT_MULTI or it might not. place it anyhow. if ( pItemDef == NULL ) return( NULL ); bool fShip = ( pItemDef->IsType(IT_SHIP)); // must be in water. const CItemBaseMulti * pMultiDef = dynamic_cast <const CItemBaseMulti *> ( pItemDef ); // Check water/mountains/etc. if ( pMultiDef != NULL && ! (wAttr&ATTR_MAGIC)) { // Check for items in the way and bumpy terrain. CGRect rect = pMultiDef->m_rect; rect.OffsetRect( pt.m_x, pt.m_y ); CPointMap ptn = pt; int x=rect.m_left; for ( ; x <=rect.m_right; x++ ) { ptn.m_x = x; int y=rect.m_top; for ( ; y<=rect.m_bottom; y++ ); { ptn.m_y = y; CRegionBase * pRegion = ptn.GetRegion( REGION_TYPE_MULTI | REGION_TYPE_AREA | REGION_TYPE_ROOM ); if ( pRegion == NULL || (( pRegion->IsFlag( REGION_FLAG_NOBUILDING ) && ! fShip ) && ! IsPriv(PRIV_GM))) { SysMessageDefault( "itemuse_multi_fail" ); if ( ! IsPriv( PRIV_GM )) return( NULL ); } WORD wBlockFlags = ( fShip ) ? CAN_C_SWIM : CAN_C_WALK; ptn.m_z = g_World.GetHeightPoint( ptn, wBlockFlags, true ); if ( abs( ptn.m_z - pt.m_z ) > 4 ) { SysMessageDefault( "itemuse_multi_bump" ); if ( ! IsPriv( PRIV_GM )) return( NULL ); } if ( fShip ) { if ( ! ( wBlockFlags & CAN_I_WATER )) { SysMessageDefault( "itemuse_multi_shipw" ); if ( ! IsPriv( PRIV_GM )) return( NULL ); } } else { if ( wBlockFlags & ( CAN_I_WATER | CAN_I_BLOCK | CAN_I_CLIMB )) { SysMessageDefault( "itemuse_multi_blocked" ); if ( ! IsPriv( PRIV_GM )) return( NULL ); } } } } // Check for chars in the way. CWorldSearch Area( pt, UO_MAP_VIEW_SIZE ); while (true) { CChar * pChar = Area.GetChar(); if ( pChar == NULL ) break; if ( pChar == m_pChar ) continue; if ( ! rect.IsInside2d( pChar->GetTopPoint())) continue; SysMessagef( g_Cfg.GetDefaultMsg( "itemuse_multi_intway" ), (LPCTSTR) pChar->GetName()); return( NULL ); } } CItem * pItemNew = CItem::CreateTemplate( pItemDef->GetID(), NULL, m_pChar ); if ( pItemNew == NULL ) { SysMessageDefault( "itemuse_multi_collapse" ); return( NULL ); } pItemNew->SetAttr( wAttr & ( ATTR_MAGIC | ATTR_INVIS )); pItemNew->SetHue( wHue ); pItemNew->MoveTo( pt ); CItemMulti * pMultiItem = dynamic_cast <CItemMulti*>(pItemNew); if ( pMultiItem ) { pMultiItem->Multi_Create( m_pChar, UID_CLEAR ); } if ( pItemDef->IsType(IT_STONE_GUILD)) { // Now name the guild m_Targ_UID = pItemNew->GetUID(); addPromptConsole( CLIMODE_PROMPT_STONE_NAME, g_Cfg.GetDefaultMsg( "itemuse_guildstone_new" ) ); } else if ( fShip ) { pItemNew->Sound( Calc_GetRandVal(2)? 0x12:0x13 ); } return pItemNew; } bool CClient::OnTarg_Use_Item( CObjBase * pObjTarg, CPointMap & pt, ITEMID_TYPE id ) { // CLIMODE_TARG_USE_ITEM started from Event_DoubleClick() // Targetted an item to be used on some other object (char or item). // Solve for the intersection of the items. // ARGS: // id = static item id // uid = the target. // m_Targ_UID = what is the used object on the target // // NOTE: // Assume we can see the target. // // RETURN: // true = success. CItem * pItemUse = m_Targ_UID.ItemFind(); if ( pItemUse == NULL ) { SysMessage( "Targetted item is gone?" ); return false; } if ( pItemUse->GetParent() != m_tmUseItem.m_pParent ) { // Watch out for cheating. // Is the source item still in the same place as it was. SysMessage( "Targetted item moved?" ); return false; } m_Targ_PrvUID = m_Targ_UID; // used item. m_Targ_p = pt; ITRIG_TYPE trigtype; if ( pObjTarg == NULL ) { m_Targ_UID.ClearUID(); if ( pt.IsCharValid()) { m_pChar->UpdateDir(pt); } // CScriptTriggerArgs Args( x, y, z ); trigtype = ITRIG_TARGON_GROUND; } else { m_Targ_UID = pObjTarg->GetUID(); m_pChar->UpdateDir(pObjTarg); if ( pObjTarg->IsChar() ) { trigtype = ITRIG_TARGON_CHAR; } else { trigtype = ITRIG_TARGON_ITEM; } } CScriptTriggerArgs Args( id, 0, pObjTarg ); if ( pItemUse->OnTrigger( trigtype, m_pChar, &Args ) == TRIGRET_RET_TRUE ) { return true; } // NOTE: We have NOT checked to see if the targetted object is within reasonable distance. // Call CanUse( pItemTarg ) // What did i target it on ? this could be null if ground is the target. CChar * pCharTarg = dynamic_cast <CChar*>(pObjTarg); CItem * pItemTarg = dynamic_cast <CItem*>(pObjTarg); switch ( pItemUse->GetType() ) { case IT_COMM_CRYSTAL: if ( pItemTarg == NULL ) return( false ); if ( ! pItemTarg->IsType(IT_COMM_CRYSTAL)) return( false ); pItemUse->m_uidLink = pItemTarg->GetUID(); pItemUse->Speak( "Linked" ); return( true ); case IT_POTION: // Use a potion on something else. if ( RES_GET_INDEX(pItemUse->m_itPotion.m_Type) == SPELL_Poison ) { // ??? If the item is a poison ask them what they want to use the poison on ? // Poisoning or poison self ? } else if ( RES_GET_INDEX(pItemUse->m_itPotion.m_Type) == SPELL_Explosion ) { // Throw explode potion. if ( ! pItemUse->IsItemEquipped() || pItemUse->GetEquipLayer() != LAYER_DRAGGING ) return( false ); // Put at destination location. CPointMap ptBlock; if ( m_pChar->CanSeeLOS( pt, &ptBlock, UO_MAP_VIEW_SIZE )) // Get the block point. ptBlock = pt; pItemUse->MoveTo( ptBlock ); // leave the decay as it is. pItemUse->Effect( EFFECT_BOLT, pItemUse->GetDispID(), m_pChar, 7, 0, false ); } return( true ); case IT_MEAT_RAW: case IT_FOOD_RAW: // Try to put it on some sort of fire. switch ( m_pChar->CanTouchStatic( pt, id, pItemTarg )) { case IT_JUNK: SysMessageDefault( "itemuse_foodraw_touch" ); return( false ); case IT_FIRE: case IT_FORGE: case IT_CAMPFIRE: // Start cooking skill. m_pChar->m_Act_Targ = m_Targ_PrvUID; m_pChar->m_Act_p = pt; m_pChar->Skill_Start( SKILL_COOKING ); return( true ); default: if ( pCharTarg == m_pChar && m_pChar->Use_Eat( pItemUse )) { return( true ); } // static fire ? SysMessageDefault( "itemuse_foodraw_use" ); return( false ); } break; case IT_KEY: return( m_pChar->Use_Key( pItemUse, pItemTarg )); case IT_FORGE: // target the ore. return( m_pChar->Skill_Mining_Smelt( pItemTarg, pItemUse )); case IT_CANNON_MUZZLE: // We have targetted the cannon to something. if ( ( pItemUse->m_itCannon.m_Load & 3 ) != 3 ) { if ( m_pChar->Use_Cannon_Feed( pItemUse, pItemTarg )) { pItemTarg->ConsumeAmount(); } return( true ); } // Fire! pItemUse->m_itCannon.m_Load = 0; pItemUse->Sound( 0x207 ); pItemUse->Effect( EFFECT_OBJ, ITEMID_FX_TELE_VANISH, pItemUse, 9, 6 ); // just explode on the ground ? if ( pObjTarg != NULL ) { // Check distance and LOS. #if 0 // CPointMap ptDst; if ( ! pItemUse->CanSeeLOS( pObjTarg )) return( true ); #endif if ( pItemUse->GetDist( pObjTarg ) > UO_MAP_VIEW_SIZE ) { SysMessageDefault( "itemuse_toofar" ); return( true ); } // Hit the Target ! pObjTarg->Sound( 0x207 ); pObjTarg->Effect( EFFECT_BOLT, ITEMID_Cannon_Ball, pItemUse, 8, 0, true ); pObjTarg->OnTakeDamage( 80 + Calc_GetRandVal( 150 ), m_pChar, DAMAGE_HIT_BLUNT | DAMAGE_FIRE ); } return( true ); case IT_WEAPON_MACE_PICK: // Mine at the location. (shovel) m_pChar->m_Act_p = pt; m_pChar->m_Act_TargPrv = m_Targ_PrvUID; return( m_pChar->Skill_Start( SKILL_MINING )); case IT_WEAPON_MACE_CROOK: // SKILL_HERDING // Selected a creature to herd // Move the selected item or char to this location. if ( pCharTarg == NULL ) { // hit it ? SysMessageDefault( "itemuse_crook_try" ); return( false ); } addTarget( CLIMODE_TARG_SKILL_HERD_DEST, "Where do you want them to go ?", true ); return( true ); case IT_WEAPON_MACE_SMITH: // Can be used for smithing. // Near a forge ? smithing ? if ( pItemTarg == NULL ) break; if ( pItemTarg->IsType(IT_INGOT) ) { return Cmd_Skill_Smith( pItemTarg ); } else if ( pItemTarg->Armor_IsRepairable()) { // Near an anvil ? repair ? if ( m_pChar->Use_Repair( pItemTarg )) return( true ); } break; case IT_CARPENTRY_CHOP: // Carpentry type tool case IT_WEAPON_MACE_SHARP:// 22 = war axe can be used to cut/chop trees. case IT_WEAPON_FENCE: // 24 = can't be used to chop trees. case IT_WEAPON_AXE: case IT_WEAPON_SWORD: // 23 = // Use sharp weapon on something. if ( pCharTarg != NULL ) { // on some person ? if ( ! m_pChar->CanTouch(pCharTarg) ) return( false ); switch ( pCharTarg->GetID()) { case CREID_Sheep: // Sheep have wool. // Get the wool. { CItem *pWool = CItem::CreateBase( ITEMID_WOOL ); ASSERT(pWool); m_pChar->ItemBounce(pWool); pCharTarg->SetID(CREID_Sheep_Sheered); // Set wool to regrow. pWool = CItem::CreateBase( ITEMID_WOOL ); ASSERT(pWool); pWool->SetTimeout( g_Cfg.m_iWoolGrowthTime ); pCharTarg->LayerAdd( pWool, LAYER_FLAG_Wool ); pCharTarg->Update(); } return true; case CREID_Sheep_Sheered: SysMessageDefault( "itemuse_weapon_wwait" ); return true; default: // I suppose this is an attack ? break; } break; } switch ( m_pChar->CanTouchStatic( pt, id, pItemTarg )) { case IT_JUNK: SysMessageDefault( "itemuse_junk_reach" ); return false; case IT_FOLIAGE: case IT_TREE: // Just targetted a tree type if ( pItemUse->IsType(IT_WEAPON_FENCE) ) { CItem * pResBit = g_World.CheckNaturalResource( pt, (IT_TYPE) GETINTRESOURCE(m_pChar->m_atResource.m_ridType), false, m_pChar ); if ( pResBit == NULL ) { SysMessageDefault( "lumberjacking_3" ); return false; } if ( pResBit->ConsumeAmount(1) == 0 ) { SysMessageDefault( "lumberjacking_4" ); return false; } SysMessageDefault( "lumberjacking_5" ); //m_pChar->UpdateDir( pt ); m_pChar->UpdateAnimate( ANIM_ATTACK_WEAPON ); m_pChar->Sound( 0x13e ); m_pChar->ItemBounce( CItem::CreateScript( ITEMID_KINDLING1, m_pChar )); return true; } m_pChar->m_Act_TargPrv = m_Targ_PrvUID; m_pChar->m_Act_Targ = m_Targ_UID; m_pChar->m_Act_p = pt; return( m_pChar->Skill_Start( SKILL_LUMBERJACKING )); /* SysMessage( "Chopping the tree foliage yields nothing." ); return( true ); */ case IT_LOG: if ( ! m_pChar->CanUse( pItemTarg, true )) { SysMessageDefault( "itemuse_log_unable" ); return( false ); } if ( pItemUse->IsType(IT_CARPENTRY_CHOP) ) { return Cmd_Skill_Menu( g_Cfg.ResourceGetIDType( RES_SKILLMENU, "sm_carpentry" )); } if ( pItemUse->IsSameDispID( ITEMID_DAGGER )) { // set the target item m_Targ_UID = pItemTarg->GetUID(); return Cmd_Skill_Menu( g_Cfg.ResourceGetIDType( RES_SKILLMENU, "sm_bowcraft" ) ); } SysMessageDefault( "itemuse_log_use" ); return false; case IT_FISH: if ( ! m_pChar->CanUse( pItemTarg, true )) { SysMessageDefault( "itemuse_fish_unable" ); return( false ); } // Carve up Fish parts. pItemTarg->SetID( ITEMID_FOOD_FISH_RAW ); pItemTarg->SetAmount( 4 * pItemTarg->GetAmount()); pItemTarg->Update(); return true; case IT_CORPSE: if ( ! m_pChar->CanUse( pItemTarg, false )) return( false ); m_pChar->Use_CarveCorpse( dynamic_cast <CItemCorpse*>( pItemTarg )); return true; case IT_FRUIT: case IT_REAGENT_RAW: // turn the fruit into a seed. if ( ! m_pChar->CanUse( pItemTarg, true )) return( false ); { pItemTarg->SetDispID(ITEMID_COPPER_C1); // copper coin pItemTarg->SetType(IT_SEED); CGString sTmp; sTmp.Format( "%s seed", pItemTarg->GetName()); pItemTarg->SetName(sTmp); pItemTarg->Update(); } return( true ); // case IT_FOLIAGE: // trim back ? //Torfo begin (we can not use static crops) // case IT_CROPS: // pItemTarg->Plant_CropReset(); // return( true ); //Torfo end default: // Item to smash ? furniture ??? if ( ! m_pChar->CanMove(pItemTarg) ) { SysMessageDefault( "itemuse_weapon_immune" ); return( false ); // ? using does not imply moving in all cases ! such as reading ? } // Is breaking this a crime ? if ( m_pChar->IsTakeCrime( pItemTarg )) { SysMessageDefault( "itemuse_steal" ); return( false ); } if ( pItemTarg ) pItemTarg->OnTakeDamage( 1, m_pChar, DAMAGE_HIT_BLUNT ); return( true ); } break; case IT_BANDAGE: // SKILL_HEALING, or SKILL_VETERINARY // Use bandages on some creature. if ( pCharTarg == NULL ) return( false ); m_pChar->m_Act_TargPrv = m_Targ_PrvUID; m_pChar->m_Act_Targ = m_Targ_UID; return( m_pChar->Skill_Start( (pCharTarg->GetNPCBrain() == NPCBRAIN_ANIMAL) ? SKILL_VETERINARY : SKILL_HEALING )); case IT_SEED: return m_pChar->Use_Seed( pItemUse, &pt ); case IT_DEED: return( OnTarg_Use_Deed( pItemUse, pt )); case IT_WOOL: case IT_COTTON: // Use on a spinning wheel. if ( pItemTarg == NULL ) break; if ( ! pItemTarg->IsType(IT_SPINWHEEL)) break; if ( ! m_pChar->CanUse( pItemTarg, false )) return( false ); pItemTarg->SetAnim( (ITEMID_TYPE)( pItemTarg->GetID() + 1 ), 2*TICK_PER_SEC ); pItemUse->ConsumeAmount( 1 ); { CItem * pNewItem; if ( pItemUse->IsType(IT_WOOL)) { // 1 pile of wool yields three balls of yarn SysMessageDefault("itemuse_wool_create"); pNewItem = CItem::CreateScript( ITEMID_YARN1, m_pChar ); if ( pNewItem->GetAmount() == 1 ) pNewItem->SetAmountUpdate( 3 ); } else { // 1 pile of cotton yields six spools of thread SysMessageDefault("itemuse_cotton_create"); pNewItem = CItem::CreateScript( ITEMID_THREAD1, m_pChar ); if ( pNewItem->GetAmount() == 1 ) pNewItem->SetAmountUpdate( 6 ); } m_pChar->ItemBounce( pNewItem ); } return true; case IT_KEYRING: // it acts as a key. { if ( pItemTarg == NULL ) return( false ); CItemContainer* pKeyRing = dynamic_cast <CItemContainer*>(pItemUse); if ( pKeyRing == NULL ) return( false ); if ( pItemTarg == pItemUse ) { // Use a keyring on self = remove all keys. pKeyRing->ContentsTransfer( m_pChar->GetPack(), false ); return( true ); } CItem * pKey = NULL; bool fLockable = pItemTarg->IsTypeLockable(); if ( fLockable && pItemTarg->m_itContainer.m_lockUID ) { // try all the keys on the object. pKey = pKeyRing->ContentFind( RESOURCE_ID(RES_TYPEDEF,IT_KEY), pItemTarg->m_itContainer.m_lockUID ); } if ( pKey == NULL ) { // are we trying to lock it down ? if ( m_pChar->m_pArea->GetResourceID().IsItem()) { pKey = pKeyRing->ContentFind( RESOURCE_ID(RES_TYPEDEF,IT_KEY), m_pChar->m_pArea->GetResourceID() ); if ( pKey ) { if ( m_pChar->Use_MultiLockDown( pItemTarg )) { return( true ); } } } if ( ! fLockable || ! pItemTarg->m_itContainer.m_lockUID ) { SysMessageDefault( "itemuse_key_nolock"); } else { SysMessageDefault( "itemuse_key_nokey" ); } return false; } return( m_pChar->Use_Key( pKey, pItemTarg )); } case IT_SCISSORS: // cut hair as well ? if ( pCharTarg != NULL ) { // Make this a crime ? if ( pCharTarg != m_pChar && ! IsPriv(PRIV_GM)) return( false ); pObjTarg = pCharTarg->LayerFind( LAYER_BEARD ); if ( pObjTarg != NULL ) pObjTarg->Delete(); pObjTarg = pCharTarg->LayerFind( LAYER_HAIR ); if ( pObjTarg != NULL ) pObjTarg->Delete(); m_pChar->Sound( SOUND_SNIP ); // snip noise. return true; } if ( pItemTarg != NULL ) { if ( ! m_pChar->CanUse( pItemTarg, true )) return( false ); // Cut up cloth. int iOutQty = 0; ITEMID_TYPE iOutID = ITEMID_BANDAGES1; switch ( pItemTarg->GetType()) { case IT_CLOTH_BOLT: // Just make cut cloth here ! pItemTarg->ConvertBolttoCloth(); m_pChar->Sound( SOUND_SNIP ); // snip noise. return( true ); case IT_CLOTH: pItemTarg->ConvertBolttoCloth(); iOutQty = pItemTarg->GetAmount(); break; case IT_CLOTHING: // Cut up for bandages. iOutQty = pItemTarg->GetWeight()/WEIGHT_UNITS; break; case IT_HIDE: // IT_LEATHER // Cut up the hides and create strips of leather iOutID = ITEMID_LEATHER_1; iOutQty = pItemTarg->GetAmount(); break; } if ( iOutQty ) { CItem * pItemNew = CItem::CreateBase( iOutID ); ASSERT(pItemNew); pItemNew->SetHue( pItemTarg->GetHue()); pItemNew->SetAmount( iOutQty ); m_pChar->ItemBounce( pItemNew ); pItemTarg->Delete(); m_pChar->Sound( SOUND_SNIP ); // snip noise. return( true ); } } SysMessageDefault( "itemuse_scissors_use" ); return false; case IT_YARN: case IT_THREAD: // Use this on a loom. // use on a spinning wheel. if ( pItemTarg == NULL ) break; if ( ! pItemTarg->IsType( IT_LOOM )) break; if ( ! m_pChar->CanUse( pItemTarg, false )) return( false ); { static LPCTSTR const sm_Txt_LoomUse[] = { "itemuse_bolt_1", "itemuse_bolt_2", "itemuse_bolt_3", "itemuse_bolt_4", "itemuse_bolt_5", }; // pItemTarg->SetAnim( (ITEMID_TYPE)( pItemTarg->GetID() + 1 ), 2*TICK_PER_SEC ); // Use more1 to record the type of resource last used on this object // Use more2 to record the number of resources used so far // Check what was used last. if ( pItemTarg->m_itLoom.m_ClothID != pItemUse->GetDispID() && pItemTarg->m_itLoom.m_ClothID ) { // throw away what was on here before SysMessageDefault("itemuse_loom_remove"); CItem * pItemCloth = CItem::CreateTemplate( pItemTarg->m_itLoom.m_ClothID, NULL, m_pChar ); pItemCloth->SetAmount( pItemTarg->m_itLoom.m_ClothQty ); pItemTarg->m_itLoom.m_ClothQty = 0; pItemTarg->m_itLoom.m_ClothID = ITEMID_NOTHING; m_pChar->ItemBounce( pItemCloth ); return true; } pItemTarg->m_itLoom.m_ClothID = pItemUse->GetDispID(); int iUsed; int iNeed = COUNTOF( sm_Txt_LoomUse )-1; int iHave = pItemTarg->m_itLoom.m_ClothQty; if ( iHave < iNeed ) { iNeed -= iHave; iUsed = pItemUse->ConsumeAmount( iNeed ); } if ( iHave + iUsed < COUNTOF( sm_Txt_LoomUse )-1 ) { pItemTarg->m_itLoom.m_ClothQty += iUsed; SysMessageDefault( sm_Txt_LoomUse[ pItemTarg->m_itLoom.m_ClothQty ] ); } else { SysMessage( sm_Txt_LoomUse[ COUNTOF( sm_Txt_LoomUse )-1 ] ); pItemTarg->m_itLoom.m_ClothQty = 0; pItemTarg->m_itLoom.m_ClothID = ITEMID_NOTHING; m_pChar->ItemBounce( CItem::CreateScript(ITEMID_CLOTH_BOLT1, m_pChar )); } } return true; case IT_BANDAGE_BLOOD: // Use these on water to clean them. switch ( m_pChar->CanTouchStatic( pt, id, pItemTarg )) { case IT_WATER: case IT_WATER_WASH: // Make clean. pItemUse->SetID( ITEMID_BANDAGES1 ); pItemUse->Update(); return( true ); case IT_JUNK: SysMessageDefault( "itemuse_bandage_reach" ); break; default: SysMessageDefault( "itemuse_bandage_clean" ); break; } return( false ); case IT_FISH_POLE: m_pChar->m_Act_p = pt; return( m_pChar->Skill_Start( SKILL_FISHING )); case IT_LOCKPICK: // Using a lock pick on something. if ( pItemTarg== NULL ) return( false ); m_pChar->m_Act_Targ = m_Targ_UID; // the locked item to be picked m_pChar->m_Act_TargPrv = m_Targ_PrvUID; // the pick if ( ! m_pChar->CanUse( pItemTarg, false )) return( false ); return( m_pChar->Skill_Start( SKILL_LOCKPICKING )); case IT_CANNON_BALL: if ( m_pChar->Use_Cannon_Feed( pItemTarg, pItemUse )) { pItemUse->Delete(); return( true ); } break; case IT_DYE: if (( pItemTarg != NULL && pItemTarg->IsType(IT_DYE_VAT)) || ( pCharTarg != NULL && ( pCharTarg == m_pChar || IsPriv( PRIV_GM )))) // Change skin color. { addDyeOption( pObjTarg ); return true; } SysMessageDefault( "itemuse_dye_fail"); return false; case IT_DYE_VAT: // Use the dye vat on some object. if ( pObjTarg == NULL ) return false; if ( pObjTarg->GetTopLevelObj() != m_pChar && ! IsPriv( PRIV_GM )) // Change hair wHue. { SysMessageDefault( "itemuse_dye_reach"); return false; } if ( pCharTarg != NULL ) { // Dye hair. pObjTarg = pCharTarg->LayerFind( LAYER_HAIR ); if ( pObjTarg != NULL ) { pObjTarg->SetHue( pItemUse->GetHue()); pObjTarg->Update(); } pObjTarg = pCharTarg->LayerFind( LAYER_BEARD ); if ( pObjTarg == NULL ) return true; // fall through } else { if ( ! m_pChar->CanUse( pItemTarg, false )) return( false ); if ( ! IsPriv( PRIV_GM ) && ! pItemTarg->Item_GetDef()->Can( CAN_I_DYE ) && ! pItemTarg->IsType(IT_CLOTHING) ) { SysMessageDefault( "itemuse_dye_fail"); return false; } } pObjTarg->SetHue( pItemUse->GetHue()); pObjTarg->Update(); return true; case IT_PITCHER_EMPTY: // Fill it up with water. switch ( m_pChar->CanTouchStatic( pt, id, pItemTarg )) { case IT_JUNK: SysMessageDefault( "itemuse_pitcher_reach" ); return( false ); case IT_WATER: case IT_WATER_WASH: pItemUse->SetID( ITEMID_PITCHER_WATER ); pItemUse->Update(); return( true ); default: SysMessageDefault( "itemuse_pitcher_fill" ); return( false ); } break; case IT_POTION_EMPTY: case IT_MORTAR: // Alchemy targeting stuff return( Cmd_Skill_Alchemy( pItemTarg )); case IT_SEWING_KIT: // Use on cloth or hides if ( pItemTarg == NULL) break; if ( ! m_pChar->CanUse( pItemTarg, true )) return( false ); switch ( pItemTarg->GetType()) { case IT_LEATHER: case IT_HIDE: return( Cmd_Skill_Menu( g_Cfg.ResourceGetIDType( RES_SKILLMENU, "sm_tailor_leather" ))); case IT_CLOTH: case IT_CLOTH_BOLT: pItemTarg->ConvertBolttoCloth(); return( Cmd_Skill_Menu( g_Cfg.ResourceGetIDType( RES_SKILLMENU, "sm_tailor_cloth" ))); } SysMessageDefault( "itemuse_sewingkit_unable" ); return (false); } SysMessageDefault( "itemuse_unable"); return false; } bool CClient::OnTarg_Stone_Recruit( CChar* pChar ) { // CLIMODE_TARG_STONE_RECRUIT CItemStone * pStone = dynamic_cast <CItemStone*> (m_Targ_UID.ItemFind()); if ( !pStone ) return false; return( pStone->AddRecruit( pChar, STONEPRIV_CANDIDATE ) != NULL ); } bool CClient::OnTarg_Party_Add( CChar * pChar ) { // CLIMODE_TARG_PARTY_ADD // Invite this person to join our party. PARTYMSG_Add if ( pChar == NULL ) { SysMessageDefault( "party_select" ); return( false ); } if (( pChar->m_pParty && pChar->m_pParty == m_pChar->m_pParty ) || ( IsPriv(PRIV_GM) && GetPrivLevel() > pChar->GetPrivLevel())) { // They are forced to join. CPartyDef::AcceptEvent( pChar, m_pChar->GetUID()); return( true ); } if ( ! pChar->IsClient()) { // pets should just join as instructed. if ( pChar->NPC_IsOwnedBy( m_pChar )) { CPartyDef::AcceptEvent( pChar, m_pChar->GetUID()); return true; } return( false ); } SysMessagef( g_Cfg.GetDefaultMsg( "party_invite" ), pChar->GetName() ); pChar->SysMessagef( g_Cfg.GetDefaultMsg( "party_invite_targ" ), (LPCTSTR) m_pChar->GetName()); CExtData ExtData; ExtData.Party_Msg_Rsp.m_code = PARTYMSG_NotoInvited; ExtData.Party_Msg_Rsp.m_UID = m_pChar->GetUID(); pChar->GetClient()->addExtData( EXTDATA_Party_Msg, &ExtData, 9 ); // Now up to them to decide to accept. return( true ); }
24.649158
152
0.658349
Jhobean
c0686ed5a86f6d3b4bbf829836124650c4ae70cf
1,174
cpp
C++
chap5/chap5-1.7.cpp
liangzai90/Amazing-Algorithm-With-C
d1e992517eafd9197075d85591ed5270d945b5e3
[ "Apache-2.0" ]
null
null
null
chap5/chap5-1.7.cpp
liangzai90/Amazing-Algorithm-With-C
d1e992517eafd9197075d85591ed5270d945b5e3
[ "Apache-2.0" ]
null
null
null
chap5/chap5-1.7.cpp
liangzai90/Amazing-Algorithm-With-C
d1e992517eafd9197075d85591ed5270d945b5e3
[ "Apache-2.0" ]
null
null
null
/* 数学趣题 填数字游戏求解 ABCD * E = DCBA ABCDE代表的数字各不相同 */ #include <iostream> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <vector> using namespace std; //求i的倒置数 int reverse(int i) { int r = 0; while (i) { r = r * 10 + i % 10; i = i / 10; } return r; } //判断ABCDE5个数字是否相同 int fun(int i, int j) { int buf[4], k = 0; while (i) { buf[k] = i % 10; i = i / 10; k++; } if (buf[0] == buf[1]) return 0;// A B if (buf[0] == buf[2]) return 0;//A C if (buf[0] == buf[3]) return 0;//A D if (buf[0] == j) return 0;//A E if (buf[1] == buf[2]) return 0;//B C if (buf[1] == buf[3]) return 0;//B D if (buf[1] == j) return 0;//B E if (buf[2] == buf[3]) return 0;//C D if (buf[2] == j) return 0;//C E if (buf[3] == j) return 0;//D E return 1; } int main() { for (int i = 1000; i < 10000; i++) { for (int j = 1; j < 10; j++) { if (i*j == reverse(i) && fun(i, j)) { printf("%d \r\n", i); printf("* %d\r\n", j); printf("-----\r\n"); printf("%d\r\n", i*j); } } } cout << endl; cout << "Hello World C Algorithm." << endl; system("pause"); return 0; } /* 2178 * 4 ----- 8712 */
12.901099
44
0.492334
liangzai90
c06c6b5c5b90962cefb0954fc02b16a1f9c2d951
7,995
cpp
C++
backups/game2.cpp
cnr-dxn/mixology-app
7d8510ff4a317cb309d82cec4628a0381cdb98eb
[ "Apache-2.0" ]
null
null
null
backups/game2.cpp
cnr-dxn/mixology-app
7d8510ff4a317cb309d82cec4628a0381cdb98eb
[ "Apache-2.0" ]
null
null
null
backups/game2.cpp
cnr-dxn/mixology-app
7d8510ff4a317cb309d82cec4628a0381cdb98eb
[ "Apache-2.0" ]
null
null
null
#include "Drink.h" #include <iostream> #include <string> #include <vector> #include <sstream> #include <fstream> #include <chrono> #include <thread> #include <limits> using namespace std; using namespace std::this_thread; using namespace std::chrono; void diningHallIngredientsPopulate(vector<string> &usersIngredients) { usersIngredients.push_back("soda water"); usersIngredients.push_back("orange juice"); usersIngredients.push_back("ginger beer"); usersIngredients.push_back("sprite"); usersIngredients.push_back("ice cream"); usersIngredients.push_back("heavy cream"); usersIngredients.push_back("coke"); usersIngredients.push_back("simple syrup"); usersIngredients.push_back("grenadine"); usersIngredients.push_back("cranberry juice"); usersIngredients.push_back("coffee"); usersIngredients.push_back("lemonade"); usersIngredients.push_back("apple juice"); usersIngredients.push_back("chocolate milk"); usersIngredients.push_back("root beer"); usersIngredients.push_back("mountain dew"); } string convert(string input) { string finalString = ""; for (int i = 0; i < input.length(); i++) { finalString += tolower(input[i]); } return finalString; } void checkChoicesAgainst(vector<string> &usersIngredients, vector<Drink> &drinks) { bool determiner = false; int counter = 0; //for (int i = 0; i < usersIngredients.size(); i++) for (int i = 0; i < drinks.size(); i++) { //for (int j = 0; j < drinks.size(); j++) for (int j = 0; j < usersIngredients.size(); j++) { for (int k = 0; k < drinks[i].getIngredientsLength(); k++) { if (convert(usersIngredients[j]) == convert(drinks[i].getIngredientsAt(k))) { counter++; } } } if (counter == drinks[i].getIngredientsLength()) { determiner = true; cout << drinks[i].getName() << " ("; for (int m = 0; m < drinks[i].getIngredientsLength(); m++) { if (m == (drinks[i].getIngredientsLength() - 1)) { cout << drinks[i].getIngredientsAt(m); } else { cout << drinks[i].getIngredientsAt(m) << ", "; } } cout << ")" << endl; } counter = 0; } if (determiner == false) { cout << "Unfortunately no drinks can be found just with those ingredients." << endl; } } bool checkChoiceValidity(string input, vector<Drink> &drinks) { bool determiner = false; for (int i = 0; i < drinks.size(); i++) { for (int j = 0; j < drinks[i].getIngredientsLength(); j++) { if (convert(input) == convert(drinks[i].getIngredientsAt(j))) { determiner = true; } } } return determiner; } int split(string lineSequence, char delimitor, vector<string> &vect) { string temp; // Establish a temporary variable used to transfer array values later // in the fuction int lengthwords = 0; if(lineSequence == "") // If the line doesn't exist, return 0 { return 0; } else { lineSequence = lineSequence + delimitor; // Ensure the sequence includes the delimitor as to prevent unwanted // values being populated for(int count = 0; count < lineSequence.length(); count++) // Enter for loop { if(lineSequence[count] != delimitor) // If the character in the string at that certain point isn't // the delimitor, set the temporary variable equal to the temp character // plus the new character { temp = temp + lineSequence[count]; } else // Else, create an entry in the array that equals the temp variable { if(temp.length()!=0) { vect.push_back (temp); lengthwords++; } temp = ""; // Clear the temp variable } } } return lengthwords; // Return the counter variable (lengthWords) } int main() { ifstream fileTool1; ifstream fileTool2; vector<Drink> drinks; vector<string> ingredients; vector<string> usersIngredients; bool determiner; string continuer = ""; //===================================================================================================== fileTool1.open("drinks.txt"); if (fileTool1.is_open()) { string line = ""; int counter = 0; while (getline(fileTool1, line)) { if (line == "" && line == " ") { } vector<string> tmp; tmp.clear(); split(line, ',', tmp); Drink temp; // Split the line using the split function by commas temp.setName(tmp[0]); // Set the first entry in the array equal to the author tmp.erase (tmp.begin()); // Set the second entry in the array equal to the title temp.setIngredients(tmp); // Set the second entry in the array equal to the title drinks.push_back(temp); // Store the index of the book array equal to the temp // object counter++; // Incriment the number of books now stored in the // arrays by 1 } } else { cout << "The file didn't open correctly" << endl; sleep_for(milliseconds(60)); } fileTool1.close(); //===================================================================================================== fileTool2.open("ingredients.txt"); if (fileTool2.is_open()) { string line = ""; int counter = 0; while (getline(fileTool2, line)) { if (line[0] == '=') { } else { ingredients.push_back(line); } } } else { cout << "The file didn't open correctly" << endl; sleep_for(milliseconds(60)); } fileTool2.close(); //===================================================================================================== string choice; for (int i = 0; i < 3; i++) { cout << endl; } diningHallIngredientsPopulate(usersIngredients); while (continuer != "n" && continuer != "N") { cout << endl; cout << "What ingredients do you have? When finished entering, enter 'done'." << endl; getline(cin, choice); while (choice != "done" && choice != "Done") { determiner = checkChoiceValidity(choice, drinks); if (determiner == false) { cout << "Unfortunately, this database has no entry for '" << choice << "', either due to that not being an ingredient or it not being used in this barbook." << endl; cout << "Please enter another ingredient: " << endl; } else { usersIngredients.push_back(choice); cout << "'"<< choice << "' added." << endl; } getline(cin, choice); } cout << endl; checkChoicesAgainst(usersIngredients, drinks); cout << endl; usersIngredients.clear(); cout << "Would you like to continue? [Y/N] " << endl; getline(cin, continuer); while (continuer != "y" && continuer != "Y" && continuer != "n" && continuer != "N") { cout << "Please enter either one of the options provided" << endl; getline(cin, continuer); } } }
27.010135
169
0.504065
cnr-dxn
c06f376e99349e9132fed1de0d0d99c7e56577a9
2,483
hpp
C++
include/foonathan/memory/detail/assert.hpp
nicolastagliani/memory
4016412f422bc8c53d266081ab5744caceec502c
[ "Zlib" ]
1
2018-11-01T02:42:01.000Z
2018-11-01T02:42:01.000Z
include/foonathan/memory/detail/assert.hpp
nicolastagliani/memory
4016412f422bc8c53d266081ab5744caceec502c
[ "Zlib" ]
null
null
null
include/foonathan/memory/detail/assert.hpp
nicolastagliani/memory
4016412f422bc8c53d266081ab5744caceec502c
[ "Zlib" ]
1
2019-11-16T20:52:21.000Z
2019-11-16T20:52:21.000Z
// Copyright (C) 2015-2016 Jonathan Müller <jonathanmueller.dev@gmail.com> // This file is subject to the license terms in the LICENSE file // found in the top-level directory of this distribution. #ifndef FOONATHAN_MEMORY_DETAIL_ASSERT_HPP_INCLUDED #define FOONATHAN_MEMORY_DETAIL_ASSERT_HPP_INCLUDED #include <cstdlib> #include "../config.hpp" namespace foonathan { namespace memory { namespace detail { // handles a failed assertion void handle_failed_assert(const char* msg, const char* file, int line, const char* fnc) FOONATHAN_NOEXCEPT; void handle_warning(const char* msg, const char* file, int line, const char* fnc) FOONATHAN_NOEXCEPT; // note: debug assertion macros don't use fully qualified name // because they should only be used in this library, where the whole namespace is available // can be override via command line definitions #if FOONATHAN_MEMORY_DEBUG_ASSERT && !defined(FOONATHAN_MEMORY_ASSERT) #define FOONATHAN_MEMORY_ASSERT(Expr) \ static_cast<void>((Expr) || (detail::handle_failed_assert("Assertion \"" #Expr "\" failed", \ __FILE__, __LINE__, __func__), \ true)) #define FOONATHAN_MEMORY_ASSERT_MSG(Expr, Msg) \ static_cast<void>((Expr) \ || (detail::handle_failed_assert("Assertion \"" #Expr "\" failed: " Msg, \ __FILE__, __LINE__, __func__), \ true)) #define FOONATHAN_MEMORY_UNREACHABLE(Msg) \ detail::handle_failed_assert("Unreachable code reached: " Msg, __FILE__, __LINE__, __func__) #define FOONATHAN_MEMORY_WARNING(Msg) detail::handle_warning(Msg, __FILE__, __LINE__, __func__) #elif !defined(FOONATHAN_MEMORY_ASSERT) #define FOONATHAN_MEMORY_ASSERT(Expr) #define FOONATHAN_MEMORY_ASSERT_MSG(Expr, Msg) #define FOONATHAN_MEMORY_UNREACHABLE(Msg) std::abort() #define FOONATHAN_MEMORY_WARNING(Msg) #endif } // namespace detail } } // namespace foonathan::memory #endif // FOONATHAN_MEMORY_DETAIL_ASSERT_HPP_INCLUDED
44.339286
100
0.59122
nicolastagliani
c0740d48f40d7c61a65b1e971fc5d0b23effe78e
1,137
hpp
C++
inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/normalize_l2.hpp
uikilin100/openvino
afc5191b8c75b1de4adc8cb07c6269b52882ddfe
[ "Apache-2.0" ]
1
2021-04-22T07:28:03.000Z
2021-04-22T07:28:03.000Z
inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/normalize_l2.hpp
uikilin100/openvino
afc5191b8c75b1de4adc8cb07c6269b52882ddfe
[ "Apache-2.0" ]
105
2020-06-04T00:23:29.000Z
2022-02-21T13:04:33.000Z
inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/normalize_l2.hpp
v-Golubev/openvino
26936d1fbb025c503ee43fe74593ee9d7862ab15
[ "Apache-2.0" ]
4
2021-04-02T08:48:38.000Z
2021-07-01T06:59:02.000Z
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <string> #include <tuple> #include <vector> #include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/builders.hpp" namespace LayerTestsDefinitions { using NormalizeL2LayerTestParams = std::tuple< std::vector<int64_t>, // axes float, // eps ngraph::op::EpsMode, // eps_mode InferenceEngine::SizeVector, // inputShape InferenceEngine::Precision, // netPrecision std::string // targetDevice >; class NormalizeL2LayerTest : public testing::WithParamInterface<NormalizeL2LayerTestParams>, virtual public LayerTestsUtils::LayerTestsCommon { public: static std::string getTestCaseName(testing::TestParamInfo<NormalizeL2LayerTestParams> obj); protected: void SetUp() override; InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; }; } // namespace LayerTestsDefinitions
31.583333
100
0.663149
uikilin100
c076748c198a93ed4a84e065e055206dc8423b4e
1,545
cc
C++
src/plugins/world_control/WorldControlEventListener.cc
zflat/ign-gui
879a8d193d0cc976587f437a2ec1254093681963
[ "ECL-2.0", "Apache-2.0" ]
31
2020-04-17T22:47:47.000Z
2022-03-31T11:00:06.000Z
src/plugins/world_control/WorldControlEventListener.cc
zflat/ign-gui
879a8d193d0cc976587f437a2ec1254093681963
[ "ECL-2.0", "Apache-2.0" ]
297
2020-04-25T02:55:37.000Z
2022-03-30T20:18:23.000Z
src/plugins/world_control/WorldControlEventListener.cc
zflat/ign-gui
879a8d193d0cc976587f437a2ec1254093681963
[ "ECL-2.0", "Apache-2.0" ]
33
2020-04-20T00:38:42.000Z
2022-03-18T10:10:46.000Z
/* * Copyright (C) 2021 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "WorldControlEventListener.hh" using namespace ignition; using namespace gui; WorldControlEventListener::WorldControlEventListener() { ignition::gui::App()->findChild< ignition::gui::MainWindow *>()->installEventFilter(this); } WorldControlEventListener::~WorldControlEventListener() = default; bool WorldControlEventListener::eventFilter(QObject *_obj, QEvent *_event) { if (_event->type() == ignition::gui::events::WorldControl::kType) { auto worldControlEvent = reinterpret_cast<gui::events::WorldControl *>(_event); if (worldControlEvent) { this->listenedToPlay = !worldControlEvent->WorldControlInfo().pause(); this->listenedToPause = worldControlEvent->WorldControlInfo().pause(); this->listenedToStep = worldControlEvent->WorldControlInfo().multi_step() > 0u; } } // Standard event processing return QObject::eventFilter(_obj, _event); }
31.530612
76
0.730744
zflat
c0782c59eb6059aaef6758187e206a29f9b94134
2,311
hpp
C++
code/gamert/inc/pre-req.hpp
TankleL/gamert
61aa36270347515b51c4b6a8dedb0707ac5e49cd
[ "MIT" ]
null
null
null
code/gamert/inc/pre-req.hpp
TankleL/gamert
61aa36270347515b51c4b6a8dedb0707ac5e49cd
[ "MIT" ]
null
null
null
code/gamert/inc/pre-req.hpp
TankleL/gamert
61aa36270347515b51c4b6a8dedb0707ac5e49cd
[ "MIT" ]
null
null
null
#pragma once #include <cstring> #if defined(WIN32) # include <Windows.h> # define VK_USE_PLATFORM_WIN32_KHR # define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) #else # define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #endif #include <stdexcept> #include <vector> #include <iostream> #include <fstream> #include <sstream> #include <cstdint> #include <set> #include <algorithm> #include <vector> #include <string> #include <map> #include <array> #include <cstdarg> #include <unordered_map> #include <unordered_set> #include <cassert> #include <functional> #include <any> #include <regex> #include <filesystem> // GRT Macros - Game-RT Macros #if defined(DEBUG) || defined(_DEBUG) # define GRT_CHECK(x, msg) if(!(x)){ throw std::runtime_error(msg);} #else # define GRT_CHECK(x, msg) void #endif #define GRT_IS_STRING_EQUAL(str1, str2) \ 0 == strcmp(str1, str2) #define GRT_IS_CLASS(obj, class_name) \ nullptr != dynamic_cast<class_name>(obj) #define GRT_IS_CLASS_PTR(ptr, class_name) \ nullptr != dynamic_cast<class_name*>(ptr) #define GRT_VULKAN_FACTOR_GETTER(factor_type, factor_name, private_var_name) \ factor_type get_vulkan_##factor_name() const {return private_var_name;} #define GRT_SAFE_DELETE(ptr) if(ptr) { delete ptr; ptr = nullptr; } #define GRT_SAFE_DELETE_ARRAY(ptr) if(ptr) { delete[] ptr; ptr = nullptr; } #if defined(DEBUG) || defined(_DEBUG) # define GRT_LUA_STACKCHECK_BEGIN(lua_state) \ int _grt_lua_stackcheck_tops = lua_gettop(lua_state) # define GRT_LUA_STACKCHECK_END(lua_state) \ GRT_CHECK( \ _grt_lua_stackcheck_tops == lua_gettop(lua_state), \ "lua stack is unbalanced") # define GRT_LUA_STACKCHECK_END_OFFSET(lua_state, offset) \ GRT_CHECK( \ (_grt_lua_stackcheck_tops + offset) == lua_gettop(lua_state), \ "lua stack is unbalanced") #else # define GRT_LUA_STACKCHECK_BEGIN(lua_state) (void) # define GRT_LUA_STACKCHECK_END(lua_state) (void) # define GRT_LUA_STACKCHECK_END_OFFSET(lua_state, offset) (void) #endif #if defined(DEBUG) || defined(_DEBUG) # define GRT_LUA_CHECK(lua_state, expression) \ if((expression)) { \ const char* msg = lua_tostring(lua_state, -1); \ throw std::runtime_error(msg); } #else # define GRT_LUA_CHECK (void) #endif
28.182927
88
0.73042
TankleL
c078a021728094eb56b083789b367ea8961b66e5
731,835
cpp
C++
src/main_700.cpp
v0idp/virtuoso-codegen
6f560f04822c67f092d438a3f484249072c1d21d
[ "Unlicense" ]
null
null
null
src/main_700.cpp
v0idp/virtuoso-codegen
6f560f04822c67f092d438a3f484249072c1d21d
[ "Unlicense" ]
null
null
null
src/main_700.cpp
v0idp/virtuoso-codegen
6f560f04822c67f092d438a3f484249072c1d21d
[ "Unlicense" ]
1
2022-03-30T21:07:35.000Z
2022-03-30T21:07:35.000Z
// Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.PassthroughManager #include "VROSC/PassthroughManager.hpp" // Including type: OVRManager #include "GlobalNamespace/OVRManager.hpp" // Including type: OVRPassthroughLayer #include "GlobalNamespace/OVRPassthroughLayer.hpp" // Including type: UnityEngine.Camera #include "UnityEngine/Camera.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 OVRManager _ovrManager [[deprecated("Use field access instead!")]] ::GlobalNamespace::OVRManager*& VROSC::PassthroughManager::dyn__ovrManager() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::dyn__ovrManager"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_ovrManager"))->offset; return *reinterpret_cast<::GlobalNamespace::OVRManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private OVRPassthroughLayer _passthroughLayer [[deprecated("Use field access instead!")]] ::GlobalNamespace::OVRPassthroughLayer*& VROSC::PassthroughManager::dyn__passthroughLayer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::dyn__passthroughLayer"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_passthroughLayer"))->offset; return *reinterpret_cast<::GlobalNamespace::OVRPassthroughLayer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Camera _camera [[deprecated("Use field access instead!")]] ::UnityEngine::Camera*& VROSC::PassthroughManager::dyn__camera() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::dyn__camera"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_camera"))->offset; return *reinterpret_cast<::UnityEngine::Camera**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean <IsToggled>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::PassthroughManager::dyn_$IsToggled$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::dyn_$IsToggled$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<IsToggled>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.PassthroughManager.get_IsToggled bool VROSC::PassthroughManager::get_IsToggled() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::get_IsToggled"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsToggled", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.PassthroughManager.set_IsToggled void VROSC::PassthroughManager::set_IsToggled(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::set_IsToggled"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_IsToggled", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PassthroughManager.Awake void VROSC::PassthroughManager::Awake() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::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: VROSC.PassthroughManager.TogglePassthrough void VROSC::PassthroughManager::TogglePassthrough(bool active) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PassthroughManager::TogglePassthrough"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TogglePassthrough", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(active)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, active); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.PatchData #include "VROSC/PatchData.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.String _displayName [[deprecated("Use field access instead!")]] ::StringW& VROSC::PatchData::dyn__displayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchData::dyn__displayName"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_displayName"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _helmChannel [[deprecated("Use field access instead!")]] int& VROSC::PatchData::dyn__helmChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchData::dyn__helmChannel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_helmChannel"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.PatchData.get_DisplayName ::StringW VROSC::PatchData::get_DisplayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchData::get_DisplayName"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DisplayName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.PatchData.get_HelmChannel int VROSC::PatchData::get_HelmChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchData::get_HelmChannel"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HelmChannel", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.PatchGroup #include "VROSC/PatchGroup.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: UnityEngine.Object #include "UnityEngine/Object.hpp" // Including type: System.String #include "System/String.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public System.String DrumsName ::StringW VROSC::PatchGroup::_get_DrumsName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::_get_DrumsName"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "PatchGroup", "DrumsName")); } // Autogenerated static field setter // Set static field: static public System.String DrumsName void VROSC::PatchGroup::_set_DrumsName(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::_set_DrumsName"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "PatchGroup", "DrumsName", value)); } // Autogenerated static field getter // Get static field: static public System.String MicrophoneName ::StringW VROSC::PatchGroup::_get_MicrophoneName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::_get_MicrophoneName"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "PatchGroup", "MicrophoneName")); } // Autogenerated static field setter // Set static field: static public System.String MicrophoneName void VROSC::PatchGroup::_set_MicrophoneName(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::_set_MicrophoneName"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "PatchGroup", "MicrophoneName", value)); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<UnityEngine.Object> _patches [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::UnityEngine::Object*>*& VROSC::PatchGroup::dyn__patches() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::dyn__patches"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_patches"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::UnityEngine::Object*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.PatchGroup.get_Patches ::System::Collections::Generic::List_1<::UnityEngine::Object*>* VROSC::PatchGroup::get_Patches() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::get_Patches"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Patches", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::List_1<::UnityEngine::Object*>*, false>(this, ___internal__method); } // Autogenerated method: VROSC.PatchGroup.GetPatchName ::StringW VROSC::PatchGroup::GetPatchName(::Il2CppObject* patch) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::GetPatchName"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "PatchGroup", "GetPatchName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(patch)}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, patch); } // Autogenerated method: VROSC.PatchGroup.PatchIsDrums bool VROSC::PatchGroup::PatchIsDrums(::Il2CppObject* patch) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PatchGroup::PatchIsDrums"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "PatchGroup", "PatchIsDrums", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(patch)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, patch); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.PlatformSelector #include "VROSC/PlatformSelector.hpp" // Including type: System.Action`1 #include "System/Action_1.hpp" // Including type: VROSC.PlatformSelector/VROSC.DebugSettings #include "VROSC/PlatformSelector_DebugSettings.hpp" // Including type: VROSC.PlatformSelector/VROSC.<Setup>d__36 #include "VROSC/PlatformSelector_-Setup-d__36.hpp" // Including type: VROSC.VRPlayer #include "VROSC/VRPlayer.hpp" // Including type: VROSC.HmdProfile #include "VROSC/HmdProfile.hpp" // Including type: LIV.SDK.Unity.LIV #include "LIV/SDK/Unity/LIV.hpp" // Including type: Oculus.Platform.Message`1 #include "Oculus/Platform/Message_1.hpp" // Including type: Oculus.Platform.Models.User #include "Oculus/Platform/Models/User.hpp" // Including type: Oculus.Platform.Models.OrgScopedID #include "Oculus/Platform/Models/OrgScopedID.hpp" // Including type: Oculus.Platform.Message #include "Oculus/Platform/Message.hpp" // Including type: UnityEngine.Component #include "UnityEngine/Component.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public System.Action`1<VROSC.VRPlayer> OnPlayerInitialized ::System::Action_1<::VROSC::VRPlayer*>* VROSC::PlatformSelector::_get_OnPlayerInitialized() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::_get_OnPlayerInitialized"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Action_1<::VROSC::VRPlayer*>*>("VROSC", "PlatformSelector", "OnPlayerInitialized")); } // Autogenerated static field setter // Set static field: static public System.Action`1<VROSC.VRPlayer> OnPlayerInitialized void VROSC::PlatformSelector::_set_OnPlayerInitialized(::System::Action_1<::VROSC::VRPlayer*>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::_set_OnPlayerInitialized"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "PlatformSelector", "OnPlayerInitialized", value)); } // Autogenerated instance field getter // Get instance field: private VROSC.VRPlayer _oculusPrefab [[deprecated("Use field access instead!")]] ::VROSC::VRPlayer*& VROSC::PlatformSelector::dyn__oculusPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__oculusPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_oculusPrefab"))->offset; return *reinterpret_cast<::VROSC::VRPlayer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.VRPlayer _steamPrefab [[deprecated("Use field access instead!")]] ::VROSC::VRPlayer*& VROSC::PlatformSelector::dyn__steamPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__steamPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_steamPrefab"))->offset; return *reinterpret_cast<::VROSC::VRPlayer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.VRPlayer _debugPrefab [[deprecated("Use field access instead!")]] ::VROSC::VRPlayer*& VROSC::PlatformSelector::dyn__debugPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__debugPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_debugPrefab"))->offset; return *reinterpret_cast<::VROSC::VRPlayer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.PlatformSelector/VROSC.DebugSettings _debugSettings [[deprecated("Use field access instead!")]] ::VROSC::PlatformSelector::DebugSettings*& VROSC::PlatformSelector::dyn__debugSettings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__debugSettings"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_debugSettings"))->offset; return *reinterpret_cast<::VROSC::PlatformSelector::DebugSettings**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.HmdProfile[] _hmdProfiles [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::HmdProfile*>& VROSC::PlatformSelector::dyn__hmdProfiles() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__hmdProfiles"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hmdProfiles"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::HmdProfile*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private LIV.SDK.Unity.LIV _liv [[deprecated("Use field access instead!")]] ::LIV::SDK::Unity::LIV*& VROSC::PlatformSelector::dyn__liv() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__liv"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_liv"))->offset; return *reinterpret_cast<::LIV::SDK::Unity::LIV**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _bypassEntitlementCheck [[deprecated("Use field access instead!")]] bool& VROSC::PlatformSelector::dyn__bypassEntitlementCheck() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__bypassEntitlementCheck"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bypassEntitlementCheck"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.UInt64 _applicationUserID [[deprecated("Use field access instead!")]] uint64_t& VROSC::PlatformSelector::dyn__applicationUserID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__applicationUserID"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_applicationUserID"))->offset; return *reinterpret_cast<uint64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _waitingForUserId [[deprecated("Use field access instead!")]] bool& VROSC::PlatformSelector::dyn__waitingForUserId() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn__waitingForUserId"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_waitingForUserId"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.VRPlayer <VRPlayer>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::VRPlayer*& VROSC::PlatformSelector::dyn_$VRPlayer$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn_$VRPlayer$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<VRPlayer>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::VRPlayer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String <PlatformUID>k__BackingField [[deprecated("Use field access instead!")]] ::StringW& VROSC::PlatformSelector::dyn_$PlatformUID$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn_$PlatformUID$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<PlatformUID>k__BackingField"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String <PlatformUsername>k__BackingField [[deprecated("Use field access instead!")]] ::StringW& VROSC::PlatformSelector::dyn_$PlatformUsername$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn_$PlatformUsername$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<PlatformUsername>k__BackingField"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean <HasPassedEntitlement>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::PlatformSelector::dyn_$HasPassedEntitlement$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn_$HasPassedEntitlement$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<HasPassedEntitlement>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.PlatformSelector/VROSC.Platform <CurrentPlatform>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::PlatformSelector::Platform& VROSC::PlatformSelector::dyn_$CurrentPlatform$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn_$CurrentPlatform$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<CurrentPlatform>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::PlatformSelector::Platform*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.HmdProfile <CurrentHmdProfile>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::HmdProfile*& VROSC::PlatformSelector::dyn_$CurrentHmdProfile$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::dyn_$CurrentHmdProfile$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<CurrentHmdProfile>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::HmdProfile**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.PlatformSelector.get_VRPlayer ::VROSC::VRPlayer* VROSC::PlatformSelector::get_VRPlayer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::get_VRPlayer"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_VRPlayer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::VRPlayer*, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.set_VRPlayer void VROSC::PlatformSelector::set_VRPlayer(::VROSC::VRPlayer* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::set_VRPlayer"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_VRPlayer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PlatformSelector.get_PlatformUID ::StringW VROSC::PlatformSelector::get_PlatformUID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::get_PlatformUID"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PlatformUID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.set_PlatformUID void VROSC::PlatformSelector::set_PlatformUID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::set_PlatformUID"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_PlatformUID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PlatformSelector.get_PlatformUsername ::StringW VROSC::PlatformSelector::get_PlatformUsername() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::get_PlatformUsername"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PlatformUsername", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.set_PlatformUsername void VROSC::PlatformSelector::set_PlatformUsername(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::set_PlatformUsername"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_PlatformUsername", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PlatformSelector.get_HasPassedEntitlement bool VROSC::PlatformSelector::get_HasPassedEntitlement() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::get_HasPassedEntitlement"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HasPassedEntitlement", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.set_HasPassedEntitlement void VROSC::PlatformSelector::set_HasPassedEntitlement(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::set_HasPassedEntitlement"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_HasPassedEntitlement", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PlatformSelector.get_CurrentPlatform ::VROSC::PlatformSelector::Platform VROSC::PlatformSelector::get_CurrentPlatform() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::get_CurrentPlatform"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CurrentPlatform", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::PlatformSelector::Platform, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.set_CurrentPlatform void VROSC::PlatformSelector::set_CurrentPlatform(::VROSC::PlatformSelector::Platform value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::set_CurrentPlatform"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_CurrentPlatform", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PlatformSelector.get_CurrentHmdProfile ::VROSC::HmdProfile* VROSC::PlatformSelector::get_CurrentHmdProfile() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::get_CurrentHmdProfile"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CurrentHmdProfile", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::HmdProfile*, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.set_CurrentHmdProfile void VROSC::PlatformSelector::set_CurrentHmdProfile(::VROSC::HmdProfile* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::set_CurrentHmdProfile"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_CurrentHmdProfile", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PlatformSelector.Setup void VROSC::PlatformSelector::Setup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.Update void VROSC::PlatformSelector::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::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: VROSC.PlatformSelector.SetCurrentHmdProfile void VROSC::PlatformSelector::SetCurrentHmdProfile() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::SetCurrentHmdProfile"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetCurrentHmdProfile", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.GetOculusUserCallback void VROSC::PlatformSelector::GetOculusUserCallback(::Oculus::Platform::Message_1<::Oculus::Platform::Models::User*>* message) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::GetOculusUserCallback"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetOculusUserCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(message)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, message); } // Autogenerated method: VROSC.PlatformSelector.SpawnOculusPlayer void VROSC::PlatformSelector::SpawnOculusPlayer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::SpawnOculusPlayer"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SpawnOculusPlayer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector.GetOculusOrgUserIdCallback void VROSC::PlatformSelector::GetOculusOrgUserIdCallback(::Oculus::Platform::Message_1<::Oculus::Platform::Models::OrgScopedID*>* message) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::GetOculusOrgUserIdCallback"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetOculusOrgUserIdCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(message)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, message); } // Autogenerated method: VROSC.PlatformSelector.OculusEntitlementCallback void VROSC::PlatformSelector::OculusEntitlementCallback(::Oculus::Platform::Message* msg) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::OculusEntitlementCallback"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OculusEntitlementCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(msg)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, msg); } // Autogenerated method: VROSC.PlatformSelector.CopyComponent ::UnityEngine::Component* VROSC::PlatformSelector::CopyComponent(::UnityEngine::Component* original, ::UnityEngine::GameObject* destination) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::CopyComponent"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CopyComponent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(original), ::il2cpp_utils::ExtractType(destination)}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Component*, false>(this, ___internal__method, original, destination); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.PlatformSelector/VROSC.Platform #include "VROSC/PlatformSelector.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 VROSC.PlatformSelector/VROSC.Platform None ::VROSC::PlatformSelector::Platform VROSC::PlatformSelector::Platform::_get_None() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Platform::_get_None"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::PlatformSelector::Platform>("VROSC", "PlatformSelector/Platform", "None")); } // Autogenerated static field setter // Set static field: static public VROSC.PlatformSelector/VROSC.Platform None void VROSC::PlatformSelector::Platform::_set_None(::VROSC::PlatformSelector::Platform value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Platform::_set_None"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "PlatformSelector/Platform", "None", value)); } // Autogenerated static field getter // Get static field: static public VROSC.PlatformSelector/VROSC.Platform Oculus ::VROSC::PlatformSelector::Platform VROSC::PlatformSelector::Platform::_get_Oculus() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Platform::_get_Oculus"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::PlatformSelector::Platform>("VROSC", "PlatformSelector/Platform", "Oculus")); } // Autogenerated static field setter // Set static field: static public VROSC.PlatformSelector/VROSC.Platform Oculus void VROSC::PlatformSelector::Platform::_set_Oculus(::VROSC::PlatformSelector::Platform value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Platform::_set_Oculus"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "PlatformSelector/Platform", "Oculus", value)); } // Autogenerated static field getter // Get static field: static public VROSC.PlatformSelector/VROSC.Platform Steam ::VROSC::PlatformSelector::Platform VROSC::PlatformSelector::Platform::_get_Steam() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Platform::_get_Steam"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::PlatformSelector::Platform>("VROSC", "PlatformSelector/Platform", "Steam")); } // Autogenerated static field setter // Set static field: static public VROSC.PlatformSelector/VROSC.Platform Steam void VROSC::PlatformSelector::Platform::_set_Steam(::VROSC::PlatformSelector::Platform value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Platform::_set_Steam"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "PlatformSelector/Platform", "Steam", value)); } // Autogenerated instance field getter // Get instance field: public System.Int32 value__ [[deprecated("Use field access instead!")]] int& VROSC::PlatformSelector::Platform::dyn_value__() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::Platform::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: VROSC.PlatformSelector/VROSC.DebugSettings #include "VROSC/PlatformSelector_DebugSettings.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 DisableVR [[deprecated("Use field access instead!")]] bool& VROSC::PlatformSelector::DebugSettings::dyn_DisableVR() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::DebugSettings::dyn_DisableVR"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "DisableVR"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.String DummyOculusId [[deprecated("Use field access instead!")]] ::StringW& VROSC::PlatformSelector::DebugSettings::dyn_DummyOculusId() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::DebugSettings::dyn_DummyOculusId"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "DummyOculusId"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.String DummyUsername [[deprecated("Use field access instead!")]] ::StringW& VROSC::PlatformSelector::DebugSettings::dyn_DummyUsername() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::DebugSettings::dyn_DummyUsername"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "DummyUsername"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Boolean PassEntitlements [[deprecated("Use field access instead!")]] bool& VROSC::PlatformSelector::DebugSettings::dyn_PassEntitlements() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::DebugSettings::dyn_PassEntitlements"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "PassEntitlements"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.PlatformSelector/VROSC.Platform Platform [[deprecated("Use field access instead!")]] ::VROSC::PlatformSelector::Platform& VROSC::PlatformSelector::DebugSettings::dyn_Platform() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::DebugSettings::dyn_Platform"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Platform"))->offset; return *reinterpret_cast<::VROSC::PlatformSelector::Platform*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.PlatformSelector/VROSC.<Setup>d__36 #include "VROSC/PlatformSelector_-Setup-d__36.hpp" // Including type: UnityEngine.Camera #include "UnityEngine/Camera.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: public System.Int32 <>1__state [[deprecated("Use field access instead!")]] int& VROSC::PlatformSelector::$Setup$d__36::dyn_$$1__state() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::$Setup$d__36::dyn_$$1__state"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>1__state"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Runtime.CompilerServices.AsyncVoidMethodBuilder <>t__builder [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::AsyncVoidMethodBuilder& VROSC::PlatformSelector::$Setup$d__36::dyn_$$t__builder() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::$Setup$d__36::dyn_$$t__builder"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>t__builder"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::AsyncVoidMethodBuilder*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.PlatformSelector <>4__this [[deprecated("Use field access instead!")]] ::VROSC::PlatformSelector*& VROSC::PlatformSelector::$Setup$d__36::dyn_$$4__this() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::$Setup$d__36::dyn_$$4__this"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset; return *reinterpret_cast<::VROSC::PlatformSelector**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Camera <sourceCamera>5__2 [[deprecated("Use field access instead!")]] ::UnityEngine::Camera*& VROSC::PlatformSelector::$Setup$d__36::dyn_$sourceCamera$5__2() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::$Setup$d__36::dyn_$sourceCamera$5__2"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<sourceCamera>5__2"))->offset; return *reinterpret_cast<::UnityEngine::Camera**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Runtime.CompilerServices.TaskAwaiter <>u__1 [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::TaskAwaiter& VROSC::PlatformSelector::$Setup$d__36::dyn_$$u__1() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::$Setup$d__36::dyn_$$u__1"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>u__1"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::TaskAwaiter*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.PlatformSelector/VROSC.<Setup>d__36.MoveNext void VROSC::PlatformSelector::$Setup$d__36::MoveNext() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::$Setup$d__36::MoveNext"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::PlatformSelector::$Setup$d__36), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.PlatformSelector/VROSC.<Setup>d__36.SetStateMachine void VROSC::PlatformSelector::$Setup$d__36::SetStateMachine(::System::Runtime::CompilerServices::IAsyncStateMachine* stateMachine) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PlatformSelector::$Setup$d__36::SetStateMachine"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::PlatformSelector::$Setup$d__36), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stateMachine); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.PredictiveHittable #include "VROSC/PredictiveHittable.hpp" // Including type: VROSC.SignalNode #include "VROSC/SignalNode.hpp" // Including type: VROSC.Signal #include "VROSC/Signal.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.Color <Color>k__BackingField [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::PredictiveHittable::dyn_$Color$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::dyn_$Color$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Color>k__BackingField"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean <HasColor>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::PredictiveHittable::dyn_$HasColor$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::dyn_$HasColor$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<HasColor>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.SignalNode[] _outputNodes [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::SignalNode*>& VROSC::PredictiveHittable::dyn__outputNodes() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::dyn__outputNodes"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_outputNodes"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::SignalNode*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _cullWeakHits [[deprecated("Use field access instead!")]] bool& VROSC::PredictiveHittable::dyn__cullWeakHits() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::dyn__cullWeakHits"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_cullWeakHits"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _preferMallet [[deprecated("Use field access instead!")]] bool& VROSC::PredictiveHittable::dyn__preferMallet() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::dyn__preferMallet"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_preferMallet"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _hitDimsLaser [[deprecated("Use field access instead!")]] bool& VROSC::PredictiveHittable::dyn__hitDimsLaser() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::dyn__hitDimsLaser"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hitDimsLaser"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.PredictiveHittable.get_Color ::UnityEngine::Color VROSC::PredictiveHittable::get_Color() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::get_Color"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Color", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHittable.set_Color void VROSC::PredictiveHittable::set_Color(::UnityEngine::Color value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::set_Color"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Color", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PredictiveHittable.get_HasColor bool VROSC::PredictiveHittable::get_HasColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::get_HasColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HasColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHittable.set_HasColor void VROSC::PredictiveHittable::set_HasColor(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::set_HasColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_HasColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PredictiveHittable.get_CullWeakHits bool VROSC::PredictiveHittable::get_CullWeakHits() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::get_CullWeakHits"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CullWeakHits", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHittable.get_PreferMallet bool VROSC::PredictiveHittable::get_PreferMallet() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::get_PreferMallet"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PreferMallet", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHittable.get_HitDimsLaser bool VROSC::PredictiveHittable::get_HitDimsLaser() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::get_HitDimsLaser"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HitDimsLaser", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHittable.Start void VROSC::PredictiveHittable::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::Start"); static 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: VROSC.PredictiveHittable.SendScheduledHit void VROSC::PredictiveHittable::SendScheduledHit(::VROSC::Signal* signal) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::SendScheduledHit"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SendScheduledHit", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(signal)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, signal); } // Autogenerated method: VROSC.PredictiveHittable.SetColor void VROSC::PredictiveHittable::SetColor(::UnityEngine::Color color) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHittable::SetColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(color)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, color); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.PredictiveHitter #include "VROSC/PredictiveHitter.hpp" // Including type: VROSC.PredictiveHitter/VROSC.PredictedHit #include "VROSC/PredictiveHitter_PredictedHit.hpp" // Including type: VROSC.InputDevice #include "VROSC/InputDevice.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.PredictiveHitWisp #include "VROSC/PredictiveHitWisp.hpp" // Including type: VROSC.PredictiveHittable #include "VROSC/PredictiveHittable.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" // Including type: System.Action`2 #include "System/Action_2.hpp" // Including type: VROSC.SignalControllerInfo #include "VROSC/SignalControllerInfo.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 VROSC.InputDevice _device [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::PredictiveHitter::dyn__device() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__device"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_device"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.PredictiveHitter/VROSC.PredictedHit> _predictedHits [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::PredictiveHitter::PredictedHit*>*& VROSC::PredictiveHitter::dyn__predictedHits() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__predictedHits"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_predictedHits"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::PredictiveHitter::PredictedHit*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.PredictiveHitWisp _visualObject [[deprecated("Use field access instead!")]] ::VROSC::PredictiveHitWisp*& VROSC::PredictiveHitter::dyn__visualObject() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__visualObject"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_visualObject"))->offset; return *reinterpret_cast<::VROSC::PredictiveHitWisp**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _disablePrediction [[deprecated("Use field access instead!")]] bool& VROSC::PredictiveHitter::dyn__disablePrediction() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__disablePrediction"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_disablePrediction"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _lookAheadMaxDistance [[deprecated("Use field access instead!")]] float& VROSC::PredictiveHitter::dyn__lookAheadMaxDistance() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__lookAheadMaxDistance"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lookAheadMaxDistance"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _lookAheadTime [[deprecated("Use field access instead!")]] float& VROSC::PredictiveHitter::dyn__lookAheadTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__lookAheadTime"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lookAheadTime"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _baseLatencyAdjustment [[deprecated("Use field access instead!")]] float& VROSC::PredictiveHitter::dyn__baseLatencyAdjustment() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__baseLatencyAdjustment"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_baseLatencyAdjustment"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _postPredictionBuffer [[deprecated("Use field access instead!")]] float& VROSC::PredictiveHitter::dyn__postPredictionBuffer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__postPredictionBuffer"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_postPredictionBuffer"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _minVelocityForHit [[deprecated("Use field access instead!")]] float& VROSC::PredictiveHitter::dyn__minVelocityForHit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__minVelocityForHit"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_minVelocityForHit"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _smoothFrames [[deprecated("Use field access instead!")]] int& VROSC::PredictiveHitter::dyn__smoothFrames() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__smoothFrames"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_smoothFrames"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _bendAngle [[deprecated("Use field access instead!")]] float& VROSC::PredictiveHitter::dyn__bendAngle() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__bendAngle"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bendAngle"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _latencyAdjustment [[deprecated("Use field access instead!")]] float& VROSC::PredictiveHitter::dyn__latencyAdjustment() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__latencyAdjustment"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_latencyAdjustment"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Vector3 _lastFramePosition [[deprecated("Use field access instead!")]] ::UnityEngine::Vector3& VROSC::PredictiveHitter::dyn__lastFramePosition() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__lastFramePosition"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lastFramePosition"))->offset; return *reinterpret_cast<::UnityEngine::Vector3*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Vector3 _velocity [[deprecated("Use field access instead!")]] ::UnityEngine::Vector3& VROSC::PredictiveHitter::dyn__velocity() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__velocity"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_velocity"))->offset; return *reinterpret_cast<::UnityEngine::Vector3*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single[] _velocitySmoothingBuffer [[deprecated("Use field access instead!")]] ::ArrayW<float>& VROSC::PredictiveHitter::dyn__velocitySmoothingBuffer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__velocitySmoothingBuffer"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_velocitySmoothingBuffer"))->offset; return *reinterpret_cast<::ArrayW<float>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _velocityBufferIndex [[deprecated("Use field access instead!")]] int& VROSC::PredictiveHitter::dyn__velocityBufferIndex() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__velocityBufferIndex"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_velocityBufferIndex"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.RaycastHit[] _raycastHits [[deprecated("Use field access instead!")]] ::ArrayW<::UnityEngine::RaycastHit>& VROSC::PredictiveHitter::dyn__raycastHits() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__raycastHits"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_raycastHits"))->offset; return *reinterpret_cast<::ArrayW<::UnityEngine::RaycastHit>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Vector3[] _hitPoints [[deprecated("Use field access instead!")]] ::ArrayW<::UnityEngine::Vector3>& VROSC::PredictiveHitter::dyn__hitPoints() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__hitPoints"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hitPoints"))->offset; return *reinterpret_cast<::ArrayW<::UnityEngine::Vector3>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.PredictiveHittable[] _hittables [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::PredictiveHittable*>& VROSC::PredictiveHitter::dyn__hittables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__hittables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hittables"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::PredictiveHittable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _raycastAllocSize [[deprecated("Use field access instead!")]] int& VROSC::PredictiveHitter::dyn__raycastAllocSize() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__raycastAllocSize"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_raycastAllocSize"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _debugObject [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::PredictiveHitter::dyn__debugObject() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__debugObject"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_debugObject"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean <IsMalletOrOnlyHitter>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::PredictiveHitter::dyn_$IsMalletOrOnlyHitter$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn_$IsMalletOrOnlyHitter$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<IsMalletOrOnlyHitter>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _disabled [[deprecated("Use field access instead!")]] bool& VROSC::PredictiveHitter::dyn__disabled() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn__disabled"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_disabled"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Action`2<System.Single,System.Boolean> OnHitDSP [[deprecated("Use field access instead!")]] ::System::Action_2<float, bool>*& VROSC::PredictiveHitter::dyn_OnHitDSP() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::dyn_OnHitDSP"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "OnHitDSP"))->offset; return *reinterpret_cast<::System::Action_2<float, bool>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.PredictiveHitter.get_IsMalletOrOnlyHitter bool VROSC::PredictiveHitter::get_IsMalletOrOnlyHitter() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::get_IsMalletOrOnlyHitter"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsMalletOrOnlyHitter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHitter.set_IsMalletOrOnlyHitter void VROSC::PredictiveHitter::set_IsMalletOrOnlyHitter(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::set_IsMalletOrOnlyHitter"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_IsMalletOrOnlyHitter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.PredictiveHitter.Setup void VROSC::PredictiveHitter::Setup(::VROSC::InputDevice* device, bool isMalletOrOnlyHitter) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(device), ::il2cpp_utils::ExtractType(isMalletOrOnlyHitter)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, device, isMalletOrOnlyHitter); } // Autogenerated method: VROSC.PredictiveHitter.OnGrabbed void VROSC::PredictiveHitter::OnGrabbed(::VROSC::InputDevice* inputDevice, bool grabbed) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::OnGrabbed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnGrabbed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputDevice), ::il2cpp_utils::ExtractType(grabbed)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputDevice, grabbed); } // Autogenerated method: VROSC.PredictiveHitter.Update void VROSC::PredictiveHitter::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::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: VROSC.PredictiveHitter.GetControllerInfo ::VROSC::SignalControllerInfo* VROSC::PredictiveHitter::GetControllerInfo(::VROSC::PredictiveHittable* hittable, ::UnityEngine::Vector3 hitPoint) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::GetControllerInfo"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetControllerInfo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hittable), ::il2cpp_utils::ExtractType(hitPoint)}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::SignalControllerInfo*, false>(this, ___internal__method, hittable, hitPoint); } // Autogenerated method: VROSC.PredictiveHitter.IsNewHittable bool VROSC::PredictiveHitter::IsNewHittable(::VROSC::PredictiveHittable* hittable, ::System::Collections::Generic::List_1<::VROSC::PredictiveHitter::PredictedHit*>* predictionList) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::IsNewHittable"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IsNewHittable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hittable), ::il2cpp_utils::ExtractType(predictionList)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hittable, predictionList); } // Autogenerated method: VROSC.PredictiveHitter.RayForHittables int VROSC::PredictiveHitter::RayForHittables(::UnityEngine::Vector3 fromPosition, ::UnityEngine::Vector3 toPosition, ::ArrayW<::VROSC::PredictiveHittable*> hittables, ::ArrayW<::UnityEngine::Vector3> hitPoints) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::RayForHittables"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RayForHittables", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(fromPosition), ::il2cpp_utils::ExtractType(toPosition), ::il2cpp_utils::ExtractType(hittables), ::il2cpp_utils::ExtractType(hitPoints)}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, fromPosition, toPosition, hittables, hitPoints); } // Autogenerated method: VROSC.PredictiveHitter.CalculateSmoothedVelocity void VROSC::PredictiveHitter::CalculateSmoothedVelocity() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::CalculateSmoothedVelocity"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CalculateSmoothedVelocity", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHitter.Reset void VROSC::PredictiveHitter::Reset() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::Reset"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Reset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.PredictiveHitter.SetDisabled void VROSC::PredictiveHitter::SetDisabled(bool disabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::SetDisabled"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetDisabled", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disabled); } // Autogenerated method: VROSC.PredictiveHitter.SpawnDebugObject void VROSC::PredictiveHitter::SpawnDebugObject() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::SpawnDebugObject"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SpawnDebugObject", 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: VROSC.PredictiveHitter/VROSC.PredictedHit #include "VROSC/PredictiveHitter_PredictedHit.hpp" // Including type: VROSC.PredictiveHittable #include "VROSC/PredictiveHittable.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 VROSC.PredictiveHittable PredictiveHittable [[deprecated("Use field access instead!")]] ::VROSC::PredictiveHittable*& VROSC::PredictiveHitter::PredictedHit::dyn_PredictiveHittable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::PredictedHit::dyn_PredictiveHittable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "PredictiveHittable"))->offset; return *reinterpret_cast<::VROSC::PredictiveHittable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Double PredictedDSPTime [[deprecated("Use field access instead!")]] double& VROSC::PredictiveHitter::PredictedHit::dyn_PredictedDSPTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::PredictiveHitter::PredictedHit::dyn_PredictedDSPTime"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "PredictedDSPTime"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ReallyAnalytics #include "VROSC/ReallyAnalytics.hpp" // Including type: System.String #include "System/String.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 static field getter // Get static field: static private System.String MAIN_MENU_SELECTION ::StringW VROSC::ReallyAnalytics::_get_MAIN_MENU_SELECTION() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_MAIN_MENU_SELECTION"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "MAIN_MENU_SELECTION")); } // Autogenerated static field setter // Set static field: static private System.String MAIN_MENU_SELECTION void VROSC::ReallyAnalytics::_set_MAIN_MENU_SELECTION(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_MAIN_MENU_SELECTION"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "MAIN_MENU_SELECTION", value)); } // Autogenerated static field getter // Get static field: static private System.String INSTRUMENT_OPEN ::StringW VROSC::ReallyAnalytics::_get_INSTRUMENT_OPEN() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_INSTRUMENT_OPEN"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "INSTRUMENT_OPEN")); } // Autogenerated static field setter // Set static field: static private System.String INSTRUMENT_OPEN void VROSC::ReallyAnalytics::_set_INSTRUMENT_OPEN(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_INSTRUMENT_OPEN"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "INSTRUMENT_OPEN", value)); } // Autogenerated static field getter // Get static field: static private System.String INSTRUMENT_CLOSE ::StringW VROSC::ReallyAnalytics::_get_INSTRUMENT_CLOSE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_INSTRUMENT_CLOSE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "INSTRUMENT_CLOSE")); } // Autogenerated static field setter // Set static field: static private System.String INSTRUMENT_CLOSE void VROSC::ReallyAnalytics::_set_INSTRUMENT_CLOSE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_INSTRUMENT_CLOSE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "INSTRUMENT_CLOSE", value)); } // Autogenerated static field getter // Get static field: static private System.String INSTRUMENT_CHANGE_PATCH ::StringW VROSC::ReallyAnalytics::_get_INSTRUMENT_CHANGE_PATCH() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_INSTRUMENT_CHANGE_PATCH"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "INSTRUMENT_CHANGE_PATCH")); } // Autogenerated static field setter // Set static field: static private System.String INSTRUMENT_CHANGE_PATCH void VROSC::ReallyAnalytics::_set_INSTRUMENT_CHANGE_PATCH(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_INSTRUMENT_CHANGE_PATCH"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "INSTRUMENT_CHANGE_PATCH", value)); } // Autogenerated static field getter // Get static field: static private System.String INSTRUMENT_CHANGE_SAMPLE ::StringW VROSC::ReallyAnalytics::_get_INSTRUMENT_CHANGE_SAMPLE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_INSTRUMENT_CHANGE_SAMPLE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "INSTRUMENT_CHANGE_SAMPLE")); } // Autogenerated static field setter // Set static field: static private System.String INSTRUMENT_CHANGE_SAMPLE void VROSC::ReallyAnalytics::_set_INSTRUMENT_CHANGE_SAMPLE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_INSTRUMENT_CHANGE_SAMPLE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "INSTRUMENT_CHANGE_SAMPLE", value)); } // Autogenerated static field getter // Get static field: static private System.String TOOL_OPEN ::StringW VROSC::ReallyAnalytics::_get_TOOL_OPEN() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TOOL_OPEN"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TOOL_OPEN")); } // Autogenerated static field setter // Set static field: static private System.String TOOL_OPEN void VROSC::ReallyAnalytics::_set_TOOL_OPEN(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TOOL_OPEN"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TOOL_OPEN", value)); } // Autogenerated static field getter // Get static field: static private System.String TOOL_CLOSE ::StringW VROSC::ReallyAnalytics::_get_TOOL_CLOSE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TOOL_CLOSE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TOOL_CLOSE")); } // Autogenerated static field setter // Set static field: static private System.String TOOL_CLOSE void VROSC::ReallyAnalytics::_set_TOOL_CLOSE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TOOL_CLOSE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TOOL_CLOSE", value)); } // Autogenerated static field getter // Get static field: static private System.String ENVIRONMENT_ENTER ::StringW VROSC::ReallyAnalytics::_get_ENVIRONMENT_ENTER() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_ENVIRONMENT_ENTER"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "ENVIRONMENT_ENTER")); } // Autogenerated static field setter // Set static field: static private System.String ENVIRONMENT_ENTER void VROSC::ReallyAnalytics::_set_ENVIRONMENT_ENTER(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_ENVIRONMENT_ENTER"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "ENVIRONMENT_ENTER", value)); } // Autogenerated static field getter // Get static field: static private System.String ENVIRONMENT_EXIT ::StringW VROSC::ReallyAnalytics::_get_ENVIRONMENT_EXIT() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_ENVIRONMENT_EXIT"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "ENVIRONMENT_EXIT")); } // Autogenerated static field setter // Set static field: static private System.String ENVIRONMENT_EXIT void VROSC::ReallyAnalytics::_set_ENVIRONMENT_EXIT(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_ENVIRONMENT_EXIT"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "ENVIRONMENT_EXIT", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_SAVE ::StringW VROSC::ReallyAnalytics::_get_SONG_SAVE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_SAVE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_SAVE")); } // Autogenerated static field setter // Set static field: static private System.String SONG_SAVE void VROSC::ReallyAnalytics::_set_SONG_SAVE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_SAVE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_SAVE", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_LOAD ::StringW VROSC::ReallyAnalytics::_get_SONG_LOAD() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_LOAD"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_LOAD")); } // Autogenerated static field setter // Set static field: static private System.String SONG_LOAD void VROSC::ReallyAnalytics::_set_SONG_LOAD(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_LOAD"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_LOAD", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_DELETE ::StringW VROSC::ReallyAnalytics::_get_SONG_DELETE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_DELETE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_DELETE")); } // Autogenerated static field setter // Set static field: static private System.String SONG_DELETE void VROSC::ReallyAnalytics::_set_SONG_DELETE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_DELETE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_DELETE", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_UPVOTE ::StringW VROSC::ReallyAnalytics::_get_SONG_UPVOTE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_UPVOTE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_UPVOTE")); } // Autogenerated static field setter // Set static field: static private System.String SONG_UPVOTE void VROSC::ReallyAnalytics::_set_SONG_UPVOTE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_UPVOTE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_UPVOTE", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_FAVORITE ::StringW VROSC::ReallyAnalytics::_get_SONG_FAVORITE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_FAVORITE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_FAVORITE")); } // Autogenerated static field setter // Set static field: static private System.String SONG_FAVORITE void VROSC::ReallyAnalytics::_set_SONG_FAVORITE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_FAVORITE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_FAVORITE", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_PREVIEW_PLAY ::StringW VROSC::ReallyAnalytics::_get_SONG_PREVIEW_PLAY() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_PREVIEW_PLAY"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_PREVIEW_PLAY")); } // Autogenerated static field setter // Set static field: static private System.String SONG_PREVIEW_PLAY void VROSC::ReallyAnalytics::_set_SONG_PREVIEW_PLAY(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_PREVIEW_PLAY"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_PREVIEW_PLAY", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_DOWNLOAD ::StringW VROSC::ReallyAnalytics::_get_SONG_DOWNLOAD() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_DOWNLOAD"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_DOWNLOAD")); } // Autogenerated static field setter // Set static field: static private System.String SONG_DOWNLOAD void VROSC::ReallyAnalytics::_set_SONG_DOWNLOAD(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_DOWNLOAD"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_DOWNLOAD", value)); } // Autogenerated static field getter // Get static field: static private System.String LOOP_CREATE ::StringW VROSC::ReallyAnalytics::_get_LOOP_CREATE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_LOOP_CREATE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "LOOP_CREATE")); } // Autogenerated static field setter // Set static field: static private System.String LOOP_CREATE void VROSC::ReallyAnalytics::_set_LOOP_CREATE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_LOOP_CREATE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "LOOP_CREATE", value)); } // Autogenerated static field getter // Get static field: static private System.String TUTORIAL_VIDEO_PLAY ::StringW VROSC::ReallyAnalytics::_get_TUTORIAL_VIDEO_PLAY() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TUTORIAL_VIDEO_PLAY"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TUTORIAL_VIDEO_PLAY")); } // Autogenerated static field setter // Set static field: static private System.String TUTORIAL_VIDEO_PLAY void VROSC::ReallyAnalytics::_set_TUTORIAL_VIDEO_PLAY(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TUTORIAL_VIDEO_PLAY"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TUTORIAL_VIDEO_PLAY", value)); } // Autogenerated static field getter // Get static field: static private System.String INSTRUMENT_ID ::StringW VROSC::ReallyAnalytics::_get_INSTRUMENT_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_INSTRUMENT_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "INSTRUMENT_ID")); } // Autogenerated static field setter // Set static field: static private System.String INSTRUMENT_ID void VROSC::ReallyAnalytics::_set_INSTRUMENT_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_INSTRUMENT_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "INSTRUMENT_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String TOOL_ID ::StringW VROSC::ReallyAnalytics::_get_TOOL_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TOOL_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TOOL_ID")); } // Autogenerated static field setter // Set static field: static private System.String TOOL_ID void VROSC::ReallyAnalytics::_set_TOOL_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TOOL_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TOOL_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String PATCH_ID ::StringW VROSC::ReallyAnalytics::_get_PATCH_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_PATCH_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "PATCH_ID")); } // Autogenerated static field setter // Set static field: static private System.String PATCH_ID void VROSC::ReallyAnalytics::_set_PATCH_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_PATCH_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "PATCH_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String SAMPLE_ID ::StringW VROSC::ReallyAnalytics::_get_SAMPLE_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SAMPLE_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SAMPLE_ID")); } // Autogenerated static field setter // Set static field: static private System.String SAMPLE_ID void VROSC::ReallyAnalytics::_set_SAMPLE_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SAMPLE_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SAMPLE_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String ENVIRONMENT_ID ::StringW VROSC::ReallyAnalytics::_get_ENVIRONMENT_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_ENVIRONMENT_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "ENVIRONMENT_ID")); } // Autogenerated static field setter // Set static field: static private System.String ENVIRONMENT_ID void VROSC::ReallyAnalytics::_set_ENVIRONMENT_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_ENVIRONMENT_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "ENVIRONMENT_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_ID ::StringW VROSC::ReallyAnalytics::_get_SONG_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_ID")); } // Autogenerated static field setter // Set static field: static private System.String SONG_ID void VROSC::ReallyAnalytics::_set_SONG_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String TUTORIAL_VIDEO_ID ::StringW VROSC::ReallyAnalytics::_get_TUTORIAL_VIDEO_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TUTORIAL_VIDEO_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TUTORIAL_VIDEO_ID")); } // Autogenerated static field setter // Set static field: static private System.String TUTORIAL_VIDEO_ID void VROSC::ReallyAnalytics::_set_TUTORIAL_VIDEO_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TUTORIAL_VIDEO_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TUTORIAL_VIDEO_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String TIME_OPEN ::StringW VROSC::ReallyAnalytics::_get_TIME_OPEN() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TIME_OPEN"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TIME_OPEN")); } // Autogenerated static field setter // Set static field: static private System.String TIME_OPEN void VROSC::ReallyAnalytics::_set_TIME_OPEN(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TIME_OPEN"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TIME_OPEN", value)); } // Autogenerated static field getter // Get static field: static private System.String TIME_TO_COMPLETE ::StringW VROSC::ReallyAnalytics::_get_TIME_TO_COMPLETE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TIME_TO_COMPLETE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TIME_TO_COMPLETE")); } // Autogenerated static field setter // Set static field: static private System.String TIME_TO_COMPLETE void VROSC::ReallyAnalytics::_set_TIME_TO_COMPLETE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TIME_TO_COMPLETE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TIME_TO_COMPLETE", value)); } // Autogenerated static field getter // Get static field: static private System.String MAIN_MENU_OPTION ::StringW VROSC::ReallyAnalytics::_get_MAIN_MENU_OPTION() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_MAIN_MENU_OPTION"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "MAIN_MENU_OPTION")); } // Autogenerated static field setter // Set static field: static private System.String MAIN_MENU_OPTION void VROSC::ReallyAnalytics::_set_MAIN_MENU_OPTION(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_MAIN_MENU_OPTION"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "MAIN_MENU_OPTION", value)); } // Autogenerated static field getter // Get static field: static private System.String SONG_TYPE ::StringW VROSC::ReallyAnalytics::_get_SONG_TYPE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_SONG_TYPE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "SONG_TYPE")); } // Autogenerated static field setter // Set static field: static private System.String SONG_TYPE void VROSC::ReallyAnalytics::_set_SONG_TYPE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_SONG_TYPE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "SONG_TYPE", value)); } // Autogenerated static field getter // Get static field: static private System.String IS_FAVORITE ::StringW VROSC::ReallyAnalytics::_get_IS_FAVORITE() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_IS_FAVORITE"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "IS_FAVORITE")); } // Autogenerated static field setter // Set static field: static private System.String IS_FAVORITE void VROSC::ReallyAnalytics::_set_IS_FAVORITE(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_IS_FAVORITE"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "IS_FAVORITE", value)); } // Autogenerated static field getter // Get static field: static private System.String FAVORITE_ADD ::StringW VROSC::ReallyAnalytics::_get_FAVORITE_ADD() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_FAVORITE_ADD"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "FAVORITE_ADD")); } // Autogenerated static field setter // Set static field: static private System.String FAVORITE_ADD void VROSC::ReallyAnalytics::_set_FAVORITE_ADD(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_FAVORITE_ADD"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "FAVORITE_ADD", value)); } // Autogenerated static field getter // Get static field: static private System.String UPVOTE_ADD ::StringW VROSC::ReallyAnalytics::_get_UPVOTE_ADD() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_UPVOTE_ADD"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "UPVOTE_ADD")); } // Autogenerated static field setter // Set static field: static private System.String UPVOTE_ADD void VROSC::ReallyAnalytics::_set_UPVOTE_ADD(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_UPVOTE_ADD"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "UPVOTE_ADD", value)); } // Autogenerated static field getter // Get static field: static private System.String LOOP_LENGTH ::StringW VROSC::ReallyAnalytics::_get_LOOP_LENGTH() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_LOOP_LENGTH"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "LOOP_LENGTH")); } // Autogenerated static field setter // Set static field: static private System.String LOOP_LENGTH void VROSC::ReallyAnalytics::_set_LOOP_LENGTH(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_LOOP_LENGTH"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "LOOP_LENGTH", value)); } // Autogenerated static field getter // Get static field: static private System.String TUTORIAL_SKIPPED_STEP ::StringW VROSC::ReallyAnalytics::_get_TUTORIAL_SKIPPED_STEP() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_TUTORIAL_SKIPPED_STEP"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "TUTORIAL_SKIPPED_STEP")); } // Autogenerated static field setter // Set static field: static private System.String TUTORIAL_SKIPPED_STEP void VROSC::ReallyAnalytics::_set_TUTORIAL_SKIPPED_STEP(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_TUTORIAL_SKIPPED_STEP"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "TUTORIAL_SKIPPED_STEP", value)); } // Autogenerated static field getter // Get static field: static private System.String AB_GROUP ::StringW VROSC::ReallyAnalytics::_get_AB_GROUP() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_AB_GROUP"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "AB_GROUP")); } // Autogenerated static field setter // Set static field: static private System.String AB_GROUP void VROSC::ReallyAnalytics::_set_AB_GROUP(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_AB_GROUP"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "AB_GROUP", value)); } // Autogenerated static field getter // Get static field: static private System.String AB_TEST_ID ::StringW VROSC::ReallyAnalytics::_get_AB_TEST_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_AB_TEST_ID"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "AB_TEST_ID")); } // Autogenerated static field setter // Set static field: static private System.String AB_TEST_ID void VROSC::ReallyAnalytics::_set_AB_TEST_ID(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_AB_TEST_ID"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "AB_TEST_ID", value)); } // Autogenerated static field getter // Get static field: static private System.String LOCAL_SONG ::StringW VROSC::ReallyAnalytics::_get_LOCAL_SONG() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_LOCAL_SONG"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "LOCAL_SONG")); } // Autogenerated static field setter // Set static field: static private System.String LOCAL_SONG void VROSC::ReallyAnalytics::_set_LOCAL_SONG(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_LOCAL_SONG"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "LOCAL_SONG", value)); } // Autogenerated static field getter // Get static field: static private System.String CLOUD_SONG ::StringW VROSC::ReallyAnalytics::_get_CLOUD_SONG() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_CLOUD_SONG"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "CLOUD_SONG")); } // Autogenerated static field setter // Set static field: static private System.String CLOUD_SONG void VROSC::ReallyAnalytics::_set_CLOUD_SONG(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_CLOUD_SONG"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "CLOUD_SONG", value)); } // Autogenerated static field getter // Get static field: static private System.String COMMUNITY_SONG ::StringW VROSC::ReallyAnalytics::_get_COMMUNITY_SONG() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get_COMMUNITY_SONG"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReallyAnalytics", "COMMUNITY_SONG")); } // Autogenerated static field setter // Set static field: static private System.String COMMUNITY_SONG void VROSC::ReallyAnalytics::_set_COMMUNITY_SONG(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set_COMMUNITY_SONG"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "COMMUNITY_SONG", value)); } // Autogenerated static field getter // Get static field: static private System.Single _tutorialStartTime float VROSC::ReallyAnalytics::_get__tutorialStartTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get__tutorialStartTime"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<float>("VROSC", "ReallyAnalytics", "_tutorialStartTime")); } // Autogenerated static field setter // Set static field: static private System.Single _tutorialStartTime void VROSC::ReallyAnalytics::_set__tutorialStartTime(float value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set__tutorialStartTime"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "_tutorialStartTime", value)); } // Autogenerated static field getter // Get static field: static private System.Single _lastTutorialStepTime float VROSC::ReallyAnalytics::_get__lastTutorialStepTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get__lastTutorialStepTime"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<float>("VROSC", "ReallyAnalytics", "_lastTutorialStepTime")); } // Autogenerated static field setter // Set static field: static private System.Single _lastTutorialStepTime void VROSC::ReallyAnalytics::_set__lastTutorialStepTime(float value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set__lastTutorialStepTime"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "_lastTutorialStepTime", value)); } // Autogenerated static field getter // Get static field: static private System.Single _lastEnvironmentEnterTime float VROSC::ReallyAnalytics::_get__lastEnvironmentEnterTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get__lastEnvironmentEnterTime"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<float>("VROSC", "ReallyAnalytics", "_lastEnvironmentEnterTime")); } // Autogenerated static field setter // Set static field: static private System.Single _lastEnvironmentEnterTime void VROSC::ReallyAnalytics::_set__lastEnvironmentEnterTime(float value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set__lastEnvironmentEnterTime"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "_lastEnvironmentEnterTime", value)); } // Autogenerated static field getter // Get static field: static private System.Collections.Generic.Dictionary`2<System.String,System.Single> _instrumentsOpenTimes ::System::Collections::Generic::Dictionary_2<::StringW, float>* VROSC::ReallyAnalytics::_get__instrumentsOpenTimes() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_get__instrumentsOpenTimes"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Collections::Generic::Dictionary_2<::StringW, float>*>("VROSC", "ReallyAnalytics", "_instrumentsOpenTimes"))); } // Autogenerated static field setter // Set static field: static private System.Collections.Generic.Dictionary`2<System.String,System.Single> _instrumentsOpenTimes void VROSC::ReallyAnalytics::_set__instrumentsOpenTimes(::System::Collections::Generic::Dictionary_2<::StringW, float>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::_set__instrumentsOpenTimes"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReallyAnalytics", "_instrumentsOpenTimes", value)); } // Autogenerated method: VROSC.ReallyAnalytics..cctor void VROSC::ReallyAnalytics::_cctor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::.cctor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method); } // Autogenerated method: VROSC.ReallyAnalytics.MainMenuSelection void VROSC::ReallyAnalytics::MainMenuSelection(::StringW optionId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::MainMenuSelection"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "MainMenuSelection", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(optionId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, optionId); } // Autogenerated method: VROSC.ReallyAnalytics.EnterScreen void VROSC::ReallyAnalytics::EnterScreen(::StringW screenId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::EnterScreen"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "EnterScreen", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(screenId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, screenId); } // Autogenerated method: VROSC.ReallyAnalytics.InstrumentOpen void VROSC::ReallyAnalytics::InstrumentOpen(::StringW instrumentId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::InstrumentOpen"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "InstrumentOpen", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(instrumentId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, instrumentId); } // Autogenerated method: VROSC.ReallyAnalytics.InstrumentClose void VROSC::ReallyAnalytics::InstrumentClose(::StringW instrumentId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::InstrumentClose"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "InstrumentClose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(instrumentId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, instrumentId); } // Autogenerated method: VROSC.ReallyAnalytics.InstrumentChangePatch void VROSC::ReallyAnalytics::InstrumentChangePatch(::StringW instrumentId, ::StringW patchId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::InstrumentChangePatch"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "InstrumentChangePatch", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(instrumentId), ::il2cpp_utils::ExtractType(patchId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, instrumentId, patchId); } // Autogenerated method: VROSC.ReallyAnalytics.ToolOpen void VROSC::ReallyAnalytics::ToolOpen(::StringW toolId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::ToolOpen"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "ToolOpen", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(toolId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, toolId); } // Autogenerated method: VROSC.ReallyAnalytics.ToolClose void VROSC::ReallyAnalytics::ToolClose(::StringW toolId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::ToolClose"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "ToolClose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(toolId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, toolId); } // Autogenerated method: VROSC.ReallyAnalytics.EnvironmentEnter void VROSC::ReallyAnalytics::EnvironmentEnter(::StringW environmentId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::EnvironmentEnter"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "EnvironmentEnter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(environmentId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, environmentId); } // Autogenerated method: VROSC.ReallyAnalytics.EnvironmentExit void VROSC::ReallyAnalytics::EnvironmentExit(::StringW environmentId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::EnvironmentExit"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "EnvironmentExit", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(environmentId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, environmentId); } // Autogenerated method: VROSC.ReallyAnalytics.SongSave void VROSC::ReallyAnalytics::SongSave(::StringW songId, bool isCloud, bool isCommunity) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::SongSave"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "SongSave", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(songId), ::il2cpp_utils::ExtractType(isCloud), ::il2cpp_utils::ExtractType(isCommunity)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, songId, isCloud, isCommunity); } // Autogenerated method: VROSC.ReallyAnalytics.SongLoad void VROSC::ReallyAnalytics::SongLoad(::StringW songId, bool isCloud, bool isCommunity, bool isFavorite) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::SongLoad"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "SongLoad", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(songId), ::il2cpp_utils::ExtractType(isCloud), ::il2cpp_utils::ExtractType(isCommunity), ::il2cpp_utils::ExtractType(isFavorite)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, songId, isCloud, isCommunity, isFavorite); } // Autogenerated method: VROSC.ReallyAnalytics.SongDelete void VROSC::ReallyAnalytics::SongDelete(::StringW songId, bool isCloud, bool isCommunity) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::SongDelete"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "SongDelete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(songId), ::il2cpp_utils::ExtractType(isCloud), ::il2cpp_utils::ExtractType(isCommunity)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, songId, isCloud, isCommunity); } // Autogenerated method: VROSC.ReallyAnalytics.SongUpVote void VROSC::ReallyAnalytics::SongUpVote(::StringW songId, bool add) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::SongUpVote"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "SongUpVote", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(songId), ::il2cpp_utils::ExtractType(add)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, songId, add); } // Autogenerated method: VROSC.ReallyAnalytics.SongFavorite void VROSC::ReallyAnalytics::SongFavorite(::StringW songId, bool add) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::SongFavorite"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "SongFavorite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(songId), ::il2cpp_utils::ExtractType(add)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, songId, add); } // Autogenerated method: VROSC.ReallyAnalytics.SongPreviewPlay void VROSC::ReallyAnalytics::SongPreviewPlay(::StringW songId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::SongPreviewPlay"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "SongPreviewPlay", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(songId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, songId); } // Autogenerated method: VROSC.ReallyAnalytics.SongDownload void VROSC::ReallyAnalytics::SongDownload(::StringW songId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::SongDownload"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "SongDownload", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(songId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, songId); } // Autogenerated method: VROSC.ReallyAnalytics.LoopCreate void VROSC::ReallyAnalytics::LoopCreate(::StringW instrumentId, ::StringW patchId, int loopLength) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::LoopCreate"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "LoopCreate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(instrumentId), ::il2cpp_utils::ExtractType(patchId), ::il2cpp_utils::ExtractType(loopLength)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, instrumentId, patchId, loopLength); } // Autogenerated method: VROSC.ReallyAnalytics.TutorialStart void VROSC::ReallyAnalytics::TutorialStart(::StringW tutorialId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::TutorialStart"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "TutorialStart", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, tutorialId); } // Autogenerated method: VROSC.ReallyAnalytics.TutorialStepComplete void VROSC::ReallyAnalytics::TutorialStepComplete(::StringW tutorialId, int stepIndex) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::TutorialStepComplete"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "TutorialStepComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialId), ::il2cpp_utils::ExtractType(stepIndex)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, tutorialId, stepIndex); } // Autogenerated method: VROSC.ReallyAnalytics.TutorialSkip void VROSC::ReallyAnalytics::TutorialSkip(::StringW tutorialId, int skippedStepIndex) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::TutorialSkip"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "TutorialSkip", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialId), ::il2cpp_utils::ExtractType(skippedStepIndex)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, tutorialId, skippedStepIndex); } // Autogenerated method: VROSC.ReallyAnalytics.TutorialComplete void VROSC::ReallyAnalytics::TutorialComplete(::StringW tutorialId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::TutorialComplete"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "TutorialComplete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, tutorialId); } // Autogenerated method: VROSC.ReallyAnalytics.TutorialVideoPlay void VROSC::ReallyAnalytics::TutorialVideoPlay(::StringW tutorialVideoId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReallyAnalytics::TutorialVideoPlay"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ReallyAnalytics", "TutorialVideoPlay", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialVideoId)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, tutorialVideoId); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.RemoteConfigManager #include "VROSC/RemoteConfigManager.hpp" // Including type: VROSC.RemoteConfigManager/VROSC.UserAttributes #include "VROSC/RemoteConfigManager_UserAttributes.hpp" // Including type: VROSC.RemoteConfigManager/VROSC.AppAttributes #include "VROSC/RemoteConfigManager_AppAttributes.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.String <ABGroupName>k__BackingField [[deprecated("Use field access instead!")]] ::StringW& VROSC::RemoteConfigManager::dyn_$ABGroupName$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::dyn_$ABGroupName$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<ABGroupName>k__BackingField"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String <ABTestId>k__BackingField [[deprecated("Use field access instead!")]] ::StringW& VROSC::RemoteConfigManager::dyn_$ABTestId$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::dyn_$ABTestId$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<ABTestId>k__BackingField"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String <StartEnvironment>k__BackingField [[deprecated("Use field access instead!")]] ::StringW& VROSC::RemoteConfigManager::dyn_$StartEnvironment$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::dyn_$StartEnvironment$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<StartEnvironment>k__BackingField"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.RemoteConfigManager.get_ABGroupName ::StringW VROSC::RemoteConfigManager::get_ABGroupName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::get_ABGroupName"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ABGroupName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.RemoteConfigManager.set_ABGroupName void VROSC::RemoteConfigManager::set_ABGroupName(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::set_ABGroupName"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ABGroupName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.RemoteConfigManager.get_ABTestId ::StringW VROSC::RemoteConfigManager::get_ABTestId() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::get_ABTestId"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ABTestId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.RemoteConfigManager.set_ABTestId void VROSC::RemoteConfigManager::set_ABTestId(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::set_ABTestId"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ABTestId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.RemoteConfigManager.get_StartEnvironment ::StringW VROSC::RemoteConfigManager::get_StartEnvironment() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::get_StartEnvironment"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_StartEnvironment", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.RemoteConfigManager.set_StartEnvironment void VROSC::RemoteConfigManager::set_StartEnvironment(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::set_StartEnvironment"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_StartEnvironment", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.RemoteConfigManager.Setup void VROSC::RemoteConfigManager::Setup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.RemoteConfigManager.GetConfigValues void VROSC::RemoteConfigManager::GetConfigValues() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::RemoteConfigManager::GetConfigValues"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetConfigValues", 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: VROSC.ReverbManager #include "VROSC/ReverbManager.hpp" // Including type: UnityEngine.AnimationCurve #include "UnityEngine/AnimationCurve.hpp" // Including type: System.String #include "System/String.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.String DrumsReverbSendString ::StringW VROSC::ReverbManager::_get_DrumsReverbSendString() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::_get_DrumsReverbSendString"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReverbManager", "DrumsReverbSendString")); } // Autogenerated static field setter // Set static field: static private System.String DrumsReverbSendString void VROSC::ReverbManager::_set_DrumsReverbSendString(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::_set_DrumsReverbSendString"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReverbManager", "DrumsReverbSendString", value)); } // Autogenerated static field getter // Get static field: static private System.String DecayTimeString ::StringW VROSC::ReverbManager::_get_DecayTimeString() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::_get_DecayTimeString"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReverbManager", "DecayTimeString")); } // Autogenerated static field setter // Set static field: static private System.String DecayTimeString void VROSC::ReverbManager::_set_DecayTimeString(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::_set_DecayTimeString"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReverbManager", "DecayTimeString", value)); } // Autogenerated static field getter // Get static field: static private System.String ReflectionsString ::StringW VROSC::ReverbManager::_get_ReflectionsString() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::_get_ReflectionsString"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("VROSC", "ReverbManager", "ReflectionsString")); } // Autogenerated static field setter // Set static field: static private System.String ReflectionsString void VROSC::ReverbManager::_set_ReflectionsString(::StringW value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::_set_ReflectionsString"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "ReverbManager", "ReflectionsString", value)); } // Autogenerated instance field getter // Get instance field: private System.Single _drumsSendOff [[deprecated("Use field access instead!")]] float& VROSC::ReverbManager::dyn__drumsSendOff() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__drumsSendOff"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_drumsSendOff"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _drumsSendMin [[deprecated("Use field access instead!")]] float& VROSC::ReverbManager::dyn__drumsSendMin() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__drumsSendMin"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_drumsSendMin"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _drumsSendMax [[deprecated("Use field access instead!")]] float& VROSC::ReverbManager::dyn__drumsSendMax() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__drumsSendMax"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_drumsSendMax"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _drumsSendCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::ReverbManager::dyn__drumsSendCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__drumsSendCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_drumsSendCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _decayTimeMin [[deprecated("Use field access instead!")]] float& VROSC::ReverbManager::dyn__decayTimeMin() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__decayTimeMin"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_decayTimeMin"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _decayTimeMax [[deprecated("Use field access instead!")]] float& VROSC::ReverbManager::dyn__decayTimeMax() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__decayTimeMax"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_decayTimeMax"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _decayTimeCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::ReverbManager::dyn__decayTimeCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__decayTimeCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_decayTimeCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _reflectionsMin [[deprecated("Use field access instead!")]] float& VROSC::ReverbManager::dyn__reflectionsMin() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__reflectionsMin"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_reflectionsMin"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _reflectionsMax [[deprecated("Use field access instead!")]] float& VROSC::ReverbManager::dyn__reflectionsMax() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__reflectionsMax"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_reflectionsMax"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _reflectionsCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::ReverbManager::dyn__reflectionsCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::dyn__reflectionsCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_reflectionsCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ReverbManager.SetDrumsReverbAmount void VROSC::ReverbManager::SetDrumsReverbAmount(float amount) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::SetDrumsReverbAmount"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetDrumsReverbAmount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(amount)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, amount); } // Autogenerated method: VROSC.ReverbManager.SetReverbLength void VROSC::ReverbManager::SetReverbLength(float length) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::SetReverbLength"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetReverbLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(length)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, length); } // Autogenerated method: VROSC.ReverbManager.SetReverbParameter void VROSC::ReverbManager::SetReverbParameter(::StringW name, float amount, ::UnityEngine::AnimationCurve* curve, float min, float max) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ReverbManager::SetReverbParameter"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetReverbParameter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(name), ::il2cpp_utils::ExtractType(amount), ::il2cpp_utils::ExtractType(curve), ::il2cpp_utils::ExtractType(min), ::il2cpp_utils::ExtractType(max)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, name, amount, curve, min, max); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.SampleData #include "VROSC/SampleData.hpp" // Including type: UnityEngine.AudioClip #include "UnityEngine/AudioClip.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Int32 _id [[deprecated("Use field access instead!")]] int& VROSC::SampleData::dyn__id() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleData::dyn__id"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_id"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String _displayName [[deprecated("Use field access instead!")]] ::StringW& VROSC::SampleData::dyn__displayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleData::dyn__displayName"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_displayName"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioClip _audioClip [[deprecated("Use field access instead!")]] ::UnityEngine::AudioClip*& VROSC::SampleData::dyn__audioClip() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleData::dyn__audioClip"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_audioClip"))->offset; return *reinterpret_cast<::UnityEngine::AudioClip**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SampleData.get_Id int VROSC::SampleData::get_Id() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleData::get_Id"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Id", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.SampleData.get_DisplayName ::StringW VROSC::SampleData::get_DisplayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleData::get_DisplayName"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DisplayName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.SampleData.get_Clip ::UnityEngine::AudioClip* VROSC::SampleData::get_Clip() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleData::get_Clip"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Clip", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AudioClip*, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.SampleDatabase #include "VROSC/SampleDatabase.hpp" // Including type: VROSC.SampleGroup #include "VROSC/SampleGroup.hpp" // Including type: UnityEngine.AudioClip #include "UnityEngine/AudioClip.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 VROSC.SampleGroup[] _samplegroups [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::SampleGroup*>& VROSC::SampleDatabase::dyn__samplegroups() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleDatabase::dyn__samplegroups"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_samplegroups"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::SampleGroup*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SampleDatabase.GetGroup ::VROSC::SampleGroup* VROSC::SampleDatabase::GetGroup(int groupId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleDatabase::GetGroup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGroup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(groupId)}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::SampleGroup*, false>(this, ___internal__method, groupId); } // Autogenerated method: VROSC.SampleDatabase.GetGroupSampleId int VROSC::SampleDatabase::GetGroupSampleId(int groupId, int index) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleDatabase::GetGroupSampleId"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetGroupSampleId", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(groupId), ::il2cpp_utils::ExtractType(index)}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, groupId, index); } // Autogenerated method: VROSC.SampleDatabase.GetSampleAudioClip ::UnityEngine::AudioClip* VROSC::SampleDatabase::GetSampleAudioClip(int sampleId) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleDatabase::GetSampleAudioClip"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetSampleAudioClip", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sampleId)}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AudioClip*, false>(this, ___internal__method, sampleId); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.SampleGroup #include "VROSC/SampleGroup.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.SampleData #include "VROSC/SampleData.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Int32 _id [[deprecated("Use field access instead!")]] int& VROSC::SampleGroup::dyn__id() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::dyn__id"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_id"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String _displayName [[deprecated("Use field access instead!")]] ::StringW& VROSC::SampleGroup::dyn__displayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::dyn__displayName"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_displayName"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _defaultMidiNote [[deprecated("Use field access instead!")]] int& VROSC::SampleGroup::dyn__defaultMidiNote() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::dyn__defaultMidiNote"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_defaultMidiNote"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.SampleData> _samples [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::SampleData*>*& VROSC::SampleGroup::dyn__samples() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::dyn__samples"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_samples"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::SampleData*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _color [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::SampleGroup::dyn__color() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::dyn__color"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_color"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SampleGroup.get_Id int VROSC::SampleGroup::get_Id() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::get_Id"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Id", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.SampleGroup.get_DisplayName ::StringW VROSC::SampleGroup::get_DisplayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::get_DisplayName"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DisplayName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.SampleGroup.get_DefaultMidiNote int VROSC::SampleGroup::get_DefaultMidiNote() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::get_DefaultMidiNote"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DefaultMidiNote", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.SampleGroup.get_Color ::UnityEngine::Color VROSC::SampleGroup::get_Color() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::get_Color"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Color", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.SampleGroup.get_Samples ::System::Collections::Generic::List_1<::VROSC::SampleData*>* VROSC::SampleGroup::get_Samples() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SampleGroup::get_Samples"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Samples", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::List_1<::VROSC::SampleData*>*, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ScalePreset #include "VROSC/ScalePreset.hpp" // Including type: VROSC.ScalePreset/VROSC.NotePriority #include "VROSC/ScalePreset_NotePriority.hpp" // Including type: VROSC.ScalePreset/VROSC.<>c__DisplayClass4_0 #include "VROSC/ScalePreset_--c__DisplayClass4_0.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: public System.String Name [[deprecated("Use field access instead!")]] ::StringW& VROSC::ScalePreset::dyn_Name() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::dyn_Name"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Name"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.Scale Scale [[deprecated("Use field access instead!")]] ::VROSC::Scale& VROSC::ScalePreset::dyn_Scale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::dyn_Scale"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Scale"))->offset; return *reinterpret_cast<::VROSC::Scale*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Collections.Generic.List`1<VROSC.ScalePreset/VROSC.NotePriority> NotePriorities [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::ScalePreset::NotePriority*>*& VROSC::ScalePreset::dyn_NotePriorities() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::dyn_NotePriorities"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "NotePriorities"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::ScalePreset::NotePriority*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ScalePreset.UpdateNotePriorityList void VROSC::ScalePreset::UpdateNotePriorityList() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::UpdateNotePriorityList"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateNotePriorityList", 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: VROSC.ScalePreset/VROSC.NotePriority #include "VROSC/ScalePreset_NotePriority.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 VROSC.Note Note [[deprecated("Use field access instead!")]] ::VROSC::Note& VROSC::ScalePreset::NotePriority::dyn_Note() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::NotePriority::dyn_Note"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Note"))->offset; return *reinterpret_cast<::VROSC::Note*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Int32 Priority [[deprecated("Use field access instead!")]] int& VROSC::ScalePreset::NotePriority::dyn_Priority() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::NotePriority::dyn_Priority"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Priority"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ScalePreset/VROSC.<>c__DisplayClass4_0 #include "VROSC/ScalePreset_--c__DisplayClass4_0.hpp" // Including type: VROSC.ScalePreset/VROSC.NotePriority #include "VROSC/ScalePreset_NotePriority.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 VROSC.Note note [[deprecated("Use field access instead!")]] ::VROSC::Note& VROSC::ScalePreset::$$c__DisplayClass4_0::dyn_note() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::$$c__DisplayClass4_0::dyn_note"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "note"))->offset; return *reinterpret_cast<::VROSC::Note*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ScalePreset/VROSC.<>c__DisplayClass4_0.<UpdateNotePriorityList>b__1 bool VROSC::ScalePreset::$$c__DisplayClass4_0::$UpdateNotePriorityList$b__1(::VROSC::ScalePreset::NotePriority* n) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::$$c__DisplayClass4_0::<UpdateNotePriorityList>b__1"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<UpdateNotePriorityList>b__1", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(n)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, n); } // Autogenerated method: VROSC.ScalePreset/VROSC.<>c__DisplayClass4_0.<UpdateNotePriorityList>b__2 bool VROSC::ScalePreset::$$c__DisplayClass4_0::$UpdateNotePriorityList$b__2(::VROSC::ScalePreset::NotePriority* n) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::$$c__DisplayClass4_0::<UpdateNotePriorityList>b__2"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<UpdateNotePriorityList>b__2", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(n)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, n); } // Autogenerated method: VROSC.ScalePreset/VROSC.<>c__DisplayClass4_0.<UpdateNotePriorityList>b__0 bool VROSC::ScalePreset::$$c__DisplayClass4_0::$UpdateNotePriorityList$b__0(::VROSC::ScalePreset::NotePriority* n) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePreset::$$c__DisplayClass4_0::<UpdateNotePriorityList>b__0"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<UpdateNotePriorityList>b__0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(n)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, n); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ScalePresets #include "VROSC/ScalePresets.hpp" // Including type: VROSC.ScalePreset #include "VROSC/ScalePreset.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: public System.Int32 SelectedScaleIndex [[deprecated("Use field access instead!")]] int& VROSC::ScalePresets::dyn_SelectedScaleIndex() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePresets::dyn_SelectedScaleIndex"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "SelectedScaleIndex"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.Note SelectedStartNote [[deprecated("Use field access instead!")]] ::VROSC::Note& VROSC::ScalePresets::dyn_SelectedStartNote() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePresets::dyn_SelectedStartNote"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "SelectedStartNote"))->offset; return *reinterpret_cast<::VROSC::Note*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.ScalePreset[] Presets [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::ScalePreset*>& VROSC::ScalePresets::dyn_Presets() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePresets::dyn_Presets"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Presets"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::ScalePreset*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ScalePresets.OnValidate void VROSC::ScalePresets::OnValidate() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ScalePresets::OnValidate"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnValidate", 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: VROSC.Server #include "VROSC/Server.hpp" // Including type: UnityOSC.OSCServer #include "UnityOSC/OSCServer.hpp" // Including type: UnityOSC.OSCPacket #include "UnityOSC/OSCPacket.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.String _serverName [[deprecated("Use field access instead!")]] ::StringW& VROSC::Server::dyn__serverName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Server::dyn__serverName"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_serverName"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _port [[deprecated("Use field access instead!")]] int& VROSC::Server::dyn__port() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Server::dyn__port"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_port"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityOSC.OSCServer server [[deprecated("Use field access instead!")]] ::UnityOSC::OSCServer*& VROSC::Server::dyn_server() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Server::dyn_server"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "server"))->offset; return *reinterpret_cast<::UnityOSC::OSCServer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isStarted [[deprecated("Use field access instead!")]] bool& VROSC::Server::dyn__isStarted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Server::dyn__isStarted"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isStarted"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.Server.StartOSCServer void VROSC::Server::StartOSCServer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Server::StartOSCServer"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartOSCServer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.Server.OnPacketReceived void VROSC::Server::OnPacketReceived(::UnityOSC::OSCServer* server, ::UnityOSC::OSCPacket* packet) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Server::OnPacketReceived"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnPacketReceived", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(server), ::il2cpp_utils::ExtractType(packet)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, server, packet); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.SoundMetronome #include "VROSC/SoundMetronome.hpp" // Including type: UnityEngine.AudioSource #include "UnityEngine/AudioSource.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioSource _barSound [[deprecated("Use field access instead!")]] ::UnityEngine::AudioSource*& VROSC::SoundMetronome::dyn__barSound() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SoundMetronome::dyn__barSound"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_barSound"))->offset; return *reinterpret_cast<::UnityEngine::AudioSource**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioSource _beatSound [[deprecated("Use field access instead!")]] ::UnityEngine::AudioSource*& VROSC::SoundMetronome::dyn__beatSound() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SoundMetronome::dyn__beatSound"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_beatSound"))->offset; return *reinterpret_cast<::UnityEngine::AudioSource**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _beatScheduled [[deprecated("Use field access instead!")]] bool& VROSC::SoundMetronome::dyn__beatScheduled() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SoundMetronome::dyn__beatScheduled"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_beatScheduled"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Double _lastScheduledBeatTime [[deprecated("Use field access instead!")]] double& VROSC::SoundMetronome::dyn__lastScheduledBeatTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SoundMetronome::dyn__lastScheduledBeatTime"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lastScheduledBeatTime"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Double _updateMargin [[deprecated("Use field access instead!")]] double& VROSC::SoundMetronome::dyn__updateMargin() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SoundMetronome::dyn__updateMargin"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_updateMargin"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SoundMetronome.OnEnable void VROSC::SoundMetronome::OnEnable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SoundMetronome::OnEnable"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnEnable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SoundMetronome.Update void VROSC::SoundMetronome::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SoundMetronome::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 from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.CheckAppValidityState #include "VROSC/CheckAppValidityState.hpp" // Including type: VROSC.CheckAppValidityState/VROSC.<>c #include "VROSC/CheckAppValidityState_--c.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated method: VROSC.CheckAppValidityState.OnEnter void VROSC::CheckAppValidityState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::CheckAppValidityState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.CheckAppValidityState.OnExit void VROSC::CheckAppValidityState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::CheckAppValidityState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.CheckAppValidityState.Tick void VROSC::CheckAppValidityState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::CheckAppValidityState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.CheckAppValidityState.UpdateData void VROSC::CheckAppValidityState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::CheckAppValidityState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.CheckAppValidityState/VROSC.<>c #include "VROSC/CheckAppValidityState_--c.hpp" // Including type: System.Action #include "System/Action.hpp" // Including type: System.Action`1 #include "System/Action_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public readonly VROSC.CheckAppValidityState/VROSC.<>c <>9 ::VROSC::CheckAppValidityState::$$c* VROSC::CheckAppValidityState::$$c::_get_$$9() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_get_$$9"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::VROSC::CheckAppValidityState::$$c*>("VROSC", "CheckAppValidityState/<>c", "<>9"))); } // Autogenerated static field setter // Set static field: static public readonly VROSC.CheckAppValidityState/VROSC.<>c <>9 void VROSC::CheckAppValidityState::$$c::_set_$$9(::VROSC::CheckAppValidityState::$$c* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_set_$$9"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "CheckAppValidityState/<>c", "<>9", value))); } // Autogenerated static field getter // Get static field: static public System.Action <>9__1_1 ::System::Action* VROSC::CheckAppValidityState::$$c::_get_$$9__1_1() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_get_$$9__1_1"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Action*>("VROSC", "CheckAppValidityState/<>c", "<>9__1_1"))); } // Autogenerated static field setter // Set static field: static public System.Action <>9__1_1 void VROSC::CheckAppValidityState::$$c::_set_$$9__1_1(::System::Action* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_set_$$9__1_1"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "CheckAppValidityState/<>c", "<>9__1_1", value))); } // Autogenerated static field getter // Get static field: static public System.Action`1<VROSC.Error> <>9__1_2 ::System::Action_1<::VROSC::Error>* VROSC::CheckAppValidityState::$$c::_get_$$9__1_2() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_get_$$9__1_2"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Action_1<::VROSC::Error>*>("VROSC", "CheckAppValidityState/<>c", "<>9__1_2"))); } // Autogenerated static field setter // Set static field: static public System.Action`1<VROSC.Error> <>9__1_2 void VROSC::CheckAppValidityState::$$c::_set_$$9__1_2(::System::Action_1<::VROSC::Error>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_set_$$9__1_2"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "CheckAppValidityState/<>c", "<>9__1_2", value))); } // Autogenerated static field getter // Get static field: static public System.Action <>9__1_0 ::System::Action* VROSC::CheckAppValidityState::$$c::_get_$$9__1_0() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_get_$$9__1_0"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Action*>("VROSC", "CheckAppValidityState/<>c", "<>9__1_0"))); } // Autogenerated static field setter // Set static field: static public System.Action <>9__1_0 void VROSC::CheckAppValidityState::$$c::_set_$$9__1_0(::System::Action* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::_set_$$9__1_0"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "CheckAppValidityState/<>c", "<>9__1_0", value))); } // Autogenerated method: VROSC.CheckAppValidityState/VROSC.<>c..cctor void VROSC::CheckAppValidityState::$$c::_cctor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::.cctor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "CheckAppValidityState/<>c", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method); } // Autogenerated method: VROSC.CheckAppValidityState/VROSC.<>c.<OnEnter>b__1_0 void VROSC::CheckAppValidityState::$$c::$OnEnter$b__1_0() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::<OnEnter>b__1_0"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<OnEnter>b__1_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.CheckAppValidityState/VROSC.<>c.<OnEnter>b__1_1 void VROSC::CheckAppValidityState::$$c::$OnEnter$b__1_1() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::<OnEnter>b__1_1"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<OnEnter>b__1_1", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.CheckAppValidityState/VROSC.<>c.<OnEnter>b__1_2 void VROSC::CheckAppValidityState::$$c::$OnEnter$b__1_2(::VROSC::Error error) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::CheckAppValidityState::$$c::<OnEnter>b__1_2"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<OnEnter>b__1_2", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(error)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, error); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.LoadLocalUserDataState #include "VROSC/LoadLocalUserDataState.hpp" // Including type: VROSC.LoadLocalUserDataState/VROSC.<>c #include "VROSC/LoadLocalUserDataState_--c.hpp" // Including type: VROSC.SettingsDataDefaults #include "VROSC/SettingsDataDefaults.hpp" // Including type: VROSC.InstrumentHub #include "VROSC/InstrumentHub.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 VROSC.SettingsDataDefaults _settingsDataDefaults [[deprecated("Use field access instead!")]] ::VROSC::SettingsDataDefaults*& VROSC::LoadLocalUserDataState::dyn__settingsDataDefaults() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::dyn__settingsDataDefaults"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_settingsDataDefaults"))->offset; return *reinterpret_cast<::VROSC::SettingsDataDefaults**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InstrumentHub _instrumentHub [[deprecated("Use field access instead!")]] ::VROSC::InstrumentHub*& VROSC::LoadLocalUserDataState::dyn__instrumentHub() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::dyn__instrumentHub"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_instrumentHub"))->offset; return *reinterpret_cast<::VROSC::InstrumentHub**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.LoadLocalUserDataState.OnEnter void VROSC::LoadLocalUserDataState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadLocalUserDataState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.LoadLocalUserDataState.OnExit void VROSC::LoadLocalUserDataState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadLocalUserDataState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.LoadLocalUserDataState.Tick void VROSC::LoadLocalUserDataState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadLocalUserDataState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.LoadLocalUserDataState.UpdateData void VROSC::LoadLocalUserDataState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadLocalUserDataState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.LoadLocalUserDataState.<OnEnter>b__3_0 void VROSC::LoadLocalUserDataState::$OnEnter$b__3_0() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::<OnEnter>b__3_0"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<OnEnter>b__3_0", 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: VROSC.LoadLocalUserDataState/VROSC.<>c #include "VROSC/LoadLocalUserDataState_--c.hpp" // Including type: System.Action`1 #include "System/Action_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public readonly VROSC.LoadLocalUserDataState/VROSC.<>c <>9 ::VROSC::LoadLocalUserDataState::$$c* VROSC::LoadLocalUserDataState::$$c::_get_$$9() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::$$c::_get_$$9"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::VROSC::LoadLocalUserDataState::$$c*>("VROSC", "LoadLocalUserDataState/<>c", "<>9"))); } // Autogenerated static field setter // Set static field: static public readonly VROSC.LoadLocalUserDataState/VROSC.<>c <>9 void VROSC::LoadLocalUserDataState::$$c::_set_$$9(::VROSC::LoadLocalUserDataState::$$c* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::$$c::_set_$$9"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "LoadLocalUserDataState/<>c", "<>9", value))); } // Autogenerated static field getter // Get static field: static public System.Action`1<VROSC.Error> <>9__3_1 ::System::Action_1<::VROSC::Error>* VROSC::LoadLocalUserDataState::$$c::_get_$$9__3_1() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::$$c::_get_$$9__3_1"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Action_1<::VROSC::Error>*>("VROSC", "LoadLocalUserDataState/<>c", "<>9__3_1"))); } // Autogenerated static field setter // Set static field: static public System.Action`1<VROSC.Error> <>9__3_1 void VROSC::LoadLocalUserDataState::$$c::_set_$$9__3_1(::System::Action_1<::VROSC::Error>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::$$c::_set_$$9__3_1"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "LoadLocalUserDataState/<>c", "<>9__3_1", value))); } // Autogenerated method: VROSC.LoadLocalUserDataState/VROSC.<>c..cctor void VROSC::LoadLocalUserDataState::$$c::_cctor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::$$c::.cctor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "LoadLocalUserDataState/<>c", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method); } // Autogenerated method: VROSC.LoadLocalUserDataState/VROSC.<>c.<OnEnter>b__3_1 void VROSC::LoadLocalUserDataState::$$c::$OnEnter$b__3_1(::VROSC::Error error) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadLocalUserDataState::$$c::<OnEnter>b__3_1"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<OnEnter>b__3_1", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(error)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, error); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.LoadScenesState #include "VROSC/LoadScenesState.hpp" // Including type: VROSC.FullScreenFxController #include "VROSC/FullScreenFxController.hpp" // Including type: VROSC.EnvironmentController #include "VROSC/EnvironmentController.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 VROSC.FullScreenFxController _fullScreenFxController [[deprecated("Use field access instead!")]] ::VROSC::FullScreenFxController*& VROSC::LoadScenesState::dyn__fullScreenFxController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadScenesState::dyn__fullScreenFxController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_fullScreenFxController"))->offset; return *reinterpret_cast<::VROSC::FullScreenFxController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.EnvironmentController _environmentController [[deprecated("Use field access instead!")]] ::VROSC::EnvironmentController*& VROSC::LoadScenesState::dyn__environmentController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadScenesState::dyn__environmentController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_environmentController"))->offset; return *reinterpret_cast<::VROSC::EnvironmentController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.LoadScenesState.OnEnter void VROSC::LoadScenesState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadScenesState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadScenesState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.LoadScenesState.OnExit void VROSC::LoadScenesState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadScenesState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadScenesState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.LoadScenesState.Tick void VROSC::LoadScenesState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadScenesState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadScenesState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.LoadScenesState.UpdateData void VROSC::LoadScenesState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LoadScenesState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::LoadScenesState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.MainState #include "VROSC/MainState.hpp" // Including type: VROSC.MainState/VROSC.<OnEnter>d__6 #include "VROSC/MainState_-OnEnter-d__6.hpp" // Including type: VROSC.MainState/VROSC.<StopMenuMusicCoroutine>d__9 #include "VROSC/MainState_-StopMenuMusicCoroutine-d__9.hpp" // Including type: VROSC.MainState/VROSC.<FadeInWorldVisually>d__10 #include "VROSC/MainState_-FadeInWorldVisually-d__10.hpp" // Including type: VROSC.MainState/VROSC.<RecenterPlayer>d__17 #include "VROSC/MainState_-RecenterPlayer-d__17.hpp" // Including type: VROSC.FullScreenFxController #include "VROSC/FullScreenFxController.hpp" // Including type: VROSC.StartMenu #include "VROSC/StartMenu.hpp" // Including type: UnityEngine.AudioSource #include "UnityEngine/AudioSource.hpp" // Including type: System.Action #include "System/Action.hpp" // Including type: System.Collections.IEnumerator #include "System/Collections/IEnumerator.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public System.Action OnMainStateEntered ::System::Action* VROSC::MainState::_get_OnMainStateEntered() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::_get_OnMainStateEntered"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Action*>("VROSC", "MainState", "OnMainStateEntered")); } // Autogenerated static field setter // Set static field: static public System.Action OnMainStateEntered void VROSC::MainState::_set_OnMainStateEntered(::System::Action* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::_set_OnMainStateEntered"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "MainState", "OnMainStateEntered", value)); } // Autogenerated instance field getter // Get instance field: private VROSC.FullScreenFxController _fullScreenFxController [[deprecated("Use field access instead!")]] ::VROSC::FullScreenFxController*& VROSC::MainState::dyn__fullScreenFxController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::dyn__fullScreenFxController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_fullScreenFxController"))->offset; return *reinterpret_cast<::VROSC::FullScreenFxController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.StartMenu _startMenuPrefab [[deprecated("Use field access instead!")]] ::VROSC::StartMenu*& VROSC::MainState::dyn__startMenuPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::dyn__startMenuPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startMenuPrefab"))->offset; return *reinterpret_cast<::VROSC::StartMenu**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioSource _startMenuMusic [[deprecated("Use field access instead!")]] ::UnityEngine::AudioSource*& VROSC::MainState::dyn__startMenuMusic() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::dyn__startMenuMusic"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startMenuMusic"))->offset; return *reinterpret_cast<::UnityEngine::AudioSource**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _steamHasInputFocus [[deprecated("Use field access instead!")]] bool& VROSC::MainState::dyn__steamHasInputFocus() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::dyn__steamHasInputFocus"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_steamHasInputFocus"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.MainState.OnEnter void VROSC::MainState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.MainState.OnExit void VROSC::MainState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState.StartMenuClosed void VROSC::MainState::StartMenuClosed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::StartMenuClosed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartMenuClosed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState.StopMenuMusicCoroutine ::System::Collections::IEnumerator* VROSC::MainState::StopMenuMusicCoroutine() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::StopMenuMusicCoroutine"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopMenuMusicCoroutine", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::System::Collections::IEnumerator*, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState.FadeInWorldVisually ::System::Collections::IEnumerator* VROSC::MainState::FadeInWorldVisually() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::FadeInWorldVisually"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FadeInWorldVisually", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::System::Collections::IEnumerator*, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState.SetWorldVisuallyFaded void VROSC::MainState::SetWorldVisuallyFaded(float amount) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::SetWorldVisuallyFaded"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "MainState", "SetWorldVisuallyFaded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(amount)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, amount); } // Autogenerated method: VROSC.MainState.Tick void VROSC::MainState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState.HasFocus bool VROSC::MainState::HasFocus() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::HasFocus"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "HasFocus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState.OnInputFocus void VROSC::MainState::OnInputFocus(bool hasFocus) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::OnInputFocus"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnInputFocus", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hasFocus)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hasFocus); } // Autogenerated method: VROSC.MainState.UpdateData void VROSC::MainState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.MainState.CheckForPlayerOutOfBounds void VROSC::MainState::CheckForPlayerOutOfBounds() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::CheckForPlayerOutOfBounds"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CheckForPlayerOutOfBounds", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState.RecenterPlayer void VROSC::MainState::RecenterPlayer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::RecenterPlayer"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RecenterPlayer", 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: VROSC.MainState/VROSC.<OnEnter>d__6 #include "VROSC/MainState_-OnEnter-d__6.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: public System.Int32 <>1__state [[deprecated("Use field access instead!")]] int& VROSC::MainState::$OnEnter$d__6::dyn_$$1__state() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$OnEnter$d__6::dyn_$$1__state"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>1__state"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Runtime.CompilerServices.AsyncVoidMethodBuilder <>t__builder [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::AsyncVoidMethodBuilder& VROSC::MainState::$OnEnter$d__6::dyn_$$t__builder() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$OnEnter$d__6::dyn_$$t__builder"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>t__builder"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::AsyncVoidMethodBuilder*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.MainState <>4__this [[deprecated("Use field access instead!")]] ::VROSC::MainState*& VROSC::MainState::$OnEnter$d__6::dyn_$$4__this() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$OnEnter$d__6::dyn_$$4__this"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset; return *reinterpret_cast<::VROSC::MainState**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Runtime.CompilerServices.TaskAwaiter <>u__1 [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::TaskAwaiter& VROSC::MainState::$OnEnter$d__6::dyn_$$u__1() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$OnEnter$d__6::dyn_$$u__1"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>u__1"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::TaskAwaiter*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.MainState/VROSC.<OnEnter>d__6.MoveNext void VROSC::MainState::$OnEnter$d__6::MoveNext() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$OnEnter$d__6::MoveNext"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::MainState::$OnEnter$d__6), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<OnEnter>d__6.SetStateMachine void VROSC::MainState::$OnEnter$d__6::SetStateMachine(::System::Runtime::CompilerServices::IAsyncStateMachine* stateMachine) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$OnEnter$d__6::SetStateMachine"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::MainState::$OnEnter$d__6), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stateMachine); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.MainState/VROSC.<StopMenuMusicCoroutine>d__9 #include "VROSC/MainState_-StopMenuMusicCoroutine-d__9.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Int32 <>1__state [[deprecated("Use field access instead!")]] int& VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$$1__state() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$$1__state"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>1__state"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Object <>2__current [[deprecated("Use field access instead!")]] ::Il2CppObject*& VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$$2__current() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$$2__current"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>2__current"))->offset; return *reinterpret_cast<::Il2CppObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.MainState <>4__this [[deprecated("Use field access instead!")]] ::VROSC::MainState*& VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$$4__this() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$$4__this"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset; return *reinterpret_cast<::VROSC::MainState**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single <fadeoutTime>5__2 [[deprecated("Use field access instead!")]] float& VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$fadeoutTime$5__2() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$fadeoutTime$5__2"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<fadeoutTime>5__2"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single <progress>5__3 [[deprecated("Use field access instead!")]] float& VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$progress$5__3() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$progress$5__3"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<progress>5__3"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single <startVolume>5__4 [[deprecated("Use field access instead!")]] float& VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$startVolume$5__4() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::dyn_$startVolume$5__4"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<startVolume>5__4"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.MainState/VROSC.<StopMenuMusicCoroutine>d__9.System.Collections.Generic.IEnumerator<System.Object>.get_Current ::Il2CppObject* VROSC::MainState::$StopMenuMusicCoroutine$d__9::System_Collections_Generic_IEnumerator$System_Object$_get_Current() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::System.Collections.Generic.IEnumerator<System.Object>.get_Current"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$StopMenuMusicCoroutine$d__9*), 4)); return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<StopMenuMusicCoroutine>d__9.System.Collections.IEnumerator.get_Current ::Il2CppObject* VROSC::MainState::$StopMenuMusicCoroutine$d__9::System_Collections_IEnumerator_get_Current() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::System.Collections.IEnumerator.get_Current"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$StopMenuMusicCoroutine$d__9*), 7)); return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<StopMenuMusicCoroutine>d__9.System.IDisposable.Dispose void VROSC::MainState::$StopMenuMusicCoroutine$d__9::System_IDisposable_Dispose() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::System.IDisposable.Dispose"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$StopMenuMusicCoroutine$d__9*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<StopMenuMusicCoroutine>d__9.MoveNext bool VROSC::MainState::$StopMenuMusicCoroutine$d__9::MoveNext() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::MoveNext"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$StopMenuMusicCoroutine$d__9*), 6)); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<StopMenuMusicCoroutine>d__9.System.Collections.IEnumerator.Reset void VROSC::MainState::$StopMenuMusicCoroutine$d__9::System_Collections_IEnumerator_Reset() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$StopMenuMusicCoroutine$d__9::System.Collections.IEnumerator.Reset"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$StopMenuMusicCoroutine$d__9*), 8)); ::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: VROSC.MainState/VROSC.<FadeInWorldVisually>d__10 #include "VROSC/MainState_-FadeInWorldVisually-d__10.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Int32 <>1__state [[deprecated("Use field access instead!")]] int& VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$$1__state() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$$1__state"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>1__state"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Object <>2__current [[deprecated("Use field access instead!")]] ::Il2CppObject*& VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$$2__current() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$$2__current"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>2__current"))->offset; return *reinterpret_cast<::Il2CppObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single <fadeoutTime>5__2 [[deprecated("Use field access instead!")]] float& VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$fadeoutTime$5__2() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$fadeoutTime$5__2"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<fadeoutTime>5__2"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single <progress>5__3 [[deprecated("Use field access instead!")]] float& VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$progress$5__3() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::dyn_$progress$5__3"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<progress>5__3"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.MainState/VROSC.<FadeInWorldVisually>d__10.System.Collections.Generic.IEnumerator<System.Object>.get_Current ::Il2CppObject* VROSC::MainState::$FadeInWorldVisually$d__10::System_Collections_Generic_IEnumerator$System_Object$_get_Current() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::System.Collections.Generic.IEnumerator<System.Object>.get_Current"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$FadeInWorldVisually$d__10*), 4)); return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<FadeInWorldVisually>d__10.System.Collections.IEnumerator.get_Current ::Il2CppObject* VROSC::MainState::$FadeInWorldVisually$d__10::System_Collections_IEnumerator_get_Current() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::System.Collections.IEnumerator.get_Current"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$FadeInWorldVisually$d__10*), 7)); return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<FadeInWorldVisually>d__10.System.IDisposable.Dispose void VROSC::MainState::$FadeInWorldVisually$d__10::System_IDisposable_Dispose() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::System.IDisposable.Dispose"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$FadeInWorldVisually$d__10*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<FadeInWorldVisually>d__10.MoveNext bool VROSC::MainState::$FadeInWorldVisually$d__10::MoveNext() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::MoveNext"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$FadeInWorldVisually$d__10*), 6)); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<FadeInWorldVisually>d__10.System.Collections.IEnumerator.Reset void VROSC::MainState::$FadeInWorldVisually$d__10::System_Collections_IEnumerator_Reset() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$FadeInWorldVisually$d__10::System.Collections.IEnumerator.Reset"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::MainState::$FadeInWorldVisually$d__10*), 8)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.MainState/VROSC.<RecenterPlayer>d__17 #include "VROSC/MainState_-RecenterPlayer-d__17.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: public System.Int32 <>1__state [[deprecated("Use field access instead!")]] int& VROSC::MainState::$RecenterPlayer$d__17::dyn_$$1__state() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$RecenterPlayer$d__17::dyn_$$1__state"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>1__state"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Runtime.CompilerServices.AsyncVoidMethodBuilder <>t__builder [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::AsyncVoidMethodBuilder& VROSC::MainState::$RecenterPlayer$d__17::dyn_$$t__builder() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$RecenterPlayer$d__17::dyn_$$t__builder"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>t__builder"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::AsyncVoidMethodBuilder*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.MainState <>4__this [[deprecated("Use field access instead!")]] ::VROSC::MainState*& VROSC::MainState::$RecenterPlayer$d__17::dyn_$$4__this() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$RecenterPlayer$d__17::dyn_$$4__this"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset; return *reinterpret_cast<::VROSC::MainState**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Runtime.CompilerServices.TaskAwaiter <>u__1 [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::TaskAwaiter& VROSC::MainState::$RecenterPlayer$d__17::dyn_$$u__1() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$RecenterPlayer$d__17::dyn_$$u__1"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>u__1"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::TaskAwaiter*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.MainState/VROSC.<RecenterPlayer>d__17.MoveNext void VROSC::MainState::$RecenterPlayer$d__17::MoveNext() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$RecenterPlayer$d__17::MoveNext"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::MainState::$RecenterPlayer$d__17), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.MainState/VROSC.<RecenterPlayer>d__17.SetStateMachine void VROSC::MainState::$RecenterPlayer$d__17::SetStateMachine(::System::Runtime::CompilerServices::IAsyncStateMachine* stateMachine) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MainState::$RecenterPlayer$d__17::SetStateMachine"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::MainState::$RecenterPlayer$d__17), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stateMachine); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupAuthenticationManagerState #include "VROSC/SetupAuthenticationManagerState.hpp" // Including type: VROSC.AuthenticationManager #include "VROSC/AuthenticationManager.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 VROSC.AuthenticationManager _authenticationManager [[deprecated("Use field access instead!")]] ::VROSC::AuthenticationManager*& VROSC::SetupAuthenticationManagerState::dyn__authenticationManager() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupAuthenticationManagerState::dyn__authenticationManager"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_authenticationManager"))->offset; return *reinterpret_cast<::VROSC::AuthenticationManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupAuthenticationManagerState.OnEnter void VROSC::SetupAuthenticationManagerState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupAuthenticationManagerState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupAuthenticationManagerState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupAuthenticationManagerState.OnExit void VROSC::SetupAuthenticationManagerState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupAuthenticationManagerState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupAuthenticationManagerState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupAuthenticationManagerState.Tick void VROSC::SetupAuthenticationManagerState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupAuthenticationManagerState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupAuthenticationManagerState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupAuthenticationManagerState.UpdateData void VROSC::SetupAuthenticationManagerState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupAuthenticationManagerState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupAuthenticationManagerState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupBeatCounterState #include "VROSC/SetupBeatCounterState.hpp" // Including type: VROSC.BeatCounter #include "VROSC/BeatCounter.hpp" // Including type: VROSC.BeatCounterUI #include "VROSC/BeatCounterUI.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 VROSC.BeatCounter _beatCounter [[deprecated("Use field access instead!")]] ::VROSC::BeatCounter*& VROSC::SetupBeatCounterState::dyn__beatCounter() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupBeatCounterState::dyn__beatCounter"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_beatCounter"))->offset; return *reinterpret_cast<::VROSC::BeatCounter**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.BeatCounterUI _beatCounterUI [[deprecated("Use field access instead!")]] ::VROSC::BeatCounterUI*& VROSC::SetupBeatCounterState::dyn__beatCounterUI() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupBeatCounterState::dyn__beatCounterUI"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_beatCounterUI"))->offset; return *reinterpret_cast<::VROSC::BeatCounterUI**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupBeatCounterState.OnEnter void VROSC::SetupBeatCounterState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupBeatCounterState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupBeatCounterState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupBeatCounterState.OnExit void VROSC::SetupBeatCounterState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupBeatCounterState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupBeatCounterState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupBeatCounterState.Tick void VROSC::SetupBeatCounterState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupBeatCounterState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupBeatCounterState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupBeatCounterState.UpdateData void VROSC::SetupBeatCounterState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupBeatCounterState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupBeatCounterState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupInputManagerState #include "VROSC/SetupInputManagerState.hpp" // Including type: VROSC.InputManager #include "VROSC/InputManager.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 VROSC.InputManager _inputManager [[deprecated("Use field access instead!")]] ::VROSC::InputManager*& VROSC::SetupInputManagerState::dyn__inputManager() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInputManagerState::dyn__inputManager"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_inputManager"))->offset; return *reinterpret_cast<::VROSC::InputManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupInputManagerState.OnEnter void VROSC::SetupInputManagerState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInputManagerState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInputManagerState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupInputManagerState.OnExit void VROSC::SetupInputManagerState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInputManagerState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInputManagerState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupInputManagerState.Tick void VROSC::SetupInputManagerState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInputManagerState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInputManagerState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupInputManagerState.UpdateData void VROSC::SetupInputManagerState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInputManagerState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInputManagerState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupInstrumentsState #include "VROSC/SetupInstrumentsState.hpp" // Including type: VROSC.InstrumentHub #include "VROSC/InstrumentHub.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 VROSC.InstrumentHub _instrumentHub [[deprecated("Use field access instead!")]] ::VROSC::InstrumentHub*& VROSC::SetupInstrumentsState::dyn__instrumentHub() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInstrumentsState::dyn__instrumentHub"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_instrumentHub"))->offset; return *reinterpret_cast<::VROSC::InstrumentHub**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupInstrumentsState.OnEnter void VROSC::SetupInstrumentsState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInstrumentsState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInstrumentsState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupInstrumentsState.OnExit void VROSC::SetupInstrumentsState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInstrumentsState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInstrumentsState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupInstrumentsState.Tick void VROSC::SetupInstrumentsState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInstrumentsState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInstrumentsState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupInstrumentsState.UpdateData void VROSC::SetupInstrumentsState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupInstrumentsState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupInstrumentsState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupMalletManagerState #include "VROSC/SetupMalletManagerState.hpp" // Including type: VROSC.MalletManager #include "VROSC/MalletManager.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 VROSC.MalletManager _malletManager [[deprecated("Use field access instead!")]] ::VROSC::MalletManager*& VROSC::SetupMalletManagerState::dyn__malletManager() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMalletManagerState::dyn__malletManager"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_malletManager"))->offset; return *reinterpret_cast<::VROSC::MalletManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupMalletManagerState.OnEnter void VROSC::SetupMalletManagerState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMalletManagerState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMalletManagerState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupMalletManagerState.OnExit void VROSC::SetupMalletManagerState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMalletManagerState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMalletManagerState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupMalletManagerState.Tick void VROSC::SetupMalletManagerState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMalletManagerState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMalletManagerState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupMalletManagerState.UpdateData void VROSC::SetupMalletManagerState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMalletManagerState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMalletManagerState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupMicrophoneState #include "VROSC/SetupMicrophoneState.hpp" // Including type: VROSC.MicrophoneDeviceManager #include "VROSC/MicrophoneDeviceManager.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 VROSC.MicrophoneDeviceManager _microphoneManager [[deprecated("Use field access instead!")]] ::VROSC::MicrophoneDeviceManager*& VROSC::SetupMicrophoneState::dyn__microphoneManager() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMicrophoneState::dyn__microphoneManager"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_microphoneManager"))->offset; return *reinterpret_cast<::VROSC::MicrophoneDeviceManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupMicrophoneState.OnEnter void VROSC::SetupMicrophoneState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMicrophoneState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMicrophoneState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupMicrophoneState.OnExit void VROSC::SetupMicrophoneState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMicrophoneState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMicrophoneState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupMicrophoneState.Tick void VROSC::SetupMicrophoneState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMicrophoneState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMicrophoneState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupMicrophoneState.UpdateData void VROSC::SetupMicrophoneState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMicrophoneState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMicrophoneState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupMidiManagerState #include "VROSC/SetupMidiManagerState.hpp" // Including type: VROSC.MidiManager #include "VROSC/MidiManager.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 VROSC.MidiManager _midiManager [[deprecated("Use field access instead!")]] ::VROSC::MidiManager*& VROSC::SetupMidiManagerState::dyn__midiManager() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMidiManagerState::dyn__midiManager"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_midiManager"))->offset; return *reinterpret_cast<::VROSC::MidiManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupMidiManagerState.OnEnter void VROSC::SetupMidiManagerState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMidiManagerState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMidiManagerState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupMidiManagerState.OnExit void VROSC::SetupMidiManagerState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMidiManagerState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMidiManagerState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupMidiManagerState.Tick void VROSC::SetupMidiManagerState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMidiManagerState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMidiManagerState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupMidiManagerState.UpdateData void VROSC::SetupMidiManagerState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupMidiManagerState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupMidiManagerState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupPlatformSelectorState #include "VROSC/SetupPlatformSelectorState.hpp" // Including type: VROSC.PlatformSelector #include "VROSC/PlatformSelector.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 VROSC.PlatformSelector _platformSelector [[deprecated("Use field access instead!")]] ::VROSC::PlatformSelector*& VROSC::SetupPlatformSelectorState::dyn__platformSelector() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupPlatformSelectorState::dyn__platformSelector"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_platformSelector"))->offset; return *reinterpret_cast<::VROSC::PlatformSelector**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupPlatformSelectorState.OnEnter void VROSC::SetupPlatformSelectorState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupPlatformSelectorState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupPlatformSelectorState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupPlatformSelectorState.OnExit void VROSC::SetupPlatformSelectorState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupPlatformSelectorState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupPlatformSelectorState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupPlatformSelectorState.Tick void VROSC::SetupPlatformSelectorState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupPlatformSelectorState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupPlatformSelectorState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupPlatformSelectorState.UpdateData void VROSC::SetupPlatformSelectorState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupPlatformSelectorState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupPlatformSelectorState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.SetupUiState #include "VROSC/SetupUiState.hpp" // Including type: VROSC.Dashboard #include "VROSC/Dashboard.hpp" // Including type: PunchKeyboard #include "GlobalNamespace/PunchKeyboard.hpp" // Including type: VROSC.UISchemeController #include "VROSC/UISchemeController.hpp" // Including type: VROSC.SetupBeatCounterState #include "VROSC/SetupBeatCounterState.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 VROSC.Dashboard _dashboardPrefab [[deprecated("Use field access instead!")]] ::VROSC::Dashboard*& VROSC::SetupUiState::dyn__dashboardPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::dyn__dashboardPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_dashboardPrefab"))->offset; return *reinterpret_cast<::VROSC::Dashboard**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private PunchKeyboard _keyboardPrefab [[deprecated("Use field access instead!")]] ::GlobalNamespace::PunchKeyboard*& VROSC::SetupUiState::dyn__keyboardPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::dyn__keyboardPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_keyboardPrefab"))->offset; return *reinterpret_cast<::GlobalNamespace::PunchKeyboard**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UISchemeController _uiSchemeController [[deprecated("Use field access instead!")]] ::VROSC::UISchemeController*& VROSC::SetupUiState::dyn__uiSchemeController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::dyn__uiSchemeController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_uiSchemeController"))->offset; return *reinterpret_cast<::VROSC::UISchemeController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.SetupBeatCounterState _beatCounterState [[deprecated("Use field access instead!")]] ::VROSC::SetupBeatCounterState*& VROSC::SetupUiState::dyn__beatCounterState() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::dyn__beatCounterState"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_beatCounterState"))->offset; return *reinterpret_cast<::VROSC::SetupBeatCounterState**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SetupUiState.OnEnter void VROSC::SetupUiState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupUiState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.SetupUiState.OnExit void VROSC::SetupUiState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupUiState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupUiState.Tick void VROSC::SetupUiState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupUiState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SetupUiState.UpdateData void VROSC::SetupUiState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SetupUiState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::SetupUiState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.ShowSplashScreenState #include "VROSC/ShowSplashScreenState.hpp" // Including type: VROSC.FullScreenFxController #include "VROSC/FullScreenFxController.hpp" // Including type: VROSC.IntroVideoPlayer #include "VROSC/IntroVideoPlayer.hpp" // Including type: VROSC.PlatformSelector #include "VROSC/PlatformSelector.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 VROSC.FullScreenFxController _fullScreenFxController [[deprecated("Use field access instead!")]] ::VROSC::FullScreenFxController*& VROSC::ShowSplashScreenState::dyn__fullScreenFxController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ShowSplashScreenState::dyn__fullScreenFxController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_fullScreenFxController"))->offset; return *reinterpret_cast<::VROSC::FullScreenFxController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.IntroVideoPlayer _introVideoPlayer [[deprecated("Use field access instead!")]] ::VROSC::IntroVideoPlayer*& VROSC::ShowSplashScreenState::dyn__introVideoPlayer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ShowSplashScreenState::dyn__introVideoPlayer"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_introVideoPlayer"))->offset; return *reinterpret_cast<::VROSC::IntroVideoPlayer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.PlatformSelector _platformSelector [[deprecated("Use field access instead!")]] ::VROSC::PlatformSelector*& VROSC::ShowSplashScreenState::dyn__platformSelector() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ShowSplashScreenState::dyn__platformSelector"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_platformSelector"))->offset; return *reinterpret_cast<::VROSC::PlatformSelector**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ShowSplashScreenState.OnEnter void VROSC::ShowSplashScreenState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ShowSplashScreenState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::ShowSplashScreenState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.ShowSplashScreenState.OnExit void VROSC::ShowSplashScreenState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ShowSplashScreenState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::ShowSplashScreenState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.ShowSplashScreenState.Tick void VROSC::ShowSplashScreenState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ShowSplashScreenState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::ShowSplashScreenState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.ShowSplashScreenState.UpdateData void VROSC::ShowSplashScreenState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ShowSplashScreenState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::ShowSplashScreenState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.StartState #include "VROSC/StartState.hpp" // Including type: VROSC.FullScreenFxController #include "VROSC/FullScreenFxController.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 VROSC.FullScreenFxController _fullScreenFxController [[deprecated("Use field access instead!")]] ::VROSC::FullScreenFxController*& VROSC::StartState::dyn__fullScreenFxController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StartState::dyn__fullScreenFxController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_fullScreenFxController"))->offset; return *reinterpret_cast<::VROSC::FullScreenFxController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.StartState.OnEnter void VROSC::StartState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StartState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::StartState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.StartState.OnExit void VROSC::StartState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StartState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::StartState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.StartState.Tick void VROSC::StartState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StartState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::StartState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.StartState.UpdateData void VROSC::StartState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StartState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::StartState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.IState #include "VROSC/IState.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated method: VROSC.IState.Tick void VROSC::IState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::IState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::IState*), -1)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.IState.UpdateData void VROSC::IState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::IState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::IState*), -1)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.IState.OnEnter void VROSC::IState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::IState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::IState*), -1)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.IState.OnExit void VROSC::IState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::IState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::IState*), -1)); ::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: VROSC.StateMachine #include "VROSC/StateMachine.hpp" // Including type: VROSC.StateMachine/VROSC.Transition #include "VROSC/StateMachine_Transition.hpp" // Including type: VROSC.IState #include "VROSC/IState.hpp" // Including type: System.Collections.Generic.Dictionary`2 #include "System/Collections/Generic/Dictionary_2.hpp" // Including type: System.Type #include "System/Type.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: System.Func`1 #include "System/Func_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static private System.Collections.Generic.List`1<VROSC.StateMachine/VROSC.Transition> EmptyTransitions ::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>* VROSC::StateMachine::_get_EmptyTransitions() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::_get_EmptyTransitions"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>*>("VROSC", "StateMachine", "EmptyTransitions")); } // Autogenerated static field setter // Set static field: static private System.Collections.Generic.List`1<VROSC.StateMachine/VROSC.Transition> EmptyTransitions void VROSC::StateMachine::_set_EmptyTransitions(::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::_set_EmptyTransitions"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "StateMachine", "EmptyTransitions", value)); } // Autogenerated instance field getter // Get instance field: private VROSC.IState _currentState [[deprecated("Use field access instead!")]] ::VROSC::IState*& VROSC::StateMachine::dyn__currentState() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::dyn__currentState"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentState"))->offset; return *reinterpret_cast<::VROSC::IState**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.Dictionary`2<System.Type,System.Collections.Generic.List`1<VROSC.StateMachine/VROSC.Transition>> _transitions [[deprecated("Use field access instead!")]] ::System::Collections::Generic::Dictionary_2<::System::Type*, ::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>*>*& VROSC::StateMachine::dyn__transitions() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::dyn__transitions"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_transitions"))->offset; return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<::System::Type*, ::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.StateMachine/VROSC.Transition> _currentTransitions [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>*& VROSC::StateMachine::dyn__currentTransitions() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::dyn__currentTransitions"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentTransitions"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.StateMachine/VROSC.Transition> _anyTransitions [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>*& VROSC::StateMachine::dyn__anyTransitions() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::dyn__anyTransitions"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_anyTransitions"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::StateMachine::Transition*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.StateMachine..cctor void VROSC::StateMachine::_cctor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::.cctor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "StateMachine", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method); } // Autogenerated method: VROSC.StateMachine.IsState bool VROSC::StateMachine::IsState(::VROSC::IState* state) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::IsState"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IsState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, state); } // Autogenerated method: VROSC.StateMachine.Tick void VROSC::StateMachine::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::Tick"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Tick", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.StateMachine.SetState void VROSC::StateMachine::SetState(::VROSC::IState* state, ::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::SetState"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state), ::il2cpp_utils::ExtractType(values)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, state, values); } // Autogenerated method: VROSC.StateMachine.AddTransition void VROSC::StateMachine::AddTransition(::VROSC::IState* from, ::VROSC::IState* to, ::System::Func_1<bool>* predicate) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::AddTransition"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddTransition", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(from), ::il2cpp_utils::ExtractType(to), ::il2cpp_utils::ExtractType(predicate)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, from, to, predicate); } // Autogenerated method: VROSC.StateMachine.AddAnyTransition void VROSC::StateMachine::AddAnyTransition(::VROSC::IState* state, ::System::Func_1<bool>* predicate) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::AddAnyTransition"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddAnyTransition", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state), ::il2cpp_utils::ExtractType(predicate)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, state, predicate); } // Autogenerated method: VROSC.StateMachine.GetTransition bool VROSC::StateMachine::GetTransition(ByRef<::VROSC::StateMachine::Transition*> transition) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::GetTransition"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetTransition", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractIndependentType<::VROSC::StateMachine::Transition*&>()}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(transition)); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.StateMachine/VROSC.Transition #include "VROSC/StateMachine_Transition.hpp" // Including type: System.Func`1 #include "System/Func_1.hpp" // Including type: VROSC.IState #include "VROSC/IState.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private readonly System.Func`1<System.Boolean> <Condition>k__BackingField [[deprecated("Use field access instead!")]] ::System::Func_1<bool>*& VROSC::StateMachine::Transition::dyn_$Condition$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::Transition::dyn_$Condition$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Condition>k__BackingField"))->offset; return *reinterpret_cast<::System::Func_1<bool>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private readonly VROSC.IState <To>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::IState*& VROSC::StateMachine::Transition::dyn_$To$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::Transition::dyn_$To$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<To>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::IState**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.StateMachine/VROSC.Transition.get_Condition ::System::Func_1<bool>* VROSC::StateMachine::Transition::get_Condition() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::Transition::get_Condition"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Condition", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::System::Func_1<bool>*, false>(this, ___internal__method); } // Autogenerated method: VROSC.StateMachine/VROSC.Transition.get_To ::VROSC::IState* VROSC::StateMachine::Transition::get_To() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StateMachine::Transition::get_To"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_To", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::IState*, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.StaticData #include "VROSC/StaticData.hpp" // Including type: VROSC.SampleDatabase #include "VROSC/SampleDatabase.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 VROSC.SampleDatabase _drumsSamplesDatabase [[deprecated("Use field access instead!")]] ::VROSC::SampleDatabase*& VROSC::StaticData::dyn__drumsSamplesDatabase() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StaticData::dyn__drumsSamplesDatabase"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_drumsSamplesDatabase"))->offset; return *reinterpret_cast<::VROSC::SampleDatabase**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.StaticData.get_DrumSamples ::VROSC::SampleDatabase* VROSC::StaticData::get_DrumSamples() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::StaticData::get_DrumSamples"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DrumSamples", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::SampleDatabase*, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TapeRecorder #include "VROSC/TapeRecorder.hpp" // Including type: VROSC.TapeRecorderUI #include "VROSC/TapeRecorderUI.hpp" // Including type: UnityEngine.AudioSource #include "UnityEngine/AudioSource.hpp" // Including type: VROSC.TapeRecorderDataController #include "VROSC/TapeRecorderDataController.hpp" // Including type: System.Action #include "System/Action.hpp" // Including type: System.Action`1 #include "System/Action_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public System.Action OnStartSaving ::System::Action* VROSC::TapeRecorder::_get_OnStartSaving() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::_get_OnStartSaving"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Action*>("VROSC", "TapeRecorder", "OnStartSaving")); } // Autogenerated static field setter // Set static field: static public System.Action OnStartSaving void VROSC::TapeRecorder::_set_OnStartSaving(::System::Action* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::_set_OnStartSaving"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TapeRecorder", "OnStartSaving", value)); } // Autogenerated static field getter // Get static field: static public System.Action OnSaveSuccess ::System::Action* VROSC::TapeRecorder::_get_OnSaveSuccess() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::_get_OnSaveSuccess"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Action*>("VROSC", "TapeRecorder", "OnSaveSuccess")); } // Autogenerated static field setter // Set static field: static public System.Action OnSaveSuccess void VROSC::TapeRecorder::_set_OnSaveSuccess(::System::Action* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::_set_OnSaveSuccess"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TapeRecorder", "OnSaveSuccess", value)); } // Autogenerated static field getter // Get static field: static public System.Action`1<VROSC.Error> OnSaveFailure ::System::Action_1<::VROSC::Error>* VROSC::TapeRecorder::_get_OnSaveFailure() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::_get_OnSaveFailure"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Action_1<::VROSC::Error>*>("VROSC", "TapeRecorder", "OnSaveFailure")); } // Autogenerated static field setter // Set static field: static public System.Action`1<VROSC.Error> OnSaveFailure void VROSC::TapeRecorder::_set_OnSaveFailure(::System::Action_1<::VROSC::Error>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::_set_OnSaveFailure"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TapeRecorder", "OnSaveFailure", value)); } // Autogenerated instance field getter // Get instance field: private VROSC.TapeRecorderUI _ui [[deprecated("Use field access instead!")]] ::VROSC::TapeRecorderUI*& VROSC::TapeRecorder::dyn__ui() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__ui"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_ui"))->offset; return *reinterpret_cast<::VROSC::TapeRecorderUI**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioSource _audioSource [[deprecated("Use field access instead!")]] ::UnityEngine::AudioSource*& VROSC::TapeRecorder::dyn__audioSource() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__audioSource"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_audioSource"))->offset; return *reinterpret_cast<::UnityEngine::AudioSource**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TapeRecorderDataController _dataController [[deprecated("Use field access instead!")]] ::VROSC::TapeRecorderDataController*& VROSC::TapeRecorder::dyn__dataController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__dataController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_dataController"))->offset; return *reinterpret_cast<::VROSC::TapeRecorderDataController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Double _recordingStartTime [[deprecated("Use field access instead!")]] double& VROSC::TapeRecorder::dyn__recordingStartTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__recordingStartTime"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_recordingStartTime"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _lastFetchedRecordingIndex [[deprecated("Use field access instead!")]] int& VROSC::TapeRecorder::dyn__lastFetchedRecordingIndex() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__lastFetchedRecordingIndex"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lastFetchedRecordingIndex"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _recording [[deprecated("Use field access instead!")]] bool& VROSC::TapeRecorder::dyn__recording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__recording"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_recording"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _wasPlaying [[deprecated("Use field access instead!")]] bool& VROSC::TapeRecorder::dyn__wasPlaying() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__wasPlaying"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_wasPlaying"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _playing [[deprecated("Use field access instead!")]] bool& VROSC::TapeRecorder::dyn__playing() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__playing"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_playing"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _currentPlaybackPosition [[deprecated("Use field access instead!")]] int& VROSC::TapeRecorder::dyn__currentPlaybackPosition() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn__currentPlaybackPosition"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentPlaybackPosition"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean <IsSetup>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::TapeRecorder::dyn_$IsSetup$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::dyn_$IsSetup$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<IsSetup>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TapeRecorder.get_MaxRecordingLengthSeconds float VROSC::TapeRecorder::get_MaxRecordingLengthSeconds() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::get_MaxRecordingLengthSeconds"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_MaxRecordingLengthSeconds", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.get_Recording bool VROSC::TapeRecorder::get_Recording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::get_Recording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Recording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.get_Playing bool VROSC::TapeRecorder::get_Playing() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::get_Playing"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Playing", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.get_HasRecording bool VROSC::TapeRecorder::get_HasRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::get_HasRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HasRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.get_CurrentPlaybackTimeSeconds float VROSC::TapeRecorder::get_CurrentPlaybackTimeSeconds() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::get_CurrentPlaybackTimeSeconds"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CurrentPlaybackTimeSeconds", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.get_RecordingLengthSeconds float VROSC::TapeRecorder::get_RecordingLengthSeconds() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::get_RecordingLengthSeconds"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RecordingLengthSeconds", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.get_IsSetup bool VROSC::TapeRecorder::get_IsSetup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::get_IsSetup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsSetup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.set_IsSetup void VROSC::TapeRecorder::set_IsSetup(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::set_IsSetup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_IsSetup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.TapeRecorder.Setup void VROSC::TapeRecorder::Setup(::VROSC::TapeRecorderDataController* dataController) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(dataController)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, dataController); } // Autogenerated method: VROSC.TapeRecorder.Update void VROSC::TapeRecorder::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::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: VROSC.TapeRecorder.StartRecording void VROSC::TapeRecorder::StartRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::StartRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.GetElapsedRecordingTime float VROSC::TapeRecorder::GetElapsedRecordingTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::GetElapsedRecordingTime"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetElapsedRecordingTime", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.RecordingReachedEnd void VROSC::TapeRecorder::RecordingReachedEnd(::ArrayW<float> recordingData) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::RecordingReachedEnd"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RecordingReachedEnd", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(recordingData)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, recordingData); } // Autogenerated method: VROSC.TapeRecorder.StopRecording void VROSC::TapeRecorder::StopRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::StopRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.ConcludeRecording void VROSC::TapeRecorder::ConcludeRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::ConcludeRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ConcludeRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.UpdateLoadedRecording void VROSC::TapeRecorder::UpdateLoadedRecording(bool trim, float recordedLengthSeconds) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::UpdateLoadedRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateLoadedRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(trim), ::il2cpp_utils::ExtractType(recordedLengthSeconds)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, trim, recordedLengthSeconds); } // Autogenerated method: VROSC.TapeRecorder.SaveRecording void VROSC::TapeRecorder::SaveRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::SaveRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SaveRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.StartPlayback void VROSC::TapeRecorder::StartPlayback() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::StartPlayback"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartPlayback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.PausePlayback void VROSC::TapeRecorder::PausePlayback() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::PausePlayback"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PausePlayback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.SetUseAsPreview void VROSC::TapeRecorder::SetUseAsPreview(bool useAsPreview) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::SetUseAsPreview"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetUseAsPreview", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(useAsPreview)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, useAsPreview); } // Autogenerated method: VROSC.TapeRecorder.UserDataLoaded void VROSC::TapeRecorder::UserDataLoaded(::VROSC::TapeRecorderDataController* dataController) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::UserDataLoaded"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UserDataLoaded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(dataController)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, dataController); } // Autogenerated method: VROSC.TapeRecorder.SetPlaybackTime void VROSC::TapeRecorder::SetPlaybackTime(float time) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::SetPlaybackTime"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetPlaybackTime", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(time)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, time); } // Autogenerated method: VROSC.TapeRecorder.OnAudioFilterRead void VROSC::TapeRecorder::OnAudioFilterRead(::ArrayW<float> data, int channels) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::OnAudioFilterRead"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnAudioFilterRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(data), ::il2cpp_utils::ExtractType(channels)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, data, channels); } // Autogenerated method: VROSC.TapeRecorder.<SaveRecording>b__36_0 void VROSC::TapeRecorder::$SaveRecording$b__36_0() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::<SaveRecording>b__36_0"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<SaveRecording>b__36_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorder.<SaveRecording>b__36_1 void VROSC::TapeRecorder::$SaveRecording$b__36_1(::VROSC::Error error) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorder::<SaveRecording>b__36_1"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<SaveRecording>b__36_1", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(error)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, error); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TapeRecorderController #include "VROSC/TapeRecorderController.hpp" // Including type: VROSC.UIButton #include "VROSC/UIButton.hpp" // Including type: VROSC.TapeRecorder #include "VROSC/TapeRecorder.hpp" // Including type: VROSC.ControlPanelUI #include "VROSC/ControlPanelUI.hpp" // Including type: VROSC.InfoPanel #include "VROSC/InfoPanel.hpp" // Including type: VROSC.UserDataControllers #include "VROSC/UserDataControllers.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 VROSC.UIButton _closeButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TapeRecorderController::dyn__closeButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderController::dyn__closeButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TapeRecorder _tapeRecorder [[deprecated("Use field access instead!")]] ::VROSC::TapeRecorder*& VROSC::TapeRecorderController::dyn__tapeRecorder() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderController::dyn__tapeRecorder"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tapeRecorder"))->offset; return *reinterpret_cast<::VROSC::TapeRecorder**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: protected VROSC.ControlPanelUI _controlPanelUI [[deprecated("Use field access instead!")]] ::VROSC::ControlPanelUI*& VROSC::TapeRecorderController::dyn__controlPanelUI() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderController::dyn__controlPanelUI"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_controlPanelUI"))->offset; return *reinterpret_cast<::VROSC::ControlPanelUI**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: protected VROSC.InfoPanel _infoPanel [[deprecated("Use field access instead!")]] ::VROSC::InfoPanel*& VROSC::TapeRecorderController::dyn__infoPanel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderController::dyn__infoPanel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_infoPanel"))->offset; return *reinterpret_cast<::VROSC::InfoPanel**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TapeRecorderController.CloseButtonPressed void VROSC::TapeRecorderController::CloseButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderController::CloseButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CloseButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderController.Setup void VROSC::TapeRecorderController::Setup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderController::Setup"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::ToolController*), 10)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderController.UserDataLoaded void VROSC::TapeRecorderController::UserDataLoaded(::VROSC::UserDataControllers* user) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderController::UserDataLoaded"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::ToolController*), 8)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, user); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TapeRecorderUI #include "VROSC/TapeRecorderUI.hpp" // Including type: VROSC.TapeRecorderUI/VROSC.<DisplayTextAlert>d__45 #include "VROSC/TapeRecorderUI_-DisplayTextAlert-d__45.hpp" // Including type: VROSC.TapeRecorder #include "VROSC/TapeRecorder.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" // Including type: VROSC.UIButton #include "VROSC/UIButton.hpp" // Including type: VROSC.UISlideToggle #include "VROSC/UISlideToggle.hpp" // Including type: TMPro.TextMeshPro #include "TMPro/TextMeshPro.hpp" // Including type: VROSC.WaveformVisualizer #include "VROSC/WaveformVisualizer.hpp" // Including type: UnityEngine.RectTransform #include "UnityEngine/RectTransform.hpp" // Including type: VROSC.TimeSlider #include "VROSC/TimeSlider.hpp" // Including type: VROSC.InputDevice #include "VROSC/InputDevice.hpp" // Including type: VROSC.Error #include "VROSC/Error.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 VROSC.TapeRecorder _tapeRecorder [[deprecated("Use field access instead!")]] ::VROSC::TapeRecorder*& VROSC::TapeRecorderUI::dyn__tapeRecorder() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__tapeRecorder"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tapeRecorder"))->offset; return *reinterpret_cast<::VROSC::TapeRecorder**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _mainPanel [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TapeRecorderUI::dyn__mainPanel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__mainPanel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_mainPanel"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _warningPopup [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TapeRecorderUI::dyn__warningPopup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__warningPopup"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_warningPopup"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _recordButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TapeRecorderUI::dyn__recordButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__recordButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_recordButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _playButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TapeRecorderUI::dyn__playButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__playButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_playButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _saveButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TapeRecorderUI::dyn__saveButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__saveButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_saveButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _warningCancelButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TapeRecorderUI::dyn__warningCancelButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__warningCancelButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_warningCancelButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _warningOKButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TapeRecorderUI::dyn__warningOKButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__warningOKButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_warningOKButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UISlideToggle _previewToggle [[deprecated("Use field access instead!")]] ::VROSC::UISlideToggle*& VROSC::TapeRecorderUI::dyn__previewToggle() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__previewToggle"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_previewToggle"))->offset; return *reinterpret_cast<::VROSC::UISlideToggle**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _recordIcon [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TapeRecorderUI::dyn__recordIcon() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__recordIcon"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_recordIcon"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _stopIcon [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TapeRecorderUI::dyn__stopIcon() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__stopIcon"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stopIcon"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _playIcon [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TapeRecorderUI::dyn__playIcon() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__playIcon"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_playIcon"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _pauseIcon [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TapeRecorderUI::dyn__pauseIcon() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__pauseIcon"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_pauseIcon"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private TMPro.TextMeshPro _textAlert [[deprecated("Use field access instead!")]] ::TMPro::TextMeshPro*& VROSC::TapeRecorderUI::dyn__textAlert() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__textAlert"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_textAlert"))->offset; return *reinterpret_cast<::TMPro::TextMeshPro**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private TMPro.TextMeshPro _timeCounter [[deprecated("Use field access instead!")]] ::TMPro::TextMeshPro*& VROSC::TapeRecorderUI::dyn__timeCounter() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__timeCounter"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_timeCounter"))->offset; return *reinterpret_cast<::TMPro::TextMeshPro**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.WaveformVisualizer _waveformVisualizer [[deprecated("Use field access instead!")]] ::VROSC::WaveformVisualizer*& VROSC::TapeRecorderUI::dyn__waveformVisualizer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__waveformVisualizer"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_waveformVisualizer"))->offset; return *reinterpret_cast<::VROSC::WaveformVisualizer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.RectTransform _playHead [[deprecated("Use field access instead!")]] ::UnityEngine::RectTransform*& VROSC::TapeRecorderUI::dyn__playHead() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__playHead"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_playHead"))->offset; return *reinterpret_cast<::UnityEngine::RectTransform**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TimeSlider _timeSlider [[deprecated("Use field access instead!")]] ::VROSC::TimeSlider*& VROSC::TapeRecorderUI::dyn__timeSlider() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__timeSlider"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_timeSlider"))->offset; return *reinterpret_cast<::VROSC::TimeSlider**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _playHeadFullWidth [[deprecated("Use field access instead!")]] float& VROSC::TapeRecorderUI::dyn__playHeadFullWidth() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::dyn__playHeadFullWidth"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_playHeadFullWidth"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TapeRecorderUI.get_TimeSlider ::VROSC::TimeSlider* VROSC::TapeRecorderUI::get_TimeSlider() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::get_TimeSlider"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_TimeSlider", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::TimeSlider*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.Setup void VROSC::TapeRecorderUI::Setup(::VROSC::TapeRecorder* tapeRecorder) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tapeRecorder)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tapeRecorder); } // Autogenerated method: VROSC.TapeRecorderUI.OnDestroy void VROSC::TapeRecorderUI::OnDestroy() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::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: VROSC.TapeRecorderUI.Clear void VROSC::TapeRecorderUI::Clear() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::Clear"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Clear", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.RecordButtonPressed void VROSC::TapeRecorderUI::RecordButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::RecordButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RecordButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.PlayButtonPressed void VROSC::TapeRecorderUI::PlayButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::PlayButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PlayButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.SaveButtonPressed void VROSC::TapeRecorderUI::SaveButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::SaveButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SaveButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.WarningCancelPressed void VROSC::TapeRecorderUI::WarningCancelPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::WarningCancelPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WarningCancelPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.WarningOKPressed void VROSC::TapeRecorderUI::WarningOKPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::WarningOKPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WarningOKPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.PreviewToggleChanged void VROSC::TapeRecorderUI::PreviewToggleChanged(::VROSC::InputDevice* inputDevice, bool toggled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::PreviewToggleChanged"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PreviewToggleChanged", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputDevice), ::il2cpp_utils::ExtractType(toggled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputDevice, toggled); } // Autogenerated method: VROSC.TapeRecorderUI.UpdateVisualization void VROSC::TapeRecorderUI::UpdateVisualization(::ArrayW<float> audioData, float elapsedTimeSeconds) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::UpdateVisualization"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateVisualization", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(audioData), ::il2cpp_utils::ExtractType(elapsedTimeSeconds)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, audioData, elapsedTimeSeconds); } // Autogenerated method: VROSC.TapeRecorderUI.UpdateTimeLabel void VROSC::TapeRecorderUI::UpdateTimeLabel(bool useSliderValue) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::UpdateTimeLabel"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateTimeLabel", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(useSliderValue)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, useSliderValue); } // Autogenerated method: VROSC.TapeRecorderUI.ShowWarningPopup void VROSC::TapeRecorderUI::ShowWarningPopup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::ShowWarningPopup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ShowWarningPopup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.HideWarningPopup void VROSC::TapeRecorderUI::HideWarningPopup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::HideWarningPopup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "HideWarningPopup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.ShowAsRecording void VROSC::TapeRecorderUI::ShowAsRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::ShowAsRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ShowAsRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.ShowAsPlaying void VROSC::TapeRecorderUI::ShowAsPlaying() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::ShowAsPlaying"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ShowAsPlaying", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.ShowAsPaused void VROSC::TapeRecorderUI::ShowAsPaused() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::ShowAsPaused"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ShowAsPaused", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.ShowAsConcluded void VROSC::TapeRecorderUI::ShowAsConcluded() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::ShowAsConcluded"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ShowAsConcluded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.ShowAsSaving void VROSC::TapeRecorderUI::ShowAsSaving() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::ShowAsSaving"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ShowAsSaving", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.SaveSucceeded void VROSC::TapeRecorderUI::SaveSucceeded() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::SaveSucceeded"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SaveSucceeded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.SaveFailed void VROSC::TapeRecorderUI::SaveFailed(::VROSC::Error error) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::SaveFailed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SaveFailed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(error)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, error); } // Autogenerated method: VROSC.TapeRecorderUI.TimeSliderChanged void VROSC::TapeRecorderUI::TimeSliderChanged(float newValue) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::TimeSliderChanged"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TimeSliderChanged", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(newValue)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, newValue); } // Autogenerated method: VROSC.TapeRecorderUI.SessionSaveBegun void VROSC::TapeRecorderUI::SessionSaveBegun() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::SessionSaveBegun"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SessionSaveBegun", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI.DisplayLoadedRecording void VROSC::TapeRecorderUI::DisplayLoadedRecording(::ArrayW<float> audioData, int startIndex, int endIndex) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::DisplayLoadedRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisplayLoadedRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(audioData), ::il2cpp_utils::ExtractType(startIndex), ::il2cpp_utils::ExtractType(endIndex)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, audioData, startIndex, endIndex); } // Autogenerated method: VROSC.TapeRecorderUI.SetUseAsPreviewToggled void VROSC::TapeRecorderUI::SetUseAsPreviewToggled(bool state) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::SetUseAsPreviewToggled"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetUseAsPreviewToggled", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, state); } // Autogenerated method: VROSC.TapeRecorderUI.DisplayTextAlert void VROSC::TapeRecorderUI::DisplayTextAlert(::StringW text, float displayTime) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::DisplayTextAlert"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisplayTextAlert", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(text), ::il2cpp_utils::ExtractType(displayTime)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, text, displayTime); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TapeRecorderUI/VROSC.<DisplayTextAlert>d__45 #include "VROSC/TapeRecorderUI_-DisplayTextAlert-d__45.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: public System.Int32 <>1__state [[deprecated("Use field access instead!")]] int& VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$1__state() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$1__state"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>1__state"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Runtime.CompilerServices.AsyncVoidMethodBuilder <>t__builder [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::AsyncVoidMethodBuilder& VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$t__builder() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$t__builder"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>t__builder"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::AsyncVoidMethodBuilder*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.TapeRecorderUI <>4__this [[deprecated("Use field access instead!")]] ::VROSC::TapeRecorderUI*& VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$4__this() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$4__this"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset; return *reinterpret_cast<::VROSC::TapeRecorderUI**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.String text [[deprecated("Use field access instead!")]] ::StringW& VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_text() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_text"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "text"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Single displayTime [[deprecated("Use field access instead!")]] float& VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_displayTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_displayTime"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "displayTime"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Runtime.CompilerServices.TaskAwaiter <>u__1 [[deprecated("Use field access instead!")]] ::System::Runtime::CompilerServices::TaskAwaiter& VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$u__1() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::dyn_$$u__1"); auto ___internal__instance = *this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>u__1"))->offset; return *reinterpret_cast<::System::Runtime::CompilerServices::TaskAwaiter*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TapeRecorderUI/VROSC.<DisplayTextAlert>d__45.MoveNext void VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::MoveNext() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::MoveNext"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TapeRecorderUI/VROSC.<DisplayTextAlert>d__45.SetStateMachine void VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::SetStateMachine(::System::Runtime::CompilerServices::IAsyncStateMachine* stateMachine) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45::SetStateMachine"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(*this, classof(::VROSC::TapeRecorderUI::$DisplayTextAlert$d__45), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stateMachine); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.WaveformVisualizer #include "VROSC/WaveformVisualizer.hpp" // Including type: UnityEngine.Renderer #include "UnityEngine/Renderer.hpp" // Including type: UnityEngine.Texture2D #include "UnityEngine/Texture2D.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static private System.Int32 VisualizationXRes int VROSC::WaveformVisualizer::_get_VisualizationXRes() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::_get_VisualizationXRes"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("VROSC", "WaveformVisualizer", "VisualizationXRes")); } // Autogenerated static field setter // Set static field: static private System.Int32 VisualizationXRes void VROSC::WaveformVisualizer::_set_VisualizationXRes(int value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::_set_VisualizationXRes"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WaveformVisualizer", "VisualizationXRes", value)); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Renderer _visualizationRenderer [[deprecated("Use field access instead!")]] ::UnityEngine::Renderer*& VROSC::WaveformVisualizer::dyn__visualizationRenderer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__visualizationRenderer"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_visualizationRenderer"))->offset; return *reinterpret_cast<::UnityEngine::Renderer**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _defaultVisualNormalization [[deprecated("Use field access instead!")]] float& VROSC::WaveformVisualizer::dyn__defaultVisualNormalization() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__defaultVisualNormalization"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_defaultVisualNormalization"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _visualizationWindowLength [[deprecated("Use field access instead!")]] float& VROSC::WaveformVisualizer::dyn__visualizationWindowLength() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__visualizationWindowLength"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_visualizationWindowLength"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _currentVisualizationPixel [[deprecated("Use field access instead!")]] int& VROSC::WaveformVisualizer::dyn__currentVisualizationPixel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__currentVisualizationPixel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentVisualizationPixel"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _lastMeasuredPeakValue [[deprecated("Use field access instead!")]] float& VROSC::WaveformVisualizer::dyn__lastMeasuredPeakValue() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__lastMeasuredPeakValue"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lastMeasuredPeakValue"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _visualizationStartIndex [[deprecated("Use field access instead!")]] int& VROSC::WaveformVisualizer::dyn__visualizationStartIndex() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__visualizationStartIndex"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_visualizationStartIndex"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Texture2D _visualizationTexture [[deprecated("Use field access instead!")]] ::UnityEngine::Texture2D*& VROSC::WaveformVisualizer::dyn__visualizationTexture() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__visualizationTexture"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_visualizationTexture"))->offset; return *reinterpret_cast<::UnityEngine::Texture2D**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color[] _barColorArray [[deprecated("Use field access instead!")]] ::ArrayW<::UnityEngine::Color>& VROSC::WaveformVisualizer::dyn__barColorArray() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__barColorArray"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_barColorArray"))->offset; return *reinterpret_cast<::ArrayW<::UnityEngine::Color>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color[] _wipeColorArray [[deprecated("Use field access instead!")]] ::ArrayW<::UnityEngine::Color>& VROSC::WaveformVisualizer::dyn__wipeColorArray() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__wipeColorArray"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_wipeColorArray"))->offset; return *reinterpret_cast<::ArrayW<::UnityEngine::Color>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _pixelOverflow [[deprecated("Use field access instead!")]] float& VROSC::WaveformVisualizer::dyn__pixelOverflow() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::dyn__pixelOverflow"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_pixelOverflow"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.WaveformVisualizer.Setup void VROSC::WaveformVisualizer::Setup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.WaveformVisualizer.Clear void VROSC::WaveformVisualizer::Clear() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::Clear"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Clear", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.WaveformVisualizer.WipeTexture void VROSC::WaveformVisualizer::WipeTexture() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::WipeTexture"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WipeTexture", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.WaveformVisualizer.CreateVisualization void VROSC::WaveformVisualizer::CreateVisualization(::ArrayW<float> audioData, int startIndex, int endIndex) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::CreateVisualization"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreateVisualization", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(audioData), ::il2cpp_utils::ExtractType(startIndex), ::il2cpp_utils::ExtractType(endIndex)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, audioData, startIndex, endIndex); } // Autogenerated method: VROSC.WaveformVisualizer.UpdateVisualization void VROSC::WaveformVisualizer::UpdateVisualization(::ArrayW<float> newData, float elapsedTimeSeconds) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::UpdateVisualization"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateVisualization", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(newData), ::il2cpp_utils::ExtractType(elapsedTimeSeconds)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, newData, elapsedTimeSeconds); } // Autogenerated method: VROSC.WaveformVisualizer.GetVisualPower float VROSC::WaveformVisualizer::GetVisualPower(::ArrayW<float> audioData, int startIndex, int endIndex, float normalize) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::GetVisualPower"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetVisualPower", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(audioData), ::il2cpp_utils::ExtractType(startIndex), ::il2cpp_utils::ExtractType(endIndex), ::il2cpp_utils::ExtractType(normalize)}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method, audioData, startIndex, endIndex, normalize); } // Autogenerated method: VROSC.WaveformVisualizer.DrawPixelsToTexture void VROSC::WaveformVisualizer::DrawPixelsToTexture(int xPos, ::ArrayW<::UnityEngine::Color> colors) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WaveformVisualizer::DrawPixelsToTexture"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DrawPixelsToTexture", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(xPos), ::il2cpp_utils::ExtractType(colors)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, xPos, colors); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ToneGenerator #include "VROSC/ToneGenerator.hpp" // Including type: VROSC.ToneGenerator/VROSC.GeneratedTone #include "VROSC/ToneGenerator_GeneratedTone.hpp" // Including type: System.Collections.Generic.Dictionary`2 #include "System/Collections/Generic/Dictionary_2.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Double _gain [[deprecated("Use field access instead!")]] double& VROSC::ToneGenerator::dyn__gain() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::dyn__gain"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_gain"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _sampleRate [[deprecated("Use field access instead!")]] int& VROSC::ToneGenerator::dyn__sampleRate() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::dyn__sampleRate"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_sampleRate"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.Dictionary`2<System.Int32,VROSC.ToneGenerator/VROSC.GeneratedTone> _tones [[deprecated("Use field access instead!")]] ::System::Collections::Generic::Dictionary_2<int, ::VROSC::ToneGenerator::GeneratedTone*>*& VROSC::ToneGenerator::dyn__tones() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::dyn__tones"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tones"))->offset; return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<int, ::VROSC::ToneGenerator::GeneratedTone*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ToneGenerator.Update void VROSC::ToneGenerator::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::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: VROSC.ToneGenerator.OnAudioFilterRead void VROSC::ToneGenerator::OnAudioFilterRead(::ArrayW<float> data, int channels) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::OnAudioFilterRead"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnAudioFilterRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(data), ::il2cpp_utils::ExtractType(channels)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, data, channels); } // Autogenerated method: VROSC.ToneGenerator.PlayNote void VROSC::ToneGenerator::PlayNote(int midiNoteNumber) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::PlayNote"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PlayNote", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(midiNoteNumber)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, midiNoteNumber); } // Autogenerated method: VROSC.ToneGenerator.StopNote void VROSC::ToneGenerator::StopNote(int midiNoteNumber) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::StopNote"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopNote", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(midiNoteNumber)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, midiNoteNumber); } // Autogenerated method: VROSC.ToneGenerator.GetFrequencyFromMidiNumber double VROSC::ToneGenerator::GetFrequencyFromMidiNumber(int midiNoteNumber) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::GetFrequencyFromMidiNumber"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "ToneGenerator", "GetFrequencyFromMidiNumber", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(midiNoteNumber)}))); return ::il2cpp_utils::RunMethodRethrow<double, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, midiNoteNumber); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ToneGenerator/VROSC.GeneratedTone #include "VROSC/ToneGenerator_GeneratedTone.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.Double Frequency [[deprecated("Use field access instead!")]] double& VROSC::ToneGenerator::GeneratedTone::dyn_Frequency() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::GeneratedTone::dyn_Frequency"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Frequency"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Double Increment [[deprecated("Use field access instead!")]] double& VROSC::ToneGenerator::GeneratedTone::dyn_Increment() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::GeneratedTone::dyn_Increment"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Increment"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Double Phase [[deprecated("Use field access instead!")]] double& VROSC::ToneGenerator::GeneratedTone::dyn_Phase() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ToneGenerator::GeneratedTone::dyn_Phase"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Phase"))->offset; return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialBlinkingUIElement #include "VROSC/TutorialBlinkingUIElement.hpp" // Including type: VROSC.UI.UIInteractableColoring #include "VROSC/UI/UIInteractableColoring.hpp" // Including type: VROSC.TutorialVisualBlinking #include "VROSC/TutorialVisualBlinking.hpp" // Including type: UnityEngine.Color #include "UnityEngine/Color.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 VROSC.UI.UIInteractableColoring _target [[deprecated("Use field access instead!")]] ::VROSC::UI::UIInteractableColoring*& VROSC::TutorialBlinkingUIElement::dyn__target() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::dyn__target"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_target"))->offset; return *reinterpret_cast<::VROSC::UI::UIInteractableColoring**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isSetup [[deprecated("Use field access instead!")]] bool& VROSC::TutorialBlinkingUIElement::dyn__isSetup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::dyn__isSetup"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isSetup"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private readonly VROSC.TutorialVisualBlinking <Blinking>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::TutorialVisualBlinking*& VROSC::TutorialBlinkingUIElement::dyn_$Blinking$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::dyn_$Blinking$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Blinking>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::TutorialVisualBlinking**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialBlinkingUIElement.get_Blinking ::VROSC::TutorialVisualBlinking* VROSC::TutorialBlinkingUIElement::get_Blinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::get_Blinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Blinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::TutorialVisualBlinking*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialBlinkingUIElement.Start void VROSC::TutorialBlinkingUIElement::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::Start"); static 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: VROSC.TutorialBlinkingUIElement.Setup void VROSC::TutorialBlinkingUIElement::Setup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialBlinkingUIElement.GetNormalColor ::UnityEngine::Color VROSC::TutorialBlinkingUIElement::GetNormalColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::GetNormalColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNormalColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialBlinkingUIElement.GetCurrentColor ::UnityEngine::Color VROSC::TutorialBlinkingUIElement::GetCurrentColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::GetCurrentColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCurrentColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialBlinkingUIElement.OnEnable void VROSC::TutorialBlinkingUIElement::OnEnable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::OnEnable"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnEnable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialBlinkingUIElement.Update void VROSC::TutorialBlinkingUIElement::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::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: VROSC.TutorialBlinkingUIElement.TestOn void VROSC::TutorialBlinkingUIElement::TestOn() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::TestOn"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TestOn", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialBlinkingUIElement.TestOff void VROSC::TutorialBlinkingUIElement::TestOff() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialBlinkingUIElement::TestOff"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TestOff", 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: VROSC.TutorialVisualBlinking #include "VROSC/TutorialVisualBlinking.hpp" // Including type: System.Func`1 #include "System/Func_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Boolean <Active>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::TutorialVisualBlinking::dyn_$Active$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn_$Active$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Active>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _onColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::TutorialVisualBlinking::dyn__onColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__onColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_onColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _offColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::TutorialVisualBlinking::dyn__offColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__offColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_offColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _useNormalColorAsOffColor [[deprecated("Use field access instead!")]] bool& VROSC::TutorialVisualBlinking::dyn__useNormalColorAsOffColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__useNormalColorAsOffColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_useNormalColorAsOffColor"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _intensity [[deprecated("Use field access instead!")]] float& VROSC::TutorialVisualBlinking::dyn__intensity() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__intensity"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_intensity"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Func`1<UnityEngine.Color> _getNormalColor [[deprecated("Use field access instead!")]] ::System::Func_1<::UnityEngine::Color>*& VROSC::TutorialVisualBlinking::dyn__getNormalColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__getNormalColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_getNormalColor"))->offset; return *reinterpret_cast<::System::Func_1<::UnityEngine::Color>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Func`1<UnityEngine.Color> _getCurrentColor [[deprecated("Use field access instead!")]] ::System::Func_1<::UnityEngine::Color>*& VROSC::TutorialVisualBlinking::dyn__getCurrentColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__getCurrentColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_getCurrentColor"))->offset; return *reinterpret_cast<::System::Func_1<::UnityEngine::Color>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _startColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::TutorialVisualBlinking::dyn__startColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__startColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _startTime [[deprecated("Use field access instead!")]] float& VROSC::TutorialVisualBlinking::dyn__startTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__startTime"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startTime"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _peak [[deprecated("Use field access instead!")]] float& VROSC::TutorialVisualBlinking::dyn__peak() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__peak"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_peak"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _hasPeaked [[deprecated("Use field access instead!")]] bool& VROSC::TutorialVisualBlinking::dyn__hasPeaked() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__hasPeaked"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hasPeaked"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _stopping [[deprecated("Use field access instead!")]] bool& VROSC::TutorialVisualBlinking::dyn__stopping() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__stopping"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stopping"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _stoppingBeginTime [[deprecated("Use field access instead!")]] float& VROSC::TutorialVisualBlinking::dyn__stoppingBeginTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__stoppingBeginTime"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stoppingBeginTime"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _stoppingBeginColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::TutorialVisualBlinking::dyn__stoppingBeginColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__stoppingBeginColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stoppingBeginColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _stoppingEndTime [[deprecated("Use field access instead!")]] float& VROSC::TutorialVisualBlinking::dyn__stoppingEndTime() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::dyn__stoppingEndTime"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stoppingEndTime"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialVisualBlinking.get_Active bool VROSC::TutorialVisualBlinking::get_Active() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::get_Active"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Active", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialVisualBlinking.set_Active void VROSC::TutorialVisualBlinking::set_Active(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::set_Active"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Active", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.TutorialVisualBlinking.Setup void VROSC::TutorialVisualBlinking::Setup(::System::Func_1<::UnityEngine::Color>* getNormalColor, ::System::Func_1<::UnityEngine::Color>* getCurrentColor) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(getNormalColor), ::il2cpp_utils::ExtractType(getCurrentColor)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, getNormalColor, getCurrentColor); } // Autogenerated method: VROSC.TutorialVisualBlinking.Start void VROSC::TutorialVisualBlinking::Start(::UnityEngine::Color onColor, float intensity) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::Start"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(onColor), ::il2cpp_utils::ExtractType(intensity)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, onColor, intensity); } // Autogenerated method: VROSC.TutorialVisualBlinking.Start void VROSC::TutorialVisualBlinking::Start(::UnityEngine::Color onColor, ::UnityEngine::Color offColor) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::Start"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(onColor), ::il2cpp_utils::ExtractType(offColor)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, onColor, offColor); } // Autogenerated method: VROSC.TutorialVisualBlinking.SharedStart void VROSC::TutorialVisualBlinking::SharedStart() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::SharedStart"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SharedStart", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialVisualBlinking.Stop void VROSC::TutorialVisualBlinking::Stop(float fadeOverSeconds) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::Stop"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Stop", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(fadeOverSeconds)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, fadeOverSeconds); } // Autogenerated method: VROSC.TutorialVisualBlinking.GetColor ::UnityEngine::Color VROSC::TutorialVisualBlinking::GetColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::GetColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialVisualBlinking.SetToBeginningColor ::UnityEngine::Color VROSC::TutorialVisualBlinking::SetToBeginningColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::SetToBeginningColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetToBeginningColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialVisualBlinking.SetToBlinkingColor ::UnityEngine::Color VROSC::TutorialVisualBlinking::SetToBlinkingColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::SetToBlinkingColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetToBlinkingColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialVisualBlinking.SetToStoppingColor ::UnityEngine::Color VROSC::TutorialVisualBlinking::SetToStoppingColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialVisualBlinking::SetToStoppingColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetToStoppingColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.BoardTutorialHelper #include "VROSC/BoardTutorialHelper.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" // Including type: VROSC.TutorialBlinkingUIElement #include "VROSC/TutorialBlinkingUIElement.hpp" // Including type: VROSC.Interactable #include "VROSC/Interactable.hpp" // Including type: VROSC.NoteBoardNoteController #include "VROSC/NoteBoardNoteController.hpp" // Including type: VROSC.SynthController #include "VROSC/SynthController.hpp" // Including type: VROSC.Grabable #include "VROSC/Grabable.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.TutorialEvent #include "VROSC/TutorialEvent.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _interactablesParent [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::BoardTutorialHelper::dyn__interactablesParent() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__interactablesParent"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_interactablesParent"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement[] _soundButtonBlinkers [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::TutorialBlinkingUIElement*>& VROSC::BoardTutorialHelper::dyn__soundButtonBlinkers() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__soundButtonBlinkers"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_soundButtonBlinkers"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::TutorialBlinkingUIElement*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _closeButtonBlink [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::BoardTutorialHelper::dyn__closeButtonBlink() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__closeButtonBlink"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeButtonBlink"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable[] _soundButtonInteractables [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::Interactable*>& VROSC::BoardTutorialHelper::dyn__soundButtonInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__soundButtonInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_soundButtonInteractables"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::Interactable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable[] _tempoSyncInteractables [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::Interactable*>& VROSC::BoardTutorialHelper::dyn__tempoSyncInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__tempoSyncInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tempoSyncInteractables"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::Interactable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _closeButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::BoardTutorialHelper::dyn__closeButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__closeButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.NoteBoardNoteController _noteController [[deprecated("Use field access instead!")]] ::VROSC::NoteBoardNoteController*& VROSC::BoardTutorialHelper::dyn__noteController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__noteController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_noteController"))->offset; return *reinterpret_cast<::VROSC::NoteBoardNoteController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.SynthController _boardController [[deprecated("Use field access instead!")]] ::VROSC::SynthController*& VROSC::BoardTutorialHelper::dyn__boardController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__boardController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_boardController"))->offset; return *reinterpret_cast<::VROSC::SynthController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Grabable _boardGrabable [[deprecated("Use field access instead!")]] ::VROSC::Grabable*& VROSC::BoardTutorialHelper::dyn__boardGrabable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__boardGrabable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_boardGrabable"))->offset; return *reinterpret_cast<::VROSC::Grabable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.Interactable> _disabledInteractables [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::Interactable*>*& VROSC::BoardTutorialHelper::dyn__disabledInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::dyn__disabledInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_disabledInteractables"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::Interactable*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.BoardTutorialHelper.Start void VROSC::BoardTutorialHelper::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::Start"); static 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: VROSC.BoardTutorialHelper.TutorialEventTriggered void VROSC::BoardTutorialHelper::TutorialEventTriggered(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::TutorialEventTriggered"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialEventTriggered", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.BoardTutorialHelper.SoundButtonsUsed void VROSC::BoardTutorialHelper::SoundButtonsUsed(bool used) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::SoundButtonsUsed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SoundButtonsUsed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(used)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, used); } // Autogenerated method: VROSC.BoardTutorialHelper.DisableAllInteractables void VROSC::BoardTutorialHelper::DisableAllInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::DisableAllInteractables"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisableAllInteractables", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.BoardTutorialHelper.ResetAll void VROSC::BoardTutorialHelper::ResetAll() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::ResetAll"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ResetAll", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.BoardTutorialHelper.BoardToggledAfterCloseEnabled void VROSC::BoardTutorialHelper::BoardToggledAfterCloseEnabled(bool active) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::BoardToggledAfterCloseEnabled"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BoardToggledAfterCloseEnabled", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(active)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, active); } // Autogenerated method: VROSC.BoardTutorialHelper.BoardGrabbed void VROSC::BoardTutorialHelper::BoardGrabbed(bool grabbed) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BoardTutorialHelper::BoardGrabbed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BoardGrabbed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(grabbed)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, grabbed); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.DashboardTutorialHelper #include "VROSC/DashboardTutorialHelper.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" // Including type: VROSC.TutorialBlinkingUIElement #include "VROSC/TutorialBlinkingUIElement.hpp" // Including type: VROSC.Interactable #include "VROSC/Interactable.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.TutorialEvent #include "VROSC/TutorialEvent.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _interactablesParent [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::DashboardTutorialHelper::dyn__interactablesParent() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__interactablesParent"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_interactablesParent"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _boardButtonBlink [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::DashboardTutorialHelper::dyn__boardButtonBlink() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__boardButtonBlink"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_boardButtonBlink"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _boardButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::DashboardTutorialHelper::dyn__boardButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__boardButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_boardButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _empadsButtonBlink [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::DashboardTutorialHelper::dyn__empadsButtonBlink() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__empadsButtonBlink"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_empadsButtonBlink"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _empadsButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::DashboardTutorialHelper::dyn__empadsButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__empadsButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_empadsButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _looperButtonBlink [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::DashboardTutorialHelper::dyn__looperButtonBlink() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__looperButtonBlink"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_looperButtonBlink"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _looperButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::DashboardTutorialHelper::dyn__looperButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__looperButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_looperButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _libraryButtonBlink [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::DashboardTutorialHelper::dyn__libraryButtonBlink() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__libraryButtonBlink"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_libraryButtonBlink"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _libraryButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::DashboardTutorialHelper::dyn__libraryButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__libraryButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_libraryButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.Interactable> _disabledInteractables [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::Interactable*>*& VROSC::DashboardTutorialHelper::dyn__disabledInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::dyn__disabledInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_disabledInteractables"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::Interactable*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.DashboardTutorialHelper.Start void VROSC::DashboardTutorialHelper::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::Start"); static 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: VROSC.DashboardTutorialHelper.TutorialEventTriggered void VROSC::DashboardTutorialHelper::TutorialEventTriggered(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::TutorialEventTriggered"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialEventTriggered", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.DashboardTutorialHelper.BoardButtonClicked void VROSC::DashboardTutorialHelper::BoardButtonClicked(bool clicked) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::BoardButtonClicked"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BoardButtonClicked", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(clicked)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, clicked); } // Autogenerated method: VROSC.DashboardTutorialHelper.DisableAllInteractables void VROSC::DashboardTutorialHelper::DisableAllInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::DisableAllInteractables"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisableAllInteractables", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.DisableBoardButton void VROSC::DashboardTutorialHelper::DisableBoardButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::DisableBoardButton"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisableBoardButton", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.EnableBoardButton void VROSC::DashboardTutorialHelper::EnableBoardButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::EnableBoardButton"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnableBoardButton", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.EnableEmpadsButton void VROSC::DashboardTutorialHelper::EnableEmpadsButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::EnableEmpadsButton"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnableEmpadsButton", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.StartBoardButtonBlinking void VROSC::DashboardTutorialHelper::StartBoardButtonBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::StartBoardButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartBoardButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.EnableLooperButton void VROSC::DashboardTutorialHelper::EnableLooperButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::EnableLooperButton"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnableLooperButton", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.EnableLibraryButton void VROSC::DashboardTutorialHelper::EnableLibraryButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::EnableLibraryButton"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnableLibraryButton", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.StartLibraryButtonBlinking void VROSC::DashboardTutorialHelper::StartLibraryButtonBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::StartLibraryButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartLibraryButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.LooperButtonPressed void VROSC::DashboardTutorialHelper::LooperButtonPressed(bool enabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::LooperButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "LooperButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(enabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, enabled); } // Autogenerated method: VROSC.DashboardTutorialHelper.StartLooperButtonBlinking void VROSC::DashboardTutorialHelper::StartLooperButtonBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::StartLooperButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartLooperButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.StopBoardButtonBlinking void VROSC::DashboardTutorialHelper::StopBoardButtonBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::StopBoardButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopBoardButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.DashboardTutorialHelper.EmpadsButtonPressed void VROSC::DashboardTutorialHelper::EmpadsButtonPressed(bool enabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::EmpadsButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EmpadsButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(enabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, enabled); } // Autogenerated method: VROSC.DashboardTutorialHelper.LibraryButtonPressed void VROSC::DashboardTutorialHelper::LibraryButtonPressed(bool enabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::LibraryButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "LibraryButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(enabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, enabled); } // Autogenerated method: VROSC.DashboardTutorialHelper.BoardOpenedAgain void VROSC::DashboardTutorialHelper::BoardOpenedAgain(bool enabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::BoardOpenedAgain"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BoardOpenedAgain", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(enabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, enabled); } // Autogenerated method: VROSC.DashboardTutorialHelper.ResetAll void VROSC::DashboardTutorialHelper::ResetAll() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DashboardTutorialHelper::ResetAll"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ResetAll", 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: VROSC.EmpadsTutorialHelper #include "VROSC/EmpadsTutorialHelper.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" // Including type: VROSC.TutorialBlinkingUIElement #include "VROSC/TutorialBlinkingUIElement.hpp" // Including type: VROSC.DrumPadEffectOnSignal #include "VROSC/DrumPadEffectOnSignal.hpp" // Including type: VROSC.Interactable #include "VROSC/Interactable.hpp" // Including type: VROSC.ModularDrumsController #include "VROSC/ModularDrumsController.hpp" // Including type: VROSC.ModularDrumpads #include "VROSC/ModularDrumpads.hpp" // Including type: UnityEngine.AudioClip #include "UnityEngine/AudioClip.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.TutorialEvent #include "VROSC/TutorialEvent.hpp" // Including type: VROSC.PatchSettings #include "VROSC/PatchSettings.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _interactablesParent [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::EmpadsTutorialHelper::dyn__interactablesParent() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__interactablesParent"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_interactablesParent"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement[] _tempoSyncButtonBlinkers [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::TutorialBlinkingUIElement*>& VROSC::EmpadsTutorialHelper::dyn__tempoSyncButtonBlinkers() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__tempoSyncButtonBlinkers"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tempoSyncButtonBlinkers"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::TutorialBlinkingUIElement*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.DrumPadEffectOnSignal[] _drumpadEffects [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::DrumPadEffectOnSignal*>& VROSC::EmpadsTutorialHelper::dyn__drumpadEffects() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__drumpadEffects"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_drumpadEffects"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::DrumPadEffectOnSignal*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable[] _drumpadSpawners [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::Interactable*>& VROSC::EmpadsTutorialHelper::dyn__drumpadSpawners() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__drumpadSpawners"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_drumpadSpawners"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::Interactable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable[] _tempoSyncButtonInteractables [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::Interactable*>& VROSC::EmpadsTutorialHelper::dyn__tempoSyncButtonInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__tempoSyncButtonInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tempoSyncButtonInteractables"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::Interactable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _closeButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::EmpadsTutorialHelper::dyn__closeButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__closeButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.ModularDrumsController _empadsController [[deprecated("Use field access instead!")]] ::VROSC::ModularDrumsController*& VROSC::EmpadsTutorialHelper::dyn__empadsController() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__empadsController"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_empadsController"))->offset; return *reinterpret_cast<::VROSC::ModularDrumsController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.ModularDrumpads _empads [[deprecated("Use field access instead!")]] ::VROSC::ModularDrumpads*& VROSC::EmpadsTutorialHelper::dyn__empads() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__empads"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_empads"))->offset; return *reinterpret_cast<::VROSC::ModularDrumpads**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioClip _cowbellClip [[deprecated("Use field access instead!")]] ::UnityEngine::AudioClip*& VROSC::EmpadsTutorialHelper::dyn__cowbellClip() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__cowbellClip"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_cowbellClip"))->offset; return *reinterpret_cast<::UnityEngine::AudioClip**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.Interactable> _disabledInteractables [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::Interactable*>*& VROSC::EmpadsTutorialHelper::dyn__disabledInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__disabledInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_disabledInteractables"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::Interactable*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _countSpawnedPads [[deprecated("Use field access instead!")]] bool& VROSC::EmpadsTutorialHelper::dyn__countSpawnedPads() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__countSpawnedPads"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_countSpawnedPads"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _waitingForSyncDivider [[deprecated("Use field access instead!")]] int& VROSC::EmpadsTutorialHelper::dyn__waitingForSyncDivider() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__waitingForSyncDivider"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_waitingForSyncDivider"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _padsHighlighted [[deprecated("Use field access instead!")]] bool& VROSC::EmpadsTutorialHelper::dyn__padsHighlighted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__padsHighlighted"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_padsHighlighted"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _recordingFirstRecording [[deprecated("Use field access instead!")]] bool& VROSC::EmpadsTutorialHelper::dyn__recordingFirstRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::dyn__recordingFirstRecording"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_recordingFirstRecording"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.EmpadsTutorialHelper.Start void VROSC::EmpadsTutorialHelper::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::Start"); static 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: VROSC.EmpadsTutorialHelper.Update void VROSC::EmpadsTutorialHelper::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::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: VROSC.EmpadsTutorialHelper.TutorialEventTriggered void VROSC::EmpadsTutorialHelper::TutorialEventTriggered(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::TutorialEventTriggered"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialEventTriggered", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.EmpadsTutorialHelper.StartHighlightPads void VROSC::EmpadsTutorialHelper::StartHighlightPads() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::StartHighlightPads"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartHighlightPads", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.StartHighlightPadsWithText void VROSC::EmpadsTutorialHelper::StartHighlightPadsWithText() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::StartHighlightPadsWithText"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartHighlightPadsWithText", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.StopHighlightPads void VROSC::EmpadsTutorialHelper::StopHighlightPads(::VROSC::WidgetSettings::Identifier id, ::VROSC::PatchSettings* settings) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::StopHighlightPads"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopHighlightPads", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(id), ::il2cpp_utils::ExtractType(settings)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, id, settings); } // Autogenerated method: VROSC.EmpadsTutorialHelper.StopHighlightPads void VROSC::EmpadsTutorialHelper::StopHighlightPads() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::StopHighlightPads"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopHighlightPads", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.StopHighlightPadsWithText void VROSC::EmpadsTutorialHelper::StopHighlightPadsWithText() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::StopHighlightPadsWithText"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopHighlightPadsWithText", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.EnableEmpadExtraction void VROSC::EmpadsTutorialHelper::EnableEmpadExtraction() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::EnableEmpadExtraction"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnableEmpadExtraction", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.EnableTempoSync void VROSC::EmpadsTutorialHelper::EnableTempoSync() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::EnableTempoSync"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnableTempoSync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.WaitForQuarterSync void VROSC::EmpadsTutorialHelper::WaitForQuarterSync() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::WaitForQuarterSync"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WaitForQuarterSync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.WaitForSixteenthSync void VROSC::EmpadsTutorialHelper::WaitForSixteenthSync() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::WaitForSixteenthSync"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WaitForSixteenthSync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.DisableTempoSync void VROSC::EmpadsTutorialHelper::DisableTempoSync() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::DisableTempoSync"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisableTempoSync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.StartTempoSyncBlinking void VROSC::EmpadsTutorialHelper::StartTempoSyncBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::StartTempoSyncBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartTempoSyncBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.StopTempoSyncBlinking void VROSC::EmpadsTutorialHelper::StopTempoSyncBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::StopTempoSyncBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopTempoSyncBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.TempoSyncButtonsUsed void VROSC::EmpadsTutorialHelper::TempoSyncButtonsUsed(bool used) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::TempoSyncButtonsUsed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TempoSyncButtonsUsed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(used)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, used); } // Autogenerated method: VROSC.EmpadsTutorialHelper.DisableAllInteractables void VROSC::EmpadsTutorialHelper::DisableAllInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::DisableAllInteractables"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisableAllInteractables", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.ResetAll void VROSC::EmpadsTutorialHelper::ResetAll() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::ResetAll"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ResetAll", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.EmpadsTutorialHelper.LoopStationRecorderStateChanged void VROSC::EmpadsTutorialHelper::LoopStationRecorderStateChanged(::VROSC::LoopStationRecorder::RecordingState state) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::LoopStationRecorderStateChanged"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "LoopStationRecorderStateChanged", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, state); } // Autogenerated method: VROSC.EmpadsTutorialHelper.DrumSamplePlayed void VROSC::EmpadsTutorialHelper::DrumSamplePlayed(::UnityEngine::AudioClip* audioClip) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::EmpadsTutorialHelper::DrumSamplePlayed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DrumSamplePlayed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(audioClip)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, audioClip); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.LooperTutorialHelper #include "VROSC/LooperTutorialHelper.hpp" // Including type: VROSC.Interactable #include "VROSC/Interactable.hpp" // Including type: VROSC.LoopStationLoopHandler #include "VROSC/LoopStationLoopHandler.hpp" // Including type: VROSC.TutorialBlinkingUIElement #include "VROSC/TutorialBlinkingUIElement.hpp" // Including type: VROSC.InstrumentSettings #include "VROSC/InstrumentSettings.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.TutorialEvent #include "VROSC/TutorialEvent.hpp" // Including type: VROSC.LoopPlayer #include "VROSC/LoopPlayer.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 VROSC.Interactable[] _interactablesToDisable [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::Interactable*>& VROSC::LooperTutorialHelper::dyn__interactablesToDisable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::dyn__interactablesToDisable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_interactablesToDisable"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::Interactable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.LoopStationLoopHandler _loopHandler [[deprecated("Use field access instead!")]] ::VROSC::LoopStationLoopHandler*& VROSC::LooperTutorialHelper::dyn__loopHandler() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::dyn__loopHandler"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_loopHandler"))->offset; return *reinterpret_cast<::VROSC::LoopStationLoopHandler**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _rerecordBlinker [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::LooperTutorialHelper::dyn__rerecordBlinker() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::dyn__rerecordBlinker"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rerecordBlinker"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InstrumentSettings _boardSettings [[deprecated("Use field access instead!")]] ::VROSC::InstrumentSettings*& VROSC::LooperTutorialHelper::dyn__boardSettings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::dyn__boardSettings"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_boardSettings"))->offset; return *reinterpret_cast<::VROSC::InstrumentSettings**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.Interactable> _disabledInteractables [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::Interactable*>*& VROSC::LooperTutorialHelper::dyn__disabledInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::dyn__disabledInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_disabledInteractables"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::Interactable*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _waitingForFirstRecording [[deprecated("Use field access instead!")]] bool& VROSC::LooperTutorialHelper::dyn__waitingForFirstRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::dyn__waitingForFirstRecording"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_waitingForFirstRecording"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.LooperTutorialHelper.Start void VROSC::LooperTutorialHelper::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::Start"); static 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: VROSC.LooperTutorialHelper.TutorialEventTriggered void VROSC::LooperTutorialHelper::TutorialEventTriggered(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::TutorialEventTriggered"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialEventTriggered", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.LooperTutorialHelper.WaitForFirstRecording void VROSC::LooperTutorialHelper::WaitForFirstRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::WaitForFirstRecording"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WaitForFirstRecording", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.LooperTutorialHelper.FirstLoopRecorded void VROSC::LooperTutorialHelper::FirstLoopRecorded(::VROSC::LoopPlayer* loopPlayer) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::FirstLoopRecorded"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FirstLoopRecorded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(loopPlayer)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, loopPlayer); } // Autogenerated method: VROSC.LooperTutorialHelper.AdditionalLoopRecorded void VROSC::LooperTutorialHelper::AdditionalLoopRecorded(::VROSC::LoopPlayer* loopPlayer) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::AdditionalLoopRecorded"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AdditionalLoopRecorded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(loopPlayer)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, loopPlayer); } // Autogenerated method: VROSC.LooperTutorialHelper.RerecordStarted void VROSC::LooperTutorialHelper::RerecordStarted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::RerecordStarted"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RerecordStarted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.LooperTutorialHelper.DisableAllInteractables void VROSC::LooperTutorialHelper::DisableAllInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::DisableAllInteractables"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisableAllInteractables", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.LooperTutorialHelper.ResetAll void VROSC::LooperTutorialHelper::ResetAll() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::LooperTutorialHelper::ResetAll"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ResetAll", 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: VROSC.SongLibraryTutorialHelper #include "VROSC/SongLibraryTutorialHelper.hpp" // Including type: VROSC.Interactable #include "VROSC/Interactable.hpp" // Including type: VROSC.TutorialBlinkingUIElement #include "VROSC/TutorialBlinkingUIElement.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.TutorialEvent #include "VROSC/TutorialEvent.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 VROSC.Interactable[] _interactablesToDisable [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::Interactable*>& VROSC::SongLibraryTutorialHelper::dyn__interactablesToDisable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__interactablesToDisable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_interactablesToDisable"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::Interactable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _saveButtonBlinker [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::SongLibraryTutorialHelper::dyn__saveButtonBlinker() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__saveButtonBlinker"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_saveButtonBlinker"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _songNameBlinker [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::SongLibraryTutorialHelper::dyn__songNameBlinker() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__songNameBlinker"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_songNameBlinker"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _saveAsButtonBlinker [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::SongLibraryTutorialHelper::dyn__saveAsButtonBlinker() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__saveAsButtonBlinker"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_saveAsButtonBlinker"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _saveButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::SongLibraryTutorialHelper::dyn__saveButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__saveButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_saveButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _songNameInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::SongLibraryTutorialHelper::dyn__songNameInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__songNameInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_songNameInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Interactable _saveAsButtonInteractable [[deprecated("Use field access instead!")]] ::VROSC::Interactable*& VROSC::SongLibraryTutorialHelper::dyn__saveAsButtonInteractable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__saveAsButtonInteractable"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_saveAsButtonInteractable"))->offset; return *reinterpret_cast<::VROSC::Interactable**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.Interactable> _disabledInteractables [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::Interactable*>*& VROSC::SongLibraryTutorialHelper::dyn__disabledInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::dyn__disabledInteractables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_disabledInteractables"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::Interactable*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.SongLibraryTutorialHelper.Start void VROSC::SongLibraryTutorialHelper::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::Start"); static 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: VROSC.SongLibraryTutorialHelper.TutorialEventTriggered void VROSC::SongLibraryTutorialHelper::TutorialEventTriggered(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::TutorialEventTriggered"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialEventTriggered", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.SongLibraryTutorialHelper.DisableInteractables void VROSC::SongLibraryTutorialHelper::DisableInteractables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::DisableInteractables"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisableInteractables", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SongLibraryTutorialHelper.StartBlinkSaveButtons void VROSC::SongLibraryTutorialHelper::StartBlinkSaveButtons() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::StartBlinkSaveButtons"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartBlinkSaveButtons", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.SongLibraryTutorialHelper.SaveButtonClicked void VROSC::SongLibraryTutorialHelper::SaveButtonClicked(bool enabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::SaveButtonClicked"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SaveButtonClicked", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(enabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, enabled); } // Autogenerated method: VROSC.SongLibraryTutorialHelper.SongNameClicked void VROSC::SongLibraryTutorialHelper::SongNameClicked(bool enabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::SongNameClicked"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SongNameClicked", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(enabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, enabled); } // Autogenerated method: VROSC.SongLibraryTutorialHelper.SaveAsButtonClicked void VROSC::SongLibraryTutorialHelper::SaveAsButtonClicked(bool enabled) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::SaveAsButtonClicked"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SaveAsButtonClicked", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(enabled)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, enabled); } // Autogenerated method: VROSC.SongLibraryTutorialHelper.ResetAll void VROSC::SongLibraryTutorialHelper::ResetAll() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::SongLibraryTutorialHelper::ResetAll"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ResetAll", 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: VROSC.Tutorial #include "VROSC/Tutorial.hpp" // Including type: VROSC.TutorialStep #include "VROSC/TutorialStep.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.String _id [[deprecated("Use field access instead!")]] ::StringW& VROSC::Tutorial::dyn__id() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Tutorial::dyn__id"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_id"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialStep[] _steps [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::TutorialStep*>& VROSC::Tutorial::dyn__steps() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Tutorial::dyn__steps"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_steps"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::TutorialStep*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.Tutorial.get_Id ::StringW VROSC::Tutorial::get_Id() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Tutorial::get_Id"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Id", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.Tutorial.get_Steps ::ArrayW<::VROSC::TutorialStep*> VROSC::Tutorial::get_Steps() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Tutorial::get_Steps"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Steps", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::ArrayW<::VROSC::TutorialStep*>, false>(this, ___internal__method); } // Autogenerated method: VROSC.Tutorial.GetStepIndex int VROSC::Tutorial::GetStepIndex(::VROSC::TutorialStep* step) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::Tutorial::GetStepIndex"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetStepIndex", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(step)}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, step); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialCondition #include "VROSC/TutorialCondition.hpp" // Including type: TMPro.TextMeshPro #include "TMPro/TextMeshPro.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" // Including type: VROSC.TutorialStep/VROSC.Condition #include "VROSC/TutorialStep_Condition.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private TMPro.TextMeshPro _conditionText [[deprecated("Use field access instead!")]] ::TMPro::TextMeshPro*& VROSC::TutorialCondition::dyn__conditionText() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::dyn__conditionText"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditionText"))->offset; return *reinterpret_cast<::TMPro::TextMeshPro**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _incompleteIcon [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TutorialCondition::dyn__incompleteIcon() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::dyn__incompleteIcon"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_incompleteIcon"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _completeIcon [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TutorialCondition::dyn__completeIcon() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::dyn__completeIcon"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_completeIcon"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _conditionTextIncompleteColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::TutorialCondition::dyn__conditionTextIncompleteColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::dyn__conditionTextIncompleteColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditionTextIncompleteColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _conditionTextCompleteColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::TutorialCondition::dyn__conditionTextCompleteColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::dyn__conditionTextCompleteColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditionTextCompleteColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialStep/VROSC.Condition _condition [[deprecated("Use field access instead!")]] ::VROSC::TutorialStep::Condition*& VROSC::TutorialCondition::dyn__condition() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::dyn__condition"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_condition"))->offset; return *reinterpret_cast<::VROSC::TutorialStep::Condition**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialCondition.SetupTutorialStep void VROSC::TutorialCondition::SetupTutorialStep(::VROSC::TutorialStep::Condition* condition) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::SetupTutorialStep"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetupTutorialStep", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(condition)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, condition); } // Autogenerated method: VROSC.TutorialCondition.Deactivate void VROSC::TutorialCondition::Deactivate() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::Deactivate"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Deactivate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialCondition.DisplayConditionText void VROSC::TutorialCondition::DisplayConditionText(bool conditionComplete) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::DisplayConditionText"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisplayConditionText", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(conditionComplete)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, conditionComplete); } // Autogenerated method: VROSC.TutorialCondition.ConditionCompleted void VROSC::TutorialCondition::ConditionCompleted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCondition::ConditionCompleted"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ConditionCompleted", 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: VROSC.TutorialEvent #include "VROSC/TutorialEvent.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 VROSC.TutorialEvent None ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_None() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_None"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "None")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent None void VROSC::TutorialEvent::_set_None(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_None"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "None", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent DisableAllDashboardInteractibles ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_DisableAllDashboardInteractibles() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_DisableAllDashboardInteractibles"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "DisableAllDashboardInteractibles")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent DisableAllDashboardInteractibles void VROSC::TutorialEvent::_set_DisableAllDashboardInteractibles(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_DisableAllDashboardInteractibles"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "DisableAllDashboardInteractibles", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableBoardButton ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableBoardButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableBoardButton"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableBoardButton")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableBoardButton void VROSC::TutorialEvent::_set_EnableBoardButton(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableBoardButton"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableBoardButton", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StartBoardButtonBlinking ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StartBoardButtonBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StartBoardButtonBlinking"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StartBoardButtonBlinking")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StartBoardButtonBlinking void VROSC::TutorialEvent::_set_StartBoardButtonBlinking(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StartBoardButtonBlinking"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StartBoardButtonBlinking", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StopBoardButtonBlinking ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StopBoardButtonBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StopBoardButtonBlinking"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StopBoardButtonBlinking")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StopBoardButtonBlinking void VROSC::TutorialEvent::_set_StopBoardButtonBlinking(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StopBoardButtonBlinking"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StopBoardButtonBlinking", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent ResetAll ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_ResetAll() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_ResetAll"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "ResetAll")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent ResetAll void VROSC::TutorialEvent::_set_ResetAll(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_ResetAll"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "ResetAll", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent BoardOpened ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_BoardOpened() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_BoardOpened"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "BoardOpened")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent BoardOpened void VROSC::TutorialEvent::_set_BoardOpened(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_BoardOpened"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "BoardOpened", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent DisableDashboardButton ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_DisableDashboardButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_DisableDashboardButton"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "DisableDashboardButton")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent DisableDashboardButton void VROSC::TutorialEvent::_set_DisableDashboardButton(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_DisableDashboardButton"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "DisableDashboardButton", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableDashboardButton ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableDashboardButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableDashboardButton"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableDashboardButton")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableDashboardButton void VROSC::TutorialEvent::_set_EnableDashboardButton(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableDashboardButton"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableDashboardButton", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent DisableGrab ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_DisableGrab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_DisableGrab"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "DisableGrab")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent DisableGrab void VROSC::TutorialEvent::_set_DisableGrab(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_DisableGrab"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "DisableGrab", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableGrab ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableGrab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableGrab"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableGrab")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableGrab void VROSC::TutorialEvent::_set_EnableGrab(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableGrab"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableGrab", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent HideBoardControlPanel ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_HideBoardControlPanel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_HideBoardControlPanel"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "HideBoardControlPanel")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent HideBoardControlPanel void VROSC::TutorialEvent::_set_HideBoardControlPanel(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_HideBoardControlPanel"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "HideBoardControlPanel", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent ShowBoardControlPanel ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_ShowBoardControlPanel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_ShowBoardControlPanel"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "ShowBoardControlPanel")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent ShowBoardControlPanel void VROSC::TutorialEvent::_set_ShowBoardControlPanel(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_ShowBoardControlPanel"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "ShowBoardControlPanel", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StartBoardNotesBlinking ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StartBoardNotesBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StartBoardNotesBlinking"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StartBoardNotesBlinking")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StartBoardNotesBlinking void VROSC::TutorialEvent::_set_StartBoardNotesBlinking(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StartBoardNotesBlinking"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StartBoardNotesBlinking", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StopBoardNotesBlinking ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StopBoardNotesBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StopBoardNotesBlinking"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StopBoardNotesBlinking")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StopBoardNotesBlinking void VROSC::TutorialEvent::_set_StopBoardNotesBlinking(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StopBoardNotesBlinking"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StopBoardNotesBlinking", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent WaitForMoreBoardNotes ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_WaitForMoreBoardNotes() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_WaitForMoreBoardNotes"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "WaitForMoreBoardNotes")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent WaitForMoreBoardNotes void VROSC::TutorialEvent::_set_WaitForMoreBoardNotes(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_WaitForMoreBoardNotes"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "WaitForMoreBoardNotes", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableBoardSoundChange ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableBoardSoundChange() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableBoardSoundChange"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableBoardSoundChange")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableBoardSoundChange void VROSC::TutorialEvent::_set_EnableBoardSoundChange(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableBoardSoundChange"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableBoardSoundChange", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableBoardCloseButton ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableBoardCloseButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableBoardCloseButton"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableBoardCloseButton")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableBoardCloseButton void VROSC::TutorialEvent::_set_EnableBoardCloseButton(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableBoardCloseButton"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableBoardCloseButton", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent BoardClosed ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_BoardClosed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_BoardClosed"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "BoardClosed")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent BoardClosed void VROSC::TutorialEvent::_set_BoardClosed(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_BoardClosed"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "BoardClosed", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EmpadsFirstOpened ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EmpadsFirstOpened() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EmpadsFirstOpened"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EmpadsFirstOpened")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EmpadsFirstOpened void VROSC::TutorialEvent::_set_EmpadsFirstOpened(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EmpadsFirstOpened"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EmpadsFirstOpened", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StartHighlightPads ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StartHighlightPads() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StartHighlightPads"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StartHighlightPads")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StartHighlightPads void VROSC::TutorialEvent::_set_StartHighlightPads(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StartHighlightPads"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StartHighlightPads", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableEmpadExtraction ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableEmpadExtraction() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableEmpadExtraction"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableEmpadExtraction")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableEmpadExtraction void VROSC::TutorialEvent::_set_EnableEmpadExtraction(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableEmpadExtraction"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableEmpadExtraction", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent PadsSpawned ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_PadsSpawned() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_PadsSpawned"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "PadsSpawned")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent PadsSpawned void VROSC::TutorialEvent::_set_PadsSpawned(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_PadsSpawned"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "PadsSpawned", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableTempoSync ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableTempoSync() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableTempoSync"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableTempoSync")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableTempoSync void VROSC::TutorialEvent::_set_EnableTempoSync(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableTempoSync"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableTempoSync", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent WaitForQuarterSync ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_WaitForQuarterSync() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_WaitForQuarterSync"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "WaitForQuarterSync")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent WaitForQuarterSync void VROSC::TutorialEvent::_set_WaitForQuarterSync(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_WaitForQuarterSync"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "WaitForQuarterSync", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent TempoSetToQuarter ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_TempoSetToQuarter() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_TempoSetToQuarter"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "TempoSetToQuarter")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent TempoSetToQuarter void VROSC::TutorialEvent::_set_TempoSetToQuarter(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_TempoSetToQuarter"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "TempoSetToQuarter", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent WaitForSixteenthSync ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_WaitForSixteenthSync() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_WaitForSixteenthSync"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "WaitForSixteenthSync")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent WaitForSixteenthSync void VROSC::TutorialEvent::_set_WaitForSixteenthSync(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_WaitForSixteenthSync"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "WaitForSixteenthSync", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent TempoSetToSixteenth ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_TempoSetToSixteenth() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_TempoSetToSixteenth"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "TempoSetToSixteenth")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent TempoSetToSixteenth void VROSC::TutorialEvent::_set_TempoSetToSixteenth(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_TempoSetToSixteenth"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "TempoSetToSixteenth", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableLooperButton ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableLooperButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableLooperButton"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableLooperButton")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableLooperButton void VROSC::TutorialEvent::_set_EnableLooperButton(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableLooperButton"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableLooperButton", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent LooperOpened ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_LooperOpened() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_LooperOpened"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "LooperOpened")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent LooperOpened void VROSC::TutorialEvent::_set_LooperOpened(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_LooperOpened"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "LooperOpened", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent WaitForFirstRecording ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_WaitForFirstRecording() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_WaitForFirstRecording"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "WaitForFirstRecording")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent WaitForFirstRecording void VROSC::TutorialEvent::_set_WaitForFirstRecording(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_WaitForFirstRecording"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "WaitForFirstRecording", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent FirstLoopRecorded ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_FirstLoopRecorded() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_FirstLoopRecorded"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "FirstLoopRecorded")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent FirstLoopRecorded void VROSC::TutorialEvent::_set_FirstLoopRecorded(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_FirstLoopRecorded"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "FirstLoopRecorded", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StartRerecordBlinking ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StartRerecordBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StartRerecordBlinking"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StartRerecordBlinking")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StartRerecordBlinking void VROSC::TutorialEvent::_set_StartRerecordBlinking(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StartRerecordBlinking"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StartRerecordBlinking", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StopRerecordBlinking ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StopRerecordBlinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StopRerecordBlinking"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StopRerecordBlinking")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StopRerecordBlinking void VROSC::TutorialEvent::_set_StopRerecordBlinking(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StopRerecordBlinking"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StopRerecordBlinking", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableBoardButtonAgain ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableBoardButtonAgain() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableBoardButtonAgain"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableBoardButtonAgain")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableBoardButtonAgain void VROSC::TutorialEvent::_set_EnableBoardButtonAgain(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableBoardButtonAgain"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableBoardButtonAgain", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent BoardRecorded ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_BoardRecorded() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_BoardRecorded"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "BoardRecorded")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent BoardRecorded void VROSC::TutorialEvent::_set_BoardRecorded(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_BoardRecorded"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "BoardRecorded", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent EnableSongLibraryButton ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_EnableSongLibraryButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_EnableSongLibraryButton"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "EnableSongLibraryButton")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent EnableSongLibraryButton void VROSC::TutorialEvent::_set_EnableSongLibraryButton(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_EnableSongLibraryButton"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "EnableSongLibraryButton", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent SongLibraryOpened ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_SongLibraryOpened() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_SongLibraryOpened"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "SongLibraryOpened")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent SongLibraryOpened void VROSC::TutorialEvent::_set_SongLibraryOpened(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_SongLibraryOpened"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "SongLibraryOpened", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent StartBlinkSaveButtons ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_StartBlinkSaveButtons() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_StartBlinkSaveButtons"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "StartBlinkSaveButtons")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent StartBlinkSaveButtons void VROSC::TutorialEvent::_set_StartBlinkSaveButtons(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_StartBlinkSaveButtons"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "StartBlinkSaveButtons", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent DisableSongLibraryInteracables ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_DisableSongLibraryInteracables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_DisableSongLibraryInteracables"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "DisableSongLibraryInteracables")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent DisableSongLibraryInteracables void VROSC::TutorialEvent::_set_DisableSongLibraryInteracables(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_DisableSongLibraryInteracables"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "DisableSongLibraryInteracables", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent RevealInstruction ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_RevealInstruction() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_RevealInstruction"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "RevealInstruction")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent RevealInstruction void VROSC::TutorialEvent::_set_RevealInstruction(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_RevealInstruction"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "RevealInstruction", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent CompleteStep ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_CompleteStep() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_CompleteStep"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "CompleteStep")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent CompleteStep void VROSC::TutorialEvent::_set_CompleteStep(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_CompleteStep"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "CompleteStep", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent BoardGrabbed ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_BoardGrabbed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_BoardGrabbed"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "BoardGrabbed")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent BoardGrabbed void VROSC::TutorialEvent::_set_BoardGrabbed(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_BoardGrabbed"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "BoardGrabbed", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent TutorialPanelGrabbed ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_TutorialPanelGrabbed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_TutorialPanelGrabbed"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "TutorialPanelGrabbed")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent TutorialPanelGrabbed void VROSC::TutorialEvent::_set_TutorialPanelGrabbed(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_TutorialPanelGrabbed"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "TutorialPanelGrabbed", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent BlinkTutorialPanel ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_BlinkTutorialPanel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_BlinkTutorialPanel"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "BlinkTutorialPanel")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent BlinkTutorialPanel void VROSC::TutorialEvent::_set_BlinkTutorialPanel(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_BlinkTutorialPanel"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "BlinkTutorialPanel", value)); } // Autogenerated static field getter // Get static field: static public VROSC.TutorialEvent RerecordPressed ::VROSC::TutorialEvent VROSC::TutorialEvent::_get_RerecordPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_get_RerecordPressed"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::TutorialEvent>("VROSC", "TutorialEvent", "RerecordPressed")); } // Autogenerated static field setter // Set static field: static public VROSC.TutorialEvent RerecordPressed void VROSC::TutorialEvent::_set_RerecordPressed(::VROSC::TutorialEvent value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::_set_RerecordPressed"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "TutorialEvent", "RerecordPressed", value)); } // Autogenerated instance field getter // Get instance field: public System.Int32 value__ [[deprecated("Use field access instead!")]] int& VROSC::TutorialEvent::dyn_value__() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialEvent::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: VROSC.TutorialInputDevice #include "VROSC/TutorialInputDevice.hpp" // Including type: VROSC.TutorialInputDevice/VROSC.BlinkingButton #include "VROSC/TutorialInputDevice_BlinkingButton.hpp" // Including type: VROSC.HighlightControllerComponents #include "VROSC/HighlightControllerComponents.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.TriggerButton #include "VROSC/TriggerButton.hpp" // Including type: UnityEngine.Color #include "UnityEngine/Color.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 VROSC.HighlightControllerComponents _controllerComponents [[deprecated("Use field access instead!")]] ::VROSC::HighlightControllerComponents*& VROSC::TutorialInputDevice::dyn__controllerComponents() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::dyn__controllerComponents"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_controllerComponents"))->offset; return *reinterpret_cast<::VROSC::HighlightControllerComponents**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<VROSC.TutorialInputDevice/VROSC.BlinkingButton> _blinkingButtons [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::VROSC::TutorialInputDevice::BlinkingButton*>*& VROSC::TutorialInputDevice::dyn__blinkingButtons() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::dyn__blinkingButtons"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_blinkingButtons"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::VROSC::TutorialInputDevice::BlinkingButton*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialInputDevice.Start void VROSC::TutorialInputDevice::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::Start"); static 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: VROSC.TutorialInputDevice.OnEnable void VROSC::TutorialInputDevice::OnEnable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::OnEnable"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnEnable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialInputDevice.LateUpdate void VROSC::TutorialInputDevice::LateUpdate() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::LateUpdate"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "LateUpdate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialInputDevice.StopAllBlinking void VROSC::TutorialInputDevice::StopAllBlinking(float fadeTime) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::StopAllBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopAllBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(fadeTime)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, fadeTime); } // Autogenerated method: VROSC.TutorialInputDevice.StartButtonBlinking void VROSC::TutorialInputDevice::StartButtonBlinking(::VROSC::TriggerButton trigger, ::UnityEngine::Color color) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::StartButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(trigger), ::il2cpp_utils::ExtractType(color)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, trigger, color); } // Autogenerated method: VROSC.TutorialInputDevice.StopButtonBlinking void VROSC::TutorialInputDevice::StopButtonBlinking(::VROSC::TriggerButton trigger, float fadeTime) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::StopButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(trigger), ::il2cpp_utils::ExtractType(fadeTime)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, trigger, fadeTime); } // Autogenerated method: VROSC.TutorialInputDevice.GetBlinkingButtonByTrigger ::VROSC::TutorialInputDevice::BlinkingButton* VROSC::TutorialInputDevice::GetBlinkingButtonByTrigger(::VROSC::TriggerButton trigger) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::GetBlinkingButtonByTrigger"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBlinkingButtonByTrigger", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(trigger)}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::TutorialInputDevice::BlinkingButton*, false>(this, ___internal__method, trigger); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialInputDevice/VROSC.BlinkingButton #include "VROSC/TutorialInputDevice_BlinkingButton.hpp" // Including type: VROSC.ControllerComponent #include "VROSC/ControllerComponent.hpp" // Including type: VROSC.TutorialVisualBlinking #include "VROSC/TutorialVisualBlinking.hpp" // Including type: UnityEngine.Color #include "UnityEngine/Color.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 VROSC.ControllerComponent <Component>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::ControllerComponent*& VROSC::TutorialInputDevice::BlinkingButton::dyn_$Component$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::dyn_$Component$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Component>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::ControllerComponent**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialVisualBlinking <Blinking>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::TutorialVisualBlinking*& VROSC::TutorialInputDevice::BlinkingButton::dyn_$Blinking$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::dyn_$Blinking$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Blinking>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::TutorialVisualBlinking**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialInputDevice/VROSC.BlinkingButton.get_Component ::VROSC::ControllerComponent* VROSC::TutorialInputDevice::BlinkingButton::get_Component() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::get_Component"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Component", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::ControllerComponent*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialInputDevice/VROSC.BlinkingButton.set_Component void VROSC::TutorialInputDevice::BlinkingButton::set_Component(::VROSC::ControllerComponent* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::set_Component"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Component", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.TutorialInputDevice/VROSC.BlinkingButton.get_Blinking ::VROSC::TutorialVisualBlinking* VROSC::TutorialInputDevice::BlinkingButton::get_Blinking() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::get_Blinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Blinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::TutorialVisualBlinking*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialInputDevice/VROSC.BlinkingButton.set_Blinking void VROSC::TutorialInputDevice::BlinkingButton::set_Blinking(::VROSC::TutorialVisualBlinking* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::set_Blinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Blinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.TutorialInputDevice/VROSC.BlinkingButton.Update bool VROSC::TutorialInputDevice::BlinkingButton::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::Update"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Update", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialInputDevice/VROSC.BlinkingButton.GetCurrentColor ::UnityEngine::Color VROSC::TutorialInputDevice::BlinkingButton::GetCurrentColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::GetCurrentColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCurrentColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialInputDevice/VROSC.BlinkingButton.GetNormalColor ::UnityEngine::Color VROSC::TutorialInputDevice::BlinkingButton::GetNormalColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDevice::BlinkingButton::GetNormalColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNormalColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialInputDeviceManager #include "VROSC/TutorialInputDeviceManager.hpp" // Including type: VROSC.TutorialInputDevice #include "VROSC/TutorialInputDevice.hpp" // Including type: VROSC.InputDevice #include "VROSC/InputDevice.hpp" // Including type: VROSC.HandType #include "VROSC/HandType.hpp" // Including type: VROSC.TriggerButton #include "VROSC/TriggerButton.hpp" // Including type: UnityEngine.Color #include "UnityEngine/Color.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 VROSC.TutorialInputDevice _left [[deprecated("Use field access instead!")]] ::VROSC::TutorialInputDevice*& VROSC::TutorialInputDeviceManager::dyn__left() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::dyn__left"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_left"))->offset; return *reinterpret_cast<::VROSC::TutorialInputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialInputDevice _right [[deprecated("Use field access instead!")]] ::VROSC::TutorialInputDevice*& VROSC::TutorialInputDeviceManager::dyn__right() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::dyn__right"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_right"))->offset; return *reinterpret_cast<::VROSC::TutorialInputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialInputDeviceManager.Setup void VROSC::TutorialInputDeviceManager::Setup(::VROSC::InputDevice* left, ::VROSC::InputDevice* right) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(left), ::il2cpp_utils::ExtractType(right)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, left, right); } // Autogenerated method: VROSC.TutorialInputDeviceManager.StartButtonBlinking void VROSC::TutorialInputDeviceManager::StartButtonBlinking(::VROSC::HandType hand, ::VROSC::TriggerButton trigger, ::UnityEngine::Color color) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::StartButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hand), ::il2cpp_utils::ExtractType(trigger), ::il2cpp_utils::ExtractType(color)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hand, trigger, color); } // Autogenerated method: VROSC.TutorialInputDeviceManager.StopButtonBlinking void VROSC::TutorialInputDeviceManager::StopButtonBlinking(::VROSC::HandType hand, ::VROSC::TriggerButton trigger, float fadeTime) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::StopButtonBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopButtonBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hand), ::il2cpp_utils::ExtractType(trigger), ::il2cpp_utils::ExtractType(fadeTime)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hand, trigger, fadeTime); } // Autogenerated method: VROSC.TutorialInputDeviceManager.StopAllBlinking void VROSC::TutorialInputDeviceManager::StopAllBlinking(::VROSC::HandType hand, float fadeTime) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::StopAllBlinking"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopAllBlinking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hand), ::il2cpp_utils::ExtractType(fadeTime)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hand, fadeTime); } // Autogenerated method: VROSC.TutorialInputDeviceManager.IsLeftValid bool VROSC::TutorialInputDeviceManager::IsLeftValid(::VROSC::HandType hand) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::IsLeftValid"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IsLeftValid", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hand)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hand); } // Autogenerated method: VROSC.TutorialInputDeviceManager.IsRightValid bool VROSC::TutorialInputDeviceManager::IsRightValid(::VROSC::HandType hand) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialInputDeviceManager::IsRightValid"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IsRightValid", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hand)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, hand); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialManager #include "VROSC/TutorialManager.hpp" // Including type: VROSC.Tutorial #include "VROSC/Tutorial.hpp" // Including type: TutorialSettings #include "GlobalNamespace/TutorialSettings.hpp" // Including type: VROSC.TutorialPanel #include "VROSC/TutorialPanel.hpp" // Including type: UnityEngine.AudioSource #include "UnityEngine/AudioSource.hpp" // Including type: VROSC.StateMachine #include "VROSC/StateMachine.hpp" // Including type: VROSC.TutorialCompletedState #include "VROSC/TutorialCompletedState.hpp" // Including type: VROSC.TutorialStep #include "VROSC/TutorialStep.hpp" // Including type: System.Action`1 #include "System/Action_1.hpp" // Including type: UnityEngine.Transform #include "UnityEngine/Transform.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 VROSC.Tutorial _tutorial [[deprecated("Use field access instead!")]] ::VROSC::Tutorial*& VROSC::TutorialManager::dyn__tutorial() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__tutorial"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tutorial"))->offset; return *reinterpret_cast<::VROSC::Tutorial**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private TutorialSettings _settings [[deprecated("Use field access instead!")]] ::GlobalNamespace::TutorialSettings*& VROSC::TutorialManager::dyn__settings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__settings"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_settings"))->offset; return *reinterpret_cast<::GlobalNamespace::TutorialSettings**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialPanel _tutorialPanel [[deprecated("Use field access instead!")]] ::VROSC::TutorialPanel*& VROSC::TutorialManager::dyn__tutorialPanel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__tutorialPanel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tutorialPanel"))->offset; return *reinterpret_cast<::VROSC::TutorialPanel**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioSource _timelineVOSource [[deprecated("Use field access instead!")]] ::UnityEngine::AudioSource*& VROSC::TutorialManager::dyn__timelineVOSource() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__timelineVOSource"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_timelineVOSource"))->offset; return *reinterpret_cast<::UnityEngine::AudioSource**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioSource _replayVOSource [[deprecated("Use field access instead!")]] ::UnityEngine::AudioSource*& VROSC::TutorialManager::dyn__replayVOSource() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__replayVOSource"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_replayVOSource"))->offset; return *reinterpret_cast<::UnityEngine::AudioSource**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.StateMachine _stateMachine [[deprecated("Use field access instead!")]] ::VROSC::StateMachine*& VROSC::TutorialManager::dyn__stateMachine() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__stateMachine"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stateMachine"))->offset; return *reinterpret_cast<::VROSC::StateMachine**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialCompletedState _completedState [[deprecated("Use field access instead!")]] ::VROSC::TutorialCompletedState*& VROSC::TutorialManager::dyn__completedState() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__completedState"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_completedState"))->offset; return *reinterpret_cast<::VROSC::TutorialCompletedState**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isRunning [[deprecated("Use field access instead!")]] bool& VROSC::TutorialManager::dyn__isRunning() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__isRunning"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isRunning"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialStep _currentStep [[deprecated("Use field access instead!")]] ::VROSC::TutorialStep*& VROSC::TutorialManager::dyn__currentStep() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn__currentStep"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentStep"))->offset; return *reinterpret_cast<::VROSC::TutorialStep**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean <HasRecordedCowbell>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::TutorialManager::dyn_$HasRecordedCowbell$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn_$HasRecordedCowbell$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<HasRecordedCowbell>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Action`1<VROSC.TutorialEvent> OnEvent [[deprecated("Use field access instead!")]] ::System::Action_1<::VROSC::TutorialEvent>*& VROSC::TutorialManager::dyn_OnEvent() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::dyn_OnEvent"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "OnEvent"))->offset; return *reinterpret_cast<::System::Action_1<::VROSC::TutorialEvent>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialManager.get_Settings ::GlobalNamespace::TutorialSettings* VROSC::TutorialManager::get_Settings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::get_Settings"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Settings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::GlobalNamespace::TutorialSettings*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialManager.get_TimelineVOSource ::UnityEngine::AudioSource* VROSC::TutorialManager::get_TimelineVOSource() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::get_TimelineVOSource"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_TimelineVOSource", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AudioSource*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialManager.get_ReplayVOSource ::UnityEngine::AudioSource* VROSC::TutorialManager::get_ReplayVOSource() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::get_ReplayVOSource"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ReplayVOSource", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AudioSource*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialManager.get_HasRecordedCowbell bool VROSC::TutorialManager::get_HasRecordedCowbell() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::get_HasRecordedCowbell"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HasRecordedCowbell", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialManager.set_HasRecordedCowbell void VROSC::TutorialManager::set_HasRecordedCowbell(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::set_HasRecordedCowbell"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_HasRecordedCowbell", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.TutorialManager.Awake void VROSC::TutorialManager::Awake() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::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: VROSC.TutorialManager.StartTutorial void VROSC::TutorialManager::StartTutorial(::UnityEngine::Transform* startMenuTransform) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::StartTutorial"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartTutorial", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(startMenuTransform)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, startMenuTransform); } // Autogenerated method: VROSC.TutorialManager.SendEvent void VROSC::TutorialManager::SendEvent(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::SendEvent"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SendEvent", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.TutorialManager.StopTutorial void VROSC::TutorialManager::StopTutorial(bool isCancel) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::StopTutorial"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StopTutorial", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(isCancel)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, isCancel); } // Autogenerated method: VROSC.TutorialManager.ReEnableEverything void VROSC::TutorialManager::ReEnableEverything() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::ReEnableEverything"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReEnableEverything", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialManager.ActivateStep void VROSC::TutorialManager::ActivateStep(::VROSC::TutorialStep* tutorialStep) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::ActivateStep"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ActivateStep", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialStep)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialStep); } // Autogenerated method: VROSC.TutorialManager.Update void VROSC::TutorialManager::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::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: VROSC.TutorialManager.OnAppPaused void VROSC::TutorialManager::OnAppPaused(bool paused) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::OnAppPaused"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnAppPaused", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(paused)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, paused); } // Autogenerated method: VROSC.TutorialManager.TutorialEventTriggered void VROSC::TutorialManager::TutorialEventTriggered(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::TutorialEventTriggered"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialEventTriggered", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.TutorialManager.SetHasRecordedCowbell void VROSC::TutorialManager::SetHasRecordedCowbell(bool hasRecordedCowbell) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialManager::SetHasRecordedCowbell"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetHasRecordedCowbell", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hasRecordedCowbell)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, hasRecordedCowbell); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.TutorialCompletedState #include "VROSC/TutorialCompletedState.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated method: VROSC.TutorialCompletedState.OnEnter void VROSC::TutorialCompletedState::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCompletedState::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialCompletedState*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.TutorialCompletedState.OnExit void VROSC::TutorialCompletedState::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCompletedState::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialCompletedState*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialCompletedState.Tick void VROSC::TutorialCompletedState::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCompletedState::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialCompletedState*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialCompletedState.UpdateData void VROSC::TutorialCompletedState::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialCompletedState::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialCompletedState*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialPanel #include "VROSC/TutorialPanel.hpp" // Including type: VROSC.UIButton #include "VROSC/UIButton.hpp" // Including type: UnityEngine.GameObject #include "UnityEngine/GameObject.hpp" // Including type: TMPro.TextMeshPro #include "TMPro/TextMeshPro.hpp" // Including type: VROSC.TutorialBlinkingUIElement #include "VROSC/TutorialBlinkingUIElement.hpp" // Including type: VROSC.Grabable #include "VROSC/Grabable.hpp" // Including type: VROSC.TutorialCondition #include "VROSC/TutorialCondition.hpp" // Including type: UnityEngine.Transform #include "UnityEngine/Transform.hpp" // Including type: UnityEngine.RectTransform #include "UnityEngine/RectTransform.hpp" // Including type: VROSC.TutorialStep #include "VROSC/TutorialStep.hpp" // Including type: VROSC.TutorialEvent #include "VROSC/TutorialEvent.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 VROSC.UIButton _closeButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TutorialPanel::dyn__closeButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__closeButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _closeOKButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TutorialPanel::dyn__closeOKButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__closeOKButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeOKButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _closeCancelButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TutorialPanel::dyn__closeCancelButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__closeCancelButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeCancelButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.GameObject _closeWarningPanel [[deprecated("Use field access instead!")]] ::UnityEngine::GameObject*& VROSC::TutorialPanel::dyn__closeWarningPanel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__closeWarningPanel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_closeWarningPanel"))->offset; return *reinterpret_cast<::UnityEngine::GameObject**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _replayButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TutorialPanel::dyn__replayButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__replayButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_replayButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIButton _continueButton [[deprecated("Use field access instead!")]] ::VROSC::UIButton*& VROSC::TutorialPanel::dyn__continueButton() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__continueButton"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_continueButton"))->offset; return *reinterpret_cast<::VROSC::UIButton**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private TMPro.TextMeshPro _tipText [[deprecated("Use field access instead!")]] ::TMPro::TextMeshPro*& VROSC::TutorialPanel::dyn__tipText() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__tipText"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tipText"))->offset; return *reinterpret_cast<::TMPro::TextMeshPro**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement _blinkContinue [[deprecated("Use field access instead!")]] ::VROSC::TutorialBlinkingUIElement*& VROSC::TutorialPanel::dyn__blinkContinue() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__blinkContinue"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_blinkContinue"))->offset; return *reinterpret_cast<::VROSC::TutorialBlinkingUIElement**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Grabable[] _panelGrabables [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::Grabable*>& VROSC::TutorialPanel::dyn__panelGrabables() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__panelGrabables"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_panelGrabables"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::Grabable*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialBlinkingUIElement[] _panelBlinkers [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::TutorialBlinkingUIElement*>& VROSC::TutorialPanel::dyn__panelBlinkers() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__panelBlinkers"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_panelBlinkers"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::TutorialBlinkingUIElement*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialCondition _conditionPrefab [[deprecated("Use field access instead!")]] ::VROSC::TutorialCondition*& VROSC::TutorialPanel::dyn__conditionPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__conditionPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditionPrefab"))->offset; return *reinterpret_cast<::VROSC::TutorialCondition**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Transform _conditionsParent [[deprecated("Use field access instead!")]] ::UnityEngine::Transform*& VROSC::TutorialPanel::dyn__conditionsParent() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__conditionsParent"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditionsParent"))->offset; return *reinterpret_cast<::UnityEngine::Transform**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.RectTransform _mainTransform [[deprecated("Use field access instead!")]] ::UnityEngine::RectTransform*& VROSC::TutorialPanel::dyn__mainTransform() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__mainTransform"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_mainTransform"))->offset; return *reinterpret_cast<::UnityEngine::RectTransform**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _conditionsStartY [[deprecated("Use field access instead!")]] float& VROSC::TutorialPanel::dyn__conditionsStartY() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__conditionsStartY"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditionsStartY"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _conditionsSizeY [[deprecated("Use field access instead!")]] float& VROSC::TutorialPanel::dyn__conditionsSizeY() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__conditionsSizeY"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditionsSizeY"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialStep _currentTutorialStep [[deprecated("Use field access instead!")]] ::VROSC::TutorialStep*& VROSC::TutorialPanel::dyn__currentTutorialStep() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__currentTutorialStep"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentTutorialStep"))->offset; return *reinterpret_cast<::VROSC::TutorialStep**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialCondition[] _tutorialConditions [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::TutorialCondition*>& VROSC::TutorialPanel::dyn__tutorialConditions() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__tutorialConditions"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tutorialConditions"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::TutorialCondition*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Vector2 _mainSize [[deprecated("Use field access instead!")]] ::UnityEngine::Vector2& VROSC::TutorialPanel::dyn__mainSize() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::dyn__mainSize"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_mainSize"))->offset; return *reinterpret_cast<::UnityEngine::Vector2*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialPanel.Awake void VROSC::TutorialPanel::Awake() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::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: VROSC.TutorialPanel.StartTutorial void VROSC::TutorialPanel::StartTutorial() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::StartTutorial"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "StartTutorial", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.TutorialStopped void VROSC::TutorialPanel::TutorialStopped() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::TutorialStopped"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialStopped", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.CloseButtonPressed void VROSC::TutorialPanel::CloseButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::CloseButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CloseButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.CloseOKButtonPressed void VROSC::TutorialPanel::CloseOKButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::CloseOKButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CloseOKButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.CloseCancelButtonPressed void VROSC::TutorialPanel::CloseCancelButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::CloseCancelButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CloseCancelButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.ReplayButtonPressed void VROSC::TutorialPanel::ReplayButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::ReplayButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReplayButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.ContinueButtonPressed void VROSC::TutorialPanel::ContinueButtonPressed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::ContinueButtonPressed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ContinueButtonPressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.ActivateTutorialStep void VROSC::TutorialPanel::ActivateTutorialStep(::VROSC::TutorialStep* tutorialStep) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::ActivateTutorialStep"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ActivateTutorialStep", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialStep)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialStep); } // Autogenerated method: VROSC.TutorialPanel.TimelineReachedEnd void VROSC::TutorialPanel::TimelineReachedEnd() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::TimelineReachedEnd"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TimelineReachedEnd", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.TutorialEventTriggered void VROSC::TutorialPanel::TutorialEventTriggered(::VROSC::TutorialEvent tutorialEvent) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::TutorialEventTriggered"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialEventTriggered", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(tutorialEvent)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, tutorialEvent); } // Autogenerated method: VROSC.TutorialPanel.TutorialPanelGrabbed void VROSC::TutorialPanel::TutorialPanelGrabbed(bool grabbed) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::TutorialPanelGrabbed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialPanelGrabbed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(grabbed)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, grabbed); } // Autogenerated method: VROSC.TutorialPanel.RevealInstruction void VROSC::TutorialPanel::RevealInstruction() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::RevealInstruction"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RevealInstruction", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.TutorialConditionsCompleted void VROSC::TutorialPanel::TutorialConditionsCompleted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::TutorialConditionsCompleted"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TutorialConditionsCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialPanel.DisplayTipText void VROSC::TutorialPanel::DisplayTipText() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialPanel::DisplayTipText"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DisplayTipText", 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: VROSC.TutorialStep #include "VROSC/TutorialStep.hpp" // Including type: VROSC.TutorialStep/VROSC.Condition #include "VROSC/TutorialStep_Condition.hpp" // Including type: VROSC.TutorialStep/VROSC.<>c #include "VROSC/TutorialStep_--c.hpp" // Including type: UnityEngine.Playables.PlayableDirector #include "UnityEngine/Playables/PlayableDirector.hpp" // Including type: System.Action #include "System/Action.hpp" // Including type: System.Func`1 #include "System/Func_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: protected UnityEngine.Playables.PlayableDirector _playableDirector [[deprecated("Use field access instead!")]] ::UnityEngine::Playables::PlayableDirector*& VROSC::TutorialStep::dyn__playableDirector() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn__playableDirector"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_playableDirector"))->offset; return *reinterpret_cast<::UnityEngine::Playables::PlayableDirector**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: protected System.String _tipText [[deprecated("Use field access instead!")]] ::StringW& VROSC::TutorialStep::dyn__tipText() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn__tipText"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tipText"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _autoContinue [[deprecated("Use field access instead!")]] bool& VROSC::TutorialStep::dyn__autoContinue() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn__autoContinue"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_autoContinue"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialStep/VROSC.Condition[] _conditions [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::TutorialStep::Condition*>& VROSC::TutorialStep::dyn__conditions() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn__conditions"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_conditions"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::TutorialStep::Condition*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: protected System.Boolean _isFinished [[deprecated("Use field access instead!")]] bool& VROSC::TutorialStep::dyn__isFinished() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn__isFinished"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isFinished"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Action OnConditionsCompleted [[deprecated("Use field access instead!")]] ::System::Action*& VROSC::TutorialStep::dyn_OnConditionsCompleted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn_OnConditionsCompleted"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "OnConditionsCompleted"))->offset; return *reinterpret_cast<::System::Action**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean <IsCompleted>k__BackingField [[deprecated("Use field access instead!")]] bool& VROSC::TutorialStep::dyn_$IsCompleted$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn_$IsCompleted$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<IsCompleted>k__BackingField"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _timelineReachedEnd [[deprecated("Use field access instead!")]] bool& VROSC::TutorialStep::dyn__timelineReachedEnd() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn__timelineReachedEnd"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_timelineReachedEnd"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isReplayingAudio [[deprecated("Use field access instead!")]] bool& VROSC::TutorialStep::dyn__isReplayingAudio() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn__isReplayingAudio"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isReplayingAudio"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Action OnTimelineReachedEnd [[deprecated("Use field access instead!")]] ::System::Action*& VROSC::TutorialStep::dyn_OnTimelineReachedEnd() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::dyn_OnTimelineReachedEnd"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "OnTimelineReachedEnd"))->offset; return *reinterpret_cast<::System::Action**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.TutorialStep.get_Conditions ::ArrayW<::VROSC::TutorialStep::Condition*> VROSC::TutorialStep::get_Conditions() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::get_Conditions"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Conditions", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::ArrayW<::VROSC::TutorialStep::Condition*>, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.get_TipText ::StringW VROSC::TutorialStep::get_TipText() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::get_TipText"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_TipText", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.get_AutoContinue bool VROSC::TutorialStep::get_AutoContinue() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::get_AutoContinue"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_AutoContinue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.get_IsCompleted bool VROSC::TutorialStep::get_IsCompleted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::get_IsCompleted"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.set_IsCompleted void VROSC::TutorialStep::set_IsCompleted(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::set_IsCompleted"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_IsCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.TutorialStep.IsFinished ::System::Func_1<bool>* VROSC::TutorialStep::IsFinished() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::IsFinished"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IsFinished", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::System::Func_1<bool>*, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.OnEnter void VROSC::TutorialStep::OnEnter(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::OnEnter"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialStep*), 8)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.TutorialStep.ConditionsCompleted void VROSC::TutorialStep::ConditionsCompleted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::ConditionsCompleted"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ConditionsCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.TimelineEnded void VROSC::TutorialStep::TimelineEnded(::UnityEngine::Playables::PlayableDirector* director) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::TimelineEnded"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TimelineEnded", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(director)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, director); } // Autogenerated method: VROSC.TutorialStep.OnExit void VROSC::TutorialStep::OnExit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::OnExit"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialStep*), 9)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.Tick void VROSC::TutorialStep::Tick() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::Tick"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialStep*), 10)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.UpdateData void VROSC::TutorialStep::UpdateData(::ArrayW<::Il2CppObject*> values) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::UpdateData"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialStep*), 11)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, values); } // Autogenerated method: VROSC.TutorialStep.Replay void VROSC::TutorialStep::Replay() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::Replay"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialStep*), 12)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.TimelineReachedEnd void VROSC::TutorialStep::TimelineReachedEnd() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::TimelineReachedEnd"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::TutorialStep*), 13)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.FinishStep void VROSC::TutorialStep::FinishStep() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::FinishStep"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FinishStep", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.TutorialStep.Stop void VROSC::TutorialStep::Stop() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::Stop"); static 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: VROSC.TutorialStep.OnAppPaused void VROSC::TutorialStep::OnAppPaused(bool paused) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::OnAppPaused"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnAppPaused", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(paused)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, paused); } // Autogenerated method: VROSC.TutorialStep.<IsFinished>b__11_0 bool VROSC::TutorialStep::$IsFinished$b__11_0() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::<IsFinished>b__11_0"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<IsFinished>b__11_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialStep/VROSC.Condition #include "VROSC/TutorialStep_Condition.hpp" // Including type: System.Action #include "System/Action.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 Text [[deprecated("Use field access instead!")]] ::StringW& VROSC::TutorialStep::Condition::dyn_Text() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::Condition::dyn_Text"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Text"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Action OnConditionCompleted [[deprecated("Use field access instead!")]] ::System::Action*& VROSC::TutorialStep::Condition::dyn_OnConditionCompleted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::Condition::dyn_OnConditionCompleted"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "OnConditionCompleted"))->offset; return *reinterpret_cast<::System::Action**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.TutorialStep/VROSC.<>c #include "VROSC/TutorialStep_--c.hpp" // Including type: System.Func`2 #include "System/Func_2.hpp" // Including type: UnityEngine.Timeline.TrackAsset #include "UnityEngine/Timeline/TrackAsset.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public readonly VROSC.TutorialStep/VROSC.<>c <>9 ::VROSC::TutorialStep::$$c* VROSC::TutorialStep::$$c::_get_$$9() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::$$c::_get_$$9"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::VROSC::TutorialStep::$$c*>("VROSC", "TutorialStep/<>c", "<>9"))); } // Autogenerated static field setter // Set static field: static public readonly VROSC.TutorialStep/VROSC.<>c <>9 void VROSC::TutorialStep::$$c::_set_$$9(::VROSC::TutorialStep::$$c* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::$$c::_set_$$9"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "TutorialStep/<>c", "<>9", value))); } // Autogenerated static field getter // Get static field: static public System.Func`2<UnityEngine.Timeline.TrackAsset,System.Boolean> <>9__27_0 ::System::Func_2<::UnityEngine::Timeline::TrackAsset*, bool>* VROSC::TutorialStep::$$c::_get_$$9__27_0() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::$$c::_get_$$9__27_0"); return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Func_2<::UnityEngine::Timeline::TrackAsset*, bool>*>("VROSC", "TutorialStep/<>c", "<>9__27_0"))); } // Autogenerated static field setter // Set static field: static public System.Func`2<UnityEngine.Timeline.TrackAsset,System.Boolean> <>9__27_0 void VROSC::TutorialStep::$$c::_set_$$9__27_0(::System::Func_2<::UnityEngine::Timeline::TrackAsset*, bool>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::$$c::_set_$$9__27_0"); THROW_UNLESS((il2cpp_utils::SetFieldValue("VROSC", "TutorialStep/<>c", "<>9__27_0", value))); } // Autogenerated method: VROSC.TutorialStep/VROSC.<>c..cctor void VROSC::TutorialStep::$$c::_cctor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::$$c::.cctor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "TutorialStep/<>c", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method); } // Autogenerated method: VROSC.TutorialStep/VROSC.<>c.<Replay>b__27_0 bool VROSC::TutorialStep::$$c::$Replay$b__27_0(::UnityEngine::Timeline::TrackAsset* t) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::TutorialStep::$$c::<Replay>b__27_0"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<Replay>b__27_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(t)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, t); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.VRPlayer #include "VROSC/VRPlayer.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" // Including type: VROSC.VRPlayer/VROSC.OverrideControllerPrefab #include "VROSC/VRPlayer_OverrideControllerPrefab.hpp" // Including type: UnityEngine.Camera #include "UnityEngine/Camera.hpp" // Including type: VROSC.ScreenFade #include "VROSC/ScreenFade.hpp" // Including type: VROSC.InputDevice #include "VROSC/InputDevice.hpp" // Including type: UnityEngine.Transform #include "UnityEngine/Transform.hpp" // Including type: VROSC.HandPlacedDashboardHelper #include "VROSC/HandPlacedDashboardHelper.hpp" // Including type: VROSC.HighlightControllerComponentsManager #include "VROSC/HighlightControllerComponentsManager.hpp" // Including type: VROSC.TutorialInputDeviceManager #include "VROSC/TutorialInputDeviceManager.hpp" // Including type: VROSC.UIHelpers #include "VROSC/UIHelpers.hpp" // Including type: VROSC.InputSettings #include "VROSC/InputSettings.hpp" // Including type: UnityEngine.Vector3 #include "UnityEngine/Vector3.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.Camera _camera [[deprecated("Use field access instead!")]] ::UnityEngine::Camera*& VROSC::VRPlayer::dyn__camera() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__camera"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_camera"))->offset; return *reinterpret_cast<::UnityEngine::Camera**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.ScreenFade _screenFade [[deprecated("Use field access instead!")]] ::VROSC::ScreenFade*& VROSC::VRPlayer::dyn__screenFade() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__screenFade"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_screenFade"))->offset; return *reinterpret_cast<::VROSC::ScreenFade**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isDebugPlayer [[deprecated("Use field access instead!")]] bool& VROSC::VRPlayer::dyn__isDebugPlayer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__isDebugPlayer"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isDebugPlayer"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InputDevice _right [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::VRPlayer::dyn__right() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__right"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_right"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InputDevice _left [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::VRPlayer::dyn__left() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__left"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_left"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Transform _keyboardAnchor [[deprecated("Use field access instead!")]] ::UnityEngine::Transform*& VROSC::VRPlayer::dyn__keyboardAnchor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__keyboardAnchor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_keyboardAnchor"))->offset; return *reinterpret_cast<::UnityEngine::Transform**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.HandPlacedDashboardHelper _handPlacedDashboardHelper [[deprecated("Use field access instead!")]] ::VROSC::HandPlacedDashboardHelper*& VROSC::VRPlayer::dyn__handPlacedDashboardHelper() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__handPlacedDashboardHelper"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_handPlacedDashboardHelper"))->offset; return *reinterpret_cast<::VROSC::HandPlacedDashboardHelper**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.HighlightControllerComponentsManager _highlighting [[deprecated("Use field access instead!")]] ::VROSC::HighlightControllerComponentsManager*& VROSC::VRPlayer::dyn__highlighting() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__highlighting"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_highlighting"))->offset; return *reinterpret_cast<::VROSC::HighlightControllerComponentsManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TutorialInputDeviceManager _tutorialInputDeviceManager [[deprecated("Use field access instead!")]] ::VROSC::TutorialInputDeviceManager*& VROSC::VRPlayer::dyn__tutorialInputDeviceManager() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__tutorialInputDeviceManager"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tutorialInputDeviceManager"))->offset; return *reinterpret_cast<::VROSC::TutorialInputDeviceManager**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Transform _leftControllerParent [[deprecated("Use field access instead!")]] ::UnityEngine::Transform*& VROSC::VRPlayer::dyn__leftControllerParent() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__leftControllerParent"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_leftControllerParent"))->offset; return *reinterpret_cast<::UnityEngine::Transform**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Transform _rightControllerParent [[deprecated("Use field access instead!")]] ::UnityEngine::Transform*& VROSC::VRPlayer::dyn__rightControllerParent() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__rightControllerParent"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rightControllerParent"))->offset; return *reinterpret_cast<::UnityEngine::Transform**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InputDevice _leftControllerPrefab [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::VRPlayer::dyn__leftControllerPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__leftControllerPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_leftControllerPrefab"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InputDevice _rightControllerPrefab [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::VRPlayer::dyn__rightControllerPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__rightControllerPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rightControllerPrefab"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIHelpers _leftUIHelpers [[deprecated("Use field access instead!")]] ::VROSC::UIHelpers*& VROSC::VRPlayer::dyn__leftUIHelpers() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__leftUIHelpers"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_leftUIHelpers"))->offset; return *reinterpret_cast<::VROSC::UIHelpers**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.UIHelpers _rightUIHelpers [[deprecated("Use field access instead!")]] ::VROSC::UIHelpers*& VROSC::VRPlayer::dyn__rightUIHelpers() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__rightUIHelpers"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rightUIHelpers"))->offset; return *reinterpret_cast<::VROSC::UIHelpers**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.VRPlayer/VROSC.OverrideControllerPrefab[] _overrideControllerPrefabs [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::VRPlayer::OverrideControllerPrefab*>& VROSC::VRPlayer::dyn__overrideControllerPrefabs() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__overrideControllerPrefabs"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_overrideControllerPrefabs"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::VRPlayer::OverrideControllerPrefab*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String _connectedControllerName [[deprecated("Use field access instead!")]] ::StringW& VROSC::VRPlayer::dyn__connectedControllerName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn__connectedControllerName"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_connectedControllerName"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.VRPlayer/VROSC.ControllerType <Controllers>k__BackingField [[deprecated("Use field access instead!")]] ::VROSC::VRPlayer::ControllerType& VROSC::VRPlayer::dyn_$Controllers$k__BackingField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::dyn_$Controllers$k__BackingField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Controllers>k__BackingField"))->offset; return *reinterpret_cast<::VROSC::VRPlayer::ControllerType*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.VRPlayer.get_Right ::VROSC::InputDevice* VROSC::VRPlayer::get_Right() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_Right"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Right", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::InputDevice*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_Left ::VROSC::InputDevice* VROSC::VRPlayer::get_Left() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_Left"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Left", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::InputDevice*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_Camera ::UnityEngine::Camera* VROSC::VRPlayer::get_Camera() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_Camera"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Camera", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Camera*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_ScreenFade ::VROSC::ScreenFade* VROSC::VRPlayer::get_ScreenFade() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_ScreenFade"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ScreenFade", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::ScreenFade*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_Highlighting ::VROSC::HighlightControllerComponentsManager* VROSC::VRPlayer::get_Highlighting() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_Highlighting"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Highlighting", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::HighlightControllerComponentsManager*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_TutorialInputDevices ::VROSC::TutorialInputDeviceManager* VROSC::VRPlayer::get_TutorialInputDevices() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_TutorialInputDevices"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_TutorialInputDevices", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::TutorialInputDeviceManager*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_HandPlacedDashboardHelper ::VROSC::HandPlacedDashboardHelper* VROSC::VRPlayer::get_HandPlacedDashboardHelper() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_HandPlacedDashboardHelper"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HandPlacedDashboardHelper", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::HandPlacedDashboardHelper*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_IsDebugPlayer bool VROSC::VRPlayer::get_IsDebugPlayer() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_IsDebugPlayer"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsDebugPlayer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_KeyboardAnchor ::UnityEngine::Transform* VROSC::VRPlayer::get_KeyboardAnchor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_KeyboardAnchor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_KeyboardAnchor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Transform*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_InputDevices ::System::Collections::Generic::List_1<::VROSC::InputDevice*>* VROSC::VRPlayer::get_InputDevices() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_InputDevices"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_InputDevices", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::System::Collections::Generic::List_1<::VROSC::InputDevice*>*, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.get_Controllers ::VROSC::VRPlayer::ControllerType VROSC::VRPlayer::get_Controllers() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::get_Controllers"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Controllers", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::VRPlayer::ControllerType, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.set_Controllers void VROSC::VRPlayer::set_Controllers(::VROSC::VRPlayer::ControllerType value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::set_Controllers"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Controllers", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value); } // Autogenerated method: VROSC.VRPlayer.Awake void VROSC::VRPlayer::Awake() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::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: VROSC.VRPlayer.Setup void VROSC::VRPlayer::Setup(::VROSC::InputSettings* inputSettings) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputSettings)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputSettings); } // Autogenerated method: VROSC.VRPlayer.UpdateInput void VROSC::VRPlayer::UpdateInput() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::UpdateInput"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.GetControllerByHand ::VROSC::InputDevice* VROSC::VRPlayer::GetControllerByHand(bool right) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::GetControllerByHand"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetControllerByHand", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(right)}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::InputDevice*, false>(this, ___internal__method, right); } // Autogenerated method: VROSC.VRPlayer.GetMouthPosition ::UnityEngine::Vector3 VROSC::VRPlayer::GetMouthPosition() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::GetMouthPosition"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetMouthPosition", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Vector3, false>(this, ___internal__method); } // Autogenerated method: VROSC.VRPlayer.ShowControllers void VROSC::VRPlayer::ShowControllers(bool show) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ShowControllers"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ShowControllers", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(show)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, show); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.VRPlayer/VROSC.ControllerType #include "VROSC/VRPlayer.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 VROSC.VRPlayer/VROSC.ControllerType OculusTouch ::VROSC::VRPlayer::ControllerType VROSC::VRPlayer::ControllerType::_get_OculusTouch() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ControllerType::_get_OculusTouch"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::VRPlayer::ControllerType>("VROSC", "VRPlayer/ControllerType", "OculusTouch")); } // Autogenerated static field setter // Set static field: static public VROSC.VRPlayer/VROSC.ControllerType OculusTouch void VROSC::VRPlayer::ControllerType::_set_OculusTouch(::VROSC::VRPlayer::ControllerType value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ControllerType::_set_OculusTouch"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "VRPlayer/ControllerType", "OculusTouch", value)); } // Autogenerated static field getter // Get static field: static public VROSC.VRPlayer/VROSC.ControllerType ViveWand ::VROSC::VRPlayer::ControllerType VROSC::VRPlayer::ControllerType::_get_ViveWand() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ControllerType::_get_ViveWand"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::VRPlayer::ControllerType>("VROSC", "VRPlayer/ControllerType", "ViveWand")); } // Autogenerated static field setter // Set static field: static public VROSC.VRPlayer/VROSC.ControllerType ViveWand void VROSC::VRPlayer::ControllerType::_set_ViveWand(::VROSC::VRPlayer::ControllerType value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ControllerType::_set_ViveWand"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "VRPlayer/ControllerType", "ViveWand", value)); } // Autogenerated static field getter // Get static field: static public VROSC.VRPlayer/VROSC.ControllerType ValveIndex ::VROSC::VRPlayer::ControllerType VROSC::VRPlayer::ControllerType::_get_ValveIndex() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ControllerType::_get_ValveIndex"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::VRPlayer::ControllerType>("VROSC", "VRPlayer/ControllerType", "ValveIndex")); } // Autogenerated static field setter // Set static field: static public VROSC.VRPlayer/VROSC.ControllerType ValveIndex void VROSC::VRPlayer::ControllerType::_set_ValveIndex(::VROSC::VRPlayer::ControllerType value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ControllerType::_set_ValveIndex"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "VRPlayer/ControllerType", "ValveIndex", value)); } // Autogenerated instance field getter // Get instance field: public System.Int32 value__ [[deprecated("Use field access instead!")]] int& VROSC::VRPlayer::ControllerType::dyn_value__() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::ControllerType::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: VROSC.VRPlayer/VROSC.OverrideControllerPrefab #include "VROSC/VRPlayer_OverrideControllerPrefab.hpp" // Including type: VROSC.InputDevice #include "VROSC/InputDevice.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 VROSC.VRPlayer/VROSC.ControllerType controllerType [[deprecated("Use field access instead!")]] ::VROSC::VRPlayer::ControllerType& VROSC::VRPlayer::OverrideControllerPrefab::dyn_controllerType() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::OverrideControllerPrefab::dyn_controllerType"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "controllerType"))->offset; return *reinterpret_cast<::VROSC::VRPlayer::ControllerType*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.String name [[deprecated("Use field access instead!")]] ::StringW& VROSC::VRPlayer::OverrideControllerPrefab::dyn_name() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::OverrideControllerPrefab::dyn_name"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "name"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.InputDevice leftPrefab [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::VRPlayer::OverrideControllerPrefab::dyn_leftPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::OverrideControllerPrefab::dyn_leftPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "leftPrefab"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.InputDevice rightPrefab [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::VRPlayer::OverrideControllerPrefab::dyn_rightPrefab() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VRPlayer::OverrideControllerPrefab::dyn_rightPrefab"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "rightPrefab"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.VideoManager #include "VROSC/VideoManager.hpp" // Including type: VROSC.VideoUI #include "VROSC/VideoUI.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 VROSC.VideoUI _videoUI [[deprecated("Use field access instead!")]] ::VROSC::VideoUI*& VROSC::VideoManager::dyn__videoUI() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VideoManager::dyn__videoUI"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_videoUI"))->offset; return *reinterpret_cast<::VROSC::VideoUI**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.VideoManager.Start void VROSC::VideoManager::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VideoManager::Start"); static 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: VROSC.VideoManager.OpenUI void VROSC::VideoManager::OpenUI(::StringW videoPath, ::StringW title) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VideoManager::OpenUI"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OpenUI", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(videoPath), ::il2cpp_utils::ExtractType(title)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, videoPath, title); } // Autogenerated method: VROSC.VideoManager.CloseUI void VROSC::VideoManager::CloseUI() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VideoManager::CloseUI"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CloseUI", 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: VROSC.VirtuosoSampler #include "VROSC/VirtuosoSampler.hpp" // Including type: UnityEngine.Audio.AudioMixerGroup #include "UnityEngine/Audio/AudioMixerGroup.hpp" // Including type: UnityEngine.AudioSource #include "UnityEngine/AudioSource.hpp" // Including type: System.Action`1 #include "System/Action_1.hpp" // Including type: UnityEngine.AudioClip #include "UnityEngine/AudioClip.hpp" // Including type: VROSC.InternalSynthesizer #include "VROSC/InternalSynthesizer.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public System.Action`1<UnityEngine.AudioClip> OnSamplePlayed ::System::Action_1<::UnityEngine::AudioClip*>* VROSC::VirtuosoSampler::_get_OnSamplePlayed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::_get_OnSamplePlayed"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Action_1<::UnityEngine::AudioClip*>*>("VROSC", "VirtuosoSampler", "OnSamplePlayed")); } // Autogenerated static field setter // Set static field: static public System.Action`1<UnityEngine.AudioClip> OnSamplePlayed void VROSC::VirtuosoSampler::_set_OnSamplePlayed(::System::Action_1<::UnityEngine::AudioClip*>* value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::_set_OnSamplePlayed"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "VirtuosoSampler", "OnSamplePlayed", value)); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Audio.AudioMixerGroup _audioMixerGroup [[deprecated("Use field access instead!")]] ::UnityEngine::Audio::AudioMixerGroup*& VROSC::VirtuosoSampler::dyn__audioMixerGroup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::dyn__audioMixerGroup"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_audioMixerGroup"))->offset; return *reinterpret_cast<::UnityEngine::Audio::AudioMixerGroup**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _numberOfSources [[deprecated("Use field access instead!")]] int& VROSC::VirtuosoSampler::dyn__numberOfSources() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::dyn__numberOfSources"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_numberOfSources"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _sourceIndex [[deprecated("Use field access instead!")]] int& VROSC::VirtuosoSampler::dyn__sourceIndex() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::dyn__sourceIndex"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_sourceIndex"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AudioSource[] _audioSources [[deprecated("Use field access instead!")]] ::ArrayW<::UnityEngine::AudioSource*>& VROSC::VirtuosoSampler::dyn__audioSources() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::dyn__audioSources"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_audioSources"))->offset; return *reinterpret_cast<::ArrayW<::UnityEngine::AudioSource*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.VirtuosoSampler.GetAudioClip ::UnityEngine::AudioClip* VROSC::VirtuosoSampler::GetAudioClip(int id) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::GetAudioClip"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAudioClip", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(id)}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AudioClip*, false>(this, ___internal__method, id); } // Autogenerated method: VROSC.VirtuosoSampler.Setup void VROSC::VirtuosoSampler::Setup(::VROSC::InternalSynthesizer* internalSynthesizer) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::Setup"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::AudioHelmInstrumentWrapper*), 4)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, internalSynthesizer); } // Autogenerated method: VROSC.VirtuosoSampler.AllNotesOff void VROSC::VirtuosoSampler::AllNotesOff() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::AllNotesOff"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::AudioHelmInstrumentWrapper*), 7)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.VirtuosoSampler.NoteOff void VROSC::VirtuosoSampler::NoteOff(int note) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::NoteOff"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::AudioHelmInstrumentWrapper*), 6)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, note); } // Autogenerated method: VROSC.VirtuosoSampler.NoteOn void VROSC::VirtuosoSampler::NoteOn(int note, float velocity, double predictedDspTime, float pitch) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::NoteOn"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::AudioHelmInstrumentWrapper*), 5)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, note, velocity, predictedDspTime, pitch); } // Autogenerated method: VROSC.VirtuosoSampler.SetMidiCC void VROSC::VirtuosoSampler::SetMidiCC(float midiCCValue, int midiCC) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::SetMidiCC"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::AudioHelmInstrumentWrapper*), 8)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, midiCCValue, midiCC); } // Autogenerated method: VROSC.VirtuosoSampler.SetPitchBend void VROSC::VirtuosoSampler::SetPitchBend(float pitchBendValue) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::VirtuosoSampler::SetPitchBend"); auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::VROSC::AudioHelmInstrumentWrapper*), 9)); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, pitchBendValue); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.InstrumentSettings #include "VROSC/InstrumentSettings.hpp" // Including type: VROSC.InstrumentSettings/VROSC.ScaleSettings #include "VROSC/InstrumentSettings_ScaleSettings.hpp" // Including type: VROSC.MidiSettings #include "VROSC/MidiSettings.hpp" // Including type: VROSC.PatchGroup #include "VROSC/PatchGroup.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 VROSC.MidiSettings _midiSettings [[deprecated("Use field access instead!")]] ::VROSC::MidiSettings*& VROSC::InstrumentSettings::dyn__midiSettings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__midiSettings"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_midiSettings"))->offset; return *reinterpret_cast<::VROSC::MidiSettings**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.PatchGroup _patches [[deprecated("Use field access instead!")]] ::VROSC::PatchGroup*& VROSC::InstrumentSettings::dyn__patches() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__patches"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_patches"))->offset; return *reinterpret_cast<::VROSC::PatchGroup**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _startingPatch [[deprecated("Use field access instead!")]] int& VROSC::InstrumentSettings::dyn__startingPatch() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__startingPatch"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startingPatch"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _startMidiChannel [[deprecated("Use field access instead!")]] int& VROSC::InstrumentSettings::dyn__startMidiChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__startMidiChannel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startMidiChannel"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _startOctave [[deprecated("Use field access instead!")]] int& VROSC::InstrumentSettings::dyn__startOctave() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__startOctave"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startOctave"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _minOctave [[deprecated("Use field access instead!")]] int& VROSC::InstrumentSettings::dyn__minOctave() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__minOctave"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_minOctave"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _maxOctave [[deprecated("Use field access instead!")]] int& VROSC::InstrumentSettings::dyn__maxOctave() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__maxOctave"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_maxOctave"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InstrumentSettings/VROSC.ScaleSettings[] _scalesSettings [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::InstrumentSettings::ScaleSettings*>& VROSC::InstrumentSettings::dyn__scalesSettings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::dyn__scalesSettings"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_scalesSettings"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::InstrumentSettings::ScaleSettings*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.InstrumentSettings.get_MidiSettings ::VROSC::MidiSettings* VROSC::InstrumentSettings::get_MidiSettings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_MidiSettings"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_MidiSettings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::MidiSettings*, false>(this, ___internal__method); } // Autogenerated method: VROSC.InstrumentSettings.get_PatchGroup ::VROSC::PatchGroup* VROSC::InstrumentSettings::get_PatchGroup() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_PatchGroup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PatchGroup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::PatchGroup*, false>(this, ___internal__method); } // Autogenerated method: VROSC.InstrumentSettings.get_StartingPatch int VROSC::InstrumentSettings::get_StartingPatch() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_StartingPatch"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_StartingPatch", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.InstrumentSettings.get_StartingMidiChannel int VROSC::InstrumentSettings::get_StartingMidiChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_StartingMidiChannel"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_StartingMidiChannel", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.InstrumentSettings.get_StartOctave int VROSC::InstrumentSettings::get_StartOctave() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_StartOctave"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_StartOctave", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.InstrumentSettings.get_MinOctave int VROSC::InstrumentSettings::get_MinOctave() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_MinOctave"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_MinOctave", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.InstrumentSettings.get_MaxOctave int VROSC::InstrumentSettings::get_MaxOctave() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_MaxOctave"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_MaxOctave", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.InstrumentSettings.get_ScalesSettings ::ArrayW<::VROSC::InstrumentSettings::ScaleSettings*> VROSC::InstrumentSettings::get_ScalesSettings() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::get_ScalesSettings"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ScalesSettings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::ArrayW<::VROSC::InstrumentSettings::ScaleSettings*>, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.InstrumentSettings/VROSC.ScaleSettings #include "VROSC/InstrumentSettings_ScaleSettings.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: public System.Int32 StartNoteIndex [[deprecated("Use field access instead!")]] int& VROSC::InstrumentSettings::ScaleSettings::dyn_StartNoteIndex() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::ScaleSettings::dyn_StartNoteIndex"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "StartNoteIndex"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Int32 DefaultIncludeNotes [[deprecated("Use field access instead!")]] int& VROSC::InstrumentSettings::ScaleSettings::dyn_DefaultIncludeNotes() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::ScaleSettings::dyn_DefaultIncludeNotes"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "DefaultIncludeNotes"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Boolean OverrideScaleDefaults [[deprecated("Use field access instead!")]] bool& VROSC::InstrumentSettings::ScaleSettings::dyn_OverrideScaleDefaults() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::ScaleSettings::dyn_OverrideScaleDefaults"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "OverrideScaleDefaults"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Boolean[] ScaleNotesToggled [[deprecated("Use field access instead!")]] ::ArrayW<bool>& VROSC::InstrumentSettings::ScaleSettings::dyn_ScaleNotesToggled() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::InstrumentSettings::ScaleSettings::dyn_ScaleNotesToggled"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "ScaleNotesToggled"))->offset; return *reinterpret_cast<::ArrayW<bool>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.MicrophoneSettings #include "VROSC/MicrophoneSettings.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.Single VolumeMaxValue [[deprecated("Use field access instead!")]] float& VROSC::MicrophoneSettings::dyn_VolumeMaxValue() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MicrophoneSettings::dyn_VolumeMaxValue"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "VolumeMaxValue"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Single Volume [[deprecated("Use field access instead!")]] float& VROSC::MicrophoneSettings::dyn_Volume() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MicrophoneSettings::dyn_Volume"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Volume"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Single ReverbMaxValue [[deprecated("Use field access instead!")]] float& VROSC::MicrophoneSettings::dyn_ReverbMaxValue() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MicrophoneSettings::dyn_ReverbMaxValue"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "ReverbMaxValue"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Single Reverb [[deprecated("Use field access instead!")]] float& VROSC::MicrophoneSettings::dyn_Reverb() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MicrophoneSettings::dyn_Reverb"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Reverb"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Boolean UseProximity [[deprecated("Use field access instead!")]] bool& VROSC::MicrophoneSettings::dyn_UseProximity() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MicrophoneSettings::dyn_UseProximity"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "UseProximity"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.MidiSettings #include "VROSC/MidiSettings.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Int32 _minChannel [[deprecated("Use field access instead!")]] int& VROSC::MidiSettings::dyn__minChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MidiSettings::dyn__minChannel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_minChannel"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _maxChannel [[deprecated("Use field access instead!")]] int& VROSC::MidiSettings::dyn__maxChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MidiSettings::dyn__maxChannel"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_maxChannel"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.MidiSettings.get_MinChannel int VROSC::MidiSettings::get_MinChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MidiSettings::get_MinChannel"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_MinChannel", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.MidiSettings.get_MaxChannel int VROSC::MidiSettings::get_MaxChannel() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::MidiSettings::get_MaxChannel"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_MaxChannel", 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: VROSC.ModularDrumsSettings #include "VROSC/ModularDrumsSettings.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.Single _reverbAmount [[deprecated("Use field access instead!")]] float& VROSC::ModularDrumsSettings::dyn__reverbAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::dyn__reverbAmount"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_reverbAmount"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _reverbLength [[deprecated("Use field access instead!")]] float& VROSC::ModularDrumsSettings::dyn__reverbLength() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::dyn__reverbLength"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_reverbLength"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _dryVolume [[deprecated("Use field access instead!")]] float& VROSC::ModularDrumsSettings::dyn__dryVolume() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::dyn__dryVolume"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_dryVolume"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _compression [[deprecated("Use field access instead!")]] float& VROSC::ModularDrumsSettings::dyn__compression() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::dyn__compression"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_compression"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ModularDrumsSettings.get_ReverbAmount float VROSC::ModularDrumsSettings::get_ReverbAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::get_ReverbAmount"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ReverbAmount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.ModularDrumsSettings.get_ReverbLength float VROSC::ModularDrumsSettings::get_ReverbLength() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::get_ReverbLength"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ReverbLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.ModularDrumsSettings.get_DryVolume float VROSC::ModularDrumsSettings::get_DryVolume() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::get_DryVolume"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DryVolume", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.ModularDrumsSettings.get_Compression float VROSC::ModularDrumsSettings::get_Compression() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ModularDrumsSettings::get_Compression"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Compression", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.NotefieldAnimationSettings #include "VROSC/NotefieldAnimationSettings.hpp" // Including type: VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings #include "VROSC/NotefieldAnimationSettings_TimelineSettings.hpp" // Including type: UnityEngine.AnimationCurve #include "UnityEngine/AnimationCurve.hpp" // Including type: VROSC.NoteBoardNoteController #include "VROSC/NoteBoardNoteController.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _animationStartCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::dyn__animationStartCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__animationStartCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_animationStartCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _animateionEndCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::dyn__animateionEndCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__animateionEndCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_animateionEndCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings _creation [[deprecated("Use field access instead!")]] ::VROSC::NotefieldAnimationSettings::TimelineSettings*& VROSC::NotefieldAnimationSettings::dyn__creation() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__creation"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_creation"))->offset; return *reinterpret_cast<::VROSC::NotefieldAnimationSettings::TimelineSettings**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings _destruction [[deprecated("Use field access instead!")]] ::VROSC::NotefieldAnimationSettings::TimelineSettings*& VROSC::NotefieldAnimationSettings::dyn__destruction() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__destruction"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_destruction"))->offset; return *reinterpret_cast<::VROSC::NotefieldAnimationSettings::TimelineSettings**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _sizeCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::dyn__sizeCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__sizeCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_sizeCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _positionDeviationCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::dyn__positionDeviationCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__positionDeviationCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_positionDeviationCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _rotationDeviationCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::dyn__rotationDeviationCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__rotationDeviationCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rotationDeviationCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _positionDeviationAmount [[deprecated("Use field access instead!")]] float& VROSC::NotefieldAnimationSettings::dyn__positionDeviationAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__positionDeviationAmount"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_positionDeviationAmount"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _rotationDeviationAmount [[deprecated("Use field access instead!")]] float& VROSC::NotefieldAnimationSettings::dyn__rotationDeviationAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__rotationDeviationAmount"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rotationDeviationAmount"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _useZDirection [[deprecated("Use field access instead!")]] bool& VROSC::NotefieldAnimationSettings::dyn__useZDirection() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn__useZDirection"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_useZDirection"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 previewX [[deprecated("Use field access instead!")]] int& VROSC::NotefieldAnimationSettings::dyn_previewX() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn_previewX"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "previewX"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 previewY [[deprecated("Use field access instead!")]] int& VROSC::NotefieldAnimationSettings::dyn_previewY() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn_previewY"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "previewY"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 previewZ [[deprecated("Use field access instead!")]] int& VROSC::NotefieldAnimationSettings::dyn_previewZ() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn_previewZ"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "previewZ"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.Scale previewScale [[deprecated("Use field access instead!")]] ::VROSC::Scale& VROSC::NotefieldAnimationSettings::dyn_previewScale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::dyn_previewScale"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "previewScale"))->offset; return *reinterpret_cast<::VROSC::Scale*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.NotefieldAnimationSettings.get_Creation ::VROSC::NotefieldAnimationSettings::TimelineSettings* VROSC::NotefieldAnimationSettings::get_Creation() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::get_Creation"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Creation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::NotefieldAnimationSettings::TimelineSettings*, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldAnimationSettings.get_Destruction ::VROSC::NotefieldAnimationSettings::TimelineSettings* VROSC::NotefieldAnimationSettings::get_Destruction() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::get_Destruction"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Destruction", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::NotefieldAnimationSettings::TimelineSettings*, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldAnimationSettings.get_UseZDirection bool VROSC::NotefieldAnimationSettings::get_UseZDirection() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::get_UseZDirection"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_UseZDirection", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldAnimationSettings.GetAnimationValue float VROSC::NotefieldAnimationSettings::GetAnimationValue(float note, float time) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::GetAnimationValue"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetAnimationValue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(note), ::il2cpp_utils::ExtractType(time)}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method, note, time); } // Autogenerated method: VROSC.NotefieldAnimationSettings.CreatePreviewNoteboard void VROSC::NotefieldAnimationSettings::CreatePreviewNoteboard(::VROSC::NoteBoardNoteController* noteboardController) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::CreatePreviewNoteboard"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreatePreviewNoteboard", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(noteboardController)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, noteboardController); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings #include "VROSC/NotefieldAnimationSettings_TimelineSettings.hpp" // Including type: UnityEngine.AnimationCurve #include "UnityEngine/AnimationCurve.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _sizeCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__sizeCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__sizeCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_sizeCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _positionDeviationCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__positionDeviationCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__positionDeviationCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_positionDeviationCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _rotationDeviationCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__rotationDeviationCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__rotationDeviationCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rotationDeviationCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _positionDeviationAmount [[deprecated("Use field access instead!")]] float& VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__positionDeviationAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__positionDeviationAmount"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_positionDeviationAmount"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _rotationDeviationAmount [[deprecated("Use field access instead!")]] float& VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__rotationDeviationAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::dyn__rotationDeviationAmount"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rotationDeviationAmount"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings.get_SizeCurve ::UnityEngine::AnimationCurve* VROSC::NotefieldAnimationSettings::TimelineSettings::get_SizeCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::get_SizeCurve"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_SizeCurve", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AnimationCurve*, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings.get_PositionDeviationCurve ::UnityEngine::AnimationCurve* VROSC::NotefieldAnimationSettings::TimelineSettings::get_PositionDeviationCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::get_PositionDeviationCurve"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PositionDeviationCurve", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AnimationCurve*, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings.get_RotationDeviationCurve ::UnityEngine::AnimationCurve* VROSC::NotefieldAnimationSettings::TimelineSettings::get_RotationDeviationCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::get_RotationDeviationCurve"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RotationDeviationCurve", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AnimationCurve*, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings.get_PositionDeviationAmount float VROSC::NotefieldAnimationSettings::TimelineSettings::get_PositionDeviationAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::get_PositionDeviationAmount"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_PositionDeviationAmount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldAnimationSettings/VROSC.TimelineSettings.get_RotationDeviationAmount float VROSC::NotefieldAnimationSettings::TimelineSettings::get_RotationDeviationAmount() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldAnimationSettings::TimelineSettings::get_RotationDeviationAmount"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RotationDeviationAmount", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.NotefieldColorSettings #include "VROSC/NotefieldColorSettings.hpp" // Including type: UnityEngine.AnimationCurve #include "UnityEngine/AnimationCurve.hpp" // Including type: UnityEngine.Vector3 #include "UnityEngine/Vector3.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _restingEvenColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::NotefieldColorSettings::dyn__restingEvenColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__restingEvenColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_restingEvenColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _restingOddColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::NotefieldColorSettings::dyn__restingOddColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__restingOddColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_restingOddColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Color _octaveColor [[deprecated("Use field access instead!")]] ::UnityEngine::Color& VROSC::NotefieldColorSettings::dyn__octaveColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__octaveColor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_octaveColor"))->offset; return *reinterpret_cast<::UnityEngine::Color*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Int32 _transmitLength [[deprecated("Use field access instead!")]] int& VROSC::NotefieldColorSettings::dyn__transmitLength() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__transmitLength"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_transmitLength"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _transmitFadeCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldColorSettings::dyn__transmitFadeCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__transmitFadeCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_transmitFadeCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.NotefieldColorSettings/VROSC.Coloring _coloring [[deprecated("Use field access instead!")]] ::VROSC::NotefieldColorSettings::Coloring& VROSC::NotefieldColorSettings::dyn__coloring() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__coloring"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_coloring"))->offset; return *reinterpret_cast<::VROSC::NotefieldColorSettings::Coloring*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _fallSpeed [[deprecated("Use field access instead!")]] float& VROSC::NotefieldColorSettings::dyn__fallSpeed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__fallSpeed"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_fallSpeed"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.NotefieldColorSettings/VROSC.SpreadType _spread [[deprecated("Use field access instead!")]] ::VROSC::NotefieldColorSettings::SpreadType& VROSC::NotefieldColorSettings::dyn__spread() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__spread"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_spread"))->offset; return *reinterpret_cast<::VROSC::NotefieldColorSettings::SpreadType*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _hoverScale [[deprecated("Use field access instead!")]] float& VROSC::NotefieldColorSettings::dyn__hoverScale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__hoverScale"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hoverScale"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.AnimationCurve _hoverTransmitCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::NotefieldColorSettings::dyn__hoverTransmitCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__hoverTransmitCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hoverTransmitCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _hoverFallSpeed [[deprecated("Use field access instead!")]] float& VROSC::NotefieldColorSettings::dyn__hoverFallSpeed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__hoverFallSpeed"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hoverFallSpeed"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _noteScale [[deprecated("Use field access instead!")]] float& VROSC::NotefieldColorSettings::dyn__noteScale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__noteScale"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_noteScale"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _playPower [[deprecated("Use field access instead!")]] float& VROSC::NotefieldColorSettings::dyn__playPower() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__playPower"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_playPower"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _uniformScale [[deprecated("Use field access instead!")]] bool& VROSC::NotefieldColorSettings::dyn__uniformScale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__uniformScale"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_uniformScale"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _smallestUniformScale [[deprecated("Use field access instead!")]] bool& VROSC::NotefieldColorSettings::dyn__smallestUniformScale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__smallestUniformScale"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_smallestUniformScale"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _additiveScale [[deprecated("Use field access instead!")]] bool& VROSC::NotefieldColorSettings::dyn__additiveScale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::dyn__additiveScale"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_additiveScale"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.NotefieldColorSettings.get_RestingEvenColor ::UnityEngine::Color VROSC::NotefieldColorSettings::get_RestingEvenColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_RestingEvenColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RestingEvenColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_RestingOddColor ::UnityEngine::Color VROSC::NotefieldColorSettings::get_RestingOddColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_RestingOddColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_RestingOddColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_OctaveColor ::UnityEngine::Color VROSC::NotefieldColorSettings::get_OctaveColor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_OctaveColor"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_OctaveColor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Color, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_TransmitLength int VROSC::NotefieldColorSettings::get_TransmitLength() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_TransmitLength"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_TransmitLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_TransmitFadeCurve ::UnityEngine::AnimationCurve* VROSC::NotefieldColorSettings::get_TransmitFadeCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_TransmitFadeCurve"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_TransmitFadeCurve", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AnimationCurve*, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_NoteColoring ::VROSC::NotefieldColorSettings::Coloring VROSC::NotefieldColorSettings::get_NoteColoring() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_NoteColoring"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_NoteColoring", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::NotefieldColorSettings::Coloring, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_FallSpeed float VROSC::NotefieldColorSettings::get_FallSpeed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_FallSpeed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_FallSpeed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_Spread ::VROSC::NotefieldColorSettings::SpreadType VROSC::NotefieldColorSettings::get_Spread() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_Spread"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Spread", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::NotefieldColorSettings::SpreadType, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_HoverTransmitCurve ::UnityEngine::AnimationCurve* VROSC::NotefieldColorSettings::get_HoverTransmitCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_HoverTransmitCurve"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HoverTransmitCurve", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::AnimationCurve*, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_HoverFallSpeed float VROSC::NotefieldColorSettings::get_HoverFallSpeed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_HoverFallSpeed"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HoverFallSpeed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.get_HoverScale float VROSC::NotefieldColorSettings::get_HoverScale() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::get_HoverScale"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_HoverScale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.NotefieldColorSettings.GetScale ::UnityEngine::Vector3 VROSC::NotefieldColorSettings::GetScale(::UnityEngine::Vector3 baseScale, float hoveringAmount, ::UnityEngine::Vector3 playPower) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::GetScale"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetScale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(baseScale), ::il2cpp_utils::ExtractType(hoveringAmount), ::il2cpp_utils::ExtractType(playPower)}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Vector3, false>(this, ___internal__method, baseScale, hoveringAmount, playPower); } // Autogenerated method: VROSC.NotefieldColorSettings.GetBaseScale ::UnityEngine::Vector3 VROSC::NotefieldColorSettings::GetBaseScale(::UnityEngine::Vector3 baseScale) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::GetBaseScale"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBaseScale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(baseScale)}))); return ::il2cpp_utils::RunMethodRethrow<::UnityEngine::Vector3, false>(this, ___internal__method, baseScale); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.NotefieldColorSettings/VROSC.Coloring #include "VROSC/NotefieldColorSettings.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 VROSC.NotefieldColorSettings/VROSC.Coloring AsPlayed ::VROSC::NotefieldColorSettings::Coloring VROSC::NotefieldColorSettings::Coloring::_get_AsPlayed() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_get_AsPlayed"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::NotefieldColorSettings::Coloring>("VROSC", "NotefieldColorSettings/Coloring", "AsPlayed")); } // Autogenerated static field setter // Set static field: static public VROSC.NotefieldColorSettings/VROSC.Coloring AsPlayed void VROSC::NotefieldColorSettings::Coloring::_set_AsPlayed(::VROSC::NotefieldColorSettings::Coloring value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_set_AsPlayed"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "NotefieldColorSettings/Coloring", "AsPlayed", value)); } // Autogenerated static field getter // Get static field: static public VROSC.NotefieldColorSettings/VROSC.Coloring AlwaysX ::VROSC::NotefieldColorSettings::Coloring VROSC::NotefieldColorSettings::Coloring::_get_AlwaysX() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_get_AlwaysX"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::NotefieldColorSettings::Coloring>("VROSC", "NotefieldColorSettings/Coloring", "AlwaysX")); } // Autogenerated static field setter // Set static field: static public VROSC.NotefieldColorSettings/VROSC.Coloring AlwaysX void VROSC::NotefieldColorSettings::Coloring::_set_AlwaysX(::VROSC::NotefieldColorSettings::Coloring value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_set_AlwaysX"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "NotefieldColorSettings/Coloring", "AlwaysX", value)); } // Autogenerated static field getter // Get static field: static public VROSC.NotefieldColorSettings/VROSC.Coloring AlwaysY ::VROSC::NotefieldColorSettings::Coloring VROSC::NotefieldColorSettings::Coloring::_get_AlwaysY() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_get_AlwaysY"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::NotefieldColorSettings::Coloring>("VROSC", "NotefieldColorSettings/Coloring", "AlwaysY")); } // Autogenerated static field setter // Set static field: static public VROSC.NotefieldColorSettings/VROSC.Coloring AlwaysY void VROSC::NotefieldColorSettings::Coloring::_set_AlwaysY(::VROSC::NotefieldColorSettings::Coloring value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_set_AlwaysY"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "NotefieldColorSettings/Coloring", "AlwaysY", value)); } // Autogenerated static field getter // Get static field: static public VROSC.NotefieldColorSettings/VROSC.Coloring AlwaysZ ::VROSC::NotefieldColorSettings::Coloring VROSC::NotefieldColorSettings::Coloring::_get_AlwaysZ() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_get_AlwaysZ"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::NotefieldColorSettings::Coloring>("VROSC", "NotefieldColorSettings/Coloring", "AlwaysZ")); } // Autogenerated static field setter // Set static field: static public VROSC.NotefieldColorSettings/VROSC.Coloring AlwaysZ void VROSC::NotefieldColorSettings::Coloring::_set_AlwaysZ(::VROSC::NotefieldColorSettings::Coloring value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::_set_AlwaysZ"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "NotefieldColorSettings/Coloring", "AlwaysZ", value)); } // Autogenerated instance field getter // Get instance field: public System.Int32 value__ [[deprecated("Use field access instead!")]] int& VROSC::NotefieldColorSettings::Coloring::dyn_value__() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::Coloring::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: VROSC.NotefieldColorSettings/VROSC.SpreadType #include "VROSC/NotefieldColorSettings.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 VROSC.NotefieldColorSettings/VROSC.SpreadType AllAxises ::VROSC::NotefieldColorSettings::SpreadType VROSC::NotefieldColorSettings::SpreadType::_get_AllAxises() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::SpreadType::_get_AllAxises"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::NotefieldColorSettings::SpreadType>("VROSC", "NotefieldColorSettings/SpreadType", "AllAxises")); } // Autogenerated static field setter // Set static field: static public VROSC.NotefieldColorSettings/VROSC.SpreadType AllAxises void VROSC::NotefieldColorSettings::SpreadType::_set_AllAxises(::VROSC::NotefieldColorSettings::SpreadType value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::SpreadType::_set_AllAxises"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "NotefieldColorSettings/SpreadType", "AllAxises", value)); } // Autogenerated static field getter // Get static field: static public VROSC.NotefieldColorSettings/VROSC.SpreadType Same ::VROSC::NotefieldColorSettings::SpreadType VROSC::NotefieldColorSettings::SpreadType::_get_Same() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::SpreadType::_get_Same"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::NotefieldColorSettings::SpreadType>("VROSC", "NotefieldColorSettings/SpreadType", "Same")); } // Autogenerated static field setter // Set static field: static public VROSC.NotefieldColorSettings/VROSC.SpreadType Same void VROSC::NotefieldColorSettings::SpreadType::_set_Same(::VROSC::NotefieldColorSettings::SpreadType value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::SpreadType::_set_Same"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "NotefieldColorSettings/SpreadType", "Same", value)); } // Autogenerated static field getter // Get static field: static public VROSC.NotefieldColorSettings/VROSC.SpreadType Inverted ::VROSC::NotefieldColorSettings::SpreadType VROSC::NotefieldColorSettings::SpreadType::_get_Inverted() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::SpreadType::_get_Inverted"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::NotefieldColorSettings::SpreadType>("VROSC", "NotefieldColorSettings/SpreadType", "Inverted")); } // Autogenerated static field setter // Set static field: static public VROSC.NotefieldColorSettings/VROSC.SpreadType Inverted void VROSC::NotefieldColorSettings::SpreadType::_set_Inverted(::VROSC::NotefieldColorSettings::SpreadType value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::SpreadType::_set_Inverted"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "NotefieldColorSettings/SpreadType", "Inverted", value)); } // Autogenerated instance field getter // Get instance field: public System.Int32 value__ [[deprecated("Use field access instead!")]] int& VROSC::NotefieldColorSettings::SpreadType::dyn_value__() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::NotefieldColorSettings::SpreadType::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: VROSC.ParameterLink #include "VROSC/ParameterLink.hpp" // Including type: UnityEngine.AnimationCurve #include "UnityEngine/AnimationCurve.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 VROSC.SynthParameterController/VROSC.TargetParameter TargetParameter [[deprecated("Use field access instead!")]] ::VROSC::SynthParameterController::TargetParameter& VROSC::ParameterLink::dyn_TargetParameter() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_TargetParameter"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "TargetParameter"))->offset; return *reinterpret_cast<::VROSC::SynthParameterController::TargetParameter*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.MidiCC MidiCC [[deprecated("Use field access instead!")]] ::VROSC::MidiCC& VROSC::ParameterLink::dyn_MidiCC() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_MidiCC"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "MidiCC"))->offset; return *reinterpret_cast<::VROSC::MidiCC*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.ValueSourceSelector/VROSC.ValueSource ValueSource [[deprecated("Use field access instead!")]] ::VROSC::ValueSourceSelector::ValueSource& VROSC::ParameterLink::dyn_ValueSource() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_ValueSource"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "ValueSource"))->offset; return *reinterpret_cast<::VROSC::ValueSourceSelector::ValueSource*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.HandType HandType [[deprecated("Use field access instead!")]] ::VROSC::HandType& VROSC::ParameterLink::dyn_HandType() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_HandType"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "HandType"))->offset; return *reinterpret_cast<::VROSC::HandType*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Boolean LinkHands [[deprecated("Use field access instead!")]] bool& VROSC::ParameterLink::dyn_LinkHands() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_LinkHands"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "LinkHands"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public UnityEngine.AnimationCurve TransformationCurve [[deprecated("Use field access instead!")]] ::UnityEngine::AnimationCurve*& VROSC::ParameterLink::dyn_TransformationCurve() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_TransformationCurve"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "TransformationCurve"))->offset; return *reinterpret_cast<::UnityEngine::AnimationCurve**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Single Factor [[deprecated("Use field access instead!")]] float& VROSC::ParameterLink::dyn_Factor() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_Factor"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Factor"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public System.Boolean CenterOnHalf [[deprecated("Use field access instead!")]] bool& VROSC::ParameterLink::dyn_CenterOnHalf() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLink::dyn_CenterOnHalf"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "CenterOnHalf"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ParameterLinksPreset #include "VROSC/ParameterLinksPreset.hpp" // Including type: VROSC.ParameterLink #include "VROSC/ParameterLink.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 Name [[deprecated("Use field access instead!")]] ::StringW& VROSC::ParameterLinksPreset::dyn_Name() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLinksPreset::dyn_Name"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Name"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: public VROSC.ParameterLink[] ParameterLinks [[deprecated("Use field access instead!")]] ::ArrayW<::VROSC::ParameterLink*>& VROSC::ParameterLinksPreset::dyn_ParameterLinks() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ParameterLinksPreset::dyn_ParameterLinks"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "ParameterLinks"))->offset; return *reinterpret_cast<::ArrayW<::VROSC::ParameterLink*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.ThereminParticles #include "VROSC/ThereminParticles.hpp" // Including type: VROSC.ThereminParticles/VROSC.Hand #include "VROSC/ThereminParticles_Hand.hpp" // Including type: UnityEngine.ParticleSystem #include "UnityEngine/ParticleSystem.hpp" // Including type: VROSC.ControllerInputNode #include "VROSC/ControllerInputNode.hpp" // Including type: VROSC.TransformMover #include "VROSC/TransformMover.hpp" // Including type: VROSC.InstrumentController #include "VROSC/InstrumentController.hpp" // Including type: UnityEngine.Material #include "UnityEngine/Material.hpp" // Including type: VROSC.HandType #include "VROSC/HandType.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.ParticleSystem _particles [[deprecated("Use field access instead!")]] ::UnityEngine::ParticleSystem*& VROSC::ThereminParticles::dyn__particles() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__particles"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_particles"))->offset; return *reinterpret_cast<::UnityEngine::ParticleSystem**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.ControllerInputNode _input [[deprecated("Use field access instead!")]] ::VROSC::ControllerInputNode*& VROSC::ThereminParticles::dyn__input() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__input"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_input"))->offset; return *reinterpret_cast<::VROSC::ControllerInputNode**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.TransformMover _scaling [[deprecated("Use field access instead!")]] ::VROSC::TransformMover*& VROSC::ThereminParticles::dyn__scaling() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__scaling"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_scaling"))->offset; return *reinterpret_cast<::VROSC::TransformMover**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InstrumentController _wavemin [[deprecated("Use field access instead!")]] ::VROSC::InstrumentController*& VROSC::ThereminParticles::dyn__wavemin() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__wavemin"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_wavemin"))->offset; return *reinterpret_cast<::VROSC::InstrumentController**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.ThereminParticles/VROSC.Hand _leftHand [[deprecated("Use field access instead!")]] ::VROSC::ThereminParticles::Hand*& VROSC::ThereminParticles::dyn__leftHand() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__leftHand"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_leftHand"))->offset; return *reinterpret_cast<::VROSC::ThereminParticles::Hand**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.ThereminParticles/VROSC.Hand _rightHand [[deprecated("Use field access instead!")]] ::VROSC::ThereminParticles::Hand*& VROSC::ThereminParticles::dyn__rightHand() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__rightHand"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_rightHand"))->offset; return *reinterpret_cast<::VROSC::ThereminParticles::Hand**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _visualDistance [[deprecated("Use field access instead!")]] float& VROSC::ThereminParticles::dyn__visualDistance() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__visualDistance"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_visualDistance"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Material _material [[deprecated("Use field access instead!")]] ::UnityEngine::Material*& VROSC::ThereminParticles::dyn__material() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::dyn__material"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_material"))->offset; return *reinterpret_cast<::UnityEngine::Material**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ThereminParticles.Awake void VROSC::ThereminParticles::Awake() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::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: VROSC.ThereminParticles.OnDestroy void VROSC::ThereminParticles::OnDestroy() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::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: VROSC.ThereminParticles.Start void VROSC::ThereminParticles::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Start"); static 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: VROSC.ThereminParticles.OnEnable void VROSC::ThereminParticles::OnEnable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::OnEnable"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnEnable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.ThereminParticles.OnDisable void VROSC::ThereminParticles::OnDisable() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::OnDisable"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnDisable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method); } // Autogenerated method: VROSC.ThereminParticles.ScaleChanged void VROSC::ThereminParticles::ScaleChanged(::VROSC::TransformMover* transformMover) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::ScaleChanged"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ScaleChanged", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(transformMover)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, transformMover); } // Autogenerated method: VROSC.ThereminParticles.Update void VROSC::ThereminParticles::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::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: VROSC.ThereminParticles.PlayStarted void VROSC::ThereminParticles::PlayStarted(::VROSC::HandType handType, ::Il2CppObject* source) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::PlayStarted"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PlayStarted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handType), ::il2cpp_utils::ExtractType(source)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handType, source); } // Autogenerated method: VROSC.ThereminParticles.PlayStopped void VROSC::ThereminParticles::PlayStopped(::VROSC::HandType handType, ::Il2CppObject* source) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::PlayStopped"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PlayStopped", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handType), ::il2cpp_utils::ExtractType(source)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handType, source); } // Autogenerated method: VROSC.ThereminParticles.GetHandByHandtype ::VROSC::ThereminParticles::Hand* VROSC::ThereminParticles::GetHandByHandtype(::VROSC::HandType handType) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::GetHandByHandtype"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetHandByHandtype", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handType)}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::ThereminParticles::Hand*, false>(this, ___internal__method, handType); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" // Including type: VROSC.ThereminParticles/VROSC.Hand #include "VROSC/ThereminParticles_Hand.hpp" // Including type: UnityEngine.ParticleSystemForceField #include "UnityEngine/ParticleSystemForceField.hpp" // Including type: VROSC.InputDevice #include "VROSC/InputDevice.hpp" // Including type: VROSC.ControllerInputNode #include "VROSC/ControllerInputNode.hpp" // Including type: System.Collections.Generic.List`1 #include "System/Collections/Generic/List_1.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.ParticleSystemForceField _forceField [[deprecated("Use field access instead!")]] ::UnityEngine::ParticleSystemForceField*& VROSC::ThereminParticles::Hand::dyn__forceField() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__forceField"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_forceField"))->offset; return *reinterpret_cast<::UnityEngine::ParticleSystemForceField**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isLeft [[deprecated("Use field access instead!")]] bool& VROSC::ThereminParticles::Hand::dyn__isLeft() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__isLeft"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isLeft"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.InputDevice _inputDevice [[deprecated("Use field access instead!")]] ::VROSC::InputDevice*& VROSC::ThereminParticles::Hand::dyn__inputDevice() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__inputDevice"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_inputDevice"))->offset; return *reinterpret_cast<::VROSC::InputDevice**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isHandInside [[deprecated("Use field access instead!")]] bool& VROSC::ThereminParticles::Hand::dyn__isHandInside() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__isHandInside"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isHandInside"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _isPlaying [[deprecated("Use field access instead!")]] bool& VROSC::ThereminParticles::Hand::dyn__isPlaying() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__isPlaying"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isPlaying"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _initialEndRange [[deprecated("Use field access instead!")]] float& VROSC::ThereminParticles::Hand::dyn__initialEndRange() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__initialEndRange"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_initialEndRange"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.ControllerInputNode _input [[deprecated("Use field access instead!")]] ::VROSC::ControllerInputNode*& VROSC::ThereminParticles::Hand::dyn__input() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__input"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_input"))->offset; return *reinterpret_cast<::VROSC::ControllerInputNode**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Single _scaling [[deprecated("Use field access instead!")]] float& VROSC::ThereminParticles::Hand::dyn__scaling() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__scaling"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_scaling"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Collections.Generic.List`1<System.Object> _players [[deprecated("Use field access instead!")]] ::System::Collections::Generic::List_1<::Il2CppObject*>*& VROSC::ThereminParticles::Hand::dyn__players() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::dyn__players"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_players"))->offset; return *reinterpret_cast<::System::Collections::Generic::List_1<::Il2CppObject*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.ThereminParticles/VROSC.Hand.Setup void VROSC::ThereminParticles::Hand::Setup(bool isLeft, ::VROSC::InputDevice* inputDevice, ::VROSC::ControllerInputNode* input) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::Setup"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Setup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(isLeft), ::il2cpp_utils::ExtractType(inputDevice), ::il2cpp_utils::ExtractType(input)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, isLeft, inputDevice, input); } // Autogenerated method: VROSC.ThereminParticles/VROSC.Hand.HoverEnd void VROSC::ThereminParticles::Hand::HoverEnd(::VROSC::InputDevice* inputDevice) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::HoverEnd"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "HoverEnd", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputDevice)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputDevice); } // Autogenerated method: VROSC.ThereminParticles/VROSC.Hand.HoverBegin void VROSC::ThereminParticles::Hand::HoverBegin(::VROSC::InputDevice* inputDevice) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::HoverBegin"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "HoverBegin", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputDevice)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputDevice); } // Autogenerated method: VROSC.ThereminParticles/VROSC.Hand.SetNewScale void VROSC::ThereminParticles::Hand::SetNewScale(float scale) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::SetNewScale"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetNewScale", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(scale)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, scale); } // Autogenerated method: VROSC.ThereminParticles/VROSC.Hand.ObjectIsPlaying void VROSC::ThereminParticles::Hand::ObjectIsPlaying(bool playing, ::Il2CppObject* source) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::ObjectIsPlaying"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ObjectIsPlaying", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(playing), ::il2cpp_utils::ExtractType(source)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, playing, source); } // Autogenerated method: VROSC.ThereminParticles/VROSC.Hand.SetIsPlaying void VROSC::ThereminParticles::Hand::SetIsPlaying(bool playing) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::SetIsPlaying"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetIsPlaying", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(playing)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, playing); } // Autogenerated method: VROSC.ThereminParticles/VROSC.Hand.Update void VROSC::ThereminParticles::Hand::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::ThereminParticles::Hand::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 from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.ToolSettings #include "VROSC/ToolSettings.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.WidgetSettings #include "VROSC/WidgetSettings.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.Single _spawnHeightModifier [[deprecated("Use field access instead!")]] float& VROSC::WidgetSettings::dyn__spawnHeightModifier() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::dyn__spawnHeightModifier"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_spawnHeightModifier"))->offset; return *reinterpret_cast<float*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private VROSC.WidgetSettings/VROSC.Identifier _id [[deprecated("Use field access instead!")]] ::VROSC::WidgetSettings::Identifier& VROSC::WidgetSettings::dyn__id() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::dyn__id"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_id"))->offset; return *reinterpret_cast<::VROSC::WidgetSettings::Identifier*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.String _displayName [[deprecated("Use field access instead!")]] ::StringW& VROSC::WidgetSettings::dyn__displayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::dyn__displayName"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_displayName"))->offset; return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.WidgetSettings.get_ID ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::get_ID() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::get_ID"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ID", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::VROSC::WidgetSettings::Identifier, false>(this, ___internal__method); } // Autogenerated method: VROSC.WidgetSettings.get_SpawnHeightModifier float VROSC::WidgetSettings::get_SpawnHeightModifier() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::get_SpawnHeightModifier"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_SpawnHeightModifier", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method); } // Autogenerated method: VROSC.WidgetSettings.get_DisplayName ::StringW VROSC::WidgetSettings::get_DisplayName() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::get_DisplayName"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DisplayName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.WidgetSettings/VROSC.Identifier #include "VROSC/WidgetSettings.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 VROSC.WidgetSettings/VROSC.Identifier Organ ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Organ() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Organ"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Organ")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Organ void VROSC::WidgetSettings::Identifier::_set_Organ(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Organ"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Organ", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Board ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Board() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Board"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Board")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Board void VROSC::WidgetSettings::Identifier::_set_Board(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Board"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Board", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Harp ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Harp() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Harp"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Harp")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Harp void VROSC::WidgetSettings::Identifier::_set_Harp(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Harp"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Harp", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Clustr ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Clustr() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Clustr"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Clustr")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Clustr void VROSC::WidgetSettings::Identifier::_set_Clustr(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Clustr"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Clustr", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Wavemin ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Wavemin() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Wavemin"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Wavemin")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Wavemin void VROSC::WidgetSettings::Identifier::_set_Wavemin(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Wavemin"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Wavemin", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Drumkit ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Drumkit() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Drumkit"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Drumkit")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Drumkit void VROSC::WidgetSettings::Identifier::_set_Drumkit(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Drumkit"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Drumkit", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Empads ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Empads() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Empads"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Empads")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Empads void VROSC::WidgetSettings::Identifier::_set_Empads(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Empads"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Empads", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Effects ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Effects() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Effects"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Effects")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Effects void VROSC::WidgetSettings::Identifier::_set_Effects(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Effects"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Effects", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Looper ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Looper() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Looper"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Looper")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Looper void VROSC::WidgetSettings::Identifier::_set_Looper(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Looper"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Looper", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier Microphone ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_Microphone() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_Microphone"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "Microphone")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier Microphone void VROSC::WidgetSettings::Identifier::_set_Microphone(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_Microphone"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "Microphone", value)); } // Autogenerated static field getter // Get static field: static public VROSC.WidgetSettings/VROSC.Identifier TapeRecorder ::VROSC::WidgetSettings::Identifier VROSC::WidgetSettings::Identifier::_get_TapeRecorder() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_get_TapeRecorder"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<::VROSC::WidgetSettings::Identifier>("VROSC", "WidgetSettings/Identifier", "TapeRecorder")); } // Autogenerated static field setter // Set static field: static public VROSC.WidgetSettings/VROSC.Identifier TapeRecorder void VROSC::WidgetSettings::Identifier::_set_TapeRecorder(::VROSC::WidgetSettings::Identifier value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::_set_TapeRecorder"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "WidgetSettings/Identifier", "TapeRecorder", value)); } // Autogenerated instance field getter // Get instance field: public System.Int32 value__ [[deprecated("Use field access instead!")]] int& VROSC::WidgetSettings::Identifier::dyn_value__() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::WidgetSettings::Identifier::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: VROSC.BandVisualizerTester #include "VROSC/BandVisualizerTester.hpp" // Including type: UnityEngine.Transform #include "UnityEngine/Transform.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private System.Int32 _numberOfBands [[deprecated("Use field access instead!")]] int& VROSC::BandVisualizerTester::dyn__numberOfBands() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BandVisualizerTester::dyn__numberOfBands"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_numberOfBands"))->offset; return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private System.Boolean _currentPlayingOnly [[deprecated("Use field access instead!")]] bool& VROSC::BandVisualizerTester::dyn__currentPlayingOnly() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BandVisualizerTester::dyn__currentPlayingOnly"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentPlayingOnly"))->offset; return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated instance field getter // Get instance field: private UnityEngine.Transform[] _bandTransforms [[deprecated("Use field access instead!")]] ::ArrayW<::UnityEngine::Transform*>& VROSC::BandVisualizerTester::dyn__bandTransforms() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BandVisualizerTester::dyn__bandTransforms"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bandTransforms"))->offset; return *reinterpret_cast<::ArrayW<::UnityEngine::Transform*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.BandVisualizerTester.Awake void VROSC::BandVisualizerTester::Awake() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BandVisualizerTester::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: VROSC.BandVisualizerTester.Update void VROSC::BandVisualizerTester::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::BandVisualizerTester::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 from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.DebugSettings #include "VROSC/DebugSettings.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated static field getter // Get static field: static public System.Boolean DisableSpectatorCamera bool VROSC::DebugSettings::_get_DisableSpectatorCamera() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::_get_DisableSpectatorCamera"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("VROSC", "DebugSettings", "DisableSpectatorCamera")); } // Autogenerated static field setter // Set static field: static public System.Boolean DisableSpectatorCamera void VROSC::DebugSettings::_set_DisableSpectatorCamera(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::_set_DisableSpectatorCamera"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "DebugSettings", "DisableSpectatorCamera", value)); } // Autogenerated static field getter // Get static field: static public System.Boolean ShowReactToBeatLines bool VROSC::DebugSettings::_get_ShowReactToBeatLines() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::_get_ShowReactToBeatLines"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("VROSC", "DebugSettings", "ShowReactToBeatLines")); } // Autogenerated static field setter // Set static field: static public System.Boolean ShowReactToBeatLines void VROSC::DebugSettings::_set_ShowReactToBeatLines(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::_set_ShowReactToBeatLines"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "DebugSettings", "ShowReactToBeatLines", value)); } // Autogenerated static field getter // Get static field: static public System.Boolean ShowLoopData bool VROSC::DebugSettings::_get_ShowLoopData() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::_get_ShowLoopData"); return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("VROSC", "DebugSettings", "ShowLoopData")); } // Autogenerated static field setter // Set static field: static public System.Boolean ShowLoopData void VROSC::DebugSettings::_set_ShowLoopData(bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::_set_ShowLoopData"); THROW_UNLESS(il2cpp_utils::SetFieldValue("VROSC", "DebugSettings", "ShowLoopData", value)); } // Autogenerated method: VROSC.DebugSettings.SaveValues void VROSC::DebugSettings::SaveValues() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::SaveValues"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "DebugSettings", "SaveValues", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method); } // Autogenerated method: VROSC.DebugSettings.WriteBool void VROSC::DebugSettings::WriteBool(::StringW key, bool value) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::WriteBool"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "DebugSettings", "WriteBool", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key), ::il2cpp_utils::ExtractType(value)}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, key, value); } // Autogenerated method: VROSC.DebugSettings.ReadBool bool VROSC::DebugSettings::ReadBool(::StringW key) { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::ReadBool"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "DebugSettings", "ReadBool", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(key)}))); return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, key); } // Autogenerated method: VROSC.DebugSettings.LoadValues void VROSC::DebugSettings::LoadValues() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::DebugSettings::LoadValues"); static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("VROSC", "DebugSettings", "LoadValues", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{}))); ::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method); } // Autogenerated from CppSourceCreator // Created by Sc2ad // ========================================================================= // Begin includes // Including type: VROSC.FPSCounter #include "VROSC/FPSCounter.hpp" // Including type: UnityEngine.TextMesh #include "UnityEngine/TextMesh.hpp" #include "beatsaber-hook/shared/utils/il2cpp-utils.hpp" #include "beatsaber-hook/shared/utils/utils.h" // Completed includes // Autogenerated instance field getter // Get instance field: private UnityEngine.TextMesh _textMesh [[deprecated("Use field access instead!")]] ::UnityEngine::TextMesh*& VROSC::FPSCounter::dyn__textMesh() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::FPSCounter::dyn__textMesh"); auto ___internal__instance = this; static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_textMesh"))->offset; return *reinterpret_cast<::UnityEngine::TextMesh**>(reinterpret_cast<char*>(this) + ___internal__field__offset); } // Autogenerated method: VROSC.FPSCounter.Start void VROSC::FPSCounter::Start() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::FPSCounter::Start"); static 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: VROSC.FPSCounter.Update void VROSC::FPSCounter::Update() { static auto ___internal__logger = ::Logger::get().WithContext("::VROSC::FPSCounter::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); }
74.109873
347
0.77888
v0idp
c07d3212b4309c24b447e829319b33768a9187ec
1,867
cpp
C++
Clase_22_StringsSuffixArray/how_many_substrings.cpp
EdgarEspinozaPE/ProgramacionCompetitivaA
53c3eb3e2bc9f1dd1033e0c24b0cb24f96def1e9
[ "BSD-3-Clause" ]
null
null
null
Clase_22_StringsSuffixArray/how_many_substrings.cpp
EdgarEspinozaPE/ProgramacionCompetitivaA
53c3eb3e2bc9f1dd1033e0c24b0cb24f96def1e9
[ "BSD-3-Clause" ]
null
null
null
Clase_22_StringsSuffixArray/how_many_substrings.cpp
EdgarEspinozaPE/ProgramacionCompetitivaA
53c3eb3e2bc9f1dd1033e0c24b0cb24f96def1e9
[ "BSD-3-Clause" ]
null
null
null
#include <iostream> #include <vector> #include <algorithm> using namespace std; const long long int limit = 1e5 + 5; int sa[limit], lcp[limit], tmp[limit], pos[limit]; int n = 0, t = 0; string seq; bool compare(int i, int j) { if (pos[i] != pos[j]) return (pos[i] < pos[j]); i += t; j += t; if (i < n && j < n) return (pos[i] < pos[j]); return (i > j); } void suffixArray() { for (int i = 0; i < n; i++) { sa[i] = i; pos[i] = seq[i]; } for (t = 1; t < 2 * n + 1; t *= 2) { sort(sa, sa + n, compare); for (int i = 0; i < n - 1; i++) { tmp[i + 1] = tmp[i]; if (compare(sa[i], sa[i + 1])) tmp[i + 1]++; } for (int i = 0; i < n; i++) { pos[sa[i]] = tmp[i]; } if (tmp[n - 1] == n - 1) break; } } void find_lcp() { int ans = 0; int p = 0; int sum = (n * (n + 1)) / 2; for (int i = 0; i < n; i++) { if (pos[i] != n - 1) { int j = sa[pos[i] + 1]; while (seq[i + p] == seq[j + p]) p++; lcp[pos[i]] = p; ans += p; if (p > 0) p--; } } cout << sum - ans << "\n"; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int x = 0; string temp; while (true) { cin >> temp; if (temp == "0") break; int k = temp.length(); for (int i = 0; i < k; i++) { if (temp[i] == '?') { suffixArray(); find_lcp(); } else { seq += temp[i]; n++; } } n = 0; seq.clear(); } return 0; }
21.709302
51
0.33744
EdgarEspinozaPE
c07fac24fa7ebe1da8371d7d9ebe27c117c16292
1,907
cpp
C++
SNESticle/Source/dc/input.cpp
Sunlitspace542/SNESticle
9590ebf3bf768424ebd6cb018f322e724a7aade3
[ "MIT" ]
318
2022-01-15T23:35:01.000Z
2022-03-24T13:37:20.000Z
SNESticle/Source/dc/input.cpp
Sunlitspace542/SNESticle
9590ebf3bf768424ebd6cb018f322e724a7aade3
[ "MIT" ]
2
2022-01-25T23:58:23.000Z
2022-01-30T21:59:09.000Z
SNESticle/Source/dc/input.cpp
Sunlitspace542/SNESticle
9590ebf3bf768424ebd6cb018f322e724a7aade3
[ "MIT" ]
46
2022-01-17T22:46:08.000Z
2022-03-06T16:52:00.000Z
#include "types.h" #include "input.h" #include "inputdevice.h" //#include "inputkeyboard.h" //#include "inputmouse.h" //#include "inputjoystick.h" // physical devices static CInputDevice _Input_Null; //static CInputMouse _Input_Mouse; //static CInputKeyboard _Input_Keyboard; //static CInputJoystick _Input_Joystick0(0); //static CInputJoystick _Input_Joystick1(1); //static CInputJoystick _Input_Joystick2(2); //static CInputJoystick _Input_Joystick3(3); // logical devices static CInputMap _Input_Device[INPUT_DEVICE_NUM]; CInputDevice *InputGetDevice(InputDeviceE eDevice) { return &_Input_Device[eDevice]; } void InputSetMapping(InputDeviceE eDevice, Int32 nMap, Uint8 *pMap) { _Input_Device[eDevice].SetMapping(nMap, pMap); } void InputInit() { // set devices _Input_Device[INPUT_DEVICE_NULL].SetDevice(&_Input_Null); /* _Input_Device[INPUT_DEVICE_MOUSE].SetDevice(&_Input_Mouse); _Input_Device[INPUT_DEVICE_KEYBOARD0].SetDevice(&_Input_Keyboard); _Input_Device[INPUT_DEVICE_KEYBOARD1].SetDevice(&_Input_Keyboard); _Input_Device[INPUT_DEVICE_KEYBOARD2].SetDevice(&_Input_Keyboard); _Input_Device[INPUT_DEVICE_KEYBOARD3].SetDevice(&_Input_Keyboard); _Input_Device[INPUT_DEVICE_JOYSTICK0].SetDevice(&_Input_Joystick0); _Input_Device[INPUT_DEVICE_JOYSTICK1].SetDevice(&_Input_Joystick1); _Input_Device[INPUT_DEVICE_JOYSTICK2].SetDevice(&_Input_Joystick2); _Input_Device[INPUT_DEVICE_JOYSTICK3].SetDevice(&_Input_Joystick3); */ } void InputShutdown() { } void InputPoll() { Int32 iDevice; // poll physical devices // _Input_Mouse.Poll(); // _Input_Keyboard.Poll(); // _Input_Joystick0.Poll(); // _Input_Joystick1.Poll(); // _Input_Joystick2.Poll(); // _Input_Joystick3.Poll(); // poll logical devices for (iDevice=0; iDevice < INPUT_DEVICE_NUM; iDevice++) { _Input_Device[iDevice].Poll(); } }
25.77027
69
0.75721
Sunlitspace542
c088aa1b207111d8e74f737fddaa0f55a6b3f4e3
2,531
cc
C++
examples/tutorial/06_optional.cc
chip5441/ezy
4e4ed4edcfe182b4a6b5fd3459a67200474013ec
[ "MIT" ]
2
2019-12-12T13:40:27.000Z
2022-01-12T15:52:06.000Z
examples/tutorial/06_optional.cc
chip5441/ezy
4e4ed4edcfe182b4a6b5fd3459a67200474013ec
[ "MIT" ]
null
null
null
examples/tutorial/06_optional.cc
chip5441/ezy
4e4ed4edcfe182b4a6b5fd3459a67200474013ec
[ "MIT" ]
2
2020-07-06T14:55:46.000Z
2020-12-25T04:50:50.000Z
#include <ezy/optional> #include <ezy/string.h> ezy::optional<int> even(int i) { if (i % 2 == 0) return i; else return std::nullopt; } // explicit constructible, because extended type #include <iostream> int main() { //1. const auto from_ten = even(10); std::cout << from_ten.value() << "\n"; //2. // BAD const auto from_eleven = even(11); //std::cout << from_eleven.value() << "\n"; if (from_eleven.has_value()) { std::cout << from_eleven.value() << "\n"; } //3. auto print_line = [](auto&& i) { std::cout << i << "\n"; }; print_line("{"); from_ten.tee(print_line); from_eleven.tee(print_line); print_line("}"); print_line(even(10).value_or(-100)); print_line(even(11).value_or(-100)); /* value_or int --------+-------> int / nullopt --+ int f(int) map(f) int ------> f() ----> int nullopt ------------> nullopt string f(int) map(f) int ------> f() ------> string nullopt --------------> nullopt optional<T> f(int) and_then(h) int ------> h() ----> T \ nullopt -------+----> nullopt */ //4. print_line(from_ten.map([](int i) {return i + 10;}).value_or(-100)); print_line(from_eleven.map([](int i) {return i + 10;}).value_or(-100)); //5. auto half = [](int i){ return i / 2; }; print_line(from_ten.map(half).value_or(-100)); print_line(from_eleven.map(half).value_or(-100)); print_line(from_ten.map(half).and_then(even).value_or(-100)); print_line(from_eleven.map(half).and_then(even).value_or(-100)); print_line(even(16).map(half).and_then(even).value_or(-100)); /* even(16).map(half).and_then(even).map_or(ezy::to_string, "none") even(16) . map(half) . and_then(even) . map_or(ezy::to_string, "none"); | | | | | int -----> even() --------> half() -----> even() ---------> to_string ---------+---------> string \ \ / nullopt +------------------------------+----------------------------+ */ //6. print_line(even(10).map(ezy::to_string).value_or("none")); print_line(even(11).map(ezy::to_string).value_or("none")); print_line(even(10).map_or(ezy::to_string, "none")); print_line(even(11).map_or(ezy::to_string, "none")); // // optional references are not supported // link to ezy::pointer return 5; }
21.268908
101
0.498222
chip5441
c08abefc91e3fc73abee90d05bb5633c962430ee
1,202
cpp
C++
src/Assembler.cpp
cruzryan/MicroLang
4e7861d33de5b7e4114df4d06379bad8ff453baf
[ "MIT" ]
null
null
null
src/Assembler.cpp
cruzryan/MicroLang
4e7861d33de5b7e4114df4d06379bad8ff453baf
[ "MIT" ]
null
null
null
src/Assembler.cpp
cruzryan/MicroLang
4e7861d33de5b7e4114df4d06379bad8ff453baf
[ "MIT" ]
null
null
null
//The assembler turns AST into Assembly the PIC can understand namespace Assembler { using namespace Tokenizer; using AST::Node; using std::vector; /*This is to make sure the user doesn't create the same variable name, or same function name twice*/ vector<std::string> variableNamesGenerated; vector<std::string> functionNamesGenerated; void generateVariable(Node* node); void nodeAction(Node* node){ auto nodeType = node->tokentype; switch(nodeType){ case TokenType::VAR: generateVariable(node); break; } } void generateVariable(Node* node){ std::string var_value; // if(node->type == "bool"){ // if(node->value == "true") var_value = "11111111"; // else var_value = "00000000"; // } // if(node->type == "string"){ // //TO-DO // } } void parseTheTree(Node* node){ for(int n = 0; n < node->getNumberOfNodes(); n++){ auto tempNode = node->getNode(n); } } void MakeAssembly(Node* root){ Logger::Dev("|r(ASM) |wStarting assembler"); } }
21.854545
64
0.553245
cruzryan
c090d98cd71277fa6664d7ada9ddbcbf5e61b092
356
cpp
C++
lib/swf/src/tags/ScriptLimitsTag.cpp
Athesdrake/swflib
b901136e646451d269c1cafd0ceee57928e7c12d
[ "MIT" ]
3
2021-06-19T23:05:55.000Z
2021-06-22T11:53:42.000Z
lib/swf/src/tags/ScriptLimitsTag.cpp
Athesdrake/swflib
b901136e646451d269c1cafd0ceee57928e7c12d
[ "MIT" ]
null
null
null
lib/swf/src/tags/ScriptLimitsTag.cpp
Athesdrake/swflib
b901136e646451d269c1cafd0ceee57928e7c12d
[ "MIT" ]
null
null
null
#include "swf/tags/ScriptLimitsTag.h" namespace swf { void ScriptLimitsTag::read(StreamReader&& stream) { max_recursion_depth = stream.readU16(); script_timeout_seconds = stream.readU16(); } void ScriptLimitsTag::write(StreamWriter& stream) { stream.writeU16(max_recursion_depth); stream.writeU16(script_timeout_seconds); } }
29.666667
52
0.733146
Athesdrake
c092bb7019db2eaa0b941a0ce7b8ef324d2696b4
2,015
cpp
C++
vkconfig_core/version.cpp
ncesario-lunarg/VulkanTools
3ea8ac1d278a4412e34e443063cad90632bbbc3b
[ "Apache-2.0" ]
1
2021-03-04T03:33:44.000Z
2021-03-04T03:33:44.000Z
vkconfig_core/version.cpp
ncesario-lunarg/VulkanTools
3ea8ac1d278a4412e34e443063cad90632bbbc3b
[ "Apache-2.0" ]
null
null
null
vkconfig_core/version.cpp
ncesario-lunarg/VulkanTools
3ea8ac1d278a4412e34e443063cad90632bbbc3b
[ "Apache-2.0" ]
null
null
null
/* * Copyright (c) 2020 Valve Corporation * Copyright (c) 2020 LunarG, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Authors: * - Richard S. Wright Jr. <richard@lunarg.com> * - Christophe Riccio <christophe@lunarg.com> */ #include "version.h" #include "util.h" #include <vulkan/vulkan.h> #include <cstdio> #include <cassert> #include <cstring> const Version Version::VKCONFIG(2, 0, 3); const Version Version::VKHEADER(VK_HEADER_VERSION_COMPLETE); const Version Version::VERSION_NULL(0u); static uint32_t GetVersionData(const char* version) { uint32_t version_major = 0; uint32_t version_minor = 0; uint32_t version_patch = 0; sscanf(version, "%d.%d.%d", &version_major, &version_minor, &version_patch); return VK_MAKE_VERSION(version_major, version_minor, version_patch); } Version::Version(uint32_t version_major, uint32_t version_minor, uint32_t version_patch) : _data(VK_MAKE_VERSION(version_major, version_minor, version_patch)) {} Version::Version(const char* version) : _data(GetVersionData(version)) {} Version::Version(const QString& version) : Version(version.toUtf8().constData()) {} uint32_t Version::GetMajor() const { return VK_VERSION_MAJOR(_data); } uint32_t Version::GetMinor() const { return VK_VERSION_MINOR(_data); } uint32_t Version::GetPatch() const { return VK_VERSION_PATCH(_data); } std::string Version::str() const { return format("%d.%d.%d", VK_VERSION_MAJOR(_data), VK_VERSION_MINOR(_data), VK_VERSION_PATCH(_data)); }
33.032787
105
0.740943
ncesario-lunarg
6a4d2abb9385c5b81013a214742c69e6c542f6a5
1,139
cpp
C++
niuma_esp32/src/compass.cpp
earth-probe/NiuMa
8a651d49ee47d54289bc62ee19c8e5007b640fae
[ "MIT" ]
null
null
null
niuma_esp32/src/compass.cpp
earth-probe/NiuMa
8a651d49ee47d54289bc62ee19c8e5007b640fae
[ "MIT" ]
null
null
null
niuma_esp32/src/compass.cpp
earth-probe/NiuMa
8a651d49ee47d54289bc62ee19c8e5007b640fae
[ "MIT" ]
null
null
null
#include <Arduino.h> #include "debug.hpp" #include "DFRobot_QMC5883/DFRobot_QMC5883.h" void setupCompass(void); void readCompass(void); DFRobot_QMC5883 compass; void CompassTask( void * parameter) { int core = xPortGetCoreID(); LOG_I(core); setupCompass(); for(;;) {// readCompass(); delay(1); } } #include <Wire.h> void setupCompass(void) { auto goodWire = Wire.begin(); LOG_I(goodWire); while (!compass.begin()){ Serial.println("Could not find a valid QMC5883 sensor, check wiring!"); delay(500); } LOG_I(compass.isHMC()); LOG_I(compass.isQMC()); LOG_I(compass.isVCM()); } static const long constReadImuIntervalMS = 16; extern volatile float magnetX; extern volatile float magnetY; extern volatile float magnetZ; void readCompass(void) { static long previousMillis = 0; auto nowMS = millis(); if(nowMS - previousMillis < constReadImuIntervalMS) { return; } previousMillis = nowMS; auto magnet = compass.readRaw(); //LOG_I(magnet.XAxis); //LOG_I(magnet.YAxis); //LOG_I(magnet.ZAxis); magnetX = magnet.XAxis ; magnetY = magnet.YAxis ; magnetZ = magnet.ZAxis; }
19.982456
75
0.690079
earth-probe
6a4fbe013032d1a8ae0102a90a58a659e9d0560b
13,716
cpp
C++
src/CCS811/CCS811.cpp
jspark311/ManuvrDrivers
3352d1394393b891ea50d5b3d36e04dea2949d72
[ "MIT" ]
4
2020-09-19T08:29:20.000Z
2021-12-14T15:21:25.000Z
src/CCS811/CCS811.cpp
jspark311/ManuvrDrivers
3352d1394393b891ea50d5b3d36e04dea2949d72
[ "MIT" ]
1
2021-02-14T09:32:32.000Z
2021-07-24T05:02:28.000Z
src/CCS811/CCS811.cpp
jspark311/ManuvrDrivers
3352d1394393b891ea50d5b3d36e04dea2949d72
[ "MIT" ]
null
null
null
/* * This file started out as a SparkFun driver. The original license is preserved * below. * https://github.com/adafruit/Adafruit_CCS811 */ /* The MIT License (MIT) Copyright (c) 2017 Adafruit Industries 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 "CCS811.h" CCS811::~CCS811() { } /*! @brief Setups the I2C interface and hardware and checks for communication. @param addr Optional I2C address the sensor can be found on. Default is 0x5A @param theWire Optional pointer to I2C interface, &Wire is used by default @returns True if device is set up, false on any failure */ bool CCS811::init() { SWReset(); delay(100); // check that the HW id is correct if (this->read8(CCS811_HW_ID) != CCS811_HW_ID_CODE) return false; // try to start the app this->write(CCS811_BOOTLOADER_APP_START, NULL, 0); delay(100); // make sure there are no errors and we have entered application mode if (checkError()) return false; if (!_status.FW_MODE) return false; disableInterrupt(); // default to read every second setDriveMode(CCS811_DRIVE_MODE_1SEC); return true; } int8_t CCS811::poll() { int8_t ret = -3; return ret; } int8_t CCS811::refresh() { int8_t ret = -3; return ret; } /* * Dump this item to the dev log. */ void CCS811::printDebug(StringBuilder* output) { output->concatf("-- CCS811 %sinitialized\n", (initialized() ? "" : "un")); I2CDevice::printDebug(output); output->concatf("\tFound: %c\n", (devFound() ? 'y' : 'n')); output->concatf("\tRead in-flight: %c\n", (_flags.value(CCS811_FLAG_READ_IN_FLIGHT) ? 'y' : 'n')); output->concatf("\t_last_read: %u\n", _last_read); output->concatf("\t_TVOC: %u\n", _TVOC); output->concatf("\t_eCO2: %u\n", _eCO2); output->concatf("\t_currentSelected: %u\n", _currentSelected); output->concatf("\t_rawADCreading: %u\n", _rawADCreading); output->concatf("\t_tempOffset: %.3f\n", _tempOffset); } /*! @brief sample rate of the sensor. @param mode one of CCS811_DRIVE_MODE_IDLE, CCS811_DRIVE_MODE_1SEC, CCS811_DRIVE_MODE_10SEC, CCS811_DRIVE_MODE_60SEC, CCS811_DRIVE_MODE_250MS. */ void CCS811::setDriveMode(uint8_t mode) { _meas_mode.DRIVE_MODE = mode; this->write8(CCS811_MEAS_MODE, _meas_mode.get()); } /**************************************************************************/ /*! @brief enable the data ready interrupt pin on the device. */ /**************************************************************************/ void CCS811::enableInterrupt() { _meas_mode.INT_DATARDY = 1; this->write8(CCS811_MEAS_MODE, _meas_mode.get()); } /**************************************************************************/ /*! @brief disable the data ready interrupt pin on the device */ /**************************************************************************/ void CCS811::disableInterrupt() { _meas_mode.INT_DATARDY = 0; this->write8(CCS811_MEAS_MODE, _meas_mode.get()); } /**************************************************************************/ /*! @brief checks if data is available to be read. @returns True if data is ready, false otherwise. */ /**************************************************************************/ bool CCS811::available() { _status.set(read8(CCS811_STATUS)); if (!_status.DATA_READY) return false; else return true; } /**************************************************************************/ /*! @brief read and store the sensor data. This data can be accessed with getTVOC(), geteCO2(), getCurrentSelected() and getRawADCreading() @returns 0 if no error, error code otherwise. */ /**************************************************************************/ uint8_t CCS811::readData() { if (!available()) return false; else { uint8_t buf[8]; this->read(CCS811_ALG_RESULT_DATA, buf, 8); _eCO2 = ((uint16_t)buf[0] << 8) | ((uint16_t)buf[1]); _TVOC = ((uint16_t)buf[2] << 8) | ((uint16_t)buf[3]); _currentSelected = ((uint16_t)buf[6] >> 2); _rawADCreading = ((uint16_t)(buf[6] & 3) << 8) | ((uint16_t)buf[7]); if (_status.ERROR) return buf[5]; else return 0; } } /**************************************************************************/ /*! @brief set the humidity and temperature compensation for the sensor. @param humidity the humidity data as a percentage. For 55.5% humidity, pass in 55.5 @param temperature the temperature in degrees C as a decimal number. For 25.5 degrees C, pass in 25.5 */ /**************************************************************************/ void CCS811::setEnvironmentalData(float humidity, float temperature) { /* Humidity is stored as an unsigned 16 bits in 1/512%RH. The default value is 50% = 0x64, 0x00. As an example 48.5% humidity would be 0x61, 0x00.*/ /* Temperature is stored as an unsigned 16 bits integer in 1/512 degrees; there is an offset: 0 maps to -25°C. The default value is 25°C = 0x64, 0x00. As an example 23.5% temperature would be 0x61, 0x00. The internal algorithm uses these values (or default values if not set by the application) to compensate for changes in relative humidity and ambient temperature.*/ uint16_t hum_conv = humidity * 512.0f + 0.5f; uint16_t temp_conv = (temperature + 25.0f) * 512.0f + 0.5f; uint8_t buf[] = { (uint8_t)((hum_conv >> 8) & 0xFF), (uint8_t)(hum_conv & 0xFF), (uint8_t)((temp_conv >> 8) & 0xFF), (uint8_t)(temp_conv & 0xFF)}; this->write(CCS811_ENV_DATA, buf, 4); } /**************************************************************************/ /*! @brief get the current baseline from the sensor. @returns the baseline as 16 bit integer. This value is not human readable. */ /**************************************************************************/ uint16_t CCS811::getBaseline() { /* baseline is not in a human readable format, the two bytes are assembled to an uint16_t for easy handling/passing around */ uint8_t buf[2]; this->read(CCS811_BASELINE, buf, 2); return ((uint16_t)buf[0] << 8) | ((uint16_t)buf[1]); } /**************************************************************************/ /*! @brief set the baseline for the sensor. @param baseline the baseline to be set. Has to be a value retrieved by getBaseline(). */ /**************************************************************************/ void CCS811::setBaseline(uint16_t baseline) { /* baseline is not in a human readable format, byte ordering matches getBaseline() */ uint8_t buf[] = {(uint8_t)((baseline >> 8) & 0xFF), (uint8_t)(baseline & 0xFF)}; this->write(CCS811_BASELINE, buf, 2); } /**************************************************************************/ /*! @deprecated hardware support removed by vendor @brief calculate the temperature using the onboard NTC resistor. @returns temperature as a double. */ /**************************************************************************/ double CCS811::calculateTemperature() { uint8_t buf[4]; this->read(CCS811_NTC, buf, 4); uint32_t vref = ((uint32_t)buf[0] << 8) | buf[1]; uint32_t vntc = ((uint32_t)buf[2] << 8) | buf[3]; // from ams ccs811 app note uint32_t rntc = vntc * CCS811_REF_RESISTOR / vref; double ntc_temp; ntc_temp = log((double)rntc / CCS811_REF_RESISTOR); // 1 ntc_temp /= 3380; // 2 ntc_temp += 1.0 / (25 + 273.15); // 3 ntc_temp = 1.0 / ntc_temp; // 4 ntc_temp -= 273.15; // 5 return ntc_temp - _tempOffset; } /**************************************************************************/ /*! @brief set interrupt thresholds @param low_med the level below which an interrupt will be triggered. @param med_high the level above which the interrupt will ge triggered. @param hysteresis optional histeresis level. Defaults to 50 */ /**************************************************************************/ void CCS811::setThresholds(uint16_t low_med, uint16_t med_high, uint8_t hysteresis) { uint8_t buf[] = {(uint8_t)((low_med >> 8) & 0xF), (uint8_t)(low_med & 0xF), (uint8_t)((med_high >> 8) & 0xF), (uint8_t)(med_high & 0xF), hysteresis}; this->write(CCS811_THRESHOLDS, buf, 5); } /**************************************************************************/ /*! @brief trigger a software reset of the device */ /**************************************************************************/ void CCS811::SWReset() { // reset sequence from the datasheet uint8_t seq[] = {0x11, 0xE5, 0x72, 0x8A}; this->write(CCS811_SW_RESET, seq, 4); } /**************************************************************************/ /*! @brief read the status register and store any errors. @returns the error bits from the status register of the device. */ /**************************************************************************/ bool CCS811::checkError() { _status.set(read8(CCS811_STATUS)); return _status.ERROR; } /**************************************************************************/ /*! @brief write one byte of data to the specified register @param reg the register to write to @param value the value to write */ /**************************************************************************/ void CCS811::write8(byte reg, byte value) { this->write(reg, &value, 1); } /**************************************************************************/ /*! @brief read one byte of data from the specified register @param reg the register to read @returns one byte of register data */ /**************************************************************************/ uint8_t CCS811::read8(byte reg) { uint8_t ret; this->read(reg, &ret, 1); return ret; } void CCS811::read(uint8_t reg, uint8_t *buf, uint8_t num) { uint8_t buffer[1] = {reg}; i2c_dev->write_then_read(buffer, 1, buf, num); } void CCS811::write(uint8_t reg, uint8_t *buf, uint8_t num) { uint8_t prefix[1] = {reg}; i2c_dev->write(buf, num, true, prefix, 1); } /******************************************************************************* * ___ _ _ These members are mandatory overrides * | / / \ o | \ _ o _ _ for implementing I/O callbacks. They * _|_ / \_/ o |_/ (/_ \/ | (_ (/_ are also implemented by Adapters. *******************************************************************************/ /* Transfers always permitted. */ int8_t CCS811::io_op_callahead(BusOp* _op) { return 0; } /* * Register I/O calls back to this function for BOTH devices (MAG/IMU). So we * split the function up into two halves in private scope in the superclass. * Bus operations that call back with errors are ignored. */ int8_t CCS811::io_op_callback(BusOp* _op) { I2CBusOp* op = (I2CBusOp*) _op; int8_t ret = BUSOP_CALLBACK_NOMINAL; if (!op->hasFault()) { uint8_t* buf = op->buffer(); AS3935Reg r = (AS3935Reg) op->sub_addr; switch (op->get_opcode()) { case BusOpcode::TX_CMD: _flags.set(CCS811_FLAG_DEVICE_PRESENT); _priv_init(); break; case BusOpcode::TX: switch (r) { case CCS811Reg::STATUS: case CCS811Reg::MEAS_MODE: case CCS811Reg::ALG_RESULT_DATA: case CCS811Reg::RAW_DATA: case CCS811Reg::ENV_DATA: case CCS811Reg::NTC: case CCS811Reg::THRESHOLDS: case CCS811Reg::BASELINE: case CCS811Reg::HW_ID: case CCS811Reg::HW_VERSION: case CCS811Reg::FW_BOOT_VERSION: case CCS811Reg::FW_APP_VERSION: case CCS811Reg::ERROR_ID: case CCS811Reg::SW_RESET: break; default: // All other registers are read-only. break; } break; case BusOpcode::RX: switch (r) { case CCS811Reg::STATUS: case CCS811Reg::MEAS_MODE: case CCS811Reg::ALG_RESULT_DATA: case CCS811Reg::RAW_DATA: case CCS811Reg::ENV_DATA: case CCS811Reg::NTC: case CCS811Reg::THRESHOLDS: case CCS811Reg::BASELINE: case CCS811Reg::HW_ID: case CCS811Reg::HW_VERSION: case CCS811Reg::FW_BOOT_VERSION: case CCS811Reg::FW_APP_VERSION: case CCS811Reg::ERROR_ID: case CCS811Reg::SW_RESET: break; default: break; } break; default: break; } } else if (BusOpcode::TX_CMD == op->get_opcode()) { _flags.clear(CCS811_FLAG_DEVICE_PRESENT); } return ret; }
32.657143
102
0.554899
jspark311
6a5348fc7664b26751640c1c19d217dcb4f9eda7
32,908
cpp
C++
src/Python/fastgac_pybind/fastgac_pybind.cpp
JeremyBYU/FastGaussianAccumulator
995c1cb53485212bc2c71dad3ed3834caaa1f45b
[ "MIT" ]
4
2020-10-20T15:54:00.000Z
2021-09-05T22:24:57.000Z
src/Python/fastgac_pybind/fastgac_pybind.cpp
JeremyBYU/GaussianAccumulator
995c1cb53485212bc2c71dad3ed3834caaa1f45b
[ "MIT" ]
1
2021-06-09T03:32:14.000Z
2021-06-09T03:32:14.000Z
src/Python/fastgac_pybind/fastgac_pybind.cpp
JeremyBYU/GaussianAccumulator
995c1cb53485212bc2c71dad3ed3834caaa1f45b
[ "MIT" ]
1
2021-04-13T09:24:30.000Z
2021-04-13T09:24:30.000Z
#include "fastgac_pybind/fastgac_pybind.hpp" #include "fastgac_pybind/docstring/docstring.hpp" using namespace FastGA; // Makes a copy template <typename T, int dim> std::vector<std::array<T, dim>> py_array_to_vectors(py::array_t<double, py::array::c_style | py::array::forcecast> array) { // return std::vector<std::array<T, dim>>(); if (array.ndim() != 2 || array.shape(1) != dim) { throw py::cast_error(); } std::vector<std::array<T, dim>> vectors_T(array.shape(0)); auto array_unchecked = array.mutable_unchecked<2>(); for (auto i = 0; i < array_unchecked.shape(0); ++i) { for (auto j = 0; j < dim; j++) { vectors_T[i][j] = array_unchecked(i, j); } } return vectors_T; } PYBIND11_MODULE(fastgac_pybind, m) { m.doc() = "Python binding of FastGA"; py::bind_vector<std::vector<std::size_t>>( m, "VectorULongInt", py::buffer_protocol(), "Contiguous buffer of Uint64. Use np.asarray() to get to get numpy array."); py::bind_vector<std::vector<uint8_t>>(m, "VectorUInt8", py::buffer_protocol(), "Contiguous buffer of Uint8. Use np.asarray() to get to get numpy array."); py::bind_vector<std::vector<double>>(m, "VectorDouble", py::buffer_protocol(), "Contiguous buffer of Float64. Use np.asarray() to get to get numpy array."); py::bind_vector<std::vector<int>>(m, "VectorInt", py::buffer_protocol(), "Contiguous buffer of Int32. Use np.asarray() to get to get numpy array."); py::class_<FastGA::MatX3d>( m, "MatX3d", py::buffer_protocol(), "NX3 Matrix (Double) representation of numpy array. Use np.asarray() to get numpy array.") // .def(py::init([](py::array_t<double, py::array::c_style> my_array) {return FastGA::MatX3d();} )) .def(py::init(&py_array_to_vectors<double, 3>)) .def_buffer([](FastGA::MatX3d& m) -> py::buffer_info { const size_t cols = 3; return py::buffer_info(m.data(), /* Pointer to buffer */ sizeof(double), /* Size of one scalar */ py::format_descriptor<double>::format(), /* Python struct-style format descriptor */ 2UL, /* Number of dimensions */ {m.size(), cols}, /* Buffer dimensions */ {sizeof(double) * cols, /* Strides (in bytes) for each index */ sizeof(double)}); }) .def("__copy__", [](FastGA::MatX3d& v) { return FastGA::MatX3d(v); }) .def("__deepcopy__", [](FastGA::MatX3d& v, py::dict& memo) { return FastGA::MatX3d(v); }); py::class_<FastGA::MatX3I>( m, "MatX3I", py::buffer_protocol(), "NX3 Matrix (Uint64) representation of numpy array. Use np.asarray() to get numpy array.") .def_buffer([](FastGA::MatX3I& m) -> py::buffer_info { const size_t cols = 3; return py::buffer_info(m.data(), /* Pointer to buffer */ sizeof(size_t), /* Size of one scalar */ py::format_descriptor<size_t>::format(), /* Python struct-style format descriptor */ 2UL, /* Number of dimensions */ {m.size(), cols}, /* Buffer dimensions */ {sizeof(size_t) * cols, /* Strides (in bytes) for each index */ sizeof(size_t)}); }); py::class_<FastGA::MatX6I>( m, "MatX6I", py::buffer_protocol(), "NX6 Matrix (Uint64) representation of numpy array. Use np.asarray() to get numpy array.") .def_buffer([](FastGA::MatX6I& m) -> py::buffer_info { const size_t cols = 6; return py::buffer_info(m.data(), /* Pointer to buffer */ sizeof(size_t), /* Size of one scalar */ py::format_descriptor<size_t>::format(), /* Python struct-style format descriptor */ 2UL, /* Number of dimensions */ {m.size(), cols}, /* Buffer dimensions */ {sizeof(size_t) * cols, /* Strides (in bytes) for each index */ sizeof(size_t)}); }); py::class_<FastGA::MatX2I>( m, "MatX2I", py::buffer_protocol(), "NX2 Matrix (Uint64) representation of numpy array. Use np.asarray() to get numpy array.") .def_buffer([](FastGA::MatX2I& m) -> py::buffer_info { const size_t cols = 2; return py::buffer_info(m.data(), /* Pointer to buffer */ sizeof(size_t), /* Size of one scalar */ py::format_descriptor<size_t>::format(), /* Python struct-style format descriptor */ 2UL, /* Number of dimensions */ {m.size(), cols}, /* Buffer dimensions */ {sizeof(size_t) * cols, /* Strides (in bytes) for each index */ sizeof(size_t)}); }); py::class_<FastGA::MatX12I>( m, "MatX12I", py::buffer_protocol(), "NX12 Matrix (Uint64) representation of numpy array. Use np.asarray() to get numpy array.") .def_buffer([](FastGA::MatX12I& m) -> py::buffer_info { const size_t cols = 12; return py::buffer_info(m.data(), /* Pointer to buffer */ sizeof(size_t), /* Size of one scalar */ py::format_descriptor<size_t>::format(), /* Python struct-style format descriptor */ 2UL, /* Number of dimensions */ {m.size(), cols}, /* Buffer dimensions */ {sizeof(size_t) * cols, /* Strides (in bytes) for each index */ sizeof(size_t)}); }); py::class_<FastGA::MatX2d>( m, "MatX2d", py::buffer_protocol(), "NX2 Matrix (Double) representation of numpy array. Use np.asarray() to get numpy array.") .def_buffer([](FastGA::MatX2d& m) -> py::buffer_info { const size_t cols = 3; return py::buffer_info(m.data(), /* Pointer to buffer */ sizeof(double), /* Size of one scalar */ py::format_descriptor<double>::format(), /* Python struct-style format descriptor */ 2UL, /* Number of dimensions */ {m.size(), cols}, /* Buffer dimensions */ {sizeof(double) * cols, /* Strides (in bytes) for each index */ sizeof(double)}); }); // Classes py::class_<FastGA::Ico::Image>(m, "Image", py::buffer_protocol(), "An image class. In this library it stores unwrapped values of the icosahedron as a " "2D image. Use np.asarray() to get numpy array.") .def_buffer([](FastGA::Ico::Image& m) -> py::buffer_info { const size_t cols = m.cols_; const size_t rows = m.rows_; std::string format; switch (m.bytes_per_channel_) { case 1: format = py::format_descriptor<uint8_t>::format(); break; case 2: format = py::format_descriptor<uint16_t>::format(); break; case 4: if (m.is_float_) { format = py::format_descriptor<float>::format(); } else { format = py::format_descriptor<int>::format(); } break; default: throw std::runtime_error("Image has unrecognized bytes_per_channel."); break; } return py::buffer_info(m.buffer_.data(), /* Pointer to buffer */ m.bytes_per_channel_, /* Size of one scalar */ format, /* Python struct-style format descriptor */ 2UL, /* Number of dimensions */ {rows, cols}, /* Buffer dimensions */ {m.bytes_per_channel_ * cols, /* Strides (in bytes) for each index */ static_cast<size_t>(m.bytes_per_channel_)}); }) .def("__repr__", [](const FastGA::Ico::Image& img) { return std::string("Image of size ") + std::to_string(img.cols_) + std::string("x") + std::to_string(img.rows_); }); py::class_<FastGA::Bucket<uint32_t>>(m, "BucketUInt32", "The bucket class describes a cell on the S2 Histogram. It unfortunately has " "one member that should not really exist (projection).") .def(py::init<>()) .def_readonly("normal", &FastGA::Bucket<uint32_t>::normal, "The surface **unit** normal of the triangle cell") .def_readonly("hilbert_value", &FastGA::Bucket<uint32_t>::hilbert_value, "Space Filling Curve value, may be Int32 or Uint64") .def_readonly("count", &FastGA::Bucket<uint32_t>::count, "Count variable for histogram") .def("__repr__", [](const FastGA::Bucket<uint32_t>& a) { return ("<Bucket Normal: " + FastGA::Helper::ArrayToString<double, 3>(a.normal) + "; HV: " + std::to_string(a.hilbert_value) + "; CNT: " + std::to_string(a.count) + "'>"); }); py::class_<FastGA::Bucket<uint64_t>>(m, "BucketUInt64", "The bucket class describes a cell on the S2 Histogram. It unfortunately has " "one member that should not really exist (projection).") .def(py::init<>()) .def_readonly("normal", &FastGA::Bucket<uint64_t>::normal, "The surface **unit** normal of the triangle cell") .def_readonly("hilbert_value", &FastGA::Bucket<uint64_t>::hilbert_value, "Space Filling Curve value, may be Int32 or Uint64") .def_readonly("count", &FastGA::Bucket<uint64_t>::count, "Count variable for histogram") .def("__repr__", [](const FastGA::Bucket<uint64_t>& a) { return ("<Bucket Normal: " + FastGA::Helper::ArrayToString<double, 3>(a.normal) + "; HV: " + std::to_string(a.hilbert_value) + "; CNT: " + std::to_string(a.count) + "'>"); }); py::class_<FastGA::Helper::BBOX>(m, "BBOX", "Contains extents for a projection") .def(py::init<>()) .def("__repr__", [](const FastGA::Bucket<uint32_t>& a) { return ("<BBOX>"); }); py::class_<FastGA::Ico::IcoMesh>( m, "IcoMesh", "This stores the mesh of a refined icosahedron. Note that the ordering of the vertices and triangles are very " "particular. This ordering must be maintained for use during an unwrapping procedure.") .def(py::init<>()) .def("__repr__", [](const FastGA::Ico::IcoMesh& a) { return "<FastGA::Ico::IcoMesh; # Triangles: '" + std::to_string(a.triangles.size()) + "'>"; }) .def_readonly("triangles", &FastGA::Ico::IcoMesh::triangles, "The vetrices in the mesh, NX3") .def_readonly("vertices", &FastGA::Ico::IcoMesh::vertices, "The triangles in the mesh, KX3") .def_readonly("triangle_normals", &FastGA::Ico::IcoMesh::triangle_normals, "The triangle normals in the mesh, KX3") .def_readonly("adjacency_matrix", &FastGA::Ico::IcoMesh::adjacency_matrix, "The vertex adjacency matrix, NX6"); py::class_<FastGA::GaussianAccumulator<uint32_t>>( m, "GaussianAccumulatorUI32", "This is the base class of the Gaussian Accumulator. GaussianAccumulatorKD, GaussianAccumulatorOpt, and " "GaussianAccumulatorS2 will derive from this class. Unfortunately those classes have small differences causing " "some unnecessary members in here that basically occurred as these classes were created and changed over time. " "Eventually I will rewrite this whole thing such that only the bare essentials are in this class.") .def(py::init<const int, const double>(), "level"_a = FASTGA_LEVEL, "max_phi"_a = FASTGA_MAX_PHI) .def("__repr__", [](const FastGA::GaussianAccumulator<uint32_t>& a) { return "<FastGA::GA; # Triangles: '" + std::to_string(a.mesh.triangles.size()) + "'>"; }) .def_readonly("mesh", &FastGA::GaussianAccumulator<uint32_t>::mesh, "The underlying sphere-like mesh of the Gaussian Accumulator") .def_readonly("buckets", &FastGA::GaussianAccumulator<uint32_t>::buckets, "The buckets in the histogram, corresponding to cells/triangles on the mesh") // .def_readonly("sort_idx", &FastGA::GaussianAccumulator<uint32_t>::sort_idx) .def_readonly("mask", &FastGA::GaussianAccumulator<uint32_t>::mask, "A mask which indicates which triangles in the mesh are included in the buckets. By default its " "every one (mask = ones). This was added because I thought a user might want to limit the " "histogram to only include triangles a max_phi from the north pole.") .def_readonly("num_buckets", &FastGA::GaussianAccumulator<uint32_t>::num_buckets, "The number of buckets in histogram, size(buckets)") .def_readonly("projected_bbox", &FastGA::GaussianAccumulator<uint32_t>::projected_bbox, "Only a valid member for GaussianAccumulatorOpt, ignore for everthing else") .def("get_bucket_normals", &FastGA::GaussianAccumulator<uint32_t>::GetBucketNormals, "Gets the surface normals of the buckets in the histogram." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_normalized_bucket_counts", &FastGA::GaussianAccumulator<uint32_t>::GetNormalizedBucketCounts, "Get the normalized bucket counts in the histogram." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_normalized_bucket_counts_by_vertex", &FastGA::GaussianAccumulator<uint32_t>::GetNormalizedBucketCountsByVertex, "Average the normalized buckets counts (triangles) into the *vertices* of the mesh." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_bucket_sfc_values", &FastGA::GaussianAccumulator<uint32_t>::GetBucketSFCValues, "Get the space filling curve values of each bucket. Will be sorted low to high.") .def("get_bucket_projection", &FastGA::GaussianAccumulator<uint32_t>::GetBucketProjection, "Only useful for GaussianAccumulatorOpt. Return the XY projection of each bucket. ") .def("clear_count", &FastGA::GaussianAccumulator<uint32_t>::ClearCount, "Clears all the histogram counts for each cell. Useful to call after peak detection to 'reset' the mesh.") .def("copy_ico_mesh", &FastGA::GaussianAccumulator<uint32_t>::CopyIcoMesh, "Creates a copy of the ico mesh.", "mesh_order"_a = false); py::class_<FastGA::GaussianAccumulator<uint64_t>>( m, "GaussianAccumulatorUI64", "This is the base class of the Gaussian Accumulator. GaussianAccumulatorKD, GaussianAccumulatorOpt, and " "GaussianAccumulatorS2 will derive from this class. Unfortunately those classes have small differences causing " "some unnecessary members in here that basically occurred as these classes were created and changed over time. " "Eventually I will rewrite this whole thing such that only the bare essentials are in this class.") .def(py::init<const int, const double>(), "level"_a = FASTGA_LEVEL, "max_phi"_a = FASTGA_MAX_PHI) .def("__repr__", [](const FastGA::GaussianAccumulator<uint64_t>& a) { return "<FastGA::GA; # Triangles: '" + std::to_string(a.mesh.triangles.size()) + "'>"; }) .def_readonly("mesh", &FastGA::GaussianAccumulator<uint64_t>::mesh, "The underlying sphere-like mesh of the Gaussian Accumulator") .def_readonly("buckets", &FastGA::GaussianAccumulator<uint64_t>::buckets, "The buckets in the histogram, corresponding to cells/triangles on the mesh") // .def_readonly("sort_idx", &FastGA::GaussianAccumulator<uint64_t>::sort_idx) .def_readonly("mask", &FastGA::GaussianAccumulator<uint64_t>::mask, "A mask which indicates which triangles in the mesh are included in the buckets. By default its " "every one (mask = ones). This was added because I thought a user might want to limit the " "histogram to only include triangles a max_phi from the north pole.") .def_readonly("num_buckets", &FastGA::GaussianAccumulator<uint64_t>::num_buckets, "The number of buckets in histogram, size(buckets)") .def_readonly("projected_bbox", &FastGA::GaussianAccumulator<uint64_t>::projected_bbox, "Only a valid member for GaussianAccumulatorOpt, ignore for everthing else") .def("get_bucket_normals", &FastGA::GaussianAccumulator<uint64_t>::GetBucketNormals, "Gets the surface normals of the buckets in the histogram." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_normalized_bucket_counts", &FastGA::GaussianAccumulator<uint64_t>::GetNormalizedBucketCounts, "Get the normalized bucket counts in the histogram." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_normalized_bucket_counts_by_vertex", &FastGA::GaussianAccumulator<uint64_t>::GetNormalizedBucketCountsByVertex, "Average the normalized buckets counts (triangles) into the *vertices* of the mesh." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_bucket_sfc_values", &FastGA::GaussianAccumulator<uint64_t>::GetBucketSFCValues, "Get the space filling curve values of each bucket. Will be sorted low to high.") .def("get_bucket_projection", &FastGA::GaussianAccumulator<uint64_t>::GetBucketProjection, "Only useful for GaussianAccumulatorOpt. Return the XY projection of each bucket. ") .def("clear_count", &FastGA::GaussianAccumulator<uint64_t>::ClearCount, "Clears all the histogram counts for each cell. Useful to call after peak detection to 'reset' the mesh.") .def("copy_ico_mesh", &FastGA::GaussianAccumulator<uint64_t>::CopyIcoMesh, "Creates a copy of the ico mesh.", "mesh_order"_a = false); py::class_<FastGA::GaussianAccumulatorKD, FastGA::GaussianAccumulator<uint32_t>>( m, "GaussianAccumulatorKD", "A Fast Gaussian Accumulator. Works on Full Sphere using KD Trees") .def(py::init<const int, const double, const size_t>(), "level"_a = FASTGA_LEVEL, "max_phi"_a = FASTGA_MAX_PHI, "max_leaf_size"_a = FASTGA_MAX_LEAF_SIZE, "Will intergrate the normals into the S2 Historgram") .def("integrate", &FastGA::GaussianAccumulatorKD::Integrate, "Will intergrate the unit normals into the S2 Historgram", "normals"_a, "eps"_a = FASTGA_KDTREE_EPS) .def("__repr__", [](const FastGA::GaussianAccumulatorKD& a) { return "<FastGA::GAKD; # Triangles: '" + std::to_string(a.mesh.triangles.size()) + "'>"; }); py::class_<FastGA::GaussianAccumulatorOpt, FastGA::GaussianAccumulator<uint32_t>>( m, "GaussianAccumulatorOpt", "Construct a new GaussianAccumulatorOpt object. Do **not** use this class. It was my first design and only " "works well on the top hemisphere of a sphere. It uses a single projection (Azimuth Equal Area Projection) to " "project to a 2D plane. A hilbert curve is performed on the plane to greate the SFC on the sphere. This class " "is the reason that the `GaussianAccumulator` base class is such a mess because it began with the assumptions " "built into this class. Eventually this will be deprecated.") .def(py::init<const int, const double>(), "level"_a = FASTGA_LEVEL, "max_phi"_a = FASTGA_MAX_PHI) .def_readonly("bucket_neighbors", &FastGA::GaussianAccumulatorOpt::bucket_neighbors) .def("integrate", &FastGA::GaussianAccumulatorOpt::Integrate, "normals"_a, "num_nbr"_a = FASTGA_TRI_NBRS, "Will intergrate the normals into the S2 Historgram") .def("__repr__", [](const FastGA::GaussianAccumulatorOpt& a) { return "<FastGA::GAOPT; # Triangles: '" + std::to_string(a.mesh.triangles.size()) + "'>"; }); py::class_<FastGA::GaussianAccumulatorS2, FastGA::GaussianAccumulator<uint64_t>>( m, "GaussianAccumulatorS2", "This GaussianAccumulator can handle the entire sphere by using a space filling curve designed by Google's S2 " "Geometry library. It projects a sphere to the faces of a cube and creates six separate hilbert curves for " "each face. It then stitches these curves together into one continuous thread. This class does not need S2 " "Geometry Library. We are using a port callsed s2nano that pulls out the essential SFC routine. It basically " "works by converting a normal to being integrated into a s2_id (SFC unique integer). It performs a faster " "interpolated and branchless binary search to find the closest cell in buckets. It then performs a local " "neighborhood search centered around the cell which actually looks at the surface normal.") .def(py::init<const int, const double>(), "level"_a = FASTGA_LEVEL, "max_phi"_a = FASTGA_MAX_PHI) .def_readonly("bucket_neighbors", &FastGA::GaussianAccumulatorS2::bucket_neighbors, "Fast lookup matrix to find neighbors of a bucket") .def("integrate", &FastGA::GaussianAccumulatorS2::Integrate, "normals"_a, "num_nbr"_a = FASTGA_TRI_NBRS, "Will intergrate the normals into the S2 Historgram") .def("__repr__", [](const FastGA::GaussianAccumulatorS2& a) { return "<FastGA::GAS2; # Triangles: '" + std::to_string(a.mesh.triangles.size()) + "'>"; }); py::class_<FastGA::Ico::IcoCharts>( m, "IcoCharts", "Contains charts of an unwrapped Icosahedron. This is basically my implementation of unwrapping an icosahedron " "as described in: Gauge Equivariant Convolutional Networks and the Icosahedral CNN - " "https://arxiv.org/abs/1902.04615") .def(py::init<const int>(), "level"_a = FASTGA_LEVEL) // .def_readonly("point_idx_to_image_idx", &FastGA::Ico::IcoChart::point_idx_to_image_idx) // .def_readonly("local_to_global_point_idx_map", &FastGA::Ico::IcoChart::local_to_global_point_idx_map) .def_readonly("image", &FastGA::Ico::IcoCharts::image, "Returns an unwrapped image of the IcoCharts") .def_readonly( "image_to_vertex_idx", &FastGA::Ico::IcoCharts::image_to_vertex_idx, "Fast lookup matrix for image creation. Each pixel hold the icosahedron vertex index it corresponds to") .def_readonly("mask", &FastGA::Ico::IcoCharts::mask, "Boolean mask corresponding to valid cells. False(0) corresponds to ghost/halo cells") .def_readonly("sphere_mesh", &FastGA::Ico::IcoCharts::sphere_mesh, "The full icosahedron the IcoChart is unwrapping") .def("fill_image", &FastGA::Ico::IcoCharts::FillImage, "normalized_vertex_count"_a, "Fills the the image using the normalized vertex counts") .def("find_peaks", &FastGA::Ico::IcoCharts::FindPeaks, "threshold_abs"_a = 25, "exclude_border"_a = false, "Finds all peaks inside the image") .def("__repr__", [](const FastGA::Ico::IcoCharts& a) { return "<IcoChart; Level: '" + std::to_string(a.level) + "'>"; }); // Functions m.def("convert_normals_to_hilbert", &FastGA::Helper::ConvertNormalsToHilbert, "normals"_a, "bbox"_a, "Not recommended. Converts a numpy array of normals to uint32 Hilbert Values" "Assumes EqualArea Azimuth Projection centered at north pole. Only good on for northern hemisphere."); docstring::FunctionDocInject( m, "convert_normals_to_hilbert", {{"normals", "MatX3d; NX3 Array"}, {"bbox", "BBOX; bounding box of AzimuthProjection projection"}}); m.def("convert_normals_to_s2id", &FastGA::Helper::ConvertNormalsToS2ID, "normals"_a, "Converts unit normals to uint64 S2 ids. Uses s2nano (micro port of S2 Geometry)"); docstring::FunctionDocInject(m, "convert_normals_to_s2id", {{"normals", "MatX3d; NX3 Array"}}); m.def("refine_icosahedron", &FastGA::Ico::RefineIcosahedron, "level"_a, "Creates a refined icosahedron mesh"); docstring::FunctionDocInject( m, "refine_icosahedron", {{"level", "The level of refinement of the icosahedron. Each level recursively subdived triangles"}}); m.def("refine_icochart", &FastGA::Ico::RefineIcoChart, "level"_a = 0, "square"_a = false, "Return an refined icochart"); ////////////////// ////////////////// // Add new S2 Beta py::class_<FastGA::BucketS2>(m, "BucketS2", "The bucket class describes a cell on the S2 Histogram. It unfortunately has") .def(py::init<>()) .def_readonly("normal", &FastGA::BucketS2::normal, "The surface **unit** normal of the triangle cell") .def_readonly("average_normal", &FastGA::BucketS2::average_normal, "The average surface **unit** normal of the triangle cell after integration") .def_readonly("hilbert_value", &FastGA::BucketS2::hilbert_value, "Space Filling Curve value, may be Int32 or Uint64") .def_readonly("count", &FastGA::BucketS2::count, "Count variable for histogram") .def("__repr__", [](const FastGA::BucketS2& a) { return ("<Bucket Normal: " + FastGA::Helper::ArrayToString<double, 3>(a.normal) + "; HV: " + std::to_string(a.hilbert_value) + "; CNT: " + std::to_string(a.count) + "'>"); }); py::class_<FastGA::GaussianAccumulatorS2Beta>( m, "GaussianAccumulatorS2Beta", "This GaussianAccumulator can handle the entire sphere by using a space filling curve designed by Google's S2 " "Geometry library. It projects a sphere to the faces of a cube and creates six separate hilbert curves for " "each face. It then stitches these curves together into one continuous thread. This class does not need S2 " "Geometry Library. We are using a port callsed s2nano that pulls out the essential SFC routine. It basically " "works by converting a normal to being integrated into a s2_id (SFC unique integer). It performs a faster " "interpolated and branchless binary search to find the closest cell in buckets. It then performs a local " "neighborhood search centered around the cell which actually looks at the surface normal.") .def(py::init<const int>(), "level"_a = FASTGA_LEVEL) .def_readonly("bucket_neighbors", &FastGA::GaussianAccumulatorS2Beta::bucket_neighbors, "Fast lookup matrix to find neighbors of a bucket") .def_readonly("mesh", &FastGA::GaussianAccumulatorS2Beta::mesh, "The underlying sphere-like mesh of the Gaussian Accumulator") .def_readonly("ico_chart", &FastGA::GaussianAccumulatorS2Beta::ico_chart, "The underlying unwrapped icosphere") .def_readonly("buckets", &FastGA::GaussianAccumulatorS2Beta::buckets, "The buckets in the histogram, corresponding to cells/triangles on the mesh") .def_readonly("num_buckets", &FastGA::GaussianAccumulatorS2Beta::num_buckets, "The number of buckets in histogram, size(buckets)") .def("get_bucket_normals", &FastGA::GaussianAccumulatorS2Beta::GetBucketNormals, "Gets the surface normals of the buckets in the histogram." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_bucket_average_normals", &FastGA::GaussianAccumulatorS2Beta::GetBucketAverageNormals, "Gets the average surface normals of the buckets in the histogram after integration." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_normalized_bucket_counts", &FastGA::GaussianAccumulatorS2Beta::GetNormalizedBucketCounts, "Get the normalized bucket counts in the histogram." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_normalized_bucket_counts_by_vertex", &FastGA::GaussianAccumulatorS2Beta::GetNormalizedBucketCountsByVertex, "Average the normalized buckets counts (triangles) into the *vertices* of the mesh." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_average_normals_by_vertex", &FastGA::GaussianAccumulatorS2Beta::GetAverageNormalsByVertex, "Average the normalized buckets counts (triangles) into the *vertices* of the mesh." "The order by default is sorted by the space filling curve value attached to each cell.", "mesh_order"_a = false) .def("get_bucket_sfc_values", &FastGA::GaussianAccumulatorS2Beta::GetBucketSFCValues, "Get the space filling curve values of each bucket. Will be sorted low to high.") .def("clear_count", &FastGA::GaussianAccumulatorS2Beta::ClearCount, "Clears all the histogram counts for each cell. Useful to call after peak detection to 'reset' the mesh.") .def("copy_ico_mesh", &FastGA::GaussianAccumulatorS2Beta::CopyIcoMesh, "Creates a copy of the ico mesh.", "mesh_order"_a = false) .def("integrate", &FastGA::GaussianAccumulatorS2Beta::Integrate, "normals"_a, "num_nbr"_a = FASTGA_TRI_NBRS, "Will intergrate the normals into the S2 Historgram") .def("find_peaks", &FastGA::GaussianAccumulatorS2Beta::FindPeaks, "threshold_abs"_a = 25, "exclude_border"_a=false, "cluster_distance"_a=0.1, "min_cluster_weight"_a=0.15, "Find the peaks on the Gaussian Accumulator") .def("__repr__", [](const FastGA::GaussianAccumulatorS2Beta& a) { return "<FastGA::GAS2; # Triangles: '" + std::to_string(a.mesh.triangles.size()) + "'>"; }); #ifdef VERSION_INFO m.attr("__version__") = VERSION_INFO; #else m.attr("__version__") = "dev"; #endif }
69.42616
178
0.598122
JeremyBYU
6a582c274e19d6143b836236a0152e0d4123e421
1,496
cpp
C++
bytecode/interpreter/src/BytecodeInterpreter/Units/InterpreterCommandArrMemberAccess.cpp
Scorbutics/skalang
c8d1869a2f0c7857ee05ef45bd3aa4e537d39558
[ "MIT" ]
3
2019-04-08T17:34:19.000Z
2020-01-03T04:47:06.000Z
bytecode/interpreter/src/BytecodeInterpreter/Units/InterpreterCommandArrMemberAccess.cpp
Scorbutics/skalang
c8d1869a2f0c7857ee05ef45bd3aa4e537d39558
[ "MIT" ]
4
2020-04-19T22:09:06.000Z
2020-11-06T15:47:08.000Z
bytecode/interpreter/src/BytecodeInterpreter/Units/InterpreterCommandArrMemberAccess.cpp
Scorbutics/skalang
c8d1869a2f0c7857ee05ef45bd3aa4e537d39558
[ "MIT" ]
null
null
null
#include "Config/LoggerConfigLang.h" #include "InterpreterCommandArrMemberAccess.h" SKA_LOGC_CONFIG(ska::LogLevel::Disabled, ska::bytecode::InterpreterCommand<ska::bytecode::Command::ARR_ACCESS>); #define LOG_DEBUG SLOG_STATIC(ska::LogLevel::Debug, ska::bytecode::InterpreterCommand<ska::bytecode::Command::ARR_ACCESS>) #define LOG_INFO SLOG_STATIC(ska::LogLevel::Info, ska::bytecode::InterpreterCommand<ska::bytecode::Command::ARR_ACCESS>) SKALANG_BYTECODE_INTERPRETER_COMMAND_DECLARE(ARR_MEMBER_ACCESS)(ExecutionContext& context, const Operand& left, const Operand& right) { assert(left.type() == OperandType::VAR || left.type() == OperandType::REG); assert(right.type() != OperandType::EMPTY && right.type() != OperandType::BIND_NATIVE && right.type() != OperandType::BIND_SCRIPT); LOG_DEBUG << "Index cell node " << right << " of type " << right.type() << " of object \"" << context.getCell(left).convertString() << "\" of type " << left.type(); const auto index = context.get<long>(right); auto array = context.get<NodeValueArray>(left); LOG_INFO << "[Accessing cell at index " << index << "/" << array->size() << " of object " << left << "]"; if(index >= array->size()) { throw std::runtime_error("invalid array access at index " + std::to_string(index) + " on array size " + std::to_string(array->size())); } auto& result = (*array)[index]; LOG_INFO << "[Cell content : " << result.convertString() << "]"; return NodeValueFunctionMember{ array, &result }; }
57.538462
166
0.699198
Scorbutics
6a5e85f1225570ef77b1b161298409acf832d67f
3,652
hpp
C++
include/Object.hpp
savageking-io/evelengine
f4f31419077e3467db271e82b05164eafa521eb7
[ "Apache-2.0" ]
null
null
null
include/Object.hpp
savageking-io/evelengine
f4f31419077e3467db271e82b05164eafa521eb7
[ "Apache-2.0" ]
null
null
null
include/Object.hpp
savageking-io/evelengine
f4f31419077e3467db271e82b05164eafa521eb7
[ "Apache-2.0" ]
null
null
null
#ifndef __EVEL_ENGINE_OBJECT_HPP__ #define __EVEL_ENGINE_OBJECT_HPP__ #include <iostream> #include <string> #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) #include <SDL.h> #include <SDL_image.h> #else #include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #endif #include "Log.hpp" #include "Camera.hpp" #include "ResourceManager.hpp" #include "Texture.hpp" #include "Velocity.hpp" namespace EvelEngine { class Engine; /// /// \class Object /// \brief Static Game Object /// /// Base class for all game objects. /// /// \sa AnimatedObject class Object { public: //! Constructor /* * \param id - Unique ID of the object * \param manager - ResourceManager * \param renderer - SDL_Renderer * \param filename - Path to texture * \param log - Log object */ Object(const std::string &id, ResourceManager *manager, SDL_Renderer *renderer, const std::string &filename, Log *log); Object(const std::string &id, ResourceManager *manager, SDL_Renderer *renderer, Log *log); //! Destructor virtual ~Object(); virtual bool load(); virtual bool applyTexture(std::shared_ptr<Texture> texture); virtual void render(Camera *camera, double delta); virtual std::shared_ptr<Texture> draw(); void attach(); void detach(); bool loaded(); void hide(); void show(); // setters void setFilename(const std::string &filename); void setX(int x); void setY(int y); void setWidth(int w); void setHeight(int h); void setPosition(int x, int y); void setArea(int x, int y, int w, int h); // getters int x(); int y(); int width(); int height(); const std::string &id() const; Vector2D *velocity(); int getAreaX(); int getAreaY(); int getAreaWidth(); int getAreaHeight(); protected: std::string _id; // Object ID. Not guarantted to be unique within any scope std::string _filename; // Filename of the object if any SDL_Renderer *_renderer; // Renderer that is passed to underlying elements std::shared_ptr<Texture> _texture; // Pointer to associated texture int _ax; // Area of texture X int _ay; // Area of texture Y int _aw; // Areal width int _ah; // Areal height SDL_Rect _area; // Area of the texture being renderered Rect2D _position; bool _hidden; // hidden objects are not rendered bool _attached; // whether or not this object attached to camera bool _loaded; // whether or not this object was loaded ResourceManager *_manager; // resource manager used to load objects Vector2D _velocity; // Velocity of the object Log *_log; // Logging subsystem }; std::shared_ptr<Object> NewObject(const std::string &id, Engine *engine, const std::string &filename); std::shared_ptr<Object> NewObject(const std::string &id, const std::string &filename); std::shared_ptr<Object> NewObject(const std::string &id); std::shared_ptr<Object> NewObjectInQueue(const std::string &id, Engine *engine, const std::string &filename); }; // namespace EvelEngine #endif
34.130841
127
0.57092
savageking-io
6a5fab44a365737cca1db5670ff723aa67fbce73
3,584
cpp
C++
Source/FlightSimulator/Private/Online/FlightGameState.cpp
Lynnvon/FlightSimulator
2dca6f8364b7f4972a248de3dbc3a711740f5ed4
[ "MIT" ]
1
2022-02-03T08:29:35.000Z
2022-02-03T08:29:35.000Z
Source/FlightSimulator/Private/Online/FlightGameState.cpp
Lynnvon/FlightSimulator
2dca6f8364b7f4972a248de3dbc3a711740f5ed4
[ "MIT" ]
null
null
null
Source/FlightSimulator/Private/Online/FlightGameState.cpp
Lynnvon/FlightSimulator
2dca6f8364b7f4972a248de3dbc3a711740f5ed4
[ "MIT" ]
null
null
null
//MIT License // //Copyright(c) 2021 HaiLiang Feng // //QQ : 632865163 //Blog : https ://www.cnblogs.com/LynnVon/ // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this softwareand 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 noticeand 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 "FlightGameState.h" #include "Net/UnrealNetwork.h" #include "FlightPlayerState.h" #include "FlightGameMode.h" #include "FlightGameInstance.h" #include "FlightPlayerController.h" AFlightGameState::AFlightGameState(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { NumTeams = 0; RemainingTime = 0; bTimerPaused = false; } void AFlightGameState::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); DOREPLIFETIME(AFlightGameState, NumTeams); DOREPLIFETIME(AFlightGameState, RemainingTime); DOREPLIFETIME(AFlightGameState, bTimerPaused); DOREPLIFETIME(AFlightGameState, TeamScores); } void AFlightGameState::GetRankedMap(int32 TeamIndex, RankedPlayerMap& OutRankedMap) const { OutRankedMap.Empty(); //first, we need to go over all the PlayerStates, grab their score, and rank them TMultiMap<int32, AFlightPlayerState*> SortedMap; for (int32 i = 0; i < PlayerArray.Num(); ++i) { int32 Score = 0; AFlightPlayerState* CurPlayerState = Cast<AFlightPlayerState>(PlayerArray[i]); if (CurPlayerState && (CurPlayerState->GetTeamNum() == TeamIndex)) { SortedMap.Add(FMath::TruncToInt(CurPlayerState->GetScore()), CurPlayerState); } } //sort by the keys SortedMap.KeySort(TGreater<int32>()); //now, add them back to the ranked map OutRankedMap.Empty(); int32 Rank = 0; for (TMultiMap<int32, AFlightPlayerState*>::TIterator It(SortedMap); It; ++It) { OutRankedMap.Add(Rank++, It.Value()); } } void AFlightGameState::RequestFinishAndExitToMainMenu() { if (AuthorityGameMode) { // we are server, tell the gamemode AFlightGameMode* const GameMode = Cast<AFlightGameMode>(AuthorityGameMode); if (GameMode) { GameMode->RequestFinishAndExitToMainMenu(); } } else { // we are client, handle our own business UFlightGameInstance* GameInstance = Cast<UFlightGameInstance>(GetGameInstance()); if (GameInstance) { GameInstance->RemoveSplitScreenPlayers(); } AFlightPlayerController* const PrimaryPC = Cast<AFlightPlayerController>(GetGameInstance()->GetFirstLocalPlayerController()); if (PrimaryPC) { PrimaryPC->HandleReturnToMainMenu(); } } }
32.880734
131
0.722098
Lynnvon
6a6294c4cc3b0712810f0e238654b8bd036e6afd
2,445
hpp
C++
header-files/letterBankClass.hpp
EthanC2/Hangman
0f77a31c7d0968bac20519a2b05272bf66889033
[ "MIT" ]
null
null
null
header-files/letterBankClass.hpp
EthanC2/Hangman
0f77a31c7d0968bac20519a2b05272bf66889033
[ "MIT" ]
null
null
null
header-files/letterBankClass.hpp
EthanC2/Hangman
0f77a31c7d0968bac20519a2b05272bf66889033
[ "MIT" ]
null
null
null
#ifndef WORDBANK_TYPE #define WORDBANK_TYPE //Native Header Files #include <iostream> #include <string> #include <array> //Custom Header #include "letterClass.hpp" //Namespace using namespace std; //************************* LetterBank Declaration ****************************\\ class LetterBank { private: //Data members array<Letter, 26> letters; //Array of Letter objects public: //Methods LetterBank(); bool isGuessed(const char); void setGuessed(const char); void print() const; //Overloaded Operators friend ostream& operator<<(ostream&, const LetterBank&); }; //************************* LetterBank Implementation ****************************\\ //Default Constructor LetterBank::LetterBank() { //All uppercase letters const string uppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //For every character in the string above, create a 'Letter' object from it for the array 'letters' for(int pos=0; pos < uppercaseLetters.length(); pos++) { //Load each position in the letter bank with a 'Letter' object from the alphabet letters[pos] = Letter( uppercaseLetters[pos] ); } } //setGuessed() -- simple sequential search, suitable for short items void LetterBank::setGuessed(const char guess) { //For every letter in the letter bank for(int pos=0; pos < letters.size(); pos++) { //If the current letter matches the given letter, set it to guessed if (letters[pos] == guess) { letters[pos].setGuessed(true); break; } } } //isGuessed bool LetterBank::isGuessed(const char guess) { //For every letter in the letter bank for(int pos=0; pos < letters.size(); pos++) { //If the current letter matches the given letter, return whether it has been guessed if (letters[pos] == guess) return letters[pos].isGuessed(); } return NULL; //for errors } //print() void LetterBank::print() const { //Header cout << "\nLetter Bank:\n"; //Output each letter linearly, end=" " for(int pos=0; pos < letters.size(); pos++) { letters[pos].print(); } } //Overloaded << operator ostream& operator<<(ostream& osObj, const LetterBank& letterBankObj) { //Print the letter bank letterBankObj.print(); return osObj; //empty ostream object } #endif
23.970588
103
0.604499
EthanC2
6a6442a76a23edd0c426fd976ccd4934ef57a4fb
3,865
cpp
C++
BRE/SceneLoader/TextureLoader.cpp
nicolasbertoa/D3D12Base
cdf36d9a6ef8ab3860a03cb250032a0690f89851
[ "BSD-3-Clause" ]
9
2016-07-14T05:43:45.000Z
2016-10-31T15:21:53.000Z
BRE/SceneLoader/TextureLoader.cpp
yang-shuohao/BRE12
cdf36d9a6ef8ab3860a03cb250032a0690f89851
[ "BSD-3-Clause" ]
null
null
null
BRE/SceneLoader/TextureLoader.cpp
yang-shuohao/BRE12
cdf36d9a6ef8ab3860a03cb250032a0690f89851
[ "BSD-3-Clause" ]
null
null
null
#include "TextureLoader.h" #include <d3d12.h> #include <vector> #pragma warning( push ) #pragma warning( disable : 4127) #include <yaml-cpp/yaml.h> #pragma warning( pop ) #include <CommandListExecutor\CommandListExecutor.h> #include <ResourceManager\ResourceManager.h> #include <Utils/DebugUtils.h> namespace BRE { void TextureLoader::LoadTextures(const YAML::Node& rootNode, ID3D12CommandAllocator& commandAllocator, ID3D12GraphicsCommandList& commandList) noexcept { BRE_ASSERT(rootNode.IsDefined()); // Get the "textures" node. It is a map and its sintax is: // textures: // name1: path1 // name2: path2 // name3: path3 const YAML::Node texturesNode = rootNode["textures"]; // 'textures' node can be undefined if (texturesNode.IsDefined() == false) { return; } BRE_CHECK_MSG(texturesNode.IsMap(), L"'textures' node must be a map"); std::vector<ID3D12Resource*> uploadBuffers; BRE_CHECK_HR(commandList.Reset(&commandAllocator, nullptr)); LoadTextures(texturesNode, commandAllocator, commandList, uploadBuffers); commandList.Close(); CommandListExecutor::Get().ExecuteCommandListAndWaitForCompletion(commandList); } ID3D12Resource& TextureLoader::GetTexture(const std::string& name) noexcept { std::unordered_map<std::string, ID3D12Resource*>::iterator findIt = mTextureByName.find(name); const std::wstring errorMsg = L"Texture name not found: " + StringUtils::AnsiToWideString(name); BRE_CHECK_MSG(findIt != mTextureByName.end(), errorMsg.c_str()); BRE_ASSERT(findIt->second != nullptr); return *findIt->second; } void TextureLoader::LoadTextures(const YAML::Node& texturesNode, ID3D12CommandAllocator& commandAllocator, ID3D12GraphicsCommandList& commandList, std::vector<ID3D12Resource*>& uploadBuffers) noexcept { BRE_CHECK_MSG(texturesNode.IsMap(), L"'textures' node must be a map"); std::string name; std::string path; for (YAML::const_iterator it = texturesNode.begin(); it != texturesNode.end(); ++it) { name = it->first.as<std::string>(); path = it->second.as<std::string>(); // If name is "reference", then path must be a yaml file that specifies "textures" if (name == "reference") { const YAML::Node referenceRootNode = YAML::LoadFile(path); const std::wstring errorMsg = L"Failed to open yaml file: " + StringUtils::AnsiToWideString(path); BRE_CHECK_MSG(referenceRootNode.IsDefined(), errorMsg.c_str()); BRE_CHECK_MSG(referenceRootNode["textures"].IsDefined(), L"Reference file must have 'textures' field"); const YAML::Node referenceTexturesNode = referenceRootNode["textures"]; LoadTextures(referenceTexturesNode, commandAllocator, commandList, uploadBuffers); } else { const std::wstring errorMsg = L"Texture name must be unique: " + StringUtils::AnsiToWideString(name); BRE_CHECK_MSG(mTextureByName.find(name) == mTextureByName.end(), errorMsg.c_str()); uploadBuffers.resize(uploadBuffers.size() + 1); ID3D12Resource& texture = ResourceManager::LoadTextureFromFile(path.c_str(), commandList, uploadBuffers.back(), nullptr); mTextureByName[name] = &texture; } } } }
37.524272
98
0.596378
nicolasbertoa
6a66c0fadcaba363c335329b08423945c52ee069
2,227
cpp
C++
android-31/android/graphics/RadialGradient.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
12
2020-03-26T02:38:56.000Z
2022-03-14T08:17:26.000Z
android-31/android/graphics/RadialGradient.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
1
2021-01-27T06:07:45.000Z
2021-11-13T19:19:43.000Z
android-31/android/graphics/RadialGradient.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
3
2021-02-02T12:34:55.000Z
2022-03-08T07:45:57.000Z
#include "../../JFloatArray.hpp" #include "../../JIntArray.hpp" #include "../../JLongArray.hpp" #include "./Shader_TileMode.hpp" #include "./RadialGradient.hpp" namespace android::graphics { // Fields // QJniObject forward RadialGradient::RadialGradient(QJniObject obj) : android::graphics::Shader(obj) {} // Constructors RadialGradient::RadialGradient(jfloat arg0, jfloat arg1, jfloat arg2, JIntArray arg3, JFloatArray arg4, android::graphics::Shader_TileMode arg5) : android::graphics::Shader( "android.graphics.RadialGradient", "(FFF[I[FLandroid/graphics/Shader$TileMode;)V", arg0, arg1, arg2, arg3.object<jintArray>(), arg4.object<jfloatArray>(), arg5.object() ) {} RadialGradient::RadialGradient(jfloat arg0, jfloat arg1, jfloat arg2, JLongArray arg3, JFloatArray arg4, android::graphics::Shader_TileMode arg5) : android::graphics::Shader( "android.graphics.RadialGradient", "(FFF[J[FLandroid/graphics/Shader$TileMode;)V", arg0, arg1, arg2, arg3.object<jlongArray>(), arg4.object<jfloatArray>(), arg5.object() ) {} RadialGradient::RadialGradient(jfloat arg0, jfloat arg1, jfloat arg2, jint arg3, jint arg4, android::graphics::Shader_TileMode arg5) : android::graphics::Shader( "android.graphics.RadialGradient", "(FFFIILandroid/graphics/Shader$TileMode;)V", arg0, arg1, arg2, arg3, arg4, arg5.object() ) {} RadialGradient::RadialGradient(jfloat arg0, jfloat arg1, jfloat arg2, jlong arg3, jlong arg4, android::graphics::Shader_TileMode arg5) : android::graphics::Shader( "android.graphics.RadialGradient", "(FFFJJLandroid/graphics/Shader$TileMode;)V", arg0, arg1, arg2, arg3, arg4, arg5.object() ) {} RadialGradient::RadialGradient(jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, JLongArray arg6, JFloatArray arg7, android::graphics::Shader_TileMode arg8) : android::graphics::Shader( "android.graphics.RadialGradient", "(FFFFFF[J[FLandroid/graphics/Shader$TileMode;)V", arg0, arg1, arg2, arg3, arg4, arg5, arg6.object<jlongArray>(), arg7.object<jfloatArray>(), arg8.object() ) {} // Methods } // namespace android::graphics
28.922078
185
0.703637
YJBeetle
6a6d007d24562eea39941c409bafe0247008f099
3,569
cpp
C++
IGC/Compiler/Optimizer/OpenCLPasses/UnreachableHandling/UnreachableHandling.cpp
bader/intel-graphics-compiler
04f51dc2f3d5047f334da5cb5eebe568480622f5
[ "MIT" ]
null
null
null
IGC/Compiler/Optimizer/OpenCLPasses/UnreachableHandling/UnreachableHandling.cpp
bader/intel-graphics-compiler
04f51dc2f3d5047f334da5cb5eebe568480622f5
[ "MIT" ]
null
null
null
IGC/Compiler/Optimizer/OpenCLPasses/UnreachableHandling/UnreachableHandling.cpp
bader/intel-graphics-compiler
04f51dc2f3d5047f334da5cb5eebe568480622f5
[ "MIT" ]
null
null
null
/*========================== begin_copyright_notice ============================ Copyright (c) 2000-2021 Intel Corporation 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. ============================= end_copyright_notice ===========================*/ #include "Compiler/Optimizer/OpenCLPasses/UnreachableHandling/UnreachableHandling.hpp" #include "Compiler/CodeGenPublic.h" #include "Compiler/IGCPassSupport.h" #include "common/igc_regkeys.hpp" #include "common/LLVMWarningsPush.hpp" #include "llvmWrapper/IR/Instructions.h" #include <llvm/IR/Module.h> #include <llvm/IR/Function.h> #include <llvm/IR/Instructions.h> #include "common/LLVMWarningsPop.hpp" #include <map> using namespace llvm; using namespace IGC; // Register pass to igc-opt #define PASS_FLAG "igc-unreachable-handling" #define PASS_DESCRIPTION "Make sure kernel has EOT instruction even if it hits unreachable code." #define PASS_CFG_ONLY false #define PASS_ANALYSIS false IGC_INITIALIZE_PASS_BEGIN(UnreachableHandling, PASS_FLAG, PASS_DESCRIPTION, PASS_CFG_ONLY, PASS_ANALYSIS) IGC_INITIALIZE_PASS_END(UnreachableHandling, PASS_FLAG, PASS_DESCRIPTION, PASS_CFG_ONLY, PASS_ANALYSIS) char UnreachableHandling::ID = 0; UnreachableHandling::UnreachableHandling() : FunctionPass(ID) { initializeUnreachableHandlingPass(*PassRegistry::getPassRegistry()); } void UnreachableHandling::visitUnreachableInst(UnreachableInst& I) { m_instsToReplace.push_back(&I); } void IGC::UnreachableHandling::replaceUnreachable(llvm::UnreachableInst* I) { assert(I); IRBuilder<> builder(I->getContext()); Function* F = I->getFunction(); ReturnInst* ret = F->getReturnType()->isVoidTy() ? builder.CreateRetVoid() : builder.CreateRet(UndefValue::get(F->getReturnType())); // If this is the last instruction in the BB, just replace it with return instruction. if (&I->getParent()->back() == I) { I->getParent()->getInstList().push_back(ret); I->eraseFromParent(); return; } // If there were some other instructions after, split the basic block and let DCE handle it. auto BB = I->getParent(); BB->splitBasicBlock(I); auto BBWithRet = BasicBlock::Create(F->getContext(), "", F); BBWithRet->getInstList().push_back(ret); cast<BranchInst>(BB->getTerminator())->setSuccessor(0, BBWithRet); I->eraseFromParent(); } bool UnreachableHandling::runOnFunction(Function& F) { m_instsToReplace.clear(); visit(F); for (auto I : m_instsToReplace) { replaceUnreachable(I); } return m_instsToReplace.size() > 0; }
34.990196
105
0.732418
bader
6a6dd4717c7559d761c4a058e29e812daeed2fde
589
cpp
C++
Binary Search/Implementation.cpp
shouryagupta21/Fork_CPP
8f5baed045ef430cca19d871c8854abc3b6ad44f
[ "MIT" ]
8
2021-02-14T13:13:27.000Z
2022-01-08T23:58:32.000Z
Binary Search/Implementation.cpp
shouryagupta21/Fork_CPP
8f5baed045ef430cca19d871c8854abc3b6ad44f
[ "MIT" ]
17
2021-02-28T17:03:50.000Z
2021-10-19T13:02:03.000Z
Binary Search/Implementation.cpp
shouryagupta21/Fork_CPP
8f5baed045ef430cca19d871c8854abc3b6ad44f
[ "MIT" ]
15
2021-03-01T03:54:29.000Z
2021-10-19T18:29:00.000Z
#include <iostream> using namespace std; int binary_search(int a[], int n, int key){ int s=0; int e=n-1; while(s<=e){ int mid=(s+e)/2; if(a[mid] == key){ return mid; } else if(a[mid]>key){ e=mid-1; } else{ s= mid +1; } } return -1; } int main() { int n,key; cin>>n; int a[100000]; for(int i=0; i<n; i++){ cin>>a[i]; } cout<<"Enter the element you want to search: "; cin>>key; cout<<binary_search(a,n,key)<<endl; return 0; }
16.361111
51
0.438031
shouryagupta21
6a727661d323a493ff3769521256da4a7d8aef10
2,727
cpp
C++
src/transforms/gdprocmult.cpp
RodZill4/gdprocmesh
1bdf8ac26e3431283c6368908a89b06299caf194
[ "MIT" ]
1
2019-10-31T12:19:27.000Z
2019-10-31T12:19:27.000Z
src/transforms/gdprocmult.cpp
capnm/gdprocmesh
452fdce2206401f8492e4c3d0906554842e13841
[ "MIT" ]
null
null
null
src/transforms/gdprocmult.cpp
capnm/gdprocmesh
452fdce2206401f8492e4c3d0906554842e13841
[ "MIT" ]
1
2019-01-14T13:20:11.000Z
2019-01-14T13:20:11.000Z
#include "transforms/gdprocmult.h" using namespace godot; void GDProcMult::_register_methods() { register_property<GDProcMult, float>("mult", &GDProcMult::set_mult, &GDProcMult::get_mult, 1.0); } String GDProcMult::get_type_name() { return "Multiply"; } String GDProcMult::get_description() const { return "Multiplies all reals in input by mult."; } void GDProcMult::_init() { // first call super class GDProcNode::_init(); // default values values.resize(1); values.set(0, 0.0f); default_mult = 1.0f; } void GDProcMult::set_mult(float p_mult) { if (default_mult != p_mult) { default_mult = p_mult; must_update = true; emit_signal("changed"); } } float GDProcMult::get_mult() { return default_mult; } bool GDProcMult::update(bool p_inputs_updated, const Array &p_inputs) { bool updated = must_update || p_inputs_updated; must_update = false; if (updated) { int num_values = 0; PoolRealArray input_values; int num_mults = 0; PoolRealArray mults; int input_count = p_inputs.size(); if (input_count > 0) { if (p_inputs[0].get_type() == Variant::POOL_REAL_ARRAY) { input_values = p_inputs[0]; num_values = input_values.size(); } } if (input_count > 1) { if (p_inputs[1].get_type() == Variant::POOL_REAL_ARRAY) { mults = p_inputs[1]; num_mults = mults.size(); } } if (num_mults == 0) { mults.push_back(default_mult); num_mults++; } if (num_values > 0) { int new_size = num_values > num_mults ? num_values : num_mults; values.resize(new_size); PoolRealArray::Write w = values.write(); PoolRealArray::Read r = input_values.read(); PoolRealArray::Read m = mults.read(); for (int i = 0; i < new_size; i++) { w[i] = r[i % num_values] * m[i % num_mults]; } } else { values.resize(0); } } return updated; } int GDProcMult::get_input_connector_count() const { return 2; } Variant::Type GDProcMult::get_input_connector_type(int p_slot) const { if (p_slot == 0) { return Variant::POOL_REAL_ARRAY; } else { return Variant::POOL_REAL_ARRAY; } } const String GDProcMult::get_input_connector_name(int p_slot) const { if (p_slot == 0) { return "values"; } else if (p_slot == 1) { return "multiply"; } return ""; } const String GDProcMult::get_connector_property_name(int p_slot) const { if (p_slot == 1) { return "mult"; } return ""; } int GDProcMult::get_output_connector_count() const { return 1; } Variant::Type GDProcMult::get_output_connector_type(int p_slot) const { return Variant::POOL_REAL_ARRAY; } const String GDProcMult::get_output_connector_name(int p_slot) const { return "values"; } const Variant GDProcMult::get_output(int p_slot) const { return Variant(values); }
20.350746
97
0.686835
RodZill4
6a73e58307b7a1879f0fc378fd79d9a106bd9a50
542
cpp
C++
CodeForces-Solution/1295A.cpp
Tech-Intellegent/CodeForces-Solution
2f291a38b80b8ff2a2595b2e526716468ff26bf8
[ "MIT" ]
1
2022-01-23T07:18:07.000Z
2022-01-23T07:18:07.000Z
CodeForces-Solution/1295A.cpp
Tech-Intellegent/CodeForces-Solution
2f291a38b80b8ff2a2595b2e526716468ff26bf8
[ "MIT" ]
null
null
null
CodeForces-Solution/1295A.cpp
Tech-Intellegent/CodeForces-Solution
2f291a38b80b8ff2a2595b2e526716468ff26bf8
[ "MIT" ]
1
2022-02-05T11:53:04.000Z
2022-02-05T11:53:04.000Z
#include<bits/stdc++.h> using namespace std; #define pii pair<int,int> #define pll pair<ll,ll> #define eb emplace_back #define ll long long #define nl '\n' #define deb(x) cerr<<#x" = "<<x<<nl #define in() ( { int a ; scanf("%d",&a); a; } ) const int N = 3e5 + 9; const int mod = 1e9 + 7; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while(t--){ int n; cin >> n; if(n & 1) cout << "7" + string(n/2 - 1, '1') << nl; else cout << string(n/2, '1') << nl; } return 0; }
21.68
59
0.5369
Tech-Intellegent
6a7d5f6eaa380bb208ccd2e1ef637b368bf186b8
37
cpp
C++
Engine/Source/GameFramework/Core/Actor.cpp
minimpoun/MARS-Engine
c69f4703289699367d3788477a535e5458bebb93
[ "Apache-2.0" ]
2
2020-12-02T01:40:26.000Z
2021-09-22T08:35:29.000Z
Engine/Source/GameFramework/Core/Actor.cpp
gameplay-solutions/MARS-Engine
9261038f6f8e23523b7fff3c5ff683641f06eb64
[ "Apache-2.0" ]
null
null
null
Engine/Source/GameFramework/Core/Actor.cpp
gameplay-solutions/MARS-Engine
9261038f6f8e23523b7fff3c5ff683641f06eb64
[ "Apache-2.0" ]
3
2018-08-18T21:12:49.000Z
2019-11-04T08:17:28.000Z
#include "GameFramework/Core/Actor.h"
37
37
0.810811
minimpoun
6a7ed780de2f9a071d4b5ee28e3918404fe39765
2,079
cpp
C++
libadaptivity/load_balance/src/invent_pressure_mesh.cpp
luh1202/DynEarthSol
60a46924fc9b7cac72f66554c78930c50f3817d0
[ "MIT" ]
11
2019-09-25T08:10:04.000Z
2022-02-20T07:47:05.000Z
libadaptivity/load_balance/src/invent_pressure_mesh.cpp
luh1202/DynEarthSol
60a46924fc9b7cac72f66554c78930c50f3817d0
[ "MIT" ]
5
2019-11-25T17:35:09.000Z
2021-12-01T09:58:45.000Z
libadaptivity/load_balance/src/invent_pressure_mesh.cpp
luh1202/DynEarthSol
60a46924fc9b7cac72f66554c78930c50f3817d0
[ "MIT" ]
9
2019-09-27T02:15:09.000Z
2021-07-05T15:38:52.000Z
/* Copyright (C) 2006 Imperial College London and others. Please see the AUTHORS file in the main source directory for a full list of copyright holders. Dr Gerard J Gorman Applied Modelling and Computation Group Department of Earth Science and Engineering Imperial College London g.gorman@imperial.ac.uk 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. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <mpi.h> #include <assert.h> #include <vector> #include <deque> #include <string> #include <map> #include <set> using namespace std; #include "Mesh.h" #include "c++debug.h" // Invent a pressure mesh. void Mesh::invent_pressure_mesh(){ ECHO("Inventing a pressure mesh."); MFnode_list.clear(); // Generate a pressure mesh based on the velocity. MFnode_list.expand( node_list.size() ); for(unsigned i=0; i<node_list.size(); i++){ MFnode_list[i].set_unn( node_list[i].get_unn() ); MFnode_list[i].set_gnn( node_list[i].get_gnn() ); assert(node_list[i].get_gnn() == i); MFnode_list[i].set_flags( node_list[i].get_flags() ); MFnode_list[i].set_owner( node_list[i].get_current_owner() ); } for(ElementVector<Element>::iterator it = element_list.begin(); it != element_list.end(); ++it){ if((*it).get_flags() & ELM_VOLUME) (*it).set_MFenlist( (*it).get_enlist() ); } shared_pnodes = shared_nodes; halo_pnodes = halo_nodes; assert( mesh_consistant() ); return; } // finished inventing pressure mesh
30.130435
98
0.718134
luh1202
6a808815e08795fd77159131236da753b4eb0d71
3,518
cpp
C++
EZOJ/Contests/1549/A.cpp
sshockwave/Online-Judge-Solutions
9d0bc7fd68c3d1f661622929c1cb3752601881d3
[ "MIT" ]
6
2019-09-30T16:11:00.000Z
2021-11-01T11:42:33.000Z
EZOJ/Contests/1549/A.cpp
sshockwave/Online-Judge-Solutions
9d0bc7fd68c3d1f661622929c1cb3752601881d3
[ "MIT" ]
4
2017-11-21T08:17:42.000Z
2020-07-28T12:09:52.000Z
EZOJ/Contests/1549/A.cpp
sshockwave/Online-Judge-Solutions
9d0bc7fd68c3d1f661622929c1cb3752601881d3
[ "MIT" ]
4
2017-07-26T05:54:06.000Z
2020-09-30T13:35:38.000Z
#include <iostream> #include <cstdio> #include <cstring> #include <cassert> #include <cctype> using namespace std; typedef long long lint; #define cout cerr #define ni (next_num<int>()) template<class T>inline T next_num(){ T i=0;char c; for(;!isdigit(c=getchar())&&c!='-';); bool neg=c=='-'; neg?c=getchar():0; for(;i=i*10-'0'+c,isdigit(c=getchar());); return neg?-i:i; } template<class A,class B>inline void apmax(A &a,const B &b){if(a<b)a=b;} template<class A,class B>inline void apmin(A &a,const B &b){if(b<a)a=b;} template<class T>inline void mset(T a[],int v,int n){memset(a,v,n*sizeof(T));} template<class T>inline void mcpy(T a[],const T b[],int n){memcpy(a,b,n*sizeof(b));} const int N=1e5+10,O=998244353; inline int fpow(int x,int n){ int a=1; for(;n;n>>=1,x=(lint)x*x%O){ if(n&1){ a=(lint)a*x%O; } } return a; } inline int inv_pow(int x){ return fpow(x,O-2); } int a[N],soncnt[N],sump[N]; lint sumg[N]; int idx[N]; namespace seg{ struct Node; typedef Node* node; struct Node{ node lson,rson; int l,m,r; int a,b;//f=a*x+b inline void up(){ a=(lint)lson->a*rson->a%O; b=((lint)lson->a*rson->b+lson->b)%O; } inline void getinfo(){ const int x=idx[m]; a=inv_pow(sump[x]+1),b=((lint)(soncnt[x]+1)*::a[x]+sumg[x])%O*a%O; } }pool[N<<1]; node build(int l,int r){ static node n=pool; const node x=n++; x->l=l,x->m=(l+r)>>1,x->r=r; if(l==r){ x->getinfo(); }else{ x->lson=build(l,x->m); x->rson=build(x->m+1,r); x->up(); } return x; } void alt_upd(node x,int p){ if(x->l==x->r){ x->getinfo(); }else{ alt_upd(p<=x->m?x->lson:x->rson,p); x->up(); } } } namespace T{ const int E=::N<<1; int to[E],bro[E],head[N],e=0; int fa[N],son[N],siz[N],top[N],dfn[N],dfe[N],tim=0; inline void init(int n){ mset(head+1,-1,n); } inline void ae(int u,int v){ to[e]=v,bro[e]=head[u],head[u]=e++; } inline void add(int u,int v){ ae(u,v),ae(v,u); } int p[N]; void dfs1(int x){ soncnt[x]=0; sump[x]=0; for(int i=head[x],v;~i;i=bro[i]){ if((v=to[i])==fa[x])continue; fa[v]=x; dfs1(v); ++soncnt[x]; sump[x]=(sump[x]+p[v])%O; } if(soncnt[x]){ p[x]=(lint)sump[x]*inv_pow(sump[x]+1)%O; }else{ p[x]=1; } } void dfs2(int x){ siz[x]=1; son[x]=0; for(int i=head[x],v;~i;i=bro[i]){ if((v=to[i])==fa[x])continue; dfs2(v); siz[x]+=siz[v]; if(siz[v]>siz[son[x]]){ son[x]=v; } } } seg::node rt[N]; void dfs3(int x){ sumg[x]=0; top[x]=son[fa[x]]==x?top[fa[x]]:x; dfn[x]=++tim,idx[tim]=x; if(son[x]){ dfs3(son[x]); for(int i=head[x],v;~i;i=bro[i]){ if((v=to[i])==fa[x]||v==son[x])continue; dfs3(v); } }else{ dfe[top[x]]=dfn[x]; } if(x==top[x]){ rt[x]=seg::build(dfn[x],dfe[x]); if(fa[x]){ sumg[fa[x]]+=rt[x]->b; } } } inline void upd(int x){ for(;x;x=fa[top[x]]){ if(fa[top[x]]){ sumg[fa[top[x]]]-=rt[top[x]]->b; } seg::alt_upd(rt[top[x]],dfn[x]); if(fa[top[x]]){ sumg[fa[top[x]]]+=rt[top[x]]->b; } } } } inline int getans(){ using namespace T; return (rt[1]->b-(lint)(1-p[1])*a[1])%O*inv_pow(p[1])%O; } int main(){ #ifndef ONLINE_JUDGE freopen("satisfy.in","r",stdin); freopen("satisfy.out","w",stdout); #endif const int n=ni; T::init(n); for(int i=1;i<=n;i++){ a[i]=ni; } for(int i=1;i<n;i++){ T::add(ni,ni); } T::fa[1]=0,T::siz[0]=0,T::son[0]=0; T::dfs1(1),T::dfs2(1),T::dfs3(1); for(int tot=ni;printf("%d\n",getans()),tot--;){ int u=ni; a[u]=ni; T::upd(u); } return 0; }
19.875706
84
0.543491
sshockwave
6a81bede78860aefd64dee60c3c9cecf19f949fb
1,416
cpp
C++
1721_Swapping Nodes in a Linked List.cpp
RickTseng/Cpp_LeetCode
6a710b8abc268eba767bc17d91d046b90a7e34a9
[ "MIT" ]
1
2021-09-13T00:58:59.000Z
2021-09-13T00:58:59.000Z
1721_Swapping Nodes in a Linked List.cpp
RickTseng/Cpp_LeetCode
6a710b8abc268eba767bc17d91d046b90a7e34a9
[ "MIT" ]
null
null
null
1721_Swapping Nodes in a Linked List.cpp
RickTseng/Cpp_LeetCode
6a710b8abc268eba767bc17d91d046b90a7e34a9
[ "MIT" ]
null
null
null
#include<vector> #include<stdlib.h> #include<algorithm> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: ListNode* swapNodes(ListNode* head, int k) { vector<int> tmp; int b=1,e = 0; read(head,k,b,e,tmp); return head; } void read(ListNode* &node,int k,int b,int &e,vector<int> &tmp){ if(node==nullptr){ e=1; return; } tmp.push_back(node->val); read(node->next,k,b+1,e,tmp); if(e==k){ node->val = tmp[k-1]; } if(b==k){ node->val = tmp[tmp.size()-k]; } e++; } }; int main(){ ListNode *head = new ListNode(1); head->next = new ListNode(2); head->next->next = new ListNode(3); head->next->next->next = new ListNode(4); head->next->next->next->next = new ListNode(5); Solution sol; ListNode *ans = sol.swapNodes(head,4); } /* The number of nodes in the list is n. 1 <= k <= n <= 10^5 0 <= Node.val <= 100 Runtime: 1054 ms, faster than 16.08% of C++ online submissions for Swapping Nodes in a Linked List. Memory Usage: 197.9 MB, less than 6.11% of C++ online submissions for Swapping Nodes in a Linked List. */
25.745455
102
0.555791
RickTseng
6a81df28e98230b1fe484584b50453162756ff08
4,780
cc
C++
src/classFilter.cc
taepatipol/nogdb.js
04278b2cd7538479e5273eb1f844c370c5d3af83
[ "MIT" ]
1
2018-07-27T14:54:01.000Z
2018-07-27T14:54:01.000Z
src/classFilter.cc
taepatipol/nogdb.js
04278b2cd7538479e5273eb1f844c370c5d3af83
[ "MIT" ]
null
null
null
src/classFilter.cc
taepatipol/nogdb.js
04278b2cd7538479e5273eb1f844c370c5d3af83
[ "MIT" ]
1
2019-06-21T08:24:53.000Z
2019-06-21T08:24:53.000Z
#include <nan.h> #include <nogdb/nogdb.h> #include "classFilter.hpp" Nan::Persistent<v8::FunctionTemplate> ClassFilter::constructor; NAN_MODULE_INIT(ClassFilter::Init) { v8::Local<v8::FunctionTemplate> constructTemplate = Nan::New<v8::FunctionTemplate>(ClassFilter::New); constructor.Reset(constructTemplate); constructTemplate->InstanceTemplate()->SetInternalFieldCount(1); constructTemplate->SetClassName(Nan::New("ClassFilter").ToLocalChecked()); Nan::SetPrototypeMethod(constructTemplate, "add", ClassFilter::add); Nan::SetPrototypeMethod(constructTemplate, "remove", ClassFilter::remove); Nan::SetPrototypeMethod(constructTemplate, "size", ClassFilter::size); Nan::SetPrototypeMethod(constructTemplate, "empty", ClassFilter::empty); Nan::SetPrototypeMethod(constructTemplate, "getClassName", ClassFilter::getClassName); target->Set(Nan::New("ClassFilter").ToLocalChecked(), constructTemplate->GetFunction()); } NAN_METHOD(ClassFilter::New) { if (!info.IsConstructCall()) { return Nan::ThrowError( Nan::New("new ClassFilter() - called without new keyword").ToLocalChecked()); } if (info.Length() == 1 && info[0]->IsArray()) { v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(info[0]); std::set<std::string> classNames; for (unsigned int i = 0; i < array->Length(); i++ ) { if (Nan::Has(array, i).FromJust()) { if(!Nan::Get(array, i).ToLocalChecked()->IsString()){ Nan::ThrowError("Array member must be string"); return; } classNames.insert(*Nan::Utf8String(Nan::Get(array, i).ToLocalChecked()->ToString())); } } ClassFilter *classF = new ClassFilter(classNames);; classF->Wrap(info.Holder()); info.GetReturnValue().Set(info.Holder()); } else { return Nan::ThrowError(Nan::New("new ClassFilter() - invalid arugment(s)").ToLocalChecked()); } } NAN_METHOD(ClassFilter::add) { if (info.Length() == 1 && info[0]->IsString()) { ClassFilter *classF = Nan::ObjectWrap::Unwrap<ClassFilter>(info.This()); try { classF->base.add(*Nan::Utf8String(info[0]->ToString())); } catch ( nogdb::Error& err ) { Nan::ThrowError(err.what()); } } else { return Nan::ThrowError(Nan::New("ClassFilter.add() - invalid arugment(s)").ToLocalChecked()); } } NAN_METHOD(ClassFilter::remove) { if (info.Length() == 1 && info[0]->IsString()) { ClassFilter *classF = Nan::ObjectWrap::Unwrap<ClassFilter>(info.This()); try { classF->base.remove(*Nan::Utf8String(info[0]->ToString())); } catch ( nogdb::Error& err ) { Nan::ThrowError(err.what()); } } else { return Nan::ThrowError(Nan::New("ClassFilter.remove() - invalid arugment(s)").ToLocalChecked()); } } NAN_METHOD(ClassFilter::size) { ClassFilter *classF = Nan::ObjectWrap::Unwrap<ClassFilter>(info.This()); try { info.GetReturnValue().Set(Nan::New<v8::Number>(classF->base.size())); } catch ( nogdb::Error& err ) { Nan::ThrowError(err.what()); } } NAN_METHOD(ClassFilter::empty) { ClassFilter *classF = Nan::ObjectWrap::Unwrap<ClassFilter>(info.This()); try { info.GetReturnValue().Set(Nan::New<v8::Boolean>(classF->base.empty())); } catch ( nogdb::Error& err ) { Nan::ThrowError(err.what()); } } NAN_METHOD(ClassFilter::getClassName) { ClassFilter *classF = Nan::ObjectWrap::Unwrap<ClassFilter>(info.This()); try { std::set<std::string> classNames = classF->base.getClassName(); v8::Local<v8::Array> retval = Nan::New<v8::Array>(classNames.size()); int i = 0; for(std::string className: classNames){ Nan::Set(retval, i, Nan::New<v8::String>(className).ToLocalChecked()); i++; } info.GetReturnValue().Set(retval); } catch ( nogdb::Error& err ) { Nan::ThrowError(err.what()); } } v8::Local<v8::Object> ClassFilter::NewInstance(v8::Local<v8::Value> classNames) { Nan::EscapableHandleScope scope; const unsigned argc = 1; v8::Local<v8::Value> argv[argc] = { classNames }; v8::Local<v8::FunctionTemplate> tp1 = Nan::New<v8::FunctionTemplate>(constructor); v8::Local<v8::Function> cons = Nan::GetFunction(tp1).ToLocalChecked(); v8::Local<v8::Object> instance = Nan::NewInstance(cons,argc, argv).ToLocalChecked(); return scope.Escape(instance); }
35.147059
105
0.596444
taepatipol
6a823142de5b0f5374fa971a92feeed5c491ce10
2,992
cpp
C++
Audio/SoundManager.cpp
black-square/mango2d
7fe942eec5ab39e98b591f0ad266ed2bfc91e433
[ "MIT" ]
2
2015-10-21T15:11:04.000Z
2016-05-13T07:53:39.000Z
Audio/SoundManager.cpp
black-square/mango2d
7fe942eec5ab39e98b591f0ad266ed2bfc91e433
[ "MIT" ]
null
null
null
Audio/SoundManager.cpp
black-square/mango2d
7fe942eec5ab39e98b591f0ad266ed2bfc91e433
[ "MIT" ]
null
null
null
#include "stdafx.h" #include "SoundManager.h" #include "SoundCache.h" SDL_AudioSpec SoundManager::GetSpecs() { SDL_AudioSpec fmt; /* Set 16-bit stereo audio at 22Khz */ fmt.freq = 44100; fmt.format = AUDIO_S16; fmt.channels = 1; fmt.samples = 1024; /* A good value for games */ return fmt; } ////////////////////////////////////////////////////////////////////////// SoundManager::SoundManager() { SDL_AudioSpec fmt( GetSpecs() ); fmt.callback = MixAudioCbk; fmt.userdata = this; /* Open the audio device and start playing sound! */ if ( SDL_OpenAudio(&fmt, NULL) < 0 ) LOG_FATAL( FMT("Unable to open audio: %s") % SDL_GetError() ); SDL_PauseAudio(0); } ////////////////////////////////////////////////////////////////////////// SoundManager::~SoundManager() { SDL_CloseAudio(); } ////////////////////////////////////////////////////////////////////////// void SoundManager::MixAudioCbk( Uint8 *stream, int len ) { int i; Uint32 amount; for ( i=0; i<NUM_SOUNDS; ++i ) { amount = (m_sounds[i].dlen-m_sounds[i].dpos); if ( amount > Uint32(len) ) { amount = len; } SDL_MixAudio(stream, &m_sounds[i].data[m_sounds[i].dpos], amount, SDL_MIX_MAXVOLUME); m_sounds[i].dpos += amount; } } ////////////////////////////////////////////////////////////////////////// void SoundManager::MixAudioCbk( void *userdata, Uint8 *stream, int len ) { static_cast<SoundManager *>(userdata)->MixAudioCbk(stream, len) ; } ////////////////////////////////////////////////////////////////////////// void SoundManager::Play( const Sound &s ) { ASSERT( s.IsValid() ); int index; /* Look for an empty (or finished) sound slot */ for ( index=0; index < NUM_SOUNDS; ++index ) { if( m_sounds[index].dpos == m_sounds[index].dlen ) break; //Block same sounds simultaneously playing if( m_sounds[index].dpos == 0 && m_sounds[index].data == s.GetCVT().buf ) return; } if( index == NUM_SOUNDS ) return; SDL_LockAudio(); m_sounds[index].data = s.GetCVT().buf; m_sounds[index].dlen = s.GetCVT().len_cvt; m_sounds[index].dpos = 0; SDL_UnlockAudio(); } ////////////////////////////////////////////////////////////////////////// static boost::scoped_ptr<SoundManager> g_sndMngr; static boost::scoped_ptr<SoundCache> g_sndCache; ////////////////////////////////////////////////////////////////////////// void InitGlobalSoundManager() { g_sndMngr.reset( new SoundManager() ); g_sndCache.reset( new SoundCache() ); } ////////////////////////////////////////////////////////////////////////// void DestroyGlobalSoundManager() { g_sndMngr.reset(); g_sndCache.reset(); } ////////////////////////////////////////////////////////////////////////// void PlaySound( const char *szFile ) { ASSERT( g_sndMngr && g_sndCache ); g_sndMngr->Play( g_sndCache->Get(szFile) ); }
26.245614
90
0.487968
black-square
6a86d967dcded636c73ee23709e37964f2eccd6e
2,888
cpp
C++
include/render/view.cpp
weigert/TinyFluid
7d8fc1d466e658c8a406c8b18527de9f1917db47
[ "MIT" ]
10
2020-08-05T08:23:08.000Z
2022-02-20T04:44:55.000Z
include/render/view.cpp
weigert/TinyFluid
7d8fc1d466e658c8a406c8b18527de9f1917db47
[ "MIT" ]
null
null
null
include/render/view.cpp
weigert/TinyFluid
7d8fc1d466e658c8a406c8b18527de9f1917db47
[ "MIT" ]
2
2020-10-19T13:38:46.000Z
2020-12-03T17:23:00.000Z
#include "view.h" /* ================================================================================ SETUP / CLEANUP ================================================================================ */ bool View::setup(){ //Initialize SDL if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) return false; //Create window gWindow = SDL_CreateWindow( WINDOW_NAME.c_str(), SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN ); if( gWindow == NULL ) return false; //Prepare the Renderer gRenderer = SDL_CreateRenderer(gWindow, -1, SDL_RENDERER_ACCELERATED); SDL_SetRenderDrawBlendMode(gRenderer, SDL_BLENDMODE_BLEND); SDL_GL_SetSwapInterval(false); return true; } void View::cleanup(){ //Destroy window SDL_DestroyWindow( gWindow ); SDL_DestroyRenderer (gRenderer); //Quit SDL subsystems SDL_Quit(); } /* ================================================================================ RENDER MASTER ================================================================================ */ template<typename F, typename... Args> void View::render(F function, Args&&... args){ //Clear the Window // std::cout<<"Render "; // timer::benchmark<std::chrono::microseconds>([&](){ SDL_SetRenderDrawColor(gRenderer, 0, 0, 0, 255); SDL_RenderClear(gRenderer); //Call whatever the user has specified... function(args...); //Present the Information SDL_RenderPresent(gRenderer); // }); } /* ================================================================================ DRAWING HELPERS ================================================================================ */ void View::drawPixel(glm::ivec2 pos, glm::vec3 color, double opacity){ /* Construct a Rect and Fill with Color at Position */ int ratiox = SCREEN_WIDTH / SIZE; int ratioy = SCREEN_HEIGHT / SIZE; SDL_Rect rect{ratiox*pos.x, ratioy*pos.y, ratiox, ratioy}; SDL_SetRenderDrawColor(gRenderer, 255*color.x, 255*color.y, 255*color.z, 255*opacity); SDL_RenderFillRect(gRenderer, &rect); } void View::drawPixel(glm::ivec2 pos, glm::vec3 color, double opacity, int _SIZE){ /* Construct a Rect and Fill with Color at Position */ int ratiox = SCREEN_WIDTH / _SIZE; int ratioy = SCREEN_HEIGHT / _SIZE; SDL_Rect rect{ratiox*pos.x, ratioy*pos.y, ratiox, ratioy}; SDL_SetRenderDrawColor(gRenderer, 255*color.x, 255*color.y, 255*color.z, 255*opacity); SDL_RenderFillRect(gRenderer, &rect); } void View::drawLine(glm::vec2 pos, glm::vec2 dir){ double scale = 2.0; int ratiox = SCREEN_WIDTH / SIZE; int ratioy = SCREEN_HEIGHT / SIZE; /* I need Direction AND Intensity */ SDL_SetRenderDrawColor(gRenderer, 255, 255, 255, 255); SDL_RenderDrawLine(gRenderer, ratiox*(pos.x+0.5-scale*0.5*dir.x), ratioy*(pos.y+0.5-scale*0.5*dir.y), ratiox*(pos.x+0.5+scale*0.5*dir.x), ratioy*(pos.y+0.5+scale*0.5*dir.y)); }
31.391304
175
0.585873
weigert
6a88e2951eb518a01dff8cac1efcd0032a629bef
20,803
cpp
C++
api.cpp
Meditator-hkx/Reno-Hash
7b96433b698bd492b8bea5e240950bc0ee30eb9f
[ "Apache-2.0" ]
null
null
null
api.cpp
Meditator-hkx/Reno-Hash
7b96433b698bd492b8bea5e240950bc0ee30eb9f
[ "Apache-2.0" ]
null
null
null
api.cpp
Meditator-hkx/Reno-Hash
7b96433b698bd492b8bea5e240950bc0ee30eb9f
[ "Apache-2.0" ]
null
null
null
#include "config.h" #include "api.h" #include "storage.h" #include "ib.h" #include <sys/mman.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> void server_init(uint32_t index_num) { // mmap super metadata int fd = open(PM_PATH, O_RDWR | O_CREAT); fd = -1; if (fd == -1) { Super = (SuperMeta *)mmap(0, SUPER_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); } else { Super = (SuperMeta *)mmap(0, SUPER_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); } goto debug; // normal recover if (Super->magic == MAGIC && Super->iline_num == index_num) { if (fd == -1) ILine = (IndexLine *)mmap(0, Super->table_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, Super->index_off); else ILine = (IndexLine *)mmap(0, Super->table_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, Super->index_off); DLine = (DataLine *)(ILine + index_num); Super->magic = MAGIC - 1; } // for evaluation, this will never be called // crash recovery else if (Super->magic == MAGIC - 1 && Super->iline_num == index_num) { Super->magic = 0; if (fd == -1) ILine = (IndexLine *)mmap(0, Super->table_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, Super->index_off); else ILine = (IndexLine *)mmap(0, Super->table_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, Super->index_off); DLine = (DataLine *)(ILine + index_num); server_recover(index_num); Super->magic = MAGIC - 1; } // allocate space for the first time else { debug: Super->table_size = (index_num + BUCKET_NUM_PER_GROUP - 1) * 8; Super->table_size += (index_num + BUCKET_NUM_PER_GROUP - 1) * LINE_NUM_PER_BUCKET * DATA_LINE_SIZE; if (fd == -1) ib_res.buf = (char *)mmap(0, Super->table_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, PAGE_SIZE); else ib_res.buf = (char *)mmap(0, Super->table_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, PAGE_SIZE); setup_ib(); ILine = (IndexLine *)ib_res.buf; DLine = (DataLine *)(ILine + index_num + BUCKET_NUM_PER_GROUP - 1); Super->iline_num = index_num; IndexLineNum = index_num; Super->dline_num = Super->iline_num * LINE_NUM_PER_BUCKET; Super->index_off = PAGE_SIZE; Super->kv_num = 0; Super->table_in_use = 0; Super->rehash_flag = 0; index_init(); Super->magic = MAGIC - 1; } } void index_init() { IndexLine *iLine = ILine; uint8_t *free_count; for (uint32_t i = 0;i < Super->iline_num + BUCKET_NUM_PER_GROUP - 1;i++) { *iLine = 0; free_count = ((uint8_t *)iLine + 5); *free_count = LINE_NUM_PER_BUCKET; iLine++; } } void server_exit() { Super->magic = MAGIC; munmap(Super, SUPER_SIZE); munmap(ILine, Super->table_size); } void server_recover(uint32_t index_num) { for (uint32_t i = 0;i < index_num;i++) { deal_pending(i); } } int server_search(char *key, char *value) { // 1. hash to corresponding data bucket uint32_t bucket_off = server_hash(key); DataLine *dLine = DLine + bucket_off * LINE_NUM_PER_BUCKET; int exist_flag = 0; // search in the first bucket // (it is special because it is the primary hashed bucket for clients) for (int i = 0;i < LINE_NUM_PER_BUCKET;i++) { if (strcmp(dLine->kv.key, key) == 0) { if (dLine->valid == 3) { exist_flag = 3; } else if (dLine->valid == 2) { strcpy(value, dLine->kv.value); exist_flag = 2; } else if (dLine->valid == 1) { if (exist_flag < 1) { strcpy(value, dLine->kv.value); exist_flag = 1; } } } dLine++; } if (exist_flag == 3) { return -1; } else if (exist_flag >= 1) { return 0; } // if exist_flag == 0, continue for (int i = 1;i < BUCKET_NUM_PER_GROUP;i++) { for (int j = 0;j < LINE_NUM_PER_BUCKET;j++) { if (strcmp(dLine->kv.key, key) == 0 && dLine->valid == 1) { strcpy(value, dLine->kv.value); return 0; } dLine++; } } // no key-value information in the entire group return -1; } int search_old(char *key, uint32_t &iline_off, uint32_t &dline_off) { // hash to corresponding data bucket uint32_t bucket_off = server_hash(key); DataLine *dLine = DLine + bucket_off * LINE_NUM_PER_BUCKET; for (int i = 0;i < BUCKET_NUM_PER_GROUP;i++) { for (int j = 0;j < LINE_NUM_PER_BUCKET;j++) { if ((strcmp(dLine->kv.key, key) == 0) && dLine->valid == 1) { iline_off = bucket_off + i; dline_off = j; return 0; } dLine++; } } return -1; } int server_insert(char *key, char *value) { // 1. hash to corresponding data bucket uint32_t bucket_off = server_hash(key); IndexLine *iLine = ILine + bucket_off; DataLine *dLine = DLine + bucket_off * LINE_NUM_PER_BUCKET; uint8_t *bitmap; uint8_t *free_count; uint8_t *llock; uint32_t *rlock; // lock corresponding bucket (or its neighbour bucket when specified bucket is full) for (int i = 0;i < BUCKET_NUM_PER_GROUP;i++) { bitmap = (uint8_t *)iLine + 7; free_count = (uint8_t *)iLine + 5; llock = (uint8_t *)iLine + 4; rlock = (uint32_t *)iLine; // if (free_count > llock + rlock) if (*free_count > *llock + *rlock) { // update index bucket atomically *llock += 1; // add data to the locked bucket // step 1. make sure which slot is able to use int target_slot = -1; int count_llock = 0; for (int j = LINE_NUM_PER_BUCKET - 1; j >= 0;j--) { if ((*bitmap & (BIT_FLAG >> j)) == 0) { count_llock++; if (count_llock == *llock) { target_slot = j; break; } } } if (target_slot == -1) { *llock -= 1; return -1; } // step 3. write key-value data to that slot dLine += target_slot; strcpy(dLine->kv.key, key); strcpy(dLine->kv.value, value); dLine->valid = 1; // insert operation // step 4. if there is need to deal with the whole bucket if (*free_count <= *llock + *rlock) { deal_pending(bucket_off); } return 0; } else { iLine++; dLine += LINE_NUM_PER_BUCKET; } } return -1; } void server_check() { // propose a recv request int ret; for (int i = 0;i < NODE_NUM;i++) { ret = rdma_srq_recv(); if (ret == -1) { exit(-1); } } while(1) { // post recv request for immediate int flag = 0; uint32_t imm_data; ret = post_cq(flag, imm_data); if (ret == -1) { printf("fail to poll recv.\n"); exit(-1); } else { // supplement a recv request ret = rdma_srq_recv(); if (ret == -1) { printf("fail to poll recv.\n"); exit(-1); } deal_pending(imm_data); } } } int findRelocateSlot(uint32_t off, int llock_off) { IndexLine *iLine = ILine + off; DataLine *dLine = DLine + off * LINE_NUM_PER_BUCKET; uint8_t *bitmap = (uint8_t *)iLine + 7; for (int i = LINE_NUM_PER_BUCKET-1;i >= 0;i--) { if ((*bitmap & (BIT_FLAG >> i)) == 0) { // only insert (relocate) will occur llock_off--; if (llock_off == 0) { return i; } } } return -1; } int relocate(uint32_t off, uint64_t &index_tmp) { DataLine *dLine = DLine + off * LINE_NUM_PER_BUCKET; IndexLine *tIndex; DataLine *tLine; uint32_t hash_off; uint8_t *bitmap = (uint8_t *)&index_tmp + 7; uint8_t *pendingmap = (uint8_t *)&index_tmp + 6; uint8_t *freecount = (uint8_t *)&index_tmp + 5; uint8_t *llock = (uint8_t *)&index_tmp + 4; uint32_t *rlock = (uint32_t *)&index_tmp; // count how many keys should be migrated: 4 - free_count int migrate_count = 2; for (int i = 0;i < LINE_NUM_PER_BUCKET;i++) { // choose a key and its corresponding bucket & neighbour if (dLine->valid == 1) { hash_off = server_hash(dLine->kv.key); for (int j = 0;j < BUCKET_NUM_PER_GROUP;j++) { if (hash_off + j == off) continue; // check the index of its neighbour and compute free slots tIndex = ILine + hash_off + j; bitmap = (uint8_t *)tIndex + 7; freecount = (uint8_t *)tIndex + 5; llock = (uint8_t *)tIndex + 4; rlock = (uint32_t *)tIndex; if (*freecount - *llock - *rlock > 2) { // if possible, lock one free slot using llock *llock += 1; int target_off = findRelocateSlot(hash_off + j, *llock); if (target_off == -1) { *llock -= 1; return -1; } tLine = DLine + (hash_off + j) * LINE_NUM_PER_BUCKET + target_off; // migrate data to corresponding data slot memcpy(&tLine->kv, &dLine->kv, sizeof(KeyValue)); // set the valid bit to be 1 tLine->valid = 1; // delete in local bucket dLine->valid = 0; // reset index slot *((uint8_t *)&index_tmp + 7) &= (~BIT_FLAG >> i); // bitmap 1->0 *((uint8_t *)&index_tmp + 5) += 1; // free_count++ migrate_count--; break; } } } // loop for next key to migrate if (migrate_count == 0) { return 0; } dLine++; } return -1; } void deal_pending(uint32_t off) { IndexLine *iLine = ILine + off; DataLine *dLine; uint8_t *bitmap = (uint8_t *)iLine + 7; uint8_t *pendingmap = (uint8_t *)iLine + 6; uint8_t *freecount = (uint8_t *)iLine + 5; uint8_t *llock = (uint8_t *)iLine + 4; uint32_t *rlock = (uint32_t *)iLine; uint32_t rlock_real = MIN(*freecount-*llock, *rlock); uint32_t llock_real = *llock; IndexLine tmp = *iLine; // step 1: deal with remote locks // ordered lookup for free bits for (int i = 0;i < LINE_NUM_PER_BUCKET;i++) { if (rlock_real <= 0) { break; } if ((*bitmap & (BIT_FLAG >> i)) == 0) { dLine = DLine + off * LINE_NUM_PER_BUCKET + i; // 1. UPSERT if (dLine->valid == 2) { uint32_t iline_off, dline_off; int ret = search_old(dLine->kv.key, iline_off, dline_off); // UPSERT is an INSERT if (ret == -1) { dLine->valid = 1; *((uint8_t *)&tmp + 7) = *((uint8_t *)&tmp + 7) | (BIT_FLAG >> i); *((uint8_t *)&tmp + 5) = *((uint8_t *)&tmp + 5) - 1; } // UPSERT is an UPDATE // old and new in the same bucket else if (iline_off == off) { DataLine *oldLine = DLine + iline_off * LINE_NUM_PER_BUCKET + dline_off; oldLine->valid = 0; dLine->valid = 1; // bitmap 0->1 // bitmap 1->0 // freecount-- *((uint8_t *)&tmp + 7) = *((uint8_t *)&tmp + 7) | (BIT_FLAG >> i); *((uint8_t *)&tmp + 5) = *((uint8_t *)&tmp + 5) - 1; } // UPSERT is an UPDATE // old and new in different buckets else { DataLine *oldLine = DLine + iline_off * LINE_NUM_PER_BUCKET + dline_off; oldLine->valid = 0; dLine->valid = 1; *((uint8_t *)&tmp + 7) = *((uint8_t *)&tmp + 7) | (BIT_FLAG >> i); *((uint8_t *)&tmp + 5) = *((uint8_t *)&tmp + 5) - 1; } } // 2. DELETE else if (dLine->valid == 3) { uint32_t iline_off, dline_off; int ret = search_old(dLine->kv.key, iline_off, dline_off); if (ret == -1) { // ignore dLine->valid = 0; } // old and new in the same bucket else if (iline_off == off) { DataLine *oldLine = DLine + iline_off * LINE_NUM_PER_BUCKET + dline_off; oldLine->valid = 0; dLine->valid = 0; // bitmap 1->0 // freecount++; *((uint8_t *)&tmp + 7) = *((uint8_t *)&tmp + 7) & (~BIT_FLAG >> dline_off); *((uint8_t *)&tmp + 5) = *((uint8_t *)&tmp + 5) - 1; } // old and new in different buckets else { DataLine *oldLine = DLine + iline_off * LINE_NUM_PER_BUCKET + dline_off; oldLine->valid = 0; dLine->valid = 0; } } rlock_real--; } } // step 2: deal with local locks // notice that local lock will only be used when relocation is processed // reverse lookup for free bits for (int i = LINE_NUM_PER_BUCKET-1;i >= 0;i--) { if (llock_real <= 0) { break; } dLine = DLine + off * LINE_NUM_PER_BUCKET + i; if ((*bitmap & (BIT_FLAG >> i)) == 0) { // only insert (relocate) will occur if (dLine->valid == 1) { // bitmap 0->1 // freecount-- *((uint8_t *)&tmp + 7) = *((uint8_t *)&tmp + 7) | (BIT_FLAG >> i); *((uint8_t *)&tmp + 5) = *((uint8_t *)&tmp + 5) - 1; } llock_real--; } } // step 3. scan all inconsistent data slots // in bitmap is 1 but its valid is 0 for (int i = 0;i < LINE_NUM_PER_BUCKET;i++) { if ((*bitmap & (BIT_FLAG >> i)) > 0) { dLine = DLine + off * LINE_NUM_PER_BUCKET + i; if (dLine->valid == 0) { // bitmap 1->0 // freecount++; *((uint8_t *)&tmp + 7) = *((uint8_t *)&tmp + 7) & (~BIT_FLAG >> i); *((uint8_t *)&tmp + 5) = *((uint8_t *)&tmp + 5) + 1; } } } // step 3.5 relocate data slots if current bucket is heavy-loaded (such as 6/8) int free_count = *((uint8_t *)&tmp + 5); if (free_count < 2) { // relocate some key-value items relocate(off, tmp); } // step 4. finally, atomically update index slot *((uint8_t *)&tmp + 4) = 0; *(uint32_t *)&tmp = 0; *iLine = tmp; } int client_search(int order, char *key, char *value) { int ret; // 2.1 prepare read request uint32_t bucket_off = server_hash(key); char *remote_addr = (char *)(DLine + bucket_off * LINE_NUM_PER_BUCKET); // 2.4 post the read request (read->write) ret = rdma_read(order, remote_addr, GROUP_SIZE, ib_res.read_buf + GROUP_SIZE * order); if (ret != 0) { printf("fail to post read request.\n"); return -1; } // 2.5 poll for read signal success int flag = 1; // poll send uint32_t imm_data; ret = post_cq(flag, imm_data); if (ret == -1) { printf("fail to poll wc.\n"); return -1; } // 2.6 read through the read_buffer for the specified key DataLine *dLine = (DataLine *)(ib_res.read_buf + GROUP_SIZE * order); // EXIST_FLAG = int exist_flag = 0; // search in the first bucket (it is special because it is the only remote bucket for clients) for (int i = 0;i < LINE_NUM_PER_BUCKET;i++) { if (strcmp(dLine->kv.key, key) == 0) { switch(dLine->valid) { // VALID or RELOC case 1: case 4: if (exist_flag == 0) { strcpy(value, dLine->kv.value); exist_flag = 1; } break; // UPSERT case 2: strcpy(value, dLine->kv.value); exist_flag = 2; break; // DELETE case 3: exist_flag = 3; break; // NONE default: break; } } dLine++; } if (exist_flag == 3) { return -1; } else if (exist_flag >= 1) { return 0; } // if exist_flag == 0, continue for (int i = 1;i < BUCKET_NUM_PER_GROUP;i++) { for (int j = 0;j < LINE_NUM_PER_BUCKET;j++) { if (strcmp(dLine->kv.key, key) == 0 && dLine->valid == 1) { strcpy(value, dLine->kv.value); return 0; } dLine++; } } // no key-value information in the entire group return -1; } // no INSERT operation now // opcode = 2: UPSERT // opcode = 3: DELETE int client_write(int order, char *key, char *value, int opcode) { int ret; // 1. hash to remote bucket uint32_t bucket_off = server_hash(key); // 2. lock remote bucket // 2.1 post atomic faa request char *remote_addr = (char *)(ILine + bucket_off); uint32_t imm_data = 0; ret = rdma_write(order, remote_addr, 8, ib_res.recv_buf + BUCKET_SIZE * order, 2, imm_data); if (ret == -1) { printf("fail to post atomic request.\n"); return -1; } // 2.2 poll for atomic request signal success int flag = 1; ret = post_cq(flag, imm_data); if (ret == -1) { printf("fail to poll lock wc.\n"); return -1; } // 3. check metadata information // 3.1 index division uint64_t *meta = (uint64_t *)ib_res.recv_buf + BUCKET_SIZE * order; uint8_t *bitmap = (uint8_t *)meta + 7; uint8_t *pendingmap = (uint8_t *)meta + 6; uint8_t *freecount = (uint8_t *)meta + 5; uint8_t *llock = (uint8_t *)meta + 4; uint32_t *rlock = (uint32_t *)meta; if (*freecount <= *llock + *rlock) { printf("no free slot in this bucket, please retry later.\n"); return -1; } // 3.2 find the kth free bit in current bucket, k = rlock + 1 DataLine *dLine = DLine + LINE_NUM_PER_BUCKET * bucket_off; int skipcount = *rlock; int target_slot = -1; for (int i = 0;i < LINE_NUM_PER_BUCKET;i++) { if ((*bitmap & (BIT_FLAG >> i)) == 0) { skipcount--; if (skipcount < 0) { target_slot = i; break; } } } if (target_slot == -1) { printf("cannot find a free slot, metadata error!\n"); return -1; } // 4. write to remote data slot remote_addr = (char *)(dLine + target_slot); // 4.1 set attributes of write work request DataLine *sendline = (DataLine *)malloc(DATA_LINE_SIZE); strcpy(sendline->kv.key, key); strcpy(sendline->kv.value, value); sendline->valid = (uint8_t)opcode; // 4.2 write flag = 0; if (*freecount - *llock - *rlock <= 1) { flag = 1; } ret = rdma_write(order, remote_addr, DATA_LINE_SIZE, (char *)sendline, flag, bucket_off); if (ret != 0) { printf("cannot post write request."); return -1; } // 4.3 poll for write signal success flag = 1; // poll send ret = post_cq(flag, imm_data); if (ret == -1) { printf("fail to poll write wc.\n"); return -1; } return 0; } int client_upsert(int order, char *key, char *value) { int opcode = 2; return client_write(order, key, value, opcode); } int client_del(int order, char *key) { int opcode = 3; char *value = (char *)"null"; return client_write(order, key, value, opcode); }
31.955453
134
0.496227
Meditator-hkx
6a8b3fc7ac98b311d9a77103a82c5602451e3682
2,733
hpp
C++
include/collectors/forward_list_collector.hpp
Im-dex/eXstream
8c4fc74fd0765297e9c8d427bf72e7f6878c34f7
[ "MIT" ]
2
2017-06-21T04:58:33.000Z
2022-03-23T10:42:49.000Z
include/collectors/forward_list_collector.hpp
Im-dex/eXstream
8c4fc74fd0765297e9c8d427bf72e7f6878c34f7
[ "MIT" ]
null
null
null
include/collectors/forward_list_collector.hpp
Im-dex/eXstream
8c4fc74fd0765297e9c8d427bf72e7f6878c34f7
[ "MIT" ]
null
null
null
#pragma once #include "config.hpp" #include "utility.hpp" EXSTREAM_SUPPRESS_ALL_WARNINGS #include <type_traits> EXSTREAM_RESTORE_ALL_WARNINGS namespace std { template <typename T, typename Allocator> class forward_list; } // std namespace namespace exstream { template <typename T, typename Allocator> class forward_list_builder final { using list_t = std::forward_list<T, Allocator>; using iterator_t = typename list_t::iterator; public: forward_list_builder() : list(), last(list.before_begin()) { } explicit forward_list_builder(list_t&& list) : list(std::move(list)), last(list.before_begin()) { } forward_list_builder(forward_list_builder&&) = default; forward_list_builder(const forward_list_builder&) = delete; forward_list_builder& operator= (const forward_list_builder&) = delete; void reserve(const size_t) const noexcept { } void append(const T& value) { last = list.insert_after(last, value); } void append(T&& value) { last = list.insert_after(last, std::move(value)); } list_t build() { return std::move(list); } private: list_t list; iterator_t last; }; struct generic_forward_list_collector final { generic_forward_list_collector() noexcept = default; generic_forward_list_collector(generic_forward_list_collector&&) noexcept = default; generic_forward_list_collector(const generic_forward_list_collector&) = delete; generic_forward_list_collector& operator= (const generic_forward_list_collector&) = delete; template <typename T> auto builder(type_t<T>) { return forward_list_builder<T, std::allocator<T>>(); } }; template <typename T, typename Allocator> class forward_list_collector final { using list_t = std::forward_list<T, Allocator>; public: explicit forward_list_collector(list_t&& list) : list(std::move(list)) { } forward_list_collector(forward_list_collector&&) = default; forward_list_collector(const forward_list_collector&) = delete; forward_list_collector& operator= (const forward_list_collector&) = delete; template <typename U> auto builder(type_t<U>) -> std::enable_if_t<std::is_same_v<T, U>, forward_list_builder<U, Allocator>> { return forward_list_builder<U, Allocator>(std::move(list)); } private: list_t list; }; template <typename T, typename Allocator> auto to_forward_list(std::forward_list<T, Allocator>&& list) { return forward_list_collector<T, Allocator>(std::move(list)); } inline auto to_forward_list() noexcept { return generic_forward_list_collector(); } } // exstream namespace
22.401639
105
0.701427
Im-dex
6a8c791c775e6bf3363d6a3ac2772c2b026bf14e
4,296
hpp
C++
libraries/touchgfx_lib/Middlewares/ST/touchgfx/framework/include/touchgfx/containers/buttons/BoxWithBorderButtonStyle.hpp
LIGHT1213/H750_TouchGFX
d38acec2f2d28eaac07ef6316d6f008fb574488d
[ "MIT" ]
null
null
null
libraries/touchgfx_lib/Middlewares/ST/touchgfx/framework/include/touchgfx/containers/buttons/BoxWithBorderButtonStyle.hpp
LIGHT1213/H750_TouchGFX
d38acec2f2d28eaac07ef6316d6f008fb574488d
[ "MIT" ]
null
null
null
libraries/touchgfx_lib/Middlewares/ST/touchgfx/framework/include/touchgfx/containers/buttons/BoxWithBorderButtonStyle.hpp
LIGHT1213/H750_TouchGFX
d38acec2f2d28eaac07ef6316d6f008fb574488d
[ "MIT" ]
1
2021-12-04T02:58:52.000Z
2021-12-04T02:58:52.000Z
/** ****************************************************************************** * This file is part of the TouchGFX 4.16.0 distribution. * * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under Ultimate Liberty license * SLA0044, the "License"; You may not use this file except in compliance with * the License. You may obtain a copy of the License at: * www.st.com/SLA0044 * ****************************************************************************** */ /** * @file touchgfx/containers/buttons/BoxWithBorderButtonStyle.hpp * * Declares the touchgfx::BoxWithBorderButtonStyle class. */ #ifndef BOXWITHBORDERBUTTONSTYLE_HPP #define BOXWITHBORDERBUTTONSTYLE_HPP #include <touchgfx/widgets/BoxWithBorder.hpp> namespace touchgfx { /** * A box with border button style. This class is supposed to be used with one of the * ButtonTrigger classes to create a functional button. This class will show a box with * a border in different colors depending on the state of the button (pressed or * released). * * An image button style. This class is supposed to be used with one of the * ButtonTrigger classes to create a functional button. This class will show one of two * images depending on the state of the button (pressed or released). * * @tparam T Generic type parameter. Typically a AbstractButtonContainer subclass. * * @see AbstractButtonContainer, BoxWithBorder */ template <class T> class BoxWithBorderButtonStyle : public T { public: BoxWithBorderButtonStyle() : T(), up(), down() { borderBox.setXY(0, 0); T::add(borderBox); } /** * Sets the size and position of this BoxWithBorderButtonStyle, relative to its parent. * * @param x The x coordinate of this BoxWithBorderButtonStyle. * @param y The y coordinate of this BoxWithBorderButtonStyle. * @param width The width of this BoxWithBorderButtonStyle. * @param height The height of this BoxWithBorderButtonStyle. * * @note Changing this does not automatically yield a redraw. */ void setBoxWithBorderPosition(int16_t x, int16_t y, int16_t width, int16_t height) { borderBox.setPosition(x, y, width, height); } /** * Sets the width. * * @param width The width. */ void setBoxWithBorderWidth(int16_t width) { borderBox.setWidth(width); } /** * Sets the height. * * @param height The height. */ void setBoxWithBorderHeight(int16_t height) { borderBox.setHeight(height); } /** * Sets the colors. * * @param colorReleased The color released. * @param colorPressed The color pressed. * @param borderColorReleased The border color released. * @param borderColorPressed The border color pressed. */ void setBoxWithBorderColors(const colortype colorReleased, const colortype colorPressed, const colortype borderColorReleased, const colortype borderColorPressed) { up = colorReleased; down = colorPressed; borderUp = borderColorReleased; borderDown = borderColorPressed; handlePressedUpdated(); } /** * Sets border size. * * @param size The size. */ void setBorderSize(uint8_t size) { borderBox.setBorderSize(size); } protected: BoxWithBorder borderBox; ///< The border box colortype up; ///< The up colortype down; ///< The down colortype borderUp; ///< The border up colortype borderDown; ///< The border down /** @copydoc AbstractButtonContainer::handlePressedUpdated() */ virtual void handlePressedUpdated() { borderBox.setColor(T::getPressed() ? down : up); borderBox.setBorderColor(T::getPressed() ? borderDown : borderUp); T::handlePressedUpdated(); } /** @copydoc AbstractButtonContainer::handleAlphaUpdated() */ virtual void handleAlphaUpdated() { borderBox.setAlpha(T::getAlpha()); T::handleAlphaUpdated(); } }; } // namespace touchgfx #endif // BOXWITHBORDERBUTTONSTYLE_HPP
30.041958
165
0.635475
LIGHT1213
6a8cba79af7cb4e00bfad62f5b9694aeded95d94
7,948
cpp
C++
vendor/mysql-connector-c++-1.1.3/test/CJUnitTestsPort/resources.cpp
caiqingfeng/libmrock
bb7c94482a105e92b6d3e8640b13f9ff3ae49a83
[ "Apache-2.0" ]
1
2015-12-01T04:16:54.000Z
2015-12-01T04:16:54.000Z
vendor/mysql-connector-c++-1.1.3/test/CJUnitTestsPort/resources.cpp
caiqingfeng/libmrock
bb7c94482a105e92b6d3e8640b13f9ff3ae49a83
[ "Apache-2.0" ]
null
null
null
vendor/mysql-connector-c++-1.1.3/test/CJUnitTestsPort/resources.cpp
caiqingfeng/libmrock
bb7c94482a105e92b6d3e8640b13f9ff3ae49a83
[ "Apache-2.0" ]
null
null
null
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. The MySQL Connector/C++ is licensed under the terms of the GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors. There are special exceptions to the terms and conditions of the GPLv2 as it is applied to this software, see the FLOSS License Exception <http://www.mysql.com/about/legal/licensing/foss-exception.html>. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the 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 GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <fstream> #include "resources.h" #include "../common/stringutils.h" namespace testsuite { namespace resources { void CharsetMapping::Init() { STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("big5"), 2U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("dec8"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp850"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("hp8"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("koi8r"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("latin1"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("latin2"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("swe7"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("ascii"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("ujis"), 3U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("sjis"), 2U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("hebrew"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("tis620"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("euckr"), 2U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("koi8u"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("gb2312"), 2U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("greek"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp1250"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("gbk"), 2U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("latin5"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("armscii8"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("utf8"), 3U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("ucs2"), 2U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp866"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("keybcs2"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("macce"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("macroman"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp852"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("latin7"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp1251"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp1256"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp1257"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("binary"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("geostd8"), 1U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("cp932"), 2U)); STATIC_CHARSET_TO_NUM_BYTES_MAP.insert( std::map<String, unsigned int>::value_type(_T("eucjpms"), 3U)); } const CharsetMapping & CharsetMapping::Instance() { static CharsetMapping instance; return instance; } bool OpenFile(std::ifstream & fileStream, const String & fileName , const char * _possibleLocations[]) { fileStream.open(fileName.c_str()); int i=0; while (!fileStream.is_open() && _possibleLocations != NULL && _possibleLocations[ i ] != NULL) { fileStream.clear(); fileStream.open((String(_possibleLocations[ i ]) + "/" + fileName).c_str()); ++i; } return fileStream.is_open(); } int LoadProperties(const String & fileName, Properties & props , const char * _possibleLocations[]) { int counter=0; std::ifstream propsFile; if (OpenFile(propsFile, fileName, _possibleLocations)) { String line; while (getline(propsFile, line)) { StringUtils::trim(line); // Not empty line or a comment if (!propsFile.eof() && line.size() > 0 && line.c_str()[0] != '#') { String::size_type pos=line.find_first_of("="); if (pos != String::npos && pos > 0) { String key=line.substr(0, pos); String val=line.substr(pos + 1); StringUtils::trim( key ); StringUtils::trim( val ); props.insert(Properties::value_type(key, val)); ++counter; } } } propsFile.close(); } else { std::cout << "Unable to open file" << std::endl; return -1; } return counter; } } }
43.195652
105
0.588198
caiqingfeng
6a8dacddd1fe19d3e80ac26b580f36411e855376
552
hpp
C++
src/ast/include/return_stmt.hpp
bfeip/Lain
3df115167dbb0eb8147b225a24bb72b6c0920c64
[ "MIT" ]
5
2017-03-28T00:36:54.000Z
2019-08-06T00:05:44.000Z
src/ast/include/return_stmt.hpp
bfeip/Lain
3df115167dbb0eb8147b225a24bb72b6c0920c64
[ "MIT" ]
4
2017-03-28T01:36:05.000Z
2017-04-17T20:34:46.000Z
src/ast/include/return_stmt.hpp
bfeip/Lain
3df115167dbb0eb8147b225a24bb72b6c0920c64
[ "MIT" ]
null
null
null
#ifndef RETURN_STMT_HPP #define RETURN_STMT_HPP #include "stmt.hpp" #include "scope_creator.hpp" #include "expr.hpp" class ReturnStmt : virtual public Stmt, virtual public ScopeCreator /* ikr */ { private: std::unique_ptr<Expr> value; public: ReturnStmt() = delete; ReturnStmt(ScopeCreator* p) : Stmt(p), ScopeCreator(p) {} virtual ~ReturnStmt() = default; Expr* getValue() { return value.get(); } const Expr* getValue() const { return value.get(); } void setValue(std::unique_ptr<Expr>&& expr) { value = std::move(expr); } }; #endif
25.090909
79
0.697464
bfeip
6a9055e15080c7d5895db83d99b14ffa926187f6
19,034
cpp
C++
c++/src/objects/seqalign/Spliced_seg.cpp
OpenHero/gblastn
a0d6c1c288fe916ab85fc637a44cdd6e79ebd2a8
[ "MIT" ]
31
2016-12-09T04:56:59.000Z
2021-12-31T17:19:10.000Z
c++/src/objects/seqalign/Spliced_seg.cpp
OpenHero/gblastn
a0d6c1c288fe916ab85fc637a44cdd6e79ebd2a8
[ "MIT" ]
6
2017-03-10T17:25:13.000Z
2021-09-22T15:49:49.000Z
c++/src/objects/seqalign/Spliced_seg.cpp
OpenHero/gblastn
a0d6c1c288fe916ab85fc637a44cdd6e79ebd2a8
[ "MIT" ]
20
2015-01-04T02:15:17.000Z
2021-12-03T02:31:43.000Z
/* $Id: Spliced_seg.cpp 352823 2012-02-09 16:24:35Z grichenk $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Author: Kamen Todorov * * File Description: * User-defined methods for Spliced-seg. * * Remark: * This code was originally generated by application DATATOOL * using the following specifications: * 'seqalign.asn'. */ // standard includes #include <ncbi_pch.hpp> // generated includes #include <objects/seqalign/Spliced_seg.hpp> // generated classes BEGIN_NCBI_SCOPE BEGIN_objects_SCOPE // namespace ncbi::objects:: // destructor CSpliced_seg::~CSpliced_seg(void) { } ENa_strand CSpliced_seg::GetSeqStrand(TDim row) const { switch (row) { case 0: if (CanGetProduct_strand()) { return GetProduct_strand(); } else { if ((*GetExons().begin())->CanGetProduct_strand()) { return (*GetExons().begin())->GetProduct_strand(); } else { return eNa_strand_unknown; } } break; case 1: if (CanGetGenomic_strand()) { return GetGenomic_strand(); } else { if ((*GetExons().begin())->CanGetGenomic_strand()) { return (*GetExons().begin())->GetGenomic_strand(); } else { return eNa_strand_unknown; } } break; default: NCBI_THROW(CSeqalignException, eInvalidRowNumber, "CSpliced_seg::GetSeqStrand(): Invalid row number"); } } void CSpliced_seg::Validate(bool full_test) const { bool prot = GetProduct_type() == eProduct_type_protein; TSeqRange product_position_limits = TSeqRange::GetWhole(); if (IsSetProduct_length()) { TSeqPos product_length = GetProduct_length(); product_position_limits.SetTo((prot ? product_length * 3 : product_length) -1); } if (IsSetPoly_a()) { if (prot) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "CSpliced_seg::Validate(): poly-a on a protein"); } int poly_a = GetPoly_a(); if (poly_a > 0 && TSeqPos(poly_a) > product_position_limits.GetTo()+1) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "CSpliced_seg::Validate(): poly-a > product-length"); } if (CanGetProduct_strand() && GetProduct_strand() == eNa_strand_minus) { product_position_limits.SetFrom(poly_a+1); } else { product_position_limits.SetTo(poly_a-1); } } if (GetExons().empty()) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "CSpliced_seg::Validate(): Spiced-seg is empty (has no exons)"); } ITERATE (CSpliced_seg::TExons, exon_it, GetExons()) { const CSpliced_exon& exon = **exon_it; /// Positions TSeqPos product_start = prot ? exon.GetProduct_start().GetProtpos().GetAmin() * 3 + exon.GetProduct_start().GetProtpos().GetFrame() - 1 : exon.GetProduct_start().GetNucpos(); TSeqPos product_end = prot ? exon.GetProduct_end().GetProtpos().GetAmin() * 3 + exon.GetProduct_end().GetProtpos().GetFrame() - 1 : exon.GetProduct_end().GetNucpos(); if (product_start > product_end) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "CSpliced_seg::Validate(): product_start > product_end"); } if (product_start < product_position_limits.GetFrom() || product_position_limits.GetTo() < product_end) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "CSpliced_seg::Validate(): illegal product position in regard to poly-a and/or product-length "); } if (exon.GetGenomic_end() < exon.GetGenomic_start()) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "CSpliced_seg::Validate(): genomic_start > genomic_end"); } /// Ids if ( !(IsSetProduct_id() || exon.IsSetProduct_id()) ) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "product-id not set."); } if (IsSetProduct_id() == exon.IsSetProduct_id()) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "product-id should be set on the level of Spliced-seg XOR Spliced-exon."); } if ( !(IsSetGenomic_id() || exon.IsSetGenomic_id()) ) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "genomic-id not set."); } if (IsSetGenomic_id() == exon.IsSetGenomic_id()) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "genomic-id should be set on the level of Spliced-seg XOR Spliced-exon."); } /// Strands if (IsSetProduct_strand() && exon.IsSetProduct_strand()) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "product-strand can be set on level of Spliced-seg XOR Spliced-exon."); } bool product_plus = true; if (exon.CanGetProduct_strand()) { product_plus = exon.GetProduct_strand() != eNa_strand_minus; } else if (CanGetProduct_strand()) { product_plus = GetProduct_strand() != eNa_strand_minus; } if (prot && !product_plus) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "Protein product cannot have a negative strand."); } if (CanGetGenomic_strand() && exon.CanGetGenomic_strand()) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "genomic-strand can be set on level of Spliced-seg XOR Spliced-exon."); } bool genomic_plus = true; if (exon.CanGetGenomic_strand()) { genomic_plus = exon.GetGenomic_strand() != eNa_strand_minus; } else if (CanGetGenomic_strand()) { genomic_plus = GetGenomic_strand() != eNa_strand_minus; } /// Ranges if (exon.IsSetParts()) { TSeqPos exon_product_len = 0; TSeqPos exon_genomic_len = 0; ITERATE (CSpliced_exon::TParts, chunk_it, exon.GetParts()) { const CSpliced_exon_chunk& chunk = **chunk_it; TSeqPos chunk_product_len = 0; TSeqPos chunk_genomic_len = 0; switch (chunk.Which()) { case CSpliced_exon_chunk::e_Match: chunk_product_len = chunk_genomic_len = chunk.GetMatch(); break; case CSpliced_exon_chunk::e_Diag: chunk_product_len = chunk_genomic_len = chunk.GetDiag(); break; case CSpliced_exon_chunk::e_Mismatch: chunk_product_len = chunk_genomic_len = chunk.GetMismatch(); break; case CSpliced_exon_chunk::e_Product_ins: chunk_product_len = chunk.GetProduct_ins(); break; case CSpliced_exon_chunk::e_Genomic_ins: chunk_genomic_len = chunk.GetGenomic_ins(); break; default: break; } exon_product_len += chunk_product_len; exon_genomic_len += chunk_genomic_len; } if (exon_product_len != product_end - product_start + 1) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "Product exon range length is not consistent with exon chunks."); } if (exon_genomic_len != exon.GetGenomic_end() - exon.GetGenomic_start() + 1) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "Genomic exon range length is not consistent with exon chunks."); } } else { TSeqPos exon_product_len = product_end - product_start + 1; TSeqPos exon_genomic_len = exon.GetGenomic_end() - exon.GetGenomic_start() + 1; if (exon_product_len != exon_genomic_len) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "Product and genomic exon range lengths are not consistent."); } } } } CRange<TSeqPos> CSpliced_seg::GetSeqRange(TDim row) const { if (GetExons().empty()) { NCBI_THROW(CSeqalignException, eInvalidAlignment, "CSpliced_seg::GetSeqRange(): Spiced-seg is empty (has no exons)"); } CRange<TSeqPos> result; switch (row) { case 0: switch (GetProduct_type()) { case eProduct_type_transcript: ITERATE(TExons, exon_it, GetExons()) { result.CombineWith (CRange<TSeqPos> ((*exon_it)->GetProduct_start().GetNucpos(), (*exon_it)->GetProduct_end().GetNucpos())); } break; case eProduct_type_protein: ITERATE(TExons, exon_it, GetExons()) { result.CombineWith (CRange<TSeqPos> ((*exon_it)->GetProduct_start().GetProtpos().GetAmin(), (*exon_it)->GetProduct_end().GetProtpos().GetAmin())); } break; default: NCBI_THROW(CSeqalignException, eInvalidAlignment, "Invalid product type"); } break; case 1: ITERATE(TExons, exon_it, GetExons()) { result.CombineWith (CRange<TSeqPos> ((*exon_it)->GetGenomic_start(), (*exon_it)->GetGenomic_end())); } break; default: NCBI_THROW(CSeqalignException, eInvalidRowNumber, "CSpliced_seg::GetSeqRange(): Invalid row number"); } return result; } TSeqPos CSpliced_seg::GetSeqStart(TDim row) const { return GetSeqRange(row).GetFrom(); } TSeqPos CSpliced_seg::GetSeqStop (TDim row) const { return GetSeqRange(row).GetTo(); } ////////////////////////////////////////////////////////////////////////////// static vector<TSignedSeqPos> s_CalculateStarts(const vector<TSeqPos>& lens, ENa_strand strand, TSeqPos start, TSeqPos end) { vector<TSignedSeqPos> rv; rv.reserve(lens.size()); TSignedSeqPos offset = 0; ITERATE (vector<TSeqPos>, len, lens) { if (*len == 0) { // a gap rv.push_back(-1); } else { if (IsReverse(strand)) { offset += *len; rv.push_back((end + 1) - offset); } else { rv.push_back(start + offset); offset += *len; } } } return rv; } static CRef<CDense_seg> s_ExonToDenseg(const CSpliced_exon& exon, ENa_strand product_strand, ENa_strand genomic_strand, const CSeq_id& product_id, const CSeq_id& genomic_id) { CRef<CDense_seg> ds(new CDense_seg); vector<TSeqPos> product_lens; vector<TSeqPos> genomic_lens; if (exon.IsSetParts() && !exon.GetParts().empty()) { ITERATE (CSpliced_exon::TParts, iter, exon.GetParts()) { const CSpliced_exon_chunk& part = **iter; if (part.IsMatch()) { product_lens.push_back(part.GetMatch()); genomic_lens.push_back(part.GetMatch()); } else if (part.IsMismatch()) { product_lens.push_back(part.GetMismatch()); genomic_lens.push_back(part.GetMismatch()); } else if (part.IsDiag()) { product_lens.push_back(part.GetDiag()); genomic_lens.push_back(part.GetDiag()); } else if (part.IsProduct_ins()) { product_lens.push_back(part.GetProduct_ins()); genomic_lens.push_back(0); } else if (part.IsGenomic_ins()) { product_lens.push_back(0); genomic_lens.push_back(part.GetGenomic_ins()); } else { throw runtime_error("unhandled part type in Spliced-enon"); } } } else { TSeqPos len = exon.GetGenomic_end() - exon.GetGenomic_start() + 1; genomic_lens.push_back(len); product_lens.push_back(len); } CDense_seg::TLens& lens = ds->SetLens(); lens.reserve(product_lens.size()); for (unsigned int i = 0; i < product_lens.size(); ++i) { lens.push_back(max(product_lens[i], genomic_lens[i])); } vector<TSignedSeqPos> product_starts; if (exon.GetProduct_start().IsNucpos()) { product_starts = s_CalculateStarts(product_lens, product_strand, exon.GetProduct_start().GetNucpos(), exon.GetProduct_end().GetNucpos()); } else if (exon.GetProduct_start().IsProtpos()) { TSeqPos frame_start = exon.GetProduct_start().GetProtpos().GetFrame(); if (frame_start) { --frame_start; } TSeqPos frame_end = exon.GetProduct_end().GetProtpos().GetFrame(); if (frame_end) { --frame_end; } product_starts = s_CalculateStarts (product_lens, product_strand, 3 * exon.GetProduct_start().GetProtpos().GetAmin() + frame_start, 3 * exon.GetProduct_end().GetProtpos().GetAmin() + frame_end); } else { NCBI_THROW(CException, eUnknown, "unhandled product-start type in Spliced-exon"); } vector<TSignedSeqPos> genomic_starts = s_CalculateStarts(genomic_lens, genomic_strand, exon.GetGenomic_start(), exon.GetGenomic_end()); CDense_seg::TStarts& starts = ds->SetStarts(); starts.reserve(product_starts.size() + genomic_starts.size()); for (unsigned int i = 0; i < lens.size(); ++i) { starts.push_back(product_starts[i]); // product row first starts.push_back(genomic_starts[i]); } ds->SetIds().push_back(CRef<CSeq_id>(SerialClone(product_id))); ds->SetIds().push_back(CRef<CSeq_id>(SerialClone(genomic_id))); // Set strands, unless they're both plus if (!(product_strand == eNa_strand_plus && genomic_strand == eNa_strand_plus)) { CDense_seg::TStrands& strands = ds->SetStrands(); for (unsigned int i = 0; i < lens.size(); ++i) { strands.push_back(product_strand); strands.push_back(genomic_strand); } } ds->SetNumseg(lens.size()); ds->Compact(); // join adjacent match/mismatch/diag parts /// copy scores if (exon.IsSetScores()) { ITERATE (CSpliced_exon::TScores::Tdata, iter, exon.GetScores().Get()) { CRef<CScore> s(new CScore); s->Assign(**iter); ds->SetScores().push_back(s); } } return ds; } CRef<CSeq_align> CSpliced_seg::AsDiscSeg() const { CRef<CSeq_align> disc(new CSeq_align); disc->SetType(CSeq_align::eType_disc); switch (GetProduct_type()) { case eProduct_type_transcript: {{ ENa_strand product_strand = eNa_strand_plus; if (IsSetProduct_strand()) { product_strand = GetProduct_strand(); } ENa_strand genomic_strand = eNa_strand_plus; if (IsSetGenomic_strand()) { genomic_strand = GetGenomic_strand(); } const CSeq_id& product_id = GetProduct_id(); const CSeq_id& genomic_id = GetGenomic_id(); //for exon in spliced_seg.GetSegs().GetSpliced().GetExons()[:] { ITERATE (CSpliced_seg::TExons, exon, GetExons()) { CRef<CDense_seg> ds = s_ExonToDenseg(**exon, product_strand, genomic_strand, product_id, genomic_id); CRef<CSeq_align> ds_align(new CSeq_align); ds_align->SetSegs().SetDenseg(*ds); ds_align->SetType(CSeq_align::eType_partial); disc->SetSegs().SetDisc().Set().push_back(ds_align); } }} break; case eProduct_type_protein: {{ ENa_strand product_strand = eNa_strand_plus; ENa_strand genomic_strand = eNa_strand_plus; if (IsSetGenomic_strand()) { genomic_strand = GetGenomic_strand(); } const CSeq_id& product_id = GetProduct_id(); const CSeq_id& genomic_id = GetGenomic_id(); //for exon in spliced_seg.GetSegs().GetSpliced().GetExons()[:] { ITERATE (CSpliced_seg::TExons, exon, GetExons()) { CRef<CDense_seg> ds = s_ExonToDenseg(**exon, product_strand, genomic_strand, product_id, genomic_id); ds->SetWidths().push_back(3); ds->SetWidths().push_back(1); CRef<CSeq_align> ds_align(new CSeq_align); ds_align->SetSegs().SetDenseg(*ds); ds_align->SetType(CSeq_align::eType_partial); disc->SetSegs().SetDisc().Set().push_back(ds_align); } }} break; default: NCBI_THROW(CException, eUnknown, "unhandled product type in spliced seg"); break; } return disc; } END_objects_SCOPE // namespace ncbi::objects:: END_NCBI_SCOPE /* Original file checksum: lines: 57, chars: 1732, CRC32: fa335290 */
36.887597
118
0.566197
OpenHero
6a9256fdbc7ee1c1a1c92957c3fcdd1fa1d816de
3,527
cpp
C++
Kawakawa/TestD3D/Common/CubeRenderTarget.cpp
JiaqiJin/KawaiiDesune
e5c3031898f96f1ec5370b41371b2c1cf22c3586
[ "MIT" ]
null
null
null
Kawakawa/TestD3D/Common/CubeRenderTarget.cpp
JiaqiJin/KawaiiDesune
e5c3031898f96f1ec5370b41371b2c1cf22c3586
[ "MIT" ]
null
null
null
Kawakawa/TestD3D/Common/CubeRenderTarget.cpp
JiaqiJin/KawaiiDesune
e5c3031898f96f1ec5370b41371b2c1cf22c3586
[ "MIT" ]
null
null
null
#include "CubeRenderTarget.h" CubeRenderTarget::CubeRenderTarget(ID3D12Device* device, UINT width, UINT height, DXGI_FORMAT format) { md3dDevice = device; mWidth = width; mHeight = height; mFormat = format; mViewport = { 0.0f, 0.0f, (float)width, (float)height, 0.0f, 1.0f }; mScissorRect = { 0, 0, (int)width, (int)height }; BuildResource(); } ID3D12Resource* CubeRenderTarget::Resource() { return mCubeMap.Get(); } CD3DX12_GPU_DESCRIPTOR_HANDLE CubeRenderTarget::Srv() { return mhGpuSrv; } CD3DX12_CPU_DESCRIPTOR_HANDLE CubeRenderTarget::Rtv(int faceIndex) { return mhCpuRtv[faceIndex]; } D3D12_VIEWPORT CubeRenderTarget::Viewport()const { return mViewport; } D3D12_RECT CubeRenderTarget::ScissorRect()const { return mScissorRect; } void CubeRenderTarget::BuildDescriptors(CD3DX12_CPU_DESCRIPTOR_HANDLE hCpuSrv, CD3DX12_GPU_DESCRIPTOR_HANDLE hGpuSrv, CD3DX12_CPU_DESCRIPTOR_HANDLE hCpuRtv[6]) { // Save references to the descriptors. mhCpuSrv = hCpuSrv; mhGpuSrv = hGpuSrv; for (int i = 0; i < 6; ++i) mhCpuRtv[i] = hCpuRtv[i]; // Create the descriptors BuildDescriptors(); } void CubeRenderTarget::OnResize(UINT newWidth, UINT newHeight) { if ((mWidth != newWidth) || (mHeight != newHeight)) { mWidth = newWidth; mHeight = newHeight; BuildResource(); // New resource, so we need new descriptors to that resource. BuildDescriptors(); } } void CubeRenderTarget::BuildDescriptors() { D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc = {}; srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; srvDesc.Format = mFormat; srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURECUBE; srvDesc.TextureCube.MostDetailedMip = 0; srvDesc.TextureCube.MipLevels = 1; srvDesc.TextureCube.ResourceMinLODClamp = 0.0f; // Create SRV to the entire cubemap resource. md3dDevice->CreateShaderResourceView(mCubeMap.Get(), &srvDesc, mhCpuSrv); // Create RTV to each cube face. for (int i = 0; i < 6; ++i) { D3D12_RENDER_TARGET_VIEW_DESC rtvDesc; rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DARRAY; rtvDesc.Format = mFormat; rtvDesc.Texture2DArray.MipSlice = 0; rtvDesc.Texture2DArray.PlaneSlice = 0; // Render target to ith element. rtvDesc.Texture2DArray.FirstArraySlice = i; // Only view one element of the array. rtvDesc.Texture2DArray.ArraySize = 1; // Create RTV to ith cubemap face. md3dDevice->CreateRenderTargetView(mCubeMap.Get(), &rtvDesc, mhCpuRtv[i]); } } void CubeRenderTarget::BuildResource() { // Note, compressed formats cannot be used for UAV. We get error like: // ERROR: ID3D11Device::CreateTexture2D: The format (0x4d, BC3_UNORM) // cannot be bound as an UnorderedAccessView, or cast to a format that // could be bound as an UnorderedAccessView. Therefore this format // does not support D3D11_BIND_UNORDERED_ACCESS. D3D12_RESOURCE_DESC texDesc; ZeroMemory(&texDesc, sizeof(D3D12_RESOURCE_DESC)); texDesc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; texDesc.Alignment = 0; texDesc.Width = mWidth; texDesc.Height = mHeight; texDesc.DepthOrArraySize = 6; texDesc.MipLevels = 1; texDesc.Format = mFormat; texDesc.SampleDesc.Count = 1; texDesc.SampleDesc.Quality = 0; texDesc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN; texDesc.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; ThrowIfFailed(md3dDevice->CreateCommittedResource( &CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT), D3D12_HEAP_FLAG_NONE, &texDesc, D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&mCubeMap))); }
26.125926
78
0.763255
JiaqiJin
6a9391380b43e887c8fdfffb0be5992734e10d00
945
hpp
C++
libs/parse/include/fcppt/parse/get_char.hpp
pmiddend/fcppt
9f437acbb10258e6df6982a550213a05815eb2be
[ "BSL-1.0" ]
null
null
null
libs/parse/include/fcppt/parse/get_char.hpp
pmiddend/fcppt
9f437acbb10258e6df6982a550213a05815eb2be
[ "BSL-1.0" ]
null
null
null
libs/parse/include/fcppt/parse/get_char.hpp
pmiddend/fcppt
9f437acbb10258e6df6982a550213a05815eb2be
[ "BSL-1.0" ]
null
null
null
// Copyright Carl Philipp Reh 2009 - 2018. // 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) #ifndef FCPPT_PARSE_GET_CHAR_HPP_INCLUDED #define FCPPT_PARSE_GET_CHAR_HPP_INCLUDED #include <fcppt/reference_impl.hpp> #include <fcppt/io/get.hpp> #include <fcppt/optional/object_impl.hpp> #include <fcppt/parse/state_impl.hpp> #include <fcppt/parse/detail/check_bad.hpp> #include <fcppt/config/external_begin.hpp> #include <iosfwd> #include <fcppt/config/external_end.hpp> namespace fcppt { namespace parse { template< typename Ch > fcppt::optional::object< Ch > get_char( fcppt::reference< fcppt::parse::state< Ch > > const _state ) { std::basic_istream< Ch > &stream{ _state.get().stream() }; fcppt::parse::detail::check_bad( stream ); return fcppt::io::get( stream ); } } } #endif
16.016949
61
0.708995
pmiddend
6a9f8a65cee0b6b8e9fac87a48fd1a31d83e77d3
3,257
cpp
C++
Wand/Source/VN/VNEntity.cpp
mariaviolaki/wand
a955e9f67c73c584d73874904ba98bebd6f15971
[ "MIT" ]
null
null
null
Wand/Source/VN/VNEntity.cpp
mariaviolaki/wand
a955e9f67c73c584d73874904ba98bebd6f15971
[ "MIT" ]
null
null
null
Wand/Source/VN/VNEntity.cpp
mariaviolaki/wand
a955e9f67c73c584d73874904ba98bebd6f15971
[ "MIT" ]
null
null
null
#include "WandPCH.h" #include "VNEntity.h" namespace wand { VNEntity::VNEntity(std::string name) : mSprites(), mCurrentSprite(nullptr), mName(name) {} void VNEntity::AddSprite(Sprite* sprite) { mSprites.emplace_back(sprite); mCurrentSprite = sprite; } void VNEntity::SetSprite(std::string spriteLabel) { for (auto& sprite : mSprites) { // If the sprite has the same label as the target, set it as visible if (sprite->GetLabel() == spriteLabel) { sprite->Show(); mCurrentSprite = sprite; } else // hide all the other sprites { sprite->Hide(); } } } void VNEntity::SetName(std::string name) { mName = name; } std::string VNEntity::GetName() const { return mName; } Transform* VNEntity::GetTransform() { return mCurrentSprite->GetTransform(); } Vector2 VNEntity::GetPos() const { return mCurrentSprite->GetTransform()->GetPos(); } Vector2 VNEntity::GetScale() const { return mCurrentSprite->GetTransform()->GetScale(); } float VNEntity::GetLayer() const { return mCurrentSprite->GetTransform()->GetLayer(); } float VNEntity::GetWidth() const { return mCurrentSprite->GetTransform()->GetWidth(); } float VNEntity::GetHeight() const { return mCurrentSprite->GetTransform()->GetHeight(); } void VNEntity::SetPos(float x, float y) { for (auto& sprite : mSprites) sprite->GetTransform()->SetPos(x, y); } void VNEntity::SetScale(float x, float y) { for (auto& sprite : mSprites) sprite->GetTransform()->SetScale(x, y); } void VNEntity::SetLayer(float layer) { for (auto& sprite : mSprites) sprite->GetTransform()->SetLayer(layer); } void VNEntity::SetWidth(float width) { for (auto& sprite : mSprites) sprite->GetTransform()->SetWidth(width); } void VNEntity::SetHeight(float height) { for (auto& sprite : mSprites) sprite->GetTransform()->SetHeight(height); } bool VNEntity::IsVisible() const { return mCurrentSprite->IsVisible(); } void VNEntity::Show() { mCurrentSprite->Show(); } void VNEntity::Hide() { mCurrentSprite->Hide(); } bool VNEntity::IsEnabled() const { return mCurrentSprite->IsEnabled(); } void VNEntity::Enable() { for (auto& sprite : mSprites) sprite->Enable(); } void VNEntity::Disable() { for (auto& sprite : mSprites) sprite->Disable(); } std::string VNEntity::GetLabel() const { return mCurrentSprite->GetLabel(); } void VNEntity::SetLabel(const std::string& label) { mCurrentSprite->SetLabel(label); } void VNEntity::OnLeftClick(const std::function<void()>& fun) { for (auto& sprite : mSprites) sprite->OnLeftClick(fun); } void VNEntity::OnRightClick(const std::function<void()>& fun) { for (auto& sprite : mSprites) sprite->OnRightClick(fun); } void VNEntity::OnHover(const std::function<void()>& fun) { for (auto& sprite : mSprites) sprite->OnHover(fun); } void VNEntity::SetParentLayout(Transform* layout) { for (auto& sprite : mSprites) sprite->SetParentLayout(layout); } void VNEntity::SetLayoutPosition(float x, float y) { for (auto& sprite : mSprites) sprite->SetLayoutPosition(x, y); } void VNEntity::SetLayoutPosition(LayoutPosition horizontal, LayoutPosition vertical) { for (auto& sprite : mSprites) sprite->SetLayoutPosition(horizontal, vertical); } }
28.077586
90
0.691741
mariaviolaki
6aa10d243ed72c0cc37cae790fd485b4304d5947
11,092
cpp
C++
platform_game/attack_area.cpp
dbsGen/my_godot_modules
1c933b081ea0a45ddafbb61b2ab5fc627c0949e8
[ "MIT" ]
6
2016-04-09T00:03:41.000Z
2022-01-27T23:45:36.000Z
platform_game/attack_area.cpp
dbsGen/my_godot_modules
1c933b081ea0a45ddafbb61b2ab5fc627c0949e8
[ "MIT" ]
null
null
null
platform_game/attack_area.cpp
dbsGen/my_godot_modules
1c933b081ea0a45ddafbb61b2ab5fc627c0949e8
[ "MIT" ]
2
2017-04-05T05:01:25.000Z
2019-01-15T12:04:06.000Z
// // Created by Gen on 15-5-21. // #include "attack_area.h" #include "character.h" bool AttackArea::attack(Character *from) { if (hit_status == NULL || !from->get_can_attack()) { return false; } Ref<HitStatus> from_hit = from->get_hit_status(); if (from_hit != NULL && from_hit->get_hit_type() != HitStatus::HS_NO_HIT) { return false; } Array bodies = get_overlapping_bodies(); if (attack_enable && (bodies.size() > 0 || hit_areas.size() > 0)) { bool ret = false; Vector2 force = hit_status->get_force(); Vector2 p_force = Vector2(force.x * (((from->get_face_left() && force_invert)||(!from->get_face_left() && !force_invert)) ? 1:-1), force.y); for (int i = 0, t = bodies.size(); i < t; ++i) { Character *cha = Object::cast_to<Character>((Object*)(bodies[i])); if (cha) { if (to_target(cha, from, force, p_force)) { ret = true; } }else { } } for (int j = 0, t2 = hit_areas.size(); j < t2; ++j) { HitArea *area = hit_areas[j]; if (area) { if (to_target(area, from, force, p_force)) { ret = true; } } } return ret; } return false; } bool AttackArea::to_target(HitArea *area, Character *from, Vector2 force, Vector2 p_force) { Character *cha = area->get_character(); if (!cha) return false; bool ret = false; int count = 0; float old_time = 0; if (count_store.has((int)((long)area))) { HitStatusInfo info = count_store[(int)((long)area)]; count = info.count; old_time = info.hit_time; } if (((hit_count < 0 || count < hit_count) && old_time < time_record - attack_span)) { Ref<HitStatus> hs = hit_status->new_hit_status(); if (face_relative) { bool right = cha->get_global_position().x > from->get_global_position().x; hs->set_force(Vector2( ((right && force_invert) || (!right && !force_invert) ? -1:1) * force.x, force.y)); hs->set_velocity(hs->get_force()); hs->set_stun_velocity(Vector2(hs->get_force().x, 0)); }else{ hs->set_force(p_force); hs->set_velocity(p_force); hs->set_stun_velocity(Vector2(p_force.x, 0)); } if (area->attack_by(hs, from)) { if (spark_scene != NULL) { Node2D* spark = Object::cast_to<Node2D>(spark_scene->instance()); if (spark) { cha->get_parent()->add_child(spark); spark->set_global_position(cha->get_global_position() + Vector2(spark_range.x * (Math::randf()*2-1), spark_range.y * (Math::randf()*2-1))); spark->set_scale(Vector2(from->get_face_left()?-1:1, 1)); } } _attack_to(hs, cha); if (get_script_instance()) { Variant v1 = hs; Variant v2 = Object::cast_to<Object>(cha); const Variant* ptr[2]={&v1, &v2}; get_script_instance()->call_multilevel("_attack_to", ptr, 2); } ret = true; } if (ret) { from->freeze(hs->get_self_freeze()); HitStatusInfo info; info.count = count + 1; info.hit_time = time_record; count_store[(int)((long)area)] = info; } } return ret; } bool AttackArea::to_target(Character *cha, Character *from, Vector2 force, Vector2 p_force) { bool ret = false; int count = 0; float old_time = - attack_span; if (count_store.has((int)((long)cha))) { HitStatusInfo info = count_store[(int)((long)cha)]; count = info.count; old_time = info.hit_time; } if ((hit_count < 0 || count < hit_count) && old_time < time_record - attack_span) { Ref<HitStatus> hs = hit_status->new_hit_status(); if (face_relative) { bool right = cha->get_global_position().x > from->get_global_position().x; hs->set_force(Vector2( ((right && force_invert) || (!right && !force_invert) ? -1:1) * force.x, force.y)); hs->set_velocity(hs->get_force()); hs->set_stun_velocity(Vector2(hs->get_force().x, 0)); }else{ hs->set_force(p_force); hs->set_velocity(p_force); hs->set_stun_velocity(Vector2(p_force.x, 0)); } if (cha->attack_by(hs, from)) { if (spark_scene != NULL) { Node2D* spark = Object::cast_to<Node2D>(spark_scene->instance()); if (spark) { cha->get_parent()->add_child(spark); spark->set_global_position(cha->get_global_position() + Vector2(spark_range.x * (Math::randf()*2-1), spark_range.y * (Math::randf()*2-1))); spark->set_scale(Vector2(from->get_face_left()?-1:1, 1)); } } _attack_to(hs, cha); if (get_script_instance()) { Variant v1 = hs; Variant v2 = Object::cast_to<Object>(cha); const Variant* ptr[2]={&v1, &v2}; get_script_instance()->call_multilevel("_attack_to", ptr, 2); } ret = true; } if (ret) { from->freeze(hs->get_self_freeze()); HitStatusInfo info; info.count = count + 1; info.hit_time = time_record; count_store[(int)((long)cha)] = info; } } return ret; } void AttackArea::reset() { count_store.clear(); time_record = 0; } void AttackArea::_notification(int p_notification) { switch (p_notification) { case NOTIFICATION_ENTER_TREE: { hit_areas.clear(); if (!is_connected("area_enter", this, "_on_area_enter")) connect("area_enter", this, "_on_area_enter"); if (!is_connected("area_exit", this, "_on_area_exit")) connect("area_exit", this, "_on_area_exit"); } break; case NOTIFICATION_FIXED_PROCESS: { if (attack_enable) { time_record += get_fixed_process_delta_time(); if (always_attack) { if (attack_owner == NULL) { Node *p = get_parent(); while (p) { if (Character *c = Object::cast_to<Character>(p)) { attack_owner = c; break; } p = p->get_parent(); } ERR_FAIL_COND(!attack_owner); } attack(attack_owner); } } if (will_remove_areas.size() > 0) { for (int i = 0, t = will_remove_areas.size(); i < t; ++i) { HitArea *area = will_remove_areas[i]; int idx = hit_areas.find(area); if (idx >= 0) { hit_areas.remove(idx); } } will_remove_areas.clear(); } } break; } } void AttackArea::_bind_methods() { ClassDB::bind_method(D_METHOD("set_always_attack", "always_attack"), &AttackArea::set_always_attack); ClassDB::bind_method(D_METHOD("get_always_attack"), &AttackArea::get_always_attack); ClassDB::bind_method(D_METHOD("set_attack_enable", "attack_enable"), &AttackArea::set_attack_enable); ClassDB::bind_method(D_METHOD("get_attack_enable"), &AttackArea::get_attack_enable); ClassDB::bind_method(D_METHOD("set_hit_status", "hit_status"), &AttackArea::set_hit_status); ClassDB::bind_method(D_METHOD("get_hit_status"), &AttackArea::get_hit_status); ClassDB::bind_method(D_METHOD("set_spark_scene", "spark_scene"), &AttackArea::set_spark_scene); ClassDB::bind_method(D_METHOD("get_spark_scene"), &AttackArea::get_spark_scene); ClassDB::bind_method(D_METHOD("set_hit_count", "hit_count"), &AttackArea::set_hit_count); ClassDB::bind_method(D_METHOD("get_hit_count"), &AttackArea::get_hit_count); ClassDB::bind_method(D_METHOD("set_attack_span", "attack_span"), &AttackArea::set_attack_span); ClassDB::bind_method(D_METHOD("get_attack_span"), &AttackArea::get_attack_span); ClassDB::bind_method(D_METHOD("set_force_invert", "force_invert"), &AttackArea::set_force_invert); ClassDB::bind_method(D_METHOD("get_force_invert"), &AttackArea::get_force_invert); ClassDB::bind_method(D_METHOD("set_face_relative", "face_relative"), &AttackArea::set_face_relative); ClassDB::bind_method(D_METHOD("get_face_relative"), &AttackArea::get_face_relative); ClassDB::bind_method(D_METHOD("set_spark_range", "spark_range"), &AttackArea::set_spark_range); ClassDB::bind_method(D_METHOD("get_spark_range"), &AttackArea::get_spark_range); ClassDB::bind_method(D_METHOD("set_can_graze", "can_graze"), &AttackArea::set_can_graze); ClassDB::bind_method(D_METHOD("get_can_graze"), &AttackArea::get_can_graze); ClassDB::bind_method(D_METHOD("_on_area_enter", "area"), &AttackArea::_on_area_enter); ClassDB::bind_method(D_METHOD("_on_area_exit", "area"), &AttackArea::_on_area_exit); ClassDB::bind_method(D_METHOD("attack", "character:Character"), &AttackArea::bind_attack); BIND_VMETHOD(MethodInfo("_attack_to", PropertyInfo(Variant::OBJECT, "hit", PROPERTY_HINT_RESOURCE_TYPE, "HitStatus"), PropertyInfo(Variant::OBJECT, "to") )); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "always_attack" ), "set_always_attack","get_always_attack"); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "attack/force_invert" ), "set_force_invert","get_force_invert"); ADD_PROPERTY( PropertyInfo( Variant::INT, "attack/hit_count" ), "set_hit_count","get_hit_count"); ADD_PROPERTY( PropertyInfo( Variant::REAL, "attack/attack_span" ), "set_attack_span","get_attack_span"); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "attack/attack_enable" ), "set_attack_enable","get_attack_enable"); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "attack/face_relative" ), "set_face_relative","get_face_relative"); ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "attack/hit_status",PROPERTY_HINT_RESOURCE_TYPE,"HitStatus"), "set_hit_status","get_hit_status"); ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "attack/spark_scene",PROPERTY_HINT_RESOURCE_TYPE,"PackedScene"), "set_spark_scene","get_spark_scene"); ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "attack/spark_range"), "set_spark_range", "get_spark_range"); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "can_graze"), "set_can_graze", "get_can_graze"); }
44.725806
162
0.573567
dbsGen
6aa4351c4355814269396e345a13714f2ed3ff14
314
hxx
C++
_inbox/MySpell-3/MySpell-3.0/baseaffix.hxx
adamleerich/ENABLE
75cbfb9c09ded34c0d3ac306262a35acb424cfcf
[ "CC0-1.0" ]
1
2019-06-12T19:47:56.000Z
2019-06-12T19:47:56.000Z
_inbox/MySpell-3/MySpell-3.0/baseaffix.hxx
adamleerich/ENABLE
75cbfb9c09ded34c0d3ac306262a35acb424cfcf
[ "CC0-1.0" ]
null
null
null
_inbox/MySpell-3/MySpell-3.0/baseaffix.hxx
adamleerich/ENABLE
75cbfb9c09ded34c0d3ac306262a35acb424cfcf
[ "CC0-1.0" ]
1
2020-01-11T19:10:05.000Z
2020-01-11T19:10:05.000Z
#ifndef _BASEAFF_HXX_ #define _BASEAFF_HXX_ class AffEntry { protected: char * appnd; char * strip; short appndl; short stripl; short numconds; short xpflg; char achar; char conds[SETSIZE]; }; #endif
17.444444
35
0.487261
adamleerich
6aa572abcd0f85c6a4a0be468fa8a5c684475725
5,542
hpp
C++
dep/MiraiProject/include/MiraiProject/scene/Node.hpp
Mirai-Team/MiraiVN
3a36b0e9a30ab0507edba7a6d8d4d908a97bf575
[ "Zlib" ]
2
2015-02-17T16:29:34.000Z
2017-04-27T15:43:07.000Z
dep/MiraiProject/include/MiraiProject/scene/Node.hpp
Mirai-Team/MiraiVN
3a36b0e9a30ab0507edba7a6d8d4d908a97bf575
[ "Zlib" ]
2
2015-03-07T21:21:30.000Z
2015-03-07T21:28:33.000Z
dep/MiraiProject/include/MiraiProject/scene/Node.hpp
Mirai-Team/MiraiVN
3a36b0e9a30ab0507edba7a6d8d4d908a97bf575
[ "Zlib" ]
null
null
null
//////////////////////////////////////////////////////////// // // MiraiProject // Copyright (C) 2014-2015 CORTIER Benoît (benoit.cortier@gmail.com), BOULMIER Jérôme (jerome.boulmier@outlook.fr) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it freely, // subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; // you must not claim that you wrote the original software. // If you use this software in a product, an acknowledgment // in the product documentation would be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, // and must not be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // //////////////////////////////////////////////////////////// #ifndef NODE_HPP_INCLUDED #define NODE_HPP_INCLUDED #include <memory> #include <vector> #include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Drawable.hpp> /** \file Node.hpp * \brief This file contains Node class definition. */ namespace mp { /** \class Node * \brief A class to represent and manage a scene graph. * * A node can have front and back children. Children are drawn * with the parent. Front children are drawn after the parent, * and back children are drawn before. * * The virtual method drawCurrent() should be overloaded (just to * draw THIS node, not to draw children, operation which is * automatically performed). */ class Node : public sf::Transformable, public sf::Drawable { public: typedef std::shared_ptr<Node> childPtr; /** \brief Class constructor **/ Node(const std::string& name="NA"); /** \brief Class destructor **/ virtual ~Node(); /** \brief Make class non-copyable **/ Node(const Node&) = delete; /** \brief Make class non-copyable **/ Node& operator=(const Node&) = delete; /** \brief Return node's absolute position. * * \return the absolute position. */ sf::Vector2f getWorldPosition() const; /** \brief Return node's absolute transform. * * \return the absolute transform. */ sf::Transform getWorldTransform() const; /** \brief Return the distance between this node and another one. * * \param otherNode : this other one. * * \return the distance between them. */ float distance(const Node& otherNode) const; /** \brief Add a front child * * \param child : the child to add on the front. */ void addFrontChild(childPtr child); /** \brief Add a back child * * \param child : the child to add on the back. */ void addBackChild(childPtr child); /** \brief Remove children matching the given name. * * \param name : the name. */ void removeChildByName(const std::string& name); /** \brief Remove the child matching the given id. * * \param id : the id. */ void removeChildById(const unsigned int& id); /** \brief Remove all children. */ void clearChildren(); /** \brief Return a vector containing pointer to all children. * * \return the vector containing pointer to all children. */ std::vector<childPtr> getChildren(); /** \brief Change node's name. * * \param newName : the new name. */ void setName(const std::string& newName); /** \brief Return node's name. * * \return the name. */ std::string getName(); /** \brief Return node's id. * * \return the id. */ unsigned int getId(); protected: /** \brief Draw the node to a render target. * * This is a pure virtual function that has to be implemented by the derived * class to define how the node should be drawn. * * \param target : the render target. * \param states : the current states. */ virtual void drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const = 0; private: virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const final; void drawFrontChildren(sf::RenderTarget& target, sf::RenderStates states) const; void drawBackChildren(sf::RenderTarget& target, sf::RenderStates states) const; Node* parent_; std::vector<childPtr> frontChildren_; std::vector<childPtr> backChildren_; std::string name_; const unsigned int id_; static unsigned int sLastId; }; } #endif // NODE_HPP_INCLUDED
32.409357
114
0.559726
Mirai-Team
6aa88f4d190288c46fa288c63c3f66d3308298a4
4,742
cpp
C++
engine/source/kernel/basic/math/euler/basic_euler.cpp
skarab/coffee-master
6c3ff71b7f15735e41c9859b6db981b94414c783
[ "MIT" ]
null
null
null
engine/source/kernel/basic/math/euler/basic_euler.cpp
skarab/coffee-master
6c3ff71b7f15735e41c9859b6db981b94414c783
[ "MIT" ]
null
null
null
engine/source/kernel/basic/math/euler/basic_euler.cpp
skarab/coffee-master
6c3ff71b7f15735e41c9859b6db981b94414c783
[ "MIT" ]
null
null
null
#include "kernel/basic/math/euler/basic_euler.h" namespace coffee { //-META---------------------------------------------------------------------------------------// COFFEE_BeginType(basic::Euler); COFFEE_Attribute(basic::Angle, X, meta::MODE_Serializeable | meta::MODE_Editable); COFFEE_Attribute(basic::Angle, Y, meta::MODE_Serializeable | meta::MODE_Editable); COFFEE_Attribute(basic::Angle, Z, meta::MODE_Serializeable | meta::MODE_Editable); COFFEE_EndType(); namespace basic { //-CONSTRUCTORS-------------------------------------------------------------------------------// Euler::Euler() { } //--------------------------------------------------------------------------------------------// Euler::Euler(const Euler& other) : X(other.X), Y(other.Y), Z(other.Z) { } //--------------------------------------------------------------------------------------------// Euler::Euler(const Angle& x, const Angle& y, const Angle& z) : X(x), Y(y), Z(z) { } //--------------------------------------------------------------------------------------------// Euler::Euler(const Quaternion& quaternion) { *this = quaternion; } //-OPERATORS----------------------------------------------------------------------------------// Euler& Euler::operator = (const Euler& other) { X = other.X; Y = other.Y; Z = other.Z; return *this; } //--------------------------------------------------------------------------------------------// Euler& Euler::operator = (const Quaternion& quaternion) { // Coming from http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/ // Note it's the version working on non-normalized quaternions real sqw = quaternion.W*quaternion.W; real sqx = quaternion.X*quaternion.X; real sqy = quaternion.Y*quaternion.Y; real sqz = quaternion.Z*quaternion.Z; // if normalised is one, otherwise is correction factor real unit = sqx+sqy+sqz+sqw; real test = quaternion.X*quaternion.Y+quaternion.Z*quaternion.W; if (test>=0.499f*unit) { // singularity at north pole Y = 2.0f*ATan2(quaternion.X, quaternion.W); Z = Pi/2.0f; X = 0.0f; } else if (test<=-0.499f*unit) { // singularity at south pole Y = -2.0f*ATan2(quaternion.X, quaternion.W); Z = -Pi/2.0f; X = 0.0f; } else { Y = ATan2(2.0f*quaternion.Y*quaternion.W-2.0f*quaternion.X*quaternion.Z, sqx-sqy-sqz+sqw); Z = ASin(2.0f*test/unit); X = ATan2(2.0f*quaternion.X*quaternion.W-2.0f*quaternion.Y*quaternion.Z, -sqx+sqy-sqz+sqw); } return *this; } //--------------------------------------------------------------------------------------------// Euler& Euler::operator += (const Euler& other) { X += other.X; Y += other.Y; Z += other.Z; return *this; } //--------------------------------------------------------------------------------------------// Euler& Euler::operator -= (const Euler& other) { X -= other.X; Y -= other.Y; Z -= other.Z; return *this; } //--------------------------------------------------------------------------------------------// Euler Euler::operator + (const Euler& other) { return Euler(X+other.X, Y+other.Y, Z+other.Z); } //--------------------------------------------------------------------------------------------// Euler Euler::operator - (const Euler& other) { return Euler(X-other.X, Y-other.Y, Z-other.Z); } //--------------------------------------------------------------------------------------------// bool Euler::operator == (const Euler& other) const { return (X==other.X) && (Y==other.Y) && (Z==other.Z); } //--------------------------------------------------------------------------------------------// bool Euler::operator != (const Euler& other) const { return (X!=other.X) || (Y!=other.Y) || (Z!=other.Z); } //-OPERATIONS---------------------------------------------------------------------------------// void Euler::Set(real x, real y, real z) { X = x; Y = y; Z = z; } //--------------------------------------------------------------------------------------------// void Euler::SetDegrees(real x, real y, real z) { X.SetDegrees(x); Y.SetDegrees(y); Z.SetDegrees(z); } } }
29.092025
108
0.376002
skarab
6aaa4d83debe9b8240707d5f52b2a51172db13bc
6,456
hpp
C++
src/tests/MapVerify.hpp
urcs-sync/Montage
6dc330da21ec20735a58579b23183a1bd8eeee66
[ "MIT" ]
9
2020-10-04T22:03:31.000Z
2021-10-08T01:52:57.000Z
src/tests/MapVerify.hpp
urcs-sync/Montage
6dc330da21ec20735a58579b23183a1bd8eeee66
[ "MIT" ]
18
2020-10-20T02:39:12.000Z
2021-08-30T00:23:32.000Z
src/tests/MapVerify.hpp
urcs-sync/Montage
6dc330da21ec20735a58579b23183a1bd8eeee66
[ "MIT" ]
9
2020-10-04T22:06:11.000Z
2021-02-19T17:23:17.000Z
#ifndef MAPVERIFY_HPP #define MAPVERIFY_HPP /* * This is a test that verifies mapping operations. * In multi-threaded scenarios, each thread operates on a cyclical partition of the key space. * E.g. for n threads, thread 0 does operations on key #0, #n, #2n etc. * This wouldn't catch all data races, but is good enough. */ #include "ChurnTest.hpp" #include "TestConfig.hpp" #include "RMap.hpp" #include "optional.hpp" #include <iostream> #include <unordered_map> //KEY_SIZE and VAL_SIZE are only for string kv template <class K, class V> class MapVerify : public ChurnTest{ public: RMap<K,V>* m; padded<std::unordered_map<K, V> *> *ground_truth_maps; int threads = 0; size_t key_size = TESTS_KEY_SIZE; size_t val_size = TESTS_VAL_SIZE; std::string value_buffer; // for string kv only MapVerify(int p_gets, int p_puts, int p_inserts, int p_removes, int range, int prefill): ChurnTest(p_gets, p_puts, p_inserts, p_removes, range, prefill){} MapVerify(int p_gets, int p_puts, int p_inserts, int p_removes, int range): ChurnTest(p_gets, p_puts, p_inserts, p_removes, range){} inline K fromInt(uint64_t v); inline V getV(uint64_t v); virtual void init(GlobalTestConfig* gtc){ #ifdef NDEBUG cout << "Error: MapVerify isn't allowed in release environments.\n"; exit(1); #endif if(gtc->checkEnv("KeySize")){ key_size = atoi((gtc->getEnv("KeySize")).c_str()); assert(key_size<=TESTS_KEY_SIZE&&"KeySize dynamically passed in is greater than macro TESTS_KEY_SIZE!"); } if(gtc->checkEnv("ValueSize")){ val_size = atoi((gtc->getEnv("ValueSize")).c_str()); assert(val_size<=TESTS_VAL_SIZE&&"ValueSize dynamically passed in is greater than macro TESTS_VAL_SIZE!"); } threads = gtc->task_num; ground_truth_maps = new padded<std::unordered_map<K, V> *>[threads]; for(int i = 0; i < threads; i++){ ground_truth_maps[i].ui = new std::unordered_map<K, V>(); } value_buffer.reserve(val_size); value_buffer.clear(); std::mt19937_64 gen_v(7); for (size_t i = 0; i < val_size - 1; i++) { value_buffer += (char)((i % 2 == 0 ? 'A' : 'a') + (gen_v() % 26)); } value_buffer += '\0'; ChurnTest::init(gtc); } virtual void parInit(GlobalTestConfig* gtc, LocalTestConfig* ltc){ m->init_thread(gtc, ltc); ChurnTest::parInit(gtc, ltc); } void allocRideable(GlobalTestConfig* gtc){ Rideable* ptr = gtc->allocRideable(); m = dynamic_cast<RMap<K, V>*>(ptr); if (!m) { errexit("MapVerify must be run on RMap<K,V> type object."); } } Rideable* getRideable(){ return m; } void doPrefill(GlobalTestConfig* gtc){ // randomly prefill until specified amount of keys are successfully inserted if (this->prefill > 0){ // We want each thread to get a roughly equal proportion // of inserts. As long as range >>> threads, we have that. assert(100 * threads < range); std::mt19937_64 gen_k(0); // int stride = this->range/this->prefill; int i = 0; while(i<this->prefill){ auto ran = gen_k()%range; K k = this->fromInt(ran); m->insert(k,getV(ran),0); (*ground_truth_maps[ran % threads].ui)[k] = getV(ran); i++; } if(gtc->verbose){ printf("Prefilled %d\n",i); } Recoverable* rec=dynamic_cast<Recoverable*>(m); if(rec){ rec->sync(); } } } void operation(uint64_t key, int op, int tid); void cleanup(GlobalTestConfig* gtc){ for(int tid=0;tid<threads;tid++){ std::unordered_map<K, V> &my_map = (*ground_truth_maps[tid].ui); for(const auto& kv:my_map){ optional<V> m_response = m->remove(kv.first,tid); if(!m_response.has_value() || m_response.value()!=kv.second){ errexit("kv mismatch during cleanup!"); } } } ChurnTest::cleanup(gtc); #ifndef PRONTO // Pronto handles deletion by its own delete m; #endif printf("Verified!\n"); } }; template <class K, class V> inline K MapVerify<K,V>::fromInt(uint64_t v){ return (K)v; } template<> inline std::string MapVerify<std::string,std::string>::fromInt(uint64_t v){ auto _key = std::to_string(v); return "user"+std::string(key_size-_key.size()-4,'0')+_key; } template <class K, class V> inline V MapVerify<K,V>::getV(uint64_t v){ return (V)v; } template<> inline std::string MapVerify<std::string,std::string>::getV(uint64_t v){ return value_buffer; } template<class K, class V> inline void MapVerify<K,V>::operation(uint64_t key, int op, int tid){ K k = this->fromInt(key * threads + tid); std::unordered_map<K, V> &my_map = (*ground_truth_maps[tid].ui); // printf("%d.\n", r); if(op<this->prop_gets){ optional<V> m_response = m->get(k,tid); if(m_response.has_value()){ auto ite = my_map.find(k); if(ite == my_map.end()){ printf("MapVerify expected key in rideable: %s\n", k.c_str()); exit(-1); } if(ite->second != *m_response){ printf("MapVerify found incorrect value for key: %s\n", k.c_str()); exit(-1); } } } else if(op<this->prop_puts){ optional<V> m_response = m->put(k,getV(key),tid); auto ite = my_map.find(k); bool ground_contains_bool = (ite != my_map.end()); if(m_response.has_value() != ground_contains_bool){ printf("MapVerfiy response for put %d, expected %d for key: %s\n", m_response.has_value(), ground_contains_bool, k.c_str()); exit(-1); } if(m_response.has_value() and *m_response != ite->second){ printf("MapVerify response for put %s, expected %s for key: %s\n", m_response->c_str(), ite->second.c_str(), k.c_str()); exit(-1); } my_map[k] = getV(key); } else if(op<this->prop_inserts){ bool m_response = m->insert(k,getV(key),tid); bool m_expected = (my_map.find(k) == my_map.end()); if(m_response != m_expected){ printf("MapVerify response for insert %d, expected %d for key: %s\n", m_response, m_expected, k.c_str()); exit(-1); } if(m_response) my_map[k] = getV(key); } else{ // op<=prop_removes optional<V> m_response = m->remove(k,tid); auto ite = my_map.find(k); bool ground_contains_bool = (ite != my_map.end()); if(m_response.has_value() != ground_contains_bool){ printf("MapVerfiy response for remove %d, expected %d for key: %s\n", m_response.has_value(), ground_contains_bool, k.c_str()); exit(-1); } if(m_response.has_value() and *m_response != ite->second){ printf("MapVerify response for remove %s, expected %s for key: %s\n", m_response->c_str(), ite->second.c_str(), k.c_str()); exit(-1); } if(ground_contains_bool){ my_map.erase(my_map.find(k)); } } } #endif
30.309859
130
0.667286
urcs-sync
6ab17cc634c196e8c7165acfe20cdf26c28bd6b1
6,787
hpp
C++
Matrix.hpp
hrt/CSGO
5dee3868bc2e101d608fc91fc06ec2c6c7c37446
[ "MIT" ]
94
2019-08-25T12:54:16.000Z
2022-03-23T18:39:41.000Z
Matrix.hpp
inushahapuarachchi/CSGROW
5dee3868bc2e101d608fc91fc06ec2c6c7c37446
[ "MIT" ]
2
2020-06-07T09:56:55.000Z
2021-02-23T00:18:32.000Z
Matrix.hpp
inushahapuarachchi/CSGROW
5dee3868bc2e101d608fc91fc06ec2c6c7c37446
[ "MIT" ]
23
2019-08-31T21:01:56.000Z
2022-03-18T17:52:26.000Z
/** * @author frk, ReactiioN * @date 08.03.2016 * @visit https://github.com/frk1 * https://thefrk.pw * https://www.unknowncheats.me/forum/members/1067779.html * * https://github.com/ReactiioN1337 * https://reactiion.pw * https://www.unknowncheats.me/forum/members/264622.html */ #pragma once #include <array> #include <string> template < typename T, size_t T_Rows, size_t T_Cols > class Matrix { public: using array_t = std::array< T, T_Rows * T_Cols >; using matrix_t = Matrix< T, T_Rows, T_Cols >; using col_matrix_t = Matrix< T, 1, T_Cols >; using row_matrix_t = Matrix< T, T_Rows, 1 >; private: array_t m_cValues; public: Matrix( void ) { static_assert( std::is_arithmetic< T >::value, "Type T has to be arithmetic!" ); static_assert( T_Rows >= 1 && T_Cols >= 1, "Minimal row and col dimensions are 1." ); m_cValues.fill( static_cast<T>( 0 ) ); } ~Matrix( void ) { } explicit Matrix( std::array< T, ( T_Rows* T_Cols ) > cValues ) : m_cValues( cValues ) { static_assert( std::is_arithmetic< T >::value, "Type T has to be arithmetic!" ); } template < typename... K > Matrix( K ... args ) { static_assert( std::is_arithmetic< T >::value, "Type T has to be arithmetic!" ); m_cValues = std::array< T, T_Rows* T_Cols > { static_cast<T>( args )... }; } constexpr static size_t rows( void ) { return T_Rows; } constexpr static size_t cols( void ) { return T_Cols; } constexpr static size_t size( void ) { return T_Rows * T_Cols; } constexpr static bool isVector( void ) { return T_Rows == 1 || T_Cols == 1; } bool empty( void ) const { return all_of( m_cValues.begin(), m_cValues.end(), []( T i ) { return i == static_cast< T >( 0 ); } ); } col_matrix_t row( size_t iRow ) const { std::array< T, T_Cols > values; for( size_t i = 0; i < T_Cols; ++i ) values.at( i ) = at( iRow, i ); return col_matrix_t{ values }; } row_matrix_t col( size_t iCol ) const { std::array< T, T_Rows > values; for( size_t i = 0; i < T_Rows; ++i ) values.at( i ) = at( i, iCol ); return row_matrix_t{ values }; } void row( size_t iRow, col_matrix_t mat ) { for( size_t i = 0; i < T_Cols; ++i ) at( iRow, i ) = mat( i ); } void col( size_t iCol, row_matrix_t mat ) { for( size_t i = 0; i < T_Rows; ++i ) at( i, iCol ) = mat( i ); } T& at( size_t i ) { return m_cValues.at( i ); } const T& at( size_t i ) const { return m_cValues.at( i ); } T& at( size_t iRow, size_t iCol ) { return m_cValues.at( iRow * T_Cols + iCol ); } const T& at( size_t iRow, size_t iCol ) const { return m_cValues.at( iRow * T_Cols + iCol ); } T& operator () ( size_t i ) { return at( i ); } const T& operator () ( size_t i ) const { return at( i ); } T& operator () ( size_t iRow, size_t iCol ) { return at( iRow, iCol ); } const T& operator () ( size_t iRow, size_t iCol ) const { return at( iRow, iCol ); } matrix_t operator + ( T other ) const { auto buf = *this; buf += other; return buf; } matrix_t operator - ( T other ) const { auto buf = *this; buf -= other; return buf; } matrix_t operator * ( T other ) const { auto buf = *this; buf *= other; return buf; } matrix_t operator / ( T other ) const { auto buf = *this; buf /= other; return buf; } matrix_t& operator += ( T other ) { for( auto& val : m_cValues ) val += other; return *this; } matrix_t& operator -= ( T other ) { for( auto& val : m_cValues ) val -= other; return *this; } matrix_t& operator *= ( T other ) { for( auto& val : m_cValues ) val *= other; return *this; } matrix_t& operator /= ( T other ) { for( auto& val : m_cValues ) val /= other; return *this; } matrix_t operator + ( const matrix_t& other ) const { auto buf = *this; for( size_t i = 0; i < size(); ++i ) buf( i ) += other( i ); return buf; } matrix_t operator - ( const matrix_t& other ) const { auto buf = *this; for( size_t i = 0; i < size(); ++i ) buf( i ) -= other( i ); return buf; } matrix_t& operator += ( const matrix_t& other ) { for( size_t i = 0; i < size(); ++i ) at( i ) += other( i ); return ( *this ); } bool operator == ( const matrix_t& other ) const { for( size_t i = 0; i < size(); ++i ) if( at( i ) != other.at( i ) ) return false; return true; } bool operator != ( const matrix_t& other ) const { return !( ( *this ) == other ); } matrix_t& operator -= ( const matrix_t& other ) { for( size_t i = 0; i < size(); ++i ) at( i ) -= other( i ); return ( *this ); } T norm( void ) const { static_assert( matrix_t::isVector(), "Matrix::norm can only be used on vectors!" ); T buf = static_cast<T>( 0 ); for( auto v : m_cValues ) buf += ( v * v ); return sqrt( buf ); } void normalize( void ) { static_assert( matrix_t::isVector(), "Matrix::normalize can only be used on vectors!" ); ( *this ) /= this->norm(); } matrix_t normalized( void ) const { static_assert( matrix_t::isVector(), "Matrix::normalized can only be used on vectors!" ); auto buf = *this; buf.normalize(); return buf; } friend std::ostream& operator <<( std::ostream& os, const matrix_t& v ) { for( size_t i = 0; i < T_Rows; ++i ) { for( size_t j = 0; j < T_Cols; j++ ) os << v.at( i, j ) << "\t"; os << "\n"; } return os; } template < typename K, size_t OROWS, size_t OCOLS > T dot( const Matrix< K, OROWS, OCOLS >& other ) const { static_assert( matrix_t::isVector() && Matrix< K, OROWS, OCOLS >::isVector(), "Matrix::dot can only be used on vectors!" ); T buf = static_cast<T>( 0 ); for( size_t i = 0; i < (std::min)( size(), other.size() ); ++i ) buf += at( i ) * other.at( i ); return buf; } matrix_t cross( const matrix_t& other ) const { static_assert( matrix_t::size() == 3, "Matrix::cross can only be called for 3 dimensional vectors!" ); return{ at( 1 )* other.at( 2 ) - at( 2 )* other.at( 1 ), at( 2 )* other.at( 0 ) - at( 0 )* other.at( 2 ), at( 0 )* other.at( 1 ) - at( 1 )* other.at( 0 ), }; } matrix_t ncross( const matrix_t& other ) const { static_assert( matrix_t::size() == 3, "Matrix::ncross can only be called for 3 dimensional vectors!" ); return cross( other ).normalized(); } };
20.259701
127
0.546928
hrt
6ab23c22b9af0a0e5494c2dd1691c161bd1f8fdc
9,952
cpp
C++
packages/mock/src/SystemHandle.cpp
aaronchongth/soss_v2
b531c2046e24684670a4a2ea2fd3c134fcba0591
[ "Apache-2.0" ]
null
null
null
packages/mock/src/SystemHandle.cpp
aaronchongth/soss_v2
b531c2046e24684670a4a2ea2fd3c134fcba0591
[ "Apache-2.0" ]
null
null
null
packages/mock/src/SystemHandle.cpp
aaronchongth/soss_v2
b531c2046e24684670a4a2ea2fd3c134fcba0591
[ "Apache-2.0" ]
null
null
null
/* * Copyright (C) 2018 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include <soss/mock/api.hpp> #include <soss/SystemHandle.hpp> #include <iostream> namespace soss { namespace mock { class MockServiceClient; namespace { //============================================================================== class Implementation { public: static Implementation& get() { static Implementation impl; return impl; } // Note: This is a map from topic name to message types. This mock middleware // supports multiple message types per topic. using Channels = std::map<std::string, std::set<std::string>>; Channels subscriptions; Channels publishers; Channels clients; Channels services; std::map<std::string, TopicSubscriberSystem::SubscriptionCallback> soss_subscription_callbacks; std::map<std::string, ServiceClientSystem::RequestCallback> soss_request_callbacks; std::map<std::string, std::vector<MockSubscriptionCallback>> mock_subscriptions; std::map<std::string, MockServiceCallback> mock_services; // We deposit references to clients into this vector to guarantee that their // promises don't get broken the user has a chance to read them. This is a // terribly memory inefficient approach, and it's essentially a memory leak, // but the mock middleware is only meant for testing purposes, so this isn't // really a concern. std::vector<std::shared_ptr<MockServiceClient>> mock_clients; private: Implementation() = default; }; Implementation& impl() { return Implementation::get(); } } // anonymous namespace //============================================================================== class Publisher : public virtual soss::TopicPublisher { public: Publisher(const std::string& topic) : _topic(topic) { // Do nothing } bool publish(const Message& message) override { // Test that we have advertised this topic const auto pub_it = impl().publishers.find(_topic); if(pub_it == impl().publishers.end() || pub_it->second.empty()) { // We'll go ahead and throw an exception here, because this situation // should be considered a bug in SOSS throw std::runtime_error( "SOSS attempted to publish to a topic/message pair " "that it didn't advertise"); } const auto it = impl().mock_subscriptions.find(_topic); if(it == impl().mock_subscriptions.end()) return true; for(const auto& callback : it->second) { callback(message); } return true; } const std::string _topic; }; //============================================================================== class Server : public virtual soss::ServiceProvider { public: Server(const std::string& service) : _service(service) { // Do nothing } void call_service( const soss::Message& request, ServiceClient& client, std::shared_ptr<void> call_handle) override { const auto it = impl().mock_services.find(_service); if(it == impl().mock_services.end()) { throw std::runtime_error( "mock middleware was never given the requested service: " + _service); } soss::Message response = it->second(request); client.receive_response(call_handle, std::move(response)); } const std::string _service; }; //============================================================================== class SystemHandle : public virtual soss::FullSystem { public: bool configure( const RequiredTypes&, const YAML::Node&) override { // Nothing to configure return true; } bool okay() const override { // We're always okay return true; } bool spin_once() override { // We're always spinning. We'll put a sleep here so that this thread doesn't // do too heavy of a dead spin. std::this_thread::sleep_for(std::chrono::milliseconds(50)); return true; } bool subscribe( const std::string& topic_name, const std::string& message_type, SubscriptionCallback callback, const YAML::Node& /*configuration*/) override { impl().subscriptions[topic_name].insert(message_type); impl().soss_subscription_callbacks[topic_name] = std::move(callback); return true; } std::shared_ptr<TopicPublisher> advertise( const std::string& topic_name, const std::string& message_type, const YAML::Node& /*configuration*/) override { impl().publishers[topic_name].insert(message_type); return std::make_shared<Publisher>(topic_name); } bool create_client_proxy( const std::string& service_name, const std::string& service_type, RequestCallback callback, const YAML::Node& /*configuration*/) override { impl().clients[service_name].insert(service_type); impl().soss_request_callbacks[service_name] = std::move(callback); return true; } std::shared_ptr<ServiceProvider> create_service_proxy( const std::string& service_name, const std::string& service_type, const YAML::Node& /*configuration*/) override { impl().services[service_name].insert(service_type); return std::make_shared<Server>(service_name); } }; //============================================================================== bool publish_message( const std::string& topic, const soss::Message& msg) { const auto it = impl().subscriptions.find(topic); if(it == impl().subscriptions.end() || it->second.find(msg.type) == it->second.end()) { return false; } const auto cb = impl().soss_subscription_callbacks.find(topic); if(cb == impl().soss_subscription_callbacks.end()) return false; cb->second(msg); return true; } //============================================================================== bool subscribe( const std::string& topic, MockSubscriptionCallback callback) { const auto it = impl().publishers.find(topic); if(it == impl().publishers.end()) { return false; } impl().mock_subscriptions[topic].emplace_back(std::move(callback)); return true; } //============================================================================== class MockServiceClient : public virtual soss::ServiceClient, public std::enable_shared_from_this<MockServiceClient> { public: MockServiceClient() : response_received(false), quit(false) { // Do nothing } std::shared_future<soss::Message> request( const std::string& topic, const soss::Message& request_msg, std::chrono::nanoseconds retry) { const auto it = impl().soss_request_callbacks.find(topic); if(it == impl().soss_request_callbacks.end()) { throw std::runtime_error( "a callback could not be found for the requested service: " + topic); } it->second(request_msg, *this, shared_from_this()); auto future = promise.get_future().share(); if(retry != std::chrono::nanoseconds(0)) { // If a non-zero retry is specified, then we will launch a thread that // keeps retrying the service request as often as specified, until the // result is received. retry_thread = std::thread([=](){ while(future.wait_for(retry) != std::future_status::ready) { if(this->quit) break; it->second(request_msg, *this, shared_from_this()); } }); } return future; } void receive_response( std::shared_ptr<void> call_handle, const soss::Message& response) override { std::unique_lock<std::mutex> lock(this->mutex); if(response_received) return; response_received = true; promise.set_value(response); (void)call_handle; } std::promise<soss::Message> promise; std::thread retry_thread; bool response_received; std::atomic_bool quit; std::mutex mutex; ~MockServiceClient() override { quit = true; if(retry_thread.joinable()) retry_thread.join(); } }; //============================================================================== std::shared_future<Message> request( const std::string& topic, const soss::Message& request_msg, std::chrono::nanoseconds retry) { const auto it = impl().clients.find(topic); if(it == impl().clients.end()) { throw std::runtime_error( "you have requested a service from mock middleware " "that it is not providing: " + topic); } auto client = std::make_shared<MockServiceClient>(); impl().mock_clients.push_back(client); return client->request(topic, request_msg, retry); } //============================================================================== void serve(const std::string& topic, MockServiceCallback callback) { const auto it = impl().services.find(topic); if(it == impl().services.end()) { throw std::runtime_error( "you are attempting to serve something from mock middleware " "that it is not providing: " + topic); } const auto sit = impl().mock_services.insert(std::make_pair(topic, callback)); if(!sit.second) { throw std::runtime_error( "you are attempting to serve [" + topic + "], but it is already " "being served!"); } } } // namespace mock } // namespace soss //============================================================================== SOSS_REGISTER_SYSTEM("mock", soss::mock::SystemHandle)
26.468085
97
0.616559
aaronchongth
6ab4a7d8e6c1f876aed2a3c7addc180fac194bc0
712
cpp
C++
test/geometry/utils/crosspoint.test.cpp
hareku/cpp-algorithm
455339645d5797f0e6b211694345e1a221fc131c
[ "Apache-2.0" ]
null
null
null
test/geometry/utils/crosspoint.test.cpp
hareku/cpp-algorithm
455339645d5797f0e6b211694345e1a221fc131c
[ "Apache-2.0" ]
null
null
null
test/geometry/utils/crosspoint.test.cpp
hareku/cpp-algorithm
455339645d5797f0e6b211694345e1a221fc131c
[ "Apache-2.0" ]
null
null
null
#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=CGL_2_C" #define ERROR "1e-8" #include <bits/stdc++.h> #include "../../../lib/geometry/utils.hpp" using namespace std; int main() { cout << std::fixed << std::setprecision(10); using P = complex<double>; auto read_p = []()->P { int x,y; cin >> x >> y; return P(x, y); }; int Q; cin >> Q; vector<P> ans(Q); for(int i = 0; i < Q; ++i) { P p0 = read_p(), p1 = read_p(), p2 = read_p(), p3 = read_p(); ans[i] = lib::geometry::crosspoint(p0, p1, p2, p3); } for(int i = 0; i < Q; ++i) { cout << ans[i].real() << " " << ans[i].imag() << endl; } return 0; }
24.551724
82
0.507022
hareku
6ab5a9c6e0c3e2c2d27a1438b56bfb55858a7f02
6,765
cc
C++
net/instaweb/rewriter/scan_filter.cc
dimitrilongo/mod_pagespeed
d0d3bc51aa4feddf010b7085872c64cc46b5aae0
[ "Apache-2.0" ]
2
2019-11-02T07:54:17.000Z
2020-04-16T09:26:51.000Z
net/instaweb/rewriter/scan_filter.cc
dimitrilongo/mod_pagespeed
d0d3bc51aa4feddf010b7085872c64cc46b5aae0
[ "Apache-2.0" ]
null
null
null
net/instaweb/rewriter/scan_filter.cc
dimitrilongo/mod_pagespeed
d0d3bc51aa4feddf010b7085872c64cc46b5aae0
[ "Apache-2.0" ]
1
2020-04-16T09:28:30.000Z
2020-04-16T09:28:30.000Z
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Author: jmarantz@google.com (Joshua Marantz) #include "net/instaweb/rewriter/public/scan_filter.h" #include <memory> #include "net/instaweb/rewriter/public/common_filter.h" #include "net/instaweb/rewriter/public/domain_lawyer.h" #include "net/instaweb/rewriter/public/resource_tag_scanner.h" #include "net/instaweb/rewriter/public/rewrite_driver.h" #include "net/instaweb/rewriter/public/rewrite_options.h" #include "net/instaweb/rewriter/public/rewrite_stats.h" #include "net/instaweb/rewriter/public/server_context.h" #include "pagespeed/kernel/base/charset_util.h" #include "pagespeed/kernel/base/statistics.h" #include "pagespeed/kernel/base/string.h" #include "pagespeed/kernel/base/string_util.h" #include "pagespeed/kernel/html/html_element.h" #include "pagespeed/kernel/html/html_name.h" #include "pagespeed/kernel/html/html_node.h" #include "pagespeed/kernel/http/google_url.h" #include "pagespeed/kernel/http/response_headers.h" namespace net_instaweb { ScanFilter::ScanFilter(RewriteDriver* driver) : driver_(driver) { } ScanFilter::~ScanFilter() { } void ScanFilter::StartDocument() { // TODO(jmarantz): consider having rewrite_driver access the url in this // class, rather than poking it into rewrite_driver. seen_any_nodes_ = false; seen_refs_ = false; seen_base_ = false; seen_meta_tag_charset_ = false; // Set the driver's containing charset to whatever the headers set it to; if // they don't set it to anything, blank the driver's so we know it's not set. const ResponseHeaders* headers = driver_->response_headers(); driver_->set_containing_charset(headers == NULL ? "" : headers->DetermineCharset()); } void ScanFilter::Cdata(HtmlCdataNode* cdata) { seen_any_nodes_ = true; } void ScanFilter::Comment(HtmlCommentNode* comment) { seen_any_nodes_ = true; } void ScanFilter::IEDirective(HtmlIEDirectiveNode* directive) { seen_any_nodes_ = true; } void ScanFilter::Directive(HtmlDirectiveNode* directive) { seen_any_nodes_ = true; } void ScanFilter::Characters(HtmlCharactersNode* characters) { // Check for a BOM at the start of the document. All other event handlers // set the flag to false without using it, so if it's true on entry then // this must be the first event. if (!seen_any_nodes_ && driver_->containing_charset().empty()) { StringPiece charset = GetCharsetForBom(characters->contents()); if (!charset.empty()) { driver_->set_containing_charset(charset); } } seen_any_nodes_ = true; // ignore any subsequent BOMs. } void ScanFilter::StartElement(HtmlElement* element) { seen_any_nodes_ = true; // <base> if (element->keyword() == HtmlName::kBase) { HtmlElement::Attribute* href = element->FindAttribute(HtmlName::kHref); // See http://www.whatwg.org/specs/web-apps/current-work/multipage // /semantics.html#the-base-element // // TODO(jmarantz): If the base is present but cannot be decoded, we should // probably not do any resource rewriting at all. if ((href != NULL) && (href->DecodedValueOrNull() != NULL)) { // TODO(jmarantz): consider having rewrite_driver access the url in this // class, rather than poking it into rewrite_driver. GoogleString new_base = href->DecodedValueOrNull(); driver_->options()->domain_lawyer()->AddProxySuffix(driver_->google_url(), &new_base); driver_->SetBaseUrlIfUnset(new_base); seen_base_ = true; if (seen_refs_) { driver_->set_refs_before_base(); } } // TODO(jmarantz): handle base targets in addition to hrefs. } else { resource_tag_scanner::UrlCategoryVector attributes; resource_tag_scanner::ScanElement(element, driver_->options(), &attributes); for (int i = 0, n = attributes.size(); i < n; ++i) { // Don't count <html manifest=...> as a ref for the purpose of determining // if there are refs before base. It's also important not to count <head // profile=...> but ScanElement skips that. if (!seen_refs_ && !seen_base_ && !(element->keyword() == HtmlName::kHtml && attributes[i].url->keyword() == HtmlName::kManifest)) { seen_refs_ = true; } } } // Get/set the charset of the containing HTML page. // HTTP1.1 says the default charset is ISO-8859-1 but as the W3C says (in // http://www.w3.org/International/O-HTTP-charset.en.php) not many browsers // actually do this so we default to "" instead so that we can tell if it // has been set. The following logic is taken from // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html# // determining-the-character-encoding: // 1. If the UA specifies an encoding, use that (not relevant to us). // 2. If the transport layer specifies an encoding, use that. // Implemented by using the charset from any Content-Type header. // 3. If there is a BOM at the start of the file, use the relevant encoding. // 4. If there is a meta tag in the HTML, use the encoding specified if any. // 5. There are various other heuristics listed which are not implemented. // 6. Otherwise, use no charset or default to something "sensible". if (!seen_meta_tag_charset_ && driver_->containing_charset().empty() && element->keyword() == HtmlName::kMeta) { GoogleString content, mime_type, charset; if (CommonFilter::ExtractMetaTagDetails(*element, NULL, &content, &mime_type, &charset)) { if (!charset.empty()) { driver_->set_containing_charset(charset); seen_meta_tag_charset_ = true; } } } } void ScanFilter::EndElement(HtmlElement* element) { if (element->keyword() == HtmlName::kBase && !driver_->options()->domain_lawyer()->proxy_suffix().empty()) { HtmlElement::Attribute* href = element->FindAttribute(HtmlName::kHref); if (href != NULL) { href->SetValue(driver_->base_url().AllExceptQuery()); } } } void ScanFilter::Flush() { driver_->server_context()->rewrite_stats()->num_flushes()->Add(1); } } // namespace net_instaweb
38.87931
80
0.695344
dimitrilongo
6abae266d24a104b7d907e9abb1623c9a9f3c3c9
1,998
cpp
C++
class notes/5 - trees/3 - traversals/code_cpp/main.cpp
mts398/2020-spring-cs211
0fb9f7a58628bc718d15fe35d2f039ef332e6461
[ "Apache-2.0" ]
4
2020-01-22T21:12:01.000Z
2020-02-20T04:05:47.000Z
class notes/5 - trees/3 - traversals/code_cpp/main.cpp
mts398/2020-spring-cs211
0fb9f7a58628bc718d15fe35d2f039ef332e6461
[ "Apache-2.0" ]
1
2020-03-05T23:58:05.000Z
2020-03-05T23:58:05.000Z
class notes/5 - trees/3 - traversals/code_cpp/main.cpp
Tashenea/2020-spring-cs211
ddce1bd0db8301e11268d80964cc5dbd8e1a8d40
[ "Apache-2.0" ]
15
2020-01-21T20:56:02.000Z
2020-04-10T20:47:42.000Z
#include <iostream> #include <string> #include <vector> #include <fstream> #include <sstream> #include <unordered_map> #include <utility> #include <stack> #include <queue> #include <algorithm> #include <cstdlib> #include <map> //a map is a "red-black" binary tree #include "PrintLog.h" #include "StringHelpers.h" #include "BinarySearchTree.h" using namespace std; template <typename T> void preOrderTraversal(BinaryTreeNode<T>* node) { if (node == nullptr) { return; } //us cout << node->value << " "; //left preOrderTraversal(node->left_child); //right preOrderTraversal(node->right_child); } template <typename T> void inOrderTraversal(BinaryTreeNode<T>* node) { if (node == nullptr) { return; } //left inOrderTraversal(node->left_child); //us cout << node->value << " "; //right inOrderTraversal(node->right_child); } template <typename T> int getCount(BinaryTreeNode<T>* node) { if (node == nullptr) { return 0; } //left int left_count = getCount(node->left_child); //right int right_count = getCount(node->right_child); //us return left_count + right_count + 1; } template<typename T> void getLeafNodesHelper(BinaryTreeNode<T>* node, vector<T>& nodes) { if (node == nullptr) { return; } if (node->left_child == nullptr && node->right_child == nullptr) { nodes.push_back(node->value); } else { getLeafNodesHelper(node->left_child, nodes); getLeafNodesHelper(node->right_child, nodes); } } template<typename T> vector<T> getLeafNodes(BinaryTreeNode<T>* node) { vector<T> result{}; getLeafNodesHelper(node, result); return result; } int main(void) { BinarySearchTree<int> bst{}; for (int i = 0; i < 10; i++) { bst.addElementRec(rand() % 100); } //bst.removeElement(41); preOrderTraversal(bst.getRoot()); cout << endl; inOrderTraversal(bst.getRoot()); cout << endl; cout << getCount(bst.getRoot()) << endl; for (auto value : getLeafNodes(bst.getRoot())) { cout << value << " "; } cout << endl; return 0; }
16.65
66
0.677678
mts398
6abbb48a50a1ceb10f94ab655f236cc759d4e15a
1,345
cpp
C++
external/earcut.hpp-0.12.4/test/tap.cpp
mkuitune/libdr4w
9a3540d721782cd81efd30285de75ddde2e49323
[ "MIT" ]
null
null
null
external/earcut.hpp-0.12.4/test/tap.cpp
mkuitune/libdr4w
9a3540d721782cd81efd30285de75ddde2e49323
[ "MIT" ]
null
null
null
external/earcut.hpp-0.12.4/test/tap.cpp
mkuitune/libdr4w
9a3540d721782cd81efd30285de75ddde2e49323
[ "MIT" ]
null
null
null
#include "tap.hpp" #include <iostream> #include <stdexcept> int Tap::total = 0; int Tap::errored = 0; bool Tap::started = false; Tap::Tap() { if (started) { throw std::runtime_error("Tap cannot be initialized more than once"); } std::cout << "TAP version 13" << std::endl; atexit([]() { }); } Tap::~Tap() { std::cout << std::endl; std::cout << "1.." << total << std::endl; std::cout << "# tests " << total << std::endl; std::cout << "# pass " << (total - errored) << std::endl; std::cout << std::endl; if (!errored) { std::cout << "# ok" << std::endl << std::endl; } else { std::cout << "# not ok" << std::endl << std::endl; exit(1); } } Tap::Test::Test(const std::string &name) { std::cout << "# " << name << std::endl; } Tap::Test::~Test() { if (!finished) { fail("test exited without ending"); } if (failed) { errored++; } } void Tap::Test::ok(bool status, const std::string &message) { if (!status) { fail(message); } else { std::cout << "ok " << ++total << " " << message << std::endl; } } void Tap::Test::fail(const std::string &message) { failed = true; std::cout << "not ok " << ++total << " " << message << std::endl; } void Tap::Test::end() { finished = true; }
20.692308
77
0.501115
mkuitune
6abcd2ab470aeeb4ee18c1150db9ebf2d74ba834
1,264
cpp
C++
LongestPalindrome/LongestPalindrome.cpp
sbchong/LeetCode
933c7d85519b473f48050b24465aaaba94eede8c
[ "Apache-2.0" ]
null
null
null
LongestPalindrome/LongestPalindrome.cpp
sbchong/LeetCode
933c7d85519b473f48050b24465aaaba94eede8c
[ "Apache-2.0" ]
null
null
null
LongestPalindrome/LongestPalindrome.cpp
sbchong/LeetCode
933c7d85519b473f48050b24465aaaba94eede8c
[ "Apache-2.0" ]
1
2020-07-29T14:36:51.000Z
2020-07-29T14:36:51.000Z
// LongestPalindrome.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int longestPalindromeF(string s) { int length = s.size(); sort(s.begin(), s.end()); if (length == 0) return 0; vector<int> s1; for (int i = 0; i < length;) { if (i == length - 2 && s[i] == s[i + 1]) { s1.push_back(s[i]); s1.push_back(s[i + 1]); break; } else if (s[i] == s[i + 1]) { s1.push_back(s[i]); s1.push_back(s[i + 1]); i = i + 2; } else { i = i + 1; continue; } } int num = s1.size(); if (num == length) return num; else if(num<length) return num + 1; } int main() { string s = "abccccdd"; std::cout << longestPalindromeF(s)<<endl; } // 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单 // 调试程序: F5 或调试 >“开始调试”菜单 // 入门使用技巧: // 1. 使用解决方案资源管理器窗口添加/管理文件 // 2. 使用团队资源管理器窗口连接到源代码管理 // 3. 使用输出窗口查看生成输出和其他消息 // 4. 使用错误列表窗口查看错误 // 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目 // 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件
20.387097
59
0.484177
sbchong