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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c2d7ec02d9a05c4a122057bf8d8f85e8f164bcf6 | 10,999 | inl | C++ | include/Vorb/Vector.inl | ChillstepCoder/Vorb | f74c0cfa3abde4fed0e9ec9d936b23c5210ba2ba | [
"MIT"
] | 65 | 2018-06-03T23:09:46.000Z | 2021-07-22T22:03:34.000Z | include/Vorb/Vector.inl | ChillstepCoder/Vorb | f74c0cfa3abde4fed0e9ec9d936b23c5210ba2ba | [
"MIT"
] | 8 | 2018-06-20T17:21:30.000Z | 2020-06-30T01:06:26.000Z | include/Vorb/Vector.inl | ChillstepCoder/Vorb | f74c0cfa3abde4fed0e9ec9d936b23c5210ba2ba | [
"MIT"
] | 34 | 2018-06-04T03:40:52.000Z | 2022-02-15T07:02:05.000Z | /* This file implements all operators for the Vector types. */
// Helper macro to add assignment operators for the currently defined vector.
#define ADD_COMPOUND_ASSIGNMENT_OPERATORS \
COMPOUND_ASSIGNMENT(+= ); \
COMPOUND_ASSIGNMENT(-= ); \
COMPOUND_ASSIGNMENT(*= ); \
COMPOUND_ASSIGNMENT(/= ); \
COMPOUND_ASSIGNMENT(%= ); \
COMPOUND_ASSIGNMENT(&= ); \
COMPOUND_ASSIGNMENT(|= ); \
COMPOUND_ASSIGNMENT(^= ); \
COMPOUND_ASSIGNMENT(<<=); \
COMPOUND_ASSIGNMENT(>>=);
// Helper macro to add global operators for the currently defined vector.
#define ADD_GLOBAL_OPERATORS \
GLOBAL_OPERATOR(+ ); \
GLOBAL_OPERATOR(- ); \
GLOBAL_OPERATOR(* ); \
GLOBAL_OPERATOR(/ ); \
GLOBAL_OPERATOR(% ); \
GLOBAL_OPERATOR(& ); \
GLOBAL_OPERATOR(| ); \
GLOBAL_OPERATOR(^ ); \
GLOBAL_OPERATOR(<<); \
GLOBAL_OPERATOR(>>);
/************************************************************************/
/* Vector2 Implementation */
/************************************************************************/
#pragma region Vector2
template<typename T>
inline T& Vector2<T>::operator[](int i) {
vorb_assert(i >= 0 && i < 2, "Index out of range");
return data[i];
}
template<typename T>
inline const T& Vector2<T>::operator[](int i) const {
vorb_assert(i >= 0 && i < 2, "Index out of range");
return data[i];
}
template<typename T>
template<typename U>
inline Vector2<T>& Vector2<T>::operator=(const Vector2<U>& rhs) {
x = static_cast<T>(rhs.x);
y = static_cast<T>(rhs.y);
return *this;
}
template<typename T>
inline bool Vector2<T>::operator==(const Vector2<T>& rhs) const {
return (x == rhs.x) && (y == rhs.y);
}
template<typename T>
inline bool Vector2<T>::operator!=(const Vector2<T>& rhs) const {
return (x != rhs.x) || (y != rhs.y);
}
// Code reduction for compound assignment operators.
#define COMPOUND_ASSIGNMENT(OP) \
template<typename T> \
template<typename U> \
inline Vector2<T>& Vector2<T>::operator##OP##(U a) { \
x OP static_cast<T>(a); \
y OP static_cast<T>(a); \
return *this; \
} \
template<typename T> \
template<typename U> \
inline Vector2<T>& Vector2<T>::operator##OP##(const Vector2<U>& v) { \
x OP static_cast<T>(v.x); \
y OP static_cast<T>(v.y); \
return *this; \
}
// Add compound assignment operator code for Vector2.
ADD_COMPOUND_ASSIGNMENT_OPERATORS;
#undef COMPOUND_ASSIGNMENT
// Code reduction for bitwise and arithmetic operators.
#define GLOBAL_OPERATOR(OP) \
template<typename T> \
inline Vector2<T> operator##OP##(const Vector2<T>& v, T a) { \
return Vector2<T>(v.x ##OP## a, v.y ##OP## a); \
} \
template<typename T> \
inline Vector2<T> operator##OP##(T a, const Vector2<T>& v) { \
return Vector2<T>(a ##OP## v.x, a ##OP## v.y); \
} \
template<typename T> \
inline Vector2<T> operator##OP##(const Vector2<T>& v1, const Vector2<T>& v2) { \
return Vector2<T>(v1.x ##OP## v2.x, v1.y ##OP## v2.y); \
}
// Add global operator code for Vector2.
ADD_GLOBAL_OPERATORS;
template<typename T>
inline Vector2<T> operator~(const Vector2<T>& v) {
return Vector2<T>(~v.x, ~v.y);
}
template<typename T>
inline Vector2<T> operator-(const Vector2<T>& v) {
return Vector2<T>(-v.x, -v.y);
}
#undef GLOBAL_OPERATOR
#pragma endregion Vector2
/************************************************************************/
/* Vector3 Implementation */
/************************************************************************/
#pragma region Vector3
/* Explicit conversions */
template<typename T>
template<typename A, typename B, typename C>
inline Vector3<T>::Vector3(A a, B b, C c) :
x(static_cast<T>(a)), y(static_cast<T>(b)), z(static_cast<T>(c)){}
template<typename T>
template<typename A, typename B>
inline Vector3<T>::Vector3(const Vector2<A>& a, B b) :
x(static_cast<T>(a.x)), y(static_cast<T>(a.y)), z(static_cast<T>(b)) {}
template<typename T>
template<typename A, typename B>
inline Vector3<T>::Vector3(A a, const Vector2<B>& b) :
x(static_cast<T>(a)), y(static_cast<T>(b.x)), z(static_cast<T>(b.y)) {}
/* Operators */
template<typename T>
inline T& Vector3<T>::operator[](int i) {
// vorb_assert(i >= 0 && i < 3, "Index out of range");
return data[i];
}
template<typename T>
inline const T& Vector3<T>::operator[](int i) const {
// vorb_assert(i >= 0 && i < 3, "Index out of range");
return data[i];
}
template<typename T>
template<typename U>
inline Vector3<T>& Vector3<T>::operator=(const Vector3<U>& rhs) {
x = static_cast<T>(rhs.x);
y = static_cast<T>(rhs.y);
z = static_cast<T>(rhs.z);
return *this;
}
template<typename T>
inline bool Vector3<T>::operator==(const Vector3<T>& rhs) const {
return (x == rhs.x) && (y == rhs.y) && (z == rhs.z);
}
template<typename T>
inline bool Vector3<T>::operator!=(const Vector3<T>& rhs) const {
return (x != rhs.x) || (y != rhs.y) || (z != rhs.z);
}
// Code reduction for compound assignment operators.
#define COMPOUND_ASSIGNMENT(OP) \
template<typename T> \
template<typename U> \
inline Vector3<T>& Vector3<T>::operator##OP##(U a) { \
x OP static_cast<T>(a); \
y OP static_cast<T>(a); \
z OP static_cast<T>(a); \
return *this; \
} \
template<typename T> \
template<typename U> \
inline Vector3<T>& Vector3<T>::operator##OP##(const Vector3<U>& v) { \
x OP static_cast<T>(v.x); \
y OP static_cast<T>(v.y); \
z OP static_cast<T>(v.z); \
return *this; \
}
// Add compound assignment operator code for Vector3.
ADD_COMPOUND_ASSIGNMENT_OPERATORS;
#undef COMPOUND_ASSIGNMENT
// Code reduction for bitwise and arithmetic operators.
#define GLOBAL_OPERATOR(OP) \
template<typename T> \
inline Vector3<T> operator##OP##(const Vector3<T>& v, T a) { \
return Vector3<T>(v.x ##OP## a, v.y ##OP## a, v.z ##OP## a); \
} \
template<typename T> \
inline Vector3<T> operator##OP##(T a, const Vector3<T>& v) { \
return Vector3<T>(a ##OP## v.x, a ##OP## v.y, a ##OP## v.z); \
} \
template<typename T> \
inline Vector3<T> operator##OP##(const Vector3<T>& v1, const Vector3<T>& v3) { \
return Vector3<T>(v1.x ##OP## v3.x, v1.y ##OP## v3.y, v1.z ##OP## v3.z); \
}
// Add global operator code for Vector3.
ADD_GLOBAL_OPERATORS;
template<typename T>
inline Vector3<T> operator~(const Vector3<T>& v) {
return Vector3<T>(~v.x, ~v.y, ~v.z);
}
template<typename T>
inline Vector3<T> operator-(const Vector3<T>& v) {
return Vector3<T>(-v.x, -v.y, -v.z);
}
#undef GLOBAL_OPERATOR
#pragma endregion Vector3
/************************************************************************/
/* Vector4 Implementation */
/************************************************************************/
#pragma region Vector4
/* Explicit conversions */
template<typename T>
template<typename A, typename B, typename C, typename D>
inline Vector4<T>::Vector4(A a, B b, C c, D d) :
x(static_cast<T>(a)), y(static_cast<T>(b)), z(static_cast<T>(c)), w(static_cast<T>(d)) {}
template<typename T>
template<typename A, typename B, typename C>
inline Vector4<T>::Vector4(const Vector2<A>& a, B b, C c) :
x(static_cast<T>(a.x)), y(static_cast<T>(a.y)), z(static_cast<T>(b)), w(static_cast<T>(c)) {}
template<typename T>
template<typename A, typename B, typename C>
inline Vector4<T>::Vector4(A a, const Vector2<B>& b, C c) :
x(static_cast<T>(a)), y(static_cast<T>(b.x)), z(static_cast<T>(b.y)), w(static_cast<T>(c)) {}
template<typename T>
template<typename A, typename B, typename C>
inline Vector4<T>::Vector4(A a, B b, const Vector2<C>& c) :
x(static_cast<T>(z)), y(static_cast<T>(b)), z(static_cast<T>(c.x)), w(static_cast<T>(c.y)) {}
template<typename T>
template<typename A, typename B>
inline Vector4<T>::Vector4(const Vector3<A>& a, B b) :
x(static_cast<T>(a.x)), y(static_cast<T>(a.y)), z(static_cast<T>(a.z)), w(static_cast<T>(b)) {}
template<typename T>
template<typename A, typename B>
inline Vector4<T>::Vector4(A a, const Vector3<B>& b) :
x(static_cast<T>(a)), y(static_cast<T>(b.x)), z(static_cast<T>(b.y)), w(static_cast<T>(b.z)) {}
template<typename T>
template<typename A, typename B>
inline Vector4<T>::Vector4(const Vector2<A>& a, const Vector2<B>& b) :
x(static_cast<T>(a.x)), y(static_cast<T>(a.y)), z(static_cast<T>(b.x)), w(static_cast<T>(b.y)) {}
/* Operators */
template<typename T>
inline T& Vector4<T>::operator[](int i) {
// vorb_assert(i >= 0 && i < 4, "Index out of range");
return data[i];
}
template<typename T>
inline const T& Vector4<T>::operator[](int i) const {
// vorb_assert(i >= 0 && i < 4, "Index out of range");
return data[i];
}
template<typename T>
template<typename U>
inline Vector4<T>& Vector4<T>::operator=(const Vector4<U>& rhs) {
x = static_cast<T>(rhs.x);
y = static_cast<T>(rhs.y);
z = static_cast<T>(rhs.z);
w = static_cast<T>(rhs.w);
return *this;
}
template<typename T>
inline bool Vector4<T>::operator==(const Vector4<T>& rhs) const {
return (x == rhs.x) && (y == rhs.y) && (z == rhs.z) && (w == rhs.w);
}
template<typename T>
inline bool Vector4<T>::operator!=(const Vector4<T>& rhs) const {
return (x != rhs.x) || (y != rhs.y) || (z != rhs.z) || (w != rhs.w);
}
// Code reduction for compound assignment operators.
#define COMPOUND_ASSIGNMENT(OP) \
template<typename T> \
template<typename U> \
inline Vector4<T>& Vector4<T>::operator##OP##(U a) { \
x OP static_cast<T>(a); \
y OP static_cast<T>(a); \
z OP static_cast<T>(a); \
w OP static_cast<T>(a); \
return *this; \
} \
template<typename T> \
template<typename U> \
inline Vector4<T>& Vector4<T>::operator##OP##(const Vector4<U>& v) { \
x OP static_cast<T>(v.x); \
y OP static_cast<T>(v.y); \
z OP static_cast<T>(v.z); \
w OP static_cast<T>(v.w); \
return *this; \
}
// Add compound assignment operator code for Vector4.
ADD_COMPOUND_ASSIGNMENT_OPERATORS;
#undef COMPOUND_ASSIGNMENT
// Code reduction for bitwise and arithmetic operators.
#define GLOBAL_OPERATOR(OP) \
template<typename T> \
inline Vector4<T> operator##OP##(const Vector4<T>& v, T a) { \
return Vector4<T>(v.x ##OP## a, v.y ##OP## a, v.z ##OP## a, v.w ##OP## a); \
} \
template<typename T> \
inline Vector4<T> operator##OP##(T a, const Vector4<T>& v) { \
return Vector4<T>(a ##OP## v.x, a ##OP## v.y, a ##OP## v.z, a ##OP## v.w); \
} \
template<typename T> \
inline Vector4<T> operator##OP##(const Vector4<T>& v1, const Vector4<T>& v4) { \
return Vector4<T>(v1.x ##OP## v4.x, v1.y ##OP## v4.y, v1.z ##OP## v4.z, v1.w ##OP## v4.w); \
}
// Add global operator code for Vector4.
ADD_GLOBAL_OPERATORS;
template<typename T>
inline Vector4<T> operator~(const Vector4<T>& v) {
return Vector4<T>(~v.x, ~v.y, ~v.z, ~v.w);
}
template<typename T>
inline Vector4<T> operator-(const Vector4<T>& v) {
return Vector4<T>(-v.x, -v.y, -v.z, -v.w);
}
#undef GLOBAL_OPERATOR
#pragma endregion Vector4
#undef ADD_COMPOUND_ASSIGNMENT_OPERATORS
#undef ADD_GLOBAL_OPERATORS
| 31.697406 | 101 | 0.613965 | ChillstepCoder |
c2dd18cee696bd36df3c87700284d7c56ddbd65a | 4,448 | hh | C++ | src/file/prob/parprobpipeline.hh | aaszodi/multovl | 00c5b74e65c7aa37cddea8b2ae277fe67fbc59a8 | [
"MIT"
] | 2 | 2018-03-06T02:36:25.000Z | 2020-01-13T10:55:35.000Z | src/file/prob/parprobpipeline.hh | aaszodi/multovl | 00c5b74e65c7aa37cddea8b2ae277fe67fbc59a8 | [
"MIT"
] | null | null | null | src/file/prob/parprobpipeline.hh | aaszodi/multovl | 00c5b74e65c7aa37cddea8b2ae277fe67fbc59a8 | [
"MIT"
] | null | null | null | /* <LICENSE>
License for the MULTOVL multiple genomic overlap tools
Copyright (c) 2007-2012, Dr Andras Aszodi,
Campus Science Support Facilities GmbH (CSF),
Dr-Bohr-Gasse 3, A-1030 Vienna, Austria, Europe.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Campus Science Support Facilities GmbH
nor the names of its contributors may be used to endorse
or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</LICENSE> */
#ifndef MULTOVL_PROB_PARPIPELINE_HEADER
#define MULTOVL_PROB_PARPIPELINE_HEADER
// == Header parprobpipeline.hh ==
// -- Own headers --
#include "probpipeline.hh"
#include "parprobopts.hh"
// -- Boost headers --
#include "boost/thread.hpp"
#include "boost/progress.hpp"
namespace multovl {
namespace prob {
// -- Classes --
/// The ParProbPipeline implements the parallel version of the MULTOVL probability pipeline.
/// The inputs are files (text or binary),
/// the overlap calculations are serial/single core,
/// the repetitions after reshuffling (some) tracks to estimate the probability
/// of overlaps by chance are done in parallel.
class ParProbPipeline: public ProbPipeline
{
public:
/// Inits the pipeline with the command-line arguments.
/// These will be parsed inside and the program exits with an error message
/// if parsing goes wrong.
ParProbPipeline(int argc, char* argv[]);
~ParProbPipeline();
protected:
/// Detects overlaps.
/// First the overlaps without shuffling are calculated. Then the shufflable tracks
/// are permuted and the number of overlaps counted again and again which will provide
/// an estimate of the null distribution (ie. the extent of overlaps by chance).
/// The reshufflings are done in parallel.
/// \return the total number of overlaps found in the unpermuted case.
virtual
unsigned int detect_overlaps();
/// \return access to the option-handling object
virtual
ParProbOpts* opt_ptr() { return dynamic_cast<ParProbOpts*>(opt_pimpl()); }
/// \return thread-safe non-const access to the statistics collector object
virtual
Stat& stat()
{
boost::lock_guard<boost::mutex> lock(_stat_mutex); // 1 thread only
return ProbPipeline::stat();
}
private:
void shuffle(
unsigned int rndseed,
boost::progress_display* progressptr
);
/// Before a worker thread starts a shuffle, the shuffle counter will be checked.
/// If it is >0, then this means there are still jobs to do. The counter will be
/// decremented and the worker performs one reshuffling. If it is 0, then the
/// worker knows that it can stop, there are no more shuffling jobs.
/// \param progressptr if not NULL then the global progress object is updated
/// \return the number of remaining shuffles, 0 indicates the thread may stop
unsigned int check_update_shufflecounter(boost::progress_display* progressptr=NULL);
unsigned int _shufflecounter;
boost::mutex _shufflecounter_mutex, _stat_mutex;
};
} // namespace prob
} // namespace multovl
#endif // MULTOVL_PROB_PARPIPELINE_HEADER
| 37.378151 | 92 | 0.73696 | aaszodi |
123de896206d5746f22aa2b9908819ecfe7e92a8 | 8,264 | cpp | C++ | src/CodeGen_Zynq_C.cpp | kevinkim06/Halide-FIRRTL | e0e64aab1ecbc9c7fce17a929fea765d5412378d | [
"MIT"
] | 1 | 2019-03-03T00:19:21.000Z | 2019-03-03T00:19:21.000Z | src/CodeGen_Zynq_C.cpp | kevinkim06/Halide-FIRRTL | e0e64aab1ecbc9c7fce17a929fea765d5412378d | [
"MIT"
] | null | null | null | src/CodeGen_Zynq_C.cpp | kevinkim06/Halide-FIRRTL | e0e64aab1ecbc9c7fce17a929fea765d5412378d | [
"MIT"
] | 1 | 2019-03-03T00:21:02.000Z | 2019-03-03T00:21:02.000Z | #include <iostream>
#include <limits>
#include "CodeGen_Zynq_C.h"
#include "CodeGen_Internal.h"
#include "IROperator.h"
#include "Simplify.h"
namespace Halide {
namespace Internal {
using std::ostream;
using std::endl;
using std::string;
using std::vector;
using std::pair;
using std::ostringstream;
using std::to_string;
class Zynq_Closure : public Closure {
public:
Zynq_Closure(Stmt s) {
s.accept(this);
}
vector<string> arguments(void);
protected:
using Closure::visit;
};
vector<string> Zynq_Closure::arguments(void) {
vector<string> res;
for (const pair<string, Buffer> &i : buffers) {
debug(3) << "buffer: " << i.first << " " << i.second.size;
if (i.second.read) debug(3) << " (read)";
if (i.second.write) debug(3) << " (write)";
debug(3) << "\n";
}
internal_assert(buffers.empty()) << "we expect no references to buffers in a hw pipeline.\n";
for (const pair<string, Type> &i : vars) {
debug(3) << "var: " << i.first << "\n";
if(!(ends_with(i.first, ".stream") ||
ends_with(i.first, ".stencil"))) {
// stream will be processed by halide_zynq_subimage()
// tap.stencil will be processed by buffer_to_stencil()
// it is a scalar variable
res.push_back(i.first);
}
}
return res;
}
namespace {
// copied from src/runtime/zynq.cpp
const string zynq_runtime =
"#ifndef CMA_BUFFER_T_DEFINED\n"
"#define CMA_BUFFER_T_DEFINED\n"
"struct mMap;\n"
"typedef struct cma_buffer_t {\n"
" unsigned int id; // ID flag for internal use\n"
" unsigned int width; // Width of the image\n"
" unsigned int stride; // Stride between rows, in pixels. This must be >= width\n"
" unsigned int height; // Height of the image\n"
" unsigned int depth; // Byte-depth of the image\n"
" unsigned int phys_addr; // Bus address for DMA\n"
" void* kern_addr; // Kernel virtual address\n"
" struct mMap* cvals;\n"
" unsigned int mmap_offset;\n"
"} cma_buffer_t;\n"
"#endif\n"
"// Zynq runtime API\n"
"int halide_zynq_init();\n"
"void halide_zynq_free(void *user_context, void *ptr);\n"
"int halide_zynq_cma_alloc(struct halide_buffer_t *buf);\n"
"int halide_zynq_cma_free(struct halide_buffer_t *buf);\n"
"int halide_zynq_subimage(const struct halide_buffer_t* image, struct cma_buffer_t* subimage, void *address_of_subimage_origin, int width, int height);\n"
"int halide_zynq_hwacc_launch(struct cma_buffer_t bufs[]);\n"
"int halide_zynq_hwacc_sync(int task_id);\n"
"#include \"halide_zynq_api_setreg.h\"\n";
}
CodeGen_Zynq_C::CodeGen_Zynq_C(ostream &dest,
Target target,
OutputKind output_kind)
: CodeGen_C(dest, target, output_kind) {
stream << zynq_runtime;
}
// Follow name coversion rule of HLS CodeGen for compatibility.
string CodeGen_Zynq_C::print_name(const string &name) {
ostringstream oss;
// Prefix an underscore to avoid reserved words (e.g. a variable named "while")
if (isalpha(name[0])) {
oss << '_';
}
for (size_t i = 0; i < name.size(); i++) {
// vivado HLS compiler doesn't like '__'
if (!isalnum(name[i])) {
oss << "_";
}
else oss << name[i];
}
return oss.str();
}
void CodeGen_Zynq_C::visit(const Realize *op) {
internal_assert(ends_with(op->name, ".stream")||ends_with(op->name, ".tap.stencil"));
if (ends_with(op->name, ".stream")) {
open_scope();
string slice_name = op->name;
buffer_slices.push_back(slice_name);
do_indent();
stream << "cma_buffer_t " << print_name(slice_name) << ";\n";
// Recurse
print_stmt(op->body);
close_scope(slice_name);
} else {
print_stmt(op->body);
}
}
void CodeGen_Zynq_C::visit(const ProducerConsumer *op) {
if (op->is_producer && starts_with(op->name, "_hls_target.")) {
// reachs the HW boundary
/* C code:
cma_buffer_t kbufs[3];
kbufs[0] = kbuf_in0;
kbufs[1] = kbuf_in1;
kbufs[2] = kbuf_out;
int process_id halide_zynq_hwacc_launch(kbufs);
halide_pend_processed(process_id);
*/
// TODO check the order of buffer slices is consistent with
// the order of DMA ports in the driver
Stmt hw_body = op->body;
debug(1) << "compute the closure for hardware pipeline "
<< op->name << '\n';
Zynq_Closure c(hw_body);
vector<string> args = c.arguments();
// emits the register setting api function call
for(size_t i = 0; i < args.size(); i++) {
do_indent();
stream << "halide_zynq_set_" << print_name(args[i]) << "(" << print_name(args[i]) << ");\n";
}
do_indent();
stream << "cma_buffer_t _cma_bufs[" << buffer_slices.size() << "];\n";
for (size_t i = 0; i < buffer_slices.size(); i++) {
do_indent();
stream << "_cma_bufs[" << i << "] = " << print_name(buffer_slices[i]) << ";\n";
}
do_indent();
stream << "int _process_id = halide_zynq_hwacc_launch(_cma_bufs);\n";
do_indent();
stream << "halide_zynq_hwacc_sync(_process_id);\n";
buffer_slices.clear();
} else {
CodeGen_C::visit(op);
}
}
void CodeGen_Zynq_C::visit(const Call *op) {
ostringstream rhs;
if (op->is_intrinsic("halide_zynq_cma_alloc")) {
internal_assert(op->args.size() == 1);
string buffer = print_expr(op->args[0]);
rhs << "halide_zynq_cma_alloc(" << buffer << ")";
print_assignment(op->type, rhs.str());
} else if (op->is_intrinsic("halide_zynq_cma_free")) {
internal_assert(op->args.size() == 1);
string buffer = print_expr(op->args[0]);
do_indent();
stream << "halide_zynq_cma_free(" << buffer << ");\n";
} else if (op->is_intrinsic("stream_subimage")) {
/* IR:
stream_subimage(direction, buffer_var, stream_var,
address_of_subimage_origin,
dim_0_stride, dim_0_extent, ...)
C code:
halide_zynq_subimage(&buffer_var, &stream_var, address_of_subimage_origin, width, height);
*/
internal_assert(op->args.size() >= 6);
const Variable *buffer_var = op->args[1].as<Variable>();
internal_assert(buffer_var && buffer_var->type == type_of<struct buffer_t *>());
string buffer_name = print_expr(op->args[1]);
string slice_name = print_expr(op->args[2]);
string address_of_subimage_origin = print_expr(op->args[3]);
string width, height;
// TODO check the lower demesion matches the buffer depth
// TODO static check that the slice is within the bounds of kernel buffer
size_t arg_length = op->args.size();
width = print_expr(op->args[arg_length-3]);
height = print_expr(op->args[arg_length-1]);
do_indent();
stream << "halide_zynq_subimage("
<< print_name(buffer_name) << ", &" << print_name(slice_name) << ", "
<< address_of_subimage_origin << ", " << width << ", " << height << ");\n";
} else if (op->name == "address_of") {
std::ostringstream rhs;
const Load *l = op->args[0].as<Load>();
internal_assert(op->args.size() == 1 && l);
rhs << "(("
<< print_type(l->type.element_of()) // index is in elements, not vectors.
<< " *)"
<< print_name(l->name)
<< " + "
<< print_expr(l->index)
<< ")";
print_assignment(op->type, rhs.str());
} else if (op->name == "buffer_to_stencil") {
internal_assert(op->args.size() == 2);
// add a suffix to buffer var, in order to be compatible with CodeGen_C
string a0 = print_expr(op->args[0]);
string a1 = print_expr(op->args[1]);
do_indent();
stream << "halide_zynq_set_" << a1 << "(_halide_buffer_get_host(" << a0 << "));\n";
id = "0"; // skip evaluation
} else {
CodeGen_C::visit(op);
}
}
}
}
| 34.722689 | 158 | 0.584342 | kevinkim06 |
123ec0fb25bcc03033cffc2d9137bfc0bd9993be | 129 | hpp | C++ | deps/opencv/win/include/opencv2/reg/mapperpyramid.hpp | YLiLarry/ggframe | ffb6a7d7d878c155d03830cf6fb6fb8f948084f0 | [
"MIT"
] | null | null | null | deps/opencv/win/include/opencv2/reg/mapperpyramid.hpp | YLiLarry/ggframe | ffb6a7d7d878c155d03830cf6fb6fb8f948084f0 | [
"MIT"
] | null | null | null | deps/opencv/win/include/opencv2/reg/mapperpyramid.hpp | YLiLarry/ggframe | ffb6a7d7d878c155d03830cf6fb6fb8f948084f0 | [
"MIT"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:86174bf90d9ed9280d77cb38b39041e56c8742dd60eeb77a6275eeea4bc086fb
size 3851
| 32.25 | 75 | 0.883721 | YLiLarry |
124133c752dc2371e7834c838c208addfba365f8 | 261 | hpp | C++ | include/jln/mp/smp/list/pop_back.hpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | 9 | 2020-07-04T16:46:13.000Z | 2022-01-09T21:59:31.000Z | include/jln/mp/smp/list/pop_back.hpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | null | null | null | include/jln/mp/smp/list/pop_back.hpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | 1 | 2021-05-23T13:37:40.000Z | 2021-05-23T13:37:40.000Z | #pragma once
#include <jln/mp/smp/algorithm/rotate.hpp>
#include <jln/mp/smp/list/pop_front.hpp>
#include <jln/mp/list/pop_back.hpp>
namespace jln::mp::smp
{
template<class C = listify>
using pop_back = mp::detail::sfinae<mp::pop_back<subcontract<C>>>;
}
| 21.75 | 68 | 0.720307 | jonathanpoelen |
12426a8c585cd8a92ef063b1da53b83438d479e2 | 2,381 | hpp | C++ | libs/core/include/core/byte_array/byte_array.hpp | AronVanAmmers/ledger | 5cf8b85e5ee42957d9d38fd76b2b3ead0f061954 | [
"Apache-2.0"
] | 1 | 2019-05-15T17:23:08.000Z | 2019-05-15T17:23:08.000Z | libs/core/include/core/byte_array/byte_array.hpp | AronVanAmmers/ledger | 5cf8b85e5ee42957d9d38fd76b2b3ead0f061954 | [
"Apache-2.0"
] | null | null | null | libs/core/include/core/byte_array/byte_array.hpp | AronVanAmmers/ledger | 5cf8b85e5ee42957d9d38fd76b2b3ead0f061954 | [
"Apache-2.0"
] | null | null | null | #pragma once
//------------------------------------------------------------------------------
//
// Copyright 2018 Fetch.AI Limited
//
// 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 "core/byte_array/const_byte_array.hpp"
#include <algorithm>
#include <cassert>
#include <iostream>
#include <ostream>
#include <type_traits>
namespace fetch {
namespace byte_array {
class ByteArray : public ConstByteArray
{
public:
using super_type = ConstByteArray;
ByteArray() = default;
ByteArray(char const *str) : super_type(str) {}
ByteArray(std::string const &s) : super_type(s) {}
ByteArray(ByteArray const &other) = default;
ByteArray(std::initializer_list<container_type> l) : super_type(l) {}
ByteArray(ByteArray const &other, std::size_t const &start, std::size_t const &length)
: super_type(other, start, length)
{}
ByteArray(super_type const &other) : super_type(other) {}
ByteArray(super_type const &other, std::size_t const &start, std::size_t const &length)
: super_type(other, start, length)
{}
container_type & operator[](std::size_t const &n) { return super_type::operator[](n); }
container_type const &operator[](std::size_t const &n) const { return super_type::operator[](n); }
using super_type::Resize;
using super_type::Reserve;
using super_type::operator+;
using super_type::pointer;
using super_type::char_pointer;
};
inline std::ostream &operator<<(std::ostream &os, ByteArray const &str)
{
char const *arr = reinterpret_cast<char const *>(str.pointer());
for (std::size_t i = 0; i < str.size(); ++i) os << arr[i];
return os;
}
inline ByteArray operator+(char const *a, ByteArray const &b)
{
ByteArray s(a);
s = s + b;
return s;
}
} // namespace byte_array
} // namespace fetch
| 31.746667 | 100 | 0.657287 | AronVanAmmers |
12448aa38ba21c252984b54eff71d070c47e58b7 | 10,983 | cc | C++ | third_party/nucleus/io/bed_reader.cc | ruif2009/deepvariant | c7fd07016577c253f81ef253aed65c416e4c0ef7 | [
"BSD-3-Clause"
] | null | null | null | third_party/nucleus/io/bed_reader.cc | ruif2009/deepvariant | c7fd07016577c253f81ef253aed65c416e4c0ef7 | [
"BSD-3-Clause"
] | null | null | null | third_party/nucleus/io/bed_reader.cc | ruif2009/deepvariant | c7fd07016577c253f81ef253aed65c416e4c0ef7 | [
"BSD-3-Clause"
] | 1 | 2022-02-03T21:54:57.000Z | 2022-02-03T21:54:57.000Z | /*
* Copyright 2018 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
// Implementation of bed_reader.h
#include "third_party/nucleus/io/bed_reader.h"
#include "absl/strings/str_split.h"
#include "third_party/nucleus/protos/bed.pb.h"
#include "third_party/nucleus/util/utils.h"
#include "third_party/nucleus/vendor/zlib_compression_options.h"
#include "third_party/nucleus/vendor/zlib_inputstream.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/lib/io/buffered_inputstream.h"
#include "tensorflow/core/lib/io/compression.h"
#include "tensorflow/core/lib/io/random_inputstream.h"
#include "tensorflow/core/lib/strings/numbers.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/file_system.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/types.h"
namespace nucleus {
namespace tf = tensorflow;
using tensorflow::int32;
using tensorflow::int64;
using tensorflow::string;
// 256 KB read buffer.
constexpr int READER_BUFFER_SIZE = 256 * 1024;
// BED-specific attributes.
constexpr char BED_COMMENT_CHAR = '#';
// -----------------------------------------------------------------------------
//
// Reader for BED format data.
//
// -----------------------------------------------------------------------------
namespace {
bool ValidNumBedFields(const int fields) {
return (fields == 3 || fields == 4 || fields == 5 || fields == 6 ||
fields == 8 || fields == 9 || fields == 12);
}
// Read the next non-comment line.
tf::Status NextNonCommentLine(
const std::unique_ptr<tf::io::BufferedInputStream>& instream,
string* line) {
TF_RETURN_IF_ERROR(instream->ReadLine(line));
while ((*line)[0] == BED_COMMENT_CHAR) {
TF_RETURN_IF_ERROR(instream->ReadLine(line));
}
return tf::Status::OK();
}
tf::Status ConvertToPb(const string& line, const int desiredNumFields,
int* numTokensSeen,
nucleus::genomics::v1::BedRecord* record) {
CHECK(record != nullptr) << "BED record cannot be null";
record->Clear();
std::vector<string> tokens = absl::StrSplit(line, '\t');
int numTokens = static_cast<int>(tokens.size());
*numTokensSeen = numTokens;
if (!ValidNumBedFields(numTokens)) {
return tf::errors::Unknown("BED record has invalid number of fields");
}
int numFields =
desiredNumFields == 0 ? numTokens : std::min(numTokens, desiredNumFields);
int64 int64Value;
record->set_reference_name(tokens[0]);
tf::strings::safe_strto64(tokens[1], &int64Value);
record->set_start(int64Value);
tf::strings::safe_strto64(tokens[2], &int64Value);
record->set_end(int64Value);
if (numFields > 3) record->set_name(tokens[3]);
if (numFields > 4) {
double value;
tf::strings::safe_strtod(tokens[4].c_str(), &value);
record->set_score(value);
}
if (numFields > 5) {
if (tokens[5] == "+")
record->set_strand(nucleus::genomics::v1::BedRecord::FORWARD_STRAND);
else if (tokens[5] == "-")
record->set_strand(nucleus::genomics::v1::BedRecord::REVERSE_STRAND);
else if (tokens[5] == ".")
record->set_strand(nucleus::genomics::v1::BedRecord::NO_STRAND);
else
return tf::errors::Unknown("Invalid BED record with unknown strand");
}
if (numFields > 7) {
tf::strings::safe_strto64(tokens[6], &int64Value);
record->set_thick_start(int64Value);
tf::strings::safe_strto64(tokens[7], &int64Value);
record->set_thick_end(int64Value);
}
if (numFields > 8) record->set_item_rgb(tokens[8]);
if (numFields >= 12) {
int32 int32Value;
tf::strings::safe_strto32(tokens[9], &int32Value);
record->set_block_count(int32Value);
record->set_block_sizes(tokens[10]);
record->set_block_starts(tokens[11]);
}
return tf::Status::OK();
}
// Peeks into the path to the first BED record and returns the number of fields
// in the record.
// NOTE: This is quite heavyweight. Reading upon initialization and then
// rewinding the stream to 0 is a nicer solution, but currently has a memory
// leak in the compressed stream reset implementation.
tf::Status GetNumFields(const string& path, bool isCompressed, int* numFields) {
std::unique_ptr<tensorflow::RandomAccessFile> sp;
tf::Status status =
tf::Env::Default()->NewRandomAccessFile(path.c_str(), &sp);
if (!status.ok()) {
return tf::errors::NotFound(tf::strings::StrCat("Could not open ", path));
}
tensorflow::RandomAccessFile* fp = sp.release();
std::unique_ptr<tensorflow::io::BufferedInputStream> bi;
string line;
if (isCompressed) {
std::unique_ptr<tensorflow::io::RandomAccessInputStream> fs;
std::unique_ptr<tensorflow::io::ZlibInputStream> zs;
fs.reset(new tf::io::RandomAccessInputStream(fp));
zs.reset(new tf::io::ZlibInputStream(
fs.get(), READER_BUFFER_SIZE, READER_BUFFER_SIZE,
tf::io::ZlibCompressionOptions::GZIP()));
bi.reset(new tf::io::BufferedInputStream(zs.get(), READER_BUFFER_SIZE));
TF_RETURN_IF_ERROR(NextNonCommentLine(bi, &line));
bi.reset();
zs.reset();
fs.reset();
} else {
bi.reset(new tf::io::BufferedInputStream(fp, READER_BUFFER_SIZE));
TF_RETURN_IF_ERROR(NextNonCommentLine(bi, &line));
bi.reset();
}
delete fp;
std::vector<string> tokens = absl::StrSplit(line, '\t');
*numFields = static_cast<int>(tokens.size());
return tf::Status::OK();
}
} // namespace
// Iterable class for traversing all BED records in the file.
class BedFullFileIterable : public BedIterable {
public:
// Advance to the next record.
StatusOr<bool> Next(nucleus::genomics::v1::BedRecord* out) override;
// Constructor is invoked via BedReader::Iterate.
BedFullFileIterable(const BedReader* reader);
~BedFullFileIterable() override;
};
StatusOr<std::unique_ptr<BedReader>> BedReader::FromFile(
const string& bed_path,
const nucleus::genomics::v1::BedReaderOptions& options) {
int numFieldsInBed;
TF_RETURN_IF_ERROR(
GetNumFields(bed_path,
options.compression_type() ==
nucleus::genomics::v1::BedReaderOptions::GZIP,
&numFieldsInBed));
nucleus::genomics::v1::BedHeader header;
header.set_num_fields(numFieldsInBed);
// Ensure options are valid.
if (options.num_fields() != 0 && (options.num_fields() > numFieldsInBed ||
!ValidNumBedFields(options.num_fields()))) {
return tf::errors::InvalidArgument(
"Invalid requested number of fields to parse");
}
std::unique_ptr<tensorflow::RandomAccessFile> fp;
tf::Status status =
tf::Env::Default()->NewRandomAccessFile(bed_path.c_str(), &fp);
if (!status.ok()) {
return tf::errors::NotFound(
tf::strings::StrCat("Could not open ", bed_path));
}
return std::unique_ptr<BedReader>(
new BedReader(fp.release(), options, header));
}
BedReader::BedReader(tensorflow::RandomAccessFile* fp,
const nucleus::genomics::v1::BedReaderOptions& options,
const nucleus::genomics::v1::BedHeader& header)
: options_(options), header_(header), src_(fp) {
if (options.compression_type() ==
nucleus::genomics::v1::BedReaderOptions::GZIP) {
file_stream_.reset(new tf::io::RandomAccessInputStream(src_));
zlib_stream_.reset(new tf::io::ZlibInputStream(
file_stream_.get(), READER_BUFFER_SIZE, READER_BUFFER_SIZE,
tf::io::ZlibCompressionOptions::GZIP()));
buffered_inputstream_.reset(new tf::io::BufferedInputStream(
zlib_stream_.get(), READER_BUFFER_SIZE));
} else {
buffered_inputstream_.reset(
new tf::io::BufferedInputStream(src_, READER_BUFFER_SIZE));
}
}
BedReader::~BedReader() {
if (src_) {
TF_CHECK_OK(Close());
}
}
tf::Status BedReader::Close() {
if (src_ == nullptr) {
return tf::errors::FailedPrecondition("BedReader already closed");
}
buffered_inputstream_.reset();
zlib_stream_.reset();
file_stream_.reset();
delete src_;
src_ = nullptr;
return tf::Status::OK();
}
// Ensures the number of fields is consistent across all records in the BED.
tf::Status BedReader::Validate(const int numTokens) const {
if (header_.num_fields() != numTokens) {
return tf::errors::Unknown(
"Invalid BED with varying number of fields in file");
}
return tf::Status::OK();
}
StatusOr<std::shared_ptr<BedIterable>> BedReader::Iterate() const {
if (src_ == nullptr)
return tf::errors::FailedPrecondition("Cannot Iterate a closed BedReader.");
return StatusOr<std::shared_ptr<BedIterable>>(
MakeIterable<BedFullFileIterable>(this));
}
// Iterable class definitions.
StatusOr<bool> BedFullFileIterable::Next(
nucleus::genomics::v1::BedRecord* out) {
TF_RETURN_IF_ERROR(CheckIsAlive());
const BedReader* bed_reader = static_cast<const BedReader*>(reader_);
string line;
tf::Status status = NextNonCommentLine(bed_reader->Stream(), &line);
if (tf::errors::IsOutOfRange(status)) {
return false;
} else if (!status.ok()) {
return status;
}
int numTokens;
TF_RETURN_IF_ERROR(
ConvertToPb(line, bed_reader->Options().num_fields(), &numTokens, out));
TF_RETURN_IF_ERROR(bed_reader->Validate(numTokens));
return true;
}
BedFullFileIterable::~BedFullFileIterable() {}
BedFullFileIterable::BedFullFileIterable(const BedReader* reader)
: Iterable(reader) {}
} // namespace nucleus
| 36.732441 | 80 | 0.693344 | ruif2009 |
124bd83394fbb1af01f40c4a7a8a3c8110b6e7f2 | 361 | cpp | C++ | codeforces/235b.cpp | jffifa/algo-solution | af2400d6071ee8f777f9473d6a34698ceef08355 | [
"MIT"
] | 5 | 2015-07-14T10:29:25.000Z | 2016-10-11T12:45:18.000Z | codeforces/235b.cpp | jffifa/algo-solution | af2400d6071ee8f777f9473d6a34698ceef08355 | [
"MIT"
] | null | null | null | codeforces/235b.cpp | jffifa/algo-solution | af2400d6071ee8f777f9473d6a34698ceef08355 | [
"MIT"
] | 3 | 2016-08-23T01:05:26.000Z | 2017-05-28T02:04:20.000Z | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int N;
double p[111111], ans;
int main() {
int i, j, k;
cin>>N;
for (i = 0; i < N; ++i) {
scanf("%lf", p+i);
ans += p[i];
}
double now = 0;
for (i = 1; i < N; ++i) {
now = (now+p[i-1])*p[i];
ans += 2*now;
}
printf("%.10f\n", ans);
return 0;
}
| 14.44 | 26 | 0.526316 | jffifa |
124c5604f5c0c68e1195f8ab2c05b7f6eee9a6ff | 390 | hpp | C++ | wechat/models/wx_synckey.hpp | ArkBriar/WxPenguin | ae1cf9719a185b3ecb546e4f0537c6afc77ddb45 | [
"MIT"
] | 1 | 2017-03-13T09:59:30.000Z | 2017-03-13T09:59:30.000Z | wechat/models/wx_synckey.hpp | arkbriar/WxPenguin | ae1cf9719a185b3ecb546e4f0537c6afc77ddb45 | [
"MIT"
] | null | null | null | wechat/models/wx_synckey.hpp | arkbriar/WxPenguin | ae1cf9719a185b3ecb546e4f0537c6afc77ddb45 | [
"MIT"
] | null | null | null | #pragma once
#ifndef WX_SYNCKEY_HPP_1Z6TPOWO
#define WX_SYNCKEY_HPP_1Z6TPOWO
#include <string>
#include "../json/json.hpp"
namespace WebWx {
namespace Model {
class WxSyncKey {
public:
//@no impl/
WxSyncKey() {}
WxSyncKey(const nlohmann::json&) {}
};
}
}
#endif /* end of include guard: WX_SYNCKEY_HPP_1Z6TPOWO */
| 15.6 | 58 | 0.597436 | ArkBriar |
125296dcd01bdd43a61a1ff1ac2c8db7d4c39470 | 2,207 | cpp | C++ | test/std_complex.cpp | rwols/yaml-archive | 4afec73e557c15350c5e068c010f4e378edc95ef | [
"BSL-1.0"
] | 1 | 2018-01-27T23:35:21.000Z | 2018-01-27T23:35:21.000Z | test/std_complex.cpp | rwols/yaml-archive | 4afec73e557c15350c5e068c010f4e378edc95ef | [
"BSL-1.0"
] | 2 | 2019-08-17T05:37:36.000Z | 2019-08-17T22:57:26.000Z | test/std_complex.cpp | rwols/yaml-archive | 4afec73e557c15350c5e068c010f4e378edc95ef | [
"BSL-1.0"
] | 1 | 2021-03-19T11:53:53.000Z | 2021-03-19T11:53:53.000Z | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// test_complex.cpp
// (C) Copyright 2005 Matthias Troyer .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// should pass compilation and execution
#include <fstream>
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/math/special_functions/next.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
#include <boost/limits.hpp>
namespace std {
using ::rand;
using ::remove;
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE)
using ::numeric_limits;
#endif
}
#endif
#include "io_fixture.hpp"
#include <boost/preprocessor/stringize.hpp>
#include <boost/serialization/complex.hpp>
#include <boost/test/unit_test.hpp>
#include <iostream>
template <class T>
std::ostream& operator<<(std::ostream& os, const std::complex<T>& z)
{
os << std::setprecision(std::numeric_limits<T>::digits10 + 1);
return os << z.real() << " + " << z.imag() << 'i';
}
BOOST_FIXTURE_TEST_CASE(std_complex, io_fixture)
{
using boost::serialization::make_nvp;
std::complex<float> a(
static_cast<float>(std::rand()) / static_cast<float>(std::rand()),
static_cast<float>(std::rand()) / static_cast<float>(std::rand()));
std::complex<double> b(
static_cast<double>(std::rand()) / static_cast<double>(std::rand()),
static_cast<double>(std::rand()) / static_cast<double>(std::rand()));
{
output() << make_nvp("afloatcomplex", a)
<< make_nvp("adoublecomplex", b);
}
std::complex<float> a1;
std::complex<double> b1;
{
input() >> make_nvp("afloatcomplex", a1) >>
make_nvp("adoublecomplex", b1);
}
// FIXME!!! FLOAT PRECISION!!!
using boost::math::float_distance;
BOOST_CHECK_LT(std::abs(float_distance(a.real(), a1.real())), 8);
BOOST_CHECK_LT(std::abs(float_distance(a.imag(), a1.imag())), 8);
BOOST_CHECK_LT(std::abs(float_distance(b.real(), b1.real())), 8);
BOOST_CHECK_LT(std::abs(float_distance(b.imag(), b1.imag())), 8);
}
// EOF
| 31.528571 | 80 | 0.643407 | rwols |
125624723ff8ea429178ef0793673794b8123142 | 11,945 | cpp | C++ | src/Interop.cpp | jparimaa/glvk-interop | 3428cafe5ea0359609fd42d84b87b1900d9ff58f | [
"MIT"
] | null | null | null | src/Interop.cpp | jparimaa/glvk-interop | 3428cafe5ea0359609fd42d84b87b1900d9ff58f | [
"MIT"
] | null | null | null | src/Interop.cpp | jparimaa/glvk-interop | 3428cafe5ea0359609fd42d84b87b1900d9ff58f | [
"MIT"
] | null | null | null | #include "Interop.hpp"
#include "VulkanUtils.hpp"
#include "Utils.hpp"
#include <vulkan/vulkan_win32.h>
#include <array>
Interop::Interop(Context& context) :
m_context(context),
m_device(context.getDevice())
{
createInteropSemaphores();
createInteropTexture();
}
Interop::~Interop()
{
vkDeviceWaitIdle(m_device);
vkDestroyImage(m_device, m_sharedImage, nullptr);
vkFreeMemory(m_device, m_sharedImageMemory, nullptr);
vkDestroyImageView(m_device, m_sharedImageView, nullptr);
vkDestroySemaphore(m_device, m_glCompleteSemaphore, nullptr);
vkDestroySemaphore(m_device, m_vulkanCompleteSemaphore, nullptr);
}
void Interop::transformSharedImageForGLWrite(VkCommandBuffer cb)
{
CHECK(!m_stateIsGLWrite);
VkImageMemoryBarrier barrier{};
barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.image = m_sharedImage;
barrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT;
barrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
barrier.oldLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
barrier.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
barrier.subresourceRange.levelCount = 1;
barrier.subresourceRange.layerCount = 1;
const VkPipelineStageFlags sourceStage = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
const VkPipelineStageFlags destinationStage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
vkCmdPipelineBarrier(cb, sourceStage, destinationStage, 0, 0, nullptr, 0, nullptr, 1, &barrier);
m_stateIsGLWrite = true;
}
void Interop::transformSharedImageForVKRead(VkCommandBuffer cb)
{
CHECK(m_stateIsGLWrite);
VkImageMemoryBarrier barrier{};
barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.image = m_sharedImage;
barrier.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
barrier.oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
barrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
barrier.subresourceRange.levelCount = 1;
barrier.subresourceRange.layerCount = 1;
const VkPipelineStageFlags sourceStage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
const VkPipelineStageFlags destinationStage = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
vkCmdPipelineBarrier(cb, sourceStage, destinationStage, 0, 0, nullptr, 0, nullptr, 1, &barrier);
m_stateIsGLWrite = false;
}
HANDLE Interop::getGLCompleteHandle() const
{
return m_glCompleteSemaphoreHandle;
}
HANDLE Interop::getVKReadyHandle() const
{
return m_vulkanCompleteSemaphoreHandle;
}
HANDLE Interop::getSharedImageMemoryHandle() const
{
return m_sharedImageMemoryHandle;
}
uint64_t Interop::getSharedImageMemorySize() const
{
return m_sharedImageMemorySize;
}
VkSemaphore Interop::getGLCompleteSemaphore() const
{
return m_glCompleteSemaphore;
}
VkSemaphore Interop::getVKReadySemaphore() const
{
return m_vulkanCompleteSemaphore;
}
VkImageView Interop::getSharedImageView() const
{
return m_sharedImageView;
}
void Interop::createInteropSemaphores()
{
auto vkGetPhysicalDeviceExternalSemaphorePropertiesKHRAddr = vkGetInstanceProcAddr(m_context.getInstance(), "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
auto vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(vkGetPhysicalDeviceExternalSemaphorePropertiesKHRAddr);
CHECK(vkGetPhysicalDeviceExternalSemaphorePropertiesKHR);
const std::vector<VkExternalSemaphoreHandleTypeFlagBits> flags{
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT};
VkPhysicalDeviceExternalSemaphoreInfo externalSemaphoreInfo{};
externalSemaphoreInfo.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO;
externalSemaphoreInfo.pNext = nullptr;
VkExternalSemaphoreProperties externalSemaphoreProperties{};
externalSemaphoreProperties.sType = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES;
externalSemaphoreProperties.pNext = nullptr;
bool found = false;
VkPhysicalDevice physicalDevice = m_context.getPhysicalDevice();
VkExternalSemaphoreHandleTypeFlagBits compatibleSemaphoreType;
for (size_t i = 0; i < flags.size(); ++i)
{
externalSemaphoreInfo.handleType = flags[i];
vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, &externalSemaphoreInfo, &externalSemaphoreProperties);
if (externalSemaphoreProperties.compatibleHandleTypes & flags[i] && //
externalSemaphoreProperties.externalSemaphoreFeatures & VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT)
{
compatibleSemaphoreType = flags[i];
found = true;
break;
}
}
CHECK(found);
VkExportSemaphoreCreateInfo exportSemaphoreCreateInfo{};
exportSemaphoreCreateInfo.sType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO;
exportSemaphoreCreateInfo.pNext = nullptr;
exportSemaphoreCreateInfo.handleTypes = VkExternalSemaphoreHandleTypeFlags(compatibleSemaphoreType);
VkSemaphoreCreateInfo semaphoreCreateInfo{};
semaphoreCreateInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
semaphoreCreateInfo.pNext = &exportSemaphoreCreateInfo;
VK_CHECK(vkCreateSemaphore(m_device, &semaphoreCreateInfo, nullptr, &m_glCompleteSemaphore));
VK_CHECK(vkCreateSemaphore(m_device, &semaphoreCreateInfo, nullptr, &m_vulkanCompleteSemaphore));
// VkSemaphoreGetFdInfoKHR for Linux
VkSemaphoreGetWin32HandleInfoKHR semaphoreGetHandleInfo{};
semaphoreGetHandleInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR;
semaphoreGetHandleInfo.pNext = nullptr;
semaphoreGetHandleInfo.semaphore = VK_NULL_HANDLE;
semaphoreGetHandleInfo.handleType = compatibleSemaphoreType;
// vkGetSemaphoreFdKHR for Linux
auto vkGetSemaphoreWin32HandleKHRAddr = vkGetInstanceProcAddr(m_context.getInstance(), "vkGetSemaphoreWin32HandleKHR");
auto vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR(vkGetSemaphoreWin32HandleKHRAddr);
CHECK(vkGetSemaphoreWin32HandleKHR);
semaphoreGetHandleInfo.semaphore = m_vulkanCompleteSemaphore;
VK_CHECK(vkGetSemaphoreWin32HandleKHR(m_device, &semaphoreGetHandleInfo, &m_vulkanCompleteSemaphoreHandle));
semaphoreGetHandleInfo.semaphore = m_glCompleteSemaphore;
VK_CHECK(vkGetSemaphoreWin32HandleKHR(m_device, &semaphoreGetHandleInfo, &m_glCompleteSemaphoreHandle));
}
void Interop::createInteropTexture()
{
// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR for Linux
const VkExternalMemoryHandleTypeFlags handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR;
{ // Create Image
VkExternalMemoryImageCreateInfo externalMemoryCreateInfo{};
externalMemoryCreateInfo.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO;
externalMemoryCreateInfo.handleTypes = handleType;
VkImageCreateInfo imageCreateInfo{};
imageCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
imageCreateInfo.pNext = &externalMemoryCreateInfo;
imageCreateInfo.imageType = VK_IMAGE_TYPE_2D;
imageCreateInfo.format = VK_FORMAT_R8G8B8A8_UNORM;
imageCreateInfo.mipLevels = 1;
imageCreateInfo.arrayLayers = 1;
imageCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;
imageCreateInfo.extent.depth = 1;
imageCreateInfo.extent.width = c_windowWidth;
imageCreateInfo.extent.height = c_windowHeight;
imageCreateInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT;
VK_CHECK(vkCreateImage(m_device, &imageCreateInfo, nullptr, &m_sharedImage));
}
{ // Allocate and bind memory
VkMemoryRequirements memRequirements{};
vkGetImageMemoryRequirements(m_device, m_sharedImage, &memRequirements);
VkExportMemoryAllocateInfo exportAllocInfo{};
exportAllocInfo.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO;
exportAllocInfo.pNext = nullptr;
exportAllocInfo.handleTypes = handleType;
const MemoryTypeResult memoryTypeResult = findMemoryType(m_context.getPhysicalDevice(), memRequirements.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
CHECK(memoryTypeResult.found);
VkMemoryAllocateInfo memAllocInfo{};
memAllocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
memAllocInfo.pNext = &exportAllocInfo;
memAllocInfo.allocationSize = memRequirements.size;
memAllocInfo.memoryTypeIndex = memoryTypeResult.typeIndex;
m_sharedImageMemorySize = memRequirements.size;
VK_CHECK(vkAllocateMemory(m_device, &memAllocInfo, nullptr, &m_sharedImageMemory));
VK_CHECK(vkBindImageMemory(m_device, m_sharedImage, m_sharedImageMemory, 0));
}
{ // Get memory handle
// vkGetMemoryFdKHR for Linux
auto vkGetMemoryWin32HandleKHRAddr = vkGetInstanceProcAddr(m_context.getInstance(), "vkGetMemoryWin32HandleKHR");
auto vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR(vkGetMemoryWin32HandleKHRAddr);
CHECK(vkGetMemoryWin32HandleKHR);
VkMemoryGetWin32HandleInfoKHR memoryFdInfo{};
memoryFdInfo.sType = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR;
memoryFdInfo.pNext = nullptr;
memoryFdInfo.memory = m_sharedImageMemory;
memoryFdInfo.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT;
VK_CHECK(vkGetMemoryWin32HandleKHR(m_device, &memoryFdInfo, &m_sharedImageMemoryHandle));
}
{ // Create image view
VkImageViewCreateInfo viewCreateInfo{};
viewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
viewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D;
viewCreateInfo.image = m_sharedImage;
viewCreateInfo.format = VK_FORMAT_R8G8B8A8_UNORM;
viewCreateInfo.subresourceRange = VkImageSubresourceRange{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
vkCreateImageView(m_device, &viewCreateInfo, nullptr, &m_sharedImageView);
}
{ // Image layout transform
VkImageMemoryBarrier barrier{};
barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.image = m_sharedImage;
barrier.srcAccessMask = 0;
barrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
barrier.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
barrier.subresourceRange.levelCount = 1;
barrier.subresourceRange.layerCount = 1;
const VkPipelineStageFlags sourceStage = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
const VkPipelineStageFlags destinationStage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
const SingleTimeCommand command = beginSingleTimeCommands(m_context.getGraphicsCommandPool(), m_device);
vkCmdPipelineBarrier(command.commandBuffer, sourceStage, destinationStage, 0, 0, nullptr, 0, nullptr, 1, &barrier);
endSingleTimeCommands(m_context.getGraphicsQueue(), command, m_vulkanCompleteSemaphore);
m_stateIsGLWrite = true;
}
}
| 43.436364 | 170 | 0.787024 | jparimaa |
12582c1c94e65991b001b7c8b821cb886a6f6b74 | 1,715 | cpp | C++ | test/main.cpp | pfeifenheini/cppProjects | c2ffd3e02711af041698ff32a8dd89498f6ee3e5 | [
"MIT"
] | null | null | null | test/main.cpp | pfeifenheini/cppProjects | c2ffd3e02711af041698ff32a8dd89498f6ee3e5 | [
"MIT"
] | null | null | null | test/main.cpp | pfeifenheini/cppProjects | c2ffd3e02711af041698ff32a8dd89498f6ee3e5 | [
"MIT"
] | null | null | null | #include <iostream>
#include <limits>
#include <queue>
#include <math.h>
#include <conio.h>
#include <mingw.thread.h>
#include <mingw.mutex.h>
using namespace std;
int currentNumber = 3;
int primeNumbersPrinted = 0;
int largestPrime = 2;
bool keepWorking = true;
mutex mu_currentNumber, mu_print, mu_keepWorking;
bool isPrime(int n)
{
if(n <= 1) return false;
if(n <= 3) return true;
if(n%2 == 0 || n%3 == 0) return false;
for(int i=5;i*i <= n;i+=6)
{
if(n%i == 0 || n%(i+2) == 0) return false;
}
return true;
}
void calcPrimes(int id)
{
bool working = true;
while(working)
{
mu_currentNumber.lock();
int toCheck = currentNumber;
currentNumber+=2;
mu_currentNumber.unlock();
if(isPrime(toCheck))
{
mu_print.lock();
//cout << toCheck << endl;
primeNumbersPrinted++;
if(toCheck > largestPrime)
largestPrime = toCheck;
mu_print.unlock();
}
mu_keepWorking.lock();
if(!keepWorking)
working = false;
mu_keepWorking.unlock();
}
}
int main()
{
thread t1(calcPrimes,1);
thread t2(calcPrimes,2);
thread t3(calcPrimes,3);
thread t4(calcPrimes,4);
while(true)
{
Sleep(1000);
mu_print.lock();
cout << largestPrime << endl;
if(kbhit())
{
getch();
keepWorking = false;
mu_print.unlock();
break;
}
mu_print.unlock();
}
mu_keepWorking.lock();
keepWorking = false;
mu_keepWorking.unlock();
t1.join();
t2.join();
t3.join();
t4.join();
}
| 18.244681 | 50 | 0.53586 | pfeifenheini |
1258d3e6997db21184b803589765e8df01d77019 | 4,622 | cpp | C++ | api/api_autogen/ui_form_extractor.cpp | nickdiorio/SAM | 4288d4261f4f88f44106867b561b81c2ba480c85 | [
"BSD-3-Clause"
] | null | null | null | api/api_autogen/ui_form_extractor.cpp | nickdiorio/SAM | 4288d4261f4f88f44106867b561b81c2ba480c85 | [
"BSD-3-Clause"
] | null | null | null | api/api_autogen/ui_form_extractor.cpp | nickdiorio/SAM | 4288d4261f4f88f44106867b561b81c2ba480c85 | [
"BSD-3-Clause"
] | null | null | null | #include <stdexcept>
#include <iostream>
#include "ui_form_extractor.h"
#include "equation_extractor.h"
#include "variables.h"
std::unordered_map<std::string, std::unordered_map<std::string, VarValue>> SAM_ui_form_to_defaults;
ui_form_extractor_database SAM_ui_extracted_db;
VarValue ui_form_extractor::get_varvalue(wxInputStream &is, wxString var_name) {
wxTextInputStream in(is, "\n");
VarValue vv;
in.Read8(); // ver
// read default
unsigned char m_type = in.Read8();
if (m_type > 0 && m_type < 4){
int nr = in.Read32();
int nc = in.Read32();
if (nc*nr > 1) {
for (size_t r = 0; r < nr; r++) {
in.ReadLine();
}
// need to do maybe
in.ReadLine();
}
else{
double def;
in.ReadLine().ToDouble(&def);
vv.Set(def);
}
}
// string
else if (m_type == 4){
if (in.Read32() > 0) vv.Set(in.ReadLine());
}
// table
else if (m_type == 5){
in.Read8(); //ver
size_t m = in.Read32();
VarTable vt;
for (size_t j = 0; j<m; j++)
{
std::string entry = in.ReadWord().ToStdString();
vt.Set(entry, get_varvalue(is, entry));
}
vv.Set(vt);
}
// binary
else if (m_type == 6){
size_t len = in.Read32();
for (size_t i = 0; i <len; i++)
in.GetChar();
vv.Set(wxMemoryBuffer());
}
return vv;
}
/// Formatting of UI form txt taken from InputPageData::Read, VarDatabase::Read
void ui_form_extractor::get_eqn_and_callback_script(wxInputStream& is) {
wxTextInputStream in(is, "\n");
for (size_t i = 0; i < 3; i++)
in.ReadLine();
// skipping through UI objects
size_t n = in.Read32();
for (size_t i = 0; i < n; i++){
in.ReadLine(); // type
in.ReadLine(); // space
in.ReadLine(); // visible
size_t m = in.Read32(); // ui objects
for (size_t j = 0; j < m; j++) {
wxString name = in.ReadLine(); // name
int type = in.Read16(); // property type
if (type == 6) {
// STRINGLIST
size_t count = in.Read32();
for (size_t k = 0; k < count; k++)
in.ReadWord();
}
else if (type == 5) {
if (in.Read32() > 0) in.ReadLine();
}
else if (type == 4) {
// COLOR
for (size_t k = 0; k < 4; k++) in.ReadLine();
} else in.ReadLine();
}
}
// save variable names while skipping through variable info
in.ReadLine();
n = in.Read32();
// save variable defaults for each configuration for use in ui script evaluation
for (size_t i = 0; i < n; i++){
std::string name = in.ReadWord().ToStdString();
auto it = SAM_ui_form_to_defaults[ui_form_name].find(name);
if (it != SAM_ui_form_to_defaults[ui_form_name].end())
it->second.Read_text(is);
else{
VarInfo vi;
vi.Read_text(is);
SAM_ui_form_to_defaults[ui_form_name].insert({name, vi.DefaultValue});
}
}
in.ReadLine();
// get equation script
m_eqn_script.clear();
n = in.Read32();
wxString tmp;
if (n > 0)
{
for (size_t i = 0; i < n; i++)
tmp.Append(in.GetChar());
}
m_eqn_script = tmp.ToStdString();
tmp.clear();
m_callback_script.clear();
n = in.Read32();
if (n > 0)
{
for (size_t i = 0; i < n; i++)
tmp.Append(in.GetChar());
}
m_callback_script = tmp.ToStdString();
}
bool ui_form_extractor::extract(std::string file) {
wxFileName ff(file);
// store the lk scripts
wxFFileInputStream is(file, "r");
bool bff = is.IsOk();
if (!bff) return false;
get_eqn_and_callback_script(is);
return true;
}
/// Populates SAM_ui_extracted_db, SAM_ui_form_to_eqn_info, and
bool ui_form_extractor_database::populate_ui_data(std::string ui_path, std::vector<std::string> ui_form_names){
for (size_t i = 0; i < ui_form_names.size(); i++){
std::string ui_name = ui_form_names[i];
ui_form_extractor* ui_fe = SAM_ui_extracted_db.make_entry(ui_name);
bool success = ui_fe->extract(ui_path + ui_name + ".txt");
if (!success){
std::cout << "ui_form_extractor_database error: Cannot open " + ui_name + " file at " + ui_path;
return false;
}
ui_fe->export_eqn_infos();
}
return true;
} | 27.843373 | 111 | 0.539161 | nickdiorio |
125c27c799008c0d6a066b63a3974c7111d448e8 | 4,030 | cpp | C++ | src/bytecode/Operations.cpp | VCrate/bytecode-description | c46f61fda817301b6705bc16654c634dc2c3212d | [
"MIT"
] | 1 | 2018-04-14T14:04:39.000Z | 2018-04-14T14:04:39.000Z | src/bytecode/Operations.cpp | VCrate/bytecode-description | c46f61fda817301b6705bc16654c634dc2c3212d | [
"MIT"
] | null | null | null | src/bytecode/Operations.cpp | VCrate/bytecode-description | c46f61fda817301b6705bc16654c634dc2c3212d | [
"MIT"
] | null | null | null | #include <vcrate/bytecode/Operations.hpp>
#include <map>
#include <iostream>
#include <algorithm>
namespace vcrate { namespace bytecode {
OpDefinition::OpDefinition(std::string const& name, Operations ope, std::vector<ui8> const& args_constraints)
: name(name), ope(ope), args_constraints(args_constraints) {}
ui32 OpDefinition::arg_count() const {
return args_constraints.size();
}
ui8 OpDefinition::value() const {
return static_cast<ui8>(ope);
}
bool OpDefinition::should_be_readable(ui32 arg) const {
return args_constraints[arg] & ArgConstraint::Readable;
}
bool OpDefinition::should_be_writable(ui32 arg) const {
return args_constraints[arg] & ArgConstraint::Writable;
}
bool OpDefinition::should_be_addressable(ui32 arg) const {
return args_constraints[arg] & ArgConstraint::Adressable;
}
const OpDefinition& OpDefinition::get(std::string ope) {
std::transform(std::begin(ope), std::end(ope), std::begin(ope), [] (char c) { return std::toupper(c); });
#define OP(op, cs...) { #op, Operations::op }
static std::map<std::string, Operations> map = {
OP(MOV),
OP(LEA),
OP(SWP),
OP(CMP),
OP(CMPU),
OP(ADD),
OP(ADDF),
OP(SUB),
OP(SUBF),
OP(MOD),
OP(MODF),
OP(MUL),
OP(MULF),
OP(MULU),
OP(DIV),
OP(DIVF),
OP(DIVU),
OP(INC),
OP(INCF),
OP(DEC),
OP(DECF),
OP(ITU),
OP(ITF),
OP(UTF),
OP(UTI),
OP(FTI),
OP(FTU),
OP(AND),
OP(OR),
OP(NOT),
OP(XOR),
OP(SHL),
OP(SHR),
OP(RTL),
OP(RTR),
OP(JMP),
OP(JMPE),
OP(JMPNE),
OP(JMPG),
OP(JMPGE),
OP(CALL),
OP(RET),
OP(HLT),
OP(PUSH),
OP(POP),
OP(ETR),
OP(LVE),
OP(NEW),
OP(DEL),
OP(OUT),
OP(DBG),
OP(DBGU),
OP(DBGF)
};
#undef OP
try {
return get(map.at(ope));
} catch(...) {
std::cerr << "Operation unknown : " << ope << '\n';
throw;
}
}
const OpDefinition& OpDefinition::get(Operations ope) {
#define OP(op, cs...) { Operations::op, OpDefinition(#op, Operations::op, cs) }
constexpr ui8 R = ArgConstraint::Readable;
constexpr ui8 W = ArgConstraint::Writable;
constexpr ui8 A = ArgConstraint::Adressable;
constexpr ui8 RW = R | W;
static std::map<Operations, OpDefinition> def = {
OP(MOV, {W, R}),
OP(LEA, {W, A}),
OP(SWP, {RW, RW}),
OP(CMP, {R, R}),
OP(CMPU, {R, R}),
OP(ADD, {RW, R}),
OP(ADDF, {RW, R}),
OP(SUB, {RW, R}),
OP(SUBF, {RW, R}),
OP(MOD, {RW, R}),
OP(MODF, {RW, R}),
OP(MUL, {RW, R}),
OP(MULF, {RW, R}),
OP(MULU, {RW, R}),
OP(DIV, {RW, R}),
OP(DIVF, {RW, R}),
OP(DIVU, {RW, R}),
OP(INC, {RW}),
OP(INCF, {RW}),
OP(DEC, {RW}),
OP(DECF, {RW}),
OP(ITU, {RW}),
OP(ITF, {RW}),
OP(UTF, {RW}),
OP(UTI, {RW}),
OP(FTI, {RW}),
OP(FTU, {RW}),
OP(AND, {RW, R}),
OP(OR, {RW, R}),
OP(NOT, {RW}),
OP(XOR, {RW, R}),
OP(SHL, {RW, R}),
OP(SHR, {RW, R}),
OP(RTL, {RW, R}),
OP(RTR, {RW, R}),
OP(JMP, {R}),
OP(JMPE, {R}),
OP(JMPNE, {R}),
OP(JMPG, {R}),
OP(JMPGE, {R}),
OP(CALL, {R}),
OP(RET, {}),
OP(HLT, {}),
OP(PUSH, {R}),
OP(POP, {W}),
OP(ETR, {}),
OP(LVE, {}),
OP(NEW, {W, R}),
OP(DEL, {R}),
OP(OUT, {R}),
OP(DBG, {R}),
OP(DBGU, {R}),
OP(DBGF, {R})
};
#undef OP
try {
return def.at(ope);
} catch(...) {
std::cerr << "Operation unknown : " << static_cast<ui32>(ope) << '\n';
throw;
}
}
}} | 20.880829 | 109 | 0.462283 | VCrate |
12645efe5abc3ec5e7901c8a298ddce811069738 | 31,072 | cpp | C++ | export/windows/cpp/obj/src/flixel/input/FlxKeyManager.cpp | TinyPlanetStudios/Project-Crash-Land | 365f196be4212602d32251566f26b53fb70693f6 | [
"MIT"
] | null | null | null | export/windows/cpp/obj/src/flixel/input/FlxKeyManager.cpp | TinyPlanetStudios/Project-Crash-Land | 365f196be4212602d32251566f26b53fb70693f6 | [
"MIT"
] | null | null | null | export/windows/cpp/obj/src/flixel/input/FlxKeyManager.cpp | TinyPlanetStudios/Project-Crash-Land | 365f196be4212602d32251566f26b53fb70693f6 | [
"MIT"
] | null | null | null | // Generated by Haxe 3.3.0
#include <hxcpp.h>
#ifndef INCLUDED_Type
#include <Type.h>
#endif
#ifndef INCLUDED_flixel_input_FlxBaseKeyList
#include <flixel/input/FlxBaseKeyList.h>
#endif
#ifndef INCLUDED_flixel_input_FlxInput
#include <flixel/input/FlxInput.h>
#endif
#ifndef INCLUDED_flixel_input_FlxKeyManager
#include <flixel/input/FlxKeyManager.h>
#endif
#ifndef INCLUDED_flixel_input_IFlxInput
#include <flixel/input/IFlxInput.h>
#endif
#ifndef INCLUDED_flixel_input_IFlxInputManager
#include <flixel/input/IFlxInputManager.h>
#endif
#ifndef INCLUDED_flixel_util_IFlxDestroyable
#include <flixel/util/IFlxDestroyable.h>
#endif
#ifndef INCLUDED_haxe_IMap
#include <haxe/IMap.h>
#endif
#ifndef INCLUDED_haxe_ds_IntMap
#include <haxe/ds/IntMap.h>
#endif
#ifndef INCLUDED_openfl__legacy_Lib
#include <openfl/_legacy/Lib.h>
#endif
#ifndef INCLUDED_openfl__legacy_display_DisplayObject
#include <openfl/_legacy/display/DisplayObject.h>
#endif
#ifndef INCLUDED_openfl__legacy_display_DisplayObjectContainer
#include <openfl/_legacy/display/DisplayObjectContainer.h>
#endif
#ifndef INCLUDED_openfl__legacy_display_IBitmapDrawable
#include <openfl/_legacy/display/IBitmapDrawable.h>
#endif
#ifndef INCLUDED_openfl__legacy_display_InteractiveObject
#include <openfl/_legacy/display/InteractiveObject.h>
#endif
#ifndef INCLUDED_openfl__legacy_display_MovieClip
#include <openfl/_legacy/display/MovieClip.h>
#endif
#ifndef INCLUDED_openfl__legacy_display_Sprite
#include <openfl/_legacy/display/Sprite.h>
#endif
#ifndef INCLUDED_openfl__legacy_display_Stage
#include <openfl/_legacy/display/Stage.h>
#endif
#ifndef INCLUDED_openfl__legacy_events_Event
#include <openfl/_legacy/events/Event.h>
#endif
#ifndef INCLUDED_openfl__legacy_events_EventDispatcher
#include <openfl/_legacy/events/EventDispatcher.h>
#endif
#ifndef INCLUDED_openfl__legacy_events_IEventDispatcher
#include <openfl/_legacy/events/IEventDispatcher.h>
#endif
#ifndef INCLUDED_openfl__legacy_events_KeyboardEvent
#include <openfl/_legacy/events/KeyboardEvent.h>
#endif
namespace flixel{
namespace input{
void FlxKeyManager_obj::__construct(hx::Class keyListClass){
HX_STACK_FRAME("flixel.input.FlxKeyManager","new",0x4637a4fc,"flixel.input.FlxKeyManager.new","flixel/input/FlxKeyManager.hx",7,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(keyListClass,"keyListClass")
HXLINE( 40) this->_keyListMap = ::haxe::ds::IntMap_obj::__new();
HXLINE( 36) this->_keyListArray = ::Array_obj< ::Dynamic>::__new(0);
HXLINE( 18) this->preventDefaultKeys = ::cpp::VirtualArray_obj::__new(0);
HXLINE( 12) this->enabled = true;
HXLINE( 198) ::openfl::_legacy::Lib_obj::get_current()->get_stage()->addEventListener(::openfl::_legacy::events::KeyboardEvent_obj::KEY_DOWN,this->onKeyDown_dyn(),null(),null(),null());
HXLINE( 199) ::openfl::_legacy::Lib_obj::get_current()->get_stage()->addEventListener(::openfl::_legacy::events::KeyboardEvent_obj::KEY_UP,this->onKeyUp_dyn(),null(),null(),null());
HXLINE( 201) this->pressed = ::Type_obj::createInstance(keyListClass,::cpp::VirtualArray_obj::__new(2)->init(0,(int)1)->init(1,hx::ObjectPtr<OBJ_>(this)));
HXLINE( 202) this->justPressed = ::Type_obj::createInstance(keyListClass,::cpp::VirtualArray_obj::__new(2)->init(0,(int)2)->init(1,hx::ObjectPtr<OBJ_>(this)));
HXLINE( 203) this->justReleased = ::Type_obj::createInstance(keyListClass,::cpp::VirtualArray_obj::__new(2)->init(0,(int)-1)->init(1,hx::ObjectPtr<OBJ_>(this)));
}
Dynamic FlxKeyManager_obj::__CreateEmpty() { return new FlxKeyManager_obj; }
hx::ObjectPtr< FlxKeyManager_obj > FlxKeyManager_obj::__new(hx::Class keyListClass)
{
hx::ObjectPtr< FlxKeyManager_obj > _hx_result = new FlxKeyManager_obj();
_hx_result->__construct(keyListClass);
return _hx_result;
}
Dynamic FlxKeyManager_obj::__Create(hx::DynamicArray inArgs)
{
hx::ObjectPtr< FlxKeyManager_obj > _hx_result = new FlxKeyManager_obj();
_hx_result->__construct(inArgs[0]);
return _hx_result;
}
static ::flixel::input::IFlxInputManager_obj _hx_flixel_input_FlxKeyManager__hx_flixel_input_IFlxInputManager= {
( void (hx::Object::*)())&::flixel::input::FlxKeyManager_obj::reset,
( void (hx::Object::*)())&::flixel::input::FlxKeyManager_obj::update,
( void (hx::Object::*)())&::flixel::input::FlxKeyManager_obj::onFocus,
( void (hx::Object::*)())&::flixel::input::FlxKeyManager_obj::onFocusLost,
( void (hx::Object::*)())&::flixel::input::FlxKeyManager_obj::destroy,
};
static ::flixel::util::IFlxDestroyable_obj _hx_flixel_input_FlxKeyManager__hx_flixel_util_IFlxDestroyable= {
( void (hx::Object::*)())&::flixel::input::FlxKeyManager_obj::destroy,
};
void *FlxKeyManager_obj::_hx_getInterface(int inHash) {
switch(inHash) {
case (int)0x65dd217a: return &_hx_flixel_input_FlxKeyManager__hx_flixel_input_IFlxInputManager;
case (int)0xd4fe2fcd: return &_hx_flixel_input_FlxKeyManager__hx_flixel_util_IFlxDestroyable;
}
#ifdef HXCPP_SCRIPTABLE
return super::_hx_getInterface(inHash);
#else
return 0;
#endif
}
Bool FlxKeyManager_obj::anyPressed(::cpp::VirtualArray KeyArray){
HX_STACK_FRAME("flixel.input.FlxKeyManager","anyPressed",0xbdbeabfa,"flixel.input.FlxKeyManager.anyPressed","flixel/input/FlxKeyManager.hx",50,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyArray,"KeyArray")
HXLINE( 50) return this->checkKeyArrayState(KeyArray,(int)1);
}
HX_DEFINE_DYNAMIC_FUNC1(FlxKeyManager_obj,anyPressed,return )
Bool FlxKeyManager_obj::anyJustPressed(::cpp::VirtualArray KeyArray){
HX_STACK_FRAME("flixel.input.FlxKeyManager","anyJustPressed",0x4d22732e,"flixel.input.FlxKeyManager.anyJustPressed","flixel/input/FlxKeyManager.hx",61,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyArray,"KeyArray")
HXLINE( 61) return this->checkKeyArrayState(KeyArray,(int)2);
}
HX_DEFINE_DYNAMIC_FUNC1(FlxKeyManager_obj,anyJustPressed,return )
Bool FlxKeyManager_obj::anyJustReleased(::cpp::VirtualArray KeyArray){
HX_STACK_FRAME("flixel.input.FlxKeyManager","anyJustReleased",0x37d862b1,"flixel.input.FlxKeyManager.anyJustReleased","flixel/input/FlxKeyManager.hx",72,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyArray,"KeyArray")
HXLINE( 72) return this->checkKeyArrayState(KeyArray,(int)-1);
}
HX_DEFINE_DYNAMIC_FUNC1(FlxKeyManager_obj,anyJustReleased,return )
Int FlxKeyManager_obj::firstPressed(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","firstPressed",0xa191a036,"flixel.input.FlxKeyManager.firstPressed","flixel/input/FlxKeyManager.hx",81,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 82) {
HXLINE( 82) HX_VARI( Int,_g) = (int)0;
HXDLIN( 82) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_keyListArray;
HXDLIN( 82) while((_g < _g1->length)){
HXLINE( 82) HX_VARI( ::flixel::input::FlxInput,key) = _g1->__get(_g).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 82) ++_g;
HXLINE( 84) Bool _hx_tmp;
HXDLIN( 84) Bool _hx_tmp1 = hx::IsNotNull( key );
HXDLIN( 84) if (_hx_tmp1) {
HXLINE( 84) if ((key->current != (int)1)) {
HXLINE( 84) _hx_tmp = (key->current == (int)2);
}
else {
HXLINE( 84) _hx_tmp = true;
}
}
else {
HXLINE( 84) _hx_tmp = false;
}
HXDLIN( 84) if (_hx_tmp) {
HXLINE( 86) return key->ID;
}
}
}
HXLINE( 89) return (int)-1;
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,firstPressed,return )
Int FlxKeyManager_obj::firstJustPressed(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","firstJustPressed",0xd38a356a,"flixel.input.FlxKeyManager.firstJustPressed","flixel/input/FlxKeyManager.hx",98,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 99) {
HXLINE( 99) HX_VARI( Int,_g) = (int)0;
HXDLIN( 99) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_keyListArray;
HXDLIN( 99) while((_g < _g1->length)){
HXLINE( 99) HX_VARI( ::flixel::input::FlxInput,key) = _g1->__get(_g).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 99) ++_g;
HXLINE( 101) Bool _hx_tmp;
HXDLIN( 101) Bool _hx_tmp1 = hx::IsNotNull( key );
HXDLIN( 101) if (_hx_tmp1) {
HXLINE( 101) _hx_tmp = (key->current == (int)2);
}
else {
HXLINE( 101) _hx_tmp = false;
}
HXDLIN( 101) if (_hx_tmp) {
HXLINE( 103) return key->ID;
}
}
}
HXLINE( 106) return (int)-1;
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,firstJustPressed,return )
Int FlxKeyManager_obj::firstJustReleased(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","firstJustReleased",0x4c3a94f5,"flixel.input.FlxKeyManager.firstJustReleased","flixel/input/FlxKeyManager.hx",115,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 116) {
HXLINE( 116) HX_VARI( Int,_g) = (int)0;
HXDLIN( 116) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_keyListArray;
HXDLIN( 116) while((_g < _g1->length)){
HXLINE( 116) HX_VARI( ::flixel::input::FlxInput,key) = _g1->__get(_g).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 116) ++_g;
HXLINE( 118) Bool _hx_tmp;
HXDLIN( 118) Bool _hx_tmp1 = hx::IsNotNull( key );
HXDLIN( 118) if (_hx_tmp1) {
HXLINE( 118) _hx_tmp = (key->current == (int)-1);
}
else {
HXLINE( 118) _hx_tmp = false;
}
HXDLIN( 118) if (_hx_tmp) {
HXLINE( 120) return key->ID;
}
}
}
HXLINE( 123) return (int)-1;
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,firstJustReleased,return )
Bool FlxKeyManager_obj::checkStatus( ::Dynamic KeyCode,Int Status){
HX_STACK_FRAME("flixel.input.FlxKeyManager","checkStatus",0xbf018ab6,"flixel.input.FlxKeyManager.checkStatus","flixel/input/FlxKeyManager.hx",134,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyCode,"KeyCode")
HX_STACK_ARG(Status,"Status")
HXLINE( 135) HX_VARI( ::flixel::input::FlxInput,key) = this->_keyListMap->get(KeyCode).StaticCast< ::flixel::input::FlxInput >();
HXLINE( 137) Bool _hx_tmp = hx::IsNotNull( key );
HXDLIN( 137) if (_hx_tmp) {
HXLINE( 139) Bool _hx_tmp1 = key->hasState(Status);
HXDLIN( 139) if (_hx_tmp1) {
HXLINE( 141) return true;
}
}
HXLINE( 151) return false;
}
HX_DEFINE_DYNAMIC_FUNC2(FlxKeyManager_obj,checkStatus,return )
::Array< ::Dynamic> FlxKeyManager_obj::getIsDown(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","getIsDown",0x4bba783e,"flixel.input.FlxKeyManager.getIsDown","flixel/input/FlxKeyManager.hx",160,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 161) HX_VARI( ::Array< ::Dynamic>,keysDown) = ::Array_obj< ::Dynamic>::__new();
HXLINE( 163) {
HXLINE( 163) HX_VARI( Int,_g) = (int)0;
HXDLIN( 163) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_keyListArray;
HXDLIN( 163) while((_g < _g1->length)){
HXLINE( 163) HX_VARI( ::flixel::input::FlxInput,key) = _g1->__get(_g).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 163) ++_g;
HXLINE( 165) Bool _hx_tmp;
HXDLIN( 165) Bool _hx_tmp1 = hx::IsNotNull( key );
HXDLIN( 165) if (_hx_tmp1) {
HXLINE( 165) if ((key->current != (int)1)) {
HXLINE( 165) _hx_tmp = (key->current == (int)2);
}
else {
HXLINE( 165) _hx_tmp = true;
}
}
else {
HXLINE( 165) _hx_tmp = false;
}
HXDLIN( 165) if (_hx_tmp) {
HXLINE( 167) keysDown->push(key);
}
}
}
HXLINE( 170) return keysDown;
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,getIsDown,return )
void FlxKeyManager_obj::destroy(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","destroy",0x5d667f96,"flixel.input.FlxKeyManager.destroy","flixel/input/FlxKeyManager.hx",177,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 178) this->_keyListArray = null();
HXLINE( 179) this->_keyListMap = null();
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,destroy,(void))
void FlxKeyManager_obj::reset(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","reset",0x4cbf7d6b,"flixel.input.FlxKeyManager.reset","flixel/input/FlxKeyManager.hx",187,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 187) HX_VARI( Int,_g) = (int)0;
HXDLIN( 187) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_keyListArray;
HXDLIN( 187) while((_g < _g1->length)){
HXLINE( 187) HX_VARI( ::flixel::input::FlxInput,key) = _g1->__get(_g).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 187) ++_g;
HXLINE( 189) Bool _hx_tmp = hx::IsNotNull( key );
HXDLIN( 189) if (_hx_tmp) {
HXLINE( 191) key->release();
}
}
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,reset,(void))
void FlxKeyManager_obj::update(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","update",0x595b7aed,"flixel.input.FlxKeyManager.update","flixel/input/FlxKeyManager.hx",211,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 211) HX_VARI( Int,_g) = (int)0;
HXDLIN( 211) HX_VARI( ::Array< ::Dynamic>,_g1) = this->_keyListArray;
HXDLIN( 211) while((_g < _g1->length)){
HXLINE( 211) HX_VARI( ::flixel::input::FlxInput,key) = _g1->__get(_g).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 211) ++_g;
HXLINE( 213) Bool _hx_tmp = hx::IsNotNull( key );
HXDLIN( 213) if (_hx_tmp) {
HXLINE( 215) key->update();
}
}
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,update,(void))
Bool FlxKeyManager_obj::checkKeyArrayState(::cpp::VirtualArray KeyArray,Int State){
HX_STACK_FRAME("flixel.input.FlxKeyManager","checkKeyArrayState",0xb44c8d33,"flixel.input.FlxKeyManager.checkKeyArrayState","flixel/input/FlxKeyManager.hx",228,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyArray,"KeyArray")
HX_STACK_ARG(State,"State")
HXLINE( 229) Bool _hx_tmp = hx::IsNull( KeyArray );
HXDLIN( 229) if (_hx_tmp) {
HXLINE( 231) return false;
}
HXLINE( 234) {
HXLINE( 234) HX_VARI( Int,_g) = (int)0;
HXDLIN( 234) while((_g < KeyArray->get_length())){
HXLINE( 234) HX_VARI( ::Dynamic,code) = KeyArray->__get(_g);
HXDLIN( 234) ++_g;
HXLINE( 236) HX_VARI( ::flixel::input::FlxInput,key) = this->_keyListMap->get(code).StaticCast< ::flixel::input::FlxInput >();
HXLINE( 238) Bool _hx_tmp1 = hx::IsNotNull( key );
HXDLIN( 238) if (_hx_tmp1) {
HXLINE( 240) Bool _hx_tmp2 = key->hasState(State);
HXDLIN( 240) if (_hx_tmp2) {
HXLINE( 242) return true;
}
}
}
}
HXLINE( 247) return false;
}
HX_DEFINE_DYNAMIC_FUNC2(FlxKeyManager_obj,checkKeyArrayState,return )
void FlxKeyManager_obj::onKeyUp( ::openfl::_legacy::events::KeyboardEvent event){
HX_STACK_FRAME("flixel.input.FlxKeyManager","onKeyUp",0xae1caad7,"flixel.input.FlxKeyManager.onKeyUp","flixel/input/FlxKeyManager.hx",254,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(event,"event")
HXLINE( 255) HX_VARI( Int,c) = this->resolveKeyCode(event);
HXLINE( 256) this->handlePreventDefaultKeys(c,event);
HXLINE( 258) Bool _hx_tmp = this->enabled;
HXDLIN( 258) if (_hx_tmp) {
HXLINE( 260) HX_VARI( ::flixel::input::FlxInput,key) = this->_keyListMap->get(c).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 260) Bool _hx_tmp1 = hx::IsNotNull( key );
HXDLIN( 260) if (_hx_tmp1) {
HXLINE( 260) key->release();
}
}
}
HX_DEFINE_DYNAMIC_FUNC1(FlxKeyManager_obj,onKeyUp,(void))
void FlxKeyManager_obj::onKeyDown( ::openfl::_legacy::events::KeyboardEvent event){
HX_STACK_FRAME("flixel.input.FlxKeyManager","onKeyDown",0xe38153de,"flixel.input.FlxKeyManager.onKeyDown","flixel/input/FlxKeyManager.hx",268,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(event,"event")
HXLINE( 269) HX_VARI( Int,c) = this->resolveKeyCode(event);
HXLINE( 270) this->handlePreventDefaultKeys(c,event);
HXLINE( 272) Bool _hx_tmp = this->enabled;
HXDLIN( 272) if (_hx_tmp) {
HXLINE( 274) HX_VARI( ::flixel::input::FlxInput,key) = this->_keyListMap->get(c).StaticCast< ::flixel::input::FlxInput >();
HXDLIN( 274) Bool _hx_tmp1 = hx::IsNotNull( key );
HXDLIN( 274) if (_hx_tmp1) {
HXLINE( 274) key->press();
}
}
}
HX_DEFINE_DYNAMIC_FUNC1(FlxKeyManager_obj,onKeyDown,(void))
void FlxKeyManager_obj::handlePreventDefaultKeys(Int keyCode, ::openfl::_legacy::events::KeyboardEvent event){
HX_STACK_FRAME("flixel.input.FlxKeyManager","handlePreventDefaultKeys",0x60508309,"flixel.input.FlxKeyManager.handlePreventDefaultKeys","flixel/input/FlxKeyManager.hx",279,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(keyCode,"keyCode")
HX_STACK_ARG(event,"event")
HXLINE( 280) HX_VARI( ::flixel::input::FlxInput,key) = this->_keyListMap->get(keyCode).StaticCast< ::flixel::input::FlxInput >();
HXLINE( 281) Bool _hx_tmp;
HXDLIN( 281) Bool _hx_tmp1;
HXDLIN( 281) Bool _hx_tmp2 = hx::IsNotNull( key );
HXDLIN( 281) if (_hx_tmp2) {
HXLINE( 281) _hx_tmp1 = hx::IsNotNull( this->preventDefaultKeys );
}
else {
HXLINE( 281) _hx_tmp1 = false;
}
HXDLIN( 281) if (_hx_tmp1) {
HXLINE( 281) Int _hx_tmp3 = this->preventDefaultKeys->indexOf(key->ID,null());
HXDLIN( 281) _hx_tmp = (_hx_tmp3 != (int)-1);
}
else {
HXLINE( 281) _hx_tmp = false;
}
HXDLIN( 281) if (_hx_tmp) {
HXLINE( 283) event->stopImmediatePropagation();
HXLINE( 284) event->stopPropagation();
}
}
HX_DEFINE_DYNAMIC_FUNC2(FlxKeyManager_obj,handlePreventDefaultKeys,(void))
Bool FlxKeyManager_obj::inKeyArray(::cpp::VirtualArray KeyArray, ::Dynamic Key){
HX_STACK_FRAME("flixel.input.FlxKeyManager","inKeyArray",0xf3ad4f63,"flixel.input.FlxKeyManager.inKeyArray","flixel/input/FlxKeyManager.hx",293,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyArray,"KeyArray")
HX_STACK_ARG(Key,"Key")
HXLINE( 294) Bool _hx_tmp = hx::IsNull( KeyArray );
HXDLIN( 294) if (_hx_tmp) {
HXLINE( 296) return false;
}
else {
HXLINE( 300) HX_VARI( Int,_g) = (int)0;
HXDLIN( 300) while((_g < KeyArray->get_length())){
HXLINE( 300) HX_VARI( ::Dynamic,key) = KeyArray->__get(_g);
HXDLIN( 300) ++_g;
HXLINE( 302) Bool _hx_tmp1;
HXDLIN( 302) if (hx::IsNotEq( key,Key )) {
HXLINE( 302) _hx_tmp1 = hx::IsEq( key,(int)-2 );
}
else {
HXLINE( 302) _hx_tmp1 = true;
}
HXDLIN( 302) if (_hx_tmp1) {
HXLINE( 304) return true;
}
}
}
HXLINE( 308) return false;
}
HX_DEFINE_DYNAMIC_FUNC2(FlxKeyManager_obj,inKeyArray,return )
Int FlxKeyManager_obj::resolveKeyCode( ::openfl::_legacy::events::KeyboardEvent e){
HX_STACK_FRAME("flixel.input.FlxKeyManager","resolveKeyCode",0x9a8225c4,"flixel.input.FlxKeyManager.resolveKeyCode","flixel/input/FlxKeyManager.hx",313,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(e,"e")
HXLINE( 313) return e->keyCode;
}
HX_DEFINE_DYNAMIC_FUNC1(FlxKeyManager_obj,resolveKeyCode,return )
void FlxKeyManager_obj::updateKeyStates(Int KeyCode,Bool Down){
HX_STACK_FRAME("flixel.input.FlxKeyManager","updateKeyStates",0xe52c7794,"flixel.input.FlxKeyManager.updateKeyStates","flixel/input/FlxKeyManager.hx",320,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyCode,"KeyCode")
HX_STACK_ARG(Down,"Down")
HXLINE( 321) HX_VARI( ::flixel::input::FlxInput,key) = this->_keyListMap->get(KeyCode).StaticCast< ::flixel::input::FlxInput >();
HXLINE( 323) Bool _hx_tmp = hx::IsNotNull( key );
HXDLIN( 323) if (_hx_tmp) {
HXLINE( 325) if (Down) {
HXLINE( 327) key->press();
}
else {
HXLINE( 331) key->release();
}
}
}
HX_DEFINE_DYNAMIC_FUNC2(FlxKeyManager_obj,updateKeyStates,(void))
void FlxKeyManager_obj::onFocus(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","onFocus",0xd3a750d5,"flixel.input.FlxKeyManager.onFocus","flixel/input/FlxKeyManager.hx",336,0xfedfa8b6)
HX_STACK_THIS(this)
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,onFocus,(void))
void FlxKeyManager_obj::onFocusLost(){
HX_STACK_FRAME("flixel.input.FlxKeyManager","onFocusLost",0x1879b559,"flixel.input.FlxKeyManager.onFocusLost","flixel/input/FlxKeyManager.hx",340,0xfedfa8b6)
HX_STACK_THIS(this)
HXLINE( 340) this->reset();
}
HX_DEFINE_DYNAMIC_FUNC0(FlxKeyManager_obj,onFocusLost,(void))
::flixel::input::FlxInput FlxKeyManager_obj::getKey(Int KeyCode){
HX_STACK_FRAME("flixel.input.FlxKeyManager","getKey",0x7576b78d,"flixel.input.FlxKeyManager.getKey","flixel/input/FlxKeyManager.hx",348,0xfedfa8b6)
HX_STACK_THIS(this)
HX_STACK_ARG(KeyCode,"KeyCode")
HXLINE( 348) return this->_keyListMap->get(KeyCode).StaticCast< ::flixel::input::FlxInput >();
}
HX_DEFINE_DYNAMIC_FUNC1(FlxKeyManager_obj,getKey,return )
FlxKeyManager_obj::FlxKeyManager_obj()
{
}
void FlxKeyManager_obj::__Mark(HX_MARK_PARAMS)
{
HX_MARK_BEGIN_CLASS(FlxKeyManager);
HX_MARK_MEMBER_NAME(enabled,"enabled");
HX_MARK_MEMBER_NAME(preventDefaultKeys,"preventDefaultKeys");
HX_MARK_MEMBER_NAME(pressed,"pressed");
HX_MARK_MEMBER_NAME(justPressed,"justPressed");
HX_MARK_MEMBER_NAME(justReleased,"justReleased");
HX_MARK_MEMBER_NAME(_keyListArray,"_keyListArray");
HX_MARK_MEMBER_NAME(_keyListMap,"_keyListMap");
HX_MARK_END_CLASS();
}
void FlxKeyManager_obj::__Visit(HX_VISIT_PARAMS)
{
HX_VISIT_MEMBER_NAME(enabled,"enabled");
HX_VISIT_MEMBER_NAME(preventDefaultKeys,"preventDefaultKeys");
HX_VISIT_MEMBER_NAME(pressed,"pressed");
HX_VISIT_MEMBER_NAME(justPressed,"justPressed");
HX_VISIT_MEMBER_NAME(justReleased,"justReleased");
HX_VISIT_MEMBER_NAME(_keyListArray,"_keyListArray");
HX_VISIT_MEMBER_NAME(_keyListMap,"_keyListMap");
}
hx::Val FlxKeyManager_obj::__Field(const ::String &inName,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 5:
if (HX_FIELD_EQ(inName,"reset") ) { return hx::Val( reset_dyn()); }
break;
case 6:
if (HX_FIELD_EQ(inName,"update") ) { return hx::Val( update_dyn()); }
if (HX_FIELD_EQ(inName,"getKey") ) { return hx::Val( getKey_dyn()); }
break;
case 7:
if (HX_FIELD_EQ(inName,"enabled") ) { return hx::Val( enabled); }
if (HX_FIELD_EQ(inName,"pressed") ) { return hx::Val( pressed); }
if (HX_FIELD_EQ(inName,"destroy") ) { return hx::Val( destroy_dyn()); }
if (HX_FIELD_EQ(inName,"onKeyUp") ) { return hx::Val( onKeyUp_dyn()); }
if (HX_FIELD_EQ(inName,"onFocus") ) { return hx::Val( onFocus_dyn()); }
break;
case 9:
if (HX_FIELD_EQ(inName,"getIsDown") ) { return hx::Val( getIsDown_dyn()); }
if (HX_FIELD_EQ(inName,"onKeyDown") ) { return hx::Val( onKeyDown_dyn()); }
break;
case 10:
if (HX_FIELD_EQ(inName,"anyPressed") ) { return hx::Val( anyPressed_dyn()); }
if (HX_FIELD_EQ(inName,"inKeyArray") ) { return hx::Val( inKeyArray_dyn()); }
break;
case 11:
if (HX_FIELD_EQ(inName,"justPressed") ) { return hx::Val( justPressed); }
if (HX_FIELD_EQ(inName,"_keyListMap") ) { return hx::Val( _keyListMap); }
if (HX_FIELD_EQ(inName,"checkStatus") ) { return hx::Val( checkStatus_dyn()); }
if (HX_FIELD_EQ(inName,"onFocusLost") ) { return hx::Val( onFocusLost_dyn()); }
break;
case 12:
if (HX_FIELD_EQ(inName,"justReleased") ) { return hx::Val( justReleased); }
if (HX_FIELD_EQ(inName,"firstPressed") ) { return hx::Val( firstPressed_dyn()); }
break;
case 13:
if (HX_FIELD_EQ(inName,"_keyListArray") ) { return hx::Val( _keyListArray); }
break;
case 14:
if (HX_FIELD_EQ(inName,"anyJustPressed") ) { return hx::Val( anyJustPressed_dyn()); }
if (HX_FIELD_EQ(inName,"resolveKeyCode") ) { return hx::Val( resolveKeyCode_dyn()); }
break;
case 15:
if (HX_FIELD_EQ(inName,"anyJustReleased") ) { return hx::Val( anyJustReleased_dyn()); }
if (HX_FIELD_EQ(inName,"updateKeyStates") ) { return hx::Val( updateKeyStates_dyn()); }
break;
case 16:
if (HX_FIELD_EQ(inName,"firstJustPressed") ) { return hx::Val( firstJustPressed_dyn()); }
break;
case 17:
if (HX_FIELD_EQ(inName,"firstJustReleased") ) { return hx::Val( firstJustReleased_dyn()); }
break;
case 18:
if (HX_FIELD_EQ(inName,"preventDefaultKeys") ) { return hx::Val( preventDefaultKeys); }
if (HX_FIELD_EQ(inName,"checkKeyArrayState") ) { return hx::Val( checkKeyArrayState_dyn()); }
break;
case 24:
if (HX_FIELD_EQ(inName,"handlePreventDefaultKeys") ) { return hx::Val( handlePreventDefaultKeys_dyn()); }
}
return super::__Field(inName,inCallProp);
}
hx::Val FlxKeyManager_obj::__SetField(const ::String &inName,const hx::Val &inValue,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 7:
if (HX_FIELD_EQ(inName,"enabled") ) { enabled=inValue.Cast< Bool >(); return inValue; }
if (HX_FIELD_EQ(inName,"pressed") ) { pressed=inValue.Cast< ::Dynamic >(); return inValue; }
break;
case 11:
if (HX_FIELD_EQ(inName,"justPressed") ) { justPressed=inValue.Cast< ::Dynamic >(); return inValue; }
if (HX_FIELD_EQ(inName,"_keyListMap") ) { _keyListMap=inValue.Cast< ::haxe::ds::IntMap >(); return inValue; }
break;
case 12:
if (HX_FIELD_EQ(inName,"justReleased") ) { justReleased=inValue.Cast< ::Dynamic >(); return inValue; }
break;
case 13:
if (HX_FIELD_EQ(inName,"_keyListArray") ) { _keyListArray=inValue.Cast< ::Array< ::Dynamic> >(); return inValue; }
break;
case 18:
if (HX_FIELD_EQ(inName,"preventDefaultKeys") ) { preventDefaultKeys=inValue.Cast< ::cpp::VirtualArray >(); return inValue; }
}
return super::__SetField(inName,inValue,inCallProp);
}
void FlxKeyManager_obj::__GetFields(Array< ::String> &outFields)
{
outFields->push(HX_HCSTRING("enabled","\x81","\x04","\x31","\x7e"));
outFields->push(HX_HCSTRING("preventDefaultKeys","\x5d","\xd3","\x15","\x2d"));
outFields->push(HX_HCSTRING("pressed","\xa2","\xd2","\xe6","\x39"));
outFields->push(HX_HCSTRING("justPressed","\xd6","\x0d","\xa7","\xf2"));
outFields->push(HX_HCSTRING("justReleased","\x09","\x1b","\x5b","\x66"));
outFields->push(HX_HCSTRING("_keyListArray","\x9b","\x69","\x07","\xf6"));
outFields->push(HX_HCSTRING("_keyListMap","\x1e","\xa2","\x94","\x4b"));
super::__GetFields(outFields);
};
#if HXCPP_SCRIPTABLE
static hx::StorageInfo FlxKeyManager_obj_sMemberStorageInfo[] = {
{hx::fsBool,(int)offsetof(FlxKeyManager_obj,enabled),HX_HCSTRING("enabled","\x81","\x04","\x31","\x7e")},
{hx::fsObject /*cpp::ArrayBase*/ ,(int)offsetof(FlxKeyManager_obj,preventDefaultKeys),HX_HCSTRING("preventDefaultKeys","\x5d","\xd3","\x15","\x2d")},
{hx::fsObject /*Dynamic*/ ,(int)offsetof(FlxKeyManager_obj,pressed),HX_HCSTRING("pressed","\xa2","\xd2","\xe6","\x39")},
{hx::fsObject /*Dynamic*/ ,(int)offsetof(FlxKeyManager_obj,justPressed),HX_HCSTRING("justPressed","\xd6","\x0d","\xa7","\xf2")},
{hx::fsObject /*Dynamic*/ ,(int)offsetof(FlxKeyManager_obj,justReleased),HX_HCSTRING("justReleased","\x09","\x1b","\x5b","\x66")},
{hx::fsObject /*Array< ::Dynamic >*/ ,(int)offsetof(FlxKeyManager_obj,_keyListArray),HX_HCSTRING("_keyListArray","\x9b","\x69","\x07","\xf6")},
{hx::fsObject /*::haxe::ds::IntMap*/ ,(int)offsetof(FlxKeyManager_obj,_keyListMap),HX_HCSTRING("_keyListMap","\x1e","\xa2","\x94","\x4b")},
{ hx::fsUnknown, 0, null()}
};
static hx::StaticInfo *FlxKeyManager_obj_sStaticStorageInfo = 0;
#endif
static ::String FlxKeyManager_obj_sMemberFields[] = {
HX_HCSTRING("enabled","\x81","\x04","\x31","\x7e"),
HX_HCSTRING("preventDefaultKeys","\x5d","\xd3","\x15","\x2d"),
HX_HCSTRING("pressed","\xa2","\xd2","\xe6","\x39"),
HX_HCSTRING("justPressed","\xd6","\x0d","\xa7","\xf2"),
HX_HCSTRING("justReleased","\x09","\x1b","\x5b","\x66"),
HX_HCSTRING("_keyListArray","\x9b","\x69","\x07","\xf6"),
HX_HCSTRING("_keyListMap","\x1e","\xa2","\x94","\x4b"),
HX_HCSTRING("anyPressed","\x16","\x75","\x02","\x90"),
HX_HCSTRING("anyJustPressed","\x4a","\xfa","\xb6","\xa6"),
HX_HCSTRING("anyJustReleased","\x15","\x14","\x3a","\x40"),
HX_HCSTRING("firstPressed","\x52","\xe8","\x2e","\x63"),
HX_HCSTRING("firstJustPressed","\x86","\xbb","\xa3","\x20"),
HX_HCSTRING("firstJustReleased","\x59","\x67","\x76","\x75"),
HX_HCSTRING("checkStatus","\x1a","\xba","\x0d","\xe8"),
HX_HCSTRING("getIsDown","\xa2","\x46","\x2b","\xdc"),
HX_HCSTRING("destroy","\xfa","\x2c","\x86","\x24"),
HX_HCSTRING("reset","\xcf","\x49","\xc8","\xe6"),
HX_HCSTRING("update","\x09","\x86","\x05","\x87"),
HX_HCSTRING("checkKeyArrayState","\x4f","\xd2","\x68","\x9f"),
HX_HCSTRING("onKeyUp","\x3b","\x58","\x3c","\x75"),
HX_HCSTRING("onKeyDown","\x42","\x22","\xf2","\x73"),
HX_HCSTRING("handlePreventDefaultKeys","\x25","\x85","\xc7","\x5d"),
HX_HCSTRING("inKeyArray","\x7f","\x18","\xf1","\xc5"),
HX_HCSTRING("resolveKeyCode","\xe0","\xac","\x16","\xf4"),
HX_HCSTRING("updateKeyStates","\xf8","\x28","\x8e","\xed"),
HX_HCSTRING("onFocus","\x39","\xfe","\xc6","\x9a"),
HX_HCSTRING("onFocusLost","\xbd","\xe4","\x85","\x41"),
HX_HCSTRING("getKey","\xa9","\xc2","\x20","\xa3"),
::String(null()) };
static void FlxKeyManager_obj_sMarkStatics(HX_MARK_PARAMS) {
HX_MARK_MEMBER_NAME(FlxKeyManager_obj::__mClass,"__mClass");
};
#ifdef HXCPP_VISIT_ALLOCS
static void FlxKeyManager_obj_sVisitStatics(HX_VISIT_PARAMS) {
HX_VISIT_MEMBER_NAME(FlxKeyManager_obj::__mClass,"__mClass");
};
#endif
hx::Class FlxKeyManager_obj::__mClass;
void FlxKeyManager_obj::__register()
{
hx::Static(__mClass) = new hx::Class_obj();
__mClass->mName = HX_HCSTRING("flixel.input.FlxKeyManager","\x0a","\xb7","\x52","\x80");
__mClass->mSuper = &super::__SGetClass();
__mClass->mConstructEmpty = &__CreateEmpty;
__mClass->mConstructArgs = &__Create;
__mClass->mGetStaticField = &hx::Class_obj::GetNoStaticField;
__mClass->mSetStaticField = &hx::Class_obj::SetNoStaticField;
__mClass->mMarkFunc = FlxKeyManager_obj_sMarkStatics;
__mClass->mStatics = hx::Class_obj::dupFunctions(0 /* sStaticFields */);
__mClass->mMembers = hx::Class_obj::dupFunctions(FlxKeyManager_obj_sMemberFields);
__mClass->mCanCast = hx::TCanCast< FlxKeyManager_obj >;
#ifdef HXCPP_VISIT_ALLOCS
__mClass->mVisitFunc = FlxKeyManager_obj_sVisitStatics;
#endif
#ifdef HXCPP_SCRIPTABLE
__mClass->mMemberStorageInfo = FlxKeyManager_obj_sMemberStorageInfo;
#endif
#ifdef HXCPP_SCRIPTABLE
__mClass->mStaticStorageInfo = FlxKeyManager_obj_sStaticStorageInfo;
#endif
hx::_hx_RegisterClass(__mClass->mName, __mClass);
}
} // end namespace flixel
} // end namespace input
| 41.81965 | 196 | 0.682061 | TinyPlanetStudios |
126ab438d7361207f47319104e8bcae01249b567 | 3,235 | cc | C++ | Online Judge/11439 - Maximizing the ICPC.cc | BrehamPie/Problem-Solves | 055e21ca4922170b80c5a53f43d9216f34b6f642 | [
"CC0-1.0"
] | null | null | null | Online Judge/11439 - Maximizing the ICPC.cc | BrehamPie/Problem-Solves | 055e21ca4922170b80c5a53f43d9216f34b6f642 | [
"CC0-1.0"
] | null | null | null | Online Judge/11439 - Maximizing the ICPC.cc | BrehamPie/Problem-Solves | 055e21ca4922170b80c5a53f43d9216f34b6f642 | [
"CC0-1.0"
] | null | null | null | #include<bits/stdc++.h>
using namespace std;
// Finds Maximum matching in General Graph
// Complexity O(NM)
// source: https://codeforces.com/blog/entry/92339?#comment-810242
using pii = pair<int, int>;
int Blossom(vector<vector<int>>& graph) {
//mate contains matched edge.
int n = graph.size(), timer = -1;
vector<int> mate(n, -1), label(n), parent(n),
orig(n), aux(n, -1), q;
auto lca = [&](int x, int y) {
for (timer++; ; swap(x, y)) {
if (x == -1) continue;
if (aux[x] == timer) return x;
aux[x] = timer;
x = (mate[x] == -1 ? -1 : orig[parent[mate[x]]]);
}
};
auto blossom = [&](int v, int w, int a) {
while (orig[v] != a) {
parent[v] = w; w = mate[v];
if (label[w] == 1) label[w] = 0, q.push_back(w);
orig[v] = orig[w] = a; v = parent[w];
}
};
auto augment = [&](int v) {
while (v != -1) {
int pv = parent[v], nv = mate[pv];
mate[v] = pv; mate[pv] = v; v = nv;
}
};
auto bfs = [&](int root) {
fill(label.begin(), label.end(), -1);
iota(orig.begin(), orig.end(), 0);
q.clear();
label[root] = 0; q.push_back(root);
for (int i = 0; i < (int)q.size(); ++i) {
int v = q[i];
for (auto x : graph[v]) {
if (label[x] == -1) {
label[x] = 1; parent[x] = v;
if (mate[x] == -1)
return augment(x), 1;
label[mate[x]] = 0; q.push_back(mate[x]);
}
else if (label[x] == 0 && orig[v] != orig[x]) {
int a = lca(orig[v], orig[x]);
blossom(x, v, a); blossom(v, x, a);
}
}
}
return 0;
};
// Time halves if you start with (any) maximal matching.
for (int i = 0; i < n; i++)
if (mate[i] == -1)
bfs(i);
int match = 0;
for (int i = 0;i < n;i++) {
if (mate[i] + 1)match++;
}
return match / 2;
}
int main() {
int t;
scanf("%d", &t);
for (int ks = 1;ks <= t;ks++) {
int n;
scanf("%d", &n);
vector<int>a[1 << n];
int total = (1 << n);
vector<vector<pii>>adj(total);
for (int i = 0;i < total - 1;i++) {
for (int j = i + 1;j < total;j++) {
int x;
scanf("%d", &x);
adj[i].push_back({ j,x });
adj[j].push_back({ i,x });
}
}
int hi = 1000000000;
int lo = 0;
int ans = 0;
while (lo <= hi) {
int mid = (hi + lo) / 2;
vector<vector<int>>g(total);
for (int i = 0;i < total;i++) {
for (auto x : adj[i]) {
if (x.second >= mid) {
g[i].push_back(x.first);
}
}
}
int match = Blossom(g);
if (match == (total) / 2) {
ans = mid;
lo = mid + 1;
}
else hi = mid - 1;
}
printf("Case %d: %d\n", ks, ans);
}
} | 30.809524 | 66 | 0.381762 | BrehamPie |
128addfca10e75818526a5d246348437ef027395 | 2,473 | cc | C++ | sandbox/limit.cc | Codu-LLC/sandbox | f78cb0fb8705904ffcda370f3395ca134d5fd87e | [
"MIT"
] | 1 | 2021-02-11T11:10:06.000Z | 2021-02-11T11:10:06.000Z | sandbox/limit.cc | Codu-LLC/sandbox | f78cb0fb8705904ffcda370f3395ca134d5fd87e | [
"MIT"
] | 1 | 2021-02-26T08:20:08.000Z | 2021-02-26T08:44:54.000Z | sandbox/limit.cc | Codu-LLC/sandbox | f78cb0fb8705904ffcda370f3395ca134d5fd87e | [
"MIT"
] | null | null | null | //
// Created by Eugene Junghyun Kim on 1/13/2021.
//
#include "cgroup.h"
#include "limit.h"
#include "sandbox.h"
#include <cmath>
#include <memory>
#include <signal.h>
#include <sys/resource.h>
#include <string>
#include <unistd.h>
#define MB_TO_BYTES(x) ((x) << 20)
#define MILLISECONDS_TO_SECONDS(x) ((x)/1000.)
std::unique_ptr <Cgroup> setup_cgroup(Sandbox *ptr, const std::string &cgroup_name, bool create) {
auto cgroup = std::make_unique<Cgroup>(cgroup_name);
cgroup->add_controller("cpu");
cgroup->add_controller("cpuacct");
cgroup->add_controller("memory");
if (create && !cgroup->setup_cgroup()) {
return nullptr;
}
if (!cgroup->set_property("memory", "limit_in_bytes",
std::to_string(MB_TO_BYTES((int)(ptr->get_memory_limit_in_mb() * 1.1))))) {
return nullptr;
}
if (!cgroup->set_property("cpu", "shares", "512")) {
return nullptr;
}
if (!cgroup->set_property("cpuacct", "usage", "0")) {
return nullptr;
}
return cgroup;
}
static void set_resource_limit(int resource, rlim_t limit) {
struct rlimit rl = {limit, limit};
if (setrlimit(resource, &rl) == -1) {
exit(EXIT_FAILURE);
}
}
void set_sandbox_limit(Sandbox *ptr) {
// Set Maximum file size to FILE_SIZE_LIMIT_IN_MB.
set_resource_limit(RLIMIT_FSIZE, MB_TO_BYTES(ptr->get_file_size_limit_in_mb()));
// TODO(conankun): Change return type to int and return -1 in this case.
// Limit creating core dump files.
set_resource_limit(RLIMIT_CORE, 0);
// Limit sending and receiving message through message queue.
set_resource_limit(RLIMIT_MSGQUEUE, 0);
// Set the limit on the number of open file descriptors.
set_resource_limit(RLIMIT_NOFILE, 100);
// Limit creating another thread or process.
set_resource_limit(RLIMIT_NPROC, 256);
// Limit in Wall time. If process is sleeping, they are not consuming cpu time and thus can block grading system
// from processing future requests. Therefore, there should be an enforcement on wall time
alarm(static_cast<int>(ceil(MILLISECONDS_TO_SECONDS(ptr->get_time_limit_in_ms()))) << 1);
set_resource_limit(
RLIMIT_CPU,
static_cast<int>(ceil(MILLISECONDS_TO_SECONDS(ptr->get_time_limit_in_ms() << 1))));
// Prevent the process from making system calls other than read, write, sigreturn, and exit.
// prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT);
}
| 36.910448 | 116 | 0.680954 | Codu-LLC |
128bf43d9515c6a045c4f7110e5fdf0419481bf8 | 7,571 | hpp | C++ | src/scanner.hpp | ShameekConyers/sicinterpreter | 24d0451436f0af67d24aae987155c3b090aa2fed | [
"MIT"
] | null | null | null | src/scanner.hpp | ShameekConyers/sicinterpreter | 24d0451436f0af67d24aae987155c3b090aa2fed | [
"MIT"
] | null | null | null | src/scanner.hpp | ShameekConyers/sicinterpreter | 24d0451436f0af67d24aae987155c3b090aa2fed | [
"MIT"
] | null | null | null | #pragma once
#include <string>
namespace TokenType
{
enum Any {
// single-char tokens 0
TOKEN_LEFT_PAREN,
TOKEN_RIGHT_PAREN,
TOKEN_LEFT_BRACE,
TOKEN_RIGHT_BRACE,
TOKEN_COMMA,
TOKEN_DOT,
TOKEN_SEMICOLON,
TOKEN_MINUS,
TOKEN_PLUS,
TOKEN_SLASH,
TOKEN_STAR,
// one or two character tokens 11
TOKEN_BANG,
TOKEN_BANG_EQUAL,
TOKEN_EQUAL,
TOKEN_EQUAL_EQUAL,
TOKEN_GREATER,
TOKEN_GREATER_EQUAL,
TOKEN_LESS,
TOKEN_LESS_EQUAL,
// Literals 19
TOKEN_IDENTIFIER,
TOKEN_STRING,
TOKEN_NUMBER,
// Keywords 22
TOKEN_AND, TOKEN_CLASS, TOKEN_ELSE, TOKEN_FALSE,
TOKEN_FOR, TOKEN_FN, TOKEN_IF, TOKEN_NIL, TOKEN_OR,
TOKEN_PRINT, TOKEN_RETURN, TOKEN_SUPER, TOKEN_THIS,
TOKEN_TRUE, TOKEN_LET, TOKEN_WHILE,
// Misc 38
TOKEN_ERROR, TOKEN_EOF
};
}
struct Token {
TokenType::Any m_type;
const char* m_start;
uint32_t m_length;
uint32_t m_line;
};
char* make_token_error_msg(const std::string& message)
{
// HERE
char* error_message = new char[message.size() + 1];
for (uint32_t i = 0; i < message.size(); i++) {
error_message[i] = message[i];
}
error_message[message.size()] = '\0';
return error_message;
}
void process_token_error_msg(Token& token)
{
delete [] token.m_start;
token.m_start = nullptr;
}
struct Scanner {
// m_start_lexeme_char
const char* m_start;
// m_current_lexeme_char (end of scanned token)
const char* m_current;
uint32_t m_line;
Scanner(const std::string& source)
{
m_start = source.data();
m_current = source.data();
m_line = 0;
}
Token scan_token()
{
// std::cerr << "enter scan token\n";
skip_whitespace();
m_start = m_current;
if (is_at_end()) {
return make_token(TokenType::TOKEN_EOF);
}
char c = advance();
if (is_alpha(c)) return make_identifier_token();
if (is_digit(c)) return make_number_token();
switch (c) {
case '(': return make_token(TokenType::TOKEN_LEFT_PAREN);
case ')': return make_token(TokenType::TOKEN_RIGHT_PAREN);
case '{': return make_token(TokenType::TOKEN_LEFT_BRACE);
case '}': return make_token(TokenType::TOKEN_RIGHT_BRACE);
case ';': return make_token(TokenType::TOKEN_SEMICOLON);
case ',': return make_token(TokenType::TOKEN_COMMA);
case '.': return make_token(TokenType::TOKEN_DOT);
case '-': return make_token(TokenType::TOKEN_MINUS);
case '+': return make_token(TokenType::TOKEN_PLUS);
case '/': return make_token(TokenType::TOKEN_SLASH);
case '*': return make_token(TokenType::TOKEN_STAR);
case '!':
return make_token(
match('=') ? TokenType::TOKEN_BANG_EQUAL
: TokenType::TOKEN_BANG);
case '=':
return make_token(
match('=') ? TokenType::TOKEN_EQUAL_EQUAL
: TokenType::TOKEN_EQUAL);
case '<':
return make_token(
match('=') ? TokenType::TOKEN_LESS_EQUAL
: TokenType::TOKEN_LESS);
case '>':
return make_token(
match('=') ? TokenType::TOKEN_GREATER_EQUAL
: TokenType::TOKEN_GREATER);
case '"':
return make_string_token();
}
return make_error_token("unexpected character.");
}
bool is_alpha(char c)
{
return ('a' <= c && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
c == '_';
}
bool is_digit(char c)
{
return '0' <= c && c <= '9';
}
// conditionally consumes the next character
bool match(char input)
{
if (is_at_end()
|| *m_current != input) {
return false;
}
m_current++;
return true;
}
char advance()
{
m_current++;
return m_current[-1];
}
char peek()
{
return m_current[0];
}
char peek_next()
{
if (is_at_end()) return '\0';
return m_current[1];
}
void skip_whitespace()
{
while (true) {
char c = peek();
switch (c) {
case '\n':
m_line++;
case ' ':
case '\r':
case '\t':
advance();
break;
case '/':
if (peek_next() == '/') {
while (peek() != '\n' && !is_at_end()) advance();
}
else {
return; // not whitespace
}
break;
default:
return;
}
}
}
bool is_at_end()
{
return *m_current == '\0'; // HERE
}
Token make_token(TokenType::Any type)
{
Token token;
token.m_type = type;
token.m_start = m_start;
token.m_length = (uint32_t)(m_current - m_start);
token.m_line = m_line;
return token;
}
Token make_error_token(const std::string& message)
{
Token token;
token.m_type = TokenType::TOKEN_ERROR;
token.m_start = make_token_error_msg(message);
token.m_length = (uint32_t)message.size();
token.m_line = m_line;
return token;
}
Token make_string_token()
{
while (peek() != '"' && !is_at_end()) {
if (peek() == '\n') {
m_line++;
}
advance();
}
if (is_at_end()) {
return make_error_token("Unterminated String.");
}
advance();
return make_token(TokenType::TOKEN_STRING);
}
Token make_number_token()
{
while (is_digit(peek())) {
advance();
}
if (peek() == '.' && is_digit(peek_next())) {
advance();
while (is_digit(peek())) {
advance();
}
}
return make_token(TokenType::TOKEN_NUMBER);
}
Token make_identifier_token()
{
while (is_alpha(peek()) || is_digit(peek())) {
advance();
}
return make_token(find_identifier_type());
}
// Trie
TokenType::Any find_identifier_type()
{
switch (m_start[0]) {
case 'a': return check_keyword("and", TokenType::TOKEN_AND);
case 'c': return check_keyword("class", TokenType::TOKEN_CLASS);
case 'e': return check_keyword("else", TokenType::TOKEN_ELSE);
case 'i': return check_keyword("if", TokenType::TOKEN_IF);
case 'n': return check_keyword("nil", TokenType::TOKEN_NIL);
case 'o': return check_keyword("or", TokenType::TOKEN_OR);
case 'p': return check_keyword("print", TokenType::TOKEN_PRINT);
case 'r': return check_keyword("return", TokenType::TOKEN_RETURN);
case 's': return check_keyword("super", TokenType::TOKEN_SUPER);
case 'l': return check_keyword("let", TokenType::TOKEN_LET);
case 'w': return check_keyword("while", TokenType::TOKEN_WHILE);
case 'f':
if (m_current - m_start == 1) {
break;
}
switch (m_start[1]) {
case 'n': return TokenType::TOKEN_FN;
case 'o': return check_keyword("for", TokenType::TOKEN_FOR);
case 'a': return check_keyword("false", TokenType::TOKEN_FALSE);
}
case 't':
if (m_current - m_start == 1) {
break;
}
switch (m_start[1]) {
case 'r': return check_keyword("true", TokenType::TOKEN_TRUE);
case 'h': return check_keyword("this", TokenType::TOKEN_THIS);
}
default:
break;
}
return TokenType::TOKEN_IDENTIFIER;
}
TokenType::Any check_keyword(
const std::string& target_keyword,
TokenType::Any token_to_check)
{
const char* cursor = m_start;
size_t keyword_size = target_keyword.size();
if (m_current - m_start != keyword_size) {
return TokenType::TOKEN_IDENTIFIER;
}
for (uint32_t i = 0; i < keyword_size; i++) {
if (target_keyword[i] != cursor[i]) {
return TokenType::TOKEN_IDENTIFIER;
}
}
return token_to_check;
}
};
| 22.399408 | 74 | 0.596355 | ShameekConyers |
128d7942607906359685849bba14e652bda730a4 | 585 | cpp | C++ | base/CountDownLatch.cpp | tryturned/webserver | f9a1342b08c1e2fe36249ce881a771b72bc9b423 | [
"MulanPSL-1.0"
] | null | null | null | base/CountDownLatch.cpp | tryturned/webserver | f9a1342b08c1e2fe36249ce881a771b72bc9b423 | [
"MulanPSL-1.0"
] | null | null | null | base/CountDownLatch.cpp | tryturned/webserver | f9a1342b08c1e2fe36249ce881a771b72bc9b423 | [
"MulanPSL-1.0"
] | null | null | null | /*
* @Autor: taobo
* @Date: 2020-05-27 19:04:46
* @LastEditTime: 2020-12-22 12:41:50
* @Description: file content
*/
#include "CountDownLatch.h"
#include <condition_variable>
#include <mutex>
using namespace std;
CountDownLatch::CountDownLatch(int cnt) : cnt_(cnt) {}
void CountDownLatch::wait() {
unique_lock<mutex> lck(this->mtx_);
condition_.wait(lck, [&] { return !blocked(); });
}
bool CountDownLatch::blocked() { return cnt_ > 0; }
void CountDownLatch::countDown() {
unique_lock<mutex> lck(this->mtx_);
--cnt_;
if (cnt_ == 0) this->condition_.notify_all();
} | 21.666667 | 54 | 0.678632 | tryturned |
128fd91523797e94958160e046f2aefab3edbfb2 | 6,751 | cpp | C++ | tests/test_set.cpp | ftlorg/ftl | 75a580043ddf011477f0fbcb0ed1dc01be37814d | [
"BSL-1.0"
] | 47 | 2020-07-17T07:31:42.000Z | 2022-02-18T10:31:45.000Z | tests/test_set.cpp | ftlorg/ftl | 75a580043ddf011477f0fbcb0ed1dc01be37814d | [
"BSL-1.0"
] | 40 | 2020-07-23T09:01:39.000Z | 2020-12-19T15:19:44.000Z | tests/test_set.cpp | ftlorg/ftl | 75a580043ddf011477f0fbcb0ed1dc01be37814d | [
"BSL-1.0"
] | 1 | 2020-07-26T18:21:36.000Z | 2020-07-26T18:21:36.000Z | #include <catch2/catch.hpp>
#include <ftl/ftl.hpp>
#define TEST_TAG "[set]"
TEST_CASE(TEST_TAG "default ctor", TEST_TAG) {
ftl::set<std::string> set;
REQUIRE(set.empty());
}
TEST_CASE(TEST_TAG "input iterator ctor", TEST_TAG) {
ftl::set<std::string> set1 = { { std::string("red"), std::string("green"), std::string("blue") } };
ftl::set<std::string> set2 = { std::begin(set1), std::end(set1) };
REQUIRE(set1.size() == set2.size());
REQUIRE(*set1.find("red") == *set2.find("red"));
REQUIRE(*set1.find("green") == *set2.find("green"));
REQUIRE(*set1.find("blue") == *set2.find("blue"));
}
TEST_CASE(TEST_TAG "copy ctor", TEST_TAG) {
ftl::set<std::string> set1 = { { std::string("red"), std::string("green"), std::string("blue") } };
ftl::set<std::string> set2 = set1;
REQUIRE(set1.size() == set2.size());
REQUIRE(*set1.find("red") == *set2.find("red"));
REQUIRE(*set1.find("green") == *set2.find("green"));
REQUIRE(*set1.find("blue") == *set2.find("blue"));
}
TEST_CASE(TEST_TAG "move ctor", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
ftl::set<std::string> set2 = std::move(set1);
REQUIRE(set2.size() == 3);
REQUIRE(set2.find("red") != set2.end());
REQUIRE(set2.find("green") != set2.end());
REQUIRE(set2.find("blue") != set2.end());
}
TEST_CASE(TEST_TAG "insert elements which already exist", TEST_TAG) {
ftl::set<std::string> set = { { "red", "green", "blue" } };
set.insert("blue");
set.insert("green");
set.insert("red");
REQUIRE(set.size() == 3);
}
TEST_CASE(TEST_TAG "operator=", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
ftl::set<std::string> set2{};
set2 = set1;
REQUIRE(set2.size() == 3);
REQUIRE(set2.find("red") != set2.end());
REQUIRE(set2.find("green") != set2.end());
REQUIRE(set2.find("blue") != set2.end());
}
TEST_CASE(TEST_TAG "move operator=", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
ftl::set<std::string> set2{};
set2 = std::move(set1);
REQUIRE(set1.empty());
REQUIRE(set2.size() == 3);
REQUIRE(set2.find("red") != set2.end());
REQUIRE(set2.find("green") != set2.end());
REQUIRE(set2.find("blue") != set2.end());
}
TEST_CASE(TEST_TAG "begin", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
REQUIRE(set1.begin() != set1.end());
}
TEST_CASE(TEST_TAG "begin const", TEST_TAG) {
const ftl::set<std::string> set1 = { { "red", "green", "blue" } };
REQUIRE(set1.begin() != set1.end());
}
TEST_CASE(TEST_TAG "empty", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
REQUIRE_FALSE(set1.empty());
}
TEST_CASE(TEST_TAG "empty const", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
REQUIRE_FALSE(set1.empty());
}
TEST_CASE(TEST_TAG "size", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
REQUIRE(set1.size() == 3);
}
TEST_CASE(TEST_TAG "size const", TEST_TAG) {
const ftl::set<std::string> set1 = { { "red", "green", "blue" } };
REQUIRE(set1.size() == 3);
}
TEST_CASE(TEST_TAG "clear", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
set1.clear();
REQUIRE(set1.empty());
}
TEST_CASE(TEST_TAG "insert", TEST_TAG) {
ftl::set<std::string> set = { { "red", "green", "blue" } };
REQUIRE(set.size() == 3);
set.insert("blue");
set.insert("green");
set.insert("red");
set.insert({ "orange" });
REQUIRE(set.size() == 4);
REQUIRE(set.find("orange") != set.end());
}
TEST_CASE(TEST_TAG "emplace", TEST_TAG) {
ftl::set<std::string> set1 = {};
set1.emplace("red");
set1.emplace("green");
set1.emplace("blue");
REQUIRE(set1.size() == 3);
}
TEST_CASE(TEST_TAG "emplace_hint", TEST_TAG) {
ftl::set<std::string> set1 = { { "red" } };
set1.emplace_hint(set1.begin(), "green");
set1.emplace_hint(set1.begin(), "blue");
REQUIRE(set1.size() == 3);
}
TEST_CASE(TEST_TAG "erase by iter", TEST_TAG) {
ftl::set<std::string> set = { { "red", "green", "blue", "blue" } };
auto it = set.find("blue");
set.erase(it);
REQUIRE(set.size() == 2);
}
TEST_CASE(TEST_TAG "erase with key", TEST_TAG) {
ftl::set<std::string> set = { { "red", "green", "blue", "blue" } };
set.erase("blue");
REQUIRE(set.size() == 2);
}
TEST_CASE(TEST_TAG "erase range", TEST_TAG) {
ftl::set<std::string> set = { { "red", "green", "blue", "blue" } };
set.erase(std::begin(set), std::end(set));
REQUIRE_FALSE(!set.empty());
}
TEST_CASE(TEST_TAG "swap", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue", "blue" } };
REQUIRE(set1.size() == 3);
ftl::set<std::string> set2 = { { "orange", "purple", "purple" } };
REQUIRE(set2.size() == 2);
set1.swap(set2);
REQUIRE(set1.size() == 2);
REQUIRE(set2.size() == 3);
}
TEST_CASE(TEST_TAG "extract by iter", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
auto it = set1.find("red");
auto handle = set1.extract(it);
REQUIRE(handle.value() == "red");
REQUIRE(set1.size() == 2);
}
TEST_CASE(TEST_TAG "extract by key", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
auto handle = set1.extract("red");
REQUIRE(handle.value() == "red");
REQUIRE(set1.size() == 2);
}
TEST_CASE(TEST_TAG "merge", TEST_TAG) {
ftl::set<std::string> ma{ { "apple", "pear", "banana" } };
ftl::set<std::string> mb{ { "zorro", "batman", "X", "alpaca", "apple" } };
ftl::set<std::string> u;
u.merge(ma);
REQUIRE(u.size() == 3);
u.merge(mb);
REQUIRE(u.size() == 7);
}
TEST_CASE(TEST_TAG "count", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
REQUIRE(set1.count("red") == 1);
REQUIRE(set1.count("orange") == 0);
}
TEST_CASE(TEST_TAG "find", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
auto found_it = set1.find("red");
REQUIRE(found_it != std::end(set1));
REQUIRE(*found_it == "red");
auto not_found_it = set1.find("orange");
REQUIRE(not_found_it == std::end(set1));
}
TEST_CASE(TEST_TAG "equal_range", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
auto [lower_bound, upper_bound] = set1.equal_range("red");
REQUIRE(lower_bound == set1.lower_bound("red"));
REQUIRE(upper_bound == set1.upper_bound("red"));
}
TEST_CASE(TEST_TAG "lower_bound", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
auto lower_bound = set1.lower_bound("blue");
REQUIRE(lower_bound != std::end(set1));
}
TEST_CASE(TEST_TAG "upper_bound", TEST_TAG) {
ftl::set<std::string> set1 = { { "red", "green", "blue" } };
auto upper_bound = set1.upper_bound("red");
REQUIRE(upper_bound == std::end(set1));
}
| 25.284644 | 101 | 0.595171 | ftlorg |
1290e333a82a5283c1f171e46c32471442c99e93 | 130 | cc | C++ | src/enums/webrtc/media_type.cc | elofun/node-webrtc | be63c8c007402c25962df9e30c9813ba70b8a17b | [
"Apache-2.0"
] | 1,302 | 2018-11-26T03:29:51.000Z | 2022-03-31T23:38:34.000Z | src/enums/webrtc/media_type.cc | elofun/node-webrtc | be63c8c007402c25962df9e30c9813ba70b8a17b | [
"Apache-2.0"
] | 311 | 2018-11-26T14:22:19.000Z | 2022-03-28T09:47:38.000Z | src/enums/webrtc/media_type.cc | elofun/node-webrtc | be63c8c007402c25962df9e30c9813ba70b8a17b | [
"Apache-2.0"
] | 233 | 2018-11-26T18:08:11.000Z | 2022-03-30T01:29:50.000Z | #include "src/enums/webrtc/media_type.h"
#define ENUM(X) CRICKET_MEDIA_TYPE ## X
#include "src/enums/macros/impls.h"
#undef ENUM
| 21.666667 | 40 | 0.753846 | elofun |
129267bd10d2c13f4e2c2cb14dd6f5dc753770a3 | 2,966 | cpp | C++ | source/puma/private/internal/ecs/components/inputcomponent.cpp | fpuma/Puma | e8eb5a8711f506077899a1fb5322d616a37e89c4 | [
"MIT"
] | null | null | null | source/puma/private/internal/ecs/components/inputcomponent.cpp | fpuma/Puma | e8eb5a8711f506077899a1fb5322d616a37e89c4 | [
"MIT"
] | null | null | null | source/puma/private/internal/ecs/components/inputcomponent.cpp | fpuma/Puma | e8eb5a8711f506077899a1fb5322d616a37e89c4 | [
"MIT"
] | null | null | null | #include "precompiledengine.h"
#include "internal/ecs/components/inputcomponent.h"
namespace puma
{
void InputComponent::addInputMap( InputAction _inputAction, MousePositionInput _mousePositionInput )
{
m_inputMaps.insert( InputMap( _inputAction, _mousePositionInput ) );
}
void InputComponent::addInputMap( InputAction _inputAction, MouseButtonInput _mouseButtonInput )
{
m_inputMaps.insert( InputMap( _inputAction, _mouseButtonInput ) );
}
void InputComponent::addInputMap( InputAction _inputAction, MouseWheelInput _mouseWheelInput )
{
m_inputMaps.insert( InputMap( _inputAction, _mouseWheelInput ) );
}
void InputComponent::addInputMap( InputAction _inputAction, KeyboardInput _keyboardInput )
{
m_inputMaps.insert( InputMap( _inputAction, _keyboardInput ) );
}
void InputComponent::addInputMap( InputAction _inputAction, ControllerButtonInput _controllerButtonInput )
{
m_inputMaps.insert( InputMap( _inputAction, _controllerButtonInput ) );
}
void InputComponent::addInputMap( InputAction _inputAction, ControllerTriggerInput _controllerTriggerInput )
{
m_inputMaps.insert( InputMap( _inputAction, _controllerTriggerInput ) );
}
void InputComponent::addInputMap( InputAction _inputAction, ControllerJoystickInput _controllerJoystickInput )
{
m_inputMaps.insert( InputMap( _inputAction, _controllerJoystickInput ) );
}
void InputComponent::enableAction( InputAction _inputAction )
{
m_disabledActions.erase( _inputAction );
}
void InputComponent::disableAction( InputAction _inputAction )
{
m_disabledActions.insert( _inputAction );
}
bool InputComponent::isActionActive( InputAction _inputAction ) const
{
bool found = m_activeAction.find( _inputAction ) != m_activeAction.end();
return (found);
}
InputActionExtraInfo InputComponent::getInputActionExtraInfo( InputAction _inputAction ) const
{
auto itFound = std::find_if( m_extraInfo.begin(), m_extraInfo.end(), [_inputAction]( const ExtraInfoData& extraInfoData )
{
return extraInfoData.inputAction == _inputAction;
} );
InputActionExtraInfo result;
if ( itFound != m_extraInfo.end() )
{
result = itFound->extraInfo;
}
return result;
}
void InputComponent::evaluate()
{
m_activeAction.clear();
m_extraInfo.clear();
for ( const InputMap& inputMap : m_inputMaps )
{
InputEvalResult result = inputMap.evaluate();
if ( result.active )
{
m_activeAction.insert( inputMap.getInputAction() );
if ( result.hasExtraInfo )
{
m_extraInfo.insert( { inputMap.getInputAction(), result.extraInfo } );
}
}
}
}
} | 31.892473 | 129 | 0.664869 | fpuma |
1296b8f82d6bf72057df336aefc3ba4e4fc933ba | 1,118 | cpp | C++ | CodeChef Starters 32/Volume Control.cpp | tarunbisht-24/Codechef-Contests | 8e7dcf69b839d586f4e73bc8183b8963a8cf1d50 | [
"Apache-2.0"
] | 1 | 2022-03-06T18:27:58.000Z | 2022-03-06T18:27:58.000Z | CodeChef Starters 32/Volume Control.cpp | tarunbisht-24/Codechef-Contests | 8e7dcf69b839d586f4e73bc8183b8963a8cf1d50 | [
"Apache-2.0"
] | null | null | null | CodeChef Starters 32/Volume Control.cpp | tarunbisht-24/Codechef-Contests | 8e7dcf69b839d586f4e73bc8183b8963a8cf1d50 | [
"Apache-2.0"
] | null | null | null | /*
Chef is watching TV. The current volume of the TV is X. Pressing the volume up button of the TV remote increases the volume by 1 while pressing the volume down button decreases the volume by 1. Chef wants to change the volume from X to Y. Find the minimum number of button presses required to do so.
Input Format
The first line contains a single integer T - the number of test cases. Then the test cases follow.
The first and only line of each test case contains two integers X and Y - the initial volume and final volume of the TV.
Output Format
For each test case, output the minimum number of times Chef has to press a button to change the volume from X to Y.
Constraints
1≤T≤100
1≤X,Y≤100
Sample Input 1
2
50 54
12 10
Sample Output 1
4
2
Explanation
Test Case 1: Chef can press the volume up button 4 times to increase the volume from 50 to 54.
Test Case 2: Chef can press the volume down button 2 times to decrease the volume from 12 to 10.
*/
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--)
{
int x,y;
cin>>x>>y;
cout<<abs(x-y)<<endl;
}
return 0;
}
| 27.95 | 299 | 0.734347 | tarunbisht-24 |
129d5f744ed43e8f2ec753761ebfe8c2f4aa2a91 | 824,659 | cpp | C++ | src/main_5900.cpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | src/main_5900.cpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | src/main_5900.cpp | RedBrumbler/virtuoso-codegen | e83f6f0f9b47bec4b6dd976b21edc1d46bf3cfe3 | [
"Unlicense"
] | null | null | null | // Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.AddressFamily
#include "System/Net/Sockets/AddressFamily.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.Net.Sockets.AddressFamily Unknown
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Unknown
void System::Net::Sockets::AddressFamily::_set_Unknown(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Unknown", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Unspecified
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Unspecified() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Unspecified");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Unspecified"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Unspecified
void System::Net::Sockets::AddressFamily::_set_Unspecified(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Unspecified");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Unspecified", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Unix
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Unix() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Unix");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Unix"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Unix
void System::Net::Sockets::AddressFamily::_set_Unix(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Unix");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Unix", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily InterNetwork
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_InterNetwork() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_InterNetwork");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "InterNetwork"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily InterNetwork
void System::Net::Sockets::AddressFamily::_set_InterNetwork(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_InterNetwork");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "InterNetwork", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily ImpLink
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_ImpLink() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_ImpLink");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "ImpLink"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily ImpLink
void System::Net::Sockets::AddressFamily::_set_ImpLink(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_ImpLink");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "ImpLink", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Pup
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Pup() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Pup");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Pup"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Pup
void System::Net::Sockets::AddressFamily::_set_Pup(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Pup");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Pup", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Chaos
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Chaos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Chaos");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Chaos"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Chaos
void System::Net::Sockets::AddressFamily::_set_Chaos(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Chaos");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Chaos", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily NS
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_NS() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_NS");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "NS"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily NS
void System::Net::Sockets::AddressFamily::_set_NS(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_NS");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "NS", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Ipx
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Ipx() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Ipx");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Ipx"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Ipx
void System::Net::Sockets::AddressFamily::_set_Ipx(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Ipx");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Ipx", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Iso
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Iso() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Iso");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Iso"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Iso
void System::Net::Sockets::AddressFamily::_set_Iso(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Iso");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Iso", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Osi
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Osi() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Osi");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Osi"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Osi
void System::Net::Sockets::AddressFamily::_set_Osi(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Osi");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Osi", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Ecma
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Ecma() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Ecma");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Ecma"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Ecma
void System::Net::Sockets::AddressFamily::_set_Ecma(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Ecma");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Ecma", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily DataKit
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_DataKit() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_DataKit");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "DataKit"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily DataKit
void System::Net::Sockets::AddressFamily::_set_DataKit(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_DataKit");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "DataKit", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Ccitt
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Ccitt() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Ccitt");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Ccitt"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Ccitt
void System::Net::Sockets::AddressFamily::_set_Ccitt(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Ccitt");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Ccitt", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Sna
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Sna() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Sna");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Sna"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Sna
void System::Net::Sockets::AddressFamily::_set_Sna(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Sna");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Sna", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily DecNet
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_DecNet() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_DecNet");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "DecNet"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily DecNet
void System::Net::Sockets::AddressFamily::_set_DecNet(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_DecNet");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "DecNet", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily DataLink
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_DataLink() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_DataLink");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "DataLink"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily DataLink
void System::Net::Sockets::AddressFamily::_set_DataLink(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_DataLink");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "DataLink", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Lat
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Lat() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Lat");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Lat"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Lat
void System::Net::Sockets::AddressFamily::_set_Lat(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Lat");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Lat", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily HyperChannel
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_HyperChannel() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_HyperChannel");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "HyperChannel"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily HyperChannel
void System::Net::Sockets::AddressFamily::_set_HyperChannel(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_HyperChannel");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "HyperChannel", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily AppleTalk
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_AppleTalk() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_AppleTalk");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "AppleTalk"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily AppleTalk
void System::Net::Sockets::AddressFamily::_set_AppleTalk(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_AppleTalk");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "AppleTalk", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily NetBios
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_NetBios() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_NetBios");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "NetBios"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily NetBios
void System::Net::Sockets::AddressFamily::_set_NetBios(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_NetBios");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "NetBios", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily VoiceView
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_VoiceView() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_VoiceView");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "VoiceView"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily VoiceView
void System::Net::Sockets::AddressFamily::_set_VoiceView(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_VoiceView");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "VoiceView", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily FireFox
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_FireFox() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_FireFox");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "FireFox"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily FireFox
void System::Net::Sockets::AddressFamily::_set_FireFox(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_FireFox");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "FireFox", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Banyan
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Banyan() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Banyan");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Banyan"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Banyan
void System::Net::Sockets::AddressFamily::_set_Banyan(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Banyan");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Banyan", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Atm
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Atm() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Atm");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Atm"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Atm
void System::Net::Sockets::AddressFamily::_set_Atm(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Atm");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Atm", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily InterNetworkV6
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_InterNetworkV6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_InterNetworkV6");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "InterNetworkV6"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily InterNetworkV6
void System::Net::Sockets::AddressFamily::_set_InterNetworkV6(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_InterNetworkV6");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "InterNetworkV6", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Cluster
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Cluster() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Cluster");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Cluster"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Cluster
void System::Net::Sockets::AddressFamily::_set_Cluster(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Cluster");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Cluster", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Ieee12844
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Ieee12844() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Ieee12844");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Ieee12844"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Ieee12844
void System::Net::Sockets::AddressFamily::_set_Ieee12844(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Ieee12844");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Ieee12844", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Irda
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Irda() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Irda");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Irda"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Irda
void System::Net::Sockets::AddressFamily::_set_Irda(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Irda");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Irda", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily NetworkDesigners
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_NetworkDesigners() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_NetworkDesigners");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "NetworkDesigners"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily NetworkDesigners
void System::Net::Sockets::AddressFamily::_set_NetworkDesigners(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_NetworkDesigners");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "NetworkDesigners", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.AddressFamily Max
::System::Net::Sockets::AddressFamily System::Net::Sockets::AddressFamily::_get_Max() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_get_Max");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::AddressFamily>("System.Net.Sockets", "AddressFamily", "Max"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.AddressFamily Max
void System::Net::Sockets::AddressFamily::_set_Max(::System::Net::Sockets::AddressFamily value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::_set_Max");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "AddressFamily", "Max", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::AddressFamily::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::AddressFamily::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: System.Net.Sockets.IOControlCode
#include "System/Net/Sockets/IOControlCode.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.Net.Sockets.IOControlCode AsyncIO
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_AsyncIO() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_AsyncIO");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "AsyncIO"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode AsyncIO
void System::Net::Sockets::IOControlCode::_set_AsyncIO(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_AsyncIO");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "AsyncIO", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode NonBlockingIO
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_NonBlockingIO() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_NonBlockingIO");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "NonBlockingIO"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode NonBlockingIO
void System::Net::Sockets::IOControlCode::_set_NonBlockingIO(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_NonBlockingIO");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "NonBlockingIO", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode DataToRead
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_DataToRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_DataToRead");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "DataToRead"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode DataToRead
void System::Net::Sockets::IOControlCode::_set_DataToRead(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_DataToRead");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "DataToRead", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode OobDataRead
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_OobDataRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_OobDataRead");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "OobDataRead"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode OobDataRead
void System::Net::Sockets::IOControlCode::_set_OobDataRead(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_OobDataRead");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "OobDataRead", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode AssociateHandle
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_AssociateHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_AssociateHandle");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "AssociateHandle"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode AssociateHandle
void System::Net::Sockets::IOControlCode::_set_AssociateHandle(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_AssociateHandle");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "AssociateHandle", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode EnableCircularQueuing
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_EnableCircularQueuing() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_EnableCircularQueuing");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "EnableCircularQueuing"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode EnableCircularQueuing
void System::Net::Sockets::IOControlCode::_set_EnableCircularQueuing(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_EnableCircularQueuing");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "EnableCircularQueuing", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode Flush
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_Flush() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_Flush");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "Flush"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode Flush
void System::Net::Sockets::IOControlCode::_set_Flush(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_Flush");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "Flush", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode GetBroadcastAddress
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_GetBroadcastAddress() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_GetBroadcastAddress");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "GetBroadcastAddress"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode GetBroadcastAddress
void System::Net::Sockets::IOControlCode::_set_GetBroadcastAddress(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_GetBroadcastAddress");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "GetBroadcastAddress", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode GetExtensionFunctionPointer
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_GetExtensionFunctionPointer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_GetExtensionFunctionPointer");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "GetExtensionFunctionPointer"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode GetExtensionFunctionPointer
void System::Net::Sockets::IOControlCode::_set_GetExtensionFunctionPointer(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_GetExtensionFunctionPointer");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "GetExtensionFunctionPointer", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode GetQos
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_GetQos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_GetQos");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "GetQos"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode GetQos
void System::Net::Sockets::IOControlCode::_set_GetQos(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_GetQos");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "GetQos", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode GetGroupQos
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_GetGroupQos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_GetGroupQos");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "GetGroupQos"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode GetGroupQos
void System::Net::Sockets::IOControlCode::_set_GetGroupQos(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_GetGroupQos");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "GetGroupQos", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode MultipointLoopback
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_MultipointLoopback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_MultipointLoopback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "MultipointLoopback"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode MultipointLoopback
void System::Net::Sockets::IOControlCode::_set_MultipointLoopback(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_MultipointLoopback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "MultipointLoopback", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode MulticastScope
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_MulticastScope() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_MulticastScope");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "MulticastScope"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode MulticastScope
void System::Net::Sockets::IOControlCode::_set_MulticastScope(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_MulticastScope");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "MulticastScope", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode SetQos
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_SetQos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_SetQos");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "SetQos"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode SetQos
void System::Net::Sockets::IOControlCode::_set_SetQos(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_SetQos");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "SetQos", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode SetGroupQos
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_SetGroupQos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_SetGroupQos");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "SetGroupQos"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode SetGroupQos
void System::Net::Sockets::IOControlCode::_set_SetGroupQos(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_SetGroupQos");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "SetGroupQos", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode TranslateHandle
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_TranslateHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_TranslateHandle");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "TranslateHandle"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode TranslateHandle
void System::Net::Sockets::IOControlCode::_set_TranslateHandle(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_TranslateHandle");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "TranslateHandle", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode RoutingInterfaceQuery
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_RoutingInterfaceQuery() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_RoutingInterfaceQuery");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "RoutingInterfaceQuery"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode RoutingInterfaceQuery
void System::Net::Sockets::IOControlCode::_set_RoutingInterfaceQuery(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_RoutingInterfaceQuery");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "RoutingInterfaceQuery", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode RoutingInterfaceChange
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_RoutingInterfaceChange() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_RoutingInterfaceChange");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "RoutingInterfaceChange"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode RoutingInterfaceChange
void System::Net::Sockets::IOControlCode::_set_RoutingInterfaceChange(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_RoutingInterfaceChange");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "RoutingInterfaceChange", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode AddressListQuery
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_AddressListQuery() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_AddressListQuery");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "AddressListQuery"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode AddressListQuery
void System::Net::Sockets::IOControlCode::_set_AddressListQuery(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_AddressListQuery");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "AddressListQuery", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode AddressListChange
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_AddressListChange() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_AddressListChange");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "AddressListChange"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode AddressListChange
void System::Net::Sockets::IOControlCode::_set_AddressListChange(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_AddressListChange");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "AddressListChange", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode QueryTargetPnpHandle
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_QueryTargetPnpHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_QueryTargetPnpHandle");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "QueryTargetPnpHandle"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode QueryTargetPnpHandle
void System::Net::Sockets::IOControlCode::_set_QueryTargetPnpHandle(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_QueryTargetPnpHandle");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "QueryTargetPnpHandle", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode NamespaceChange
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_NamespaceChange() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_NamespaceChange");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "NamespaceChange"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode NamespaceChange
void System::Net::Sockets::IOControlCode::_set_NamespaceChange(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_NamespaceChange");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "NamespaceChange", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode AddressListSort
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_AddressListSort() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_AddressListSort");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "AddressListSort"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode AddressListSort
void System::Net::Sockets::IOControlCode::_set_AddressListSort(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_AddressListSort");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "AddressListSort", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode ReceiveAll
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_ReceiveAll() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_ReceiveAll");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "ReceiveAll"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode ReceiveAll
void System::Net::Sockets::IOControlCode::_set_ReceiveAll(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_ReceiveAll");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "ReceiveAll", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode ReceiveAllMulticast
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_ReceiveAllMulticast() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_ReceiveAllMulticast");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "ReceiveAllMulticast"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode ReceiveAllMulticast
void System::Net::Sockets::IOControlCode::_set_ReceiveAllMulticast(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_ReceiveAllMulticast");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "ReceiveAllMulticast", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode ReceiveAllIgmpMulticast
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_ReceiveAllIgmpMulticast() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_ReceiveAllIgmpMulticast");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "ReceiveAllIgmpMulticast"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode ReceiveAllIgmpMulticast
void System::Net::Sockets::IOControlCode::_set_ReceiveAllIgmpMulticast(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_ReceiveAllIgmpMulticast");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "ReceiveAllIgmpMulticast", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode KeepAliveValues
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_KeepAliveValues() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_KeepAliveValues");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "KeepAliveValues"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode KeepAliveValues
void System::Net::Sockets::IOControlCode::_set_KeepAliveValues(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_KeepAliveValues");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "KeepAliveValues", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode AbsorbRouterAlert
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_AbsorbRouterAlert() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_AbsorbRouterAlert");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "AbsorbRouterAlert"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode AbsorbRouterAlert
void System::Net::Sockets::IOControlCode::_set_AbsorbRouterAlert(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_AbsorbRouterAlert");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "AbsorbRouterAlert", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode UnicastInterface
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_UnicastInterface() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_UnicastInterface");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "UnicastInterface"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode UnicastInterface
void System::Net::Sockets::IOControlCode::_set_UnicastInterface(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_UnicastInterface");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "UnicastInterface", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode LimitBroadcasts
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_LimitBroadcasts() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_LimitBroadcasts");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "LimitBroadcasts"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode LimitBroadcasts
void System::Net::Sockets::IOControlCode::_set_LimitBroadcasts(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_LimitBroadcasts");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "LimitBroadcasts", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode BindToInterface
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_BindToInterface() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_BindToInterface");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "BindToInterface"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode BindToInterface
void System::Net::Sockets::IOControlCode::_set_BindToInterface(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_BindToInterface");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "BindToInterface", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode MulticastInterface
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_MulticastInterface() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_MulticastInterface");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "MulticastInterface"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode MulticastInterface
void System::Net::Sockets::IOControlCode::_set_MulticastInterface(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_MulticastInterface");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "MulticastInterface", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode AddMulticastGroupOnInterface
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_AddMulticastGroupOnInterface() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_AddMulticastGroupOnInterface");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "AddMulticastGroupOnInterface"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode AddMulticastGroupOnInterface
void System::Net::Sockets::IOControlCode::_set_AddMulticastGroupOnInterface(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_AddMulticastGroupOnInterface");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "AddMulticastGroupOnInterface", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IOControlCode DeleteMulticastGroupFromInterface
::System::Net::Sockets::IOControlCode System::Net::Sockets::IOControlCode::_get_DeleteMulticastGroupFromInterface() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_get_DeleteMulticastGroupFromInterface");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IOControlCode>("System.Net.Sockets", "IOControlCode", "DeleteMulticastGroupFromInterface"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IOControlCode DeleteMulticastGroupFromInterface
void System::Net::Sockets::IOControlCode::_set_DeleteMulticastGroupFromInterface(::System::Net::Sockets::IOControlCode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::_set_DeleteMulticastGroupFromInterface");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IOControlCode", "DeleteMulticastGroupFromInterface", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int64 value__
int64_t& System::Net::Sockets::IOControlCode::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IOControlCode::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.IPProtectionLevel
#include "System/Net/Sockets/IPProtectionLevel.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.Net.Sockets.IPProtectionLevel Unspecified
::System::Net::Sockets::IPProtectionLevel System::Net::Sockets::IPProtectionLevel::_get_Unspecified() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_get_Unspecified");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IPProtectionLevel>("System.Net.Sockets", "IPProtectionLevel", "Unspecified"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IPProtectionLevel Unspecified
void System::Net::Sockets::IPProtectionLevel::_set_Unspecified(::System::Net::Sockets::IPProtectionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_set_Unspecified");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IPProtectionLevel", "Unspecified", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IPProtectionLevel Unrestricted
::System::Net::Sockets::IPProtectionLevel System::Net::Sockets::IPProtectionLevel::_get_Unrestricted() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_get_Unrestricted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IPProtectionLevel>("System.Net.Sockets", "IPProtectionLevel", "Unrestricted"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IPProtectionLevel Unrestricted
void System::Net::Sockets::IPProtectionLevel::_set_Unrestricted(::System::Net::Sockets::IPProtectionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_set_Unrestricted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IPProtectionLevel", "Unrestricted", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IPProtectionLevel EdgeRestricted
::System::Net::Sockets::IPProtectionLevel System::Net::Sockets::IPProtectionLevel::_get_EdgeRestricted() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_get_EdgeRestricted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IPProtectionLevel>("System.Net.Sockets", "IPProtectionLevel", "EdgeRestricted"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IPProtectionLevel EdgeRestricted
void System::Net::Sockets::IPProtectionLevel::_set_EdgeRestricted(::System::Net::Sockets::IPProtectionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_set_EdgeRestricted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IPProtectionLevel", "EdgeRestricted", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.IPProtectionLevel Restricted
::System::Net::Sockets::IPProtectionLevel System::Net::Sockets::IPProtectionLevel::_get_Restricted() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_get_Restricted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::IPProtectionLevel>("System.Net.Sockets", "IPProtectionLevel", "Restricted"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.IPProtectionLevel Restricted
void System::Net::Sockets::IPProtectionLevel::_set_Restricted(::System::Net::Sockets::IPProtectionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::_set_Restricted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "IPProtectionLevel", "Restricted", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::IPProtectionLevel::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::IPProtectionLevel::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: System.Net.Sockets.LingerOption
#include "System/Net/Sockets/LingerOption.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 enabled
bool& System::Net::Sockets::LingerOption::dyn_enabled() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::LingerOption::dyn_enabled");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "enabled"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 lingerTime
int& System::Net::Sockets::LingerOption::dyn_lingerTime() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::LingerOption::dyn_lingerTime");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "lingerTime"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.LingerOption.set_Enabled
void System::Net::Sockets::LingerOption::set_Enabled(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::LingerOption::set_Enabled");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Enabled", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.LingerOption.set_LingerTime
void System::Net::Sockets::LingerOption::set_LingerTime(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::LingerOption::set_LingerTime");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_LingerTime", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Sockets.NetworkStream
#include "System/Net/Sockets/NetworkStream.hpp"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.IO.FileAccess
#include "System/IO/FileAccess.hpp"
// Including type: System.Net.Sockets.SocketShutdown
#include "System/Net/Sockets/SocketShutdown.hpp"
// Including type: System.IO.SeekOrigin
#include "System/IO/SeekOrigin.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
// Including type: System.Threading.Tasks.Task
#include "System/Threading/Tasks/Task.hpp"
// Including type: System.Threading.CancellationToken
#include "System/Threading/CancellationToken.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.Net.Sockets.Socket m_StreamSocket
::System::Net::Sockets::Socket*& System::Net::Sockets::NetworkStream::dyn_m_StreamSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_StreamSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_StreamSocket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_Readable
bool& System::Net::Sockets::NetworkStream::dyn_m_Readable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_Readable");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Readable"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_Writeable
bool& System::Net::Sockets::NetworkStream::dyn_m_Writeable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_Writeable");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Writeable"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_OwnsSocket
bool& System::Net::Sockets::NetworkStream::dyn_m_OwnsSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_OwnsSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_OwnsSocket"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_CloseTimeout
int& System::Net::Sockets::NetworkStream::dyn_m_CloseTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_CloseTimeout");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CloseTimeout"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_CleanedUp
bool& System::Net::Sockets::NetworkStream::dyn_m_CleanedUp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_CleanedUp");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CleanedUp"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_CurrentReadTimeout
int& System::Net::Sockets::NetworkStream::dyn_m_CurrentReadTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_CurrentReadTimeout");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CurrentReadTimeout"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_CurrentWriteTimeout
int& System::Net::Sockets::NetworkStream::dyn_m_CurrentWriteTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::dyn_m_CurrentWriteTimeout");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CurrentWriteTimeout"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_InternalSocket
::System::Net::Sockets::Socket* System::Net::Sockets::NetworkStream::get_InternalSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_InternalSocket");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_InternalSocket", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::Socket*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_DataAvailable
bool System::Net::Sockets::NetworkStream::get_DataAvailable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_DataAvailable");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DataAvailable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.InitNetworkStream
void System::Net::Sockets::NetworkStream::InitNetworkStream(::System::Net::Sockets::Socket* socket, ::System::IO::FileAccess Access) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::InitNetworkStream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InitNetworkStream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(Access)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, socket, Access);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.SetSocketTimeoutOption
void System::Net::Sockets::NetworkStream::SetSocketTimeoutOption(::System::Net::Sockets::SocketShutdown mode, int timeout, bool silent) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::SetSocketTimeoutOption");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetSocketTimeoutOption", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(mode), ::il2cpp_utils::ExtractType(timeout), ::il2cpp_utils::ExtractType(silent)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, mode, timeout, silent);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_CanRead
bool System::Net::Sockets::NetworkStream::get_CanRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_CanRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_CanSeek
bool System::Net::Sockets::NetworkStream::get_CanSeek() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_CanSeek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanSeek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_CanWrite
bool System::Net::Sockets::NetworkStream::get_CanWrite() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_CanWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_ReadTimeout
int System::Net::Sockets::NetworkStream::get_ReadTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_ReadTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ReadTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.set_ReadTimeout
void System::Net::Sockets::NetworkStream::set_ReadTimeout(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::set_ReadTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ReadTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_WriteTimeout
int System::Net::Sockets::NetworkStream::get_WriteTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_WriteTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_WriteTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_Length
int64_t System::Net::Sockets::NetworkStream::get_Length() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_Length");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Length", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.get_Position
int64_t System::Net::Sockets::NetworkStream::get_Position() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::get_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.set_Position
void System::Net::Sockets::NetworkStream::set_Position(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::set_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.Seek
int64_t System::Net::Sockets::NetworkStream::Seek(int64_t offset, ::System::IO::SeekOrigin origin) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::Seek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Seek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(origin)})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method, offset, origin);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.Read
int System::Net::Sockets::NetworkStream::Read(ByRef<::ArrayW<uint8_t>> buffer, int offset, int size) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::Read");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Read", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, byref(buffer), offset, size);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.Write
void System::Net::Sockets::NetworkStream::Write(::ArrayW<uint8_t> buffer, int offset, int size) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::Write");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Write", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer, offset, size);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.Dispose
void System::Net::Sockets::NetworkStream::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.Finalize
void System::Net::Sockets::NetworkStream::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.BeginRead
::System::IAsyncResult* System::Net::Sockets::NetworkStream::BeginRead(::ArrayW<uint8_t> buffer, int offset, int size, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::BeginRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, size, callback, state);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.EndRead
int System::Net::Sockets::NetworkStream::EndRead(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::EndRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.BeginWrite
::System::IAsyncResult* System::Net::Sockets::NetworkStream::BeginWrite(::ArrayW<uint8_t> buffer, int offset, int size, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::BeginWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, size, callback, state);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.EndWrite
void System::Net::Sockets::NetworkStream::EndWrite(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::EndWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.Flush
void System::Net::Sockets::NetworkStream::Flush() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::Flush");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Flush", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.FlushAsync
::System::Threading::Tasks::Task* System::Net::Sockets::NetworkStream::FlushAsync(::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::FlushAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, cancellationToken);
}
// Autogenerated method: System.Net.Sockets.NetworkStream.SetLength
void System::Net::Sockets::NetworkStream::SetLength(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::NetworkStream::SetLength");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.ProtocolType
#include "System/Net/Sockets/ProtocolType.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.Net.Sockets.ProtocolType IP
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IP() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IP");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IP"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IP
void System::Net::Sockets::ProtocolType::_set_IP(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IP");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IP", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPv6HopByHopOptions
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPv6HopByHopOptions() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPv6HopByHopOptions");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPv6HopByHopOptions"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPv6HopByHopOptions
void System::Net::Sockets::ProtocolType::_set_IPv6HopByHopOptions(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPv6HopByHopOptions");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPv6HopByHopOptions", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Icmp
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Icmp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Icmp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Icmp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Icmp
void System::Net::Sockets::ProtocolType::_set_Icmp(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Icmp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Icmp", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Igmp
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Igmp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Igmp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Igmp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Igmp
void System::Net::Sockets::ProtocolType::_set_Igmp(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Igmp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Igmp", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Ggp
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Ggp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Ggp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Ggp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Ggp
void System::Net::Sockets::ProtocolType::_set_Ggp(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Ggp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Ggp", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPv4
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPv4() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPv4");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPv4"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPv4
void System::Net::Sockets::ProtocolType::_set_IPv4(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPv4");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPv4", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Tcp
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Tcp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Tcp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Tcp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Tcp
void System::Net::Sockets::ProtocolType::_set_Tcp(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Tcp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Tcp", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Pup
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Pup() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Pup");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Pup"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Pup
void System::Net::Sockets::ProtocolType::_set_Pup(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Pup");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Pup", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Udp
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Udp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Udp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Udp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Udp
void System::Net::Sockets::ProtocolType::_set_Udp(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Udp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Udp", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Idp
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Idp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Idp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Idp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Idp
void System::Net::Sockets::ProtocolType::_set_Idp(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Idp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Idp", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPv6
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPv6");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPv6"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPv6
void System::Net::Sockets::ProtocolType::_set_IPv6(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPv6");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPv6", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPv6RoutingHeader
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPv6RoutingHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPv6RoutingHeader");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPv6RoutingHeader"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPv6RoutingHeader
void System::Net::Sockets::ProtocolType::_set_IPv6RoutingHeader(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPv6RoutingHeader");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPv6RoutingHeader", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPv6FragmentHeader
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPv6FragmentHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPv6FragmentHeader");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPv6FragmentHeader"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPv6FragmentHeader
void System::Net::Sockets::ProtocolType::_set_IPv6FragmentHeader(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPv6FragmentHeader");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPv6FragmentHeader", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPSecEncapsulatingSecurityPayload
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPSecEncapsulatingSecurityPayload() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPSecEncapsulatingSecurityPayload");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPSecEncapsulatingSecurityPayload"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPSecEncapsulatingSecurityPayload
void System::Net::Sockets::ProtocolType::_set_IPSecEncapsulatingSecurityPayload(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPSecEncapsulatingSecurityPayload");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPSecEncapsulatingSecurityPayload", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPSecAuthenticationHeader
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPSecAuthenticationHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPSecAuthenticationHeader");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPSecAuthenticationHeader"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPSecAuthenticationHeader
void System::Net::Sockets::ProtocolType::_set_IPSecAuthenticationHeader(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPSecAuthenticationHeader");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPSecAuthenticationHeader", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IcmpV6
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IcmpV6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IcmpV6");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IcmpV6"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IcmpV6
void System::Net::Sockets::ProtocolType::_set_IcmpV6(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IcmpV6");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IcmpV6", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPv6NoNextHeader
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPv6NoNextHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPv6NoNextHeader");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPv6NoNextHeader"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPv6NoNextHeader
void System::Net::Sockets::ProtocolType::_set_IPv6NoNextHeader(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPv6NoNextHeader");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPv6NoNextHeader", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType IPv6DestinationOptions
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_IPv6DestinationOptions() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_IPv6DestinationOptions");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "IPv6DestinationOptions"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType IPv6DestinationOptions
void System::Net::Sockets::ProtocolType::_set_IPv6DestinationOptions(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_IPv6DestinationOptions");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "IPv6DestinationOptions", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType ND
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_ND() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_ND");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "ND"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType ND
void System::Net::Sockets::ProtocolType::_set_ND(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_ND");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "ND", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Raw
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Raw() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Raw");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Raw"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Raw
void System::Net::Sockets::ProtocolType::_set_Raw(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Raw");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Raw", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Unspecified
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Unspecified() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Unspecified");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Unspecified"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Unspecified
void System::Net::Sockets::ProtocolType::_set_Unspecified(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Unspecified");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Unspecified", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Ipx
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Ipx() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Ipx");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Ipx"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Ipx
void System::Net::Sockets::ProtocolType::_set_Ipx(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Ipx");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Ipx", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Spx
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Spx() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Spx");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Spx"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Spx
void System::Net::Sockets::ProtocolType::_set_Spx(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Spx");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Spx", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType SpxII
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_SpxII() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_SpxII");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "SpxII"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType SpxII
void System::Net::Sockets::ProtocolType::_set_SpxII(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_SpxII");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "SpxII", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.ProtocolType Unknown
::System::Net::Sockets::ProtocolType System::Net::Sockets::ProtocolType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::ProtocolType>("System.Net.Sockets", "ProtocolType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.ProtocolType Unknown
void System::Net::Sockets::ProtocolType::_set_Unknown(::System::Net::Sockets::ProtocolType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "ProtocolType", "Unknown", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::ProtocolType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::ProtocolType::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: System.Net.Sockets.SelectMode
#include "System/Net/Sockets/SelectMode.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.Net.Sockets.SelectMode SelectRead
::System::Net::Sockets::SelectMode System::Net::Sockets::SelectMode::_get_SelectRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SelectMode::_get_SelectRead");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SelectMode>("System.Net.Sockets", "SelectMode", "SelectRead"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SelectMode SelectRead
void System::Net::Sockets::SelectMode::_set_SelectRead(::System::Net::Sockets::SelectMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SelectMode::_set_SelectRead");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SelectMode", "SelectRead", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SelectMode SelectWrite
::System::Net::Sockets::SelectMode System::Net::Sockets::SelectMode::_get_SelectWrite() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SelectMode::_get_SelectWrite");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SelectMode>("System.Net.Sockets", "SelectMode", "SelectWrite"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SelectMode SelectWrite
void System::Net::Sockets::SelectMode::_set_SelectWrite(::System::Net::Sockets::SelectMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SelectMode::_set_SelectWrite");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SelectMode", "SelectWrite", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SelectMode SelectError
::System::Net::Sockets::SelectMode System::Net::Sockets::SelectMode::_get_SelectError() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SelectMode::_get_SelectError");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SelectMode>("System.Net.Sockets", "SelectMode", "SelectError"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SelectMode SelectError
void System::Net::Sockets::SelectMode::_set_SelectError(::System::Net::Sockets::SelectMode value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SelectMode::_set_SelectError");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SelectMode", "SelectError", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SelectMode::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SelectMode::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.Net.Sockets.Socket/System.Net.Sockets.WSABUF
#include "System/Net/Sockets/Socket_WSABUF.hpp"
// Including type: System.Net.Sockets.Socket/System.Net.Sockets.<>c
#include "System/Net/Sockets/Socket_--c.hpp"
// Including type: System.Net.Sockets.Socket/System.Net.Sockets.<>c__DisplayClass243_0
#include "System/Net/Sockets/Socket_--c__DisplayClass243_0.hpp"
// Including type: System.Net.Sockets.Socket/System.Net.Sockets.<>c__DisplayClass299_0
#include "System/Net/Sockets/Socket_--c__DisplayClass299_0.hpp"
// Including type: System.Net.Sockets.SafeSocketHandle
#include "System/Net/Sockets/SafeSocketHandle.hpp"
// Including type: System.Net.EndPoint
#include "System/Net/EndPoint.hpp"
// Including type: System.Threading.SemaphoreSlim
#include "System/Threading/SemaphoreSlim.hpp"
// Including type: System.String
#include "System/String.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
// Including type: System.IOAsyncCallback
#include "System/IOAsyncCallback.hpp"
// Including type: System.IntPtr
#include "System/IntPtr.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: System.Net.Sockets.SocketFlags
#include "System/Net/Sockets/SocketFlags.hpp"
// Including type: System.Net.Sockets.IOControlCode
#include "System/Net/Sockets/IOControlCode.hpp"
// Including type: System.Net.Sockets.IPProtectionLevel
#include "System/Net/Sockets/IPProtectionLevel.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.Net.Sockets.SocketShutdown
#include "System/Net/Sockets/SocketShutdown.hpp"
// Including type: System.Net.Sockets.SocketOptionLevel
#include "System/Net/Sockets/SocketOptionLevel.hpp"
// Including type: System.Net.Sockets.SocketOptionName
#include "System/Net/Sockets/SocketOptionName.hpp"
// Including type: System.Net.SocketAddress
#include "System/Net/SocketAddress.hpp"
// Including type: System.Net.Sockets.SelectMode
#include "System/Net/Sockets/SelectMode.hpp"
// Including type: System.Net.IPAddress
#include "System/Net/IPAddress.hpp"
// Including type: System.Net.Sockets.SocketAsyncResult
#include "System/Net/Sockets/SocketAsyncResult.hpp"
// Including type: System.Net.Sockets.SocketError
#include "System/Net/Sockets/SocketError.hpp"
// Including type: System.IOSelectorJob
#include "System/IOSelectorJob.hpp"
// Including type: System.Net.IPEndPoint
#include "System/Net/IPEndPoint.hpp"
// Including type: System.Threading.Thread
#include "System/Threading/Thread.hpp"
// Including type: System.Net.NetworkInformation.NetworkInterfaceComponent
#include "System/Net/NetworkInformation/NetworkInterfaceComponent.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.Object s_InternalSyncObject
::Il2CppObject* System::Net::Sockets::Socket::_get_s_InternalSyncObject() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_s_InternalSyncObject");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Il2CppObject*>("System.Net.Sockets", "Socket", "s_InternalSyncObject"));
}
// Autogenerated static field setter
// Set static field: static private System.Object s_InternalSyncObject
void System::Net::Sockets::Socket::_set_s_InternalSyncObject(::Il2CppObject* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_s_InternalSyncObject");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "s_InternalSyncObject", value));
}
// Autogenerated static field getter
// Get static field: static System.Boolean s_SupportsIPv4
bool System::Net::Sockets::Socket::_get_s_SupportsIPv4() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_s_SupportsIPv4");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.Sockets", "Socket", "s_SupportsIPv4"));
}
// Autogenerated static field setter
// Set static field: static System.Boolean s_SupportsIPv4
void System::Net::Sockets::Socket::_set_s_SupportsIPv4(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_s_SupportsIPv4");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "s_SupportsIPv4", value));
}
// Autogenerated static field getter
// Get static field: static System.Boolean s_SupportsIPv6
bool System::Net::Sockets::Socket::_get_s_SupportsIPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_s_SupportsIPv6");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.Sockets", "Socket", "s_SupportsIPv6"));
}
// Autogenerated static field setter
// Set static field: static System.Boolean s_SupportsIPv6
void System::Net::Sockets::Socket::_set_s_SupportsIPv6(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_s_SupportsIPv6");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "s_SupportsIPv6", value));
}
// Autogenerated static field getter
// Get static field: static System.Boolean s_OSSupportsIPv6
bool System::Net::Sockets::Socket::_get_s_OSSupportsIPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_s_OSSupportsIPv6");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.Sockets", "Socket", "s_OSSupportsIPv6"));
}
// Autogenerated static field setter
// Set static field: static System.Boolean s_OSSupportsIPv6
void System::Net::Sockets::Socket::_set_s_OSSupportsIPv6(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_s_OSSupportsIPv6");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "s_OSSupportsIPv6", value));
}
// Autogenerated static field getter
// Get static field: static System.Boolean s_Initialized
bool System::Net::Sockets::Socket::_get_s_Initialized() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_s_Initialized");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.Sockets", "Socket", "s_Initialized"));
}
// Autogenerated static field setter
// Set static field: static System.Boolean s_Initialized
void System::Net::Sockets::Socket::_set_s_Initialized(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_s_Initialized");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "s_Initialized", value));
}
// Autogenerated static field getter
// Get static field: static private System.Boolean s_LoggingEnabled
bool System::Net::Sockets::Socket::_get_s_LoggingEnabled() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_s_LoggingEnabled");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.Sockets", "Socket", "s_LoggingEnabled"));
}
// Autogenerated static field setter
// Set static field: static private System.Boolean s_LoggingEnabled
void System::Net::Sockets::Socket::_set_s_LoggingEnabled(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_s_LoggingEnabled");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "s_LoggingEnabled", value));
}
// Autogenerated static field getter
// Get static field: static System.Boolean s_PerfCountersEnabled
bool System::Net::Sockets::Socket::_get_s_PerfCountersEnabled() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_s_PerfCountersEnabled");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.Sockets", "Socket", "s_PerfCountersEnabled"));
}
// Autogenerated static field setter
// Set static field: static System.Boolean s_PerfCountersEnabled
void System::Net::Sockets::Socket::_set_s_PerfCountersEnabled(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_s_PerfCountersEnabled");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "s_PerfCountersEnabled", value));
}
// Autogenerated static field getter
// Get static field: static System.Int32 DefaultCloseTimeout
int System::Net::Sockets::Socket::_get_DefaultCloseTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_DefaultCloseTimeout");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("System.Net.Sockets", "Socket", "DefaultCloseTimeout"));
}
// Autogenerated static field setter
// Set static field: static System.Int32 DefaultCloseTimeout
void System::Net::Sockets::Socket::_set_DefaultCloseTimeout(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_DefaultCloseTimeout");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "DefaultCloseTimeout", value));
}
// Autogenerated static field getter
// Get static field: static private System.Int32 SOCKET_CLOSED_CODE
int System::Net::Sockets::Socket::_get_SOCKET_CLOSED_CODE() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_SOCKET_CLOSED_CODE");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("System.Net.Sockets", "Socket", "SOCKET_CLOSED_CODE"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 SOCKET_CLOSED_CODE
void System::Net::Sockets::Socket::_set_SOCKET_CLOSED_CODE(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_SOCKET_CLOSED_CODE");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "SOCKET_CLOSED_CODE", value));
}
// Autogenerated static field getter
// Get static field: static private System.String TIMEOUT_EXCEPTION_MSG
::StringW System::Net::Sockets::Socket::_get_TIMEOUT_EXCEPTION_MSG() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_TIMEOUT_EXCEPTION_MSG");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::StringW>("System.Net.Sockets", "Socket", "TIMEOUT_EXCEPTION_MSG"));
}
// Autogenerated static field setter
// Set static field: static private System.String TIMEOUT_EXCEPTION_MSG
void System::Net::Sockets::Socket::_set_TIMEOUT_EXCEPTION_MSG(::StringW value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_TIMEOUT_EXCEPTION_MSG");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "TIMEOUT_EXCEPTION_MSG", value));
}
// Autogenerated static field getter
// Get static field: static private System.AsyncCallback AcceptAsyncCallback
::System::AsyncCallback* System::Net::Sockets::Socket::_get_AcceptAsyncCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_AcceptAsyncCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::AsyncCallback*>("System.Net.Sockets", "Socket", "AcceptAsyncCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.AsyncCallback AcceptAsyncCallback
void System::Net::Sockets::Socket::_set_AcceptAsyncCallback(::System::AsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_AcceptAsyncCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "AcceptAsyncCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginAcceptCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginAcceptCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginAcceptCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginAcceptCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginAcceptCallback
void System::Net::Sockets::Socket::_set_BeginAcceptCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginAcceptCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginAcceptCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginAcceptReceiveCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginAcceptReceiveCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginAcceptReceiveCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginAcceptReceiveCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginAcceptReceiveCallback
void System::Net::Sockets::Socket::_set_BeginAcceptReceiveCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginAcceptReceiveCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginAcceptReceiveCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.AsyncCallback ConnectAsyncCallback
::System::AsyncCallback* System::Net::Sockets::Socket::_get_ConnectAsyncCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_ConnectAsyncCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::AsyncCallback*>("System.Net.Sockets", "Socket", "ConnectAsyncCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.AsyncCallback ConnectAsyncCallback
void System::Net::Sockets::Socket::_set_ConnectAsyncCallback(::System::AsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_ConnectAsyncCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "ConnectAsyncCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginConnectCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginConnectCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginConnectCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginConnectCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginConnectCallback
void System::Net::Sockets::Socket::_set_BeginConnectCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginConnectCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginConnectCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.AsyncCallback DisconnectAsyncCallback
::System::AsyncCallback* System::Net::Sockets::Socket::_get_DisconnectAsyncCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_DisconnectAsyncCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::AsyncCallback*>("System.Net.Sockets", "Socket", "DisconnectAsyncCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.AsyncCallback DisconnectAsyncCallback
void System::Net::Sockets::Socket::_set_DisconnectAsyncCallback(::System::AsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_DisconnectAsyncCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "DisconnectAsyncCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginDisconnectCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginDisconnectCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginDisconnectCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginDisconnectCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginDisconnectCallback
void System::Net::Sockets::Socket::_set_BeginDisconnectCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginDisconnectCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginDisconnectCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.AsyncCallback ReceiveAsyncCallback
::System::AsyncCallback* System::Net::Sockets::Socket::_get_ReceiveAsyncCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_ReceiveAsyncCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::AsyncCallback*>("System.Net.Sockets", "Socket", "ReceiveAsyncCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.AsyncCallback ReceiveAsyncCallback
void System::Net::Sockets::Socket::_set_ReceiveAsyncCallback(::System::AsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_ReceiveAsyncCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "ReceiveAsyncCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginReceiveCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginReceiveCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginReceiveCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginReceiveCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginReceiveCallback
void System::Net::Sockets::Socket::_set_BeginReceiveCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginReceiveCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginReceiveCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginReceiveGenericCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginReceiveGenericCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginReceiveGenericCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginReceiveGenericCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginReceiveGenericCallback
void System::Net::Sockets::Socket::_set_BeginReceiveGenericCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginReceiveGenericCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginReceiveGenericCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.AsyncCallback ReceiveFromAsyncCallback
::System::AsyncCallback* System::Net::Sockets::Socket::_get_ReceiveFromAsyncCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_ReceiveFromAsyncCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::AsyncCallback*>("System.Net.Sockets", "Socket", "ReceiveFromAsyncCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.AsyncCallback ReceiveFromAsyncCallback
void System::Net::Sockets::Socket::_set_ReceiveFromAsyncCallback(::System::AsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_ReceiveFromAsyncCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "ReceiveFromAsyncCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginReceiveFromCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginReceiveFromCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginReceiveFromCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginReceiveFromCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginReceiveFromCallback
void System::Net::Sockets::Socket::_set_BeginReceiveFromCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginReceiveFromCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginReceiveFromCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.AsyncCallback SendAsyncCallback
::System::AsyncCallback* System::Net::Sockets::Socket::_get_SendAsyncCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_SendAsyncCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::AsyncCallback*>("System.Net.Sockets", "Socket", "SendAsyncCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.AsyncCallback SendAsyncCallback
void System::Net::Sockets::Socket::_set_SendAsyncCallback(::System::AsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_SendAsyncCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "SendAsyncCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.IOAsyncCallback BeginSendGenericCallback
::System::IOAsyncCallback* System::Net::Sockets::Socket::_get_BeginSendGenericCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_BeginSendGenericCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket", "BeginSendGenericCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.IOAsyncCallback BeginSendGenericCallback
void System::Net::Sockets::Socket::_set_BeginSendGenericCallback(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_BeginSendGenericCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "BeginSendGenericCallback", value));
}
// Autogenerated static field getter
// Get static field: static private System.AsyncCallback SendToAsyncCallback
::System::AsyncCallback* System::Net::Sockets::Socket::_get_SendToAsyncCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_get_SendToAsyncCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::AsyncCallback*>("System.Net.Sockets", "Socket", "SendToAsyncCallback"));
}
// Autogenerated static field setter
// Set static field: static private System.AsyncCallback SendToAsyncCallback
void System::Net::Sockets::Socket::_set_SendToAsyncCallback(::System::AsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::_set_SendToAsyncCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket", "SendToAsyncCallback", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean is_closed
bool& System::Net::Sockets::Socket::dyn_is_closed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_is_closed");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "is_closed"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean is_listening
bool& System::Net::Sockets::Socket::dyn_is_listening() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_is_listening");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "is_listening"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean useOverlappedIO
bool& System::Net::Sockets::Socket::dyn_useOverlappedIO() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_useOverlappedIO");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "useOverlappedIO"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 linger_timeout
int& System::Net::Sockets::Socket::dyn_linger_timeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_linger_timeout");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "linger_timeout"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.AddressFamily addressFamily
::System::Net::Sockets::AddressFamily& System::Net::Sockets::Socket::dyn_addressFamily() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_addressFamily");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "addressFamily"))->offset;
return *reinterpret_cast<::System::Net::Sockets::AddressFamily*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.SocketType socketType
::System::Net::Sockets::SocketType& System::Net::Sockets::Socket::dyn_socketType() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_socketType");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "socketType"))->offset;
return *reinterpret_cast<::System::Net::Sockets::SocketType*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.ProtocolType protocolType
::System::Net::Sockets::ProtocolType& System::Net::Sockets::Socket::dyn_protocolType() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_protocolType");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "protocolType"))->offset;
return *reinterpret_cast<::System::Net::Sockets::ProtocolType*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Net.Sockets.SafeSocketHandle m_Handle
::System::Net::Sockets::SafeSocketHandle*& System::Net::Sockets::Socket::dyn_m_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_m_Handle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Handle"))->offset;
return *reinterpret_cast<::System::Net::Sockets::SafeSocketHandle**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Net.EndPoint seed_endpoint
::System::Net::EndPoint*& System::Net::Sockets::Socket::dyn_seed_endpoint() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_seed_endpoint");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "seed_endpoint"))->offset;
return *reinterpret_cast<::System::Net::EndPoint**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Threading.SemaphoreSlim ReadSem
::System::Threading::SemaphoreSlim*& System::Net::Sockets::Socket::dyn_ReadSem() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_ReadSem");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "ReadSem"))->offset;
return *reinterpret_cast<::System::Threading::SemaphoreSlim**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Threading.SemaphoreSlim WriteSem
::System::Threading::SemaphoreSlim*& System::Net::Sockets::Socket::dyn_WriteSem() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_WriteSem");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "WriteSem"))->offset;
return *reinterpret_cast<::System::Threading::SemaphoreSlim**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Boolean is_blocking
bool& System::Net::Sockets::Socket::dyn_is_blocking() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_is_blocking");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "is_blocking"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Boolean is_bound
bool& System::Net::Sockets::Socket::dyn_is_bound() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_is_bound");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "is_bound"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Boolean is_connected
bool& System::Net::Sockets::Socket::dyn_is_connected() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_is_connected");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "is_connected"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 m_IntCleanedUp
int& System::Net::Sockets::Socket::dyn_m_IntCleanedUp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_m_IntCleanedUp");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_IntCleanedUp"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Boolean connect_in_progress
bool& System::Net::Sockets::Socket::dyn_connect_in_progress() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::dyn_connect_in_progress");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "connect_in_progress"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: readonly System.Int32 ID
int& System::Net::Sockets::Socket::dyn_ID() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::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 method: System.Net.Sockets.Socket.get_SupportsIPv4
bool System::Net::Sockets::Socket::get_SupportsIPv4() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_SupportsIPv4");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "get_SupportsIPv4", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_OSSupportsIPv4
bool System::Net::Sockets::Socket::get_OSSupportsIPv4() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_OSSupportsIPv4");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "get_OSSupportsIPv4", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_SupportsIPv6
bool System::Net::Sockets::Socket::get_SupportsIPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_SupportsIPv6");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "get_SupportsIPv6", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_OSSupportsIPv6
bool System::Net::Sockets::Socket::get_OSSupportsIPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_OSSupportsIPv6");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "get_OSSupportsIPv6", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_Handle
::System::IntPtr System::Net::Sockets::Socket::get_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_Handle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Handle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_AddressFamily
::System::Net::Sockets::AddressFamily System::Net::Sockets::Socket::get_AddressFamily() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_AddressFamily");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_AddressFamily", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::AddressFamily, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_SocketType
::System::Net::Sockets::SocketType System::Net::Sockets::Socket::get_SocketType() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_SocketType");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_SocketType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::SocketType, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_ProtocolType
::System::Net::Sockets::ProtocolType System::Net::Sockets::Socket::get_ProtocolType() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_ProtocolType");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ProtocolType", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::ProtocolType, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.set_ExclusiveAddressUse
void System::Net::Sockets::Socket::set_ExclusiveAddressUse(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::set_ExclusiveAddressUse");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ExclusiveAddressUse", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.Socket.set_DontFragment
void System::Net::Sockets::Socket::set_DontFragment(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::set_DontFragment");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_DontFragment", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.Socket.get_DualMode
bool System::Net::Sockets::Socket::get_DualMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_DualMode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DualMode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.set_DualMode
void System::Net::Sockets::Socket::set_DualMode(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::set_DualMode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_DualMode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.Socket.get_IsDualMode
bool System::Net::Sockets::Socket::get_IsDualMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_IsDualMode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsDualMode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_InternalSyncObject
::Il2CppObject* System::Net::Sockets::Socket::get_InternalSyncObject() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_InternalSyncObject");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "get_InternalSyncObject", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_CleanedUp
bool System::Net::Sockets::Socket::get_CleanedUp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_CleanedUp");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CleanedUp", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_Available
int System::Net::Sockets::Socket::get_Available() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_Available");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Available", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_IsBound
bool System::Net::Sockets::Socket::get_IsBound() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_IsBound");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsBound", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_LocalEndPoint
::System::Net::EndPoint* System::Net::Sockets::Socket::get_LocalEndPoint() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_LocalEndPoint");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_LocalEndPoint", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::EndPoint*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.get_Blocking
bool System::Net::Sockets::Socket::get_Blocking() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_Blocking");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Blocking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.set_Blocking
void System::Net::Sockets::Socket::set_Blocking(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::set_Blocking");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Blocking", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.Socket.get_Connected
bool System::Net::Sockets::Socket::get_Connected() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_Connected");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Connected", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.set_NoDelay
void System::Net::Sockets::Socket::set_NoDelay(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::set_NoDelay");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_NoDelay", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.Socket.get_FamilyHint
int System::Net::Sockets::Socket::get_FamilyHint() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::get_FamilyHint");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "get_FamilyHint", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket..cctor
void System::Net::Sockets::Socket::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.Send
int System::Net::Sockets::Socket::Send(::System::Collections::Generic::IList_1<::System::ArraySegment_1<uint8_t>>* buffers, ::System::Net::Sockets::SocketFlags socketFlags) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Send", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffers), ::il2cpp_utils::ExtractType(socketFlags)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffers, socketFlags);
}
// Autogenerated method: System.Net.Sockets.Socket.Send
int System::Net::Sockets::Socket::Send(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Send", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, size, socketFlags);
}
// Autogenerated method: System.Net.Sockets.Socket.Receive
int System::Net::Sockets::Socket::Receive(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Receive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, size, socketFlags);
}
// Autogenerated method: System.Net.Sockets.Socket.Receive
int System::Net::Sockets::Socket::Receive(::System::Collections::Generic::IList_1<::System::ArraySegment_1<uint8_t>>* buffers, ::System::Net::Sockets::SocketFlags socketFlags) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Receive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffers), ::il2cpp_utils::ExtractType(socketFlags)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffers, socketFlags);
}
// Autogenerated method: System.Net.Sockets.Socket.ReceiveFrom
int System::Net::Sockets::Socket::ReceiveFrom(::ArrayW<uint8_t> buffer, int size, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::EndPoint*> remoteEP) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ReceiveFrom");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReceiveFrom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractType(remoteEP)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, size, socketFlags, byref(remoteEP));
}
// Autogenerated method: System.Net.Sockets.Socket.IOControl
int System::Net::Sockets::Socket::IOControl(::System::Net::Sockets::IOControlCode ioControlCode, ::ArrayW<uint8_t> optionInValue, ::ArrayW<uint8_t> optionOutValue) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::IOControl");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IOControl", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ioControlCode), ::il2cpp_utils::ExtractType(optionInValue), ::il2cpp_utils::ExtractType(optionOutValue)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, ioControlCode, optionInValue, optionOutValue);
}
// Autogenerated method: System.Net.Sockets.Socket.SetIPProtectionLevel
void System::Net::Sockets::Socket::SetIPProtectionLevel(::System::Net::Sockets::IPProtectionLevel level) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::SetIPProtectionLevel");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetIPProtectionLevel", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(level)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, level);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginSend
::System::IAsyncResult* System::Net::Sockets::Socket::BeginSend(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginSend");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginSend", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, size, socketFlags, callback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.EndSend
int System::Net::Sockets::Socket::EndSend(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndSend");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndSend", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginReceive
::System::IAsyncResult* System::Net::Sockets::Socket::BeginReceive(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginReceive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginReceive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, size, socketFlags, callback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.EndReceive
int System::Net::Sockets::Socket::EndReceive(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndReceive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndReceive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.Socket.InitializeSockets
void System::Net::Sockets::Socket::InitializeSockets() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::InitializeSockets");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "InitializeSockets", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.Dispose
void System::Net::Sockets::Socket::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.InternalShutdown
void System::Net::Sockets::Socket::InternalShutdown(::System::Net::Sockets::SocketShutdown how) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::InternalShutdown");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InternalShutdown", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(how)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, how);
}
// Autogenerated method: System.Net.Sockets.Socket.SetSocketOption
void System::Net::Sockets::Socket::SetSocketOption(::System::Net::Sockets::SocketOptionLevel optionLevel, ::System::Net::Sockets::SocketOptionName optionName, int optionValue, bool silent) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::SetSocketOption");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetSocketOption", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(optionLevel), ::il2cpp_utils::ExtractType(optionName), ::il2cpp_utils::ExtractType(optionValue), ::il2cpp_utils::ExtractType(silent)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, optionLevel, optionName, optionValue, silent);
}
// Autogenerated method: System.Net.Sockets.Socket.SocketDefaults
void System::Net::Sockets::Socket::SocketDefaults() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::SocketDefaults");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SocketDefaults", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.Socket_internal
::System::IntPtr System::Net::Sockets::Socket::Socket_internal(::System::Net::Sockets::AddressFamily family, ::System::Net::Sockets::SocketType type, ::System::Net::Sockets::ProtocolType proto, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Socket_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Socket_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(family), ::il2cpp_utils::ExtractType(type), ::il2cpp_utils::ExtractType(proto), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, family, type, proto, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Available_internal
int System::Net::Sockets::Socket::Available_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Available_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Available_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Available_internal
int System::Net::Sockets::Socket::Available_internal(::System::IntPtr socket, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Available_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Available_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.LocalEndPoint_internal
::System::Net::SocketAddress* System::Net::Sockets::Socket::LocalEndPoint_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, int family, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::LocalEndPoint_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "LocalEndPoint_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(family), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::SocketAddress*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, family, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.LocalEndPoint_internal
::System::Net::SocketAddress* System::Net::Sockets::Socket::LocalEndPoint_internal(::System::IntPtr socket, int family, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::LocalEndPoint_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "LocalEndPoint_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(family), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::SocketAddress*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, family, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Blocking_internal
void System::Net::Sockets::Socket::Blocking_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, bool block, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Blocking_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Blocking_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(block), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, block, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Blocking_internal
void System::Net::Sockets::Socket::Blocking_internal(::System::IntPtr socket, bool block, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Blocking_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Blocking_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(block), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, block, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Poll
bool System::Net::Sockets::Socket::Poll(int microSeconds, ::System::Net::Sockets::SelectMode mode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Poll");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Poll", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(microSeconds), ::il2cpp_utils::ExtractType(mode)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, microSeconds, mode);
}
// Autogenerated method: System.Net.Sockets.Socket.Poll_internal
bool System::Net::Sockets::Socket::Poll_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::Sockets::SelectMode mode, int timeout, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Poll_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Poll_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(mode), ::il2cpp_utils::ExtractType(timeout), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, mode, timeout, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Poll_internal
bool System::Net::Sockets::Socket::Poll_internal(::System::IntPtr socket, ::System::Net::Sockets::SelectMode mode, int timeout, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Poll_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Poll_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(mode), ::il2cpp_utils::ExtractType(timeout), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, mode, timeout, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Accept
::System::Net::Sockets::Socket* System::Net::Sockets::Socket::Accept() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Accept");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Accept", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::Socket*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.Accept
void System::Net::Sockets::Socket::Accept(::System::Net::Sockets::Socket* acceptSocket) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Accept");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Accept", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(acceptSocket)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, acceptSocket);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginAccept
::System::IAsyncResult* System::Net::Sockets::Socket::BeginAccept(::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginAccept");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginAccept", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.EndAccept
::System::Net::Sockets::Socket* System::Net::Sockets::Socket::EndAccept(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndAccept");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndAccept", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::Socket*, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.Socket.EndAccept
::System::Net::Sockets::Socket* System::Net::Sockets::Socket::EndAccept(ByRef<::ArrayW<uint8_t>> buffer, ByRef<int> bytesTransferred, ::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndAccept");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndAccept", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractIndependentType<::ArrayW<uint8_t>&>(), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::Socket*, false>(this, ___internal__method, byref(buffer), byref(bytesTransferred), asyncResult);
}
// Autogenerated method: System.Net.Sockets.Socket.Accept_internal
::System::Net::Sockets::SafeSocketHandle* System::Net::Sockets::Socket::Accept_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Accept_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Accept_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::SafeSocketHandle*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Accept_internal
::System::IntPtr System::Net::Sockets::Socket::Accept_internal(::System::IntPtr sock, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Accept_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Accept_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Bind
void System::Net::Sockets::Socket::Bind(::System::Net::EndPoint* localEP) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Bind");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Bind", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(localEP)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, localEP);
}
// Autogenerated method: System.Net.Sockets.Socket.Bind_internal
void System::Net::Sockets::Socket::Bind_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::SocketAddress* sa, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Bind_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Bind_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(sa), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, sa, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Bind_internal
void System::Net::Sockets::Socket::Bind_internal(::System::IntPtr sock, ::System::Net::SocketAddress* sa, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Bind_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Bind_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(sa), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, sa, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Listen
void System::Net::Sockets::Socket::Listen(int backlog) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Listen");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Listen", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(backlog)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, backlog);
}
// Autogenerated method: System.Net.Sockets.Socket.Listen_internal
void System::Net::Sockets::Socket::Listen_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, int backlog, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Listen_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Listen_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(backlog), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, backlog, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Listen_internal
void System::Net::Sockets::Socket::Listen_internal(::System::IntPtr sock, int backlog, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Listen_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Listen_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(backlog), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, backlog, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Connect
void System::Net::Sockets::Socket::Connect(::System::Net::EndPoint* remoteEP) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Connect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Connect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(remoteEP)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, remoteEP);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginConnect
::System::IAsyncResult* System::Net::Sockets::Socket::BeginConnect(::StringW host, int port, ::System::AsyncCallback* requestCallback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(host), ::il2cpp_utils::ExtractType(port), ::il2cpp_utils::ExtractType(requestCallback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, host, port, requestCallback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginConnect
::System::IAsyncResult* System::Net::Sockets::Socket::BeginConnect(::System::Net::EndPoint* remoteEP, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(remoteEP), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, remoteEP, callback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginConnect
::System::IAsyncResult* System::Net::Sockets::Socket::BeginConnect(::ArrayW<::System::Net::IPAddress*> addresses, int port, ::System::AsyncCallback* requestCallback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(addresses), ::il2cpp_utils::ExtractType(port), ::il2cpp_utils::ExtractType(requestCallback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, addresses, port, requestCallback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginMConnect
void System::Net::Sockets::Socket::BeginMConnect(::System::Net::Sockets::SocketAsyncResult* sockares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginMConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "BeginMConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sockares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sockares);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginSConnect
void System::Net::Sockets::Socket::BeginSConnect(::System::Net::Sockets::SocketAsyncResult* sockares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginSConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "BeginSConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sockares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sockares);
}
// Autogenerated method: System.Net.Sockets.Socket.EndConnect
void System::Net::Sockets::Socket::EndConnect(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.Socket.Connect_internal
void System::Net::Sockets::Socket::Connect_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::SocketAddress* sa, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Connect_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Connect_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(sa), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, sa, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Connect_internal
void System::Net::Sockets::Socket::Connect_internal(::System::IntPtr sock, ::System::Net::SocketAddress* sa, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Connect_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Connect_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(sa), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, sa, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Disconnect
void System::Net::Sockets::Socket::Disconnect(bool reuseSocket) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Disconnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Disconnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(reuseSocket)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, reuseSocket);
}
// Autogenerated method: System.Net.Sockets.Socket.EndDisconnect
void System::Net::Sockets::Socket::EndDisconnect(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndDisconnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndDisconnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.Socket.Disconnect_internal
void System::Net::Sockets::Socket::Disconnect_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, bool reuse, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Disconnect_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Disconnect_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(reuse), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, reuse, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Disconnect_internal
void System::Net::Sockets::Socket::Disconnect_internal(::System::IntPtr sock, bool reuse, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Disconnect_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Disconnect_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(reuse), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, reuse, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Receive
int System::Net::Sockets::Socket::Receive(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::Sockets::SocketError> errorCode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Receive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, size, socketFlags, byref(errorCode));
}
// Autogenerated method: System.Net.Sockets.Socket.Receive
int System::Net::Sockets::Socket::Receive(::System::Collections::Generic::IList_1<::System::ArraySegment_1<uint8_t>>* buffers, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::Sockets::SocketError> errorCode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Receive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffers), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffers, socketFlags, byref(errorCode));
}
// Autogenerated method: System.Net.Sockets.Socket.BeginReceive
::System::IAsyncResult* System::Net::Sockets::Socket::BeginReceive(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::Sockets::SocketError> errorCode, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginReceive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginReceive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>(), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, size, socketFlags, byref(errorCode), callback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.EndReceive
int System::Net::Sockets::Socket::EndReceive(::System::IAsyncResult* asyncResult, ByRef<::System::Net::Sockets::SocketError> errorCode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndReceive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndReceive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult, byref(errorCode));
}
// Autogenerated method: System.Net.Sockets.Socket.Receive_internal
int System::Net::Sockets::Socket::Receive_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::Sockets::Socket::WSABUF* bufarray, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Receive_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(bufarray), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, bufarray, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Receive_internal
int System::Net::Sockets::Socket::Receive_internal(::System::IntPtr sock, ::System::Net::Sockets::Socket::WSABUF* bufarray, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Receive_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(bufarray), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, bufarray, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Receive_internal
int System::Net::Sockets::Socket::Receive_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, uint8_t* buffer, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Receive_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, buffer, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Receive_internal
int System::Net::Sockets::Socket::Receive_internal(::System::IntPtr sock, uint8_t* buffer, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Receive_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Receive_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, buffer, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.ReceiveFrom
int System::Net::Sockets::Socket::ReceiveFrom(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::EndPoint*> remoteEP) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ReceiveFrom");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReceiveFrom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractType(remoteEP)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, size, socketFlags, byref(remoteEP));
}
// Autogenerated method: System.Net.Sockets.Socket.ReceiveFrom
int System::Net::Sockets::Socket::ReceiveFrom(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::EndPoint*> remoteEP, ByRef<::System::Net::Sockets::SocketError> errorCode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ReceiveFrom");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReceiveFrom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractType(remoteEP), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, size, socketFlags, byref(remoteEP), byref(errorCode));
}
// Autogenerated method: System.Net.Sockets.Socket.EndReceiveFrom
int System::Net::Sockets::Socket::EndReceiveFrom(::System::IAsyncResult* asyncResult, ByRef<::System::Net::EndPoint*> endPoint) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndReceiveFrom");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndReceiveFrom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult), ::il2cpp_utils::ExtractType(endPoint)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult, byref(endPoint));
}
// Autogenerated method: System.Net.Sockets.Socket.ReceiveFrom_internal
int System::Net::Sockets::Socket::ReceiveFrom_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, uint8_t* buffer, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<::System::Net::SocketAddress*> sockaddr, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ReceiveFrom_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "ReceiveFrom_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractType(sockaddr), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, buffer, count, flags, byref(sockaddr), byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.ReceiveFrom_internal
int System::Net::Sockets::Socket::ReceiveFrom_internal(::System::IntPtr sock, uint8_t* buffer, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<::System::Net::SocketAddress*> sockaddr, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ReceiveFrom_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "ReceiveFrom_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractType(sockaddr), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, buffer, count, flags, byref(sockaddr), byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Send
int System::Net::Sockets::Socket::Send(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::Sockets::SocketError> errorCode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Send", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, size, socketFlags, byref(errorCode));
}
// Autogenerated method: System.Net.Sockets.Socket.Send
int System::Net::Sockets::Socket::Send(::System::Collections::Generic::IList_1<::System::ArraySegment_1<uint8_t>>* buffers, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::Sockets::SocketError> errorCode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Send", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffers), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffers, socketFlags, byref(errorCode));
}
// Autogenerated method: System.Net.Sockets.Socket.BeginSend
::System::IAsyncResult* System::Net::Sockets::Socket::BeginSend(::ArrayW<uint8_t> buffer, int offset, int size, ::System::Net::Sockets::SocketFlags socketFlags, ByRef<::System::Net::Sockets::SocketError> errorCode, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginSend");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginSend", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size), ::il2cpp_utils::ExtractType(socketFlags), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>(), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, size, socketFlags, byref(errorCode), callback, state);
}
// Autogenerated method: System.Net.Sockets.Socket.BeginSendCallback
void System::Net::Sockets::Socket::BeginSendCallback(::System::Net::Sockets::SocketAsyncResult* sockares, int sent_so_far) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::BeginSendCallback");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "BeginSendCallback", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sockares), ::il2cpp_utils::ExtractType(sent_so_far)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sockares, sent_so_far);
}
// Autogenerated method: System.Net.Sockets.Socket.EndSend
int System::Net::Sockets::Socket::EndSend(::System::IAsyncResult* asyncResult, ByRef<::System::Net::Sockets::SocketError> errorCode) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndSend");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndSend", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult), ::il2cpp_utils::ExtractIndependentType<::System::Net::Sockets::SocketError&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult, byref(errorCode));
}
// Autogenerated method: System.Net.Sockets.Socket.Send_internal
int System::Net::Sockets::Socket::Send_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::Sockets::Socket::WSABUF* bufarray, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Send_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(bufarray), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, bufarray, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Send_internal
int System::Net::Sockets::Socket::Send_internal(::System::IntPtr sock, ::System::Net::Sockets::Socket::WSABUF* bufarray, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Send_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(bufarray), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, bufarray, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Send_internal
int System::Net::Sockets::Socket::Send_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, uint8_t* buffer, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Send_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, buffer, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.Send_internal
int System::Net::Sockets::Socket::Send_internal(::System::IntPtr sock, uint8_t* buffer, int count, ::System::Net::Sockets::SocketFlags flags, ByRef<int> error, bool blocking) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Send_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Send_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(flags), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(blocking)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, buffer, count, flags, byref(error), blocking);
}
// Autogenerated method: System.Net.Sockets.Socket.EndSendTo
int System::Net::Sockets::Socket::EndSendTo(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::EndSendTo");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndSendTo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.Socket.GetSocketOption
::Il2CppObject* System::Net::Sockets::Socket::GetSocketOption(::System::Net::Sockets::SocketOptionLevel optionLevel, ::System::Net::Sockets::SocketOptionName optionName) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::GetSocketOption");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetSocketOption", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(optionLevel), ::il2cpp_utils::ExtractType(optionName)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, optionLevel, optionName);
}
// Autogenerated method: System.Net.Sockets.Socket.GetSocketOption_obj_internal
void System::Net::Sockets::Socket::GetSocketOption_obj_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::Sockets::SocketOptionLevel level, ::System::Net::Sockets::SocketOptionName name, ByRef<::Il2CppObject*> obj_val, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::GetSocketOption_obj_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "GetSocketOption_obj_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(level), ::il2cpp_utils::ExtractType(name), ::il2cpp_utils::ExtractIndependentType<::Il2CppObject*&>(), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, level, name, byref(obj_val), byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.GetSocketOption_obj_internal
void System::Net::Sockets::Socket::GetSocketOption_obj_internal(::System::IntPtr socket, ::System::Net::Sockets::SocketOptionLevel level, ::System::Net::Sockets::SocketOptionName name, ByRef<::Il2CppObject*> obj_val, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::GetSocketOption_obj_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "GetSocketOption_obj_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(level), ::il2cpp_utils::ExtractType(name), ::il2cpp_utils::ExtractIndependentType<::Il2CppObject*&>(), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, level, name, byref(obj_val), byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.SetSocketOption
void System::Net::Sockets::Socket::SetSocketOption(::System::Net::Sockets::SocketOptionLevel optionLevel, ::System::Net::Sockets::SocketOptionName optionName, int optionValue) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::SetSocketOption");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetSocketOption", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(optionLevel), ::il2cpp_utils::ExtractType(optionName), ::il2cpp_utils::ExtractType(optionValue)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, optionLevel, optionName, optionValue);
}
// Autogenerated method: System.Net.Sockets.Socket.SetSocketOption_internal
void System::Net::Sockets::Socket::SetSocketOption_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::Sockets::SocketOptionLevel level, ::System::Net::Sockets::SocketOptionName name, ::Il2CppObject* obj_val, ::ArrayW<uint8_t> byte_val, int int_val, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::SetSocketOption_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "SetSocketOption_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(level), ::il2cpp_utils::ExtractType(name), ::il2cpp_utils::ExtractType(obj_val), ::il2cpp_utils::ExtractType(byte_val), ::il2cpp_utils::ExtractType(int_val), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, level, name, obj_val, byte_val, int_val, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.SetSocketOption_internal
void System::Net::Sockets::Socket::SetSocketOption_internal(::System::IntPtr socket, ::System::Net::Sockets::SocketOptionLevel level, ::System::Net::Sockets::SocketOptionName name, ::Il2CppObject* obj_val, ::ArrayW<uint8_t> byte_val, int int_val, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::SetSocketOption_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "SetSocketOption_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(level), ::il2cpp_utils::ExtractType(name), ::il2cpp_utils::ExtractType(obj_val), ::il2cpp_utils::ExtractType(byte_val), ::il2cpp_utils::ExtractType(int_val), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, level, name, obj_val, byte_val, int_val, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.IOControl
int System::Net::Sockets::Socket::IOControl(int ioControlCode, ::ArrayW<uint8_t> optionInValue, ::ArrayW<uint8_t> optionOutValue) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::IOControl");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "IOControl", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ioControlCode), ::il2cpp_utils::ExtractType(optionInValue), ::il2cpp_utils::ExtractType(optionOutValue)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, ioControlCode, optionInValue, optionOutValue);
}
// Autogenerated method: System.Net.Sockets.Socket.IOControl_internal
int System::Net::Sockets::Socket::IOControl_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, int ioctl_code, ::ArrayW<uint8_t> input, ::ArrayW<uint8_t> output, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::IOControl_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "IOControl_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(ioctl_code), ::il2cpp_utils::ExtractType(input), ::il2cpp_utils::ExtractType(output), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, ioctl_code, input, output, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.IOControl_internal
int System::Net::Sockets::Socket::IOControl_internal(::System::IntPtr sock, int ioctl_code, ::ArrayW<uint8_t> input, ::ArrayW<uint8_t> output, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::IOControl_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "IOControl_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sock), ::il2cpp_utils::ExtractType(ioctl_code), ::il2cpp_utils::ExtractType(input), ::il2cpp_utils::ExtractType(output), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, sock, ioctl_code, input, output, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Close
void System::Net::Sockets::Socket::Close() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Close");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Close", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.Close
void System::Net::Sockets::Socket::Close(int timeout) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Close");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Close", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(timeout)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, timeout);
}
// Autogenerated method: System.Net.Sockets.Socket.Close_internal
void System::Net::Sockets::Socket::Close_internal(::System::IntPtr socket, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Close_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Close_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Shutdown_internal
void System::Net::Sockets::Socket::Shutdown_internal(::System::Net::Sockets::SafeSocketHandle* safeHandle, ::System::Net::Sockets::SocketShutdown how, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Shutdown_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Shutdown_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(safeHandle), ::il2cpp_utils::ExtractType(how), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, safeHandle, how, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Shutdown_internal
void System::Net::Sockets::Socket::Shutdown_internal(::System::IntPtr socket, ::System::Net::Sockets::SocketShutdown how, ByRef<int> error) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Shutdown_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "Shutdown_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(how), ::il2cpp_utils::ExtractIndependentType<int&>()})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, how, byref(error));
}
// Autogenerated method: System.Net.Sockets.Socket.Dispose
void System::Net::Sockets::Socket::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.Net.Sockets.Socket.Linger
void System::Net::Sockets::Socket::Linger(::System::IntPtr handle) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Linger");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Linger", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(handle)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, handle);
}
// Autogenerated method: System.Net.Sockets.Socket.ThrowIfDisposedAndClosed
void System::Net::Sockets::Socket::ThrowIfDisposedAndClosed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ThrowIfDisposedAndClosed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ThrowIfDisposedAndClosed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.ThrowIfBufferNull
void System::Net::Sockets::Socket::ThrowIfBufferNull(::ArrayW<uint8_t> buffer) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ThrowIfBufferNull");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ThrowIfBufferNull", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer);
}
// Autogenerated method: System.Net.Sockets.Socket.ThrowIfBufferOutOfRange
void System::Net::Sockets::Socket::ThrowIfBufferOutOfRange(::ArrayW<uint8_t> buffer, int offset, int size) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ThrowIfBufferOutOfRange");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ThrowIfBufferOutOfRange", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(size)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer, offset, size);
}
// Autogenerated method: System.Net.Sockets.Socket.ThrowIfUdp
void System::Net::Sockets::Socket::ThrowIfUdp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ThrowIfUdp");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ThrowIfUdp", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket.ValidateEndIAsyncResult
::System::Net::Sockets::SocketAsyncResult* System::Net::Sockets::Socket::ValidateEndIAsyncResult(::System::IAsyncResult* ares, ::StringW methodName, ::StringW argName) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::ValidateEndIAsyncResult");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ValidateEndIAsyncResult", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares), ::il2cpp_utils::ExtractType(methodName), ::il2cpp_utils::ExtractType(argName)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::SocketAsyncResult*, false>(this, ___internal__method, ares, methodName, argName);
}
// Autogenerated method: System.Net.Sockets.Socket.QueueIOSelectorJob
void System::Net::Sockets::Socket::QueueIOSelectorJob(::System::Threading::SemaphoreSlim* sem, ::System::IntPtr handle, ::System::IOSelectorJob* job) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::QueueIOSelectorJob");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "QueueIOSelectorJob", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sem), ::il2cpp_utils::ExtractType(handle), ::il2cpp_utils::ExtractType(job)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, sem, handle, job);
}
// Autogenerated method: System.Net.Sockets.Socket.RemapIPEndPoint
::System::Net::IPEndPoint* System::Net::Sockets::Socket::RemapIPEndPoint(::System::Net::IPEndPoint* input) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::RemapIPEndPoint");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RemapIPEndPoint", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::IPEndPoint*, false>(this, ___internal__method, input);
}
// Autogenerated method: System.Net.Sockets.Socket.cancel_blocking_socket_operation
void System::Net::Sockets::Socket::cancel_blocking_socket_operation(::System::Threading::Thread* thread) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::cancel_blocking_socket_operation");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "cancel_blocking_socket_operation", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(thread)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, thread);
}
// Autogenerated method: System.Net.Sockets.Socket.IsProtocolSupported_internal
bool System::Net::Sockets::Socket::IsProtocolSupported_internal(::System::Net::NetworkInformation::NetworkInterfaceComponent networkInterface) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::IsProtocolSupported_internal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "IsProtocolSupported_internal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(networkInterface)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, networkInterface);
}
// Autogenerated method: System.Net.Sockets.Socket.IsProtocolSupported
bool System::Net::Sockets::Socket::IsProtocolSupported(::System::Net::NetworkInformation::NetworkInterfaceComponent networkInterface) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::IsProtocolSupported");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket", "IsProtocolSupported", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(networkInterface)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, networkInterface);
}
// Autogenerated method: System.Net.Sockets.Socket.Finalize
void System::Net::Sockets::Socket::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.Socket/System.Net.Sockets.<>c
#include "System/Net/Sockets/Socket_--c.hpp"
// Including type: System.IOAsyncCallback
#include "System/IOAsyncCallback.hpp"
// Including type: System.IOAsyncResult
#include "System/IOAsyncResult.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.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 System.Net.Sockets.Socket/System.Net.Sockets.<>c <>9
::System::Net::Sockets::Socket::$$c* System::Net::Sockets::Socket::$$c::_get_$$9() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::_get_$$9");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Net::Sockets::Socket::$$c*>("System.Net.Sockets", "Socket/<>c", "<>9")));
}
// Autogenerated static field setter
// Set static field: static public readonly System.Net.Sockets.Socket/System.Net.Sockets.<>c <>9
void System::Net::Sockets::Socket::$$c::_set_$$9(::System::Net::Sockets::Socket::$$c* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::_set_$$9");
THROW_UNLESS((il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket/<>c", "<>9", value)));
}
// Autogenerated static field getter
// Get static field: static public System.IOAsyncCallback <>9__242_0
::System::IOAsyncCallback* System::Net::Sockets::Socket::$$c::_get_$$9__242_0() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::_get_$$9__242_0");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::IOAsyncCallback*>("System.Net.Sockets", "Socket/<>c", "<>9__242_0")));
}
// Autogenerated static field setter
// Set static field: static public System.IOAsyncCallback <>9__242_0
void System::Net::Sockets::Socket::$$c::_set_$$9__242_0(::System::IOAsyncCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::_set_$$9__242_0");
THROW_UNLESS((il2cpp_utils::SetFieldValue("System.Net.Sockets", "Socket/<>c", "<>9__242_0", value)));
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c..cctor
void System::Net::Sockets::Socket::$$c::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "Socket/<>c", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<BeginSend>b__242_0
void System::Net::Sockets::Socket::$$c::$BeginSend$b__242_0(::System::IOAsyncResult* s) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<BeginSend>b__242_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<BeginSend>b__242_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(s)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, s);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_0
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_0(::System::IAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_1
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_1(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_1");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_1", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_2
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_2(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_2");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_2", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_3
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_3(::System::IAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_3");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_3", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_4
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_4(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_4");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_4", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_5
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_5(::System::IAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_5");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_5", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_6
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_6(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_6");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_6", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_7
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_7(::System::IAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_7");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_7", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_8
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_8(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_8");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_8", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_9
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_9(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_9");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_9", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_10
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_10(::System::IAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_10");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_10", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_11
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_11(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_11");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_11", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_12
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_12(::System::IAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_12");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_12", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_13
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_13(::System::IOAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_13");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_13", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c.<.cctor>b__310_14
void System::Net::Sockets::Socket::$$c::$_cctor$b__310_14(::System::IAsyncResult* ares) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c::<.cctor>b__310_14");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<.cctor>b__310_14", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ares)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ares);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.Socket/System.Net.Sockets.<>c__DisplayClass243_0
#include "System/Net/Sockets/Socket_--c__DisplayClass243_0.hpp"
// Including type: System.IOAsyncResult
#include "System/IOAsyncResult.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 sent_so_far
int& System::Net::Sockets::Socket::$$c__DisplayClass243_0::dyn_sent_so_far() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c__DisplayClass243_0::dyn_sent_so_far");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "sent_so_far"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c__DisplayClass243_0.<BeginSendCallback>b__0
void System::Net::Sockets::Socket::$$c__DisplayClass243_0::$BeginSendCallback$b__0(::System::IOAsyncResult* s) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c__DisplayClass243_0::<BeginSendCallback>b__0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<BeginSendCallback>b__0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(s)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, s);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.Socket/System.Net.Sockets.<>c__DisplayClass299_0
#include "System/Net/Sockets/Socket_--c__DisplayClass299_0.hpp"
// Including type: System.IOSelectorJob
#include "System/IOSelectorJob.hpp"
// Including type: System.Threading.Tasks.Task
#include "System/Threading/Tasks/Task.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.Net.Sockets.Socket <>4__this
::System::Net::Sockets::Socket*& System::Net::Sockets::Socket::$$c__DisplayClass299_0::dyn_$$4__this() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c__DisplayClass299_0::dyn_$$4__this");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<>4__this"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.IOSelectorJob job
::System::IOSelectorJob*& System::Net::Sockets::Socket::$$c__DisplayClass299_0::dyn_job() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c__DisplayClass299_0::dyn_job");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "job"))->offset;
return *reinterpret_cast<::System::IOSelectorJob**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.IntPtr handle
::System::IntPtr& System::Net::Sockets::Socket::$$c__DisplayClass299_0::dyn_handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c__DisplayClass299_0::dyn_handle");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "handle"))->offset;
return *reinterpret_cast<::System::IntPtr*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.Socket/System.Net.Sockets.<>c__DisplayClass299_0.<QueueIOSelectorJob>b__0
void System::Net::Sockets::Socket::$$c__DisplayClass299_0::$QueueIOSelectorJob$b__0(::System::Threading::Tasks::Task* t) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::Socket::$$c__DisplayClass299_0::<QueueIOSelectorJob>b__0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<QueueIOSelectorJob>b__0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(t)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, t);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.SocketError
#include "System/Net/Sockets/SocketError.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.Net.Sockets.SocketError Success
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_Success() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_Success");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "Success"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError Success
void System::Net::Sockets::SocketError::_set_Success(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_Success");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "Success", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError SocketError
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_SocketError() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_SocketError");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "SocketError"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError SocketError
void System::Net::Sockets::SocketError::_set_SocketError(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_SocketError");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "SocketError", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError Interrupted
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_Interrupted() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_Interrupted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "Interrupted"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError Interrupted
void System::Net::Sockets::SocketError::_set_Interrupted(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_Interrupted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "Interrupted", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError AccessDenied
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_AccessDenied() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_AccessDenied");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "AccessDenied"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError AccessDenied
void System::Net::Sockets::SocketError::_set_AccessDenied(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_AccessDenied");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "AccessDenied", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError Fault
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_Fault() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_Fault");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "Fault"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError Fault
void System::Net::Sockets::SocketError::_set_Fault(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_Fault");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "Fault", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError InvalidArgument
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_InvalidArgument() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_InvalidArgument");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "InvalidArgument"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError InvalidArgument
void System::Net::Sockets::SocketError::_set_InvalidArgument(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_InvalidArgument");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "InvalidArgument", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError TooManyOpenSockets
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_TooManyOpenSockets() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_TooManyOpenSockets");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "TooManyOpenSockets"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError TooManyOpenSockets
void System::Net::Sockets::SocketError::_set_TooManyOpenSockets(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_TooManyOpenSockets");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "TooManyOpenSockets", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError WouldBlock
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_WouldBlock() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_WouldBlock");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "WouldBlock"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError WouldBlock
void System::Net::Sockets::SocketError::_set_WouldBlock(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_WouldBlock");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "WouldBlock", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError InProgress
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_InProgress() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_InProgress");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "InProgress"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError InProgress
void System::Net::Sockets::SocketError::_set_InProgress(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_InProgress");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "InProgress", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError AlreadyInProgress
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_AlreadyInProgress() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_AlreadyInProgress");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "AlreadyInProgress"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError AlreadyInProgress
void System::Net::Sockets::SocketError::_set_AlreadyInProgress(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_AlreadyInProgress");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "AlreadyInProgress", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NotSocket
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NotSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NotSocket");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NotSocket"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NotSocket
void System::Net::Sockets::SocketError::_set_NotSocket(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NotSocket");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NotSocket", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError DestinationAddressRequired
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_DestinationAddressRequired() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_DestinationAddressRequired");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "DestinationAddressRequired"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError DestinationAddressRequired
void System::Net::Sockets::SocketError::_set_DestinationAddressRequired(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_DestinationAddressRequired");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "DestinationAddressRequired", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError MessageSize
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_MessageSize() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_MessageSize");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "MessageSize"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError MessageSize
void System::Net::Sockets::SocketError::_set_MessageSize(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_MessageSize");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "MessageSize", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ProtocolType
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ProtocolType() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ProtocolType");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ProtocolType"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ProtocolType
void System::Net::Sockets::SocketError::_set_ProtocolType(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ProtocolType");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ProtocolType", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ProtocolOption
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ProtocolOption() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ProtocolOption");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ProtocolOption"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ProtocolOption
void System::Net::Sockets::SocketError::_set_ProtocolOption(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ProtocolOption");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ProtocolOption", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ProtocolNotSupported
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ProtocolNotSupported() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ProtocolNotSupported");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ProtocolNotSupported"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ProtocolNotSupported
void System::Net::Sockets::SocketError::_set_ProtocolNotSupported(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ProtocolNotSupported");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ProtocolNotSupported", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError SocketNotSupported
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_SocketNotSupported() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_SocketNotSupported");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "SocketNotSupported"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError SocketNotSupported
void System::Net::Sockets::SocketError::_set_SocketNotSupported(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_SocketNotSupported");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "SocketNotSupported", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError OperationNotSupported
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_OperationNotSupported() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_OperationNotSupported");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "OperationNotSupported"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError OperationNotSupported
void System::Net::Sockets::SocketError::_set_OperationNotSupported(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_OperationNotSupported");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "OperationNotSupported", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ProtocolFamilyNotSupported
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ProtocolFamilyNotSupported() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ProtocolFamilyNotSupported");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ProtocolFamilyNotSupported"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ProtocolFamilyNotSupported
void System::Net::Sockets::SocketError::_set_ProtocolFamilyNotSupported(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ProtocolFamilyNotSupported");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ProtocolFamilyNotSupported", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError AddressFamilyNotSupported
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_AddressFamilyNotSupported() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_AddressFamilyNotSupported");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "AddressFamilyNotSupported"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError AddressFamilyNotSupported
void System::Net::Sockets::SocketError::_set_AddressFamilyNotSupported(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_AddressFamilyNotSupported");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "AddressFamilyNotSupported", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError AddressAlreadyInUse
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_AddressAlreadyInUse() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_AddressAlreadyInUse");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "AddressAlreadyInUse"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError AddressAlreadyInUse
void System::Net::Sockets::SocketError::_set_AddressAlreadyInUse(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_AddressAlreadyInUse");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "AddressAlreadyInUse", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError AddressNotAvailable
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_AddressNotAvailable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_AddressNotAvailable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "AddressNotAvailable"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError AddressNotAvailable
void System::Net::Sockets::SocketError::_set_AddressNotAvailable(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_AddressNotAvailable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "AddressNotAvailable", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NetworkDown
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NetworkDown() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NetworkDown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NetworkDown"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NetworkDown
void System::Net::Sockets::SocketError::_set_NetworkDown(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NetworkDown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NetworkDown", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NetworkUnreachable
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NetworkUnreachable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NetworkUnreachable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NetworkUnreachable"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NetworkUnreachable
void System::Net::Sockets::SocketError::_set_NetworkUnreachable(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NetworkUnreachable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NetworkUnreachable", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NetworkReset
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NetworkReset() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NetworkReset");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NetworkReset"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NetworkReset
void System::Net::Sockets::SocketError::_set_NetworkReset(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NetworkReset");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NetworkReset", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ConnectionAborted
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ConnectionAborted() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ConnectionAborted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ConnectionAborted"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ConnectionAborted
void System::Net::Sockets::SocketError::_set_ConnectionAborted(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ConnectionAborted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ConnectionAborted", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ConnectionReset
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ConnectionReset() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ConnectionReset");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ConnectionReset"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ConnectionReset
void System::Net::Sockets::SocketError::_set_ConnectionReset(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ConnectionReset");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ConnectionReset", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NoBufferSpaceAvailable
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NoBufferSpaceAvailable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NoBufferSpaceAvailable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NoBufferSpaceAvailable"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NoBufferSpaceAvailable
void System::Net::Sockets::SocketError::_set_NoBufferSpaceAvailable(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NoBufferSpaceAvailable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NoBufferSpaceAvailable", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError IsConnected
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_IsConnected() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_IsConnected");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "IsConnected"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError IsConnected
void System::Net::Sockets::SocketError::_set_IsConnected(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_IsConnected");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "IsConnected", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NotConnected
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NotConnected() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NotConnected");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NotConnected"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NotConnected
void System::Net::Sockets::SocketError::_set_NotConnected(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NotConnected");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NotConnected", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError Shutdown
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_Shutdown() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_Shutdown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "Shutdown"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError Shutdown
void System::Net::Sockets::SocketError::_set_Shutdown(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_Shutdown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "Shutdown", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError TimedOut
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_TimedOut() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_TimedOut");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "TimedOut"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError TimedOut
void System::Net::Sockets::SocketError::_set_TimedOut(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_TimedOut");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "TimedOut", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ConnectionRefused
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ConnectionRefused() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ConnectionRefused");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ConnectionRefused"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ConnectionRefused
void System::Net::Sockets::SocketError::_set_ConnectionRefused(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ConnectionRefused");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ConnectionRefused", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError HostDown
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_HostDown() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_HostDown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "HostDown"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError HostDown
void System::Net::Sockets::SocketError::_set_HostDown(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_HostDown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "HostDown", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError HostUnreachable
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_HostUnreachable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_HostUnreachable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "HostUnreachable"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError HostUnreachable
void System::Net::Sockets::SocketError::_set_HostUnreachable(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_HostUnreachable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "HostUnreachable", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError ProcessLimit
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_ProcessLimit() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_ProcessLimit");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "ProcessLimit"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError ProcessLimit
void System::Net::Sockets::SocketError::_set_ProcessLimit(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_ProcessLimit");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "ProcessLimit", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError SystemNotReady
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_SystemNotReady() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_SystemNotReady");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "SystemNotReady"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError SystemNotReady
void System::Net::Sockets::SocketError::_set_SystemNotReady(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_SystemNotReady");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "SystemNotReady", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError VersionNotSupported
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_VersionNotSupported() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_VersionNotSupported");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "VersionNotSupported"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError VersionNotSupported
void System::Net::Sockets::SocketError::_set_VersionNotSupported(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_VersionNotSupported");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "VersionNotSupported", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NotInitialized
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NotInitialized() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NotInitialized");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NotInitialized"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NotInitialized
void System::Net::Sockets::SocketError::_set_NotInitialized(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NotInitialized");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NotInitialized", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError Disconnecting
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_Disconnecting() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_Disconnecting");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "Disconnecting"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError Disconnecting
void System::Net::Sockets::SocketError::_set_Disconnecting(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_Disconnecting");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "Disconnecting", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError TypeNotFound
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_TypeNotFound() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_TypeNotFound");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "TypeNotFound"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError TypeNotFound
void System::Net::Sockets::SocketError::_set_TypeNotFound(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_TypeNotFound");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "TypeNotFound", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError HostNotFound
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_HostNotFound() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_HostNotFound");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "HostNotFound"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError HostNotFound
void System::Net::Sockets::SocketError::_set_HostNotFound(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_HostNotFound");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "HostNotFound", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError TryAgain
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_TryAgain() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_TryAgain");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "TryAgain"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError TryAgain
void System::Net::Sockets::SocketError::_set_TryAgain(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_TryAgain");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "TryAgain", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NoRecovery
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NoRecovery() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NoRecovery");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NoRecovery"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NoRecovery
void System::Net::Sockets::SocketError::_set_NoRecovery(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NoRecovery");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NoRecovery", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError NoData
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_NoData() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_NoData");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "NoData"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError NoData
void System::Net::Sockets::SocketError::_set_NoData(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_NoData");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "NoData", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError IOPending
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_IOPending() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_IOPending");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "IOPending"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError IOPending
void System::Net::Sockets::SocketError::_set_IOPending(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_IOPending");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "IOPending", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketError OperationAborted
::System::Net::Sockets::SocketError System::Net::Sockets::SocketError::_get_OperationAborted() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_get_OperationAborted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketError>("System.Net.Sockets", "SocketError", "OperationAborted"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketError OperationAborted
void System::Net::Sockets::SocketError::_set_OperationAborted(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::_set_OperationAborted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketError", "OperationAborted", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SocketError::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketError::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: System.Net.Sockets.SocketFlags
#include "System/Net/Sockets/SocketFlags.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.Net.Sockets.SocketFlags None
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_None() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_None");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "None"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags None
void System::Net::Sockets::SocketFlags::_set_None(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_None");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "None", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags OutOfBand
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_OutOfBand() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_OutOfBand");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "OutOfBand"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags OutOfBand
void System::Net::Sockets::SocketFlags::_set_OutOfBand(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_OutOfBand");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "OutOfBand", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags Peek
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_Peek() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_Peek");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "Peek"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags Peek
void System::Net::Sockets::SocketFlags::_set_Peek(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_Peek");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "Peek", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags DontRoute
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_DontRoute() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_DontRoute");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "DontRoute"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags DontRoute
void System::Net::Sockets::SocketFlags::_set_DontRoute(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_DontRoute");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "DontRoute", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags MaxIOVectorLength
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_MaxIOVectorLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_MaxIOVectorLength");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "MaxIOVectorLength"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags MaxIOVectorLength
void System::Net::Sockets::SocketFlags::_set_MaxIOVectorLength(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_MaxIOVectorLength");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "MaxIOVectorLength", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags Truncated
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_Truncated() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_Truncated");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "Truncated"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags Truncated
void System::Net::Sockets::SocketFlags::_set_Truncated(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_Truncated");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "Truncated", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags ControlDataTruncated
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_ControlDataTruncated() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_ControlDataTruncated");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "ControlDataTruncated"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags ControlDataTruncated
void System::Net::Sockets::SocketFlags::_set_ControlDataTruncated(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_ControlDataTruncated");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "ControlDataTruncated", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags Broadcast
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_Broadcast() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_Broadcast");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "Broadcast"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags Broadcast
void System::Net::Sockets::SocketFlags::_set_Broadcast(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_Broadcast");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "Broadcast", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags Multicast
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_Multicast() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_Multicast");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "Multicast"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags Multicast
void System::Net::Sockets::SocketFlags::_set_Multicast(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_Multicast");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "Multicast", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketFlags Partial
::System::Net::Sockets::SocketFlags System::Net::Sockets::SocketFlags::_get_Partial() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_get_Partial");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketFlags>("System.Net.Sockets", "SocketFlags", "Partial"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketFlags Partial
void System::Net::Sockets::SocketFlags::_set_Partial(::System::Net::Sockets::SocketFlags value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::_set_Partial");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketFlags", "Partial", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SocketFlags::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketFlags::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: System.Net.Sockets.SocketOptionLevel
#include "System/Net/Sockets/SocketOptionLevel.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.Net.Sockets.SocketOptionLevel Socket
::System::Net::Sockets::SocketOptionLevel System::Net::Sockets::SocketOptionLevel::_get_Socket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_get_Socket");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionLevel>("System.Net.Sockets", "SocketOptionLevel", "Socket"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionLevel Socket
void System::Net::Sockets::SocketOptionLevel::_set_Socket(::System::Net::Sockets::SocketOptionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_set_Socket");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionLevel", "Socket", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionLevel IP
::System::Net::Sockets::SocketOptionLevel System::Net::Sockets::SocketOptionLevel::_get_IP() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_get_IP");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionLevel>("System.Net.Sockets", "SocketOptionLevel", "IP"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionLevel IP
void System::Net::Sockets::SocketOptionLevel::_set_IP(::System::Net::Sockets::SocketOptionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_set_IP");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionLevel", "IP", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionLevel IPv6
::System::Net::Sockets::SocketOptionLevel System::Net::Sockets::SocketOptionLevel::_get_IPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_get_IPv6");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionLevel>("System.Net.Sockets", "SocketOptionLevel", "IPv6"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionLevel IPv6
void System::Net::Sockets::SocketOptionLevel::_set_IPv6(::System::Net::Sockets::SocketOptionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_set_IPv6");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionLevel", "IPv6", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionLevel Tcp
::System::Net::Sockets::SocketOptionLevel System::Net::Sockets::SocketOptionLevel::_get_Tcp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_get_Tcp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionLevel>("System.Net.Sockets", "SocketOptionLevel", "Tcp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionLevel Tcp
void System::Net::Sockets::SocketOptionLevel::_set_Tcp(::System::Net::Sockets::SocketOptionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_set_Tcp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionLevel", "Tcp", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionLevel Udp
::System::Net::Sockets::SocketOptionLevel System::Net::Sockets::SocketOptionLevel::_get_Udp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_get_Udp");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionLevel>("System.Net.Sockets", "SocketOptionLevel", "Udp"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionLevel Udp
void System::Net::Sockets::SocketOptionLevel::_set_Udp(::System::Net::Sockets::SocketOptionLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::_set_Udp");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionLevel", "Udp", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SocketOptionLevel::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionLevel::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: System.Net.Sockets.SocketOptionName
#include "System/Net/Sockets/SocketOptionName.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.Net.Sockets.SocketOptionName Debug
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_Debug() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_Debug");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "Debug"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName Debug
void System::Net::Sockets::SocketOptionName::_set_Debug(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_Debug");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "Debug", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName AcceptConnection
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_AcceptConnection() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_AcceptConnection");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "AcceptConnection"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName AcceptConnection
void System::Net::Sockets::SocketOptionName::_set_AcceptConnection(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_AcceptConnection");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "AcceptConnection", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName ReuseAddress
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_ReuseAddress() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_ReuseAddress");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "ReuseAddress"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName ReuseAddress
void System::Net::Sockets::SocketOptionName::_set_ReuseAddress(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_ReuseAddress");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "ReuseAddress", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName KeepAlive
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_KeepAlive() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_KeepAlive");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "KeepAlive"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName KeepAlive
void System::Net::Sockets::SocketOptionName::_set_KeepAlive(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_KeepAlive");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "KeepAlive", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName DontRoute
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_DontRoute() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_DontRoute");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "DontRoute"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName DontRoute
void System::Net::Sockets::SocketOptionName::_set_DontRoute(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_DontRoute");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "DontRoute", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName Broadcast
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_Broadcast() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_Broadcast");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "Broadcast"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName Broadcast
void System::Net::Sockets::SocketOptionName::_set_Broadcast(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_Broadcast");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "Broadcast", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName UseLoopback
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_UseLoopback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_UseLoopback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "UseLoopback"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName UseLoopback
void System::Net::Sockets::SocketOptionName::_set_UseLoopback(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_UseLoopback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "UseLoopback", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName Linger
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_Linger() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_Linger");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "Linger"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName Linger
void System::Net::Sockets::SocketOptionName::_set_Linger(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_Linger");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "Linger", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName OutOfBandInline
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_OutOfBandInline() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_OutOfBandInline");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "OutOfBandInline"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName OutOfBandInline
void System::Net::Sockets::SocketOptionName::_set_OutOfBandInline(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_OutOfBandInline");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "OutOfBandInline", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName DontLinger
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_DontLinger() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_DontLinger");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "DontLinger"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName DontLinger
void System::Net::Sockets::SocketOptionName::_set_DontLinger(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_DontLinger");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "DontLinger", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName ExclusiveAddressUse
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_ExclusiveAddressUse() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_ExclusiveAddressUse");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "ExclusiveAddressUse"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName ExclusiveAddressUse
void System::Net::Sockets::SocketOptionName::_set_ExclusiveAddressUse(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_ExclusiveAddressUse");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "ExclusiveAddressUse", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName SendBuffer
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_SendBuffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_SendBuffer");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "SendBuffer"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName SendBuffer
void System::Net::Sockets::SocketOptionName::_set_SendBuffer(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_SendBuffer");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "SendBuffer", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName ReceiveBuffer
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_ReceiveBuffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_ReceiveBuffer");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "ReceiveBuffer"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName ReceiveBuffer
void System::Net::Sockets::SocketOptionName::_set_ReceiveBuffer(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_ReceiveBuffer");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "ReceiveBuffer", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName SendLowWater
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_SendLowWater() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_SendLowWater");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "SendLowWater"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName SendLowWater
void System::Net::Sockets::SocketOptionName::_set_SendLowWater(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_SendLowWater");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "SendLowWater", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName ReceiveLowWater
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_ReceiveLowWater() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_ReceiveLowWater");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "ReceiveLowWater"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName ReceiveLowWater
void System::Net::Sockets::SocketOptionName::_set_ReceiveLowWater(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_ReceiveLowWater");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "ReceiveLowWater", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName SendTimeout
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_SendTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_SendTimeout");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "SendTimeout"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName SendTimeout
void System::Net::Sockets::SocketOptionName::_set_SendTimeout(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_SendTimeout");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "SendTimeout", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName ReceiveTimeout
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_ReceiveTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_ReceiveTimeout");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "ReceiveTimeout"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName ReceiveTimeout
void System::Net::Sockets::SocketOptionName::_set_ReceiveTimeout(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_ReceiveTimeout");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "ReceiveTimeout", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName Error
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_Error() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_Error");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "Error"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName Error
void System::Net::Sockets::SocketOptionName::_set_Error(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_Error");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "Error", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName Type
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_Type() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_Type");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "Type"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName Type
void System::Net::Sockets::SocketOptionName::_set_Type(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_Type");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "Type", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName ReuseUnicastPort
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_ReuseUnicastPort() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_ReuseUnicastPort");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "ReuseUnicastPort"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName ReuseUnicastPort
void System::Net::Sockets::SocketOptionName::_set_ReuseUnicastPort(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_ReuseUnicastPort");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "ReuseUnicastPort", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName MaxConnections
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_MaxConnections() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_MaxConnections");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "MaxConnections"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName MaxConnections
void System::Net::Sockets::SocketOptionName::_set_MaxConnections(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_MaxConnections");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "MaxConnections", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName IPOptions
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_IPOptions() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_IPOptions");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "IPOptions"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName IPOptions
void System::Net::Sockets::SocketOptionName::_set_IPOptions(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_IPOptions");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "IPOptions", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName HeaderIncluded
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_HeaderIncluded() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_HeaderIncluded");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "HeaderIncluded"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName HeaderIncluded
void System::Net::Sockets::SocketOptionName::_set_HeaderIncluded(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_HeaderIncluded");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "HeaderIncluded", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName TypeOfService
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_TypeOfService() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_TypeOfService");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "TypeOfService"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName TypeOfService
void System::Net::Sockets::SocketOptionName::_set_TypeOfService(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_TypeOfService");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "TypeOfService", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName IpTimeToLive
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_IpTimeToLive() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_IpTimeToLive");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "IpTimeToLive"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName IpTimeToLive
void System::Net::Sockets::SocketOptionName::_set_IpTimeToLive(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_IpTimeToLive");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "IpTimeToLive", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName MulticastInterface
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_MulticastInterface() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_MulticastInterface");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "MulticastInterface"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName MulticastInterface
void System::Net::Sockets::SocketOptionName::_set_MulticastInterface(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_MulticastInterface");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "MulticastInterface", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName MulticastTimeToLive
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_MulticastTimeToLive() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_MulticastTimeToLive");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "MulticastTimeToLive"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName MulticastTimeToLive
void System::Net::Sockets::SocketOptionName::_set_MulticastTimeToLive(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_MulticastTimeToLive");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "MulticastTimeToLive", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName MulticastLoopback
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_MulticastLoopback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_MulticastLoopback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "MulticastLoopback"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName MulticastLoopback
void System::Net::Sockets::SocketOptionName::_set_MulticastLoopback(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_MulticastLoopback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "MulticastLoopback", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName AddMembership
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_AddMembership() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_AddMembership");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "AddMembership"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName AddMembership
void System::Net::Sockets::SocketOptionName::_set_AddMembership(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_AddMembership");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "AddMembership", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName DropMembership
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_DropMembership() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_DropMembership");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "DropMembership"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName DropMembership
void System::Net::Sockets::SocketOptionName::_set_DropMembership(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_DropMembership");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "DropMembership", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName DontFragment
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_DontFragment() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_DontFragment");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "DontFragment"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName DontFragment
void System::Net::Sockets::SocketOptionName::_set_DontFragment(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_DontFragment");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "DontFragment", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName AddSourceMembership
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_AddSourceMembership() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_AddSourceMembership");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "AddSourceMembership"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName AddSourceMembership
void System::Net::Sockets::SocketOptionName::_set_AddSourceMembership(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_AddSourceMembership");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "AddSourceMembership", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName DropSourceMembership
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_DropSourceMembership() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_DropSourceMembership");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "DropSourceMembership"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName DropSourceMembership
void System::Net::Sockets::SocketOptionName::_set_DropSourceMembership(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_DropSourceMembership");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "DropSourceMembership", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName BlockSource
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_BlockSource() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_BlockSource");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "BlockSource"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName BlockSource
void System::Net::Sockets::SocketOptionName::_set_BlockSource(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_BlockSource");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "BlockSource", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName UnblockSource
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_UnblockSource() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_UnblockSource");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "UnblockSource"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName UnblockSource
void System::Net::Sockets::SocketOptionName::_set_UnblockSource(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_UnblockSource");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "UnblockSource", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName PacketInformation
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_PacketInformation() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_PacketInformation");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "PacketInformation"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName PacketInformation
void System::Net::Sockets::SocketOptionName::_set_PacketInformation(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_PacketInformation");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "PacketInformation", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName HopLimit
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_HopLimit() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_HopLimit");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "HopLimit"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName HopLimit
void System::Net::Sockets::SocketOptionName::_set_HopLimit(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_HopLimit");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "HopLimit", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName IPProtectionLevel
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_IPProtectionLevel() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_IPProtectionLevel");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "IPProtectionLevel"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName IPProtectionLevel
void System::Net::Sockets::SocketOptionName::_set_IPProtectionLevel(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_IPProtectionLevel");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "IPProtectionLevel", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName IPv6Only
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_IPv6Only() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_IPv6Only");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "IPv6Only"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName IPv6Only
void System::Net::Sockets::SocketOptionName::_set_IPv6Only(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_IPv6Only");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "IPv6Only", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName NoDelay
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_NoDelay() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_NoDelay");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "NoDelay"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName NoDelay
void System::Net::Sockets::SocketOptionName::_set_NoDelay(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_NoDelay");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "NoDelay", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName BsdUrgent
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_BsdUrgent() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_BsdUrgent");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "BsdUrgent"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName BsdUrgent
void System::Net::Sockets::SocketOptionName::_set_BsdUrgent(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_BsdUrgent");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "BsdUrgent", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName Expedited
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_Expedited() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_Expedited");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "Expedited"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName Expedited
void System::Net::Sockets::SocketOptionName::_set_Expedited(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_Expedited");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "Expedited", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName NoChecksum
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_NoChecksum() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_NoChecksum");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "NoChecksum"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName NoChecksum
void System::Net::Sockets::SocketOptionName::_set_NoChecksum(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_NoChecksum");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "NoChecksum", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName ChecksumCoverage
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_ChecksumCoverage() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_ChecksumCoverage");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "ChecksumCoverage"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName ChecksumCoverage
void System::Net::Sockets::SocketOptionName::_set_ChecksumCoverage(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_ChecksumCoverage");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "ChecksumCoverage", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName UpdateAcceptContext
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_UpdateAcceptContext() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_UpdateAcceptContext");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "UpdateAcceptContext"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName UpdateAcceptContext
void System::Net::Sockets::SocketOptionName::_set_UpdateAcceptContext(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_UpdateAcceptContext");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "UpdateAcceptContext", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOptionName UpdateConnectContext
::System::Net::Sockets::SocketOptionName System::Net::Sockets::SocketOptionName::_get_UpdateConnectContext() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_get_UpdateConnectContext");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOptionName>("System.Net.Sockets", "SocketOptionName", "UpdateConnectContext"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOptionName UpdateConnectContext
void System::Net::Sockets::SocketOptionName::_set_UpdateConnectContext(::System::Net::Sockets::SocketOptionName value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::_set_UpdateConnectContext");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOptionName", "UpdateConnectContext", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SocketOptionName::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOptionName::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: System.Net.Sockets.SocketShutdown
#include "System/Net/Sockets/SocketShutdown.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.Net.Sockets.SocketShutdown Receive
::System::Net::Sockets::SocketShutdown System::Net::Sockets::SocketShutdown::_get_Receive() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketShutdown::_get_Receive");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketShutdown>("System.Net.Sockets", "SocketShutdown", "Receive"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketShutdown Receive
void System::Net::Sockets::SocketShutdown::_set_Receive(::System::Net::Sockets::SocketShutdown value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketShutdown::_set_Receive");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketShutdown", "Receive", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketShutdown Send
::System::Net::Sockets::SocketShutdown System::Net::Sockets::SocketShutdown::_get_Send() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketShutdown::_get_Send");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketShutdown>("System.Net.Sockets", "SocketShutdown", "Send"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketShutdown Send
void System::Net::Sockets::SocketShutdown::_set_Send(::System::Net::Sockets::SocketShutdown value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketShutdown::_set_Send");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketShutdown", "Send", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketShutdown Both
::System::Net::Sockets::SocketShutdown System::Net::Sockets::SocketShutdown::_get_Both() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketShutdown::_get_Both");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketShutdown>("System.Net.Sockets", "SocketShutdown", "Both"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketShutdown Both
void System::Net::Sockets::SocketShutdown::_set_Both(::System::Net::Sockets::SocketShutdown value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketShutdown::_set_Both");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketShutdown", "Both", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SocketShutdown::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketShutdown::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: System.Net.Sockets.SocketType
#include "System/Net/Sockets/SocketType.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.Net.Sockets.SocketType Stream
::System::Net::Sockets::SocketType System::Net::Sockets::SocketType::_get_Stream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_get_Stream");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketType>("System.Net.Sockets", "SocketType", "Stream"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketType Stream
void System::Net::Sockets::SocketType::_set_Stream(::System::Net::Sockets::SocketType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_set_Stream");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketType", "Stream", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketType Dgram
::System::Net::Sockets::SocketType System::Net::Sockets::SocketType::_get_Dgram() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_get_Dgram");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketType>("System.Net.Sockets", "SocketType", "Dgram"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketType Dgram
void System::Net::Sockets::SocketType::_set_Dgram(::System::Net::Sockets::SocketType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_set_Dgram");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketType", "Dgram", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketType Raw
::System::Net::Sockets::SocketType System::Net::Sockets::SocketType::_get_Raw() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_get_Raw");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketType>("System.Net.Sockets", "SocketType", "Raw"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketType Raw
void System::Net::Sockets::SocketType::_set_Raw(::System::Net::Sockets::SocketType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_set_Raw");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketType", "Raw", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketType Rdm
::System::Net::Sockets::SocketType System::Net::Sockets::SocketType::_get_Rdm() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_get_Rdm");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketType>("System.Net.Sockets", "SocketType", "Rdm"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketType Rdm
void System::Net::Sockets::SocketType::_set_Rdm(::System::Net::Sockets::SocketType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_set_Rdm");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketType", "Rdm", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketType Seqpacket
::System::Net::Sockets::SocketType System::Net::Sockets::SocketType::_get_Seqpacket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_get_Seqpacket");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketType>("System.Net.Sockets", "SocketType", "Seqpacket"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketType Seqpacket
void System::Net::Sockets::SocketType::_set_Seqpacket(::System::Net::Sockets::SocketType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_set_Seqpacket");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketType", "Seqpacket", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketType Unknown
::System::Net::Sockets::SocketType System::Net::Sockets::SocketType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketType>("System.Net.Sockets", "SocketType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketType Unknown
void System::Net::Sockets::SocketType::_set_Unknown(::System::Net::Sockets::SocketType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketType", "Unknown", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SocketType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketType::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Sockets.TcpClient
#include "System/Net/Sockets/TcpClient.hpp"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.Net.Sockets.NetworkStream
#include "System/Net/Sockets/NetworkStream.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.Socket m_ClientSocket
::System::Net::Sockets::Socket*& System::Net::Sockets::TcpClient::dyn_m_ClientSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::dyn_m_ClientSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ClientSocket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_Active
bool& System::Net::Sockets::TcpClient::dyn_m_Active() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::dyn_m_Active");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Active"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.NetworkStream m_DataStream
::System::Net::Sockets::NetworkStream*& System::Net::Sockets::TcpClient::dyn_m_DataStream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::dyn_m_DataStream");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_DataStream"))->offset;
return *reinterpret_cast<::System::Net::Sockets::NetworkStream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.AddressFamily m_Family
::System::Net::Sockets::AddressFamily& System::Net::Sockets::TcpClient::dyn_m_Family() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::dyn_m_Family");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Family"))->offset;
return *reinterpret_cast<::System::Net::Sockets::AddressFamily*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_CleanedUp
bool& System::Net::Sockets::TcpClient::dyn_m_CleanedUp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::dyn_m_CleanedUp");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CleanedUp"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.TcpClient.get_Client
::System::Net::Sockets::Socket* System::Net::Sockets::TcpClient::get_Client() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::get_Client");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Client", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::Socket*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.TcpClient.set_Client
void System::Net::Sockets::TcpClient::set_Client(::System::Net::Sockets::Socket* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::set_Client");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Client", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.TcpClient.get_Connected
bool System::Net::Sockets::TcpClient::get_Connected() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::get_Connected");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Connected", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.TcpClient.BeginConnect
::System::IAsyncResult* System::Net::Sockets::TcpClient::BeginConnect(::StringW host, int port, ::System::AsyncCallback* requestCallback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::BeginConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(host), ::il2cpp_utils::ExtractType(port), ::il2cpp_utils::ExtractType(requestCallback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, host, port, requestCallback, state);
}
// Autogenerated method: System.Net.Sockets.TcpClient.EndConnect
void System::Net::Sockets::TcpClient::EndConnect(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::EndConnect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndConnect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Sockets.TcpClient.GetStream
::System::Net::Sockets::NetworkStream* System::Net::Sockets::TcpClient::GetStream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::GetStream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetStream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::NetworkStream*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.TcpClient.Close
void System::Net::Sockets::TcpClient::Close() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::Close");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Close", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.TcpClient.Dispose
void System::Net::Sockets::TcpClient::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.Net.Sockets.TcpClient.Dispose
void System::Net::Sockets::TcpClient::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.TcpClient.initialize
void System::Net::Sockets::TcpClient::initialize() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::initialize");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "initialize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.TcpClient.Finalize
void System::Net::Sockets::TcpClient::Finalize() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpClient::Finalize");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finalize", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Sockets.TcpListener
#include "System/Net/Sockets/TcpListener.hpp"
// Including type: System.Net.IPEndPoint
#include "System/Net/IPEndPoint.hpp"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.Net.EndPoint
#include "System/Net/EndPoint.hpp"
// Including type: System.Net.IPAddress
#include "System/Net/IPAddress.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
// Including type: System.Net.Sockets.TcpClient
#include "System/Net/Sockets/TcpClient.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.Net.IPEndPoint m_ServerSocketEP
::System::Net::IPEndPoint*& System::Net::Sockets::TcpListener::dyn_m_ServerSocketEP() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::dyn_m_ServerSocketEP");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ServerSocketEP"))->offset;
return *reinterpret_cast<::System::Net::IPEndPoint**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.Socket m_ServerSocket
::System::Net::Sockets::Socket*& System::Net::Sockets::TcpListener::dyn_m_ServerSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::dyn_m_ServerSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ServerSocket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_Active
bool& System::Net::Sockets::TcpListener::dyn_m_Active() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::dyn_m_Active");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Active"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_ExclusiveAddressUse
bool& System::Net::Sockets::TcpListener::dyn_m_ExclusiveAddressUse() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::dyn_m_ExclusiveAddressUse");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ExclusiveAddressUse"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.TcpListener.get_LocalEndpoint
::System::Net::EndPoint* System::Net::Sockets::TcpListener::get_LocalEndpoint() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::get_LocalEndpoint");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_LocalEndpoint", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::EndPoint*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.TcpListener.Start
void System::Net::Sockets::TcpListener::Start() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::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: System.Net.Sockets.TcpListener.Start
void System::Net::Sockets::TcpListener::Start(int backlog) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::Start");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Start", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(backlog)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, backlog);
}
// Autogenerated method: System.Net.Sockets.TcpListener.Stop
void System::Net::Sockets::TcpListener::Stop() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::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: System.Net.Sockets.TcpListener.BeginAcceptTcpClient
::System::IAsyncResult* System::Net::Sockets::TcpListener::BeginAcceptTcpClient(::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::BeginAcceptTcpClient");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginAcceptTcpClient", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, state);
}
// Autogenerated method: System.Net.Sockets.TcpListener.EndAcceptTcpClient
::System::Net::Sockets::TcpClient* System::Net::Sockets::TcpListener::EndAcceptTcpClient(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::TcpListener::EndAcceptTcpClient");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndAcceptTcpClient", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::TcpClient*, false>(this, ___internal__method, asyncResult);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.UdpClient
#include "System/Net/Sockets/UdpClient.hpp"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.Net.IPAddress
#include "System/Net/IPAddress.hpp"
// Including type: System.Net.IPEndPoint
#include "System/Net/IPEndPoint.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 MaxUDPSize
int System::Net::Sockets::UdpClient::_get_MaxUDPSize() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::_get_MaxUDPSize");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("System.Net.Sockets", "UdpClient", "MaxUDPSize"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 MaxUDPSize
void System::Net::Sockets::UdpClient::_set_MaxUDPSize(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::_set_MaxUDPSize");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "UdpClient", "MaxUDPSize", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.Socket m_ClientSocket
::System::Net::Sockets::Socket*& System::Net::Sockets::UdpClient::dyn_m_ClientSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::dyn_m_ClientSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_ClientSocket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_Active
bool& System::Net::Sockets::UdpClient::dyn_m_Active() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::dyn_m_Active");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Active"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Byte[] m_Buffer
::ArrayW<uint8_t>& System::Net::Sockets::UdpClient::dyn_m_Buffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::dyn_m_Buffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Buffer"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.AddressFamily m_Family
::System::Net::Sockets::AddressFamily& System::Net::Sockets::UdpClient::dyn_m_Family() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::dyn_m_Family");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_Family"))->offset;
return *reinterpret_cast<::System::Net::Sockets::AddressFamily*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_CleanedUp
bool& System::Net::Sockets::UdpClient::dyn_m_CleanedUp() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::dyn_m_CleanedUp");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_CleanedUp"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean m_IsBroadcast
bool& System::Net::Sockets::UdpClient::dyn_m_IsBroadcast() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::dyn_m_IsBroadcast");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "m_IsBroadcast"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.UdpClient.get_Client
::System::Net::Sockets::Socket* System::Net::Sockets::UdpClient::get_Client() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::get_Client");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Client", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::Socket*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.UdpClient.set_Client
void System::Net::Sockets::UdpClient::set_Client(::System::Net::Sockets::Socket* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::set_Client");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Client", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.UdpClient.Close
void System::Net::Sockets::UdpClient::Close() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::Close");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Close", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.UdpClient.FreeResources
void System::Net::Sockets::UdpClient::FreeResources() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::FreeResources");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FreeResources", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.UdpClient.Dispose
void System::Net::Sockets::UdpClient::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.UdpClient.Dispose
void System::Net::Sockets::UdpClient::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.Net.Sockets.UdpClient.Connect
void System::Net::Sockets::UdpClient::Connect(::System::Net::IPAddress* addr, int port) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::Connect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Connect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(addr), ::il2cpp_utils::ExtractType(port)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, addr, port);
}
// Autogenerated method: System.Net.Sockets.UdpClient.Connect
void System::Net::Sockets::UdpClient::Connect(::System::Net::IPEndPoint* endPoint) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::Connect");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Connect", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(endPoint)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, endPoint);
}
// Autogenerated method: System.Net.Sockets.UdpClient.CheckForBroadcast
void System::Net::Sockets::UdpClient::CheckForBroadcast(::System::Net::IPAddress* ipAddress) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::CheckForBroadcast");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CheckForBroadcast", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ipAddress)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, ipAddress);
}
// Autogenerated method: System.Net.Sockets.UdpClient.Send
int System::Net::Sockets::UdpClient::Send(::ArrayW<uint8_t> dgram, int bytes) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::Send");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Send", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(dgram), ::il2cpp_utils::ExtractType(bytes)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, dgram, bytes);
}
// Autogenerated method: System.Net.Sockets.UdpClient.Receive
::ArrayW<uint8_t> System::Net::Sockets::UdpClient::Receive(ByRef<::System::Net::IPEndPoint*> remoteEP) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::Receive");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Receive", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(remoteEP)})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(this, ___internal__method, byref(remoteEP));
}
// Autogenerated method: System.Net.Sockets.UdpClient.createClientSocket
void System::Net::Sockets::UdpClient::createClientSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::UdpClient::createClientSocket");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "createClientSocket", 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: System.Net.Sockets.SafeSocketHandle
#include "System/Net/Sockets/SafeSocketHandle.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: System.Threading.Thread
#include "System/Threading/Thread.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: System.Diagnostics.StackTrace
#include "System/Diagnostics/StackTrace.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 SOCKET_CLOSED
int System::Net::Sockets::SafeSocketHandle::_get_SOCKET_CLOSED() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::_get_SOCKET_CLOSED");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("System.Net.Sockets", "SafeSocketHandle", "SOCKET_CLOSED"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 SOCKET_CLOSED
void System::Net::Sockets::SafeSocketHandle::_set_SOCKET_CLOSED(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::_set_SOCKET_CLOSED");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SafeSocketHandle", "SOCKET_CLOSED", value));
}
// Autogenerated static field getter
// Get static field: static private System.Int32 ABORT_RETRIES
int System::Net::Sockets::SafeSocketHandle::_get_ABORT_RETRIES() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::_get_ABORT_RETRIES");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<int>("System.Net.Sockets", "SafeSocketHandle", "ABORT_RETRIES"));
}
// Autogenerated static field setter
// Set static field: static private System.Int32 ABORT_RETRIES
void System::Net::Sockets::SafeSocketHandle::_set_ABORT_RETRIES(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::_set_ABORT_RETRIES");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SafeSocketHandle", "ABORT_RETRIES", value));
}
// Autogenerated static field getter
// Get static field: static private System.Boolean THROW_ON_ABORT_RETRIES
bool System::Net::Sockets::SafeSocketHandle::_get_THROW_ON_ABORT_RETRIES() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::_get_THROW_ON_ABORT_RETRIES");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.Sockets", "SafeSocketHandle", "THROW_ON_ABORT_RETRIES"));
}
// Autogenerated static field setter
// Set static field: static private System.Boolean THROW_ON_ABORT_RETRIES
void System::Net::Sockets::SafeSocketHandle::_set_THROW_ON_ABORT_RETRIES(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::_set_THROW_ON_ABORT_RETRIES");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SafeSocketHandle", "THROW_ON_ABORT_RETRIES", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.List`1<System.Threading.Thread> blocking_threads
::System::Collections::Generic::List_1<::System::Threading::Thread*>*& System::Net::Sockets::SafeSocketHandle::dyn_blocking_threads() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::dyn_blocking_threads");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "blocking_threads"))->offset;
return *reinterpret_cast<::System::Collections::Generic::List_1<::System::Threading::Thread*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.Threading.Thread,System.Diagnostics.StackTrace> threads_stacktraces
::System::Collections::Generic::Dictionary_2<::System::Threading::Thread*, ::System::Diagnostics::StackTrace*>*& System::Net::Sockets::SafeSocketHandle::dyn_threads_stacktraces() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::dyn_threads_stacktraces");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "threads_stacktraces"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<::System::Threading::Thread*, ::System::Diagnostics::StackTrace*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean in_cleanup
bool& System::Net::Sockets::SafeSocketHandle::dyn_in_cleanup() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::dyn_in_cleanup");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "in_cleanup"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.SafeSocketHandle..cctor
void System::Net::Sockets::SafeSocketHandle::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "SafeSocketHandle", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SafeSocketHandle.RegisterForBlockingSyscall
void System::Net::Sockets::SafeSocketHandle::RegisterForBlockingSyscall() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::RegisterForBlockingSyscall");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RegisterForBlockingSyscall", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SafeSocketHandle.UnRegisterForBlockingSyscall
void System::Net::Sockets::SafeSocketHandle::UnRegisterForBlockingSyscall() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::UnRegisterForBlockingSyscall");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UnRegisterForBlockingSyscall", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SafeSocketHandle.ReleaseHandle
bool System::Net::Sockets::SafeSocketHandle::ReleaseHandle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SafeSocketHandle::ReleaseHandle");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseHandle", 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: System.Net.Sockets.SocketAsyncEventArgs
#include "System/Net/Sockets/SocketAsyncEventArgs.hpp"
// Including type: System.Net.EndPoint
#include "System/Net/EndPoint.hpp"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.EventHandler`1
#include "System/EventHandler_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 disposed
bool& System::Net::Sockets::SocketAsyncEventArgs::dyn_disposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_disposed");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "disposed"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Int32 in_progress
int& System::Net::Sockets::SocketAsyncEventArgs::dyn_in_progress() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_in_progress");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "in_progress"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Net.EndPoint remote_ep
::System::Net::EndPoint*& System::Net::Sockets::SocketAsyncEventArgs::dyn_remote_ep() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_remote_ep");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "remote_ep"))->offset;
return *reinterpret_cast<::System::Net::EndPoint**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Net.Sockets.Socket current_socket
::System::Net::Sockets::Socket*& System::Net::Sockets::SocketAsyncEventArgs::dyn_current_socket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_current_socket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "current_socket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.Socket <AcceptSocket>k__BackingField
::System::Net::Sockets::Socket*& System::Net::Sockets::SocketAsyncEventArgs::dyn_$AcceptSocket$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_$AcceptSocket$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<AcceptSocket>k__BackingField"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <BytesTransferred>k__BackingField
int& System::Net::Sockets::SocketAsyncEventArgs::dyn_$BytesTransferred$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_$BytesTransferred$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<BytesTransferred>k__BackingField"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Net.Sockets.SocketError <SocketError>k__BackingField
::System::Net::Sockets::SocketError& System::Net::Sockets::SocketAsyncEventArgs::dyn_$SocketError$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_$SocketError$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<SocketError>k__BackingField"))->offset;
return *reinterpret_cast<::System::Net::Sockets::SocketError*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.EventHandler`1<System.Net.Sockets.SocketAsyncEventArgs> Completed
::System::EventHandler_1<::System::Net::Sockets::SocketAsyncEventArgs*>*& System::Net::Sockets::SocketAsyncEventArgs::dyn_Completed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::dyn_Completed");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Completed"))->offset;
return *reinterpret_cast<::System::EventHandler_1<::System::Net::Sockets::SocketAsyncEventArgs*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.get_AcceptSocket
::System::Net::Sockets::Socket* System::Net::Sockets::SocketAsyncEventArgs::get_AcceptSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::get_AcceptSocket");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_AcceptSocket", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::Socket*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.set_AcceptSocket
void System::Net::Sockets::SocketAsyncEventArgs::set_AcceptSocket(::System::Net::Sockets::Socket* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::set_AcceptSocket");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_AcceptSocket", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.set_BytesTransferred
void System::Net::Sockets::SocketAsyncEventArgs::set_BytesTransferred(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::set_BytesTransferred");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_BytesTransferred", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.set_SocketError
void System::Net::Sockets::SocketAsyncEventArgs::set_SocketError(::System::Net::Sockets::SocketError value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::set_SocketError");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_SocketError", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.Dispose
void System::Net::Sockets::SocketAsyncEventArgs::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::Dispose");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.Dispose
void System::Net::Sockets::SocketAsyncEventArgs::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.Complete
void System::Net::Sockets::SocketAsyncEventArgs::Complete() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncEventArgs.OnCompleted
void System::Net::Sockets::SocketAsyncEventArgs::OnCompleted(::System::Net::Sockets::SocketAsyncEventArgs* e) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncEventArgs::OnCompleted");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "OnCompleted", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(e)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, e);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Sockets.SocketAsyncResult
#include "System/Net/Sockets/SocketAsyncResult.hpp"
// Including type: System.Net.Sockets.SocketAsyncResult/System.Net.Sockets.<>c
#include "System/Net/Sockets/SocketAsyncResult_--c.hpp"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.Exception
#include "System/Exception.hpp"
// Including type: System.Net.EndPoint
#include "System/Net/EndPoint.hpp"
// Including type: System.Net.IPAddress
#include "System/Net/IPAddress.hpp"
// Including type: System.Collections.Generic.IList`1
#include "System/Collections/Generic/IList_1.hpp"
// Including type: System.IntPtr
#include "System/IntPtr.hpp"
// Including type: System.Net.Sockets.SocketError
#include "System/Net/Sockets/SocketError.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: public System.Net.Sockets.Socket socket
::System::Net::Sockets::Socket*& System::Net::Sockets::SocketAsyncResult::dyn_socket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_socket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "socket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Net.Sockets.SocketOperation operation
::System::Net::Sockets::SocketOperation& System::Net::Sockets::SocketAsyncResult::dyn_operation() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_operation");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "operation"))->offset;
return *reinterpret_cast<::System::Net::Sockets::SocketOperation*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Exception DelayedException
::System::Exception*& System::Net::Sockets::SocketAsyncResult::dyn_DelayedException() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_DelayedException");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "DelayedException"))->offset;
return *reinterpret_cast<::System::Exception**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Net.EndPoint EndPoint
::System::Net::EndPoint*& System::Net::Sockets::SocketAsyncResult::dyn_EndPoint() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_EndPoint");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "EndPoint"))->offset;
return *reinterpret_cast<::System::Net::EndPoint**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Byte[] Buffer
::ArrayW<uint8_t>& System::Net::Sockets::SocketAsyncResult::dyn_Buffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_Buffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Buffer"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 Offset
int& System::Net::Sockets::SocketAsyncResult::dyn_Offset() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_Offset");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Offset"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 Size
int& System::Net::Sockets::SocketAsyncResult::dyn_Size() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_Size");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Size"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Net.Sockets.SocketFlags SockFlags
::System::Net::Sockets::SocketFlags& System::Net::Sockets::SocketAsyncResult::dyn_SockFlags() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_SockFlags");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "SockFlags"))->offset;
return *reinterpret_cast<::System::Net::Sockets::SocketFlags*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Net.Sockets.Socket AcceptSocket
::System::Net::Sockets::Socket*& System::Net::Sockets::SocketAsyncResult::dyn_AcceptSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_AcceptSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "AcceptSocket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Net.IPAddress[] Addresses
::ArrayW<::System::Net::IPAddress*>& System::Net::Sockets::SocketAsyncResult::dyn_Addresses() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_Addresses");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Addresses"))->offset;
return *reinterpret_cast<::ArrayW<::System::Net::IPAddress*>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 Port
int& System::Net::Sockets::SocketAsyncResult::dyn_Port() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::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: public System.Collections.Generic.IList`1<System.ArraySegment`1<System.Byte>> Buffers
::System::Collections::Generic::IList_1<::System::ArraySegment_1<uint8_t>>*& System::Net::Sockets::SocketAsyncResult::dyn_Buffers() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_Buffers");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Buffers"))->offset;
return *reinterpret_cast<::System::Collections::Generic::IList_1<::System::ArraySegment_1<uint8_t>>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Boolean ReuseSocket
bool& System::Net::Sockets::SocketAsyncResult::dyn_ReuseSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_ReuseSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "ReuseSocket"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 CurrentAddress
int& System::Net::Sockets::SocketAsyncResult::dyn_CurrentAddress() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_CurrentAddress");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "CurrentAddress"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Net.Sockets.Socket AcceptedSocket
::System::Net::Sockets::Socket*& System::Net::Sockets::SocketAsyncResult::dyn_AcceptedSocket() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_AcceptedSocket");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "AcceptedSocket"))->offset;
return *reinterpret_cast<::System::Net::Sockets::Socket**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 Total
int& System::Net::Sockets::SocketAsyncResult::dyn_Total() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_Total");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Total"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: System.Int32 error
int& System::Net::Sockets::SocketAsyncResult::dyn_error() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_error");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "error"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 EndCalled
int& System::Net::Sockets::SocketAsyncResult::dyn_EndCalled() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::dyn_EndCalled");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "EndCalled"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.get_Handle
::System::IntPtr System::Net::Sockets::SocketAsyncResult::get_Handle() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::get_Handle");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Handle", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.get_ErrorCode
::System::Net::Sockets::SocketError System::Net::Sockets::SocketAsyncResult::get_ErrorCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::get_ErrorCode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ErrorCode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Sockets::SocketError, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException
void System::Net::Sockets::SocketAsyncResult::CheckIfThrowDelayedException() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::CheckIfThrowDelayedException");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CheckIfThrowDelayedException", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.Complete
void System::Net::Sockets::SocketAsyncResult::Complete() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.Complete
void System::Net::Sockets::SocketAsyncResult::Complete(bool synch) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(synch)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, synch);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.Complete
void System::Net::Sockets::SocketAsyncResult::Complete(int total) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(total)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, total);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.Complete
void System::Net::Sockets::SocketAsyncResult::Complete(::System::Exception* e, bool synch) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(e), ::il2cpp_utils::ExtractType(synch)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, e, synch);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.Complete
void System::Net::Sockets::SocketAsyncResult::Complete(::System::Exception* e) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(e)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, e);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.Complete
void System::Net::Sockets::SocketAsyncResult::Complete(::System::Net::Sockets::Socket* s) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(s)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, s);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.Complete
void System::Net::Sockets::SocketAsyncResult::Complete(::System::Net::Sockets::Socket* s, int total) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::Complete");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Complete", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(s), ::il2cpp_utils::ExtractType(total)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, s, total);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult.CompleteDisposed
void System::Net::Sockets::SocketAsyncResult::CompleteDisposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::CompleteDisposed");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CompleteDisposed", 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: System.Net.Sockets.SocketAsyncResult/System.Net.Sockets.<>c
#include "System/Net/Sockets/SocketAsyncResult_--c.hpp"
// Including type: System.Threading.WaitCallback
#include "System/Threading/WaitCallback.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 System.Net.Sockets.SocketAsyncResult/System.Net.Sockets.<>c <>9
::System::Net::Sockets::SocketAsyncResult::$$c* System::Net::Sockets::SocketAsyncResult::$$c::_get_$$9() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::$$c::_get_$$9");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketAsyncResult::$$c*>("System.Net.Sockets", "SocketAsyncResult/<>c", "<>9")));
}
// Autogenerated static field setter
// Set static field: static public readonly System.Net.Sockets.SocketAsyncResult/System.Net.Sockets.<>c <>9
void System::Net::Sockets::SocketAsyncResult::$$c::_set_$$9(::System::Net::Sockets::SocketAsyncResult::$$c* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::$$c::_set_$$9");
THROW_UNLESS((il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketAsyncResult/<>c", "<>9", value)));
}
// Autogenerated static field getter
// Get static field: static public System.Threading.WaitCallback <>9__27_0
::System::Threading::WaitCallback* System::Net::Sockets::SocketAsyncResult::$$c::_get_$$9__27_0() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::$$c::_get_$$9__27_0");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Threading::WaitCallback*>("System.Net.Sockets", "SocketAsyncResult/<>c", "<>9__27_0")));
}
// Autogenerated static field setter
// Set static field: static public System.Threading.WaitCallback <>9__27_0
void System::Net::Sockets::SocketAsyncResult::$$c::_set_$$9__27_0(::System::Threading::WaitCallback* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::$$c::_set_$$9__27_0");
THROW_UNLESS((il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketAsyncResult/<>c", "<>9__27_0", value)));
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult/System.Net.Sockets.<>c..cctor
void System::Net::Sockets::SocketAsyncResult::$$c::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::$$c::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "SocketAsyncResult/<>c", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketAsyncResult/System.Net.Sockets.<>c.<Complete>b__27_0
void System::Net::Sockets::SocketAsyncResult::$$c::$Complete$b__27_0(::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketAsyncResult::$$c::<Complete>b__27_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<Complete>b__27_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, state);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Sockets.SocketOperation
#include "System/Net/Sockets/SocketOperation.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.Net.Sockets.SocketOperation Accept
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_Accept() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_Accept");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "Accept"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation Accept
void System::Net::Sockets::SocketOperation::_set_Accept(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_Accept");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "Accept", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation Connect
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_Connect() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_Connect");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "Connect"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation Connect
void System::Net::Sockets::SocketOperation::_set_Connect(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_Connect");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "Connect", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation Receive
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_Receive() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_Receive");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "Receive"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation Receive
void System::Net::Sockets::SocketOperation::_set_Receive(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_Receive");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "Receive", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation ReceiveFrom
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_ReceiveFrom() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_ReceiveFrom");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "ReceiveFrom"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation ReceiveFrom
void System::Net::Sockets::SocketOperation::_set_ReceiveFrom(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_ReceiveFrom");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "ReceiveFrom", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation Send
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_Send() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_Send");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "Send"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation Send
void System::Net::Sockets::SocketOperation::_set_Send(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_Send");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "Send", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation SendTo
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_SendTo() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_SendTo");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "SendTo"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation SendTo
void System::Net::Sockets::SocketOperation::_set_SendTo(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_SendTo");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "SendTo", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation RecvJustCallback
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_RecvJustCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_RecvJustCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "RecvJustCallback"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation RecvJustCallback
void System::Net::Sockets::SocketOperation::_set_RecvJustCallback(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_RecvJustCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "RecvJustCallback", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation SendJustCallback
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_SendJustCallback() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_SendJustCallback");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "SendJustCallback"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation SendJustCallback
void System::Net::Sockets::SocketOperation::_set_SendJustCallback(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_SendJustCallback");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "SendJustCallback", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation Disconnect
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_Disconnect() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_Disconnect");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "Disconnect"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation Disconnect
void System::Net::Sockets::SocketOperation::_set_Disconnect(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_Disconnect");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "Disconnect", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation AcceptReceive
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_AcceptReceive() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_AcceptReceive");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "AcceptReceive"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation AcceptReceive
void System::Net::Sockets::SocketOperation::_set_AcceptReceive(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_AcceptReceive");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "AcceptReceive", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation ReceiveGeneric
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_ReceiveGeneric() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_ReceiveGeneric");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "ReceiveGeneric"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation ReceiveGeneric
void System::Net::Sockets::SocketOperation::_set_ReceiveGeneric(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_ReceiveGeneric");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "ReceiveGeneric", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Sockets.SocketOperation SendGeneric
::System::Net::Sockets::SocketOperation System::Net::Sockets::SocketOperation::_get_SendGeneric() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_get_SendGeneric");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketOperation>("System.Net.Sockets", "SocketOperation", "SendGeneric"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Sockets.SocketOperation SendGeneric
void System::Net::Sockets::SocketOperation::_set_SendGeneric(::System::Net::Sockets::SocketOperation value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::_set_SendGeneric");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketOperation", "SendGeneric", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Sockets::SocketOperation::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketOperation::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: System.Net.Sockets.SocketTaskExtensions
#include "System/Net/Sockets/SocketTaskExtensions.hpp"
// Including type: System.Net.Sockets.SocketTaskExtensions/System.Net.Sockets.<>c
#include "System/Net/Sockets/SocketTaskExtensions_--c.hpp"
// Including type: System.Threading.Tasks.Task
#include "System/Threading/Tasks/Task.hpp"
// Including type: System.Net.Sockets.Socket
#include "System/Net/Sockets/Socket.hpp"
// Including type: System.Net.EndPoint
#include "System/Net/EndPoint.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Sockets.SocketTaskExtensions.ConnectAsync
::System::Threading::Tasks::Task* System::Net::Sockets::SocketTaskExtensions::ConnectAsync(::System::Net::Sockets::Socket* socket, ::System::Net::EndPoint* remoteEP) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::ConnectAsync");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "SocketTaskExtensions", "ConnectAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(socket), ::il2cpp_utils::ExtractType(remoteEP)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, socket, remoteEP);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Sockets.SocketTaskExtensions/System.Net.Sockets.<>c
#include "System/Net/Sockets/SocketTaskExtensions_--c.hpp"
// Including type: System.Func`4
#include "System/Func_4.hpp"
// Including type: System.Net.EndPoint
#include "System/Net/EndPoint.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.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 System.Net.Sockets.SocketTaskExtensions/System.Net.Sockets.<>c <>9
::System::Net::Sockets::SocketTaskExtensions::$$c* System::Net::Sockets::SocketTaskExtensions::$$c::_get_$$9() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::_get_$$9");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Net::Sockets::SocketTaskExtensions::$$c*>("System.Net.Sockets", "SocketTaskExtensions/<>c", "<>9")));
}
// Autogenerated static field setter
// Set static field: static public readonly System.Net.Sockets.SocketTaskExtensions/System.Net.Sockets.<>c <>9
void System::Net::Sockets::SocketTaskExtensions::$$c::_set_$$9(::System::Net::Sockets::SocketTaskExtensions::$$c* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::_set_$$9");
THROW_UNLESS((il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketTaskExtensions/<>c", "<>9", value)));
}
// Autogenerated static field getter
// Get static field: static public System.Func`4<System.Net.EndPoint,System.AsyncCallback,System.Object,System.IAsyncResult> <>9__2_0
::System::Func_4<::System::Net::EndPoint*, ::System::AsyncCallback*, ::Il2CppObject*, ::System::IAsyncResult*>* System::Net::Sockets::SocketTaskExtensions::$$c::_get_$$9__2_0() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::_get_$$9__2_0");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Func_4<::System::Net::EndPoint*, ::System::AsyncCallback*, ::Il2CppObject*, ::System::IAsyncResult*>*>("System.Net.Sockets", "SocketTaskExtensions/<>c", "<>9__2_0")));
}
// Autogenerated static field setter
// Set static field: static public System.Func`4<System.Net.EndPoint,System.AsyncCallback,System.Object,System.IAsyncResult> <>9__2_0
void System::Net::Sockets::SocketTaskExtensions::$$c::_set_$$9__2_0(::System::Func_4<::System::Net::EndPoint*, ::System::AsyncCallback*, ::Il2CppObject*, ::System::IAsyncResult*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::_set_$$9__2_0");
THROW_UNLESS((il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketTaskExtensions/<>c", "<>9__2_0", value)));
}
// Autogenerated static field getter
// Get static field: static public System.Action`1<System.IAsyncResult> <>9__2_1
::System::Action_1<::System::IAsyncResult*>* System::Net::Sockets::SocketTaskExtensions::$$c::_get_$$9__2_1() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::_get_$$9__2_1");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::Action_1<::System::IAsyncResult*>*>("System.Net.Sockets", "SocketTaskExtensions/<>c", "<>9__2_1")));
}
// Autogenerated static field setter
// Set static field: static public System.Action`1<System.IAsyncResult> <>9__2_1
void System::Net::Sockets::SocketTaskExtensions::$$c::_set_$$9__2_1(::System::Action_1<::System::IAsyncResult*>* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::_set_$$9__2_1");
THROW_UNLESS((il2cpp_utils::SetFieldValue("System.Net.Sockets", "SocketTaskExtensions/<>c", "<>9__2_1", value)));
}
// Autogenerated method: System.Net.Sockets.SocketTaskExtensions/System.Net.Sockets.<>c..cctor
void System::Net::Sockets::SocketTaskExtensions::$$c::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Sockets", "SocketTaskExtensions/<>c", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Sockets.SocketTaskExtensions/System.Net.Sockets.<>c.<ConnectAsync>b__2_0
::System::IAsyncResult* System::Net::Sockets::SocketTaskExtensions::$$c::$ConnectAsync$b__2_0(::System::Net::EndPoint* targetEndPoint, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::<ConnectAsync>b__2_0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<ConnectAsync>b__2_0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(targetEndPoint), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, targetEndPoint, callback, state);
}
// Autogenerated method: System.Net.Sockets.SocketTaskExtensions/System.Net.Sockets.<>c.<ConnectAsync>b__2_1
void System::Net::Sockets::SocketTaskExtensions::$$c::$ConnectAsync$b__2_1(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Sockets::SocketTaskExtensions::$$c::<ConnectAsync>b__2_1");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<ConnectAsync>b__2_1", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Security.AuthenticatedStream
#include "System/Net/Security/AuthenticatedStream.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.IO.Stream _InnerStream
::System::IO::Stream*& System::Net::Security::AuthenticatedStream::dyn__InnerStream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticatedStream::dyn__InnerStream");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_InnerStream"))->offset;
return *reinterpret_cast<::System::IO::Stream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _LeaveStreamOpen
bool& System::Net::Security::AuthenticatedStream::dyn__LeaveStreamOpen() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticatedStream::dyn__LeaveStreamOpen");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_LeaveStreamOpen"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Security.AuthenticatedStream.get_InnerStream
::System::IO::Stream* System::Net::Security::AuthenticatedStream::get_InnerStream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticatedStream::get_InnerStream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_InnerStream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Stream*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.AuthenticatedStream.get_IsAuthenticated
bool System::Net::Security::AuthenticatedStream::get_IsAuthenticated() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticatedStream::get_IsAuthenticated");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsAuthenticated", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.AuthenticatedStream.Dispose
void System::Net::Security::AuthenticatedStream::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticatedStream::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Security.AuthenticationLevel
#include "System/Net/Security/AuthenticationLevel.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.Net.Security.AuthenticationLevel None
::System::Net::Security::AuthenticationLevel System::Net::Security::AuthenticationLevel::_get_None() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticationLevel::_get_None");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Security::AuthenticationLevel>("System.Net.Security", "AuthenticationLevel", "None"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Security.AuthenticationLevel None
void System::Net::Security::AuthenticationLevel::_set_None(::System::Net::Security::AuthenticationLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticationLevel::_set_None");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Security", "AuthenticationLevel", "None", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Security.AuthenticationLevel MutualAuthRequested
::System::Net::Security::AuthenticationLevel System::Net::Security::AuthenticationLevel::_get_MutualAuthRequested() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticationLevel::_get_MutualAuthRequested");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Security::AuthenticationLevel>("System.Net.Security", "AuthenticationLevel", "MutualAuthRequested"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Security.AuthenticationLevel MutualAuthRequested
void System::Net::Security::AuthenticationLevel::_set_MutualAuthRequested(::System::Net::Security::AuthenticationLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticationLevel::_set_MutualAuthRequested");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Security", "AuthenticationLevel", "MutualAuthRequested", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Security.AuthenticationLevel MutualAuthRequired
::System::Net::Security::AuthenticationLevel System::Net::Security::AuthenticationLevel::_get_MutualAuthRequired() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticationLevel::_get_MutualAuthRequired");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Security::AuthenticationLevel>("System.Net.Security", "AuthenticationLevel", "MutualAuthRequired"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Security.AuthenticationLevel MutualAuthRequired
void System::Net::Security::AuthenticationLevel::_set_MutualAuthRequired(::System::Net::Security::AuthenticationLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticationLevel::_set_MutualAuthRequired");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Security", "AuthenticationLevel", "MutualAuthRequired", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Security::AuthenticationLevel::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::AuthenticationLevel::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Security.RemoteCertificateValidationCallback
#include "System/Net/Security/RemoteCertificateValidationCallback.hpp"
// Including type: System.Security.Cryptography.X509Certificates.X509Certificate
#include "System/Security/Cryptography/X509Certificates/X509Certificate.hpp"
// Including type: System.Security.Cryptography.X509Certificates.X509Chain
#include "System/Security/Cryptography/X509Certificates/X509Chain.hpp"
// Including type: System.Net.Security.SslPolicyErrors
#include "System/Net/Security/SslPolicyErrors.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Security.RemoteCertificateValidationCallback.Invoke
bool System::Net::Security::RemoteCertificateValidationCallback::Invoke(::Il2CppObject* sender, ::System::Security::Cryptography::X509Certificates::X509Certificate* certificate, ::System::Security::Cryptography::X509Certificates::X509Chain* chain, ::System::Net::Security::SslPolicyErrors sslPolicyErrors) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::RemoteCertificateValidationCallback::Invoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Invoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sender), ::il2cpp_utils::ExtractType(certificate), ::il2cpp_utils::ExtractType(chain), ::il2cpp_utils::ExtractType(sslPolicyErrors)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, sender, certificate, chain, sslPolicyErrors);
}
// Autogenerated method: System.Net.Security.RemoteCertificateValidationCallback.BeginInvoke
::System::IAsyncResult* System::Net::Security::RemoteCertificateValidationCallback::BeginInvoke(::Il2CppObject* sender, ::System::Security::Cryptography::X509Certificates::X509Certificate* certificate, ::System::Security::Cryptography::X509Certificates::X509Chain* chain, ::System::Net::Security::SslPolicyErrors sslPolicyErrors, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::RemoteCertificateValidationCallback::BeginInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(sender), ::il2cpp_utils::ExtractType(certificate), ::il2cpp_utils::ExtractType(chain), ::il2cpp_utils::ExtractType(sslPolicyErrors), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(object)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, sender, certificate, chain, sslPolicyErrors, callback, object);
}
// Autogenerated method: System.Net.Security.RemoteCertificateValidationCallback.EndInvoke
bool System::Net::Security::RemoteCertificateValidationCallback::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::RemoteCertificateValidationCallback::EndInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(result)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Security.SslPolicyErrors
#include "System/Net/Security/SslPolicyErrors.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.Net.Security.SslPolicyErrors None
::System::Net::Security::SslPolicyErrors System::Net::Security::SslPolicyErrors::_get_None() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_get_None");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Security::SslPolicyErrors>("System.Net.Security", "SslPolicyErrors", "None"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Security.SslPolicyErrors None
void System::Net::Security::SslPolicyErrors::_set_None(::System::Net::Security::SslPolicyErrors value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_set_None");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Security", "SslPolicyErrors", "None", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Security.SslPolicyErrors RemoteCertificateNotAvailable
::System::Net::Security::SslPolicyErrors System::Net::Security::SslPolicyErrors::_get_RemoteCertificateNotAvailable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_get_RemoteCertificateNotAvailable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Security::SslPolicyErrors>("System.Net.Security", "SslPolicyErrors", "RemoteCertificateNotAvailable"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Security.SslPolicyErrors RemoteCertificateNotAvailable
void System::Net::Security::SslPolicyErrors::_set_RemoteCertificateNotAvailable(::System::Net::Security::SslPolicyErrors value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_set_RemoteCertificateNotAvailable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Security", "SslPolicyErrors", "RemoteCertificateNotAvailable", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Security.SslPolicyErrors RemoteCertificateNameMismatch
::System::Net::Security::SslPolicyErrors System::Net::Security::SslPolicyErrors::_get_RemoteCertificateNameMismatch() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_get_RemoteCertificateNameMismatch");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Security::SslPolicyErrors>("System.Net.Security", "SslPolicyErrors", "RemoteCertificateNameMismatch"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Security.SslPolicyErrors RemoteCertificateNameMismatch
void System::Net::Security::SslPolicyErrors::_set_RemoteCertificateNameMismatch(::System::Net::Security::SslPolicyErrors value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_set_RemoteCertificateNameMismatch");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Security", "SslPolicyErrors", "RemoteCertificateNameMismatch", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Security.SslPolicyErrors RemoteCertificateChainErrors
::System::Net::Security::SslPolicyErrors System::Net::Security::SslPolicyErrors::_get_RemoteCertificateChainErrors() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_get_RemoteCertificateChainErrors");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Security::SslPolicyErrors>("System.Net.Security", "SslPolicyErrors", "RemoteCertificateChainErrors"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Security.SslPolicyErrors RemoteCertificateChainErrors
void System::Net::Security::SslPolicyErrors::_set_RemoteCertificateChainErrors(::System::Net::Security::SslPolicyErrors value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::_set_RemoteCertificateChainErrors");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Security", "SslPolicyErrors", "RemoteCertificateChainErrors", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Security::SslPolicyErrors::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslPolicyErrors::dyn_value__");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "value__"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Security.LocalCertSelectionCallback
#include "System/Net/Security/LocalCertSelectionCallback.hpp"
// Including type: System.Security.Cryptography.X509Certificates.X509Certificate
#include "System/Security/Cryptography/X509Certificates/X509Certificate.hpp"
// Including type: System.Security.Cryptography.X509Certificates.X509CertificateCollection
#include "System/Security/Cryptography/X509Certificates/X509CertificateCollection.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Security.LocalCertSelectionCallback.Invoke
::System::Security::Cryptography::X509Certificates::X509Certificate* System::Net::Security::LocalCertSelectionCallback::Invoke(::StringW targetHost, ::System::Security::Cryptography::X509Certificates::X509CertificateCollection* localCertificates, ::System::Security::Cryptography::X509Certificates::X509Certificate* remoteCertificate, ::ArrayW<::StringW> acceptableIssuers) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::LocalCertSelectionCallback::Invoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Invoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(targetHost), ::il2cpp_utils::ExtractType(localCertificates), ::il2cpp_utils::ExtractType(remoteCertificate), ::il2cpp_utils::ExtractType(acceptableIssuers)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Security::Cryptography::X509Certificates::X509Certificate*, false>(this, ___internal__method, targetHost, localCertificates, remoteCertificate, acceptableIssuers);
}
// Autogenerated method: System.Net.Security.LocalCertSelectionCallback.BeginInvoke
::System::IAsyncResult* System::Net::Security::LocalCertSelectionCallback::BeginInvoke(::StringW targetHost, ::System::Security::Cryptography::X509Certificates::X509CertificateCollection* localCertificates, ::System::Security::Cryptography::X509Certificates::X509Certificate* remoteCertificate, ::ArrayW<::StringW> acceptableIssuers, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::LocalCertSelectionCallback::BeginInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(targetHost), ::il2cpp_utils::ExtractType(localCertificates), ::il2cpp_utils::ExtractType(remoteCertificate), ::il2cpp_utils::ExtractType(acceptableIssuers), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(object)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, targetHost, localCertificates, remoteCertificate, acceptableIssuers, callback, object);
}
// Autogenerated method: System.Net.Security.LocalCertSelectionCallback.EndInvoke
::System::Security::Cryptography::X509Certificates::X509Certificate* System::Net::Security::LocalCertSelectionCallback::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::LocalCertSelectionCallback::EndInvoke");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndInvoke", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(result)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Security::Cryptography::X509Certificates::X509Certificate*, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Security.SslStream
#include "System/Net/Security/SslStream.hpp"
// Including type: Mono.Security.Interface.MonoTlsProvider
#include "Mono/Security/Interface/MonoTlsProvider.hpp"
// Including type: Mono.Security.Interface.IMonoSslStream
#include "Mono/Security/Interface/IMonoSslStream.hpp"
// Including type: System.IO.Stream
#include "System/IO/Stream.hpp"
// Including type: Mono.Security.Interface.MonoTlsSettings
#include "Mono/Security/Interface/MonoTlsSettings.hpp"
// Including type: System.IO.SeekOrigin
#include "System/IO/SeekOrigin.hpp"
// Including type: System.Threading.Tasks.Task
#include "System/Threading/Tasks/Task.hpp"
// Including type: System.Threading.CancellationToken
#include "System/Threading/CancellationToken.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private Mono.Security.Interface.MonoTlsProvider provider
::Mono::Security::Interface::MonoTlsProvider*& System::Net::Security::SslStream::dyn_provider() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::dyn_provider");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "provider"))->offset;
return *reinterpret_cast<::Mono::Security::Interface::MonoTlsProvider**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private Mono.Security.Interface.IMonoSslStream impl
::Mono::Security::Interface::IMonoSslStream*& System::Net::Security::SslStream::dyn_impl() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::dyn_impl");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "impl"))->offset;
return *reinterpret_cast<::Mono::Security::Interface::IMonoSslStream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Security.SslStream.get_Impl
::Mono::Security::Interface::IMonoSslStream* System::Net::Security::SslStream::get_Impl() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_Impl");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Impl", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Mono::Security::Interface::IMonoSslStream*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.CreateMonoSslStream
::Mono::Security::Interface::IMonoSslStream* System::Net::Security::SslStream::CreateMonoSslStream(::System::IO::Stream* innerStream, bool leaveInnerStreamOpen, ::Mono::Security::Interface::MonoTlsProvider* provider, ::Mono::Security::Interface::MonoTlsSettings* settings) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::CreateMonoSslStream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Security", "SslStream", "CreateMonoSslStream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(innerStream), ::il2cpp_utils::ExtractType(leaveInnerStreamOpen), ::il2cpp_utils::ExtractType(provider), ::il2cpp_utils::ExtractType(settings)})));
return ::il2cpp_utils::RunMethodRethrow<::Mono::Security::Interface::IMonoSslStream*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, innerStream, leaveInnerStreamOpen, provider, settings);
}
// Autogenerated method: System.Net.Security.SslStream.CheckDisposed
void System::Net::Security::SslStream::CheckDisposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::CheckDisposed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CheckDisposed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.get_IsAuthenticated
bool System::Net::Security::SslStream::get_IsAuthenticated() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_IsAuthenticated");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_IsAuthenticated", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.get_CanSeek
bool System::Net::Security::SslStream::get_CanSeek() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_CanSeek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanSeek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.get_CanRead
bool System::Net::Security::SslStream::get_CanRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_CanRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.get_CanWrite
bool System::Net::Security::SslStream::get_CanWrite() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_CanWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.get_ReadTimeout
int System::Net::Security::SslStream::get_ReadTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_ReadTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ReadTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.set_ReadTimeout
void System::Net::Security::SslStream::set_ReadTimeout(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::set_ReadTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ReadTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Security.SslStream.get_WriteTimeout
int System::Net::Security::SslStream::get_WriteTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_WriteTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_WriteTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.get_Length
int64_t System::Net::Security::SslStream::get_Length() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_Length");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Length", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.get_Position
int64_t System::Net::Security::SslStream::get_Position() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::get_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.set_Position
void System::Net::Security::SslStream::set_Position(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::set_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Security.SslStream.SetLength
void System::Net::Security::SslStream::SetLength(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::SetLength");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.Net.Security.SslStream.Seek
int64_t System::Net::Security::SslStream::Seek(int64_t offset, ::System::IO::SeekOrigin origin) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::Seek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Seek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(origin)})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method, offset, origin);
}
// Autogenerated method: System.Net.Security.SslStream.FlushAsync
::System::Threading::Tasks::Task* System::Net::Security::SslStream::FlushAsync(::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::FlushAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, cancellationToken);
}
// Autogenerated method: System.Net.Security.SslStream.Flush
void System::Net::Security::SslStream::Flush() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::Flush");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Flush", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Security.SslStream.Dispose
void System::Net::Security::SslStream::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.Net.Security.SslStream.Read
int System::Net::Security::SslStream::Read(::ArrayW<uint8_t> buffer, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::Read");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Read", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, count);
}
// Autogenerated method: System.Net.Security.SslStream.Write
void System::Net::Security::SslStream::Write(::ArrayW<uint8_t> buffer, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::Write");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Write", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer, offset, count);
}
// Autogenerated method: System.Net.Security.SslStream.BeginRead
::System::IAsyncResult* System::Net::Security::SslStream::BeginRead(::ArrayW<uint8_t> buffer, int offset, int count, ::System::AsyncCallback* asyncCallback, ::Il2CppObject* asyncState) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::BeginRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(asyncCallback), ::il2cpp_utils::ExtractType(asyncState)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, count, asyncCallback, asyncState);
}
// Autogenerated method: System.Net.Security.SslStream.EndRead
int System::Net::Security::SslStream::EndRead(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::EndRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.Net.Security.SslStream.BeginWrite
::System::IAsyncResult* System::Net::Security::SslStream::BeginWrite(::ArrayW<uint8_t> buffer, int offset, int count, ::System::AsyncCallback* asyncCallback, ::Il2CppObject* asyncState) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::BeginWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(asyncCallback), ::il2cpp_utils::ExtractType(asyncState)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, count, asyncCallback, asyncState);
}
// Autogenerated method: System.Net.Security.SslStream.EndWrite
void System::Net::Security::SslStream::EndWrite(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Security::SslStream::EndWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.NetworkInformation.IPGlobalProperties
#include "System/Net/NetworkInformation/IPGlobalProperties.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 readonly System.Boolean <PlatformNeedsLibCWorkaround>k__BackingField
bool System::Net::NetworkInformation::IPGlobalProperties::_get_$PlatformNeedsLibCWorkaround$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::IPGlobalProperties::_get_$PlatformNeedsLibCWorkaround$k__BackingField");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<bool>("System.Net.NetworkInformation", "IPGlobalProperties", "<PlatformNeedsLibCWorkaround>k__BackingField")));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Boolean <PlatformNeedsLibCWorkaround>k__BackingField
void System::Net::NetworkInformation::IPGlobalProperties::_set_$PlatformNeedsLibCWorkaround$k__BackingField(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::IPGlobalProperties::_set_$PlatformNeedsLibCWorkaround$k__BackingField");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "IPGlobalProperties", "<PlatformNeedsLibCWorkaround>k__BackingField", value));
}
// Autogenerated method: System.Net.NetworkInformation.IPGlobalProperties.get_PlatformNeedsLibCWorkaround
bool System::Net::NetworkInformation::IPGlobalProperties::get_PlatformNeedsLibCWorkaround() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::IPGlobalProperties::get_PlatformNeedsLibCWorkaround");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.NetworkInformation", "IPGlobalProperties", "get_PlatformNeedsLibCWorkaround", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.NetworkInformation.IPGlobalProperties.get_DomainName
::StringW System::Net::NetworkInformation::IPGlobalProperties::get_DomainName() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::IPGlobalProperties::get_DomainName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DomainName", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::StringW, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties
::System::Net::NetworkInformation::IPGlobalProperties* System::Net::NetworkInformation::IPGlobalProperties::GetIPGlobalProperties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::IPGlobalProperties::GetIPGlobalProperties");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.NetworkInformation", "IPGlobalProperties", "GetIPGlobalProperties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::NetworkInformation::IPGlobalProperties*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.NetworkInformation.IPGlobalProperties.InternalGetIPGlobalProperties
::System::Net::NetworkInformation::IPGlobalProperties* System::Net::NetworkInformation::IPGlobalProperties::InternalGetIPGlobalProperties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::IPGlobalProperties::InternalGetIPGlobalProperties");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.NetworkInformation", "IPGlobalProperties", "InternalGetIPGlobalProperties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::NetworkInformation::IPGlobalProperties*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.NetworkInformation.NetworkInformationException
#include "System/Net/NetworkInformation/NetworkInformationException.hpp"
// Including type: System.Runtime.Serialization.SerializationInfo
#include "System/Runtime/Serialization/SerializationInfo.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.NetworkInformation.NetworkInterfaceComponent
#include "System/Net/NetworkInformation/NetworkInterfaceComponent.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.Net.NetworkInformation.NetworkInterfaceComponent IPv4
::System::Net::NetworkInformation::NetworkInterfaceComponent System::Net::NetworkInformation::NetworkInterfaceComponent::_get_IPv4() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetworkInterfaceComponent::_get_IPv4");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::NetworkInterfaceComponent>("System.Net.NetworkInformation", "NetworkInterfaceComponent", "IPv4"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.NetworkInformation.NetworkInterfaceComponent IPv4
void System::Net::NetworkInformation::NetworkInterfaceComponent::_set_IPv4(::System::Net::NetworkInformation::NetworkInterfaceComponent value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetworkInterfaceComponent::_set_IPv4");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "NetworkInterfaceComponent", "IPv4", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.NetworkInformation.NetworkInterfaceComponent IPv6
::System::Net::NetworkInformation::NetworkInterfaceComponent System::Net::NetworkInformation::NetworkInterfaceComponent::_get_IPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetworkInterfaceComponent::_get_IPv6");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::NetworkInterfaceComponent>("System.Net.NetworkInformation", "NetworkInterfaceComponent", "IPv6"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.NetworkInformation.NetworkInterfaceComponent IPv6
void System::Net::NetworkInformation::NetworkInterfaceComponent::_set_IPv6(::System::Net::NetworkInformation::NetworkInterfaceComponent value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetworkInterfaceComponent::_set_IPv6");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "NetworkInterfaceComponent", "IPv6", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::NetworkInformation::NetworkInterfaceComponent::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetworkInterfaceComponent::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: System.Net.NetworkInformation.NetBiosNodeType
#include "System/Net/NetworkInformation/NetBiosNodeType.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.Net.NetworkInformation.NetBiosNodeType Unknown
::System::Net::NetworkInformation::NetBiosNodeType System::Net::NetworkInformation::NetBiosNodeType::_get_Unknown() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_get_Unknown");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::NetBiosNodeType>("System.Net.NetworkInformation", "NetBiosNodeType", "Unknown"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.NetworkInformation.NetBiosNodeType Unknown
void System::Net::NetworkInformation::NetBiosNodeType::_set_Unknown(::System::Net::NetworkInformation::NetBiosNodeType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_set_Unknown");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "NetBiosNodeType", "Unknown", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.NetworkInformation.NetBiosNodeType Broadcast
::System::Net::NetworkInformation::NetBiosNodeType System::Net::NetworkInformation::NetBiosNodeType::_get_Broadcast() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_get_Broadcast");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::NetBiosNodeType>("System.Net.NetworkInformation", "NetBiosNodeType", "Broadcast"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.NetworkInformation.NetBiosNodeType Broadcast
void System::Net::NetworkInformation::NetBiosNodeType::_set_Broadcast(::System::Net::NetworkInformation::NetBiosNodeType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_set_Broadcast");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "NetBiosNodeType", "Broadcast", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.NetworkInformation.NetBiosNodeType Peer2Peer
::System::Net::NetworkInformation::NetBiosNodeType System::Net::NetworkInformation::NetBiosNodeType::_get_Peer2Peer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_get_Peer2Peer");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::NetBiosNodeType>("System.Net.NetworkInformation", "NetBiosNodeType", "Peer2Peer"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.NetworkInformation.NetBiosNodeType Peer2Peer
void System::Net::NetworkInformation::NetBiosNodeType::_set_Peer2Peer(::System::Net::NetworkInformation::NetBiosNodeType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_set_Peer2Peer");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "NetBiosNodeType", "Peer2Peer", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.NetworkInformation.NetBiosNodeType Mixed
::System::Net::NetworkInformation::NetBiosNodeType System::Net::NetworkInformation::NetBiosNodeType::_get_Mixed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_get_Mixed");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::NetBiosNodeType>("System.Net.NetworkInformation", "NetBiosNodeType", "Mixed"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.NetworkInformation.NetBiosNodeType Mixed
void System::Net::NetworkInformation::NetBiosNodeType::_set_Mixed(::System::Net::NetworkInformation::NetBiosNodeType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_set_Mixed");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "NetBiosNodeType", "Mixed", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.NetworkInformation.NetBiosNodeType Hybrid
::System::Net::NetworkInformation::NetBiosNodeType System::Net::NetworkInformation::NetBiosNodeType::_get_Hybrid() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_get_Hybrid");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::NetBiosNodeType>("System.Net.NetworkInformation", "NetBiosNodeType", "Hybrid"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.NetworkInformation.NetBiosNodeType Hybrid
void System::Net::NetworkInformation::NetBiosNodeType::_set_Hybrid(::System::Net::NetworkInformation::NetBiosNodeType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::_set_Hybrid");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "NetBiosNodeType", "Hybrid", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::NetworkInformation::NetBiosNodeType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::NetBiosNodeType::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: System.Net.NetworkInformation.CommonUnixIPGlobalProperties
#include "System/Net/NetworkInformation/CommonUnixIPGlobalProperties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.NetworkInformation.CommonUnixIPGlobalProperties.getdomainname
int System::Net::NetworkInformation::CommonUnixIPGlobalProperties::getdomainname(::ArrayW<uint8_t> name, int len) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::CommonUnixIPGlobalProperties::getdomainname");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.NetworkInformation", "CommonUnixIPGlobalProperties", "getdomainname", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(name), ::il2cpp_utils::ExtractType(len)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, name, len);
}
// Autogenerated method: System.Net.NetworkInformation.CommonUnixIPGlobalProperties.get_DomainName
::StringW System::Net::NetworkInformation::CommonUnixIPGlobalProperties::get_DomainName() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::CommonUnixIPGlobalProperties::get_DomainName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DomainName", 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: System.Net.NetworkInformation.UnixIPGlobalProperties
#include "System/Net/NetworkInformation/UnixIPGlobalProperties.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: System.Net.NetworkInformation.UnixNoLibCIPGlobalProperties
#include "System/Net/NetworkInformation/UnixNoLibCIPGlobalProperties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.NetworkInformation.UnixNoLibCIPGlobalProperties.get_DomainName
::StringW System::Net::NetworkInformation::UnixNoLibCIPGlobalProperties::get_DomainName() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::UnixNoLibCIPGlobalProperties::get_DomainName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DomainName", 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: System.Net.NetworkInformation.MibIPGlobalProperties
#include "System/Net/NetworkInformation/MibIPGlobalProperties.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 readonly System.Char[] wsChars
::ArrayW<::Il2CppChar> System::Net::NetworkInformation::MibIPGlobalProperties::_get_wsChars() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::_get_wsChars");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<::Il2CppChar>>("System.Net.NetworkInformation", "MibIPGlobalProperties", "wsChars"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Char[] wsChars
void System::Net::NetworkInformation::MibIPGlobalProperties::_set_wsChars(::ArrayW<::Il2CppChar> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::_set_wsChars");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "MibIPGlobalProperties", "wsChars", value));
}
// Autogenerated instance field getter
// Get instance field: public readonly System.String StatisticsFile
::StringW& System::Net::NetworkInformation::MibIPGlobalProperties::dyn_StatisticsFile() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::dyn_StatisticsFile");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "StatisticsFile"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public readonly System.String StatisticsFileIPv6
::StringW& System::Net::NetworkInformation::MibIPGlobalProperties::dyn_StatisticsFileIPv6() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::dyn_StatisticsFileIPv6");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "StatisticsFileIPv6"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public readonly System.String TcpFile
::StringW& System::Net::NetworkInformation::MibIPGlobalProperties::dyn_TcpFile() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::dyn_TcpFile");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "TcpFile"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public readonly System.String Tcp6File
::StringW& System::Net::NetworkInformation::MibIPGlobalProperties::dyn_Tcp6File() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::dyn_Tcp6File");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Tcp6File"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public readonly System.String UdpFile
::StringW& System::Net::NetworkInformation::MibIPGlobalProperties::dyn_UdpFile() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::dyn_UdpFile");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "UdpFile"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public readonly System.String Udp6File
::StringW& System::Net::NetworkInformation::MibIPGlobalProperties::dyn_Udp6File() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::dyn_Udp6File");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "Udp6File"))->offset;
return *reinterpret_cast<::StringW*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.NetworkInformation.MibIPGlobalProperties..cctor
void System::Net::NetworkInformation::MibIPGlobalProperties::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::MibIPGlobalProperties::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.NetworkInformation", "MibIPGlobalProperties", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.NetworkInformation.Win32IPGlobalProperties
#include "System/Net/NetworkInformation/Win32IPGlobalProperties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.NetworkInformation.Win32IPGlobalProperties.get_DomainName
::StringW System::Net::NetworkInformation::Win32IPGlobalProperties::get_DomainName() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::Win32IPGlobalProperties::get_DomainName");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_DomainName", 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: System.Net.NetworkInformation.Win32NetworkInterface
#include "System/Net/NetworkInformation/Win32NetworkInterface.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.Net.NetworkInformation.Win32_FIXED_INFO fixedInfo
::System::Net::NetworkInformation::Win32_FIXED_INFO System::Net::NetworkInformation::Win32NetworkInterface::_get_fixedInfo() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::Win32NetworkInterface::_get_fixedInfo");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::NetworkInformation::Win32_FIXED_INFO>("System.Net.NetworkInformation", "Win32NetworkInterface", "fixedInfo"));
}
// Autogenerated static field setter
// Set static field: static private System.Net.NetworkInformation.Win32_FIXED_INFO fixedInfo
void System::Net::NetworkInformation::Win32NetworkInterface::_set_fixedInfo(::System::Net::NetworkInformation::Win32_FIXED_INFO value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::Win32NetworkInterface::_set_fixedInfo");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "Win32NetworkInterface", "fixedInfo", value));
}
// Autogenerated static field getter
// Get static field: static private System.Boolean initialized
bool System::Net::NetworkInformation::Win32NetworkInterface::_get_initialized() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::Win32NetworkInterface::_get_initialized");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<bool>("System.Net.NetworkInformation", "Win32NetworkInterface", "initialized"));
}
// Autogenerated static field setter
// Set static field: static private System.Boolean initialized
void System::Net::NetworkInformation::Win32NetworkInterface::_set_initialized(bool value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::Win32NetworkInterface::_set_initialized");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.NetworkInformation", "Win32NetworkInterface", "initialized", value));
}
// Autogenerated method: System.Net.NetworkInformation.Win32NetworkInterface.get_FixedInfo
::System::Net::NetworkInformation::Win32_FIXED_INFO System::Net::NetworkInformation::Win32NetworkInterface::get_FixedInfo() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::Win32NetworkInterface::get_FixedInfo");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.NetworkInformation", "Win32NetworkInterface", "get_FixedInfo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::NetworkInformation::Win32_FIXED_INFO, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.NetworkInformation.Win32NetworkInterface.GetNetworkParams
int System::Net::NetworkInformation::Win32NetworkInterface::GetNetworkParams(::System::IntPtr ptr, ByRef<int> size) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::NetworkInformation::Win32NetworkInterface::GetNetworkParams");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.NetworkInformation", "Win32NetworkInterface", "GetNetworkParams", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ptr), ::il2cpp_utils::ExtractType(size)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, ptr, byref(size));
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.Configuration.DefaultProxySectionInternal
#include "System/Net/Configuration/DefaultProxySectionInternal.hpp"
// Including type: System.Net.IWebProxy
#include "System/Net/IWebProxy.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.Object classSyncObject
::Il2CppObject* System::Net::Configuration::DefaultProxySectionInternal::_get_classSyncObject() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::_get_classSyncObject");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::Il2CppObject*>("System.Net.Configuration", "DefaultProxySectionInternal", "classSyncObject"));
}
// Autogenerated static field setter
// Set static field: static private System.Object classSyncObject
void System::Net::Configuration::DefaultProxySectionInternal::_set_classSyncObject(::Il2CppObject* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::_set_classSyncObject");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Configuration", "DefaultProxySectionInternal", "classSyncObject", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Net.IWebProxy webProxy
::System::Net::IWebProxy*& System::Net::Configuration::DefaultProxySectionInternal::dyn_webProxy() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::dyn_webProxy");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "webProxy"))->offset;
return *reinterpret_cast<::System::Net::IWebProxy**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Configuration.DefaultProxySectionInternal.get_ClassSyncObject
::Il2CppObject* System::Net::Configuration::DefaultProxySectionInternal::get_ClassSyncObject() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::get_ClassSyncObject");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Configuration", "DefaultProxySectionInternal", "get_ClassSyncObject", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Configuration.DefaultProxySectionInternal.get_WebProxy
::System::Net::IWebProxy* System::Net::Configuration::DefaultProxySectionInternal::get_WebProxy() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::get_WebProxy");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_WebProxy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::IWebProxy*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Configuration.DefaultProxySectionInternal.GetDefaultProxy_UsingOldMonoCode
::System::Net::IWebProxy* System::Net::Configuration::DefaultProxySectionInternal::GetDefaultProxy_UsingOldMonoCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::GetDefaultProxy_UsingOldMonoCode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Configuration", "DefaultProxySectionInternal", "GetDefaultProxy_UsingOldMonoCode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::IWebProxy*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Configuration.DefaultProxySectionInternal.GetSystemWebProxy
::System::Net::IWebProxy* System::Net::Configuration::DefaultProxySectionInternal::GetSystemWebProxy() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::GetSystemWebProxy");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Configuration", "DefaultProxySectionInternal", "GetSystemWebProxy", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::IWebProxy*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Configuration.DefaultProxySectionInternal.GetSection
::System::Net::Configuration::DefaultProxySectionInternal* System::Net::Configuration::DefaultProxySectionInternal::GetSection() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySectionInternal::GetSection");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Configuration", "DefaultProxySectionInternal", "GetSection", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Configuration::DefaultProxySectionInternal*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.SettingsSectionInternal
#include "System/Net/Configuration/SettingsSectionInternal.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 readonly System.Net.Configuration.SettingsSectionInternal instance
::System::Net::Configuration::SettingsSectionInternal* System::Net::Configuration::SettingsSectionInternal::_get_instance() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSectionInternal::_get_instance");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Configuration::SettingsSectionInternal*>("System.Net.Configuration", "SettingsSectionInternal", "instance"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Net.Configuration.SettingsSectionInternal instance
void System::Net::Configuration::SettingsSectionInternal::_set_instance(::System::Net::Configuration::SettingsSectionInternal* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSectionInternal::_set_instance");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Configuration", "SettingsSectionInternal", "instance", value));
}
// Autogenerated instance field getter
// Get instance field: readonly System.Boolean HttpListenerUnescapeRequestUrl
bool& System::Net::Configuration::SettingsSectionInternal::dyn_HttpListenerUnescapeRequestUrl() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSectionInternal::dyn_HttpListenerUnescapeRequestUrl");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "HttpListenerUnescapeRequestUrl"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: readonly System.Net.Sockets.IPProtectionLevel IPProtectionLevel
::System::Net::Sockets::IPProtectionLevel& System::Net::Configuration::SettingsSectionInternal::dyn_IPProtectionLevel() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSectionInternal::dyn_IPProtectionLevel");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "IPProtectionLevel"))->offset;
return *reinterpret_cast<::System::Net::Sockets::IPProtectionLevel*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Configuration.SettingsSectionInternal.get_Section
::System::Net::Configuration::SettingsSectionInternal* System::Net::Configuration::SettingsSectionInternal::get_Section() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSectionInternal::get_Section");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Configuration", "SettingsSectionInternal", "get_Section", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Net::Configuration::SettingsSectionInternal*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.Net.Configuration.SettingsSectionInternal.get_Ipv6Enabled
bool System::Net::Configuration::SettingsSectionInternal::get_Ipv6Enabled() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSectionInternal::get_Ipv6Enabled");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Ipv6Enabled", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Configuration.SettingsSectionInternal..cctor
void System::Net::Configuration::SettingsSectionInternal::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSectionInternal::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Configuration", "SettingsSectionInternal", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Cache.RequestCache
#include "System/Net/Cache/RequestCache.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 readonly System.Char[] LineSplits
::ArrayW<::Il2CppChar> System::Net::Cache::RequestCache::_get_LineSplits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCache::_get_LineSplits");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<::Il2CppChar>>("System.Net.Cache", "RequestCache", "LineSplits"));
}
// Autogenerated static field setter
// Set static field: static readonly System.Char[] LineSplits
void System::Net::Cache::RequestCache::_set_LineSplits(::ArrayW<::Il2CppChar> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCache::_set_LineSplits");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCache", "LineSplits", value));
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _IsPrivateCache
bool& System::Net::Cache::RequestCache::dyn__IsPrivateCache() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCache::dyn__IsPrivateCache");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_IsPrivateCache"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _CanWrite
bool& System::Net::Cache::RequestCache::dyn__CanWrite() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCache::dyn__CanWrite");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_CanWrite"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.Net.Cache.RequestCache..cctor
void System::Net::Cache::RequestCache::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCache::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.Net.Cache", "RequestCache", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Cache.RequestCacheLevel
#include "System/Net/Cache/RequestCacheLevel.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.Net.Cache.RequestCacheLevel Default
::System::Net::Cache::RequestCacheLevel System::Net::Cache::RequestCacheLevel::_get_Default() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_get_Default");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Cache::RequestCacheLevel>("System.Net.Cache", "RequestCacheLevel", "Default"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Cache.RequestCacheLevel Default
void System::Net::Cache::RequestCacheLevel::_set_Default(::System::Net::Cache::RequestCacheLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_set_Default");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCacheLevel", "Default", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Cache.RequestCacheLevel BypassCache
::System::Net::Cache::RequestCacheLevel System::Net::Cache::RequestCacheLevel::_get_BypassCache() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_get_BypassCache");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Cache::RequestCacheLevel>("System.Net.Cache", "RequestCacheLevel", "BypassCache"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Cache.RequestCacheLevel BypassCache
void System::Net::Cache::RequestCacheLevel::_set_BypassCache(::System::Net::Cache::RequestCacheLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_set_BypassCache");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCacheLevel", "BypassCache", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Cache.RequestCacheLevel CacheOnly
::System::Net::Cache::RequestCacheLevel System::Net::Cache::RequestCacheLevel::_get_CacheOnly() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_get_CacheOnly");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Cache::RequestCacheLevel>("System.Net.Cache", "RequestCacheLevel", "CacheOnly"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Cache.RequestCacheLevel CacheOnly
void System::Net::Cache::RequestCacheLevel::_set_CacheOnly(::System::Net::Cache::RequestCacheLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_set_CacheOnly");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCacheLevel", "CacheOnly", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Cache.RequestCacheLevel CacheIfAvailable
::System::Net::Cache::RequestCacheLevel System::Net::Cache::RequestCacheLevel::_get_CacheIfAvailable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_get_CacheIfAvailable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Cache::RequestCacheLevel>("System.Net.Cache", "RequestCacheLevel", "CacheIfAvailable"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Cache.RequestCacheLevel CacheIfAvailable
void System::Net::Cache::RequestCacheLevel::_set_CacheIfAvailable(::System::Net::Cache::RequestCacheLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_set_CacheIfAvailable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCacheLevel", "CacheIfAvailable", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Cache.RequestCacheLevel Revalidate
::System::Net::Cache::RequestCacheLevel System::Net::Cache::RequestCacheLevel::_get_Revalidate() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_get_Revalidate");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Cache::RequestCacheLevel>("System.Net.Cache", "RequestCacheLevel", "Revalidate"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Cache.RequestCacheLevel Revalidate
void System::Net::Cache::RequestCacheLevel::_set_Revalidate(::System::Net::Cache::RequestCacheLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_set_Revalidate");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCacheLevel", "Revalidate", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Cache.RequestCacheLevel Reload
::System::Net::Cache::RequestCacheLevel System::Net::Cache::RequestCacheLevel::_get_Reload() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_get_Reload");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Cache::RequestCacheLevel>("System.Net.Cache", "RequestCacheLevel", "Reload"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Cache.RequestCacheLevel Reload
void System::Net::Cache::RequestCacheLevel::_set_Reload(::System::Net::Cache::RequestCacheLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_set_Reload");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCacheLevel", "Reload", value));
}
// Autogenerated static field getter
// Get static field: static public System.Net.Cache.RequestCacheLevel NoCacheNoStore
::System::Net::Cache::RequestCacheLevel System::Net::Cache::RequestCacheLevel::_get_NoCacheNoStore() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_get_NoCacheNoStore");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::Net::Cache::RequestCacheLevel>("System.Net.Cache", "RequestCacheLevel", "NoCacheNoStore"));
}
// Autogenerated static field setter
// Set static field: static public System.Net.Cache.RequestCacheLevel NoCacheNoStore
void System::Net::Cache::RequestCacheLevel::_set_NoCacheNoStore(::System::Net::Cache::RequestCacheLevel value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::_set_NoCacheNoStore");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.Net.Cache", "RequestCacheLevel", "NoCacheNoStore", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::Net::Cache::RequestCacheLevel::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Cache::RequestCacheLevel::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: System.Net.Configuration.BypassElementCollection
#include "System/Net/Configuration/BypassElementCollection.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: System.Net.Configuration.ConnectionManagementElementCollection
#include "System/Net/Configuration/ConnectionManagementElementCollection.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: System.Net.Configuration.ConnectionManagementSection
#include "System/Net/Configuration/ConnectionManagementSection.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.ConnectionManagementSection.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::ConnectionManagementSection::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::ConnectionManagementSection::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.DefaultProxySection
#include "System/Net/Configuration/DefaultProxySection.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.DefaultProxySection.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::DefaultProxySection::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySection::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated method: System.Net.Configuration.DefaultProxySection.Reset
void System::Net::Configuration::DefaultProxySection::Reset(::System::Configuration::ConfigurationElement* parentElement) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::DefaultProxySection::Reset");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Reset", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(parentElement)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, parentElement);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.ProxyElement
#include "System/Net/Configuration/ProxyElement.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.ProxyElement.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::ProxyElement::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::ProxyElement::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.HttpWebRequestElement
#include "System/Net/Configuration/HttpWebRequestElement.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.HttpWebRequestElement.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::HttpWebRequestElement::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::HttpWebRequestElement::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.Ipv6Element
#include "System/Net/Configuration/Ipv6Element.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.Ipv6Element.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::Ipv6Element::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::Ipv6Element::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.NetSectionGroup
#include "System/Net/Configuration/NetSectionGroup.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: System.Net.Configuration.SettingsSection
#include "System/Net/Configuration/SettingsSection.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.SettingsSection.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::SettingsSection::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SettingsSection::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.PerformanceCountersElement
#include "System/Net/Configuration/PerformanceCountersElement.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.PerformanceCountersElement.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::PerformanceCountersElement::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::PerformanceCountersElement::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.ServicePointManagerElement
#include "System/Net/Configuration/ServicePointManagerElement.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.ServicePointManagerElement.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::ServicePointManagerElement::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::ServicePointManagerElement::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.SocketElement
#include "System/Net/Configuration/SocketElement.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.SocketElement.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::SocketElement::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::SocketElement::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.WebProxyScriptElement
#include "System/Net/Configuration/WebProxyScriptElement.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.WebProxyScriptElement.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::WebProxyScriptElement::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::WebProxyScriptElement::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.WebRequestModulesSection
#include "System/Net/Configuration/WebRequestModulesSection.hpp"
// Including type: System.Configuration.ConfigurationPropertyCollection
#include "System/Configuration/ConfigurationPropertyCollection.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Net.Configuration.WebRequestModulesSection.get_Properties
::System::Configuration::ConfigurationPropertyCollection* System::Net::Configuration::WebRequestModulesSection::get_Properties() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Net::Configuration::WebRequestModulesSection::get_Properties");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Properties", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Configuration::ConfigurationPropertyCollection*, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.Net.Configuration.WebRequestModuleElementCollection
#include "System/Net/Configuration/WebRequestModuleElementCollection.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
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Diagnostics.DiagnosticsConfigurationHandler
#include "System/Diagnostics/DiagnosticsConfigurationHandler.hpp"
// Including type: System.Xml.XmlNode
#include "System/Xml/XmlNode.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.Diagnostics.DiagnosticsConfigurationHandler.Create
::Il2CppObject* System::Diagnostics::DiagnosticsConfigurationHandler::Create(::Il2CppObject* parent, ::Il2CppObject* configContext, ::System::Xml::XmlNode* section) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::Diagnostics::DiagnosticsConfigurationHandler::Create");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Create", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(parent), ::il2cpp_utils::ExtractType(configContext), ::il2cpp_utils::ExtractType(section)})));
return ::il2cpp_utils::RunMethodRethrow<::Il2CppObject*, false>(this, ___internal__method, parent, configContext, section);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.BlockType
#include "System/IO/Compression/BlockType.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.IO.Compression.BlockType Uncompressed
::System::IO::Compression::BlockType System::IO::Compression::BlockType::_get_Uncompressed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::BlockType::_get_Uncompressed");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::BlockType>("System.IO.Compression", "BlockType", "Uncompressed"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.BlockType Uncompressed
void System::IO::Compression::BlockType::_set_Uncompressed(::System::IO::Compression::BlockType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::BlockType::_set_Uncompressed");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "BlockType", "Uncompressed", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.BlockType Static
::System::IO::Compression::BlockType System::IO::Compression::BlockType::_get_Static() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::BlockType::_get_Static");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::BlockType>("System.IO.Compression", "BlockType", "Static"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.BlockType Static
void System::IO::Compression::BlockType::_set_Static(::System::IO::Compression::BlockType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::BlockType::_set_Static");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "BlockType", "Static", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.BlockType Dynamic
::System::IO::Compression::BlockType System::IO::Compression::BlockType::_get_Dynamic() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::BlockType::_get_Dynamic");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::BlockType>("System.IO.Compression", "BlockType", "Dynamic"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.BlockType Dynamic
void System::IO::Compression::BlockType::_set_Dynamic(::System::IO::Compression::BlockType value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::BlockType::_set_Dynamic");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "BlockType", "Dynamic", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::IO::Compression::BlockType::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::BlockType::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: System.IO.Compression.CopyEncoder
#include "System/IO/Compression/CopyEncoder.hpp"
// Including type: System.IO.Compression.DeflateInput
#include "System/IO/Compression/DeflateInput.hpp"
// Including type: System.IO.Compression.OutputBuffer
#include "System/IO/Compression/OutputBuffer.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.IO.Compression.CopyEncoder.GetBlock
void System::IO::Compression::CopyEncoder::GetBlock(::System::IO::Compression::DeflateInput* input, ::System::IO::Compression::OutputBuffer* output, bool isFinal) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::CopyEncoder::GetBlock");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBlock", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input), ::il2cpp_utils::ExtractType(output), ::il2cpp_utils::ExtractType(isFinal)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, input, output, isFinal);
}
// Autogenerated method: System.IO.Compression.CopyEncoder.WriteLenNLen
void System::IO::Compression::CopyEncoder::WriteLenNLen(uint16_t len, ::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::CopyEncoder::WriteLenNLen");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteLenNLen", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(len), ::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, len, output);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.DeflateInput
#include "System/IO/Compression/DeflateInput.hpp"
// Including type: System.IO.Compression.DeflateInput/System.IO.Compression.InputState
#include "System/IO/Compression/DeflateInput_InputState.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.Byte[] <Buffer>k__BackingField
::ArrayW<uint8_t>& System::IO::Compression::DeflateInput::dyn_$Buffer$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::dyn_$Buffer$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Buffer>k__BackingField"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <Count>k__BackingField
int& System::IO::Compression::DeflateInput::dyn_$Count$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::dyn_$Count$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Count>k__BackingField"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <StartIndex>k__BackingField
int& System::IO::Compression::DeflateInput::dyn_$StartIndex$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::dyn_$StartIndex$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<StartIndex>k__BackingField"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.DeflateInput.get_Buffer
::ArrayW<uint8_t> System::IO::Compression::DeflateInput::get_Buffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::get_Buffer");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Buffer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateInput.set_Buffer
void System::IO::Compression::DeflateInput::set_Buffer(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::set_Buffer");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Buffer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.DeflateInput.get_Count
int System::IO::Compression::DeflateInput::get_Count() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::get_Count");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Count", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateInput.set_Count
void System::IO::Compression::DeflateInput::set_Count(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::set_Count");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Count", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.DeflateInput.get_StartIndex
int System::IO::Compression::DeflateInput::get_StartIndex() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::get_StartIndex");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_StartIndex", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateInput.set_StartIndex
void System::IO::Compression::DeflateInput::set_StartIndex(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::set_StartIndex");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_StartIndex", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.DeflateInput.ConsumeBytes
void System::IO::Compression::DeflateInput::ConsumeBytes(int n) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::ConsumeBytes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ConsumeBytes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(n)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, n);
}
// Autogenerated method: System.IO.Compression.DeflateInput.DumpState
::System::IO::Compression::DeflateInput::InputState System::IO::Compression::DeflateInput::DumpState() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::DumpState");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DumpState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::DeflateInput::InputState, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateInput.RestoreState
void System::IO::Compression::DeflateInput::RestoreState(::System::IO::Compression::DeflateInput::InputState state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::RestoreState");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RestoreState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, state);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.DeflateInput/System.IO.Compression.InputState
#include "System/IO/Compression/DeflateInput_InputState.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: readonly System.Int32 _count
int& System::IO::Compression::DeflateInput::InputState::dyn__count() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::InputState::dyn__count");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_count"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: readonly System.Int32 _startIndex
int& System::IO::Compression::DeflateInput::InputState::dyn__startIndex() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateInput::InputState::dyn__startIndex");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_startIndex"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.DeflateInput/System.IO.Compression.InputState..ctor
// ABORTED elsewhere. System::IO::Compression::DeflateInput::InputState::InputState(int count, int startIndex)
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.IO.Compression.DeflateManagedStream
#include "System/IO/Compression/DeflateManagedStream.hpp"
// Including type: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<ReadAsyncCore>d__40
#include "System/IO/Compression/DeflateManagedStream_-ReadAsyncCore-d__40.hpp"
// Including type: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<WriteAsyncCore>d__47
#include "System/IO/Compression/DeflateManagedStream_-WriteAsyncCore-d__47.hpp"
// Including type: System.IO.Compression.InflaterManaged
#include "System/IO/Compression/InflaterManaged.hpp"
// Including type: System.IO.Compression.DeflaterManaged
#include "System/IO/Compression/DeflaterManaged.hpp"
// Including type: System.IO.Compression.IFileFormatWriter
#include "System/IO/Compression/IFileFormatWriter.hpp"
// Including type: System.IO.Compression.IFileFormatReader
#include "System/IO/Compression/IFileFormatReader.hpp"
// Including type: System.Threading.Tasks.Task`1
#include "System/Threading/Tasks/Task_1.hpp"
// Including type: System.Threading.CancellationToken
#include "System/Threading/CancellationToken.hpp"
// Including type: System.Threading.Tasks.Task
#include "System/Threading/Tasks/Task.hpp"
// Including type: System.IO.SeekOrigin
#include "System/IO/SeekOrigin.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated instance field getter
// Get instance field: private System.IO.Stream _stream
::System::IO::Stream*& System::IO::Compression::DeflateManagedStream::dyn__stream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__stream");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stream"))->offset;
return *reinterpret_cast<::System::IO::Stream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.CompressionMode _mode
::System::IO::Compression::CompressionMode& System::IO::Compression::DeflateManagedStream::dyn__mode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__mode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_mode"))->offset;
return *reinterpret_cast<::System::IO::Compression::CompressionMode*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _leaveOpen
bool& System::IO::Compression::DeflateManagedStream::dyn__leaveOpen() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__leaveOpen");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_leaveOpen"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.InflaterManaged _inflater
::System::IO::Compression::InflaterManaged*& System::IO::Compression::DeflateManagedStream::dyn__inflater() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__inflater");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_inflater"))->offset;
return *reinterpret_cast<::System::IO::Compression::InflaterManaged**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.DeflaterManaged _deflater
::System::IO::Compression::DeflaterManaged*& System::IO::Compression::DeflateManagedStream::dyn__deflater() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__deflater");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_deflater"))->offset;
return *reinterpret_cast<::System::IO::Compression::DeflaterManaged**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Byte[] _buffer
::ArrayW<uint8_t>& System::IO::Compression::DeflateManagedStream::dyn__buffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__buffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_buffer"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _asyncOperations
int& System::IO::Compression::DeflateManagedStream::dyn__asyncOperations() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__asyncOperations");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_asyncOperations"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.IFileFormatWriter _formatWriter
::System::IO::Compression::IFileFormatWriter*& System::IO::Compression::DeflateManagedStream::dyn__formatWriter() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__formatWriter");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_formatWriter"))->offset;
return *reinterpret_cast<::System::IO::Compression::IFileFormatWriter**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _wroteHeader
bool& System::IO::Compression::DeflateManagedStream::dyn__wroteHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__wroteHeader");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_wroteHeader"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _wroteBytes
bool& System::IO::Compression::DeflateManagedStream::dyn__wroteBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::dyn__wroteBytes");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_wroteBytes"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.InitializeInflater
void System::IO::Compression::DeflateManagedStream::InitializeInflater(::System::IO::Stream* stream, bool leaveOpen, ::System::IO::Compression::IFileFormatReader* reader, ::System::IO::Compression::ZipArchiveEntry::CompressionMethodValues method) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::InitializeInflater");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InitializeInflater", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(stream), ::il2cpp_utils::ExtractType(leaveOpen), ::il2cpp_utils::ExtractType(reader), ::il2cpp_utils::ExtractType(method)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stream, leaveOpen, reader, method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.ValidateParameters
void System::IO::Compression::DeflateManagedStream::ValidateParameters(::ArrayW<uint8_t> array, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::ValidateParameters");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ValidateParameters", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, array, offset, count);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.EnsureNotDisposed
void System::IO::Compression::DeflateManagedStream::EnsureNotDisposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::EnsureNotDisposed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnsureNotDisposed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.ThrowStreamClosedException
void System::IO::Compression::DeflateManagedStream::ThrowStreamClosedException() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::ThrowStreamClosedException");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "DeflateManagedStream", "ThrowStreamClosedException", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.EnsureDecompressionMode
void System::IO::Compression::DeflateManagedStream::EnsureDecompressionMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::EnsureDecompressionMode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnsureDecompressionMode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.ThrowCannotReadFromDeflateManagedStreamException
void System::IO::Compression::DeflateManagedStream::ThrowCannotReadFromDeflateManagedStreamException() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::ThrowCannotReadFromDeflateManagedStreamException");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "DeflateManagedStream", "ThrowCannotReadFromDeflateManagedStreamException", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.EnsureCompressionMode
void System::IO::Compression::DeflateManagedStream::EnsureCompressionMode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::EnsureCompressionMode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnsureCompressionMode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.ThrowCannotWriteToDeflateManagedStreamException
void System::IO::Compression::DeflateManagedStream::ThrowCannotWriteToDeflateManagedStreamException() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::ThrowCannotWriteToDeflateManagedStreamException");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "DeflateManagedStream", "ThrowCannotWriteToDeflateManagedStreamException", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.ReadAsyncCore
::System::Threading::Tasks::Task_1<int>* System::IO::Compression::DeflateManagedStream::ReadAsyncCore(::System::Threading::Tasks::Task_1<int>* readTask, ::ArrayW<uint8_t> array, int offset, int count, ::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::ReadAsyncCore");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReadAsyncCore", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(readTask), ::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task_1<int>*, false>(this, ___internal__method, readTask, array, offset, count, cancellationToken);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.WriteDeflaterOutput
void System::IO::Compression::DeflateManagedStream::WriteDeflaterOutput() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::WriteDeflaterOutput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteDeflaterOutput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.DoMaintenance
void System::IO::Compression::DeflateManagedStream::DoMaintenance(::ArrayW<uint8_t> array, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::DoMaintenance");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DoMaintenance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, array, offset, count);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.PurgeBuffers
void System::IO::Compression::DeflateManagedStream::PurgeBuffers(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::PurgeBuffers");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "PurgeBuffers", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.WriteAsyncCore
::System::Threading::Tasks::Task* System::IO::Compression::DeflateManagedStream::WriteAsyncCore(::ArrayW<uint8_t> array, int offset, int count, ::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::WriteAsyncCore");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteAsyncCore", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, array, offset, count, cancellationToken);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.<>n__0
::System::Threading::Tasks::Task* System::IO::Compression::DeflateManagedStream::$$n__0(::ArrayW<uint8_t> buffer, int offset, int count, ::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::<>n__0");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "<>n__0", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, buffer, offset, count, cancellationToken);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.get_CanRead
bool System::IO::Compression::DeflateManagedStream::get_CanRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::get_CanRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.get_CanWrite
bool System::IO::Compression::DeflateManagedStream::get_CanWrite() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::get_CanWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.get_CanSeek
bool System::IO::Compression::DeflateManagedStream::get_CanSeek() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::get_CanSeek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanSeek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.get_Length
int64_t System::IO::Compression::DeflateManagedStream::get_Length() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::get_Length");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Length", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.get_Position
int64_t System::IO::Compression::DeflateManagedStream::get_Position() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::get_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.set_Position
void System::IO::Compression::DeflateManagedStream::set_Position(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::set_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.Flush
void System::IO::Compression::DeflateManagedStream::Flush() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::Flush");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Flush", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.FlushAsync
::System::Threading::Tasks::Task* System::IO::Compression::DeflateManagedStream::FlushAsync(::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::FlushAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, cancellationToken);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.Seek
int64_t System::IO::Compression::DeflateManagedStream::Seek(int64_t offset, ::System::IO::SeekOrigin origin) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::Seek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Seek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(origin)})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method, offset, origin);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.SetLength
void System::IO::Compression::DeflateManagedStream::SetLength(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::SetLength");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.Read
int System::IO::Compression::DeflateManagedStream::Read(::ArrayW<uint8_t> array, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::Read");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Read", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, array, offset, count);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.BeginRead
::System::IAsyncResult* System::IO::Compression::DeflateManagedStream::BeginRead(::ArrayW<uint8_t> buffer, int offset, int count, ::System::AsyncCallback* asyncCallback, ::Il2CppObject* asyncState) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::BeginRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(asyncCallback), ::il2cpp_utils::ExtractType(asyncState)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, count, asyncCallback, asyncState);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.EndRead
int System::IO::Compression::DeflateManagedStream::EndRead(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::EndRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.ReadAsync
::System::Threading::Tasks::Task_1<int>* System::IO::Compression::DeflateManagedStream::ReadAsync(::ArrayW<uint8_t> array, int offset, int count, ::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::ReadAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReadAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task_1<int>*, false>(this, ___internal__method, array, offset, count, cancellationToken);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.Write
void System::IO::Compression::DeflateManagedStream::Write(::ArrayW<uint8_t> array, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::Write");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Write", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, array, offset, count);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.Dispose
void System::IO::Compression::DeflateManagedStream::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.WriteAsync
::System::Threading::Tasks::Task* System::IO::Compression::DeflateManagedStream::WriteAsync(::ArrayW<uint8_t> array, int offset, int count, ::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::WriteAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(array), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, array, offset, count, cancellationToken);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.BeginWrite
::System::IAsyncResult* System::IO::Compression::DeflateManagedStream::BeginWrite(::ArrayW<uint8_t> buffer, int offset, int count, ::System::AsyncCallback* asyncCallback, ::Il2CppObject* asyncState) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::BeginWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(asyncCallback), ::il2cpp_utils::ExtractType(asyncState)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, count, asyncCallback, asyncState);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream.EndWrite
void System::IO::Compression::DeflateManagedStream::EndWrite(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::EndWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<ReadAsyncCore>d__40
#include "System/IO/Compression/DeflateManagedStream_-ReadAsyncCore-d__40.hpp"
// Including type: System.Threading.Tasks.Task`1
#include "System/Threading/Tasks/Task_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.Int32 <>1__state
int& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_$$1__state() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::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.AsyncTaskMethodBuilder`1<System.Int32> <>t__builder
::System::Runtime::CompilerServices::AsyncTaskMethodBuilder_1<int>& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_$$t__builder() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::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::AsyncTaskMethodBuilder_1<int>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Threading.Tasks.Task`1<System.Int32> readTask
::System::Threading::Tasks::Task_1<int>*& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_readTask() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_readTask");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "readTask"))->offset;
return *reinterpret_cast<::System::Threading::Tasks::Task_1<int>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.IO.Compression.DeflateManagedStream <>4__this
::System::IO::Compression::DeflateManagedStream*& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_$$4__this() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::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<::System::IO::Compression::DeflateManagedStream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Threading.CancellationToken cancellationToken
::System::Threading::CancellationToken& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_cancellationToken() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_cancellationToken");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "cancellationToken"))->offset;
return *reinterpret_cast<::System::Threading::CancellationToken*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Byte[] array
::ArrayW<uint8_t>& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_array() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_array");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "array"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 offset
int& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_offset() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_offset");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "offset"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 count
int& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_count() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_count");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "count"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1/System.Runtime.CompilerServices.ConfiguredTaskAwaiter<System.Int32> <>u__1
typename ::System::Runtime::CompilerServices::ConfiguredTaskAwaitable_1<int>::ConfiguredTaskAwaiter& System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::dyn_$$u__1() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::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<typename ::System::Runtime::CompilerServices::ConfiguredTaskAwaitable_1<int>::ConfiguredTaskAwaiter*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<ReadAsyncCore>d__40.MoveNext
void System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::MoveNext() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::MoveNext");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "MoveNext", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<ReadAsyncCore>d__40.SetStateMachine
void System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::SetStateMachine(::System::Runtime::CompilerServices::IAsyncStateMachine* stateMachine) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$ReadAsyncCore$d__40::SetStateMachine");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "SetStateMachine", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(stateMachine)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stateMachine);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<WriteAsyncCore>d__47
#include "System/IO/Compression/DeflateManagedStream_-WriteAsyncCore-d__47.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
int& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_$$1__state() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::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.AsyncTaskMethodBuilder <>t__builder
::System::Runtime::CompilerServices::AsyncTaskMethodBuilder& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_$$t__builder() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::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::AsyncTaskMethodBuilder*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.IO.Compression.DeflateManagedStream <>4__this
::System::IO::Compression::DeflateManagedStream*& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_$$4__this() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::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<::System::IO::Compression::DeflateManagedStream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Byte[] array
::ArrayW<uint8_t>& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_array() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_array");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "array"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 offset
int& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_offset() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_offset");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "offset"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 count
int& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_count() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_count");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "count"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: public System.Threading.CancellationToken cancellationToken
::System::Threading::CancellationToken& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_cancellationToken() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_cancellationToken");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "cancellationToken"))->offset;
return *reinterpret_cast<::System::Threading::CancellationToken*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Runtime.CompilerServices.ConfiguredTaskAwaitable/System.Runtime.CompilerServices.ConfiguredTaskAwaiter <>u__1
::System::Runtime::CompilerServices::ConfiguredTaskAwaitable::ConfiguredTaskAwaiter& System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::dyn_$$u__1() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::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::ConfiguredTaskAwaitable::ConfiguredTaskAwaiter*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<WriteAsyncCore>d__47.MoveNext
void System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::MoveNext() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::MoveNext");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "MoveNext", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflateManagedStream/System.IO.Compression.<WriteAsyncCore>d__47.SetStateMachine
void System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::SetStateMachine(::System::Runtime::CompilerServices::IAsyncStateMachine* stateMachine) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflateManagedStream::$WriteAsyncCore$d__47::SetStateMachine");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(*this, "SetStateMachine", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(stateMachine)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stateMachine);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.DeflaterManaged
#include "System/IO/Compression/DeflaterManaged.hpp"
// Including type: System.IO.Compression.FastEncoder
#include "System/IO/Compression/FastEncoder.hpp"
// Including type: System.IO.Compression.CopyEncoder
#include "System/IO/Compression/CopyEncoder.hpp"
// Including type: System.IO.Compression.DeflateInput
#include "System/IO/Compression/DeflateInput.hpp"
// Including type: System.IO.Compression.OutputBuffer
#include "System/IO/Compression/OutputBuffer.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.IO.Compression.FastEncoder _deflateEncoder
::System::IO::Compression::FastEncoder*& System::IO::Compression::DeflaterManaged::dyn__deflateEncoder() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::dyn__deflateEncoder");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_deflateEncoder"))->offset;
return *reinterpret_cast<::System::IO::Compression::FastEncoder**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.IO.Compression.CopyEncoder _copyEncoder
::System::IO::Compression::CopyEncoder*& System::IO::Compression::DeflaterManaged::dyn__copyEncoder() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::dyn__copyEncoder");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_copyEncoder"))->offset;
return *reinterpret_cast<::System::IO::Compression::CopyEncoder**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.IO.Compression.DeflateInput _input
::System::IO::Compression::DeflateInput*& System::IO::Compression::DeflaterManaged::dyn__input() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::dyn__input");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_input"))->offset;
return *reinterpret_cast<::System::IO::Compression::DeflateInput**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.IO.Compression.OutputBuffer _output
::System::IO::Compression::OutputBuffer*& System::IO::Compression::DeflaterManaged::dyn__output() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::dyn__output");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_output"))->offset;
return *reinterpret_cast<::System::IO::Compression::OutputBuffer**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState _processingState
::System::IO::Compression::DeflaterManaged::DeflaterState& System::IO::Compression::DeflaterManaged::dyn__processingState() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::dyn__processingState");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_processingState"))->offset;
return *reinterpret_cast<::System::IO::Compression::DeflaterManaged::DeflaterState*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.DeflateInput _inputFromHistory
::System::IO::Compression::DeflateInput*& System::IO::Compression::DeflaterManaged::dyn__inputFromHistory() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::dyn__inputFromHistory");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_inputFromHistory"))->offset;
return *reinterpret_cast<::System::IO::Compression::DeflateInput**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.NeedsInput
bool System::IO::Compression::DeflaterManaged::NeedsInput() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::NeedsInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "NeedsInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.SetInput
void System::IO::Compression::DeflaterManaged::SetInput(::ArrayW<uint8_t> inputBuffer, int startIndex, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::SetInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputBuffer), ::il2cpp_utils::ExtractType(startIndex), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputBuffer, startIndex, count);
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.GetDeflateOutput
int System::IO::Compression::DeflaterManaged::GetDeflateOutput(::ArrayW<uint8_t> outputBuffer) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::GetDeflateOutput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetDeflateOutput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(outputBuffer)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, outputBuffer);
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.Finish
bool System::IO::Compression::DeflaterManaged::Finish(::ArrayW<uint8_t> outputBuffer, ByRef<int> bytesRead) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::Finish");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finish", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(outputBuffer), ::il2cpp_utils::ExtractIndependentType<int&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, outputBuffer, byref(bytesRead));
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.UseCompressed
bool System::IO::Compression::DeflaterManaged::UseCompressed(double ratio) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::UseCompressed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UseCompressed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(ratio)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, ratio);
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.FlushInputWindows
void System::IO::Compression::DeflaterManaged::FlushInputWindows() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::FlushInputWindows");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushInputWindows", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.WriteFinal
void System::IO::Compression::DeflaterManaged::WriteFinal() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::WriteFinal");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteFinal", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.DeflaterManaged.Dispose
void System::IO::Compression::DeflaterManaged::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState
#include "System/IO/Compression/DeflaterManaged.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.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState NotStarted
::System::IO::Compression::DeflaterManaged::DeflaterState System::IO::Compression::DeflaterManaged::DeflaterState::_get_NotStarted() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_get_NotStarted");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::DeflaterManaged::DeflaterState>("System.IO.Compression", "DeflaterManaged/DeflaterState", "NotStarted"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState NotStarted
void System::IO::Compression::DeflaterManaged::DeflaterState::_set_NotStarted(::System::IO::Compression::DeflaterManaged::DeflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_set_NotStarted");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "DeflaterManaged/DeflaterState", "NotStarted", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState SlowDownForIncompressible1
::System::IO::Compression::DeflaterManaged::DeflaterState System::IO::Compression::DeflaterManaged::DeflaterState::_get_SlowDownForIncompressible1() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_get_SlowDownForIncompressible1");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::DeflaterManaged::DeflaterState>("System.IO.Compression", "DeflaterManaged/DeflaterState", "SlowDownForIncompressible1"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState SlowDownForIncompressible1
void System::IO::Compression::DeflaterManaged::DeflaterState::_set_SlowDownForIncompressible1(::System::IO::Compression::DeflaterManaged::DeflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_set_SlowDownForIncompressible1");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "DeflaterManaged/DeflaterState", "SlowDownForIncompressible1", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState SlowDownForIncompressible2
::System::IO::Compression::DeflaterManaged::DeflaterState System::IO::Compression::DeflaterManaged::DeflaterState::_get_SlowDownForIncompressible2() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_get_SlowDownForIncompressible2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::DeflaterManaged::DeflaterState>("System.IO.Compression", "DeflaterManaged/DeflaterState", "SlowDownForIncompressible2"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState SlowDownForIncompressible2
void System::IO::Compression::DeflaterManaged::DeflaterState::_set_SlowDownForIncompressible2(::System::IO::Compression::DeflaterManaged::DeflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_set_SlowDownForIncompressible2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "DeflaterManaged/DeflaterState", "SlowDownForIncompressible2", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState StartingSmallData
::System::IO::Compression::DeflaterManaged::DeflaterState System::IO::Compression::DeflaterManaged::DeflaterState::_get_StartingSmallData() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_get_StartingSmallData");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::DeflaterManaged::DeflaterState>("System.IO.Compression", "DeflaterManaged/DeflaterState", "StartingSmallData"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState StartingSmallData
void System::IO::Compression::DeflaterManaged::DeflaterState::_set_StartingSmallData(::System::IO::Compression::DeflaterManaged::DeflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_set_StartingSmallData");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "DeflaterManaged/DeflaterState", "StartingSmallData", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState CompressThenCheck
::System::IO::Compression::DeflaterManaged::DeflaterState System::IO::Compression::DeflaterManaged::DeflaterState::_get_CompressThenCheck() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_get_CompressThenCheck");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::DeflaterManaged::DeflaterState>("System.IO.Compression", "DeflaterManaged/DeflaterState", "CompressThenCheck"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState CompressThenCheck
void System::IO::Compression::DeflaterManaged::DeflaterState::_set_CompressThenCheck(::System::IO::Compression::DeflaterManaged::DeflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_set_CompressThenCheck");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "DeflaterManaged/DeflaterState", "CompressThenCheck", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState CheckingForIncompressible
::System::IO::Compression::DeflaterManaged::DeflaterState System::IO::Compression::DeflaterManaged::DeflaterState::_get_CheckingForIncompressible() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_get_CheckingForIncompressible");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::DeflaterManaged::DeflaterState>("System.IO.Compression", "DeflaterManaged/DeflaterState", "CheckingForIncompressible"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState CheckingForIncompressible
void System::IO::Compression::DeflaterManaged::DeflaterState::_set_CheckingForIncompressible(::System::IO::Compression::DeflaterManaged::DeflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_set_CheckingForIncompressible");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "DeflaterManaged/DeflaterState", "CheckingForIncompressible", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState HandlingSmallData
::System::IO::Compression::DeflaterManaged::DeflaterState System::IO::Compression::DeflaterManaged::DeflaterState::_get_HandlingSmallData() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_get_HandlingSmallData");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::DeflaterManaged::DeflaterState>("System.IO.Compression", "DeflaterManaged/DeflaterState", "HandlingSmallData"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.DeflaterManaged/System.IO.Compression.DeflaterState HandlingSmallData
void System::IO::Compression::DeflaterManaged::DeflaterState::_set_HandlingSmallData(::System::IO::Compression::DeflaterManaged::DeflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::_set_HandlingSmallData");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "DeflaterManaged/DeflaterState", "HandlingSmallData", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::IO::Compression::DeflaterManaged::DeflaterState::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::DeflaterManaged::DeflaterState::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: System.IO.Compression.FastEncoder
#include "System/IO/Compression/FastEncoder.hpp"
// Including type: System.IO.Compression.FastEncoderWindow
#include "System/IO/Compression/FastEncoderWindow.hpp"
// Including type: System.IO.Compression.Match
#include "System/IO/Compression/Match.hpp"
// Including type: System.IO.Compression.DeflateInput
#include "System/IO/Compression/DeflateInput.hpp"
// Including type: System.IO.Compression.OutputBuffer
#include "System/IO/Compression/OutputBuffer.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.IO.Compression.FastEncoderWindow _inputWindow
::System::IO::Compression::FastEncoderWindow*& System::IO::Compression::FastEncoder::dyn__inputWindow() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::dyn__inputWindow");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_inputWindow"))->offset;
return *reinterpret_cast<::System::IO::Compression::FastEncoderWindow**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.IO.Compression.Match _currentMatch
::System::IO::Compression::Match*& System::IO::Compression::FastEncoder::dyn__currentMatch() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::dyn__currentMatch");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_currentMatch"))->offset;
return *reinterpret_cast<::System::IO::Compression::Match**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Double _lastCompressionRatio
double& System::IO::Compression::FastEncoder::dyn__lastCompressionRatio() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::dyn__lastCompressionRatio");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lastCompressionRatio"))->offset;
return *reinterpret_cast<double*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.FastEncoder.get_BytesInHistory
int System::IO::Compression::FastEncoder::get_BytesInHistory() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::get_BytesInHistory");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_BytesInHistory", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoder.get_UnprocessedInput
::System::IO::Compression::DeflateInput* System::IO::Compression::FastEncoder::get_UnprocessedInput() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::get_UnprocessedInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_UnprocessedInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::DeflateInput*, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoder.get_LastCompressionRatio
double System::IO::Compression::FastEncoder::get_LastCompressionRatio() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::get_LastCompressionRatio");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_LastCompressionRatio", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<double, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoder.FlushInput
void System::IO::Compression::FastEncoder::FlushInput() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::FlushInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoder.GetBlock
void System::IO::Compression::FastEncoder::GetBlock(::System::IO::Compression::DeflateInput* input, ::System::IO::Compression::OutputBuffer* output, int maxBytesToCopy) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::GetBlock");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBlock", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input), ::il2cpp_utils::ExtractType(output), ::il2cpp_utils::ExtractType(maxBytesToCopy)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, input, output, maxBytesToCopy);
}
// Autogenerated method: System.IO.Compression.FastEncoder.GetCompressedData
void System::IO::Compression::FastEncoder::GetCompressedData(::System::IO::Compression::DeflateInput* input, ::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::GetCompressedData");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCompressedData", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input), ::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, input, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.GetBlockHeader
void System::IO::Compression::FastEncoder::GetBlockHeader(::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::GetBlockHeader");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBlockHeader", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.GetBlockFooter
void System::IO::Compression::FastEncoder::GetBlockFooter(::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::GetBlockFooter");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBlockFooter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.GetCompressedOutput
void System::IO::Compression::FastEncoder::GetCompressedOutput(::System::IO::Compression::DeflateInput* input, ::System::IO::Compression::OutputBuffer* output, int maxBytesToCopy) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::GetCompressedOutput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCompressedOutput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input), ::il2cpp_utils::ExtractType(output), ::il2cpp_utils::ExtractType(maxBytesToCopy)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, input, output, maxBytesToCopy);
}
// Autogenerated method: System.IO.Compression.FastEncoder.GetCompressedOutput
void System::IO::Compression::FastEncoder::GetCompressedOutput(::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::GetCompressedOutput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetCompressedOutput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.InputAvailable
bool System::IO::Compression::FastEncoder::InputAvailable(::System::IO::Compression::DeflateInput* input) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::InputAvailable");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InputAvailable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, input);
}
// Autogenerated method: System.IO.Compression.FastEncoder.SafeToWriteTo
bool System::IO::Compression::FastEncoder::SafeToWriteTo(::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::SafeToWriteTo");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SafeToWriteTo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.WriteEndOfBlock
void System::IO::Compression::FastEncoder::WriteEndOfBlock(::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::WriteEndOfBlock");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteEndOfBlock", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.WriteMatch
void System::IO::Compression::FastEncoder::WriteMatch(int matchLen, int matchPos, ::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::WriteMatch");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "FastEncoder", "WriteMatch", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(matchLen), ::il2cpp_utils::ExtractType(matchPos), ::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, matchLen, matchPos, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.WriteChar
void System::IO::Compression::FastEncoder::WriteChar(uint8_t b, ::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::WriteChar");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "FastEncoder", "WriteChar", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(b), ::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, b, output);
}
// Autogenerated method: System.IO.Compression.FastEncoder.WriteDeflatePreamble
void System::IO::Compression::FastEncoder::WriteDeflatePreamble(::System::IO::Compression::OutputBuffer* output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoder::WriteDeflatePreamble");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "FastEncoder", "WriteDeflatePreamble", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, output);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.FastEncoderStatics
#include "System/IO/Compression/FastEncoderStatics.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 readonly System.Byte[] FastEncoderTreeStructureData
::ArrayW<uint8_t> System::IO::Compression::FastEncoderStatics::_get_FastEncoderTreeStructureData() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_FastEncoderTreeStructureData");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "FastEncoderStatics", "FastEncoderTreeStructureData"));
}
// Autogenerated static field setter
// Set static field: static readonly System.Byte[] FastEncoderTreeStructureData
void System::IO::Compression::FastEncoderStatics::_set_FastEncoderTreeStructureData(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_FastEncoderTreeStructureData");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "FastEncoderTreeStructureData", value));
}
// Autogenerated static field getter
// Get static field: static readonly System.Byte[] BFinalFastEncoderTreeStructureData
::ArrayW<uint8_t> System::IO::Compression::FastEncoderStatics::_get_BFinalFastEncoderTreeStructureData() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_BFinalFastEncoderTreeStructureData");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "FastEncoderStatics", "BFinalFastEncoderTreeStructureData"));
}
// Autogenerated static field setter
// Set static field: static readonly System.Byte[] BFinalFastEncoderTreeStructureData
void System::IO::Compression::FastEncoderStatics::_set_BFinalFastEncoderTreeStructureData(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_BFinalFastEncoderTreeStructureData");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "BFinalFastEncoderTreeStructureData", value));
}
// Autogenerated static field getter
// Get static field: static readonly System.UInt32[] FastEncoderLiteralCodeInfo
::ArrayW<uint> System::IO::Compression::FastEncoderStatics::_get_FastEncoderLiteralCodeInfo() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_FastEncoderLiteralCodeInfo");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint>>("System.IO.Compression", "FastEncoderStatics", "FastEncoderLiteralCodeInfo"));
}
// Autogenerated static field setter
// Set static field: static readonly System.UInt32[] FastEncoderLiteralCodeInfo
void System::IO::Compression::FastEncoderStatics::_set_FastEncoderLiteralCodeInfo(::ArrayW<uint> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_FastEncoderLiteralCodeInfo");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "FastEncoderLiteralCodeInfo", value));
}
// Autogenerated static field getter
// Get static field: static readonly System.UInt32[] FastEncoderDistanceCodeInfo
::ArrayW<uint> System::IO::Compression::FastEncoderStatics::_get_FastEncoderDistanceCodeInfo() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_FastEncoderDistanceCodeInfo");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint>>("System.IO.Compression", "FastEncoderStatics", "FastEncoderDistanceCodeInfo"));
}
// Autogenerated static field setter
// Set static field: static readonly System.UInt32[] FastEncoderDistanceCodeInfo
void System::IO::Compression::FastEncoderStatics::_set_FastEncoderDistanceCodeInfo(::ArrayW<uint> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_FastEncoderDistanceCodeInfo");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "FastEncoderDistanceCodeInfo", value));
}
// Autogenerated static field getter
// Get static field: static readonly System.UInt32[] BitMask
::ArrayW<uint> System::IO::Compression::FastEncoderStatics::_get_BitMask() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_BitMask");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint>>("System.IO.Compression", "FastEncoderStatics", "BitMask"));
}
// Autogenerated static field setter
// Set static field: static readonly System.UInt32[] BitMask
void System::IO::Compression::FastEncoderStatics::_set_BitMask(::ArrayW<uint> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_BitMask");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "BitMask", value));
}
// Autogenerated static field getter
// Get static field: static readonly System.Byte[] ExtraLengthBits
::ArrayW<uint8_t> System::IO::Compression::FastEncoderStatics::_get_ExtraLengthBits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_ExtraLengthBits");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "FastEncoderStatics", "ExtraLengthBits"));
}
// Autogenerated static field setter
// Set static field: static readonly System.Byte[] ExtraLengthBits
void System::IO::Compression::FastEncoderStatics::_set_ExtraLengthBits(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_ExtraLengthBits");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "ExtraLengthBits", value));
}
// Autogenerated static field getter
// Get static field: static readonly System.Byte[] ExtraDistanceBits
::ArrayW<uint8_t> System::IO::Compression::FastEncoderStatics::_get_ExtraDistanceBits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_ExtraDistanceBits");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "FastEncoderStatics", "ExtraDistanceBits"));
}
// Autogenerated static field setter
// Set static field: static readonly System.Byte[] ExtraDistanceBits
void System::IO::Compression::FastEncoderStatics::_set_ExtraDistanceBits(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_ExtraDistanceBits");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "ExtraDistanceBits", value));
}
// Autogenerated static field getter
// Get static field: static private readonly System.Byte[] s_distLookup
::ArrayW<uint8_t> System::IO::Compression::FastEncoderStatics::_get_s_distLookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_get_s_distLookup");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "FastEncoderStatics", "s_distLookup"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Byte[] s_distLookup
void System::IO::Compression::FastEncoderStatics::_set_s_distLookup(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::_set_s_distLookup");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "FastEncoderStatics", "s_distLookup", value));
}
// Autogenerated method: System.IO.Compression.FastEncoderStatics..cctor
void System::IO::Compression::FastEncoderStatics::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "FastEncoderStatics", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderStatics.CreateDistanceLookup
::ArrayW<uint8_t> System::IO::Compression::FastEncoderStatics::CreateDistanceLookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::CreateDistanceLookup");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "FastEncoderStatics", "CreateDistanceLookup", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderStatics.GetSlot
int System::IO::Compression::FastEncoderStatics::GetSlot(int pos) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::GetSlot");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "FastEncoderStatics", "GetSlot", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(pos)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, pos);
}
// Autogenerated method: System.IO.Compression.FastEncoderStatics.BitReverse
uint System::IO::Compression::FastEncoderStatics::BitReverse(uint code, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderStatics::BitReverse");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "FastEncoderStatics", "BitReverse", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(code), ::il2cpp_utils::ExtractType(length)})));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method, code, length);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.FastEncoderWindow
#include "System/IO/Compression/FastEncoderWindow.hpp"
// Including type: System.IO.Compression.DeflateInput
#include "System/IO/Compression/DeflateInput.hpp"
// Including type: System.IO.Compression.Match
#include "System/IO/Compression/Match.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.Byte[] _window
::ArrayW<uint8_t>& System::IO::Compression::FastEncoderWindow::dyn__window() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::dyn__window");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_window"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _bufPos
int& System::IO::Compression::FastEncoderWindow::dyn__bufPos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::dyn__bufPos");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bufPos"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _bufEnd
int& System::IO::Compression::FastEncoderWindow::dyn__bufEnd() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::dyn__bufEnd");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bufEnd"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.UInt16[] _prev
::ArrayW<uint16_t>& System::IO::Compression::FastEncoderWindow::dyn__prev() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::dyn__prev");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_prev"))->offset;
return *reinterpret_cast<::ArrayW<uint16_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.UInt16[] _lookup
::ArrayW<uint16_t>& System::IO::Compression::FastEncoderWindow::dyn__lookup() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::dyn__lookup");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lookup"))->offset;
return *reinterpret_cast<::ArrayW<uint16_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.get_BytesAvailable
int System::IO::Compression::FastEncoderWindow::get_BytesAvailable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::get_BytesAvailable");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_BytesAvailable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.get_UnprocessedInput
::System::IO::Compression::DeflateInput* System::IO::Compression::FastEncoderWindow::get_UnprocessedInput() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::get_UnprocessedInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_UnprocessedInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::DeflateInput*, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.get_FreeWindowSpace
int System::IO::Compression::FastEncoderWindow::get_FreeWindowSpace() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::get_FreeWindowSpace");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_FreeWindowSpace", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.FlushWindow
void System::IO::Compression::FastEncoderWindow::FlushWindow() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::FlushWindow");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushWindow", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.ResetWindow
void System::IO::Compression::FastEncoderWindow::ResetWindow() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::ResetWindow");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ResetWindow", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.CopyBytes
void System::IO::Compression::FastEncoderWindow::CopyBytes(::ArrayW<uint8_t> inputBuffer, int startIndex, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::CopyBytes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CopyBytes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputBuffer), ::il2cpp_utils::ExtractType(startIndex), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputBuffer, startIndex, count);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.MoveWindows
void System::IO::Compression::FastEncoderWindow::MoveWindows() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::MoveWindows");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "MoveWindows", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.HashValue
uint System::IO::Compression::FastEncoderWindow::HashValue(uint hash, uint8_t b) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::HashValue");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "HashValue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hash), ::il2cpp_utils::ExtractType(b)})));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, hash, b);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.InsertString
uint System::IO::Compression::FastEncoderWindow::InsertString(ByRef<uint> hash) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::InsertString");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InsertString", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hash)})));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, byref(hash));
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.InsertStrings
void System::IO::Compression::FastEncoderWindow::InsertStrings(ByRef<uint> hash, int matchLen) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::InsertStrings");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "InsertStrings", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(hash), ::il2cpp_utils::ExtractType(matchLen)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(hash), matchLen);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.GetNextSymbolOrMatch
bool System::IO::Compression::FastEncoderWindow::GetNextSymbolOrMatch(::System::IO::Compression::Match* match) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::GetNextSymbolOrMatch");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNextSymbolOrMatch", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(match)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, match);
}
// Autogenerated method: System.IO.Compression.FastEncoderWindow.FindMatch
int System::IO::Compression::FastEncoderWindow::FindMatch(int search, ByRef<int> matchPos, int searchDepth, int niceLength) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::FastEncoderWindow::FindMatch");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FindMatch", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(search), ::il2cpp_utils::ExtractIndependentType<int&>(), ::il2cpp_utils::ExtractType(searchDepth), ::il2cpp_utils::ExtractType(niceLength)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, search, byref(matchPos), searchDepth, niceLength);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.IFileFormatWriter
#include "System/IO/Compression/IFileFormatWriter.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.IO.Compression.IFileFormatWriter.GetHeader
::ArrayW<uint8_t> System::IO::Compression::IFileFormatWriter::GetHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::IFileFormatWriter::GetHeader");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetHeader", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.IFileFormatWriter.UpdateWithBytesRead
void System::IO::Compression::IFileFormatWriter::UpdateWithBytesRead(::ArrayW<uint8_t> buffer, int offset, int bytesToCopy) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::IFileFormatWriter::UpdateWithBytesRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateWithBytesRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(bytesToCopy)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer, offset, bytesToCopy);
}
// Autogenerated method: System.IO.Compression.IFileFormatWriter.GetFooter
::ArrayW<uint8_t> System::IO::Compression::IFileFormatWriter::GetFooter() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::IFileFormatWriter::GetFooter");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetFooter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.IFileFormatReader
#include "System/IO/Compression/IFileFormatReader.hpp"
// Including type: System.IO.Compression.InputBuffer
#include "System/IO/Compression/InputBuffer.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: System.IO.Compression.IFileFormatReader.ReadHeader
bool System::IO::Compression::IFileFormatReader::ReadHeader(::System::IO::Compression::InputBuffer* input) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::IFileFormatReader::ReadHeader");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReadHeader", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, input);
}
// Autogenerated method: System.IO.Compression.IFileFormatReader.ReadFooter
bool System::IO::Compression::IFileFormatReader::ReadFooter(::System::IO::Compression::InputBuffer* input) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::IFileFormatReader::ReadFooter");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReadFooter", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, input);
}
// Autogenerated method: System.IO.Compression.IFileFormatReader.UpdateWithBytesRead
void System::IO::Compression::IFileFormatReader::UpdateWithBytesRead(::ArrayW<uint8_t> buffer, int offset, int bytesToCopy) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::IFileFormatReader::UpdateWithBytesRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateWithBytesRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(bytesToCopy)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer, offset, bytesToCopy);
}
// Autogenerated method: System.IO.Compression.IFileFormatReader.Validate
void System::IO::Compression::IFileFormatReader::Validate() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::IFileFormatReader::Validate");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Validate", 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: System.IO.Compression.HuffmanTree
#include "System/IO/Compression/HuffmanTree.hpp"
// Including type: System.IO.Compression.InputBuffer
#include "System/IO/Compression/InputBuffer.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 readonly System.IO.Compression.HuffmanTree <StaticLiteralLengthTree>k__BackingField
::System::IO::Compression::HuffmanTree* System::IO::Compression::HuffmanTree::_get_$StaticLiteralLengthTree$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::_get_$StaticLiteralLengthTree$k__BackingField");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::IO::Compression::HuffmanTree*>("System.IO.Compression", "HuffmanTree", "<StaticLiteralLengthTree>k__BackingField")));
}
// Autogenerated static field setter
// Set static field: static private readonly System.IO.Compression.HuffmanTree <StaticLiteralLengthTree>k__BackingField
void System::IO::Compression::HuffmanTree::_set_$StaticLiteralLengthTree$k__BackingField(::System::IO::Compression::HuffmanTree* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::_set_$StaticLiteralLengthTree$k__BackingField");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "HuffmanTree", "<StaticLiteralLengthTree>k__BackingField", value));
}
// Autogenerated static field getter
// Get static field: static private readonly System.IO.Compression.HuffmanTree <StaticDistanceTree>k__BackingField
::System::IO::Compression::HuffmanTree* System::IO::Compression::HuffmanTree::_get_$StaticDistanceTree$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::_get_$StaticDistanceTree$k__BackingField");
return THROW_UNLESS((il2cpp_utils::GetFieldValue<::System::IO::Compression::HuffmanTree*>("System.IO.Compression", "HuffmanTree", "<StaticDistanceTree>k__BackingField")));
}
// Autogenerated static field setter
// Set static field: static private readonly System.IO.Compression.HuffmanTree <StaticDistanceTree>k__BackingField
void System::IO::Compression::HuffmanTree::_set_$StaticDistanceTree$k__BackingField(::System::IO::Compression::HuffmanTree* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::_set_$StaticDistanceTree$k__BackingField");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "HuffmanTree", "<StaticDistanceTree>k__BackingField", value));
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Int32 _tableBits
int& System::IO::Compression::HuffmanTree::dyn__tableBits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::dyn__tableBits");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tableBits"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Int16[] _table
::ArrayW<int16_t>& System::IO::Compression::HuffmanTree::dyn__table() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::dyn__table");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_table"))->offset;
return *reinterpret_cast<::ArrayW<int16_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Int16[] _left
::ArrayW<int16_t>& System::IO::Compression::HuffmanTree::dyn__left() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::dyn__left");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_left"))->offset;
return *reinterpret_cast<::ArrayW<int16_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Int16[] _right
::ArrayW<int16_t>& System::IO::Compression::HuffmanTree::dyn__right() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::dyn__right");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_right"))->offset;
return *reinterpret_cast<::ArrayW<int16_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Byte[] _codeLengthArray
::ArrayW<uint8_t>& System::IO::Compression::HuffmanTree::dyn__codeLengthArray() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::dyn__codeLengthArray");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_codeLengthArray"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Int32 _tableMask
int& System::IO::Compression::HuffmanTree::dyn__tableMask() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::dyn__tableMask");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_tableMask"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.HuffmanTree.get_StaticLiteralLengthTree
::System::IO::Compression::HuffmanTree* System::IO::Compression::HuffmanTree::get_StaticLiteralLengthTree() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::get_StaticLiteralLengthTree");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "HuffmanTree", "get_StaticLiteralLengthTree", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::HuffmanTree*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.HuffmanTree.get_StaticDistanceTree
::System::IO::Compression::HuffmanTree* System::IO::Compression::HuffmanTree::get_StaticDistanceTree() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::get_StaticDistanceTree");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "HuffmanTree", "get_StaticDistanceTree", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::HuffmanTree*, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.HuffmanTree..cctor
void System::IO::Compression::HuffmanTree::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "HuffmanTree", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.HuffmanTree.GetStaticLiteralTreeLength
::ArrayW<uint8_t> System::IO::Compression::HuffmanTree::GetStaticLiteralTreeLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::GetStaticLiteralTreeLength");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "HuffmanTree", "GetStaticLiteralTreeLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.HuffmanTree.GetStaticDistanceTreeLength
::ArrayW<uint8_t> System::IO::Compression::HuffmanTree::GetStaticDistanceTreeLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::GetStaticDistanceTreeLength");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "HuffmanTree", "GetStaticDistanceTreeLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint8_t>, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.HuffmanTree.CalculateHuffmanCode
::ArrayW<uint> System::IO::Compression::HuffmanTree::CalculateHuffmanCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::CalculateHuffmanCode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CalculateHuffmanCode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::ArrayW<uint>, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.HuffmanTree.CreateTable
void System::IO::Compression::HuffmanTree::CreateTable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::CreateTable");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreateTable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.HuffmanTree.GetNextSymbol
int System::IO::Compression::HuffmanTree::GetNextSymbol(::System::IO::Compression::InputBuffer* input) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::HuffmanTree::GetNextSymbol");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetNextSymbol", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, input);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.InflaterManaged
#include "System/IO/Compression/InflaterManaged.hpp"
// Including type: System.IO.Compression.OutputWindow
#include "System/IO/Compression/OutputWindow.hpp"
// Including type: System.IO.Compression.InputBuffer
#include "System/IO/Compression/InputBuffer.hpp"
// Including type: System.IO.Compression.HuffmanTree
#include "System/IO/Compression/HuffmanTree.hpp"
// Including type: System.IO.Compression.IFileFormatReader
#include "System/IO/Compression/IFileFormatReader.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 readonly System.Byte[] s_extraLengthBits
::ArrayW<uint8_t> System::IO::Compression::InflaterManaged::_get_s_extraLengthBits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_get_s_extraLengthBits");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "InflaterManaged", "s_extraLengthBits"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Byte[] s_extraLengthBits
void System::IO::Compression::InflaterManaged::_set_s_extraLengthBits(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_set_s_extraLengthBits");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterManaged", "s_extraLengthBits", value));
}
// Autogenerated static field getter
// Get static field: static private readonly System.Int32[] s_lengthBase
::ArrayW<int> System::IO::Compression::InflaterManaged::_get_s_lengthBase() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_get_s_lengthBase");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<int>>("System.IO.Compression", "InflaterManaged", "s_lengthBase"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Int32[] s_lengthBase
void System::IO::Compression::InflaterManaged::_set_s_lengthBase(::ArrayW<int> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_set_s_lengthBase");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterManaged", "s_lengthBase", value));
}
// Autogenerated static field getter
// Get static field: static private readonly System.Int32[] s_distanceBasePosition
::ArrayW<int> System::IO::Compression::InflaterManaged::_get_s_distanceBasePosition() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_get_s_distanceBasePosition");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<int>>("System.IO.Compression", "InflaterManaged", "s_distanceBasePosition"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Int32[] s_distanceBasePosition
void System::IO::Compression::InflaterManaged::_set_s_distanceBasePosition(::ArrayW<int> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_set_s_distanceBasePosition");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterManaged", "s_distanceBasePosition", value));
}
// Autogenerated static field getter
// Get static field: static private readonly System.Byte[] s_codeOrder
::ArrayW<uint8_t> System::IO::Compression::InflaterManaged::_get_s_codeOrder() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_get_s_codeOrder");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "InflaterManaged", "s_codeOrder"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Byte[] s_codeOrder
void System::IO::Compression::InflaterManaged::_set_s_codeOrder(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_set_s_codeOrder");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterManaged", "s_codeOrder", value));
}
// Autogenerated static field getter
// Get static field: static private readonly System.Byte[] s_staticDistanceTreeTable
::ArrayW<uint8_t> System::IO::Compression::InflaterManaged::_get_s_staticDistanceTreeTable() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_get_s_staticDistanceTreeTable");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::ArrayW<uint8_t>>("System.IO.Compression", "InflaterManaged", "s_staticDistanceTreeTable"));
}
// Autogenerated static field setter
// Set static field: static private readonly System.Byte[] s_staticDistanceTreeTable
void System::IO::Compression::InflaterManaged::_set_s_staticDistanceTreeTable(::ArrayW<uint8_t> value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::_set_s_staticDistanceTreeTable");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterManaged", "s_staticDistanceTreeTable", value));
}
// Autogenerated instance field getter
// Get instance field: private readonly System.IO.Compression.OutputWindow _output
::System::IO::Compression::OutputWindow*& System::IO::Compression::InflaterManaged::dyn__output() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__output");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_output"))->offset;
return *reinterpret_cast<::System::IO::Compression::OutputWindow**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.IO.Compression.InputBuffer _input
::System::IO::Compression::InputBuffer*& System::IO::Compression::InflaterManaged::dyn__input() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__input");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_input"))->offset;
return *reinterpret_cast<::System::IO::Compression::InputBuffer**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.HuffmanTree _literalLengthTree
::System::IO::Compression::HuffmanTree*& System::IO::Compression::InflaterManaged::dyn__literalLengthTree() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__literalLengthTree");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_literalLengthTree"))->offset;
return *reinterpret_cast<::System::IO::Compression::HuffmanTree**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.HuffmanTree _distanceTree
::System::IO::Compression::HuffmanTree*& System::IO::Compression::InflaterManaged::dyn__distanceTree() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__distanceTree");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_distanceTree"))->offset;
return *reinterpret_cast<::System::IO::Compression::HuffmanTree**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.InflaterState _state
::System::IO::Compression::InflaterState& System::IO::Compression::InflaterManaged::dyn__state() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__state");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_state"))->offset;
return *reinterpret_cast<::System::IO::Compression::InflaterState*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _hasFormatReader
bool& System::IO::Compression::InflaterManaged::dyn__hasFormatReader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__hasFormatReader");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_hasFormatReader"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _bfinal
int& System::IO::Compression::InflaterManaged::dyn__bfinal() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__bfinal");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bfinal"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.BlockType _blockType
::System::IO::Compression::BlockType& System::IO::Compression::InflaterManaged::dyn__blockType() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__blockType");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_blockType"))->offset;
return *reinterpret_cast<::System::IO::Compression::BlockType*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Byte[] _blockLengthBuffer
::ArrayW<uint8_t>& System::IO::Compression::InflaterManaged::dyn__blockLengthBuffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__blockLengthBuffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_blockLengthBuffer"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _blockLength
int& System::IO::Compression::InflaterManaged::dyn__blockLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__blockLength");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_blockLength"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _length
int& System::IO::Compression::InflaterManaged::dyn__length() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__length");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_length"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _distanceCode
int& System::IO::Compression::InflaterManaged::dyn__distanceCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__distanceCode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_distanceCode"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _extraBits
int& System::IO::Compression::InflaterManaged::dyn__extraBits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__extraBits");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_extraBits"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _loopCounter
int& System::IO::Compression::InflaterManaged::dyn__loopCounter() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__loopCounter");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_loopCounter"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _literalLengthCodeCount
int& System::IO::Compression::InflaterManaged::dyn__literalLengthCodeCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__literalLengthCodeCount");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_literalLengthCodeCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _distanceCodeCount
int& System::IO::Compression::InflaterManaged::dyn__distanceCodeCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__distanceCodeCount");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_distanceCodeCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _codeLengthCodeCount
int& System::IO::Compression::InflaterManaged::dyn__codeLengthCodeCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__codeLengthCodeCount");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_codeLengthCodeCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _codeArraySize
int& System::IO::Compression::InflaterManaged::dyn__codeArraySize() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__codeArraySize");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_codeArraySize"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _lengthCode
int& System::IO::Compression::InflaterManaged::dyn__lengthCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__lengthCode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_lengthCode"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Byte[] _codeList
::ArrayW<uint8_t>& System::IO::Compression::InflaterManaged::dyn__codeList() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__codeList");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_codeList"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Byte[] _codeLengthTreeCodeLength
::ArrayW<uint8_t>& System::IO::Compression::InflaterManaged::dyn__codeLengthTreeCodeLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__codeLengthTreeCodeLength");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_codeLengthTreeCodeLength"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private readonly System.Boolean _deflate64
bool& System::IO::Compression::InflaterManaged::dyn__deflate64() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__deflate64");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_deflate64"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.HuffmanTree _codeLengthTree
::System::IO::Compression::HuffmanTree*& System::IO::Compression::InflaterManaged::dyn__codeLengthTree() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__codeLengthTree");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_codeLengthTree"))->offset;
return *reinterpret_cast<::System::IO::Compression::HuffmanTree**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.IFileFormatReader _formatReader
::System::IO::Compression::IFileFormatReader*& System::IO::Compression::InflaterManaged::dyn__formatReader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::dyn__formatReader");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_formatReader"))->offset;
return *reinterpret_cast<::System::IO::Compression::IFileFormatReader**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.InflaterManaged..cctor
void System::IO::Compression::InflaterManaged::_cctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::.cctor");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod("System.IO.Compression", "InflaterManaged", ".cctor", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(static_cast<Il2CppObject*>(nullptr), ___internal__method);
}
// Autogenerated method: System.IO.Compression.InflaterManaged.Reset
void System::IO::Compression::InflaterManaged::Reset() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::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: System.IO.Compression.InflaterManaged.SetInput
void System::IO::Compression::InflaterManaged::SetInput(::ArrayW<uint8_t> inputBytes, int offset, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::SetInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(inputBytes), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(length)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, inputBytes, offset, length);
}
// Autogenerated method: System.IO.Compression.InflaterManaged.Finished
bool System::IO::Compression::InflaterManaged::Finished() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::Finished");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Finished", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.InflaterManaged.Inflate
int System::IO::Compression::InflaterManaged::Inflate(::ArrayW<uint8_t> bytes, int offset, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::Inflate");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Inflate", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(bytes), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(length)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, bytes, offset, length);
}
// Autogenerated method: System.IO.Compression.InflaterManaged.Decode
bool System::IO::Compression::InflaterManaged::Decode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::Decode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Decode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.InflaterManaged.DecodeUncompressedBlock
bool System::IO::Compression::InflaterManaged::DecodeUncompressedBlock(ByRef<bool> end_of_block) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::DecodeUncompressedBlock");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DecodeUncompressedBlock", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractIndependentType<bool&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(end_of_block));
}
// Autogenerated method: System.IO.Compression.InflaterManaged.DecodeBlock
bool System::IO::Compression::InflaterManaged::DecodeBlock(ByRef<bool> end_of_block_code_seen) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::DecodeBlock");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DecodeBlock", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractIndependentType<bool&>()})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(end_of_block_code_seen));
}
// Autogenerated method: System.IO.Compression.InflaterManaged.DecodeDynamicBlockHeader
bool System::IO::Compression::InflaterManaged::DecodeDynamicBlockHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::DecodeDynamicBlockHeader");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DecodeDynamicBlockHeader", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.InflaterManaged.Dispose
void System::IO::Compression::InflaterManaged::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterManaged::Dispose");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.InflaterState
#include "System/IO/Compression/InflaterState.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.IO.Compression.InflaterState ReadingHeader
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingHeader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingHeader");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingHeader"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingHeader
void System::IO::Compression::InflaterState::_set_ReadingHeader(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingHeader");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingHeader", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingBFinal
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingBFinal() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingBFinal");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingBFinal"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingBFinal
void System::IO::Compression::InflaterState::_set_ReadingBFinal(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingBFinal");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingBFinal", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingBType
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingBType() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingBType");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingBType"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingBType
void System::IO::Compression::InflaterState::_set_ReadingBType(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingBType");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingBType", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingNumLitCodes
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingNumLitCodes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingNumLitCodes");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingNumLitCodes"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingNumLitCodes
void System::IO::Compression::InflaterState::_set_ReadingNumLitCodes(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingNumLitCodes");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingNumLitCodes", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingNumDistCodes
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingNumDistCodes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingNumDistCodes");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingNumDistCodes"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingNumDistCodes
void System::IO::Compression::InflaterState::_set_ReadingNumDistCodes(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingNumDistCodes");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingNumDistCodes", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingNumCodeLengthCodes
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingNumCodeLengthCodes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingNumCodeLengthCodes");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingNumCodeLengthCodes"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingNumCodeLengthCodes
void System::IO::Compression::InflaterState::_set_ReadingNumCodeLengthCodes(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingNumCodeLengthCodes");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingNumCodeLengthCodes", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingCodeLengthCodes
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingCodeLengthCodes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingCodeLengthCodes");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingCodeLengthCodes"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingCodeLengthCodes
void System::IO::Compression::InflaterState::_set_ReadingCodeLengthCodes(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingCodeLengthCodes");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingCodeLengthCodes", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingTreeCodesBefore
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingTreeCodesBefore() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingTreeCodesBefore");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingTreeCodesBefore"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingTreeCodesBefore
void System::IO::Compression::InflaterState::_set_ReadingTreeCodesBefore(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingTreeCodesBefore");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingTreeCodesBefore", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingTreeCodesAfter
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingTreeCodesAfter() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingTreeCodesAfter");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingTreeCodesAfter"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingTreeCodesAfter
void System::IO::Compression::InflaterState::_set_ReadingTreeCodesAfter(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingTreeCodesAfter");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingTreeCodesAfter", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState DecodeTop
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_DecodeTop() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_DecodeTop");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "DecodeTop"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState DecodeTop
void System::IO::Compression::InflaterState::_set_DecodeTop(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_DecodeTop");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "DecodeTop", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState HaveInitialLength
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_HaveInitialLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_HaveInitialLength");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "HaveInitialLength"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState HaveInitialLength
void System::IO::Compression::InflaterState::_set_HaveInitialLength(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_HaveInitialLength");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "HaveInitialLength", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState HaveFullLength
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_HaveFullLength() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_HaveFullLength");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "HaveFullLength"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState HaveFullLength
void System::IO::Compression::InflaterState::_set_HaveFullLength(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_HaveFullLength");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "HaveFullLength", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState HaveDistCode
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_HaveDistCode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_HaveDistCode");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "HaveDistCode"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState HaveDistCode
void System::IO::Compression::InflaterState::_set_HaveDistCode(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_HaveDistCode");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "HaveDistCode", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState UncompressedAligning
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_UncompressedAligning() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_UncompressedAligning");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "UncompressedAligning"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState UncompressedAligning
void System::IO::Compression::InflaterState::_set_UncompressedAligning(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_UncompressedAligning");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "UncompressedAligning", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState UncompressedByte1
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_UncompressedByte1() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_UncompressedByte1");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "UncompressedByte1"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState UncompressedByte1
void System::IO::Compression::InflaterState::_set_UncompressedByte1(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_UncompressedByte1");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "UncompressedByte1", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState UncompressedByte2
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_UncompressedByte2() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_UncompressedByte2");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "UncompressedByte2"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState UncompressedByte2
void System::IO::Compression::InflaterState::_set_UncompressedByte2(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_UncompressedByte2");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "UncompressedByte2", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState UncompressedByte3
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_UncompressedByte3() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_UncompressedByte3");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "UncompressedByte3"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState UncompressedByte3
void System::IO::Compression::InflaterState::_set_UncompressedByte3(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_UncompressedByte3");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "UncompressedByte3", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState UncompressedByte4
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_UncompressedByte4() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_UncompressedByte4");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "UncompressedByte4"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState UncompressedByte4
void System::IO::Compression::InflaterState::_set_UncompressedByte4(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_UncompressedByte4");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "UncompressedByte4", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState DecodingUncompressed
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_DecodingUncompressed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_DecodingUncompressed");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "DecodingUncompressed"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState DecodingUncompressed
void System::IO::Compression::InflaterState::_set_DecodingUncompressed(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_DecodingUncompressed");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "DecodingUncompressed", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState StartReadingFooter
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_StartReadingFooter() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_StartReadingFooter");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "StartReadingFooter"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState StartReadingFooter
void System::IO::Compression::InflaterState::_set_StartReadingFooter(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_StartReadingFooter");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "StartReadingFooter", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState ReadingFooter
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_ReadingFooter() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_ReadingFooter");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "ReadingFooter"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState ReadingFooter
void System::IO::Compression::InflaterState::_set_ReadingFooter(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_ReadingFooter");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "ReadingFooter", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState VerifyingFooter
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_VerifyingFooter() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_VerifyingFooter");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "VerifyingFooter"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState VerifyingFooter
void System::IO::Compression::InflaterState::_set_VerifyingFooter(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_VerifyingFooter");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "VerifyingFooter", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.InflaterState Done
::System::IO::Compression::InflaterState System::IO::Compression::InflaterState::_get_Done() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_get_Done");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::InflaterState>("System.IO.Compression", "InflaterState", "Done"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.InflaterState Done
void System::IO::Compression::InflaterState::_set_Done(::System::IO::Compression::InflaterState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::_set_Done");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "InflaterState", "Done", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::IO::Compression::InflaterState::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InflaterState::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: System.IO.Compression.InputBuffer
#include "System/IO/Compression/InputBuffer.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.Byte[] _buffer
::ArrayW<uint8_t>& System::IO::Compression::InputBuffer::dyn__buffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::dyn__buffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_buffer"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _start
int& System::IO::Compression::InputBuffer::dyn__start() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::dyn__start");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_start"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _end
int& System::IO::Compression::InputBuffer::dyn__end() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::dyn__end");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_end"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.UInt32 _bitBuffer
uint& System::IO::Compression::InputBuffer::dyn__bitBuffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::dyn__bitBuffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bitBuffer"))->offset;
return *reinterpret_cast<uint*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _bitsInBuffer
int& System::IO::Compression::InputBuffer::dyn__bitsInBuffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::dyn__bitsInBuffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bitsInBuffer"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.InputBuffer.get_AvailableBits
int System::IO::Compression::InputBuffer::get_AvailableBits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::get_AvailableBits");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_AvailableBits", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.InputBuffer.get_AvailableBytes
int System::IO::Compression::InputBuffer::get_AvailableBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::get_AvailableBytes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_AvailableBytes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.InputBuffer.EnsureBitsAvailable
bool System::IO::Compression::InputBuffer::EnsureBitsAvailable(int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::EnsureBitsAvailable");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnsureBitsAvailable", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(count)})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, count);
}
// Autogenerated method: System.IO.Compression.InputBuffer.TryLoad16Bits
uint System::IO::Compression::InputBuffer::TryLoad16Bits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::TryLoad16Bits");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "TryLoad16Bits", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.InputBuffer.GetBitMask
uint System::IO::Compression::InputBuffer::GetBitMask(int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::GetBitMask");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBitMask", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(count)})));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, count);
}
// Autogenerated method: System.IO.Compression.InputBuffer.GetBits
int System::IO::Compression::InputBuffer::GetBits(int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::GetBits");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "GetBits", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(count)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, count);
}
// Autogenerated method: System.IO.Compression.InputBuffer.CopyTo
int System::IO::Compression::InputBuffer::CopyTo(::ArrayW<uint8_t> output, int offset, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::CopyTo");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CopyTo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(length)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, output, offset, length);
}
// Autogenerated method: System.IO.Compression.InputBuffer.NeedsInput
bool System::IO::Compression::InputBuffer::NeedsInput() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::NeedsInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "NeedsInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.InputBuffer.SetInput
void System::IO::Compression::InputBuffer::SetInput(::ArrayW<uint8_t> buffer, int offset, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::SetInput");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetInput", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(length)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer, offset, length);
}
// Autogenerated method: System.IO.Compression.InputBuffer.SkipBits
void System::IO::Compression::InputBuffer::SkipBits(int n) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::SkipBits");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SkipBits", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(n)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, n);
}
// Autogenerated method: System.IO.Compression.InputBuffer.SkipToByteBoundary
void System::IO::Compression::InputBuffer::SkipToByteBoundary() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::InputBuffer::SkipToByteBoundary");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SkipToByteBoundary", 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: System.IO.Compression.Match
#include "System/IO/Compression/Match.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.IO.Compression.MatchState <State>k__BackingField
::System::IO::Compression::MatchState& System::IO::Compression::Match::dyn_$State$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::dyn_$State$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<State>k__BackingField"))->offset;
return *reinterpret_cast<::System::IO::Compression::MatchState*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <Position>k__BackingField
int& System::IO::Compression::Match::dyn_$Position$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::dyn_$Position$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Position>k__BackingField"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 <Length>k__BackingField
int& System::IO::Compression::Match::dyn_$Length$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::dyn_$Length$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Length>k__BackingField"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Byte <Symbol>k__BackingField
uint8_t& System::IO::Compression::Match::dyn_$Symbol$k__BackingField() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::dyn_$Symbol$k__BackingField");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "<Symbol>k__BackingField"))->offset;
return *reinterpret_cast<uint8_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.Match.get_State
::System::IO::Compression::MatchState System::IO::Compression::Match::get_State() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::get_State");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_State", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::MatchState, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.Match.set_State
void System::IO::Compression::Match::set_State(::System::IO::Compression::MatchState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::set_State");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_State", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.Match.get_Position
int System::IO::Compression::Match::get_Position() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::get_Position");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.Match.set_Position
void System::IO::Compression::Match::set_Position(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::set_Position");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.Match.get_Length
int System::IO::Compression::Match::get_Length() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::get_Length");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Length", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.Match.set_Length
void System::IO::Compression::Match::set_Length(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::set_Length");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Length", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.Match.get_Symbol
uint8_t System::IO::Compression::Match::get_Symbol() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::get_Symbol");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Symbol", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<uint8_t, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.Match.set_Symbol
void System::IO::Compression::Match::set_Symbol(uint8_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::Match::set_Symbol");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Symbol", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.MatchState
#include "System/IO/Compression/MatchState.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.IO.Compression.MatchState HasSymbol
::System::IO::Compression::MatchState System::IO::Compression::MatchState::_get_HasSymbol() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::MatchState::_get_HasSymbol");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::MatchState>("System.IO.Compression", "MatchState", "HasSymbol"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.MatchState HasSymbol
void System::IO::Compression::MatchState::_set_HasSymbol(::System::IO::Compression::MatchState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::MatchState::_set_HasSymbol");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "MatchState", "HasSymbol", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.MatchState HasMatch
::System::IO::Compression::MatchState System::IO::Compression::MatchState::_get_HasMatch() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::MatchState::_get_HasMatch");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::MatchState>("System.IO.Compression", "MatchState", "HasMatch"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.MatchState HasMatch
void System::IO::Compression::MatchState::_set_HasMatch(::System::IO::Compression::MatchState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::MatchState::_set_HasMatch");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "MatchState", "HasMatch", value));
}
// Autogenerated static field getter
// Get static field: static public System.IO.Compression.MatchState HasSymbolAndMatch
::System::IO::Compression::MatchState System::IO::Compression::MatchState::_get_HasSymbolAndMatch() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::MatchState::_get_HasSymbolAndMatch");
return THROW_UNLESS(il2cpp_utils::GetFieldValue<::System::IO::Compression::MatchState>("System.IO.Compression", "MatchState", "HasSymbolAndMatch"));
}
// Autogenerated static field setter
// Set static field: static public System.IO.Compression.MatchState HasSymbolAndMatch
void System::IO::Compression::MatchState::_set_HasSymbolAndMatch(::System::IO::Compression::MatchState value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::MatchState::_set_HasSymbolAndMatch");
THROW_UNLESS(il2cpp_utils::SetFieldValue("System.IO.Compression", "MatchState", "HasSymbolAndMatch", value));
}
// Autogenerated instance field getter
// Get instance field: public System.Int32 value__
int& System::IO::Compression::MatchState::dyn_value__() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::MatchState::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: System.IO.Compression.OutputBuffer
#include "System/IO/Compression/OutputBuffer.hpp"
// Including type: System.IO.Compression.OutputBuffer/System.IO.Compression.BufferState
#include "System/IO/Compression/OutputBuffer_BufferState.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.Byte[] _byteBuffer
::ArrayW<uint8_t>& System::IO::Compression::OutputBuffer::dyn__byteBuffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::dyn__byteBuffer");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_byteBuffer"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _pos
int& System::IO::Compression::OutputBuffer::dyn__pos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::dyn__pos");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_pos"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.UInt32 _bitBuf
uint& System::IO::Compression::OutputBuffer::dyn__bitBuf() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::dyn__bitBuf");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bitBuf"))->offset;
return *reinterpret_cast<uint*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _bitCount
int& System::IO::Compression::OutputBuffer::dyn__bitCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::dyn__bitCount");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bitCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.get_BytesWritten
int System::IO::Compression::OutputBuffer::get_BytesWritten() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::get_BytesWritten");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_BytesWritten", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.get_FreeBytes
int System::IO::Compression::OutputBuffer::get_FreeBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::get_FreeBytes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_FreeBytes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.get_BitsInBuffer
int System::IO::Compression::OutputBuffer::get_BitsInBuffer() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::get_BitsInBuffer");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_BitsInBuffer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.UpdateBuffer
void System::IO::Compression::OutputBuffer::UpdateBuffer(::ArrayW<uint8_t> output) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::UpdateBuffer");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "UpdateBuffer", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, output);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.WriteUInt16
void System::IO::Compression::OutputBuffer::WriteUInt16(uint16_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::WriteUInt16");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteUInt16", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.WriteBits
void System::IO::Compression::OutputBuffer::WriteBits(int n, uint bits) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::WriteBits");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteBits", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(n), ::il2cpp_utils::ExtractType(bits)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, n, bits);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.FlushBits
void System::IO::Compression::OutputBuffer::FlushBits() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::FlushBits");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushBits", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.WriteBytes
void System::IO::Compression::OutputBuffer::WriteBytes(::ArrayW<uint8_t> byteArray, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::WriteBytes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteBytes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(byteArray), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byteArray, offset, count);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.WriteBytesUnaligned
void System::IO::Compression::OutputBuffer::WriteBytesUnaligned(::ArrayW<uint8_t> byteArray, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::WriteBytesUnaligned");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteBytesUnaligned", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(byteArray), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byteArray, offset, count);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.WriteByteUnaligned
void System::IO::Compression::OutputBuffer::WriteByteUnaligned(uint8_t b) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::WriteByteUnaligned");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteByteUnaligned", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(b)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, b);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.DumpState
::System::IO::Compression::OutputBuffer::BufferState System::IO::Compression::OutputBuffer::DumpState() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::DumpState");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DumpState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::OutputBuffer::BufferState, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.OutputBuffer.RestoreState
void System::IO::Compression::OutputBuffer::RestoreState(::System::IO::Compression::OutputBuffer::BufferState state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::RestoreState");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RestoreState", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(state)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, state);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.OutputBuffer/System.IO.Compression.BufferState
#include "System/IO/Compression/OutputBuffer_BufferState.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: readonly System.Int32 _pos
int& System::IO::Compression::OutputBuffer::BufferState::dyn__pos() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::BufferState::dyn__pos");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_pos"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: readonly System.UInt32 _bitBuf
uint& System::IO::Compression::OutputBuffer::BufferState::dyn__bitBuf() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::BufferState::dyn__bitBuf");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bitBuf"))->offset;
return *reinterpret_cast<uint*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: readonly System.Int32 _bitCount
int& System::IO::Compression::OutputBuffer::BufferState::dyn__bitCount() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputBuffer::BufferState::dyn__bitCount");
auto ___internal__instance = *this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bitCount"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.OutputBuffer/System.IO.Compression.BufferState..ctor
// ABORTED elsewhere. System::IO::Compression::OutputBuffer::BufferState::BufferState(int pos, uint bitBuf, int bitCount)
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.OutputWindow
#include "System/IO/Compression/OutputWindow.hpp"
// Including type: System.IO.Compression.InputBuffer
#include "System/IO/Compression/InputBuffer.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.Byte[] _window
::ArrayW<uint8_t>& System::IO::Compression::OutputWindow::dyn__window() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::dyn__window");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_window"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _end
int& System::IO::Compression::OutputWindow::dyn__end() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::dyn__end");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_end"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int32 _bytesUsed
int& System::IO::Compression::OutputWindow::dyn__bytesUsed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::dyn__bytesUsed");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_bytesUsed"))->offset;
return *reinterpret_cast<int*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.OutputWindow.get_FreeBytes
int System::IO::Compression::OutputWindow::get_FreeBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::get_FreeBytes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_FreeBytes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.OutputWindow.get_AvailableBytes
int System::IO::Compression::OutputWindow::get_AvailableBytes() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::get_AvailableBytes");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_AvailableBytes", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.OutputWindow.Write
void System::IO::Compression::OutputWindow::Write(uint8_t b) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::Write");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Write", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(b)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, b);
}
// Autogenerated method: System.IO.Compression.OutputWindow.WriteLengthDistance
void System::IO::Compression::OutputWindow::WriteLengthDistance(int length, int distance) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::WriteLengthDistance");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteLengthDistance", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(length), ::il2cpp_utils::ExtractType(distance)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, length, distance);
}
// Autogenerated method: System.IO.Compression.OutputWindow.CopyFrom
int System::IO::Compression::OutputWindow::CopyFrom(::System::IO::Compression::InputBuffer* input, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::CopyFrom");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CopyFrom", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(input), ::il2cpp_utils::ExtractType(length)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, input, length);
}
// Autogenerated method: System.IO.Compression.OutputWindow.CopyTo
int System::IO::Compression::OutputWindow::CopyTo(::ArrayW<uint8_t> output, int offset, int length) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::OutputWindow::CopyTo");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CopyTo", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(output), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(length)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, output, offset, length);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper
#include "System/IO/Compression/PositionPreservingWriteOnlyStreamWrapper.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
// Including type: System.Threading.Tasks.Task
#include "System/Threading/Tasks/Task.hpp"
// Including type: System.Threading.CancellationToken
#include "System/Threading/CancellationToken.hpp"
// Including type: System.IO.SeekOrigin
#include "System/IO/SeekOrigin.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.IO.Stream _stream
::System::IO::Stream*& System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::dyn__stream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::dyn__stream");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_stream"))->offset;
return *reinterpret_cast<::System::IO::Stream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int64 _position
int64_t& System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::dyn__position() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::dyn__position");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_position"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.get_CanRead
bool System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_CanRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_CanRead");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.get_CanSeek
bool System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_CanSeek() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_CanSeek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanSeek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.get_CanWrite
bool System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_CanWrite() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_CanWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_CanWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.get_Position
int64_t System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_Position() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.set_Position
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::set_Position(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::set_Position");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_Position", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.get_ReadTimeout
int System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_ReadTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_ReadTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ReadTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.set_ReadTimeout
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::set_ReadTimeout(int value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::set_ReadTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_ReadTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.get_WriteTimeout
int System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_WriteTimeout() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_WriteTimeout");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_WriteTimeout", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.get_Length
int64_t System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_Length() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::get_Length");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Length", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Write
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Write(::ArrayW<uint8_t> buffer, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Write");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Write", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, buffer, offset, count);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.BeginWrite
::System::IAsyncResult* System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::BeginWrite(::ArrayW<uint8_t> buffer, int offset, int count, ::System::AsyncCallback* callback, ::Il2CppObject* state) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::BeginWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "BeginWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(callback), ::il2cpp_utils::ExtractType(state)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, buffer, offset, count, callback, state);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.EndWrite
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::EndWrite(::System::IAsyncResult* asyncResult) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::EndWrite");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EndWrite", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(asyncResult)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, asyncResult);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.WriteByte
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::WriteByte(uint8_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::WriteByte");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteByte", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.WriteAsync
::System::Threading::Tasks::Task* System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::WriteAsync(::ArrayW<uint8_t> buffer, int offset, int count, ::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::WriteAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count), ::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, buffer, offset, count, cancellationToken);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Flush
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Flush() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Flush");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Flush", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.FlushAsync
::System::Threading::Tasks::Task* System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::FlushAsync(::System::Threading::CancellationToken cancellationToken) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::FlushAsync");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "FlushAsync", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(cancellationToken)})));
return ::il2cpp_utils::RunMethodRethrow<::System::Threading::Tasks::Task*, false>(this, ___internal__method, cancellationToken);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Close
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Close() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Close");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Close", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Dispose
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Seek
int64_t System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Seek(int64_t offset, ::System::IO::SeekOrigin origin) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Seek");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Seek", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(origin)})));
return ::il2cpp_utils::RunMethodRethrow<int64_t, false>(this, ___internal__method, offset, origin);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.SetLength
void System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::SetLength(int64_t value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::SetLength");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "SetLength", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Read
int System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Read(::ArrayW<uint8_t> buffer, int offset, int count) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::PositionPreservingWriteOnlyStreamWrapper::Read");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Read", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(buffer), ::il2cpp_utils::ExtractType(offset), ::il2cpp_utils::ExtractType(count)})));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, buffer, offset, count);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
// Including type: System.IO.Compression.ZipArchive
#include "System/IO/Compression/ZipArchive.hpp"
// Including type: System.IO.Stream
#include "System/IO/Stream.hpp"
// Including type: System.IO.Compression.ZipArchiveEntry
#include "System/IO/Compression/ZipArchiveEntry.hpp"
// Including type: System.IO.BinaryReader
#include "System/IO/BinaryReader.hpp"
// Including type: System.Collections.Generic.List`1
#include "System/Collections/Generic/List_1.hpp"
// Including type: System.Collections.ObjectModel.ReadOnlyCollection`1
#include "System/Collections/ObjectModel/ReadOnlyCollection_1.hpp"
// Including type: System.Collections.Generic.Dictionary`2
#include "System/Collections/Generic/Dictionary_2.hpp"
// Including type: System.Text.Encoding
#include "System/Text/Encoding.hpp"
// Including type: System.Nullable`1
#include "System/Nullable_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.IO.Stream _archiveStream
::System::IO::Stream*& System::IO::Compression::ZipArchive::dyn__archiveStream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__archiveStream");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_archiveStream"))->offset;
return *reinterpret_cast<::System::IO::Stream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.ZipArchiveEntry _archiveStreamOwner
::System::IO::Compression::ZipArchiveEntry*& System::IO::Compression::ZipArchive::dyn__archiveStreamOwner() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__archiveStreamOwner");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_archiveStreamOwner"))->offset;
return *reinterpret_cast<::System::IO::Compression::ZipArchiveEntry**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.BinaryReader _archiveReader
::System::IO::BinaryReader*& System::IO::Compression::ZipArchive::dyn__archiveReader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__archiveReader");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_archiveReader"))->offset;
return *reinterpret_cast<::System::IO::BinaryReader**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Compression.ZipArchiveMode _mode
::System::IO::Compression::ZipArchiveMode& System::IO::Compression::ZipArchive::dyn__mode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__mode");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_mode"))->offset;
return *reinterpret_cast<::System::IO::Compression::ZipArchiveMode*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.List`1<System.IO.Compression.ZipArchiveEntry> _entries
::System::Collections::Generic::List_1<::System::IO::Compression::ZipArchiveEntry*>*& System::IO::Compression::ZipArchive::dyn__entries() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__entries");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_entries"))->offset;
return *reinterpret_cast<::System::Collections::Generic::List_1<::System::IO::Compression::ZipArchiveEntry*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.ObjectModel.ReadOnlyCollection`1<System.IO.Compression.ZipArchiveEntry> _entriesCollection
::System::Collections::ObjectModel::ReadOnlyCollection_1<::System::IO::Compression::ZipArchiveEntry*>*& System::IO::Compression::ZipArchive::dyn__entriesCollection() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__entriesCollection");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_entriesCollection"))->offset;
return *reinterpret_cast<::System::Collections::ObjectModel::ReadOnlyCollection_1<::System::IO::Compression::ZipArchiveEntry*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Collections.Generic.Dictionary`2<System.String,System.IO.Compression.ZipArchiveEntry> _entriesDictionary
::System::Collections::Generic::Dictionary_2<::StringW, ::System::IO::Compression::ZipArchiveEntry*>*& System::IO::Compression::ZipArchive::dyn__entriesDictionary() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__entriesDictionary");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_entriesDictionary"))->offset;
return *reinterpret_cast<::System::Collections::Generic::Dictionary_2<::StringW, ::System::IO::Compression::ZipArchiveEntry*>**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _readEntries
bool& System::IO::Compression::ZipArchive::dyn__readEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__readEntries");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_readEntries"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _leaveOpen
bool& System::IO::Compression::ZipArchive::dyn__leaveOpen() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__leaveOpen");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_leaveOpen"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int64 _centralDirectoryStart
int64_t& System::IO::Compression::ZipArchive::dyn__centralDirectoryStart() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__centralDirectoryStart");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_centralDirectoryStart"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Boolean _isDisposed
bool& System::IO::Compression::ZipArchive::dyn__isDisposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__isDisposed");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_isDisposed"))->offset;
return *reinterpret_cast<bool*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.UInt32 _numberOfThisDisk
uint& System::IO::Compression::ZipArchive::dyn__numberOfThisDisk() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__numberOfThisDisk");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_numberOfThisDisk"))->offset;
return *reinterpret_cast<uint*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Int64 _expectedNumberOfEntries
int64_t& System::IO::Compression::ZipArchive::dyn__expectedNumberOfEntries() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__expectedNumberOfEntries");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_expectedNumberOfEntries"))->offset;
return *reinterpret_cast<int64_t*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.IO.Stream _backingStream
::System::IO::Stream*& System::IO::Compression::ZipArchive::dyn__backingStream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__backingStream");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_backingStream"))->offset;
return *reinterpret_cast<::System::IO::Stream**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Byte[] _archiveComment
::ArrayW<uint8_t>& System::IO::Compression::ZipArchive::dyn__archiveComment() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__archiveComment");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_archiveComment"))->offset;
return *reinterpret_cast<::ArrayW<uint8_t>*>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated instance field getter
// Get instance field: private System.Text.Encoding _entryNameEncoding
::System::Text::Encoding*& System::IO::Compression::ZipArchive::dyn__entryNameEncoding() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::dyn__entryNameEncoding");
auto ___internal__instance = this;
static auto ___internal__field__offset = THROW_UNLESS(il2cpp_utils::FindField(___internal__instance, "_entryNameEncoding"))->offset;
return *reinterpret_cast<::System::Text::Encoding**>(reinterpret_cast<char*>(this) + ___internal__field__offset);
}
// Autogenerated method: System.IO.Compression.ZipArchive.get_Entries
::System::Collections::ObjectModel::ReadOnlyCollection_1<::System::IO::Compression::ZipArchiveEntry*>* System::IO::Compression::ZipArchive::get_Entries() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::get_Entries");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Entries", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Collections::ObjectModel::ReadOnlyCollection_1<::System::IO::Compression::ZipArchiveEntry*>*, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.get_Mode
::System::IO::Compression::ZipArchiveMode System::IO::Compression::ZipArchive::get_Mode() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::get_Mode");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_Mode", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::ZipArchiveMode, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.get_ArchiveReader
::System::IO::BinaryReader* System::IO::Compression::ZipArchive::get_ArchiveReader() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::get_ArchiveReader");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ArchiveReader", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::BinaryReader*, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.get_ArchiveStream
::System::IO::Stream* System::IO::Compression::ZipArchive::get_ArchiveStream() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::get_ArchiveStream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_ArchiveStream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Stream*, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.get_NumberOfThisDisk
uint System::IO::Compression::ZipArchive::get_NumberOfThisDisk() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::get_NumberOfThisDisk");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_NumberOfThisDisk", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.get_EntryNameEncoding
::System::Text::Encoding* System::IO::Compression::ZipArchive::get_EntryNameEncoding() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::get_EntryNameEncoding");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "get_EntryNameEncoding", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
return ::il2cpp_utils::RunMethodRethrow<::System::Text::Encoding*, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.set_EntryNameEncoding
void System::IO::Compression::ZipArchive::set_EntryNameEncoding(::System::Text::Encoding* value) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::set_EntryNameEncoding");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "set_EntryNameEncoding", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(value)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, value);
}
// Autogenerated method: System.IO.Compression.ZipArchive.CreateEntry
::System::IO::Compression::ZipArchiveEntry* System::IO::Compression::ZipArchive::CreateEntry(::StringW entryName) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::CreateEntry");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreateEntry", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(entryName)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::ZipArchiveEntry*, false>(this, ___internal__method, entryName);
}
// Autogenerated method: System.IO.Compression.ZipArchive.CreateEntry
::System::IO::Compression::ZipArchiveEntry* System::IO::Compression::ZipArchive::CreateEntry(::StringW entryName, ::System::IO::Compression::CompressionLevel compressionLevel) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::CreateEntry");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CreateEntry", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(entryName), ::il2cpp_utils::ExtractType(compressionLevel)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::ZipArchiveEntry*, false>(this, ___internal__method, entryName, compressionLevel);
}
// Autogenerated method: System.IO.Compression.ZipArchive.Dispose
void System::IO::Compression::ZipArchive::Dispose(bool disposing) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(disposing)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, disposing);
}
// Autogenerated method: System.IO.Compression.ZipArchive.Dispose
void System::IO::Compression::ZipArchive::Dispose() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::Dispose");
auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Dispose", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.DoCreateEntry
::System::IO::Compression::ZipArchiveEntry* System::IO::Compression::ZipArchive::DoCreateEntry(::StringW entryName, ::System::Nullable_1<::System::IO::Compression::CompressionLevel> compressionLevel) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::DoCreateEntry");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "DoCreateEntry", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(entryName), ::il2cpp_utils::ExtractType(compressionLevel)})));
return ::il2cpp_utils::RunMethodRethrow<::System::IO::Compression::ZipArchiveEntry*, false>(this, ___internal__method, entryName, compressionLevel);
}
// Autogenerated method: System.IO.Compression.ZipArchive.AcquireArchiveStream
void System::IO::Compression::ZipArchive::AcquireArchiveStream(::System::IO::Compression::ZipArchiveEntry* entry) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::AcquireArchiveStream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AcquireArchiveStream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(entry)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, entry);
}
// Autogenerated method: System.IO.Compression.ZipArchive.AddEntry
void System::IO::Compression::ZipArchive::AddEntry(::System::IO::Compression::ZipArchiveEntry* entry) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::AddEntry");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "AddEntry", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(entry)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, entry);
}
// Autogenerated method: System.IO.Compression.ZipArchive.ReleaseArchiveStream
void System::IO::Compression::ZipArchive::ReleaseArchiveStream(::System::IO::Compression::ZipArchiveEntry* entry) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::ReleaseArchiveStream");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReleaseArchiveStream", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(entry)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, entry);
}
// Autogenerated method: System.IO.Compression.ZipArchive.RemoveEntry
void System::IO::Compression::ZipArchive::RemoveEntry(::System::IO::Compression::ZipArchiveEntry* entry) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::RemoveEntry");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "RemoveEntry", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(entry)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, entry);
}
// Autogenerated method: System.IO.Compression.ZipArchive.ThrowIfDisposed
void System::IO::Compression::ZipArchive::ThrowIfDisposed() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::ThrowIfDisposed");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ThrowIfDisposed", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.CloseStreams
void System::IO::Compression::ZipArchive::CloseStreams() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::CloseStreams");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "CloseStreams", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.EnsureCentralDirectoryRead
void System::IO::Compression::ZipArchive::EnsureCentralDirectoryRead() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::EnsureCentralDirectoryRead");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "EnsureCentralDirectoryRead", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.Init
void System::IO::Compression::ZipArchive::Init(::System::IO::Stream* stream, ::System::IO::Compression::ZipArchiveMode mode, bool leaveOpen) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::Init");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "Init", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(stream), ::il2cpp_utils::ExtractType(mode), ::il2cpp_utils::ExtractType(leaveOpen)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, stream, mode, leaveOpen);
}
// Autogenerated method: System.IO.Compression.ZipArchive.ReadCentralDirectory
void System::IO::Compression::ZipArchive::ReadCentralDirectory() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::ReadCentralDirectory");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReadCentralDirectory", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory
void System::IO::Compression::ZipArchive::ReadEndOfCentralDirectory() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::ReadEndOfCentralDirectory");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "ReadEndOfCentralDirectory", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.WriteFile
void System::IO::Compression::ZipArchive::WriteFile() {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::WriteFile");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteFile", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: System.IO.Compression.ZipArchive.WriteArchiveEpilogue
void System::IO::Compression::ZipArchive::WriteArchiveEpilogue(int64_t startOfCentralDirectory, int64_t sizeOfCentralDirectory) {
static auto ___internal__logger = ::Logger::get().WithContext("::System::IO::Compression::ZipArchive::WriteArchiveEpilogue");
static auto* ___internal__method = THROW_UNLESS((::il2cpp_utils::FindMethod(this, "WriteArchiveEpilogue", std::vector<Il2CppClass*>{}, ::std::vector<const Il2CppType*>{::il2cpp_utils::ExtractType(startOfCentralDirectory), ::il2cpp_utils::ExtractType(sizeOfCentralDirectory)})));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, startOfCentralDirectory, sizeOfCentralDirectory);
}
| 82.772157 | 478 | 0.774834 | RedBrumbler |
129decae7c2bfb652cde64569525de0b4d86450a | 6,855 | cpp | C++ | cinkciarzclient.cpp | dbautsch/CinkciarzClient | 077133f4b67bb567e753a297a9f08d6e865a9939 | [
"MIT"
] | null | null | null | cinkciarzclient.cpp | dbautsch/CinkciarzClient | 077133f4b67bb567e753a297a9f08d6e865a9939 | [
"MIT"
] | null | null | null | cinkciarzclient.cpp | dbautsch/CinkciarzClient | 077133f4b67bb567e753a297a9f08d6e865a9939 | [
"MIT"
] | null | null | null | #include "cinkciarzclient.h"
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QFile>
#include <QDebug>
#include <QCoreApplication>
static const QString currenciesUrl = "https://cinkciarz.pl/kantor/kursy-walut-cinkciarz-pl";
CinkciarzClient::CinkciarzClient(QNetworkAccessManager *networkManager,
QObject *parent)
: QObject(parent),
networkManager(networkManager)
{
}
void CinkciarzClient::FetchCurrencies()
{
/*
* (SLOT)
*/
HttpGet(currenciesUrl);
}
void CinkciarzClient::HttpGet(QString url)
{
auto * reply = networkManager->get(QNetworkRequest(QUrl(url)));
connect(reply,
&QNetworkReply::finished,
this,
&CinkciarzClient::HttpGetFinished);
}
void CinkciarzClient::HttpGetFinished()
{
auto * reply = qobject_cast<QNetworkReply*>(QObject::sender());
QString data = reply->readAll();
reply->deleteLater();
CurrencyInformationList currenciesInformation50k;
CurrencyInformationList currenciesInformation;
ParseNetworkReply(currenciesInformation50k,
currenciesInformation,
data);
emit CurrenciesReady(currenciesInformation50k, currenciesInformation);
}
void CinkciarzClient::ParseNetworkReply(CurrencyInformationList ¤ciesInformation50k,
CurrencyInformationList & currenciesInformation,
QString data)
{
#ifdef DUMP_RESPONSES
QFile f(QCoreApplication::applicationDirPath() + "/response.html");
if (f.open(QIODevice::WriteOnly | QIODevice::Text) == false)
{
qDebug() << "Unable to create response.html file";
}
else
{
QTextStream s(&f);
s << data;
s.flush();
f.close();
}
#endif // DUMP_RESPONSES defined
if (data.length() == 0)
{
return;
}
QString currencyData50k, currencyData;
Get50kUnitsCurrencyData(data, currencyData50k);
ParseCurrencyData(currencyData50k, currenciesInformation50k);
Get1UnitCurrencyData(data, currencyData);
ParseCurrencyData(currencyData, currenciesInformation);
}
void CinkciarzClient::ParseCurrencyData(QString currencyData,
CurrencyInformationList & currencyInformation)
{
int previousLocation = -1;
int lastPos;
CurrencyInformation info;
while (GetNextCurrencyInformation(currencyData,
previousLocation,
info,
lastPos))
{
currencyInformation.push_back(info);
previousLocation = lastPos;
}
}
void CinkciarzClient::Get50kUnitsCurrencyData(QString data, QString & currencyData)
{
currencyData = ExtractElementFromString(data,
"<div role=\"tabpanel\"",
"id=\"for-50k\">",
"</tbody>");
}
void CinkciarzClient::Get1UnitCurrencyData(QString data, QString & currencyData)
{
currencyData = ExtractElementFromString(data,
"<div role=\"tabpanel\"",
"id=\"for-1\">",
"</tbody>");
}
QString CinkciarzClient::ExtractElementFromString(QString data,
QString first,
QString second,
QString third,
int startFrom,
int *firstOccurencePos)
{
auto firstPos = data.indexOf(first, startFrom);
if (firstPos < 0)
{
return QString();
}
if (firstOccurencePos != nullptr)
{
*firstOccurencePos = firstPos;
}
auto secondPos = data.indexOf(second, firstPos + first.length());
if (secondPos < 0)
{
return QString();
}
auto thirdPos = data.indexOf(third, secondPos + second.length());
if (thirdPos < 0)
{
return QString();
}
return data.mid(secondPos + second.length(),
thirdPos - (secondPos + second.length()));
}
bool CinkciarzClient::GetNextCurrencyInformation(QString data,
int previousLocation,
CurrencyInformation & currencyInformation,
int &lastPos)
{
if (previousLocation < 0)
{
previousLocation = 0;
}
int occurencePos;
currencyInformation.name = (ExtractElementFromString(data,
"<td data-label=\"Nazwa\">",
"\">",
"</a>",
previousLocation,
&occurencePos)).trimmed();
previousLocation = occurencePos;
currencyInformation.code = (ExtractElementFromString(data,
"\"Kod waluty\">",
"</strong>",
"</td>",
previousLocation,
&occurencePos)).trimmed();
previousLocation = occurencePos;
currencyInformation.buyingValue = (ExtractElementFromString(data,
"data-buy=\"true",
"\">",
"</td>",
previousLocation,
&occurencePos)).trimmed();
previousLocation = occurencePos;
currencyInformation.sellingValue = (ExtractElementFromString(data,
"data-sell=\"true",
"\">",
"</td>",
previousLocation,
&occurencePos)).trimmed();
currencyInformation.timestampUTC = QDateTime::currentDateTimeUtc();
lastPos = occurencePos;
return currencyInformation.IsValid();
}
| 32.334906 | 92 | 0.47469 | dbautsch |
129e460f38f866384518f5430ab009c38ac67265 | 695 | cpp | C++ | 2018/day-02/2b.cpp | Valokoodari/advent-of-code | c664987f739e0b07ddad34bad87d56768556a5a5 | [
"MIT"
] | 2 | 2021-12-27T18:59:11.000Z | 2022-01-10T02:31:36.000Z | 2018/day-02/2b.cpp | Valokoodari/advent-of-code-2019 | c664987f739e0b07ddad34bad87d56768556a5a5 | [
"MIT"
] | null | null | null | 2018/day-02/2b.cpp | Valokoodari/advent-of-code-2019 | c664987f739e0b07ddad34bad87d56768556a5a5 | [
"MIT"
] | 2 | 2021-12-23T17:29:10.000Z | 2021-12-24T03:21:49.000Z | #include <iostream>
#include <vector>
#include <string>
std::string x;
std::vector<std::string> ids;
int a,s;
bool d = false;
int main() {
freopen("2_input", "r", stdin);
freopen("2b_output", "w", stdout);
while (std::cin >> x && !d) {
for (int i = 0; i < ids.size(); i++) {
s = 0;
for (int j = 0; j < x.size(); j++) {
if (x[j] != ids[i][j])
s++;
}
if (s == 1) {
d = true;
a = i;
break;
}
}
ids.push_back(x);
}
std::cout << ids[ids.size() - 1] << "\n";
std::cout << ids[a] << "\n";
return 0;
} | 19.857143 | 48 | 0.37554 | Valokoodari |
12a18af74dd0a37690d9b20827f4d7381cef0dfc | 287 | hpp | C++ | src/scene/Entity_Base.hpp | IsraelEfraim/cpp-engine | 039bcad97d55635a7a8f31d0d80ce59095ebb6cb | [
"MIT"
] | null | null | null | src/scene/Entity_Base.hpp | IsraelEfraim/cpp-engine | 039bcad97d55635a7a8f31d0d80ce59095ebb6cb | [
"MIT"
] | null | null | null | src/scene/Entity_Base.hpp | IsraelEfraim/cpp-engine | 039bcad97d55635a7a8f31d0d80ce59095ebb6cb | [
"MIT"
] | 2 | 2021-03-15T18:51:32.000Z | 2021-07-19T23:45:49.000Z | #ifndef CPP_ENGINE_ENTITY_BASE_HPP
#define CPP_ENGINE_ENTITY_BASE_HPP
namespace engine {
class Entity_Base {
public:
virtual auto render() -> void {}
virtual auto update(float seconds) -> void {}
virtual ~Entity_Base() = default;
};
}
#endif //CPP_ENGINE_ENTITY_BASE_HPP
| 17.9375 | 49 | 0.735192 | IsraelEfraim |
12abb2f888aea44ae9c68deabdee5c0b5c32b480 | 939 | cpp | C++ | pawnfield.cpp | mdziubich/chessGame_cpp | 80ff8adc17d6fa72441400e80a715f516e5b2989 | [
"MIT"
] | 2 | 2019-08-25T09:09:42.000Z | 2022-03-26T22:49:10.000Z | pawnfield.cpp | mdziubich/chessGame_cpp | 80ff8adc17d6fa72441400e80a715f516e5b2989 | [
"MIT"
] | 1 | 2019-10-13T02:50:45.000Z | 2019-11-06T20:31:37.000Z | pawnfield.cpp | mdziubich/chessGame_cpp | 80ff8adc17d6fa72441400e80a715f516e5b2989 | [
"MIT"
] | null | null | null | #include "pawnfield.h"
#include <QGraphicsProxyWidget>
#include "boardfield.h"
#include "boardposition.h"
#include "gameview.h"
#include "utils.h"
extern GameView *game;
PawnField::PawnField(BoardPosition position,
QString imagePath,
QGraphicsItem *parent): QGraphicsRectItem(parent) {
this->position = position;
imageLabel = new QLabel();
image = QPixmap(imagePath);
QGraphicsProxyWidget *pMyProxy = new QGraphicsProxyWidget(this);
imageLabel->setPixmap(image);
imageLabel->setAttribute(Qt::WA_TranslucentBackground);
pMyProxy->setWidget(imageLabel);
setPen(Qt::NoPen);
}
void PawnField::setPosition(BoardPosition position) {
this->position = position;
}
void PawnField::setImage(QString imagePath) {
image.load(imagePath);
imageLabel->clear();
imageLabel->setPixmap(image);
}
BoardPosition PawnField::getPosition() {
return position;
}
| 24.710526 | 72 | 0.702875 | mdziubich |
12b0148867faeccf65a37e3c35a5cbb3da8c31dc | 567 | cpp | C++ | src/mutex.cpp | PokIsemaine/fishjoy | 97d9e2f0c04a9e4c770d87c8bb6f7fdb2de2d239 | [
"Unlicense"
] | null | null | null | src/mutex.cpp | PokIsemaine/fishjoy | 97d9e2f0c04a9e4c770d87c8bb6f7fdb2de2d239 | [
"Unlicense"
] | null | null | null | src/mutex.cpp | PokIsemaine/fishjoy | 97d9e2f0c04a9e4c770d87c8bb6f7fdb2de2d239 | [
"Unlicense"
] | null | null | null | //
// Created by zsl on 5/31/22.
//
#include "fishjoy/mutex.hpp"
namespace fishjoy {
Semaphore::Semaphore(uint32_t count) {
if (sem_init(&m_semaphore, 0, count) != 0) {
throw std::logic_error("sem_init error");
}
}
Semaphore::~Semaphore() { sem_destroy(&m_semaphore); }
void Semaphore::wait() {
if (sem_wait(&m_semaphore) != 0) {
throw std::logic_error("sem_wait error");
}
}
void Semaphore::notify() {
if (sem_post(&m_semaphore) != 0) {
throw std::logic_error("sem_post error");
}
}
} // namespace fishjoy | 21.807692 | 56 | 0.613757 | PokIsemaine |
12b16e5dca09f1c5669a60b05bcd585e4d6cdd9c | 2,040 | cpp | C++ | src/target/main.cpp | anxri/gateway | cdfc7c13b5e08296c11618fc07185c6be467163f | [
"MIT"
] | null | null | null | src/target/main.cpp | anxri/gateway | cdfc7c13b5e08296c11618fc07185c6be467163f | [
"MIT"
] | null | null | null | src/target/main.cpp | anxri/gateway | cdfc7c13b5e08296c11618fc07185c6be467163f | [
"MIT"
] | null | null | null | #include <iostream>
#include <string>
#include "../../include/UdpSocket.h"
#include "../../include/aes.hpp"
#include "../read_single_conf.h"
using std::cout;
using std::endl;
using std::string;
using toolbox::UdpSocket;
string fetch_ip()
{
FILE *fp;
char path[10000];
fp = popen("curl -s ifconfig.me", "r");
if (fp == NULL)
{
printf("Failed to run command\n" );
exit(1);
}
string output = "";
while ( fgets(path, sizeof( path ), fp ) != NULL )
{
output += path;
}
/* close */
pclose(fp);
return output;
}
int main( int argc, char *argv[] )
{
string server_ip = read_single_conf( "/home/noxx/.config/lacus/target/ip" );
string server_port = read_single_conf( "/home/noxx/.config/lacus/target/port" );
string secret = read_single_conf( "/home/noxx/.config/lacus/target/key" );
if(secret == "")\
return 10;
int pid = fork();
if( pid < 0 )
{
return 271;
}
else if ( pid == 0 )
{
int curl_exit_code = execl("$1 > /dev/null 2>&1\n"
"status=$?\n"
"echo ${status}\n"
"exit ${status}", "--version", NULL );
if( curl_exit_code == -1 )
return 270;
cout << "curl exit code is: " << curl_exit_code << endl;
}
string my_ip = fetch_ip();
cout << my_ip << endl;
UdpSocket sock = UdpSocket();
sock.udp_create();
std::vector<uint8_t> secret_vec(secret.begin(), secret.end());
uint8_t * key = &secret_vec[0];
std::vector<uint8_t> ip_vec(my_ip.begin(), my_ip.end());
uint8_t * in = &ip_vec[0];
uint8_t iv[16] = { 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff };
struct AES_ctx ctx;
AES_init_ctx_iv(&ctx, key, iv);
AES_CTR_xcrypt_buffer(&ctx, in, strlen((char*)in));
sock.udp_send((char*)in, server_ip, server_port );
sock.close();
return 0;
}
| 22.666667 | 120 | 0.542157 | anxri |
12b1d0c523273c4d97a80b767298a0c04644c33f | 1,788 | cpp | C++ | catkin_ws/action_client_pkg/src/ardrone_action_client.cpp | BV-Pradeep/RIA-ROS-Basics-with-CPP-in-5-days | 2c33397de94a5d35cd9bb5d957fb0a15dd0b70b1 | [
"MIT"
] | 5 | 2019-08-09T03:07:30.000Z | 2021-12-09T15:51:09.000Z | catkin_ws/action_client_pkg/src/ardrone_action_client.cpp | BV-Pradeep/RIA-ROS-Basics-with-CPP-in-5-days | 2c33397de94a5d35cd9bb5d957fb0a15dd0b70b1 | [
"MIT"
] | null | null | null | catkin_ws/action_client_pkg/src/ardrone_action_client.cpp | BV-Pradeep/RIA-ROS-Basics-with-CPP-in-5-days | 2c33397de94a5d35cd9bb5d957fb0a15dd0b70b1 | [
"MIT"
] | 3 | 2019-07-22T07:43:46.000Z | 2021-07-12T14:23:24.000Z | #include <actionlib/client/simple_action_client.h>
#include <ardrone_as/ArdroneAction.h> // Note: "Action" is appended
#include <ros/ros.h>
int nImage = 0; // Initialization of a global variable
// Definition of the done calback. It is called once when the goal completes
void doneCb(const actionlib::SimpleClientGoalState &state,
const ardrone_as::ArdroneResultConstPtr &result) {
ROS_INFO("The Action has been completed");
ros::shutdown();
}
// Definition of the active callback. It is called once when the goal becomes
// active
void activeCb() { ROS_INFO("Goal just went active"); }
// Definition of the feedback callback. This will be called when feedback is
// received from the action server. It just // prints a message indicating a new
// message has been received
void feedbackCb(const ardrone_as::ArdroneFeedbackConstPtr &feedback) {
ROS_INFO("[Feedback] image n.%d received", nImage);
++nImage;
}
int main(int argc, char **argv) {
ros::init(argc, argv,
"drone_action_client"); // Initializes the action client node
// Create the connection to the action server
actionlib::SimpleActionClient<ardrone_as::ArdroneAction> client(
"ardrone_action_server", true);
client.waitForServer(); // Waits until the action server is up and running
ardrone_as::ArdroneGoal goal; // Creates a goal to send to the action server
goal.nseconds =
10; // Fills the goal. Indicates, take pictures along 10 seconds
client.sendGoal(
goal, &doneCb, &activeCb,
&feedbackCb); // sends the goal to the action server, specifying which //
// functions to call when the goal completes, when the //
// goal becames active, and when feedback is received
client.waitForResult();
return 0;
} | 39.733333 | 80 | 0.713087 | BV-Pradeep |
12b23575180bb10d817c24cf6002947aa122889c | 1,438 | cpp | C++ | exec/readCircuitFile.cpp | zghodsi/TinyGarble2.0 | aa0c8a56848ee3f6d2354988028ec715d5e73e25 | [
"MIT"
] | null | null | null | exec/readCircuitFile.cpp | zghodsi/TinyGarble2.0 | aa0c8a56848ee3f6d2354988028ec715d5e73e25 | [
"MIT"
] | null | null | null | exec/readCircuitFile.cpp | zghodsi/TinyGarble2.0 | aa0c8a56848ee3f6d2354988028ec715d5e73e25 | [
"MIT"
] | null | null | null | #include <emp-tool-tg/emp-tool/emp-tool.h>
#include <boost/program_options.hpp>
#include <boost/format.hpp>
#include <cstdlib>
#include <fstream>
using namespace std;
namespace po = boost::program_options;
int main(int argc, char** argv) {
string netlist_address_in, netlist_address_out;
po::options_description desc{"Read EMP circuit and write to binary file. \nAllowed options"};
desc.add_options() //
("help,h", "produce help message") //
("input,i", po::value<string>(&netlist_address_in), "input text file address.");
po::variables_map vm;
try {
po::parsed_options parsed = po::command_line_parser(argc, argv).options(desc).allow_unregistered().run();
po::store(parsed, vm);
if (vm.count("help")) {
cout << desc << endl;
return 0;
}
po::notify(vm);
}catch (po::error& e) {
cout << "ERROR: " << e.what() << endl << endl;
cout << desc << endl;
return -1;
}
netlist_address_out = netlist_address_in + ".bin";
Timer T;
uint64_t dc_t, dc_b;
double dt_t, dt_b;
T.start();
CircuitFile cf (netlist_address_in.c_str());
T.get(dc_t, dt_t);
cf.toBinary(netlist_address_out.c_str());
T.start();
CircuitFile cf1 (netlist_address_out.c_str(), true);
T.get(dc_b, dt_b);
cout << "text file: " << netlist_address_in << " >> binary file: " << netlist_address_out << "| speed-up: " << dt_t/dt_b << endl;
return 0;
}
| 25.22807 | 132 | 0.6363 | zghodsi |
12b9dca9a6084bc1ff852988a0fbd49f06015415 | 1,364 | cpp | C++ | module04/ex01/PlasmaRifle.cpp | selysse/CPP-Piscine | 72884c60ac5007d34874b006e37dad7a04e846bb | [
"MIT"
] | 1 | 2021-09-17T13:25:47.000Z | 2021-09-17T13:25:47.000Z | module04/ex01/PlasmaRifle.cpp | selysse/CPP-Piscine | 72884c60ac5007d34874b006e37dad7a04e846bb | [
"MIT"
] | null | null | null | module04/ex01/PlasmaRifle.cpp | selysse/CPP-Piscine | 72884c60ac5007d34874b006e37dad7a04e846bb | [
"MIT"
] | null | null | null | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PlasmaRifle.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gselyse <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/03/05 03:33:08 by gselyse #+# #+# */
/* Updated: 2021/03/07 19:42:56 by gselyse ### ########.fr */
/* */
/* ************************************************************************** */
#include "PlasmaRifle.hpp"
PlasmaRifle::PlasmaRifle() : AWeapon("Plasma Rifle", 5, 21)
{
}
PlasmaRifle::PlasmaRifle(PlasmaRifle const ©) : AWeapon(copy)
{
}
PlasmaRifle &PlasmaRifle::operator=(PlasmaRifle const ©)
{
this->_name = copy.getName();
this->_apcost = copy.getAPCost();
this->_damage = copy.getDamage();
return (*this);
}
PlasmaRifle::~PlasmaRifle()
{
}
void PlasmaRifle::attack()const
{
std::cout << "* piouuu piouuu piouuu *" << std::endl;
} | 35.894737 | 80 | 0.313783 | selysse |
521b63acf85353db0afe89d9c8532d4aef68487f | 3,836 | cc | C++ | flens/lapack/interface/src/gels.cc | stip/FLENS | 80495fa97dda42a0acafc8f83fc9639ae36d2e10 | [
"BSD-3-Clause"
] | 98 | 2015-01-26T20:31:37.000Z | 2021-09-09T15:51:37.000Z | flens/lapack/interface/src/gels.cc | stip/FLENS | 80495fa97dda42a0acafc8f83fc9639ae36d2e10 | [
"BSD-3-Clause"
] | 16 | 2015-01-21T07:43:45.000Z | 2021-12-06T12:08:36.000Z | flens/lapack/interface/src/gels.cc | stip/FLENS | 80495fa97dda42a0acafc8f83fc9639ae36d2e10 | [
"BSD-3-Clause"
] | 31 | 2015-01-05T08:06:45.000Z | 2022-01-26T20:12:00.000Z | #define STR(x) #x
#define STRING(x) STR(x)
#include <flens/lapack/interface/include/config.h>
namespace flens { namespace lapack {
extern "C" {
//-- dgels ---------------------------------------------------------------------
void
LAPACK_DECL(dgels)(const char *TRANS,
const INTEGER *M,
const INTEGER *N,
const INTEGER *NRHS,
DOUBLE *A,
const INTEGER *LDA,
DOUBLE *B,
const INTEGER *LDB,
DOUBLE *WORK,
const INTEGER *LWORK,
INTEGER *INFO)
{
//
// Test the input parameters so that we pass LAPACK error checks
//
const bool lQuery = (*LWORK==0);
const INTEGER mn = std::min(*M, *N);
*INFO = 0;
if (*TRANS!='N' && *TRANS!='T' && *TRANS!='C') {
*INFO = -1;
} else if (*M<0) {
*INFO = -2;
} else if (*N<0) {
*INFO = -3;
} else if (*NRHS<0) {
*INFO = -4;
} else if (*LDA<std::max(INTEGER(1), *M)) {
*INFO = -6;
} else if (*LDB<flens::max(INTEGER(1), *M, *N)) {
*INFO = -8;
} else if (*LWORK<std::max(INTEGER(1), mn+std::max(mn, *NRHS)) && !lQuery) {
*INFO = -10;
}
if (*INFO!=0) {
*INFO = -(*INFO);
LAPACK_ERROR("DGELS", INFO);
*INFO = -(*INFO);
return;
}
//
// Call FLENS implementation
//
Transpose trans = convertTo<Transpose>(*TRANS);
DGeMatrixView _A = DFSView(*M, *N, A, *LDA);
const INTEGER numRowsB = std::max(*M,*N);
DGeMatrixView _B = DFSView(numRowsB, *NRHS, B, *LDB);
DDenseVectorView _WORK = DArrayView(*LWORK, WORK, 1);
ls(trans, _A, _B, _WORK);
}
//-- zgels ---------------------------------------------------------------------
void
LAPACK_DECL(zgels)(const char *TRANS,
const INTEGER *M,
const INTEGER *N,
const INTEGER *NRHS,
DOUBLE_COMPLEX *A,
const INTEGER *LDA,
DOUBLE_COMPLEX *B,
const INTEGER *LDB,
DOUBLE_COMPLEX *WORK,
const INTEGER *LWORK,
INTEGER *INFO)
{
//
// Test the input parameters so that we pass LAPACK error checks
//
const bool lQuery = (*LWORK==0);
const INTEGER mn = std::min(*M, *N);
*INFO = 0;
if (*TRANS!='N' && *TRANS!='T' && *TRANS!='C') {
*INFO = -1;
} else if (*M<0) {
*INFO = -2;
} else if (*N<0) {
*INFO = -3;
} else if (*NRHS<0) {
*INFO = -4;
} else if (*LDA<std::max(INTEGER(1), *M)) {
*INFO = -6;
} else if (*LDB<flens::max(INTEGER(1), *M, *N)) {
*INFO = -8;
} else if (*LWORK<std::max(INTEGER(1), mn+std::max(mn, *NRHS)) && !lQuery) {
*INFO = -10;
}
if (*INFO!=0) {
*INFO = -(*INFO);
LAPACK_ERROR("ZGELS", INFO);
*INFO = -(*INFO);
return;
}
//
// Call FLENS implementation
//
auto zA = reinterpret_cast<CXX_DOUBLE_COMPLEX *>(A);
auto zB = reinterpret_cast<CXX_DOUBLE_COMPLEX *>(B);
auto zWORK = reinterpret_cast<CXX_DOUBLE_COMPLEX *>(WORK);
Transpose trans = convertTo<Transpose>(*TRANS);
ZGeMatrixView _A = ZFSView(*M, *N, zA, *LDA);
const INTEGER numRowsB = std::max(*M,*N);
ZGeMatrixView _B = ZFSView(numRowsB, *NRHS, zB, *LDB);
ZDenseVectorView _WORK = ZArrayView(*LWORK, zWORK, 1);
ls(trans, _A, _B, _WORK);
}
} // extern "C"
} } // namespace lapack, flens
| 29.507692 | 80 | 0.441084 | stip |
521f2233f56e5c7a14f0b1a79a087a2a3e3d21de | 3,399 | cpp | C++ | SDKs/CryCode/3.8.1/GameDll/AnimActionAIAimPose.cpp | amrhead/FireNET | 34d439aa0157b0c895b20b2b664fddf4f9b84af1 | [
"BSD-2-Clause"
] | 4 | 2017-12-18T20:10:16.000Z | 2021-02-07T21:21:24.000Z | SDKs/CryCode/3.7.0/GameDll/AnimActionAIAimPose.cpp | amrhead/FireNET | 34d439aa0157b0c895b20b2b664fddf4f9b84af1 | [
"BSD-2-Clause"
] | null | null | null | SDKs/CryCode/3.7.0/GameDll/AnimActionAIAimPose.cpp | amrhead/FireNET | 34d439aa0157b0c895b20b2b664fddf4f9b84af1 | [
"BSD-2-Clause"
] | 3 | 2019-03-11T21:36:15.000Z | 2021-02-07T21:21:26.000Z | ////////////////////////////////////////////////////////////////////////////
//
// Crytek Engine Source File.
// Copyright (C), Crytek Studios, 2011.
//
////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "AnimActionAIAimPose.h"
#include <ICryAnimation.h>
#include <IAnimationPoseModifier.h>
#include "PlayerAnimation.h"
//////////////////////////////////////////////////////////////////////////
#define MAN_AIAIMPOSE_FRAGMENTS( x ) \
x( AimPose )
#define MAN_AIAIMPOSE_TAGS( x )
#define MAN_AIAIMPOSE_TAGGROUPS( x )
#define MAN_AIAIMPOSE_SCOPES( x )
#define MAN_AIAIMPOSE_CONTEXTS( x )
#define MAN_AIAIMPOSE_CHANGEFRAGMENT_FRAGMENT_TAGS( x )
#define MAN_AIAIMPOSE_FRAGMENT_TAGS( x )
MANNEQUIN_USER_PARAMS( SMannequinAiAimPoseUserParams, MAN_AIAIMPOSE_FRAGMENTS, MAN_AIAIMPOSE_TAGS, MAN_AIAIMPOSE_TAGGROUPS, MAN_AIAIMPOSE_SCOPES, MAN_AIAIMPOSE_CONTEXTS, MAN_AIAIMPOSE_FRAGMENT_TAGS );
//////////////////////////////////////////////////////////////////////////
FragmentID CAnimActionAIAimPose::FindFragmentId( const SAnimationContext& context )
{
const SMannequinAiAimPoseUserParams* pUserParams = GetMannequinUserParams< SMannequinAiAimPoseUserParams >( context );
CRY_ASSERT( pUserParams != NULL );
return pUserParams->fragmentIDs.AimPose;
}
//////////////////////////////////////////////////////////////////////////
CAnimActionAIAimPose::CAnimActionAIAimPose()
: TBase( PP_Lowest, FRAGMENT_ID_INVALID, TAG_STATE_EMPTY, IAction::NoAutoBlendOut | IAction::Interruptable )
{
}
//////////////////////////////////////////////////////////////////////////
void CAnimActionAIAimPose::OnInitialise()
{
const FragmentID fragmentId = FindFragmentId( *m_context );
CRY_ASSERT( fragmentId != FRAGMENT_ID_INVALID );
SetFragment( fragmentId );
}
//////////////////////////////////////////////////////////////////////////
void CAnimActionAIAimPose::Install()
{
TBase::Install();
InitialiseAimPoseBlender();
}
//////////////////////////////////////////////////////////////////////////
void CAnimActionAIAimPose::InitialiseAimPoseBlender()
{
IScope& rootScope = GetRootScope();
ICharacterInstance* pCharacterInstance = rootScope.GetCharInst();
CRY_ASSERT( pCharacterInstance );
if ( ! pCharacterInstance )
{
return;
}
ISkeletonPose* pSkeletonPose = pCharacterInstance->GetISkeletonPose();
CRY_ASSERT( pSkeletonPose );
IAnimationPoseBlenderDir* pPoseBlenderAim = pSkeletonPose->GetIPoseBlenderAim();
CRY_ASSERT( pPoseBlenderAim );
if ( ! pPoseBlenderAim )
{
return;
}
const uint32 aimPoseAnimationLayer = rootScope.GetBaseLayer();
pPoseBlenderAim->SetLayer( aimPoseAnimationLayer );
}
//////////////////////////////////////////////////////////////////////////
IAction::EStatus CAnimActionAIAimPose::Update( float timePassed )
{
TBase::Update( timePassed );
const IScope& rootScope = GetRootScope();
const bool foundNewBestMatchingFragment = rootScope.IsDifferent( m_fragmentID, m_fragTags );
if ( foundNewBestMatchingFragment )
{
SetFragment( m_fragmentID, m_fragTags );
}
return m_eStatus;
}
//////////////////////////////////////////////////////////////////////////
bool CAnimActionAIAimPose::IsSupported( const SAnimationContext& context )
{
const FragmentID fragmentId = FindFragmentId( context );
const bool isSupported = ( fragmentId != FRAGMENT_ID_INVALID );
return isSupported;
} | 28.563025 | 200 | 0.61165 | amrhead |
521f24836e25552823cc789e4c2065d7ebdc20c2 | 4,248 | cpp | C++ | Strings/KMR/KMR.cpp | CStanKonrad/Algorithms | 494d86bc2a9248d71a0f9008d8d678386f9ca906 | [
"MIT"
] | null | null | null | Strings/KMR/KMR.cpp | CStanKonrad/Algorithms | 494d86bc2a9248d71a0f9008d8d678386f9ca906 | [
"MIT"
] | null | null | null | Strings/KMR/KMR.cpp | CStanKonrad/Algorithms | 494d86bc2a9248d71a0f9008d8d678386f9ca906 | [
"MIT"
] | null | null | null | /*
The MIT License (MIT)
Copyright (c) 2016 CStanKonrad
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 <iostream>
#include <algorithm>
#include <string>
#include <assert.h>
const int MAX_INPUT_SIZE = 2097152;
const int LOG2_MAX_INPUT_SIZE = 21;
struct SIdentifier
{
int first = 0;
int second = 0;
int inputId; //position before sorting by <
SIdentifier() {}
SIdentifier(int _first, int _second, int _inputId)
{
first = _first;
second = _second;
inputId = _inputId;
}
bool operator < (const SIdentifier &_b) const
{
if (first < _b.first)
return true;
else if (first > _b.first)
return false;
else
return second < _b.second;
}
bool operator > (const SIdentifier &_b) const
{
if (first > _b.first)
return true;
else if (first < _b.first)
return false;
else
return second > _b.second;
}
};
bool idSort(const SIdentifier &_a, const SIdentifier &_b)
{
return (_a.inputId < _b.inputId);
}
SIdentifier kmr_id[LOG2_MAX_INPUT_SIZE + 1][MAX_INPUT_SIZE + 7];
void calcNewId(int _i, const std::string &_text)
{
bool flag;
int currentId = 0;
for (int j = 0; j + (1<<_i) - 1 < _text.size(); ++j)
{
flag = false;
if (j + 1 + (1<<_i) - 1 < _text.size() && (kmr_id[_i][j + 1].first != kmr_id[_i][j].first || kmr_id[_i][j + 1].second != kmr_id[_i][j].second))
flag = true;
kmr_id[_i][j].first = currentId;
kmr_id[_i][j].second = 0;
if (flag)
++currentId;
}
}
void kmrPreProc(std::string _text)
{
for (unsigned i = 0; i < _text.size(); ++i)
{
kmr_id[0][i] = SIdentifier(_text[i], 0, i);
}
std::sort(kmr_id[0], &kmr_id[0][_text.size()]);
calcNewId(0, _text);
std::sort(kmr_id[0], &kmr_id[0][_text.size()], idSort);
for (int i = 1, j; (1<<i) <= _text.size(); ++i)
{
for (j = 0; j + (1<<i) - 1 < _text.size(); ++j)
{
kmr_id[i][j] = SIdentifier(kmr_id[i - 1][j].first, kmr_id[i - 1][j + (1<<(i - 1))].first, j);
}
std::sort(kmr_id[i], &kmr_id[i][j]);
calcNewId(i, _text);
std::sort(kmr_id[i], &kmr_id[i][j], idSort);
}
}
/* [_b1;_e1] ...; 0 means equal; -1 first is smaller; 1 first is bigger*/
int kmrCompare(int _b1, int _e1, int _b2, int _e2)
{
int len = std::min(_e1 - _b1 + 1, _e2 - _b2 + 1);
int p2 = 0;
while ((1 << (p2 + 1)) <= len)
++p2;
assert(_b1+len-1 - (1 << p2) + 1 >=0 && _b2+len-1 - (1 << p2) + 1 >= 0);
SIdentifier a(kmr_id[p2][_b1].first, kmr_id[p2][_b1+len-1 - (1 << p2) + 1].first, 0);
SIdentifier b(kmr_id[p2][_b2].first, kmr_id[p2][_b2+len-1 - (1 << p2) + 1].first, 0);
if (a < b)
return -1;
else if (a > b)
return 1;
else
{
if (_e1 - _b1 + 1 < _e2 - _b2 + 1)
return -1;
else if (_e1 - _b1 + 1 > _e2 - _b2 + 1)
return 1;
else
return 0;
}
}
std::string pattern, text;
int main()
{
std::cin >> pattern >> text;
std::string combined = pattern + std::string("#") + text;
kmrPreProc(combined);
int howManyOccurr = 0;
for (int i = pattern.size() + 1; i < combined.size(); ++i)
{
if (kmrCompare(0, pattern.size() - 1, i, i + pattern.size() - 1) == 0)
++howManyOccurr;
}
std::cout << howManyOccurr << std::endl;
int t;
std::cin >> t;
for (int i = 0, b1, e1, b2, e2; i < t; ++i)
{
std::cin >> b1 >> e1 >> b2 >> e2;
std::cout << kmrCompare(b1, e1, b2, e2) << std::endl;
}
return 0;
} | 25.745455 | 145 | 0.636064 | CStanKonrad |
5220a2f46152146270b19398bbbf379b739a5e2d | 1,226 | cpp | C++ | sparsewrite.cpp | pibara/blake2pp | 91261a0592e8dd38390d8d86d9f7d2d897d75b17 | [
"BSD-3-Clause"
] | null | null | null | sparsewrite.cpp | pibara/blake2pp | 91261a0592e8dd38390d8d86d9f7d2d897d75b17 | [
"BSD-3-Clause"
] | null | null | null | sparsewrite.cpp | pibara/blake2pp | 91261a0592e8dd38390d8d86d9f7d2d897d75b17 | [
"BSD-3-Clause"
] | null | null | null | #include "mattock-ohash.hpp"
#include <iostream>
template <typename OHash>
std::string sparse(bool skip) {
OHash oh(true); //Writing assuming sparse.
char buf[4096];
for (int index=0;index<4096;index++) {
buf[index]=index%128;
}
for (int index=1024;index<3073;index++) {
buf[index]=0;
}
oh.written_chunk(buf,1024,0); //First part
if (not skip) {
oh.written_chunk(buf+1024,1024,1024); //Second part
oh.written_chunk(buf+2048,1024,2048); //Third part
}
oh.written_chunk(buf+3072,1024,3072); //Last part
oh.done();
return oh.result();
};
template <typename OHash>
bool testsparse() {
return sparse<OHash>(false) == sparse<OHash>(true);
};
int main(int argc,char **argv) {
bool ok=true;
if (testsparse<mattock::ohash_legacy>() == false) {
std::cerr << "Sparsetest failed for legacy." << std::endl;
ok=false;
}
if (testsparse<mattock::ohash_transitional>() == false) {
std::cerr << "Sparsetest failed for transitional." << std::endl;
ok=false;
}
if (testsparse<mattock::ohash>() == false) {
std::cerr << "Sparsetest failed for new." << std::endl;
ok=false;
}
if (ok == false) {
return -1;
}
std::cerr << "OK" << std::endl;
return 0;
}
| 25.020408 | 68 | 0.630506 | pibara |
5221751c7c41914e8388c0db2b91bfcbb5af2852 | 539 | cpp | C++ | software/src/master/src/kernel/Vca_Registry.cpp | c-kuhlman/vision | 46b25f7c0da703c059acc8f0a2eac1d5badf9f6d | [
"BSD-3-Clause"
] | 30 | 2016-10-07T15:23:35.000Z | 2020-03-25T20:01:30.000Z | src/kernel/Vca_Registry.cpp | MichaelJCaruso/vision-software-src-master | 12b1b4f12a7531fe6e3cbb6861b40ac8e1985b92 | [
"BSD-3-Clause"
] | 30 | 2016-10-31T19:48:08.000Z | 2021-04-28T01:31:53.000Z | software/src/master/src/kernel/Vca_Registry.cpp | c-kuhlman/vision | 46b25f7c0da703c059acc8f0a2eac1d5badf9f6d | [
"BSD-3-Clause"
] | 15 | 2016-10-07T16:44:13.000Z | 2021-06-21T18:47:55.000Z | /***** Vca_Registry Implementation *****/
#define Vca_Registry_Implementation
/************************
************************
***** Interfaces *****
************************
************************/
/********************
***** System *****
********************/
#include "Vk.h"
/******************
***** Self *****
******************/
#include "Vca_Registry.h"
/************************
***** Supporting *****
************************/
#include "Vca_CompilerHappyPill.h"
#include "Vca_Registry_VAuthority.h"
| 19.25 | 43 | 0.332096 | c-kuhlman |
522200dba4645d5fd4874e674d965d3a81eb3a0e | 3,505 | cpp | C++ | src/run.cpp | SlausB/fos | 75c647da335925fd5e0bb956acc4db895004fc79 | [
"MIT"
] | null | null | null | src/run.cpp | SlausB/fos | 75c647da335925fd5e0bb956acc4db895004fc79 | [
"MIT"
] | null | null | null | src/run.cpp | SlausB/fos | 75c647da335925fd5e0bb956acc4db895004fc79 | [
"MIT"
] | null | null | null |
#include "run.h"
#include "dispatcher.h"
#include "colonel/colonel.h"
#include "colonel_imp/handlers/exit_h.h"
#include "colonel_imp/handlers/dbstats_h.h"
#include "colonel_imp/handlers/conns_h.h"
#include "colonel_imp/handlers/clients_h.h"
#include "colonel_imp/handlers/seg_fault_h.h"
#include "colonel_imp/requesters/con_req.h"
#include "memdbg_start.h"
namespace fos
{
#ifdef FOS_NO_DB
void Run(MetersFactory* metersFactory,
BatchFactory* batchFactory,
StartingHandler startingHandler,
TickHandler tickHandler,
const double tickPeriod,
ConnectionHandler connectionHandler,
MessageHandler messageHandler,
DisconnectionHandler disconnectionHandler,
ExitingHandler exitingHandler,
int clientsPort,
void* clientData)
{
setlocale(LC_CTYPE, "");
{
Dispatcher dispatcher(metersFactory,
batchFactory,
startingHandler,
tickHandler,
tickPeriod,
connectionHandler,
messageHandler,
disconnectionHandler,
exitingHandler,
clientsPort,
clientData);
ContextLock* contextLock = new ContextLock;
{
Colonel colonel;
Exit_Handler exit_Handler;
colonel.PushHandler(&exit_Handler);
Conns_Handler conns_Handler( dispatcher.AllocateCommonTime() );
colonel.PushHandler(&conns_Handler);
Clients_Handler clients_Handler(&dispatcher);
colonel.PushHandler(&clients_Handler);
SegFault_Handler segFault_Handler;
colonel.PushHandler( &segFault_Handler );
ConsoleRequester consoleRequester(&colonel, Globals::messenger, contextLock);
contextLock->Stop();
}
}
#if defined(WINDOWS) || defined(WIN32) || defined(WIN64)
_CrtDumpMemoryLeaks();
#endif
}
#else
void Run(const char* dbName,
const char* dbLogin,
const char* dbPassword,
MetersFactory* metersFactory,
BatchFactory* batchFactory,
StartingHandler startingHandler,
TickHandler tickHandler,
const double tickPeriod,
ConnectionHandler connectionHandler,
MessageHandler messageHandler,
DisconnectionHandler disconnectionHandler,
ExitingHandler exitingHandler,
int clientsPort,
void* clientData)
{
setlocale(LC_CTYPE, "");
{
Dispatcher dispatcher(dbName,
dbLogin,
dbPassword,
metersFactory,
batchFactory,
startingHandler,
tickHandler,
tickPeriod,
connectionHandler,
messageHandler,
disconnectionHandler,
exitingHandler,
clientsPort,
clientData);
ContextLock* contextLock = new ContextLock;
{
Colonel colonel;
Exit_Handler exit_Handler;
colonel.PushHandler(&exit_Handler);
DBStats_Handler dbStats_Handler(dispatcher.AllocateCommonTime());
colonel.PushHandler(&dbStats_Handler);
Conns_Handler conns_Handler(dispatcher.AllocateCommonTime());
colonel.PushHandler(&conns_Handler);
Clients_Handler clients_Handler(&dispatcher);
colonel.PushHandler(&clients_Handler);
SegFault_Handler segFault_Handler;
colonel.PushHandler( &segFault_Handler );
ConsoleRequester consoleRequester(&colonel, Globals::messenger, contextLock);
contextLock->Stop();
}
}
#if defined(WINDOWS) || defined(WIN32) || defined(WIN64)
_CrtDumpMemoryLeaks();
#endif
}
#endif//#ifdef FOS_NO_DB
}//namespace fos
#include "memdbg_end.h"
| 23.211921 | 81 | 0.689586 | SlausB |
5225bf3849487f746201d0be7fb1f8b312123aa5 | 15,574 | hpp | C++ | Nacro/SDK/FN_EnemyPawn_Parent_parameters.hpp | Milxnor/Nacro | eebabf662bbce6d5af41820ea0342d3567a0aecc | [
"BSD-2-Clause"
] | 11 | 2021-08-08T23:25:10.000Z | 2022-02-19T23:07:22.000Z | Nacro/SDK/FN_EnemyPawn_Parent_parameters.hpp | Milxnor/Nacro | eebabf662bbce6d5af41820ea0342d3567a0aecc | [
"BSD-2-Clause"
] | 1 | 2022-01-01T22:51:59.000Z | 2022-01-08T16:14:15.000Z | Nacro/SDK/FN_EnemyPawn_Parent_parameters.hpp | Milxnor/Nacro | eebabf662bbce6d5af41820ea0342d3567a0aecc | [
"BSD-2-Clause"
] | 8 | 2021-08-09T13:51:54.000Z | 2022-01-26T20:33:37.000Z | #pragma once
// Fortnite (1.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.Orphaned
struct AEnemyPawn_Parent_C_Orphaned_Params
{
bool IsOrphaned; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
class AFortPawn* AttachedPawn; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnRep_SpecialEventHalloweenPumpkinHeadApplied
struct AEnemyPawn_Parent_C_OnRep_SpecialEventHalloweenPumpkinHeadApplied_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SpecialEventHalloweenPumpkinHeadHusk
struct AEnemyPawn_Parent_C_SpecialEventHalloweenPumpkinHeadHusk_Params
{
bool ApplyPumpkinHeadMesh; // (Parm, ZeroConstructor, IsPlainOldData)
bool DebugApplicationOrRemoval_; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SpawnMeshAttachedToCharacter
struct AEnemyPawn_Parent_C_SpawnMeshAttachedToCharacter_Params
{
class UStaticMesh* Static_Mesh; // (Parm, ZeroConstructor, IsPlainOldData)
struct FName Socket_Name; // (Parm, ZeroConstructor, IsPlainOldData)
struct FTransform Relative_Transform; // (Parm, IsPlainOldData)
bool Absolute_Location; // (Parm, ZeroConstructor, IsPlainOldData)
bool Absolute_Rotation; // (Parm, ZeroConstructor, IsPlainOldData)
bool Absolute_Scale; // (Parm, ZeroConstructor, IsPlainOldData)
class UStaticMeshComponent* Static_Mesh_Component_Reference; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.RestorePreviousMaterialOnCharacterMesh
struct AEnemyPawn_Parent_C_RestorePreviousMaterialOnCharacterMesh_Params
{
float Delay_in_Seconds; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.CharacterSpawnInSafetyCheck
struct AEnemyPawn_Parent_C_CharacterSpawnInSafetyCheck_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SetCharacterEyeColors
struct AEnemyPawn_Parent_C_SetCharacterEyeColors_Params
{
struct FLinearColor Eye_Color_Inner; // (Parm, IsPlainOldData)
struct FLinearColor Eye_Color_Outer; // (Parm, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SetCharacterFresnelGlowColors
struct AEnemyPawn_Parent_C_SetCharacterFresnelGlowColors_Params
{
struct FLinearColor Inner_Color; // (Parm, IsPlainOldData)
struct FLinearColor Outer_Color; // (Parm, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SpawnParticleSystemOnCharacterMesh
struct AEnemyPawn_Parent_C_SpawnParticleSystemOnCharacterMesh_Params
{
class UParticleSystem* ParticleSystemTemplate; // (Parm, ZeroConstructor, IsPlainOldData)
class UParticleSystemComponent* ParticleSystemComponentReferenceVar; // (Parm, ZeroConstructor, IsPlainOldData)
struct FName AttachPointName; // (Parm, ZeroConstructor, IsPlainOldData)
struct FVector Location; // (Parm, IsPlainOldData)
struct FRotator Rotation; // (Parm, IsPlainOldData)
TArray<struct FParticleSysParam> InstanceParameters; // (Parm, OutParm, ZeroConstructor, ReferenceParm)
bool AutoActivate; // (Parm, ZeroConstructor, IsPlainOldData)
bool AutoDestroy; // (Parm, ZeroConstructor, IsPlainOldData)
bool AbsoluteLocation; // (Parm, ZeroConstructor, IsPlainOldData)
bool AbsoluteRotation; // (Parm, ZeroConstructor, IsPlainOldData)
bool AbsoluteScale; // (Parm, ZeroConstructor, IsPlainOldData)
class UParticleSystemComponent* PSComponentReference; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OverridePhysicalMaterialOnCharacterMesh
struct AEnemyPawn_Parent_C_OverridePhysicalMaterialOnCharacterMesh_Params
{
class UPhysicalMaterial* Physical_Material_Override; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.DestroyAwokenSkeletalMesh
struct AEnemyPawn_Parent_C_DestroyAwokenSkeletalMesh_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OverrideMaterialAndCopyParametersOnCharacterMesh
struct AEnemyPawn_Parent_C_OverrideMaterialAndCopyParametersOnCharacterMesh_Params
{
class UMaterial* New_Material_To_Apply; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.PlayAdditiveHitReacts
struct AEnemyPawn_Parent_C_PlayAdditiveHitReacts_Params
{
struct FVector Hit_Direction; // (Parm, IsPlainOldData)
class UAnimMontage* Anim_Montage; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SetActiveParticlesOnCharacterMesh
struct AEnemyPawn_Parent_C_SetActiveParticlesOnCharacterMesh_Params
{
bool Active; // (Parm, ZeroConstructor, IsPlainOldData)
bool Reset; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SetScalarParameterOnAllCharacterMIDs
struct AEnemyPawn_Parent_C_SetScalarParameterOnAllCharacterMIDs_Params
{
struct FName Parameter_Name; // (Parm, ZeroConstructor, IsPlainOldData)
float Scalar_Value; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.SetVectorParameterOnAllCharacterMIDs
struct AEnemyPawn_Parent_C_SetVectorParameterOnAllCharacterMIDs_Params
{
struct FName Parameter_Name; // (Parm, ZeroConstructor, IsPlainOldData)
struct FLinearColor Linear_Color; // (Parm, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.PickColorFromAnArrayOfColors
struct AEnemyPawn_Parent_C_PickColorFromAnArrayOfColors_Params
{
TArray<struct FLinearColor> ArrayOfColors; // (Parm, OutParm, ZeroConstructor, ReferenceParm)
struct FLinearColor Color; // (Parm, OutParm, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.StopDeathFX
struct AEnemyPawn_Parent_C_StopDeathFX_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.StopMaterialTimeline
struct AEnemyPawn_Parent_C_StopMaterialTimeline_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.EnemyDeathVisuals
struct AEnemyPawn_Parent_C_EnemyDeathVisuals_Params
{
bool HQ; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.UserConstructionScript
struct AEnemyPawn_Parent_C_UserConstructionScript_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.DeathMaterialParamsTL__FinishedFunc
struct AEnemyPawn_Parent_C_DeathMaterialParamsTL__FinishedFunc_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.DeathMaterialParamsTL__UpdateFunc
struct AEnemyPawn_Parent_C_DeathMaterialParamsTL__UpdateFunc_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.Enemy Spawn Out TL__FinishedFunc
struct AEnemyPawn_Parent_C_Enemy_Spawn_Out_TL__FinishedFunc_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.Enemy Spawn Out TL__UpdateFunc
struct AEnemyPawn_Parent_C_Enemy_Spawn_Out_TL__UpdateFunc_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.EnemySpawnInTL__FinishedFunc
struct AEnemyPawn_Parent_C_EnemySpawnInTL__FinishedFunc_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.EnemySpawnInTL__UpdateFunc
struct AEnemyPawn_Parent_C_EnemySpawnInTL__UpdateFunc_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.EnemySpawnInTL__Spawn__EventFunc
struct AEnemyPawn_Parent_C_EnemySpawnInTL__Spawn__EventFunc_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.ReceiveBeginPlay
struct AEnemyPawn_Parent_C_ReceiveBeginPlay_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnDeathPlayEffects
struct AEnemyPawn_Parent_C_OnDeathPlayEffects_Params
{
float* Damage; // (Parm, ZeroConstructor, IsPlainOldData)
struct FGameplayTagContainer* DamageTags; // (ConstParm, Parm, OutParm, ReferenceParm)
struct FVector* Momentum; // (Parm, IsPlainOldData)
struct FHitResult* HitInfo; // (ConstParm, Parm, OutParm, ReferenceParm, IsPlainOldData)
class AFortPawn** InstigatedBy; // (Parm, ZeroConstructor, IsPlainOldData)
class AActor** DamageCauser; // (Parm, ZeroConstructor, IsPlainOldData)
struct FGameplayEffectContextHandle* EffectContext; // (Parm)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.BeginDeathFX
struct AEnemyPawn_Parent_C_BeginDeathFX_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.PostSpawnIn
struct AEnemyPawn_Parent_C_PostSpawnIn_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.DespawnEnemy
struct AEnemyPawn_Parent_C_DespawnEnemy_Params
{
struct FVector RiftLocationWS; // (Parm, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.DebugEnemySpawnIn
struct AEnemyPawn_Parent_C_DebugEnemySpawnIn_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnFinishedEncounterSpawn
struct AEnemyPawn_Parent_C_OnFinishedEncounterSpawn_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnStartedEncounterSpawn
struct AEnemyPawn_Parent_C_OnStartedEncounterSpawn_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.PawnUniqueIDSet
struct AEnemyPawn_Parent_C_PawnUniqueIDSet_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnDamagePlayEffects
struct AEnemyPawn_Parent_C_OnDamagePlayEffects_Params
{
float* Damage; // (Parm, ZeroConstructor, IsPlainOldData)
struct FGameplayTagContainer* DamageTags; // (ConstParm, Parm, OutParm, ReferenceParm)
struct FVector* Momentum; // (Parm, IsPlainOldData)
struct FHitResult* HitInfo; // (ConstParm, Parm, OutParm, ReferenceParm, IsPlainOldData)
class AFortPawn** InstigatedBy; // (Parm, ZeroConstructor, IsPlainOldData)
class AActor** DamageCauser; // (Parm, ZeroConstructor, IsPlainOldData)
struct FGameplayEffectContextHandle* EffectContext; // (Parm)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.AdditiveHitReactDelay
struct AEnemyPawn_Parent_C_AdditiveHitReactDelay_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnBeginSleepEffects
struct AEnemyPawn_Parent_C_OnBeginSleepEffects_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnEndSleepEffects
struct AEnemyPawn_Parent_C_OnEndSleepEffects_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.RestorePreviousMaterialDelayCompleted
struct AEnemyPawn_Parent_C_RestorePreviousMaterialDelayCompleted_Params
{
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.RestorePreviousMaterialDelay
struct AEnemyPawn_Parent_C_RestorePreviousMaterialDelay_Params
{
float Delay_Amount; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.OnCheatUpdateSpecialEventGE
struct AEnemyPawn_Parent_C_OnCheatUpdateSpecialEventGE_Params
{
bool* bShouldUseSpecialEventGE; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function EnemyPawn_Parent.EnemyPawn_Parent_C.ExecuteUbergraph_EnemyPawn_Parent
struct AEnemyPawn_Parent_C_ExecuteUbergraph_EnemyPawn_Parent_Params
{
int EntryPoint; // (Parm, ZeroConstructor, IsPlainOldData)
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| 50.895425 | 170 | 0.589508 | Milxnor |
5226c84c51392b3591dcbb5a1d94511fc91b275c | 5,709 | cpp | C++ | src/lib/elf/relocation.cpp | epochx64/epochx64 | 15dd18ef0708000c8ac123dc59c8416db4c56e6b | [
"MIT"
] | null | null | null | src/lib/elf/relocation.cpp | epochx64/epochx64 | 15dd18ef0708000c8ac123dc59c8416db4c56e6b | [
"MIT"
] | null | null | null | src/lib/elf/relocation.cpp | epochx64/epochx64 | 15dd18ef0708000c8ac123dc59c8416db4c56e6b | [
"MIT"
] | null | null | null | #include <elf/relocation.h>
namespace elf
{
UINT64 GetSymbolValue(Elf64_Ehdr *ELFHeader, int Table, UINT64 Index)
{
using namespace log;
auto SymbolTableHeader = GetSectionHeader(ELFHeader, Table);
Elf64_Sym *Symbol = &((Elf64_Sym*)((UINT64)ELFHeader + SymbolTableHeader->sh_offset))[Index];
Elf64_Shdr *StringTable = GetSectionHeader(ELFHeader, SymbolTableHeader->sh_link);
auto Name = (char*)((UINT64)ELFHeader + StringTable->sh_offset + Symbol->st_name);
if(Symbol->st_shndx == SHN_UNDEF)
{
kout << "External symbol found: " << Name << "\n";
return 0;
}
else if(Symbol->st_shndx == SHN_ABS)
{
kout << "Absolute symbol found: " << Name << " (value 0x"<<HEX<< Symbol->st_value << ")\n";
return Symbol->st_value;
}
Elf64_Shdr *Target = GetSectionHeader(ELFHeader, Symbol->st_shndx);
UINT64 Value = (UINT64)ELFHeader + Target->sh_offset + Symbol->st_value;
kout << "Internally defined symbol found: " << Name << "\n";
return Value;
}
UINT64 GetProgramSize(Elf64_Ehdr *ELFHeader)
{
/*
* All ELFs must order sections first->last .text->.data->.bss
*/
UINT64 Size = 0;
auto SectionHeaders = (Elf64_Shdr *)((UINT64)ELFHeader + ELFHeader->e_shoff);
for(UINT64 i = 1; i < ELFHeader->e_shnum; i++)
{
Size += SectionHeaders[i].sh_size;
auto iSectionName = GetString(ELFHeader, SectionHeaders[i].sh_name);
if(string::strncmp((unsigned char*)iSectionName, (unsigned char*)".bss", 4))
return SectionHeaders[i].sh_addr + SectionHeaders[i].sh_size;
}
return 0;
}
void ProcessRELA(Elf64_Ehdr *ELFHeader, Elf64_Shdr *RELASection, UINT64 pProgramStart)
{
auto RELAEntries = (Elf64_Rela*)((UINT64)ELFHeader + RELASection->sh_offset);
UINT64 nEntries = RELASection->sh_size / RELASection->sh_entsize;
auto RELALinkedSection = GetSectionHeader(ELFHeader, RELASection->sh_info);
for(UINT64 i = 0; i < nEntries; i++)
{
auto RELAType = ELF64_R_TYPE(RELAEntries[i].r_info);
auto RELALocation = (UINT64*)((UINT64)ELFHeader + RELALinkedSection->sh_offset + RELAEntries[i].r_offset);
auto SymVal = GetSymbolValue(ELFHeader,
RELASection->sh_link,
ELF64_R_SYM(RELAEntries[i].r_info));
log::kout << "RELALocation 0x" <<HEX<< (UINT64)RELALocation << "\n";
if(RELAType == X86_64_64)
*RELALocation = R_X86_64_64(SymVal, RELAEntries[i].r_addend);
if(RELAType == X86_64_PC32)
*(UINT32*)RELALocation = R_X86_64_PC32(SymVal, RELAEntries[i].r_addend, (UINT64)RELALocation);
if(RELAType == X86_64_32S)
*(UINT32*)RELALocation = R_X86_64_32S(SymVal, RELAEntries[i].r_addend);
if(RELAType == X86_64_RELATIVE)
*(UINT64*)RELALocation = R_X86_64_RELATIVE(pProgramStart, RELAEntries[i].r_addend);
log::kout << "Relocation (type 0x" <<HEX<< RELAType << ") applied: 0x" <<HEX<< *RELALocation << "\n";
}
}
void *LoadELF64(Elf64_Ehdr *ELFHeader)
{
UINT64 ProgramSize = GetProgramSize(ELFHeader);
auto SectionHeaders = (Elf64_Shdr *)((UINT64)ELFHeader + ELFHeader->e_shoff);
auto pProgram = KeSysMalloc(ProgramSize);
// Zero out the memory we just allocated
for(UINT64 i = 0; i < ProgramSize; i+=8) *(UINT64*)((UINT64)pProgram + i) = 0;
log::kout << "ELF size: 0x"<<HEX<<ProgramSize << " loaded\n";
for(UINT64 i = 1; i < ELFHeader->e_shnum; i++)
{
auto iSectionName = GetString(ELFHeader, SectionHeaders[i].sh_name);
/*
* linker script must place .bss after all PT_LOAD segments
*/
if(string::strncmp((unsigned char*)iSectionName, (unsigned char*)".bss", 4)) break;
for(UINT64 j = 0; j < SectionHeaders[i].sh_size; j+=8)
{
*(UINT64*)((UINT64)pProgram + SectionHeaders[i].sh_addr + j)
= *(UINT64*)((UINT64)ELFHeader + SectionHeaders[i].sh_offset + j);
}
/*
* Might be useful sometime in the future
*
auto iSectionType = SectionHeaders[i].sh_type;
if(iSectionType == SHT_RELA)
{
ProcessRELA(ELFHeader, &SectionHeaders[i], (UINT64)pProgram);
log::kout << "\n";
}*/
}
return (void*)((UINT64)pProgram + ELFHeader->e_entry);
/*
* This is an alternate way of loading the elf to memory but I opted to use the janky method
* no surprise there
*
* But will keep here in case of unforeseen issues caused by the jank method
auto ProgramHeaders = (Elf64_Phdr *)((UINT64)ELFHeader + ELFHeader->e_phoff);
for(Elf64_Phdr *iProgramHeader = ProgramHeaders;
(UINT64)iProgramHeader < (UINT64)ProgramHeaders + ELFHeader->e_phnum*ELFHeader->e_phentsize;
iProgramHeader = (Elf64_Phdr*)((UINT64)iProgramHeader + ELFHeader->e_phentsize))
{
if(iProgramHeader->p_type != PT_LOAD) continue;
log::kout << "PROGRAMHEADER size 0x" <<HEX<< iProgramHeader->p_filesz << "\n";
for(UINT64 j = 0; j < iProgramHeader->p_filesz; j+=8)
*(UINT64*)((UINT64)pProgram + iProgramHeader->p_vaddr + j) = *(UINT64*)((UINT64)ELFHeader + iProgramHeader->p_offset + j);
}
*/
}
} | 38.836735 | 138 | 0.586267 | epochx64 |
52285d7a96eb64f3068aa46586cd7e88c7aae12b | 1,347 | hpp | C++ | boost/network/uri/uri_concept.hpp | mclow/cpp-netlib | 12c62f7402c585b0619412704db7a3e7280b960c | [
"BSL-1.0"
] | 1 | 2019-06-19T13:42:33.000Z | 2019-06-19T13:42:33.000Z | boost/network/uri/uri_concept.hpp | mclow/cpp-netlib | 12c62f7402c585b0619412704db7a3e7280b960c | [
"BSL-1.0"
] | null | null | null | boost/network/uri/uri_concept.hpp | mclow/cpp-netlib | 12c62f7402c585b0619412704db7a3e7280b960c | [
"BSL-1.0"
] | null | null | null | #ifndef BOOST_NETWORK_URL_URL_CONCEPT_HPP_
#define BOOST_NETWORK_URL_URL_CONCEPT_HPP_
// Copyright 2009 Dean Michael Berris, Jeroen Habraken.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/concept_check.hpp>
namespace boost { namespace network { namespace uri {
template <class U>
struct URI : DefaultConstructible<U>, EqualityComparable<U> {
typedef typename U::string_type string_type;
BOOST_CONCEPT_USAGE(URI)
{
U uri_(uri); // copy constructable
U temp;
swap(temp, uri_); // swappable
string_type scheme_ = scheme(uri); // support functions
string_type user_info_ = user_info(uri);
string_type host_ = host(uri);
uint16_t port_ = port(uri);
port_ = 0;
string_type path_ = path(uri);
string_type query_ = query(uri);
string_type fragment_ = fragment(uri);
bool valid_ = valid(uri);
valid_ = false;
}
private:
U uri;
};
} // namespace uri
} // namespace network
} // namespace boost
#endif
| 27.489796 | 71 | 0.576837 | mclow |
522896c791d85e9a04432d5560ae9b9fe1f5ae0e | 4,063 | cpp | C++ | .emacs.d/cedet/semantic/tests/testsubclass.cpp | littletwolee/emacs-configure | 6fe0f3e99cab1c40de8e32e50740ff5d0d765fa3 | [
"MIT"
] | 6 | 2019-01-06T05:55:47.000Z | 2021-05-28T09:29:58.000Z | .emacs.d/cedet/semantic/tests/testsubclass.cpp | littletwolee/emacs-configure | 6fe0f3e99cab1c40de8e32e50740ff5d0d765fa3 | [
"MIT"
] | null | null | null | .emacs.d/cedet/semantic/tests/testsubclass.cpp | littletwolee/emacs-configure | 6fe0f3e99cab1c40de8e32e50740ff5d0d765fa3 | [
"MIT"
] | 2 | 2015-12-09T19:06:16.000Z | 2021-12-02T14:41:31.000Z | /* Special test file for Semantic Analyzer and complex C++ inheritance.
*/
//#include <iostream>
#include "testsubclass.hh"
void animal::moose::setFeet(int numfeet) //^1^
{
if (numfeet > 4) {
std::cerr << "Why would a moose have more than 4 feet?" << std::endl;
return;
}
fFeet = numfeet;
}
int animal::moose::getFeet() //^2^
{
return fFeet;
}
void animal::moose::doNothing() //^3^
{
animal::moose foo();
fFeet = N// -15-
; // #15# ( "NAME1" "NAME2" "NAME3" )
}
void deer::moose::setAntlers(bool have_antlers) //^4^
{
fAntlers = have_antlers;
}
bool deer::moose::getAntlers() //^5^
// %1% ( ( "testsubclass.cpp" "testsubclass.hh" ) ( "deer::moose::doSomething" "deer::moose::getAntlers" "moose" ) )
{
return fAntlers;
}
bool i_dont_have_symrefs()
// %2% ( ("testsubclass.cpp" ) ("i_dont_have_symrefs"))
{
}
void deer::moose::doSomething() //^6^
{
// All these functions should be identified by semantic analyzer.
getAntlers();
setAntlers(true);
getFeet();
setFeet(true);
doNothing();
fSomeField = true;
fIsValid = true;
}
void deer::alces::setLatin(bool l) {
fLatin = l;
}
bool deer::alces::getLatin() {
return fLatin;
}
void deer::alces::doLatinStuff(moose moosein) {
// All these functions should be identified by semantic analyzer.
getFeet();
setFeet(true);
getLatin();
setLatin(true);
doNothing();
deer::moose foo();
}
moose deer::alces::createMoose()
{
moose MooseVariableName;
bool tmp;
int itmp;
bool fool;
int fast;
MooseVariableName = createMoose();
doLatinStuff(MooseVariableName);
tmp = this.f// -1-
// #1# ( "fAlcesBool" "fIsValid" "fLatin" )
;
itmp = this.f// -2-
// #2# ( "fAlcesInt" "fGreek" "fIsProtectedInt" )
;
tmp = f// -3-
// #3# ( "fAlcesBool" "fIsValid" "fLatin" "fool" )
;
itmp = f// -4-
// #4# ( "fAlcesInt" "fGreek" "fIsProtectedInt" "fast" )
;
MooseVariableName = m// -5-
// #5# ( "moose" )
return MooseVariableName;
}
/** Test Scope Changes
*
* This function is rigged to make sure the scope changes to account
* for different locations in local variable parsing.
*/
int someFunction(int mPickle)
{
moose mMoose = deer::alces::createMoose();
if (mPickle == 1) {
int mOption1 = 2;
m// -5-
// #5# ( "mMoose" "mOption1" "mPickle" )
;
} else {
int mOption2 = 2;
m// -6-
// #6# ( "mMoose" "mOption2" "mPickle" )
;
}
}
// Thanks Ming-Wei Chang for this next example.
namespace pub_priv {
class A{
private:
void private_a(){}
public:
void public_a();
};
void A::public_a() {
A other_a;
other_a.p// -7-
// #7# ( "private_a" "public_a" )
;
}
int some_regular_function(){
A a;
a.p// -8-
// #8# ( "public_a" )
;
return 0;
}
}
/** Test Scope w/in a function (non-method) with classes using
* different levels of inheritance.
*/
int otherFunction()
{
sneaky::antelope Antelope(1);
sneaky::jackalope Jackalope(1);
sneaky::bugalope Bugalope(1);
Antelope.// -9-
// #9# ( "fAntyPublic" "fQuadPublic" "testAccess")
;
Jackalope.// -10-
// #10# ( "fBunnyPublic" "testAccess")
;
Jackalope// @1@ 6
;
Jackalope;
Jackalope;
Jackalope;
Bugalope.// -11-
// #11# ( "fBugPublic" "testAccess")
;
Bugalope// @2@ 3
;
}
/** Test methods within each class for types of access to the baseclass.
*/
bool sneaky::antelope::testAccess() //^7^
{
this.// -12-
// #12# ( "fAntyPrivate" "fAntyProtected" "fAntyPublic" "fQuadProtected" "fQuadPublic" "testAccess" )
;
}
bool sneaky::jackalope::testAccess() //^8^
{
this.// -13-
// #13# ( "fBunnyPrivate" "fBunnyProtected" "fBunnyPublic" "fQuadProtected" "fQuadPublic" "testAccess" )
;
}
bool sneaky::bugalope::testAccess() //^9^
{
this.// -14-
// #14# ( "fBugPrivate" "fBugProtected" "fBugPublic" "fQuadPublic" "testAccess" )
;
}
namespace deer {
moose::moose() : fAntlers(false) //^10^
{
}
moose::~moose() //^11^
{
}
}
| 16.789256 | 116 | 0.592912 | littletwolee |
522b43b15778403761c0c07aa93e0696ad7de1f8 | 8,293 | cpp | C++ | ADApp/pluginSrc/NDPluginScatter.cpp | pheest/ADCore | 66b1352efe93c28b48bce37249f19db40181692a | [
"MIT"
] | 20 | 2015-01-07T09:02:42.000Z | 2021-07-27T14:35:19.000Z | ADApp/pluginSrc/NDPluginScatter.cpp | pheest/ADCore | 66b1352efe93c28b48bce37249f19db40181692a | [
"MIT"
] | 400 | 2015-01-06T14:44:30.000Z | 2022-02-07T17:45:32.000Z | ADApp/pluginSrc/NDPluginScatter.cpp | pheest/ADCore | 66b1352efe93c28b48bce37249f19db40181692a | [
"MIT"
] | 72 | 2015-01-23T23:23:02.000Z | 2022-02-07T15:14:35.000Z | /*
* NDPluginScatter.cpp
*
* Do callback only to next registered client, not to all clients
* Author: Mark Rivers
*
* March 2014.
*/
#include <stdlib.h>
#include <iocsh.h>
#include "NDPluginScatter.h"
#include <epicsExport.h>
static const char *driverName="NDPluginScatter";
/**
* \param[in] pArray The NDArray from the callback.
*/
void NDPluginScatter::processCallbacks(NDArray *pArray)
{
/*
* This function is called with the mutex already locked. It unlocks it during long calculations when private
* structures don't need to be protected.
*/
int arrayCallbacks;
static const char *functionName = "NDPluginScatter::processCallbacks";
/* Call the base class method */
NDPluginDriver::beginProcessCallbacks(pArray);
getIntegerParam(NDArrayCallbacks, &arrayCallbacks);
if (arrayCallbacks == 1) {
NDArray *pArrayOut = this->pNDArrayPool->copy(pArray, NULL, 1);
if (NULL != pArrayOut) {
this->getAttributes(pArrayOut->pAttributeList);
this->unlock();
doNDArrayCallbacks(pArrayOut, NDArrayData, 0);
this->lock();
if (this->pArrays[0]) this->pArrays[0]->release();
this->pArrays[0] = pArrayOut;
}
else {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s::%s: Couldn't allocate output array. Further processing terminated.\n",
driverName, functionName);
}
}
}
/** Called by driver to do the callbacks to the next registered client on the asynGenericPointer interface.
* \param[in] pArray Pointer to the NDArray
* \param[in] reason A client will be called if reason matches pasynUser->reason registered for that client.
* \param[in] address A client will be called if address matches the address registered for that client. */
asynStatus NDPluginScatter::doNDArrayCallbacks(NDArray *pArray, int reason, int address)
{
ELLLIST *pclientList;
interruptNode *pnode;
int addr;
int numNodes;
int i;
//static const char *functionName = "doNDArrayCallbacks";
pasynManager->interruptStart(this->asynStdInterfaces.genericPointerInterruptPvt, &pclientList);
numNodes = ellCount(pclientList);
for (i=0; i<numNodes; i++) {
if (nextClient_ > numNodes) nextClient_ = 1;
pnode = (interruptNode *)ellNth(pclientList, nextClient_);
nextClient_++;
asynGenericPointerInterrupt *pInterrupt = (asynGenericPointerInterrupt *)pnode->drvPvt;
pasynManager->getAddr(pInterrupt->pasynUser, &addr);
/* If this is not a multi-device then address is -1, change to 0 */
if (addr == -1) addr = 0;
if ((pInterrupt->pasynUser->reason != reason) || (address != addr)) continue;
/* Set pasynUser->auxStatus to asynOverflow.
* This is a flag that means return without generating an error if the queue is full.
* We don't set this for the last node because if the last node cannot queue the array
* then the array will be dropped */
pInterrupt->pasynUser->auxStatus = asynOverflow;
if (i == numNodes-1) pInterrupt->pasynUser->auxStatus = asynSuccess;
pInterrupt->callback(pInterrupt->userPvt, pInterrupt->pasynUser, pArray);
if (pInterrupt->pasynUser->auxStatus == asynSuccess) break;
}
pasynManager->interruptEnd(this->asynStdInterfaces.genericPointerInterruptPvt);
return asynSuccess;
}
/** Constructor for NDPluginScatter; most parameters are simply passed to NDPluginDriver::NDPluginDriver.
*
* \param[in] portName The name of the asyn port driver to be created.
* \param[in] queueSize The number of NDArrays that the input queue for this plugin can hold when
* NDPluginDriverBlockingCallbacks=0. Larger queues can decrease the number of dropped arrays,
* at the expense of more NDArray buffers being allocated from the underlying driver's NDArrayPool.
* \param[in] blockingCallbacks Initial setting for the NDPluginDriverBlockingCallbacks flag.
* 0=callbacks are queued and executed by the callback thread; 1 callbacks execute in the thread
* of the driver doing the callbacks.
* \param[in] NDArrayPort Name of asyn port driver for initial source of NDArray callbacks.
* \param[in] NDArrayAddr asyn port driver address for initial source of NDArray callbacks.
* \param[in] maxBuffers The maximum number of NDArray buffers that the NDArrayPool for this driver is
* allowed to allocate. Set this to -1 to allow an unlimited number of buffers.
* \param[in] maxMemory The maximum amount of memory that the NDArrayPool for this driver is
* allowed to allocate. Set this to -1 to allow an unlimited amount of memory.
* \param[in] priority The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
* \param[in] stackSize The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
*/
NDPluginScatter::NDPluginScatter(const char *portName, int queueSize, int blockingCallbacks,
const char *NDArrayPort, int NDArrayAddr,
int maxBuffers, size_t maxMemory,
int priority, int stackSize)
/* Invoke the base class constructor */
: NDPluginDriver(portName, queueSize, blockingCallbacks,
NDArrayPort, NDArrayAddr, 1, maxBuffers, maxMemory,
asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask | asynGenericPointerMask,
asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask | asynGenericPointerMask,
ASYN_MULTIDEVICE, 1, priority, stackSize, 1),
nextClient_(1)
{
//static const char *functionName = "NDPluginScatter::NDPluginScatter";
createParam(NDPluginScatterMethodString, asynParamInt32, &NDPluginScatterMethod);
/* Set the plugin type string */
setStringParam(NDPluginDriverPluginType, "NDPluginScatter");
/* Try to connect to the array port */
connectToArrayPort();
}
/** Configuration command */
extern "C" int NDScatterConfigure(const char *portName, int queueSize, int blockingCallbacks,
const char *NDArrayPort, int NDArrayAddr,
int maxBuffers, size_t maxMemory,
int priority, int stackSize)
{
NDPluginScatter *pPlugin = new NDPluginScatter(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr,
maxBuffers, maxMemory, priority, stackSize);
return pPlugin->start();
}
/* EPICS iocsh shell commands */
static const iocshArg initArg0 = { "portName",iocshArgString};
static const iocshArg initArg1 = { "frame queue size",iocshArgInt};
static const iocshArg initArg2 = { "blocking callbacks",iocshArgInt};
static const iocshArg initArg3 = { "NDArrayPort",iocshArgString};
static const iocshArg initArg4 = { "NDArrayAddr",iocshArgInt};
static const iocshArg initArg5 = { "maxBuffers",iocshArgInt};
static const iocshArg initArg6 = { "maxMemory",iocshArgInt};
static const iocshArg initArg7 = { "priority",iocshArgInt};
static const iocshArg initArg8 = { "stackSize",iocshArgInt};
static const iocshArg * const initArgs[] = {&initArg0,
&initArg1,
&initArg2,
&initArg3,
&initArg4,
&initArg5,
&initArg6,
&initArg7,
&initArg8};
static const iocshFuncDef initFuncDef = {"NDScatterConfigure",9,initArgs};
static void initCallFunc(const iocshArgBuf *args)
{
NDScatterConfigure(args[0].sval, args[1].ival, args[2].ival,
args[3].sval, args[4].ival, args[5].ival,
args[6].ival, args[7].ival, args[8].ival);
}
extern "C" void NDScatterRegister(void)
{
iocshRegister(&initFuncDef,initCallFunc);
}
extern "C" {
epicsExportRegistrar(NDScatterRegister);
}
| 46.072222 | 116 | 0.654769 | pheest |
522c5313aada0e5bea3ce2c4fa782c8bd7db5521 | 292 | cpp | C++ | c++11/understanding-cpp11/chapter4/4-2-7.cpp | cuiwm/choe_lib | 6992c7bf551e7d6d633399b21b028e6873d5e6e8 | [
"MIT"
] | null | null | null | c++11/understanding-cpp11/chapter4/4-2-7.cpp | cuiwm/choe_lib | 6992c7bf551e7d6d633399b21b028e6873d5e6e8 | [
"MIT"
] | null | null | null | c++11/understanding-cpp11/chapter4/4-2-7.cpp | cuiwm/choe_lib | 6992c7bf551e7d6d633399b21b028e6873d5e6e8 | [
"MIT"
] | null | null | null | template<typename T1, typename T2>
double Sum(T1 & t1, T2 & t2) {
auto s = t1 + t2; // s的类型会在模板实例化时被推导出来
return s;
}
int main() {
int a = 3;
long b = 5;
float c = 1.0f, d = 2.3f;
auto e = Sum(a, b); // s的类型被推导为long
auto f = Sum(c, d); // s的类型被推导为float
}
| 19.466667 | 44 | 0.527397 | cuiwm |
5235e52e272885ee0b8bb7f2051006ce4ee424bd | 1,260 | cpp | C++ | BITRURQ.cpp | akshay31057/Competitive-Programming-Repository | bb4e61df348803795d0bf24c11000b2e02ab8cda | [
"MIT"
] | 1 | 2020-10-09T15:07:36.000Z | 2020-10-09T15:07:36.000Z | BITRURQ.cpp | akshay31057/Competitive-Programming-Repository | bb4e61df348803795d0bf24c11000b2e02ab8cda | [
"MIT"
] | null | null | null | BITRURQ.cpp | akshay31057/Competitive-Programming-Repository | bb4e61df348803795d0bf24c11000b2e02ab8cda | [
"MIT"
] | 1 | 2018-10-25T15:07:12.000Z | 2018-10-25T15:07:12.000Z | /**
* Description: BIT RURQ (Support range queries and range updates of 1-D array)
* Usage: query O(lg(N)), update O(lg(N))
* Source: https://github.com/dragonslayerx
*/
// Remember to use 1 based indexing
class BIT {
static const int MAX = 100005;
public:
static long long query(long long *bit, int indx)
{
long long sum = 0;
while (indx) {
sum += bit[indx];
indx -= (indx & -indx);
}
return sum;
}
static void update(long long *bit, int indx, long long x)
{
while (indx < MAX) {
bit[indx] += x;
indx += (indx & -indx);
}
}
};
class BitRPRQ {
static const int MAX = 100005;
long long B1[MAX];
long long B2[MAX];
public:
BitRPRQ() {
memset(B1, 0, sizeof(B1));
memset(B2, 0, sizeof(B2));
}
long long Rquery(int p)
{
long long tempB1 = BIT::query(B1, p);
long long tempB2 = BIT::query(B2, p);
long long sum = tempB1 * p + tempB2;
return sum;
}
long long Rupdate(int l, int r, long long v)
{
BIT::update(B1, l, v);
BIT::update(B1, r+1, -v);
BIT::update(B2, l, -((l-1)*v));
BIT::update(B2, r+1, r*v);
}
}; | 22.105263 | 79 | 0.511111 | akshay31057 |
523c82d598610ed85e251d90b8fb16f630693245 | 2,695 | cpp | C++ | Utilities/Poco/Util/src/ConfigurationView.cpp | nocnokneo/MITK | 2902dcaed2ebf83b08c29d73608e8c70ead9e602 | [
"BSD-3-Clause"
] | null | null | null | Utilities/Poco/Util/src/ConfigurationView.cpp | nocnokneo/MITK | 2902dcaed2ebf83b08c29d73608e8c70ead9e602 | [
"BSD-3-Clause"
] | null | null | null | Utilities/Poco/Util/src/ConfigurationView.cpp | nocnokneo/MITK | 2902dcaed2ebf83b08c29d73608e8c70ead9e602 | [
"BSD-3-Clause"
] | null | null | null | //
// ConfigurationView.cpp
//
// $Id$
//
// Library: Util
// Package: Configuration
// Module: ConfigurationView
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying documentation covered by
// this license (the "Software") to use, reproduce, display, distribute,
// execute, and transmit the Software, and to prepare derivative works of the
// Software, and to permit third-parties to whom the Software is furnished to
// do so, all subject to the following:
//
// The copyright notices in the Software and this entire statement, including
// the above license grant, this restriction and the following disclaimer,
// must be included in all copies of the Software, in whole or in part, and
// all derivative works of the Software, unless such copies or derivative
// works are solely in the form of machine-executable object code generated by
// a source language processor.
//
// 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
#include "Poco/Util/ConfigurationView.h"
namespace Poco {
namespace Util {
ConfigurationView::ConfigurationView(const std::string& prefix, AbstractConfiguration* pConfig):
_prefix(prefix),
_pConfig(pConfig)
{
poco_check_ptr (pConfig);
_pConfig->duplicate();
}
ConfigurationView::~ConfigurationView()
{
_pConfig->release();
}
bool ConfigurationView::getRaw(const std::string& key, std::string& value) const
{
std::string translatedKey = translateKey(key);
return _pConfig->getRaw(translatedKey, value) || _pConfig->getRaw(key, value);
}
void ConfigurationView::setRaw(const std::string& key, const std::string& value)
{
std::string translatedKey = translateKey(key);
_pConfig->setRaw(translatedKey, value);
}
void ConfigurationView::enumerate(const std::string& key, Keys& range) const
{
std::string translatedKey = translateKey(key);
_pConfig->enumerate(translatedKey, range);
}
std::string ConfigurationView::translateKey(const std::string& key) const
{
std::string result = _prefix;
if (!result.empty() && !key.empty()) result += '.';
result += key;
return result;
}
} } // namespace Poco::Util
| 29.615385 | 96 | 0.748052 | nocnokneo |
523f0000c9d1dc3d2d02ba758a52dbd04330f56c | 1,842 | cpp | C++ | cpp/speech/text_to_speech/source/text_to_speech.cpp | ortelio/rapp_beginner_tutorials | 5f770c15bef9906b667dd6a7cb0b12eeccfb37bb | [
"Apache-2.0"
] | null | null | null | cpp/speech/text_to_speech/source/text_to_speech.cpp | ortelio/rapp_beginner_tutorials | 5f770c15bef9906b667dd6a7cb0b12eeccfb37bb | [
"Apache-2.0"
] | null | null | null | cpp/speech/text_to_speech/source/text_to_speech.cpp | ortelio/rapp_beginner_tutorials | 5f770c15bef9906b667dd6a7cb0b12eeccfb37bb | [
"Apache-2.0"
] | null | null | null | /**
* Copyright 2015 RAPP
*
* 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 <rapp/cloud/service_controller.hpp>
#include <rapp/cloud/text_to_speech.hpp>
/*
* \brief Example to recognise words from an audio file with Google
*/
int main()
{
/*
* Construct the platform info setting the hostname/IP, port and authentication token
* Then proceed to create a cloud controller.
* We'll use this object to create cloud calls to the platform.
*/
rapp::cloud::platform info = {"rapp.ee.auth.gr", "9001", "rapp_token"};
rapp::cloud::service_controller ctrl(info);
/*
* Construct a lambda, std::function or bind your own functor.
* In this example we'll pass an inline lambda as the callback.
* All it does is receive a rapp::object::audio and we save it
*/
auto callback = [&](rapp::object::audio audio) {
if (audio.save("audio.wav")) {
std::cout << "File saved" << std::endl;
}
else {
std::cout << "Error: file not save\r\n";
}
};
/*
* We make a call to text_to_speech. We pass words or a sentence
* and it becomes an audio.
* For more information \see rapp::cloud::text_to_speech
*/
ctrl.make_call<rapp::cloud::text_to_speech>("hello world", "en", callback);
return 0;
}
| 34.754717 | 89 | 0.660152 | ortelio |
5240981bf238356625fd7f055df893fd7614289e | 8,415 | hpp | C++ | src/computationalMesh/meshReading/meshReading.hpp | tomrobin-teschner/AIM | 2090cc6be1facee60f1aa9bee924f44d700b5533 | [
"MIT"
] | null | null | null | src/computationalMesh/meshReading/meshReading.hpp | tomrobin-teschner/AIM | 2090cc6be1facee60f1aa9bee924f44d700b5533 | [
"MIT"
] | null | null | null | src/computationalMesh/meshReading/meshReading.hpp | tomrobin-teschner/AIM | 2090cc6be1facee60f1aa9bee924f44d700b5533 | [
"MIT"
] | null | null | null | // This file is part of Artificial-based Incompressibile Methods (AIM), a CFD solver for exact projection
// methods based on hybrid Artificial compressibility and Pressure Projection methods.
// (c) by Tom-Robin Teschner 2021. This file is distribuited under the MIT license.
#pragma once
// c++ include headers
#include <filesystem>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
// third-party include headers
#include "cgnslib.h"
// AIM include headers
#include "src/types/types.hpp"
// concept definition
namespace AIM {
namespace Mesh {
/**
* \class MeshReader
* \brief This class processes a CGNS file from which the mesh properties are read
* \ingroup mesh
*
* This class provides a wrapper around the cgns file format and reads mesh data from these files. The constructor takes
* two arguments, the first being the location of the mesh and the second the dimensionality of the mesh. Then, the user
* can load different aspects from the file. No data is stored in this class and it is the responsibility of the calling
* method to store the data after calling it (i.e. there are no getter or setter methods implemented). The example below
* shows how this class may be used.
*
* \code
* // 2D mesh file
* auto meshReader = AIM::Mesh::MeshReader{std::filesystem::path("path/to/file.cgns"), AIM::Enum::Dimension::Two};
* // 3D mesh file
* auto meshReader = AIM::Mesh::MeshReader{std::filesystem::path("path/to/file.cgns"), AIM::Enum::Dimension::Three};
* ...
* // read coordinates
* auto x = meshReader.readCoordinate<AIM::Enum::Coordinate::X>();
* auto y = meshReader.readCoordinate<AIM::Enum::Coordinate::Y>();
* auto z = meshReader.readCoordinate<AIM::Enum::Coordinate::Z>();
* ...
* // read connectivity table
* auto connectivityTable = meshReader.readConnectivityTable();
* ...
* // read boundary conditions
* auto bc = meshReader.readBoundaryConditions();
* ...
* // read boundary condition connectivity array
* auto bcc = meshReader.readBoundaryConditionConnectivity();
* \endcode
*
* The coordinate arrays require a template index parameter to identify which coordinate to read (i.e x = 0, y = 1, and
* z = 2). This can be circumvented by using a built-in enum to aid documentation, i.e. AIM::Enum::Coordinate::X,
* AIM::Enum::Coordinate::Y or AIM::Enum::Coordinate::Z. It is a one dimensional array of type std::vector<FloatType>
* where FloatType is typically a wrapper around double, but can be set to float in the src/types/types.hpp file.
*
* \code
* // loop over coordinates
* auto x = meshReader.readCoordinate<AIM::Enum::Coordinate::X>();
* for (const auto &c : x)
* std::cout << "coordinate x: " << c << std::endl;
*
* // loop using classical for loop
* for (int i = 0; i < x.size(); ++i)
* std::cout << "coordinate x[" << i << "]: " << x[i] << std::endl;
* \endcode
*
* The connectivity table is a 2D vector with the first index being the number of cells in the mesh and the second index
* being the number of vertices for the current cell type. For example, if we have a mesh with two elements, one tri and
* one quad element, we may have the following structure:
*
* \code
* auto connectivityTable = meshReader.readConnectivityTable();
*
* // first element is a tri element with 3 vertices
* assert(connectivityTable[0].size() == 3);
*
* // second element is a quad element with 4 vertices
* assert(connectivityTable[1].size() == 4);
*
* auto cell_0_vertex_0 = connectivityTable[0][0];
* auto cell_0_vertex_1 = connectivityTable[0][1];
* auto cell_0_vertex_2 = connectivityTable[0][2];
*
* auto cell_1_vertex_0 = connectivityTable[1][0];
* auto cell_1_vertex_1 = connectivityTable[1][1];
* auto cell_1_vertex_2 = connectivityTable[1][2];
* auto cell_1_vertex_3 = connectivityTable[1][3];
* \endcode
*
* The boundary conditions are read into two different arrays. The first will provide information about the type
* and boundary name and is stored in a std::vector<std::pair<int, std::string>>. The first index of the pair is an int
* whose boundary condition can be queried using the build in enums. The second argument is the name of the boundary
* condition assigned at the meshing stage. Example usage:
*
* \code
* auto bc = meshReader.readBoundaryConditions();
*
* for (const auto &boundary : bc) {
* if (boundary.first == AIM::Enum::BoundaryCondition::Wall)
* std::cout << "Wall BC with name: " << boundary.second;
* ...
* // other available types are:
* auto inletBC = AIM::Enum::BoundaryCondition::Inlet;
* auto outletBC = AIM::Enum::BoundaryCondition::Outlet;
* auto symmetryBC = AIM::Enum::BoundaryCondition::Symmetry;
*
* // see src/types/enums.hpp for a full list of supported boundary conditions
* }
* \endcode
*
* The second part of the boundary condition readings provide the elements that are connected to each boundary condition
* read above. For each boundary condition, we have a std::vector that provides us with the element indices attached to
* that boundary condition. Example usage:
*
* \code
* auto bc = meshReader.readBoundaryConditions();
* auto bcc = meshReader.readBoundaryConditionConnectivity();
*
* assert(bc.size() == bcc.size() && "Boundary condition info and connectivity must have the same size");
*
* for (int i = 0; i < bcc.size(); ++i) {
* std::cout << "Elements connected to " << bc[i].second << " are: ";
* for (const auto& e : bcc[i])
* std::cout << e << " ";
* std::cout << std::endl;
* }
* \endcode
*/
class MeshReader {
/// \name Custom types used in this class
/// @{
public:
using CoordinateType = typename std::vector<AIM::Types::FloatType>;
using ConnectivityTableType = typename std::vector<std::vector<AIM::Types::UInt>>;
using BoundaryConditionType = typename std::vector<std::pair<int, std::string>>;
using BoundaryConditionConnectivityType = typename std::vector<std::vector<AIM::Types::CGNSInt>>;
/// @}
/// \name Constructors and destructors
/// @{
public:
MeshReader(short int dimensions);
~MeshReader();
/// @}
/// \name API interface that exposes behaviour to the caller
/// @{
public:
template <int Index>
auto readCoordinate() -> CoordinateType;
auto readConnectivityTable() -> ConnectivityTableType;
auto readBoundaryConditions() -> BoundaryConditionType;
auto readBoundaryConditionConnectivity() -> BoundaryConditionConnectivityType;
/// @}
/// \name Getters and setters
/// @{
public:
auto getDimensions() const -> short int { return dimensions_; }
/// @}
/// \name Overloaded operators
/// @{
/// @}
/// \name Private or protected implementation details, not exposed to the caller
/// @{
private:
auto readParameters() -> void;
auto getNumberOfBases() -> AIM::Types::UInt;
auto getNumberOfZones() -> AIM::Types::UInt;
auto getNumberOfVertices() -> AIM::Types::UInt;
auto getNumberOfCells() -> AIM::Types::UInt;
auto getNumberOfSections() -> AIM::Types::UInt;
auto getNumberOfBoundaryConditions() -> AIM::Types::UInt;
auto getNumberOfFamilies() -> AIM::Types::UInt;
auto getCellType(AIM::Types::UInt section) -> CGNS_ENUMT(ElementType_t);
auto addCurrentCellTypeToConnectivityTable(
AIM::Types::UInt section, AIM::Types::UInt numberOfVerticesPerCell, ConnectivityTableType& connectivity) -> void;
auto getNumberOfConnectivitiesForCellType(AIM::Types::UInt section, AIM::Types::UInt numVerticesPerCell)
-> AIM::Types::UInt;
auto writeConnectivityTable(AIM::Types::UInt section, AIM::Types::UInt elementSize,
AIM::Types::UInt numberOfVerticesPerCell, ConnectivityTableType& connectivity) -> void;
auto getCurrentBoundaryType(AIM::Types::UInt boundary)
-> std::tuple<CGNS_ENUMT(BCType_t), std::string, AIM::Types::UInt>;
auto getCurrentFamilyType(AIM::Types::UInt boundary) -> CGNS_ENUMT(BCType_t);
auto writeBoundaryConnectivityIntoArray(AIM::Types::UInt boundary, BoundaryConditionConnectivityType& bcc) -> void;
/// @}
/// \name Encapsulated data (private or protected variables)
/// @{
private:
const short int dimensions_{0};
std::filesystem::path meshFile_{""};
int fileIndex_{0};
AIM::Types::UInt numberOfVertices_{0};
AIM::Types::UInt numberOfCells_{0};
AIM::Types::UInt numberOfBCs_{0};
AIM::Types::UInt numberOfFamilies_{0};
/// @}
};
} // namespace Mesh
} // end namespace AIM
#include "meshReading.tpp" | 39.507042 | 120 | 0.706239 | tomrobin-teschner |
5243eb71583b16949d662fa38df0917d621d6c3a | 1,413 | cpp | C++ | experiments/nrf24receiver/src/main.cpp | chacal/arduino | 6b77e59138a36d0627ab6f529e6f2ea7e65bcdfd | [
"Apache-2.0"
] | 4 | 2016-12-10T13:20:52.000Z | 2019-10-25T19:47:44.000Z | experiments/nrf24receiver/src/main.cpp | chacal/arduino | 6b77e59138a36d0627ab6f529e6f2ea7e65bcdfd | [
"Apache-2.0"
] | null | null | null | experiments/nrf24receiver/src/main.cpp | chacal/arduino | 6b77e59138a36d0627ab6f529e6f2ea7e65bcdfd | [
"Apache-2.0"
] | 1 | 2019-05-03T17:31:38.000Z | 2019-05-03T17:31:38.000Z | #include <Arduino.h>
#include <SPI.h>
#include <power.h>
#include "RF24.h"
#include <printf.h>
#define NRF_CE 9 // Chip Enbale pin for NRF radio
#define NRF_CSN 10 // SPI Chip Select for NFR radio
void initializeNrfRadio();
RF24 nrf(NRF_CE, NRF_CSN);
uint8_t address[6] = "1Node";
uint8_t rcvbuf[40];
unsigned long prev;
void setup() {
Serial.begin(115200);
printf_begin();
initializeNrfRadio();
nrf.startListening();
}
void loop() {
if (nrf.available()) {
uint8_t len;
while (nrf.available())
{
// Fetch the payload, and see if this was the last one.
len = nrf.getDynamicPayloadSize();
nrf.read(rcvbuf, len);
if(len > 4) {
break;
}
unsigned long cur = *(unsigned long*)rcvbuf;
// Spew it
printf("Got payload size=%i value=%ld\n", len, cur);
if(cur - prev > 1) {
printf("Missed packet! %ld\n", cur);
}
prev = cur;
nrf.writeAckPayload(1, &prev, sizeof(prev));
}
}
}
void initializeNrfRadio() {
nrf.begin();
nrf.setPALevel(RF24_PA_MAX);
nrf.setDataRate(RF24_2MBPS);
nrf.setPayloadSize(32);
nrf.enableDynamicPayloads();
nrf.enableAckPayload();
nrf.openReadingPipe(1, address);
// Use auto ACKs to avoid sleeping between radio transmissions
nrf.setAutoAck(true);
nrf.setRetries(5, 15); // Retry every 1ms for maximum of 3ms + send times (~1ms)
}
| 21.089552 | 83 | 0.62845 | chacal |
524402f2959773a724d40a8cdf1f45393030bac8 | 5,073 | cpp | C++ | lib/src/cyber/parse.cpp | yuri-sevatz/cyberpunk-cpp | b0c9a95c012660bfd21c24ac3a69287330d3b3bd | [
"BSD-2-Clause"
] | 5 | 2021-06-12T10:29:58.000Z | 2022-03-03T13:21:57.000Z | lib/src/cyber/parse.cpp | yuri-sevatz/cyber_breach | b0c9a95c012660bfd21c24ac3a69287330d3b3bd | [
"BSD-2-Clause"
] | null | null | null | lib/src/cyber/parse.cpp | yuri-sevatz/cyber_breach | b0c9a95c012660bfd21c24ac3a69287330d3b3bd | [
"BSD-2-Clause"
] | 1 | 2021-02-21T09:45:37.000Z | 2021-02-21T09:45:37.000Z | #ifdef _WIN32
#include <io.h>
#endif
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <boost/algorithm/hex.hpp>
#include <opencv2/text/ocr.hpp>
#include <cyber/layout.hpp>
#include <cyber/parse.hpp>
namespace {
matrix_type parse_matrix(cv::text::OCRTesseract & ocr, cv::Mat image, matrix_length_type matrix_length) {
matrix_type matrix(boost::extents[matrix_length][matrix_length]);
// The position of the matrix left border
const cv::Point matrix_cell_begin(
matrix_border_topcenter.x - (matrix_cell_size.width / 2) * matrix_length + 2,
matrix_border_topcenter.y + matrix_margin_topleft.height
);
// The vector between the first cell and the ith + 1 cell
const cv::Size matrix_cell_step(
matrix_cell_size.width + matrix_cell_padding.width,
matrix_cell_size.height + matrix_cell_padding.height
);
for (int row = 0; row != matrix_length; ++row) {
for(int col = 0; col != matrix_length; ++col) {
const cv::Rect cell_rect = cv::Rect(
matrix_cell_begin.x + col * matrix_cell_step.width,
matrix_cell_begin.y + row * matrix_cell_step.height,
matrix_cell_size.width,
matrix_cell_size.height
);
const cv::Mat cell = image(cell_rect);
cv::Mat bitwise_not;
cv::bitwise_not(cell, bitwise_not);
std::string output_text;
ocr.run(bitwise_not, output_text);
output_text.erase(std::remove_if(output_text.begin(), output_text.end(), [](char x){return std::isspace(x);}), output_text.end());
if (output_text.size() % 2 == 0) {
std::string bytes = boost::algorithm::unhex(output_text);
if (bytes.size() == 1) {
matrix[row][col] = static_cast<byte_type>(bytes.front());
}
}
}
}
return matrix;
}
sequences_type parse_sequences(cv::text::OCRTesseract & ocr, cv::Mat image, matrix_length_type matrix_length, sequence_lengths_type sequence_lengths) {
sequences_type sequences(sequence_lengths.size());
// The position of the matrix right border
const int matrix_border_right = matrix_margin_bottomright.width + matrix_border_topcenter.x + (matrix_length * matrix_cell_size.width) / 2;
// The position of the sequences left border
const int sequences_border_left = matrix_border_right + sequences_border_matrix_left_offset;
// The coordinate of the first cell
const cv::Point sequence_cell_begin(
sequences_border_left + sequences_margin_topleft.width,
sequences_border_top + sequences_margin_topleft.height
);
// The vector between the first cell and the ith + 1 cell
const cv::Size sequence_cell_step(
sequence_cell_size.width + sequence_cell_padding.width,
sequence_cell_size.height + sequence_cell_padding.height
);
// For each known cell in the row
for (int row = 0; row != sequence_lengths.size(); ++row) {
sequences[row].resize(sequence_lengths[row]);
for(int col = 0; col != sequence_lengths[row]; ++col) {
const cv::Rect cell_rect(
sequence_cell_begin.x + col * sequence_cell_step.width,
sequence_cell_begin.y + row * sequence_cell_step.height,
sequence_cell_size.width,
sequence_cell_size.height
);
const cv::Mat cell = image(cell_rect);
cv::Mat bitwise_not;
cv::bitwise_not(cell, bitwise_not);
cv::Mat grayscale;
cv::cvtColor(bitwise_not, grayscale, cv::COLOR_BGR2GRAY);
cv::Mat enhance;
cv::adaptiveThreshold(grayscale, enhance, 255, cv::ADAPTIVE_THRESH_GAUSSIAN_C, cv::THRESH_BINARY, 3, 10);
std::string output_text;
ocr.run(enhance, output_text);
output_text.erase(std::remove_if(output_text.begin(), output_text.end(), [](char x){return std::isspace(x);}), output_text.end());
if (output_text.size() % 2 == 0) {
std::string bytes = boost::algorithm::unhex(output_text);
if (bytes.size() == 1) {
sequences[row][col] = static_cast<byte_type>(bytes.front());
}
}
}
}
return sequences;
}
} // namespace
parsed_type parse(cv::Mat image, matrix_length_type matrix_length, sequence_lengths_type sequence_lengths) {
const int old = ::dup(2);
FILE * file;
#ifdef _WIN32
::fopen_s(&file, "nul", "w");
#else
file = ::fopen("/dev/null", "w");
#endif
::dup2(::fileno(file), 2);
auto ocr = cv::text::OCRTesseract::create(NULL, "Latin", "0123456789ABCDEF", cv::text::OEM_DEFAULT, cv::text::PSM_SINGLE_BLOCK);
const parsed_type result {
parse_matrix(*ocr, image, matrix_length),
parse_sequences(*ocr, image, matrix_length, sequence_lengths)
};
ocr.reset();
::fflush(stderr);
::fclose(file);
::dup2(old, 2);
return result;
}
| 34.277027 | 151 | 0.631382 | yuri-sevatz |
5248a9267eb09f75ad898a6faead5b4f3934d5f8 | 666 | cpp | C++ | ch02/build_in_types.cpp | imshenzhuo/CppPrimer | 87c74c0a36223e86571c2aedd9da428c06b04f4d | [
"CC0-1.0"
] | 3 | 2019-09-21T13:03:57.000Z | 2020-04-05T02:42:53.000Z | ch02/build_in_types.cpp | imshenzhuo/CppPrimer | 87c74c0a36223e86571c2aedd9da428c06b04f4d | [
"CC0-1.0"
] | null | null | null | ch02/build_in_types.cpp | imshenzhuo/CppPrimer | 87c74c0a36223e86571c2aedd9da428c06b04f4d | [
"CC0-1.0"
] | null | null | null | /*************************************************************************
> File Name: build_in_types.cpp
> Author: ma6174
> Mail: [email protected]
> Created Time: 2019年08月26日 星期一 09时54分25秒
************************************************************************/
#include<iostream>
using namespace std;
int main()
{
cout<<sizeof(bool)<<endl;
cout<<sizeof(char)<<endl;
cout<<sizeof(signed char)<<endl;
cout<<sizeof(unsigned char)<<endl;
cout<<sizeof(short)<<endl;
cout<<sizeof(int)<<endl;
cout<<sizeof(long)<<endl;
cout<<sizeof(long long)<<endl;
cout<<sizeof(float)<<endl;
cout<<sizeof(double)<<endl;
cout<<sizeof(long double)<<endl;
}
| 26.64 | 74 | 0.527027 | imshenzhuo |
524b177fb74d415d855d19cebdeca29a669facf1 | 546 | cc | C++ | src/cpu/hamaji/util.cc | puyoai/puyoai | 575068dffab021cd42b0178699d480a743ca4e1f | [
"CC-BY-4.0"
] | 115 | 2015-02-21T15:08:26.000Z | 2022-02-05T01:38:10.000Z | src/cpu/hamaji/util.cc | haripo/puyoai | 575068dffab021cd42b0178699d480a743ca4e1f | [
"CC-BY-4.0"
] | 214 | 2015-01-16T04:53:35.000Z | 2019-03-23T11:39:59.000Z | src/cpu/hamaji/util.cc | haripo/puyoai | 575068dffab021cd42b0178699d480a743ca4e1f | [
"CC-BY-4.0"
] | 56 | 2015-01-16T05:14:13.000Z | 2020-09-22T07:22:49.000Z | #include "util.h"
#include <stdio.h>
#include <stdarg.h>
string ssprintf(const char* fmt, ...) {
va_list ap;
va_start(ap, fmt);
char buf[4097];
int len = vsnprintf(buf, 4096, fmt, ap);
buf[len] = '\0';
va_end(ap);
return buf;
}
void split(const string& str, const string& delim, vector<string>* output) {
size_t prev = 0;
while (true) {
size_t found = str.find(delim, prev);
output->push_back(str.substr(prev, found - prev));
if (found == string::npos) {
break;
}
prev = found + delim.size();
}
}
| 20.222222 | 76 | 0.604396 | puyoai |
524eaf36a35357f069d8871bb54c4172835435c2 | 5,574 | cc | C++ | generated/aisClassBPositionReport.cc | rkuris/n2klib | e465a8f591d135d2e632186309d69a28ff7c9c4e | [
"MIT"
] | null | null | null | generated/aisClassBPositionReport.cc | rkuris/n2klib | e465a8f591d135d2e632186309d69a28ff7c9c4e | [
"MIT"
] | null | null | null | generated/aisClassBPositionReport.cc | rkuris/n2klib | e465a8f591d135d2e632186309d69a28ff7c9c4e | [
"MIT"
] | null | null | null | // class AisClassBPositionReport
// Automatically generated by mkmsgs - DO NOT EDIT
// Description: AIS Class B Position Report
#include "../n2k.h"
namespace n2k {
class AisClassBPositionReport : public Message {
public:
enum class RepeatIndicator:unsigned char {
Initial = 0,
First_retransmission = 1,
Second_retransmission = 2,
Final_retransmission = 3
};
enum class PositionAccuracy:unsigned char {
Low = 0,
High = 1
};
enum class Raim:unsigned char {
not_in_use = 0,
in_use = 1
};
enum class TimeStamp:unsigned char {
Not_available = 60,
Manual_input_mode = 61,
Dead_reckoning_mode = 62,
Positioning_system_is_inoperative = 63
};
enum class AisTransceiverInformation:unsigned char {
Channel_A_VDL_reception = 0,
Channel_B_VDL_reception = 1,
Channel_A_VDL_transmission = 2,
Channel_B_VDL_transmission = 3,
Own_information_not_broadcast = 4,
Reserved = 5
};
enum class UnitType:unsigned char {
SOTDMA = 0,
CS = 1
};
enum class IntegratedDisplay:unsigned char {
No = 0,
Yes = 1
};
enum class Dsc:unsigned char {
No = 0,
Yes = 1
};
enum class Band:unsigned char {
top_525_kHz_of_marine_band = 0,
entire_marine_band = 1
};
enum class CanHandleMsg22:unsigned char {
No = 0,
Yes = 1
};
enum class AisMode:unsigned char {
Autonomous = 0,
Assigned = 1
};
enum class AisCommunicationState:unsigned char {
SOTDMA = 0,
ITDMA = 1
};
AisClassBPositionReport() {};
AisClassBPositionReport(const Message &m) : Message(m) {};
void setMessageId(unsigned char value) { Set(value,0,6); }
unsigned char getMessageId() const { return Get(0,6); };
void setRepeatIndicator(RepeatIndicator value) { Set((unsigned char)value,6,2); }
RepeatIndicator getRepeatIndicator() const { return (RepeatIndicator)Get(6,2); };
void setUserId(unsigned long value) { Set(value,8,32); }
unsigned long getUserId() const { return Get(8,32); };
void setLongitude(double value) { Set(value/1E-07,40,32); }
double getLongitude() const { return 1E-07 * Get(40,32); };
void setLatitude(double value) { Set(value/1E-07,72,32); }
double getLatitude() const { return 1E-07 * Get(72,32); };
void setPositionAccuracy(PositionAccuracy value) { Set((unsigned char)value,104,1); }
PositionAccuracy getPositionAccuracy() const { return (PositionAccuracy)Get(104,1); };
void setRaim(Raim value) { Set((unsigned char)value,105,1); }
Raim getRaim() const { return (Raim)Get(105,1); };
void setTimeStamp(TimeStamp value) { Set((unsigned char)value,106,6); }
TimeStamp getTimeStamp() const { return (TimeStamp)Get(106,6); };
void setCogRadians(double value) { Set(value/0.0001,112,16); }
double getCogRadians() const { return 0.0001 * Get(112,16); }
void setCogDegrees(double value) { Set(value/0.00572958,112,16); }
double getCogDegrees() const { return 0.00572958 * Get(112,16); };
void setSogMetersPerSecond(double value) { Set(value/0.01,128,16); }
double getSogMetersPerSecond() const { return 0.01 * Get(128,16); }
void setSogKnots(double value) { Set(value/0.0194384,128,16); }
double getSogKnots() const { return 0.0194384 * Get(128,16); };
void setCommunicationState(unsigned long value) { Set(value,144,19); }
unsigned long getCommunicationState() const { return Get(144,19); };
void setAisTransceiverInformation(AisTransceiverInformation value) { Set((unsigned char)value,163,5); }
AisTransceiverInformation getAisTransceiverInformation() const { return (AisTransceiverInformation)Get(163,5); };
void setHeadingRadians(double value) { Set(value/0.0001,168,16); }
double getHeadingRadians() const { return 0.0001 * Get(168,16); }
void setHeadingDegrees(double value) { Set(value/0.00572958,168,16); }
double getHeadingDegrees() const { return 0.00572958 * Get(168,16); };
void setRegionalApplication(unsigned char value) { Set(value,184,8); }
unsigned char getRegionalApplication() const { return Get(184,8); };
void setRegionalApplication_1(unsigned char value) { Set(value,192,2); }
unsigned char getRegionalApplication_1() const { return Get(192,2); };
void setUnitType(UnitType value) { Set((unsigned char)value,194,1); }
UnitType getUnitType() const { return (UnitType)Get(194,1); };
void setIntegratedDisplay(IntegratedDisplay value) { Set((unsigned char)value,195,1); }
IntegratedDisplay getIntegratedDisplay() const { return (IntegratedDisplay)Get(195,1); };
void setDsc(Dsc value) { Set((unsigned char)value,196,1); }
Dsc getDsc() const { return (Dsc)Get(196,1); };
void setBand(Band value) { Set((unsigned char)value,197,1); }
Band getBand() const { return (Band)Get(197,1); };
void setCanHandleMsg22(CanHandleMsg22 value) { Set((unsigned char)value,198,1); }
CanHandleMsg22 getCanHandleMsg22() const { return (CanHandleMsg22)Get(198,1); };
void setAisMode(AisMode value) { Set((unsigned char)value,199,1); }
AisMode getAisMode() const { return (AisMode)Get(199,1); };
void setAisCommunicationState(AisCommunicationState value) { Set((unsigned char)value,200,1); }
AisCommunicationState getAisCommunicationState() const { return (AisCommunicationState)Get(200,1); };
static const pgn_t PGN = 129039;
static const PGNType Type = PGNType::Fast;
pgn_t getPGN() const { return PGN; }
};
}
| 41.597015 | 117 | 0.678507 | rkuris |
52553b6f38c3f8ee78eaaa8614d9030dea1b79c4 | 1,916 | cpp | C++ | animation/viewComponent/picScaleComp.cpp | seaCheng/animation- | 89a0cb0efbcfea202965a5851979ae6f1b67f8f0 | [
"BSD-3-Clause"
] | 6 | 2021-12-08T03:09:47.000Z | 2022-02-24T03:51:14.000Z | animation/viewComponent/picScaleComp.cpp | seaCheng/animation- | 89a0cb0efbcfea202965a5851979ae6f1b67f8f0 | [
"BSD-3-Clause"
] | null | null | null | animation/viewComponent/picScaleComp.cpp | seaCheng/animation- | 89a0cb0efbcfea202965a5851979ae6f1b67f8f0 | [
"BSD-3-Clause"
] | null | null | null | #include "picScaleComp.h"
#include <QLabel>
#include <QHBoxLayout>
#include "aspectRatioPixmapLabel.h"
#include "pictureItem.h"
#include "pictureItemcontroller.h"
PicScaleComp::PicScaleComp(PictureItem* item, QWidget *parent)
:QFrame(parent),
m_item(item), m_controller(std::make_unique<PictureItemController>(item, this))
{
initial();
}
void PicScaleComp::paintEvent(QPaintEvent *event)
{
QFrame::paintEvent(event);
}
void PicScaleComp::mouseReleaseEvent(QMouseEvent *ev)
{
QFrame::mouseReleaseEvent(ev);
emit s_clicked();
}
void PicScaleComp::setPicIndexInterval(QString index, QString interval)
{
m_labelLeft->setText(index);
m_labelRight->setText(interval);
}
void PicScaleComp::setPic(QPixmap pic)
{
m_lPic->setPixmapLabel(pic);
}
void PicScaleComp::initial()
{
setObjectName("PicScaleComp");
m_frameBottom = new QFrame();
m_frameBottom->setFrameShape(NoFrame);
m_frameBottom->setLineWidth(0);
m_frameBottom->setFixedHeight(40);
m_layout = new QVBoxLayout(this);
m_layout->setContentsMargins(12,12,12,5);
m_layout->setSpacing(0);
m_labelLeft = new QLabel();
m_labelLeft->setAlignment(Qt::AlignCenter);
m_labelLeft->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_labelRight = new QLabel();
m_labelRight->setAlignment(Qt::AlignCenter);
m_labelRight->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
QHBoxLayout * layout = new QHBoxLayout();
layout->setContentsMargins(0,0,0,0);
layout->setSpacing(0);
m_frameBottom->setLayout(layout);
layout->addWidget(m_labelLeft);
layout->addWidget(m_labelRight);
m_lPic = new AspectRatioPixmapLabel();
m_lPic->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_layout->addWidget(m_lPic);
m_layout->addWidget(m_frameBottom);
}
PictureItem* PicScaleComp::getPictureItem()
{
return m_item;
}
| 25.210526 | 83 | 0.730167 | seaCheng |
525a74659773292687da9bb529964f25e41707ee | 4,862 | cpp | C++ | libnaucrates/src/md/CMDIdScCmp.cpp | khannaekta/gporca | 94e509d0a2456851a2cabf02e933c3523946b87b | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-03-05T10:08:56.000Z | 2019-03-05T10:08:56.000Z | libnaucrates/src/md/CMDIdScCmp.cpp | khannaekta/gporca | 94e509d0a2456851a2cabf02e933c3523946b87b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | libnaucrates/src/md/CMDIdScCmp.cpp | khannaekta/gporca | 94e509d0a2456851a2cabf02e933c3523946b87b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | //---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2013 EMC Corp.
//
// @filename:
// CMDIdScCmp.cpp
//
// @doc:
// Implementation of mdids for scalar comparisons functions
//---------------------------------------------------------------------------
#include "naucrates/md/CMDIdScCmp.h"
#include "naucrates/dxl/xml/CXMLSerializer.h"
using namespace gpos;
using namespace gpmd;
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::CMDIdScCmp
//
// @doc:
// Ctor
//
//---------------------------------------------------------------------------
CMDIdScCmp::CMDIdScCmp
(
CMDIdGPDB *pmdidLeft,
CMDIdGPDB *pmdidRight,
IMDType::ECmpType ecmpt
)
:
m_pmdidLeft(pmdidLeft),
m_pmdidRight(pmdidRight),
m_ecmpt(ecmpt),
m_str(m_wszBuffer, GPOS_ARRAY_SIZE(m_wszBuffer))
{
GPOS_ASSERT(pmdidLeft->FValid());
GPOS_ASSERT(pmdidRight->FValid());
GPOS_ASSERT(IMDType::EcmptOther != ecmpt);
GPOS_ASSERT(pmdidLeft->Sysid().FEquals(pmdidRight->Sysid()));
// serialize mdid into static string
Serialize();
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::~CMDIdScCmp
//
// @doc:
// Dtor
//
//---------------------------------------------------------------------------
CMDIdScCmp::~CMDIdScCmp()
{
m_pmdidLeft->Release();
m_pmdidRight->Release();
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::Serialize
//
// @doc:
// Serialize mdid into static string
//
//---------------------------------------------------------------------------
void
CMDIdScCmp::Serialize()
{
// serialize mdid as SystemType.mdidLeft;mdidRight;CmpType
m_str.AppendFormat
(
GPOS_WSZ_LIT("%d.%d.%d.%d;%d.%d.%d;%d"),
Emdidt(),
m_pmdidLeft->OidObjectId(),
m_pmdidLeft->UlVersionMajor(),
m_pmdidLeft->UlVersionMinor(),
m_pmdidRight->OidObjectId(),
m_pmdidRight->UlVersionMajor(),
m_pmdidRight->UlVersionMinor(),
m_ecmpt
);
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::Wsz
//
// @doc:
// Returns the string representation of the mdid
//
//---------------------------------------------------------------------------
const WCHAR *
CMDIdScCmp::Wsz() const
{
return m_str.Wsz();
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::PmdidLeft
//
// @doc:
// Returns the source type id
//
//---------------------------------------------------------------------------
IMDId *
CMDIdScCmp::PmdidLeft() const
{
return m_pmdidLeft;
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::PmdidRight
//
// @doc:
// Returns the destination type id
//
//---------------------------------------------------------------------------
IMDId *
CMDIdScCmp::PmdidRight() const
{
return m_pmdidRight;
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::UlHash
//
// @doc:
// Computes the hash value for the metadata id
//
//---------------------------------------------------------------------------
ULONG
CMDIdScCmp::UlHash() const
{
return gpos::UlCombineHashes
(
Emdidt(),
gpos::UlCombineHashes(m_pmdidLeft->UlHash(), m_pmdidRight->UlHash())
);
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::FEquals
//
// @doc:
// Checks if the mdids are equal
//
//---------------------------------------------------------------------------
BOOL
CMDIdScCmp::FEquals
(
const IMDId *pmdid
)
const
{
if (NULL == pmdid || EmdidScCmp != pmdid->Emdidt())
{
return false;
}
const CMDIdScCmp *pmdidScCmp = CMDIdScCmp::PmdidConvert(pmdid);
return m_pmdidLeft->FEquals(pmdidScCmp->PmdidLeft()) &&
m_pmdidRight->FEquals(pmdidScCmp->PmdidRight()) &&
m_ecmpt == pmdidScCmp->Ecmpt();
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::Serialize
//
// @doc:
// Serializes the mdid as the value of the given attribute
//
//---------------------------------------------------------------------------
void
CMDIdScCmp::Serialize
(
CXMLSerializer * pxmlser,
const CWStringConst *pstrAttribute
)
const
{
pxmlser->AddAttribute(pstrAttribute, &m_str);
}
//---------------------------------------------------------------------------
// @function:
// CMDIdScCmp::OsPrint
//
// @doc:
// Debug print of the id in the provided stream
//
//---------------------------------------------------------------------------
IOstream &
CMDIdScCmp::OsPrint
(
IOstream &os
)
const
{
os << "(" << m_str.Wsz() << ")";
return os;
}
// EOF
| 22.719626 | 77 | 0.433155 | khannaekta |
525cb27c2ddd2bed9cf9436b0c1284064d608e15 | 2,384 | cpp | C++ | orm-cpp/orm/store_test/store_interface_test.cpp | ironbit/showcase-app | 3bb5fad9f616c04bdbec67b682713fbb671fce4a | [
"MIT"
] | null | null | null | orm-cpp/orm/store_test/store_interface_test.cpp | ironbit/showcase-app | 3bb5fad9f616c04bdbec67b682713fbb671fce4a | [
"MIT"
] | null | null | null | orm-cpp/orm/store_test/store_interface_test.cpp | ironbit/showcase-app | 3bb5fad9f616c04bdbec67b682713fbb671fce4a | [
"MIT"
] | null | null | null | #include "gtest/gtest.h"
#include <memory>
#include <cstring>
#include "orm/store/store.h"
#include "orm/store_mark/store.h"
#include "orm/store_test/person.h"
using ::testing::Return;
MATCHER_P(CompareProperty, expected, "") {
try {
for (const auto& attribute : PersonCoder::attributes) {
if (!(arg->get(attribute) == expected->get(attribute))) {
return false;
}
}
return true;
} catch(const std::bad_variant_access& e) {
std::cerr << e.what() << std::endl;
return false;
}
}
class StoreInterfaceTest : public ::testing::Test {
public:
// create data
const std::int64_t ID = 1234;
const std::int32_t AGE = 30;
const std::string NAME = "Christian";
const double HEIGHT = 1.80;
};
using ::testing::Matcher;
TEST_F(StoreInterfaceTest, EncodeTest) {
// retrieve mock
std::shared_ptr<orm::store::Store> store = std::make_shared<orm::store_mark::Store>();
auto& mock = static_cast<orm::store_mark::Store*>(store.get())->mock();
// populate data
Person person(ID);
person.age() = AGE;
person.name() = NAME;
person.height() = HEIGHT;
// create expected result
auto expectedProperty = orm::core::GenShareProperty({{PersonCoder::Age, AGE},
{PersonCoder::Name, NAME},
{PersonCoder::Height, HEIGHT}});
// test
EXPECT_CALL(mock, insert(ID, Matcher<std::shared_ptr<orm::core::Property>&&>(CompareProperty(expectedProperty))));
// execute main action
store->insert(person);
}
TEST_F(StoreInterfaceTest, DecodeTest) {
// retrieve mock
std::shared_ptr<orm::store::Store> store = std::make_shared<orm::store_mark::Store>();
auto& mock = static_cast<orm::store_mark::Store*>(store.get())->mock();
// populate data
Person person(ID);
// create expected result
auto expectedProperty = orm::core::GenShareProperty({{PersonCoder::Age, AGE},
{PersonCoder::Name, NAME},
{PersonCoder::Height, HEIGHT}});
// mock value
EXPECT_CALL(mock, query(ID))
.WillOnce(Return(expectedProperty));
// execute main action
store->query(person);
// test populated object
ASSERT_TRUE(person.identity() == ID);
ASSERT_TRUE(person.age() == AGE);
ASSERT_TRUE(person.name() == NAME);
ASSERT_TRUE(person.height() == HEIGHT);
}
| 27.72093 | 115 | 0.627936 | ironbit |
525e7c5607b680323acd83e64ef7159a3bbb638e | 545 | cpp | C++ | naked_asm/example.cpp | marziel/cpp-examples | 4c24639a9ec8807ed687e06e5fb96304ae34093a | [
"Unlicense"
] | 1 | 2020-02-22T12:05:52.000Z | 2020-02-22T12:05:52.000Z | naked_asm/example.cpp | marziel/cpp-examples | 4c24639a9ec8807ed687e06e5fb96304ae34093a | [
"Unlicense"
] | null | null | null | naked_asm/example.cpp | marziel/cpp-examples | 4c24639a9ec8807ed687e06e5fb96304ae34093a | [
"Unlicense"
] | null | null | null | #include <cstdio>
[[gnu::naked]] int check_sgx_support()
{
asm("\n\
push rbx \n\
push rcx \n\
mov rax, 7 \n\
xor rcx, rcx \n\
cpuid \n\
and rbx, 0x02 \n\
shr rbx, 1 \n\
mov rax, rbx \n\
pop rcx \n\
pop rbx \n\
ret \n\
");
}
int main()
{
printf("SGX supported?\t\t - %s\n", (check_sgx_support()) ? "YES" : "NO");
return 0;
}
| 20.961538 | 78 | 0.348624 | marziel |
525f92723cb8d105dbdb0f782835e8af287e3be4 | 644 | cpp | C++ | node_modules/lzz-gyp/lzz-source/smtc_GetNonTypeParam.cpp | SuperDizor/dizornator | 9f57dbb3f6af80283b4d977612c95190a3d47900 | [
"ISC"
] | 3 | 2019-09-18T16:44:33.000Z | 2021-03-29T13:45:27.000Z | node_modules/lzz-gyp/lzz-source/smtc_GetNonTypeParam.cpp | SuperDizor/dizornator | 9f57dbb3f6af80283b4d977612c95190a3d47900 | [
"ISC"
] | null | null | null | node_modules/lzz-gyp/lzz-source/smtc_GetNonTypeParam.cpp | SuperDizor/dizornator | 9f57dbb3f6af80283b4d977612c95190a3d47900 | [
"ISC"
] | 2 | 2019-03-29T01:06:38.000Z | 2019-09-18T16:44:34.000Z | // smtc_GetNonTypeParam.cpp
//
#include "smtc_GetNonTypeParam.h"
// semantic
#include "smtc_CheckParamName.h"
#include "smtc_CheckSpecFlags.h"
#include "smtc_CreateNonTypeParam.h"
#include "smtc_Message.h"
#define LZZ_INLINE inline
namespace smtc
{
ParamPtr getNonTypeParam (gram::SpecSel const & spec_sel, CvType const & cv_type, NamePtr const & name, gram::Block const & def_arg)
{
// no specifiers valid
checkValidSpecFlags (spec_sel, 0, msg::invalidNonTypeParamSpec);
// check name
checkParamName (name);
// return non-type param
return createNonTypeParam (0, cv_type, name, def_arg);
}
}
#undef LZZ_INLINE
| 24.769231 | 134 | 0.737578 | SuperDizor |
5261aedc5ba7563b9f11d36620eccc67e42321de | 1,177 | cpp | C++ | src/daisyHat.cpp | recursinging/daisyHat | 94a3a2f8da13ee4df372027058f2741c84493a0e | [
"MIT"
] | null | null | null | src/daisyHat.cpp | recursinging/daisyHat | 94a3a2f8da13ee4df372027058f2741c84493a0e | [
"MIT"
] | null | null | null | src/daisyHat.cpp | recursinging/daisyHat | 94a3a2f8da13ee4df372027058f2741c84493a0e | [
"MIT"
] | null | null | null | #include "daisyHat.h"
#include <daisy_seed.h>
namespace daisyhat
{
int numFailedAssertions = 0;
uint32_t startTime = 0;
daisy::DaisySeed* seed;
void StartTest(daisy::DaisySeed& _seed, const char* testName)
{
startTime = daisy::System::GetNow();
numFailedAssertions = 0;
seed = &_seed;
seed->SetLed(true);
StartLog(true);
daisy::System::Delay(3000);
PrintLine("=== Starting Test ===");
Print("> Name: ");
PrintLine(testName);
PrintLine("===");
}
void FinishTest()
{
const auto endTime = daisy::System::GetNow();
const auto testDuration = endTime - startTime;
PrintLine("=== Test Finished ===");
PrintLine("> numFailedAssertions = %d", numFailedAssertions);
PrintLine("> duration = %d ms", testDuration);
if (numFailedAssertions > 0)
PrintLine("> testResult = FAILURE");
else
PrintLine("> testResult = SUCCESS");
PrintLine("===");
seed->SetLed(false);
// trap processor in endless loop.
while (1)
{
};
}
} // namespace daisyhat | 25.042553 | 69 | 0.553951 | recursinging |
5262d3bf3a65ccf0f40e3d66e265422f4a540872 | 1,719 | cpp | C++ | Refureku/Generator/Source/Properties/InstantiatorPropertyCodeGen.cpp | jsoysouvanh/Refureku | 7548cb3b196793119737a51c1cedc136aa60d3ee | [
"MIT"
] | 143 | 2020-04-07T21:38:21.000Z | 2022-03-30T01:06:33.000Z | Refureku/Generator/Source/Properties/InstantiatorPropertyCodeGen.cpp | jsoysouvanh/Refureku | 7548cb3b196793119737a51c1cedc136aa60d3ee | [
"MIT"
] | 7 | 2021-03-30T07:26:21.000Z | 2022-03-28T16:31:02.000Z | Refureku/Generator/Source/Properties/InstantiatorPropertyCodeGen.cpp | jsoysouvanh/Refureku | 7548cb3b196793119737a51c1cedc136aa60d3ee | [
"MIT"
] | 11 | 2020-06-06T09:45:12.000Z | 2022-01-25T17:17:55.000Z | #include "RefurekuGenerator/Properties/InstantiatorPropertyCodeGen.h"
#include <Kodgen/InfoStructures/MethodInfo.h>
using namespace rfk;
InstantiatorPropertyCodeGen::InstantiatorPropertyCodeGen() noexcept:
kodgen::MacroPropertyCodeGen("Instantiator", kodgen::EEntityType::Method)
{
}
bool InstantiatorPropertyCodeGen::generateClassFooterCodeForEntity(kodgen::EntityInfo const& entity, kodgen::Property const& /*property*/, kodgen::uint8 /*propertyIndex*/,
kodgen::MacroCodeGenEnv& env, std::string& inout_result) noexcept
{
kodgen::MethodInfo const& method = static_cast<kodgen::MethodInfo const&>(entity);
std::string className = method.outerEntity->getFullName();
std::string parameters = method.getParameterTypes();
std::string methodPtr = "&" + className + "::" + method.name;
if (parameters.empty())
{
//CustomIntantiator with no parameters
inout_result += "static_assert(std::is_invocable_r_v<" + className + "*, decltype(" + methodPtr + ")>, \"[Refureku] Instantiator requires " + methodPtr + " to be a static method returning " + className + "* .\");" + env.getSeparator();
}
else
{
inout_result += "static_assert(std::is_invocable_r_v<" + className + "*, decltype(" + methodPtr + "), " + std::move(parameters) + ">, \"[Refureku] Instantiator requires " + methodPtr + " to be a static method returning " + className + "*.\");" + env.getSeparator();
}
return true;
}
void InstantiatorPropertyCodeGen::addInstantiatorToClass(std::string const& generatedClassVariableName, std::string const& generatedMethodVarName, std::string& inout_result) const noexcept
{
inout_result += generatedClassVariableName + "addInstantiator(" + generatedMethodVarName + "); ";
} | 47.75 | 267 | 0.731239 | jsoysouvanh |
526343b853d1ba13c5432a679c6ff9757fee0104 | 19,186 | hpp | C++ | wz4/wz4frlib/wz4_physx.hpp | wzman/werkkzeug4CE | af5ff27829ed4c501515ef5131165048e991c9b4 | [
"BSD-2-Clause"
] | 47 | 2015-03-22T05:58:47.000Z | 2022-03-29T19:13:37.000Z | wz4/wz4frlib/wz4_physx.hpp | whpskyeagle/werkkzeug4CE | af5ff27829ed4c501515ef5131165048e991c9b4 | [
"BSD-2-Clause"
] | null | null | null | wz4/wz4frlib/wz4_physx.hpp | whpskyeagle/werkkzeug4CE | af5ff27829ed4c501515ef5131165048e991c9b4 | [
"BSD-2-Clause"
] | 16 | 2015-12-31T08:13:18.000Z | 2021-03-09T02:07:30.000Z | /*+**************************************************************************/
/*** ***/
/*** This file is distributed under a BSD license. ***/
/*** See LICENSE.txt for details. ***/
/*** ***/
/**************************************************************************+*/
#ifndef FILE_WZ4FRLIB_PHYSX_HPP
#define FILE_WZ4FRLIB_PHYSX_HPP
#include "wz4frlib/wz4_demo2_ops.hpp"
#include "wz4frlib/wz4_physx_ops.hpp"
/****************************************************************************/
/****************************************************************************/
//#define COMPIL_WITH_PVD
#ifdef _DEBUG
#undef _DEBUG
#define _DEBUG_WAS_DEFINED
#endif
#undef new
#include "C:/library/PhysX-3.3.1_PC_SDK_Core/Include/PxPhysicsAPI.h"
#define new sDEFINE_NEW
#ifdef _DEBUG_WAS_DEFINED
#undef _DEBUG_WAS_DEFINED
#define _DEBUG
#endif
#ifdef _M_X64
// 64 bits
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win64/PhysX3CHECKED_x64.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win64/PhysX3CommonCHECKED_x64.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win64/PhysX3ExtensionsCHECKED.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win64/PhysX3CookingCHECKED_x64.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win64/PxTaskCHECKED.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win64/PhysXProfileSDKCHECKED.lib")
#ifdef COMPIL_WITH_PVD
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win64/PhysXVisualDebuggerSDKCHECKED.lib")
#endif
#else
// 32 bits
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win32/PhysX3CHECKED_x86.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win32/PhysX3CommonCHECKED_x86.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win32/PhysX3ExtensionsCHECKED.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win32/PhysX3CookingCHECKED_x86.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win32/PxTaskCHECKED.lib")
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win32/PhysXProfileSDKCHECKED.lib")
#ifdef COMPIL_WITH_PVD
#pragma comment(lib, "C:/library/PhysX-3.3.1_PC_SDK_Core/Lib/win32/PhysXVisualDebuggerSDKCHECKED.lib")
#endif
#endif
#ifdef _DEBUG
#pragma comment(linker, "/NODEFAULTLIB:libcmt.lib")
#endif
using namespace physx;
/****************************************************************************/
/****************************************************************************/
void PhysXInitEngine();
/****************************************************************************/
/****************************************************************************/
// A template tree scene for physx object
// Transform and Render objects in a graph
template <typename T, class T2, typename T3>
class WpxGenericGraph : public T2
{
public:
sArray<sMatrix34CM> Matrices; // matrices list
sArray<T *> Childs; // childs objects
~WpxGenericGraph();
virtual void Render(Wz4RenderContext &ctx, sMatrix34 &mat); // render
virtual void Transform(const sMatrix34 & mat, T3 * ptr); // build list of model matrices with GRAPH!
virtual void ClearMatricesR(); // clear matrices
void RenderChilds(Wz4RenderContext &ctx, sMatrix34 &mat); // recurse to childs
void TransformChilds(const sMatrix34 & mat, T3 * ptr); // recurse to childs
};
template <typename T, class T2, typename T3>
WpxGenericGraph<T, T2, T3>::~WpxGenericGraph()
{
sReleaseAll(Childs);
}
template <typename T, class T2, typename T3>
void WpxGenericGraph<T, T2, T3>::ClearMatricesR()
{
T *c;
Matrices.Clear();
sFORALL(Childs, c)
c->ClearMatricesR();
}
template <typename T, class T2, typename T3>
void WpxGenericGraph<T, T2, T3>::Transform(const sMatrix34 &mat, T3 * ptr)
{
TransformChilds(mat, ptr);
}
template <typename T, class T2, typename T3>
void WpxGenericGraph<T, T2, T3>::TransformChilds(const sMatrix34 &mat, T3 * ptr)
{
T *c;
Matrices.AddTail(sMatrix34CM(mat));
sFORALL(Childs, c)
c->Transform(mat, ptr);
}
template <typename T, class T2, typename T3>
void WpxGenericGraph<T, T2, T3>::Render(Wz4RenderContext &ctx, sMatrix34 &mat)
{
RenderChilds(ctx,mat);
}
template <typename T, class T2, typename T3>
void WpxGenericGraph<T, T2, T3>::RenderChilds(Wz4RenderContext &ctx, sMatrix34 &mat)
{
// recurse to childs
T *c;
sFORALL(Childs, c)
c->Render(ctx,mat);
}
/****************************************************************************/
/****************************************************************************/
// WpxColliderBase is the base type for all colliders operators
// WpxColliderBase inherited classes are used to preview a graph of colliders
class WpxColliderBase : public WpxGenericGraph<WpxColliderBase, wObject, PxRigidActor>
{
public:
WpxColliderBase();
void AddCollidersChilds(wCommand *cmd); // add childs
virtual void GetDensity(sArray<PxReal> * densities); // get shape density to compute final mass and inertia
void GetDensityChilds(sArray<PxReal> * densities); // recurse to childs
};
/****************************************************************************/
/****************************************************************************/
class WpxCollider : public WpxColliderBase
{
private:
Wz4Mesh * MeshCollider; // collider mesh, used to preview collider shape
Wz4Mesh * MeshInput; // ptr to optional mesh used to generate collider geometry (when GeometryType is hull or mesh)
PxConvexMesh * ConvexMesh; // convex mesh (when GeometryType is hull)
PxTriangleMesh * TriMesh; // triangle mesh (when GeometryType is mesh)
public:
WpxColliderParaCollider ParaBase, Para;
WpxCollider();
~WpxCollider();
void Transform(const sMatrix34 & mat, PxRigidActor * ptr);
void Render(Wz4RenderContext &ctx, sMatrix34 &mat);
sBool CreateGeometry(Wz4Mesh * input); // create collider mesh (to preview collider shape)
void CreatePhysxCollider(PxRigidActor * actor, sMatrix34 & mat); // create physx collider for actor
void GetDensity(sArray<PxReal> * densities); // get shape density
};
/****************************************************************************/
class WpxColliderAdd : public WpxColliderBase
{
public:
WpxColliderAddParaColliderAdd ParaBase, Para;
};
/****************************************************************************/
class WpxColliderTransform : public WpxColliderBase
{
public:
WpxColliderTransformParaColliderTransform ParaBase, Para;
void Transform(const sMatrix34 & mat, PxRigidActor * ptr);
};
/****************************************************************************/
class WpxColliderMul : public WpxColliderBase
{
public:
WpxColliderMulParaColliderMul ParaBase, Para;
void Transform(const sMatrix34 & mat, PxRigidActor * ptr);
};
/****************************************************************************/
/****************************************************************************/
// WpxActorBase is the base type for all actors operators
// WpxActorBase inherited classes are used to preview a graph of actors + associated colliders graph
class WpxRigidBody;
class WpxActorBase : public WpxGenericGraph<WpxActorBase, Wz4Render, PxScene>
{
public:
WpxActorBase();
virtual void PhysxReset(); // clear physx
virtual void PhysxWakeUp(); // wakeup physx
void AddActorsChilds(wCommand *cmd); // add childs
void PhysxResetChilds(); // recurse to childs
void PhysxWakeUpChilds(); // recurse to childs
WpxRigidBody * GetRigidBodyR(WpxActorBase * node); // recurse to childs to get a rigidbody (used by joints to find a rigidbody op in tree)
WpxRigidBody * GetRigidBodyR(WpxActorBase * node, sChar * name);
sChar Name[255];
};
/****************************************************************************/
/****************************************************************************/
struct sActor
{
PxRigidActor * actor; // physx actor ptr
sMatrix34 * matrix; // store matrix at actor creation (used by kinematics and debris)
};
struct sJoint
{
Wz4Mesh MeshPreview;
sMatrix34 Pose;
};
class WpxRigidBody : public WpxActorBase
{
public:
WpxColliderBase * RootCollider; // associated colliders geometries, root collider in collider graph
sArray<sActor*> AllActors; // list of actors
sArray<sVector31> ListPositions; // used to store position list, when building rigidbody from vertex mode
WpxRigidBodyParaRigidBody ParaBase, Para;
WpxRigidBody();
~WpxRigidBody();
void Transform(const sMatrix34 & mat, PxScene * ptr);
void Render(Wz4RenderContext &ctx, sMatrix34 &mat);
void ClearMatricesR();
void PhysxReset();
void AddRootCollider(WpxColliderBase * col);
void PhysxBuildActor(const sMatrix34 & mat, PxScene * scene, sArray<sActor*> &allActors); // build physx actor
void PhysxWakeUp();
void GetPositionsFromMeshVertices(Wz4Mesh * mesh, sInt selection);
void GetPositionsFromMeshChunks(Wz4Mesh * mesh);
// joints
void BuildAttachmentPoints(WpxRigidBodyArrayRigidBody * array, sInt arrayCount);
void CreateAttachmentPointMesh(sJoint * joint);
sArray<sJoint *> JointsFixations;
};
/****************************************************************************/
class WpxRigidBodyAdd : public WpxActorBase
{
public:
WpxRigidBodyAddParaRigidBodyAdd ParaBase, Para;
};
/****************************************************************************/
class WpxRigidBodyTransform : public WpxActorBase
{
public:
WpxRigidBodyTransformParaRigidBodyTransform ParaBase, Para;
void Transform(const sMatrix34 & mat, PxScene * ptr);
};
/****************************************************************************/
class WpxRigidBodyMul : public WpxActorBase
{
public:
WpxRigidBodyMulParaRigidBodyMul ParaBase, Para;
void Transform(const sMatrix34 & mat, PxScene * ptr);
};
/****************************************************************************/
class WpxRigidBodyJointsChained : public WpxActorBase
{
public:
WpxRigidBodyJointsChainedParaJointsChained ParaBase, Para;
void Transform(const sMatrix34 & mat, PxScene * ptr);
sChar NameA[255];
};
/****************************************************************************/
class WpxRigidBodyJoint : public WpxActorBase
{
public:
WpxRigidBodyJointParaJoint ParaBase, Para;
void Transform(const sMatrix34 & mat, PxScene * ptr);
sChar NameA[255];
sChar NameB[255];
};
/****************************************************************************/
struct sChunkCollider
{
WpxCollider * wCollider; // physx collider
Wz4Mesh * Mesh; // chunk mesh, used to compute collider shape
sChunkCollider() { wCollider=0; Mesh=0; }
};
class WpxRigidBodyDebris : public WpxActorBase
{
public:
Wz4Mesh * ChunkedMesh; // chunked mesh to render
sArray<sActor*> AllActors; // list of actors (per chunks)
sArray<sChunkCollider *> ChunksColliders; // list of colliders
sArray<WpxRigidBody *> ChunksRigidBodies; // list of rigidbodies
WpxRigidBodyDebrisParaRigidBodyDebris Para, ParaBase;
WpxRigidBodyDebris();
~WpxRigidBodyDebris();
void PhysxReset();
void Render(Wz4RenderContext &ctx, sMatrix34 &mat);
void Transform(const sMatrix34 & mat, PxScene * ptr);
void PhysxBuildDebris(const sMatrix34 & mat, PxScene * ptr);
int GetChunkedMesh(Wz4Render * in);
void PhysxWakeUp();
};
/****************************************************************************/
/****************************************************************************/
// next Wz4RenderNodes, are nodes associated with actors operators,
// they are computed in the Wz4Render graph process at each render loop,
// they are used for :
// - rendering RenderNode binded with physx
// - simulate and process manually physx features like kinematics, add forces, etc...
/****************************************************************************/
/****************************************************************************/
class WpxRigidBodyNodeBase : public Wz4RenderNode
{
public:
virtual void Init() {}
WpxRigidBodyParaRigidBody ParaBase, Para;
WpxRigidBodyAnimRigidBody Anim;
};
/****************************************************************************/
class WpxRigidBodyNodeActor : public WpxRigidBodyNodeBase
{
public:
sArray<sActor*> * AllActorsPtr; // ptr to an actors list (in WpxRigidBody)
WpxRigidBodyNodeActor();
void Transform(Wz4RenderContext *ctx, const sMatrix34 & mat);
};
/****************************************************************************/
class WpxRigidBodyNodeDynamic : public WpxRigidBodyNodeActor
{
public:
WpxRigidBodyNodeDynamic();
void Simulate(Wz4RenderContext *ctx);
};
/****************************************************************************/
class WpxRigidBodyNodeStatic : public WpxRigidBodyNodeActor
{
public:
};
/****************************************************************************/
class WpxRigidBodyNodeKinematic : public WpxRigidBodyNodeActor
{
public:
WpxRigidBodyNodeKinematic();
void Simulate(Wz4RenderContext *ctx);
};
/****************************************************************************/
class WpxRigidBodyNodeDebris : public WpxRigidBodyNodeActor
{
public:
Wz4Mesh * ChunkedMeshPtr; // ptr to single chunked mesh to render (init in WpxRigidBodyDebris)
WpxRigidBodyDebrisParaRigidBodyDebris Para, ParaBase;
WpxRigidBodyDebrisAnimRigidBodyDebris Anim;
WpxRigidBodyNodeDebris();
~WpxRigidBodyNodeDebris();
void Transform(Wz4RenderContext *ctx, const sMatrix34 & mat);
void Render(Wz4RenderContext *ctx);
void Simulate(Wz4RenderContext *ctx);
};
/****************************************************************************/
/****************************************************************************/
class WpxParticleNode;
class PhysxTarget;
/****************************************************************************/
class RNPhysx : public Wz4RenderNode
{
private:
sBool Executed; // flag for restart and pause simulation mechanism with F6/F5
sF32 PreviousTimeLine; // delta time line use to restart simulation
sF32 LastTime; // last frame time
sF32 Accumulator; // time accumulator
sArray<WpxActorBase *> WpxChilds; // wpx childs operators list for clean delete
PhysxTarget * SceneTarget; // target for particles
PxScene * CreateScene(); // create new physx scene
void CreateAllActors(wCommand *cmd); // create physx actors
void WakeUpScene(wCommand *cmd); // wake up all actors
public:
PxScene * Scene; // Physx scene
sArray<Wz4ParticleNode *> PartSystems; // all Wz4ParticlesNode binded to this physx (rebuild op mechanism)
Wz4RenderParaPhysx ParaBase, Para;
Wz4RenderAnimPhysx Anim;
RNPhysx::RNPhysx();
RNPhysx::~RNPhysx();
void Simulate(Wz4RenderContext *ctx);
sBool Init(wCommand *cmd); // init physx
void InitSceneTarget(PhysxTarget * target); // init scene target ptr
};
/****************************************************************************/
/****************************************************************************/
class PhysxObject : public wObject
{
public:
PxScene * PhysxSceneRef; // physx scene ptr
sArray<Wz4ParticleNode *> * PartSystemsRef; // ptr to the particles node list binded to a physx operator
PhysxObject() { Type = PhysxObjectType; PhysxSceneRef = 0; PartSystemsRef = 0; }
// call this to register a particle node for a physx operator
void RegisterParticleNode(Wz4ParticleNode * op)
{
if (PartSystemsRef)
PartSystemsRef->AddTail(op);
}
// call this to remove a particle node for a physx operator
void RemoveParticleNode(Wz4ParticleNode * op)
{
if(PartSystemsRef)
PartSystemsRef->Rem(op);
}
};
/****************************************************************************/
class PhysxTarget : public PhysxObject
{
public:
PhysxTarget() { AddRef(); }
~PhysxTarget() { Release(); }
};
/****************************************************************************/
/****************************************************************************/
class WpxParticleNode : public Wz4ParticleNode
{
public:
PhysxObject * Target;
WpxParticleNode() { Target = 0; }
};
/****************************************************************************/
class RPPhysxParticleTest : public WpxParticleNode
{
PxU32* pIndex;
PxVec3* pPosition;
PxVec3* pVelocity;
PxParticleSystem * PhysxPartSystem;
struct Particle
{
sVector31 Pos0;
sVector31 Pos1;
};
sArray<Particle> Particles;
public:
RPPhysxParticleTest();
~RPPhysxParticleTest();
void Init();
Wz4ParticlesParaPxCloud Para, ParaBase;
Wz4ParticlesAnimPxCloud Anim;
void Simulate(Wz4RenderContext *ctx);
sInt GetPartCount();
sInt GetPartFlags();
void Func(Wz4PartInfo &pinfo, sF32 time, sF32 dt);
};
/****************************************************************************/
class RPPxPart : public WpxParticleNode
{
PxU32* pIndex;
PxVec3* pPosition;
PxVec3* pVelocity;
PxParticleSystem * PhysxPartSystem;
struct Particle
{
sVector31 Pos0;
sVector31 Pos1;
};
sArray<Particle> Particles;
public:
RPPxPart();
~RPPxPart();
void Init();
Wz4ParticlesParaPxPart Para, ParaBase;
Wz4ParticlesAnimPxPart Anim;
void Simulate(Wz4RenderContext *ctx);
sInt GetPartCount();
sInt GetPartFlags();
void Func(Wz4PartInfo &pinfo, sF32 time, sF32 dt);
sBool NeedInit;
void DelayedInit();
PxVec3* bStartPosition;
Wz4ParticleNode *Source;
};
/****************************************************************************/
class RPRangeEmiter : public WpxParticleNode
{
struct Particle
{
sVector31 Position;
sVector30 Velocity;
sVector30 Acceleration;
sF32 Speed;
sF32 Life;
sF32 MaxLife;
sBool isDead;
Particle()
{
Position = sVector31(0,0,0);
Velocity = sVector30(0,0,0);
Acceleration = sVector30(0, 0, 0);
Speed = 1.0f;
Life = -1;
MaxLife = 1;
isDead = sTRUE;
}
};
sArray<Particle> Particles;
sF32 AccumultedTime;
sF32 Rate;
sInt EmitCount;
public:
RPRangeEmiter();
~RPRangeEmiter();
void Init();
Wz4ParticlesParaRangeEmiter Para, ParaBase;
Wz4ParticlesAnimRangeEmiter Anim;
void Simulate(Wz4RenderContext *ctx);
sInt GetPartCount();
sInt GetPartFlags();
void Func(Wz4PartInfo &pinfo, sF32 time, sF32 dt);
};
#endif FILE_WZ4FRLIB_PHYSX_HPP
| 31.095624 | 141 | 0.577504 | wzman |
52642bec5b476187a4b080365f0c2c21a954e68d | 8,857 | cpp | C++ | src/main.cpp | ZeroxCorbin/tm_driver | d0abe90b5dba42d48a4aa9825b378b130a5b745c | [
"MIT"
] | null | null | null | src/main.cpp | ZeroxCorbin/tm_driver | d0abe90b5dba42d48a4aa9825b378b130a5b745c | [
"MIT"
] | null | null | null | src/main.cpp | ZeroxCorbin/tm_driver | d0abe90b5dba42d48a4aa9825b378b130a5b745c | [
"MIT"
] | null | null | null | #include "tm_driver/tm_driver.h"
#include "tm_driver/tm_print.h"
#include <SctResponse.hpp>
#include <StaResponse.hpp>
#include <ConnectTM.hpp>
#include <SendScript.hpp>
#include <SetEvent.hpp>
#include <SetPositions.hpp>
#include <SetIO.hpp>
#include <AskSta.hpp>
#include <iostream>
TmDriver* iface_;
std::mutex sta_mtx_;
std::condition_variable sta_cond_;
std::condition_variable psrv_cv_cond_;
std::condition_variable pscv_cv_cond_;
bool sta_updated_;
int sct_reconnect_timeval_ms_;
int sct_reconnect_timeout_ms_;
struct SctMsg {
tm_msgs::msg::SctResponse sct_msg;
tm_msgs::msg::StaResponse sta_msg;
} sm_;
int main(int argc, char* argv[]) {
std::string host;
if (argc > 1) {
host = argv[1];
}
iface_ = new TmDriver(host, &psrv_cv_cond_, &pscv_cv_cond_);
iface_->start();
while (true) {
std::string test;
std::getline(std::cin, test);
if (test == "s")
iface_->state.print();
else
iface_->set_stop();
};
return 0;
}
bool connect_tmsct(
const std::shared_ptr<tm_msgs::srv::ConnectTM::Request> req,
std::shared_ptr<tm_msgs::srv::ConnectTM::Response> res)
{
bool rb = true;
int t_o = (int)(1000.0 * req->timeout);
int t_v = (int)(1000.0 * req->timeval);
if (req->connect) {
print_info("(TM_SCT) (re)connect(%d) TM_SCT", t_o);
iface_->sct.halt();
rb = iface_->sct.start(t_o);
}
if (req->reconnect) {
sct_reconnect_timeout_ms_ = t_o;
sct_reconnect_timeval_ms_ = t_v;
print_info("(TM_SCT) set SCT reconnect timeout %dms, timeval %dms", t_o, t_v);
}
else {
// no reconnect
sct_reconnect_timeval_ms_ = -1;
print_info("(TM_SCT) set SCT NOT reconnect");
}
res->ok = rb;
return rb;
}
bool send_script(
const std::shared_ptr<tm_msgs::srv::SendScript::Request> req,
std::shared_ptr<tm_msgs::srv::SendScript::Response> res)
{
bool rb = (iface_->sct.send_script_str(req->id, req->script) == iface_->RC_OK);
res->ok = rb;
return rb;
}
bool set_event(
const std::shared_ptr<tm_msgs::srv::SetEvent::Request> req,
std::shared_ptr<tm_msgs::srv::SetEvent::Response> res)
{
bool rb = false;
std::string content;
switch (req->func) {
case tm_msgs::srv::SetEvent::Request::EXIT:
rb = iface_->script_exit();
break;
case tm_msgs::srv::SetEvent::Request::TAG:
rb = iface_->set_tag((int)(req->arg0), (int)(req->arg1));
break;
case tm_msgs::srv::SetEvent::Request::WAIT_TAG:
rb = iface_->set_wait_tag((int)(req->arg0), (int)(req->arg1));
break;
case tm_msgs::srv::SetEvent::Request::STOP:
rb = iface_->set_stop();
break;
case tm_msgs::srv::SetEvent::Request::PAUSE:
rb = iface_->set_pause();
break;
case tm_msgs::srv::SetEvent::Request::RESUME:
rb = iface_->set_resume();
break;
}
res->ok = rb;
return rb;
}
bool set_io(
const std::shared_ptr<tm_msgs::srv::SetIO::Request> req,
std::shared_ptr<tm_msgs::srv::SetIO::Response> res)
{
bool rb = iface_->set_io(TmIOModule(req->module), TmIOType(req->type), int(req->pin), req->state);
res->ok = rb;
return rb;
}
bool set_positions(
const std::shared_ptr<tm_msgs::srv::SetPositions::Request> req,
std::shared_ptr<tm_msgs::srv::SetPositions::Response> res)
{
bool rb = false;
switch (req->motion_type) {
case tm_msgs::srv::SetPositions::Request::PTP_J:
rb = iface_->set_joint_pos_PTP(req->positions, req->velocity, req->acc_time, req->blend_percentage, req->fine_goal);
break;
case tm_msgs::srv::SetPositions::Request::PTP_T:
rb = iface_->set_tool_pose_PTP(req->positions, req->velocity, req->acc_time, req->blend_percentage, req->fine_goal);
break;
case tm_msgs::srv::SetPositions::Request::LINE_T:
rb = iface_->set_tool_pose_Line(req->positions, req->velocity, req->acc_time, req->blend_percentage, req->fine_goal);
break;
}
res->ok = rb;
return rb;
}
bool ask_sta(
const std::shared_ptr<tm_msgs::srv::AskSta::Request> req,
std::shared_ptr<tm_msgs::srv::AskSta::Response> res)
{
SctMsg& sm = sm_;
bool rb = false;
sta_updated_ = false;
rb = (iface_->sct.send_script_str(req->subcmd, req->subdata) == iface_->RC_OK);
if (req->wait_time > 0.0) {
std::mutex lock;
std::unique_lock<std::mutex> locker(lock);
if (!sta_updated_) {
sta_cond_.wait_for(locker, std::chrono::duration<double>(req->wait_time));
}
if (sta_updated_) {
sta_mtx_.lock();
res->subcmd = sm.sta_msg.subcmd;
res->subdata = sm.sta_msg.subdata;
sta_mtx_.unlock();
sta_updated_ = false;
}
else rb = false;
}
res->ok = rb;
return rb;
}
//void sct_msg()
//{
// SctMsg& sm = sm_;
// TmSctData& data = iface_->sct.sct_data;
//
// sm.sct_msg.id = data.script_id();
// sm.sct_msg.script = std::string{ data.script(), data.script_len() };
//
// if (data.has_error()) {
// print_info("(TM_SCT): err: (%s): %s", sm.sct_msg.id.c_str(), sm.sct_msg.script.c_str());
// }
// else {
// print_info("(TM_SCT): res: (%s): %s", sm.sct_msg.id.c_str(), sm.sct_msg.script.c_str());
// }
//
// //sm.sct_msg.header.stamp = rclcpp::Node::now();
// //sm.sct_pub->publish(sm.sct_msg);
//}
//void sta_msg()
//{
// SctMsg& sm = sm_;
// TmStaData& data = iface_->sct.sta_data;
//
// sta_mtx_.lock();
// sm.sta_msg.subcmd = data.subcmd_str();
// sm.sta_msg.subdata = std::string{ data.subdata(), data.subdata_len() };
// sta_mtx_.unlock();
//
// sta_updated_ = true;
// sta_cond_.notify_all();
//
// print_info("(TM_STA): res: (%s): %s", sm.sta_msg.subcmd.c_str(), sm.sta_msg.subdata.c_str());
//
// //sm.sta_msg.header.stamp = rclcpp::Node::now();
// //sm.sta_pub->publish(sm.sta_msg);
//}
//bool sct_func()
//{
// TmSctCommunication& sct = iface_->sct;
// int n;
// auto rc = sct.recv_spin_once(1000, &n);
// if (rc == TmCommRC::ERR ||
// rc == TmCommRC::NOTREADY ||
// rc == TmCommRC::NOTCONNECT) {
// return false;
// }
// else if (rc != TmCommRC::OK) {
// return true;
// }
// std::vector<TmPacket>& pack_vec = sct.packet_list();
//
// for (auto& pack : pack_vec) {
// switch (pack.type) {
// case TmPacket::Header::CPERR:
// print_info("(TM_SCT): CPERR");
// sct.err_data.set_CPError(pack.data.data(), pack.data.size());
// print_error(sct.err_data.error_code_str().c_str());
//
// // cpe response
//
// break;
//
// case TmPacket::Header::TMSCT:
//
// sct.err_data.error_code(TmCPError::Code::Ok);
//
// //TODO ? lock and copy for service response
// TmSctData::build_TmSctData(sct.sct_data, pack.data.data(), pack.data.size(), TmSctData::SrcType::Shallow);
//
// sct_msg();
// break;
//
// case TmPacket::Header::TMSTA:
//
// sct.err_data.error_code(TmCPError::Code::Ok);
//
// TmStaData::build_TmStaData(sct.sta_data, pack.data.data(), pack.data.size(), TmStaData::SrcType::Shallow);
//
// sta_msg();
// break;
//
// default:
// print_info("(TM_SCT): invalid header");
// break;
// }
// }
// return true;
//}
//void sct_responsor()
//{
// TmSctCommunication& sct = iface_->sct;
//
// std::this_thread::sleep_for(std::chrono::milliseconds(50));
//
// print_info("(TM_SCT): sct_response thread begin");
//
// while (true) {
// //bool reconnect = false;
// if (!sct.recv_init()) {
// print_info("(TM_SCT) is not connected");
// }
// while (sct.is_connected()) {
// if (!sct_func()) break;
// }
// sct.Close();
//
// // reconnect == true
// //if (!rclcpp::ok()) break;
// if (sct_reconnect_timeval_ms_ <= 0) {
// std::this_thread::sleep_for(std::chrono::milliseconds(100));
// }
// print_info("(TM_SCT) reconnect in ");
// int cnt = 0;
// while (cnt < sct_reconnect_timeval_ms_) {
// if (cnt % 1000 == 0) {
// print_info("%.1f sec...", 0.001 * (sct_reconnect_timeval_ms_ - cnt));
// }
// std::this_thread::sleep_for(std::chrono::milliseconds(1));
// ++cnt;
// }
// if (sct_reconnect_timeval_ms_ >= 0) {
// print_info("0 sec\n(TM_SCT) connect(%d)...", sct_reconnect_timeout_ms_);
// sct.Connect(sct_reconnect_timeout_ms_);
// }
// }
// sct.Close();
// printf("(TM_SCT) sct_response thread end\n");
//}
| 29.134868 | 125 | 0.579767 | ZeroxCorbin |
52642c4a4142a47d7de99e089f15aee33b5afd86 | 2,513 | cpp | C++ | source/Editor/assetsWidget.cpp | nicovanbentum/GE | 1dd737b50bef306118116c6c4e1bd36c0ebb65c6 | [
"MIT"
] | null | null | null | source/Editor/assetsWidget.cpp | nicovanbentum/GE | 1dd737b50bef306118116c6c4e1bd36c0ebb65c6 | [
"MIT"
] | null | null | null | source/Editor/assetsWidget.cpp | nicovanbentum/GE | 1dd737b50bef306118116c6c4e1bd36c0ebb65c6 | [
"MIT"
] | null | null | null | #include "pch.h"
#include "assetsWidget.h"
#include "editor.h"
#include "IconsFontAwesome5.h"
namespace Raekor {
AssetsWidget::AssetsWidget(Editor* editor) : IWidget(editor, "Asset Browser") {}
void AssetsWidget::draw(float dt) {
ImGui::Begin(title.c_str());
auto materials = IWidget::GetScene().view<Material, Name>();
auto& style = ImGui::GetStyle();
if (ImGui::BeginTable("Assets", 24)) {
for (auto entity : materials) {
auto& [material, name] = materials.get<Material, Name>(entity);
auto selectable_name = name.name.substr(0, 9).c_str() + std::string("...");
ImGui::TableNextColumn();
if (GetActiveEntity() == entity)
ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ImGui::ColorConvertFloat4ToU32(ImVec4(1.0f, 1.0f, 1.0f, 0.2f)));
bool clicked = false;
ImGui::PushID(entt::to_integral(entity));
if (material.gpuAlbedoMap) {
clicked = ImGui::ImageButton(
(void*)((intptr_t)material.gpuAlbedoMap),
ImVec2(64 * ImGui::GetWindowDpiScale(), 64 * ImGui::GetWindowDpiScale()),
ImVec2(0, 0), ImVec2(1, 1), -1,
ImVec4(0, 1, 0, 1)
);
}
else {
ImGui::PushStyleColor(ImGuiCol_Button, ImVec(material.albedo));
clicked = ImGui::Button(
std::string("##" + name.name).c_str(),
ImVec2(64 * ImGui::GetWindowDpiScale() + style.FramePadding.x * 2, 64 * ImGui::GetWindowDpiScale() + style.FramePadding.y * 2)
);
ImGui::PopStyleColor();
}
if (clicked)
GetActiveEntity() = entity;
//if (ImGui::Button(ICON_FA_ARCHIVE, ImVec2(64 * ImGui::GetWindowDpiScale(), 64 * ImGui::GetWindowDpiScale()))) {
// editor->active = entity;
//}
ImGuiDragDropFlags src_flags = ImGuiDragDropFlags_SourceNoDisableHover;
src_flags |= ImGuiDragDropFlags_SourceNoHoldToOpenOthers;
if (ImGui::BeginDragDropSource(src_flags)) {
ImGui::SetDragDropPayload("drag_drop_mesh_material", &entity, sizeof(entt::entity));
ImGui::EndDragDropSource();
}
ImGui::PopID();
ImGui::Text(selectable_name.c_str());
}
ImGui::EndTable();
}
ImGui::End();
}
} // raekor | 33.065789 | 146 | 0.55193 | nicovanbentum |
52645cd5fee7053d4352bdd350085e063bbafe5d | 1,017 | cpp | C++ | PORT3/Box/Point/Point.cpp | Kush12747/CSC122 | 36c6f1c0f4a3ddd035529043d51217ec22961c84 | [
"MIT"
] | null | null | null | PORT3/Box/Point/Point.cpp | Kush12747/CSC122 | 36c6f1c0f4a3ddd035529043d51217ec22961c84 | [
"MIT"
] | null | null | null | PORT3/Box/Point/Point.cpp | Kush12747/CSC122 | 36c6f1c0f4a3ddd035529043d51217ec22961c84 | [
"MIT"
] | null | null | null | #include <iostream>
#include <cmath>
#include "Point.h"
using namespace std;
//input function for (x,y) format
void Point::Input(std::istream& is)
{
char temp;
is >> temp >> x >> temp >> y >> temp;
return;
}
//output for (x,y) format
void Point::Output(std::ostream& os) const
{
os << '(' << x << ", " << y << ')';
return;
}
//calculate the distance between 2 points
double Point::distance(const Point& other)const
{
return sqrt(pow(other.x - x, 2.0) +
pow(other.y - y, 2.0));
}
//using setters functions
void Point::set_x(double new_x)
{
x = new_x;
return;
}
void Point::set_y(double new_y)
{
y = new_y;
return;
}
//function to flip points
Point Point::flip_x(void) const
{ return Point(x, -y); }
Point Point::flip_y(void) const
{ return Point(-x, y); }
//function to move points for x and y
Point Point::shift_x(double move_by) const
{ return Point(x + move_by, y); }
Point Point::shift_y(double move_by) const
{ return Point(x, y + move_by); }
| 21.1875 | 47 | 0.621436 | Kush12747 |
526e0d7be42cc896ae48eb68811aea75cfc4f063 | 442 | cpp | C++ | src/Records/STAT.cpp | Koncord/ESx-Reader | fa7887c934141f7b0a956417392f2b618165cc34 | [
"Apache-2.0"
] | 1 | 2022-03-01T19:17:33.000Z | 2022-03-01T19:17:33.000Z | src/Records/STAT.cpp | Koncord/ESx-Reader | fa7887c934141f7b0a956417392f2b618165cc34 | [
"Apache-2.0"
] | 8 | 2015-04-17T12:04:15.000Z | 2015-07-02T14:40:28.000Z | src/Records/STAT.cpp | Koncord/ESx-Reader | fa7887c934141f7b0a956417392f2b618165cc34 | [
"Apache-2.0"
] | 1 | 2022-03-01T19:17:36.000Z | 2022-03-01T19:17:36.000Z | /*
* File: STAT.cpp
* Author: Koncord <koncord at rwa.su>
*
* Created on 8 Апрель 2015 г., 21:57
*/
#include "STAT.hpp"
using namespace std;
bool RecordSTAT::DoParse()
{
const string subType = GetLabel();
if(subType == "EDID")
data.edid = GetString();
else if(subType == "OBND")
data.objectBounds = GetData<ObjectBounds>();
else if(ModelCollection()) {}
else return false;
return true;
}
| 17.68 | 52 | 0.608597 | Koncord |
52701db43a8bcfffe51f676b52a0ce8710d52aae | 622 | hpp | C++ | libs/camera/include/sge/camera/ortho_freelook/optional_projection_rectangle_fwd.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 2 | 2016-01-27T13:18:14.000Z | 2018-05-11T01:11:32.000Z | libs/camera/include/sge/camera/ortho_freelook/optional_projection_rectangle_fwd.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | null | null | null | libs/camera/include/sge/camera/ortho_freelook/optional_projection_rectangle_fwd.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 3 | 2018-05-11T01:11:34.000Z | 2021-04-24T19:47:45.000Z | // Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef SGE_CAMERA_ORTHO_FREELOOK_OPTIONAL_PROJECTION_RECTANGLE_FWD_HPP_INCLUDED
#define SGE_CAMERA_ORTHO_FREELOOK_OPTIONAL_PROJECTION_RECTANGLE_FWD_HPP_INCLUDED
#include <sge/renderer/projection/rect_fwd.hpp>
#include <fcppt/optional/object_fwd.hpp>
namespace sge::camera::ortho_freelook
{
using optional_projection_rectangle = fcppt::optional::object<sge::renderer::projection::rect>;
}
#endif
| 31.1 | 95 | 0.790997 | cpreh |
527428aef2ea21c9089c421310c198be0f7bcab4 | 16,949 | cpp | C++ | src/renderer/render.cpp | infosia/Raster | e53a6f9c10212ec50951198496800a866f40aaca | [
"MIT"
] | null | null | null | src/renderer/render.cpp | infosia/Raster | e53a6f9c10212ec50951198496800a866f40aaca | [
"MIT"
] | null | null | null | src/renderer/render.cpp | infosia/Raster | e53a6f9c10212ec50951198496800a866f40aaca | [
"MIT"
] | null | null | null | /* distributed under MIT license:
*
* Copyright (c) 2022 Kota Iguchi
*
* 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 "renderer/render.h"
#include "pch.h"
#include "observer.h"
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb_image.h>
#include <stb_image_write.h>
#include <chrono>
#include <map>
#include <sstream>
namespace renderer
{
static void generateVignette(Image *dst, const Color bgColor)
{
const auto R = bgColor.R();
const auto B = bgColor.B();
const auto G = bgColor.G();
const auto width = dst->width;
const auto height = dst->height;
for (uint32_t x = 0; x < width; ++x) {
for (uint32_t y = 0; y < height; ++y) {
const auto srcColor = dst->get(x, y);
// Stop filling when pixel is already painted
if (srcColor.A() != 0)
continue;
const float distance = sqrtf(powf((x - width / 2.f), 2) + powf((y - height / 2.f), 2));
const float factor = (height - distance) / height;
Color newColor = Color(R * factor, G * factor, B * factor, 255);
dst->set(x, y, newColor);
}
}
}
static void generateSSAA(Image *dst, const Image *src, uint8_t kernelSize = 2)
{
const uint8_t sq = kernelSize * kernelSize;
dst->reset(src->width / kernelSize, src->height / kernelSize, src->format);
for (uint32_t x = 0; x < dst->width; ++x) {
for (uint32_t y = 0; y < dst->height; ++y) {
uint32_t xx = x * kernelSize;
uint32_t yy = y * kernelSize;
uint32_t R = 0, G = 0, B = 0;
for (int i = 0; i < kernelSize; ++i) {
for (int j = 0; j < kernelSize; ++j) {
Color c = src->get(xx + i, yy + j);
R += c.R();
G += c.G();
B += c.B();
}
}
R /= (float)sq;
G /= (float)sq;
B /= (float)sq;
Color newColor = Color((uint8_t)R, (uint8_t)G, (uint8_t)B, 255);
dst->set(x, y, newColor);
}
}
}
static glm::vec3 barycentric(glm::vec3 &a, glm::vec3 &b, glm::vec3 &c, glm::vec3 &p)
{
const auto v0 = b - a;
const auto v1 = c - a;
const float denom = 1.0f / (v0.x * v1.y - v1.x * v0.y);
const auto v2 = p - a;
const float v = (v2.x * v1.y - v1.x * v2.y) * denom;
const float w = (v0.x * v2.y - v2.x * v0.y) * denom;
const float u = 1.0f - v - w;
return glm::vec3(u, v, w);
}
inline bool inBounds(int x, int y, int width, int height)
{
return (0 <= x && x < width) && (0 <= y && y < height);
}
inline bool isInTriangle(const glm::vec3 tri[3], int width, int height)
{
return inBounds(tri[0].x, tri[0].y, width, height)
|| inBounds(tri[1].x, tri[1].y, width, height)
|| inBounds(tri[2].x, tri[2].y, width, height);
}
inline glm::mat4 getModelMatrix(const Model &model)
{
return glm::translate(model.translation) * glm::toMat4(model.rotation) * glm::scale(model.scale) * glm::mat4(1.f);
}
inline glm::mat4 getViewMatrix(const Camera &camera)
{
glm::vec3 translation = -camera.translation;
translation.z = -translation.z; // Z+
return glm::translate(translation) * glm::toMat4(camera.rotation) * glm::scale(camera.scale);
}
inline glm::mat4 getOrthoMatrix(float width, float height, float near, float far)
{
const float aspect = width / height;
return glm::ortho(aspect, -aspect, 1.f, -1.f, near, far);
}
inline glm::mat4 getPerspectiveMatrix(float width, float height, float fov, float near, float far)
{
return glm::perspectiveFov(glm::radians(fov), width, height, near, far);
}
inline glm::mat4 getProjectionMatrix(uint32_t width, uint32_t height, Camera camera)
{
if (camera.mode == Projection::Orthographic) {
return getOrthoMatrix((float)width, (float)height, camera.znear, camera.zfar);
}
return getPerspectiveMatrix((float)width, (float)height, camera.fov, camera.znear, camera.zfar);
}
inline glm::uvec4 bb(const glm::vec3 tri[3], const int width, const int height)
{
int left = std::min(tri[0].x, std::min(tri[1].x, tri[2].x));
int right = std::max(tri[0].x, std::max(tri[1].x, tri[2].x));
int bottom = std::min(tri[0].y, std::min(tri[1].y, tri[2].y));
int top = std::max(tri[0].y, std::max(tri[1].y, tri[2].y));
left = std::max(left, 0);
right = std::min(right, width - 1);
bottom = std::max(bottom, 0);
top = std::min(top, height - 1);
return glm::uvec4{ left, bottom, right, top };
}
inline bool backfacing(const glm::vec3 tri[3])
{
const auto &a = tri[0];
const auto &b = tri[1];
const auto &c = tri[2];
return (a.x * b.y - a.y * b.x + b.x * c.y - b.y * c.x + c.x * a.y - c.y * a.x) > 0;
}
inline void drawBB(Shader *shader, ShaderContext &ctx, const glm::uvec4 &bbox, glm::vec3 tri[3], glm::vec3 depths)
{
const auto width = shader->framebuffer.width;
const auto height = shader->framebuffer.height;
for (auto y = bbox.y; y != bbox.w + 1; ++y) {
for (auto x = bbox.x; x != bbox.z + 1; ++x) {
auto p = glm::vec3(x, y, 1.f);
glm::vec3 bcoords = barycentric(tri[0], tri[1], tri[2], p);
if (bcoords.x >= 0.0f && bcoords.y >= 0.0f && bcoords.z >= 0.0f) {
const float frag_depth = glm::dot(bcoords, depths);
if (inBounds(x, y, width, height) && frag_depth > shader->zbuffer.at(x + y * width)) {
Color color(0, 0, 0, 0);
const auto discarded = shader->fragment(ctx, bcoords, p, backfacing(tri), color);
if (discarded)
continue;
shader->zbuffer[x + y * width] = frag_depth;
shader->framebuffer.set(x, y, color);
}
}
}
}
}
struct RenderOp
{
RenderOptions *options;
Shader *shader;
ShaderContext *ctx;
Node *node;
Primitive *primitive;
};
static void queue(RenderOptions &options, Shader *shader, ShaderContext &ctx, Node *node, std::map<uint32_t, std::vector<RenderOp>> *renderQueue)
{
if (node->mesh) {
for (auto &primitive : node->mesh->primitives) {
RenderOp op{ &options, shader, &ctx, node, &primitive };
if (primitive.material && primitive.material->vrm0) {
const auto vrm0 = primitive.material->vrm0;
const auto iter = renderQueue->find(vrm0->renderQueue);
if (iter == renderQueue->end()) {
std::vector<RenderOp> queue{ op };
renderQueue->emplace(vrm0->renderQueue, queue);
} else {
iter->second.push_back(op);
}
} else {
const auto iter = renderQueue->find(0);
if (iter == renderQueue->end()) {
std::vector<RenderOp> queue{ op };
renderQueue->emplace(0, queue);
} else {
iter->second.push_back(op);
}
}
}
}
for (const auto child : node->children) {
queue(options, shader, ctx, child, renderQueue);
}
}
static void draw(RenderOp *op)
{
const auto node = op->node;
const auto shader = op->shader;
auto &ctx = *op->ctx;
if (node->skin)
shader->jointMatrices = node->skin->jointMatrices.data();
else
shader->bindMatrix = &node->bindMatrix;
if (node->mesh) {
shader->morphs = &node->mesh->morphs;
shader->primitive = op->primitive;
const uint32_t num_faces = op->primitive->numFaces();
for (uint32_t i = 0; i < num_faces; i++) {
glm::vec3 tri[3] = {
shader->vertex(ctx, i, 0),
shader->vertex(ctx, i, 1),
shader->vertex(ctx, i, 2),
};
const glm::vec3 depths(tri[0].z, tri[1].z, tri[2].z);
if (isInTriangle(tri, shader->framebuffer.width, shader->framebuffer.height)) {
drawBB(shader, ctx, bb(tri, shader->framebuffer.width, shader->framebuffer.height), tri, depths);
}
}
}
}
static void draw(const RenderOptions &options, Shader *shader, ShaderContext &ctx, Node *node)
{
if (node->skin)
shader->jointMatrices = node->skin->jointMatrices.data();
else
shader->bindMatrix = &node->bindMatrix;
if (node->mesh) {
Observable::notifyMessage(SubjectType::Info, "Rendering " + node->name);
shader->morphs = &node->mesh->morphs;
for (const auto &primitive : node->mesh->primitives) {
shader->primitive = &primitive;
const uint32_t num_faces = primitive.numFaces();
for (uint32_t i = 0; i < num_faces; i++) {
glm::vec3 tri[3] = {
shader->vertex(ctx, i, 0),
shader->vertex(ctx, i, 1),
shader->vertex(ctx, i, 2),
};
const glm::vec3 depths(tri[0].z, tri[1].z, tri[2].z);
if (isInTriangle(tri, shader->framebuffer.width, shader->framebuffer.height)) {
drawBB(shader, ctx, bb(tri, shader->framebuffer.width, shader->framebuffer.height), tri, depths);
}
}
}
}
for (const auto child : node->children) {
draw(options, shader, ctx, child);
}
}
bool save(std::string filename, Image &framebuffer)
{
return stbi_write_png(filename.c_str(), framebuffer.width, framebuffer.height, framebuffer.format, framebuffer.buffer(), 0) != 0;
}
bool render(Scene &scene, Image &framebuffer)
{
Observable::notifyProgress(0.0f);
const auto start = std::chrono::system_clock::now();
ShaderContext ctx;
RenderOptions &options = scene.options;
const uint32_t width = options.width * (options.ssaa ? options.ssaaKernelSize : 1);
const uint32_t height = options.height * (options.ssaa ? options.ssaaKernelSize : 1);
Camera &camera = options.camera;
ctx.projection = getProjectionMatrix(width, height, camera);
ctx.view = getViewMatrix(camera);
ctx.model = getModelMatrix(options.model);
ctx.bgColor = options.background;
ctx.camera = camera;
ctx.light = scene.light;
auto zbuffer = std::vector<float>(width * height, std::numeric_limits<float>::min());
framebuffer.reset(width, height, options.format);
DefaultShader standard;
OutlineShader outline;
std::vector<Shader *> shaders{ &standard };
if (options.outline) {
shaders.push_back(&outline);
}
Observable::notifyProgress(0.1f);
std::vector<std::map<uint32_t, std::vector<RenderOp>>> renderQueues;
renderQueues.resize(shaders.size());
#pragma omp parallel for
for (int i = 0; i < shaders.size(); ++i) {
const auto shader = shaders.at(i);
shader->zbuffer = std::vector<float>(width * height, std::numeric_limits<float>::min());
shader->framebuffer.reset(width, height, options.format);
for (auto node : scene.children) {
queue(options, shader, ctx, node, &renderQueues.at(i));
}
}
Observable::notifyProgress(0.2f);
#pragma omp parallel for
for (int i = 0; i < shaders.size(); ++i) {
const auto shader = shaders.at(i);
auto &renderQueue = renderQueues.at(i);
for (auto &queue : renderQueue) {
std::stringstream ss;
ss << "RenderQueue " << queue.first;
Observable::notifyMessage(SubjectType::Info, ss.str());
auto &ops = queue.second;
// z sort for alpha blending
std::sort(ops.begin(), ops.end(), [](RenderOp a, RenderOp b) {
return a.primitive->center.z < b.primitive->center.z;
});
for (auto &op : ops) {
draw(&op);
}
}
}
Observable::notifyProgress(0.7f);
auto dst = framebuffer.buffer();
const auto stride = options.format;
for (uint32_t i = 0; i < zbuffer.size(); ++i) {
for (auto shader : shaders) {
const auto src = shader->framebuffer.buffer();
const auto current = i * stride;
const auto dstDepth = zbuffer.at(i);
const auto srcDepth = shader->zbuffer.at(i);
if (dstDepth < srcDepth) {
zbuffer[i] = srcDepth;
// mix color when alpha is color is set (Used by outline for now)
if (stride == Image::Format::RGBA && (src + current)[3] != 255) {
const auto srcColor = Color(src + current, stride);
const auto dstColor = Color(dst + current, stride);
const auto alpha = srcColor.Af();
Color dstAColor = dstColor * (1.f - alpha);
Color srcAColor = srcColor * alpha;
auto mixed = dstAColor + srcAColor;
memcpy(dst + current, mixed.buffer(), stride);
} else {
memcpy(dst + current, src + current, stride);
}
}
}
}
Observable::notifyProgress(0.8f);
if (options.vignette) {
Observable::notifyMessage(SubjectType::Info, "Generating Vignette");
generateVignette(&framebuffer, ctx.bgColor);
} else {
// Fill the background anywhere pixel alpha equals zero
framebuffer.fill(ctx.bgColor);
}
Observable::notifyProgress(0.9f);
if (options.ssaa) {
Observable::notifyMessage(SubjectType::Info, "Generating SSAA");
Image tmp(options.width, options.height, options.format);
generateSSAA(&tmp, &framebuffer, options.ssaaKernelSize);
framebuffer.reset(options.width, options.height, options.format);
framebuffer.copy(tmp);
}
const auto msec = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - start).count();
Observable::notifyMessage(SubjectType::Info, "Rendering done in " + std::to_string(msec) + " msec");
Observable::notifyProgress(1.f);
return true;
}
}
| 38.963218 | 150 | 0.518792 | infosia |
527a5477df3948238a67398ef99b72c8c6744789 | 1,462 | hpp | C++ | src/algorithms/math/sum_of_multiples.hpp | iamantony/CppNotes | 2707db6560ad80b0e5e286a04b2d46e5c0280b3f | [
"MIT"
] | 2 | 2020-07-31T14:13:56.000Z | 2021-02-03T09:51:43.000Z | src/algorithms/math/sum_of_multiples.hpp | iamantony/CppNotes | 2707db6560ad80b0e5e286a04b2d46e5c0280b3f | [
"MIT"
] | 28 | 2015-09-22T07:38:21.000Z | 2018-10-02T11:00:58.000Z | src/algorithms/math/sum_of_multiples.hpp | iamantony/CppNotes | 2707db6560ad80b0e5e286a04b2d46e5c0280b3f | [
"MIT"
] | 2 | 2018-10-11T14:10:50.000Z | 2021-02-27T08:53:50.000Z | #ifndef SUM_OF_MULTIPLES_OF_3_AND_5_HPP
#define SUM_OF_MULTIPLES_OF_3_AND_5_HPP
// https://projecteuler.net/problem=1
// If we list all the natural numbers below 10 that are multiples of 3 or 5,
// we get 3, 5, 6 and 9. The sum of these multiples is 23.
// Find the sum of all the multiples of 3 or 5 below 1000.
// Answer: 233168
#include <iostream>
#include <vector>
#include <algorithm>
namespace SumOfMultiples {
class Solution {
public:
unsigned int SumOfMultiples(const unsigned int& first,
const unsigned int& second,
const unsigned int& limit) {
unsigned int sumFirst = SumOfNumbersDivisebleByN(first, limit);
unsigned int sumSecond = SumOfNumbersDivisebleByN(second, limit);
unsigned int sumMultFirstSecond =
SumOfNumbersDivisebleByN(first * second, limit);
return sumFirst + sumSecond - sumMultFirstSecond;
}
private:
// Example: 3 and 1000 (non-inclusive)
// (1000 - 1) / 3 = 333 - number of multiples
// 3 + 6 + 9 + ... + 999 - 333 numbers
// 3 + 6 + 9 + ... + 999 ==
// 3 * (1 + 2 + 3 + ... + 333) ==
// 3 * 333 * (333 + 1) / 2
unsigned int SumOfNumbersDivisebleByN(const unsigned int& n,
const unsigned int& limit) {
unsigned int p = (limit -1) / n;
return (n * p * (p + 1)) / 2;
}
};
}
#endif // SUM_OF_MULTIPLES_OF_3_AND_5_HPP
| 31.106383 | 76 | 0.602599 | iamantony |
527bdf32aa48375a0031e961fc8f563997fa6425 | 4,575 | cpp | C++ | Engine/Source/Vulkan/VulkanRHICache.cpp | DanDanCool/GameEngine | 9afae8bc31c7e34b9afde0f01a5735607eb7870e | [
"Apache-2.0"
] | 1 | 2021-09-20T01:50:29.000Z | 2021-09-20T01:50:29.000Z | Engine/Source/Vulkan/VulkanRHICache.cpp | DanDanCool/GameEngine | 9afae8bc31c7e34b9afde0f01a5735607eb7870e | [
"Apache-2.0"
] | null | null | null | Engine/Source/Vulkan/VulkanRHICache.cpp | DanDanCool/GameEngine | 9afae8bc31c7e34b9afde0f01a5735607eb7870e | [
"Apache-2.0"
] | null | null | null | #include "VulkanRHICache.h"
#include "jpch.h"
#include "VulkanContext.h"
#include "VulkanPipeline.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
namespace VKRHI
{
VulkanRHICache::VulkanRHICache()
: m_VertexBuffer()
, m_IndexBuffer()
, m_ProjectionMatrix()
, m_DescriptorPool(VK_NULL_HANDLE)
, m_DescriptorSets()
, m_Context(nullptr)
, m_bDirty(false)
{
}
void VulkanRHICache::Init(VulkanContext* context)
{
m_Context = context;
glm::mat4 proj = glm::ortho(-16.0f / 9.0f, 16.0f / 9.0f, -1.0f, 1.0f);
// proj[1][1] *= -1;
BufferInfo bufferInfo{};
bufferInfo.Usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
bufferInfo.Size = sizeof(proj);
bufferInfo.MemoryFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
m_ProjectionMatrix = m_Context->GetRHI().CreateBuffer(bufferInfo);
m_ProjectionMatrix.SetData(sizeof(proj), &proj);
m_Framebuffers = m_Context->GetSwapchain()->CreateFramebuffers(m_Context->GetPipeline()->GetRenderPass());
// really bad
{
BufferInfo vbInfo;
vbInfo.Size = 100 * sizeof(float);
vbInfo.Usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
vbInfo.MemoryFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
BufferInfo ibInfo;
ibInfo.Size = 100 * sizeof(uint16_t);
ibInfo.Usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT;
ibInfo.MemoryFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
m_VertexBuffer = m_Context->GetRHI().CreateBuffer(vbInfo);
m_IndexBuffer = m_Context->GetRHI().CreateBuffer(ibInfo);
}
// create the descriptor sets
VkDescriptorPoolSize poolSize{};
poolSize.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
poolSize.descriptorCount = (uint32_t)m_Framebuffers.size();
VkDescriptorPoolCreateInfo descriptorPoolInfo{};
descriptorPoolInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
descriptorPoolInfo.poolSizeCount = 1;
descriptorPoolInfo.pPoolSizes = &poolSize;
descriptorPoolInfo.maxSets = (uint32_t)m_Framebuffers.size();
VkDevice device = m_Context->GetRHI().GetDevice().GetHandle();
VkResult result = vkCreateDescriptorPool(device, &descriptorPoolInfo, nullptr, &m_DescriptorPool);
assert(result == VK_SUCCESS);
std::vector<VkDescriptorSetLayout> layouts(m_Framebuffers.size(),
m_Context->GetPipeline()->GetDescriptorSetLayout());
VkDescriptorSetAllocateInfo allocateInfo{};
allocateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
allocateInfo.descriptorPool = m_DescriptorPool;
allocateInfo.descriptorSetCount = (uint32_t)m_Framebuffers.size();
allocateInfo.pSetLayouts = layouts.data();
m_DescriptorSets.resize(m_Framebuffers.size());
result = vkAllocateDescriptorSets(device, &allocateInfo, m_DescriptorSets.data());
assert(result == VK_SUCCESS);
for (size_t i = 0; i < m_DescriptorSets.size(); i++)
{
VkDescriptorBufferInfo bufferInfo{};
bufferInfo.buffer = m_ProjectionMatrix.GetHandle();
bufferInfo.offset = 0;
bufferInfo.range = sizeof(glm::mat4);
VkWriteDescriptorSet descriptorWrite{};
descriptorWrite.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
descriptorWrite.dstSet = m_DescriptorSets[i];
descriptorWrite.dstBinding = 0;
descriptorWrite.dstArrayElement = 0;
descriptorWrite.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
descriptorWrite.descriptorCount = 1;
descriptorWrite.pBufferInfo = &bufferInfo;
vkUpdateDescriptorSets(device, 1, &descriptorWrite, 0, nullptr);
}
}
void VulkanRHICache::Shutdown()
{
VkDevice device = m_Context->GetRHI().GetDevice().GetHandle();
for (auto& framebuffer : m_Framebuffers)
framebuffer.Free(device);
vkDestroyDescriptorPool(device, m_DescriptorPool, nullptr);
m_VertexBuffer.Free();
m_IndexBuffer.Free();
m_ProjectionMatrix.Free();
}
} // namespace VKRHI
| 38.125 | 114 | 0.64612 | DanDanCool |
528122c614618d2ecdc2c0adc4921b30e8978edd | 6,884 | cpp | C++ | awsconnection.cpp | recaisinekli/aws-iot-device-sdk-qt-integration | 9ba0b3aa4509e72667f3ccc58f3d0eee2c1f861c | [
"Apache-2.0"
] | null | null | null | awsconnection.cpp | recaisinekli/aws-iot-device-sdk-qt-integration | 9ba0b3aa4509e72667f3ccc58f3d0eee2c1f861c | [
"Apache-2.0"
] | null | null | null | awsconnection.cpp | recaisinekli/aws-iot-device-sdk-qt-integration | 9ba0b3aa4509e72667f3ccc58f3d0eee2c1f861c | [
"Apache-2.0"
] | null | null | null | #include "awsconnection.h"
AWSConnection::AWSConnection(QObject *parent) : QObject(parent)
{
}
bool AWSConnection::init(){
bool state = true;
Io::EventLoopGroup eventLoopGroup(1);
if (!eventLoopGroup)
{
fprintf(stderr, "Event Loop Group Creation failed with error %s\n", ErrorDebugString(eventLoopGroup.LastError()));
state = false;
}
Aws::Crt::Io::DefaultHostResolver defaultHostResolver(eventLoopGroup, 1, 5);
Io::ClientBootstrap bootstrap(eventLoopGroup, defaultHostResolver);
if (!bootstrap)
{
fprintf(stderr, "ClientBootstrap failed with error %s\n", ErrorDebugString(bootstrap.LastError()));
state = false;
}
Aws::Iot::MqttClientConnectionConfigBuilder builder;
builder = Aws::Iot::MqttClientConnectionConfigBuilder(m_path_to_crt.toStdString().c_str(), m_path_to_private_key.toStdString().c_str());
builder.WithCertificateAuthority(m_path_to_ca.toStdString().c_str());
builder.WithEndpoint(m_endpoint.toStdString().c_str());
auto clientConfig = builder.Build();
if (!clientConfig)
{
fprintf(stderr,"Client Configuration initialization failed with error %s\n",ErrorDebugString(clientConfig.LastError()));
state = false;
}
m_mqttClient = new Aws::Iot::MqttClient(bootstrap);
if (!m_mqttClient)
{
fprintf(stderr, "MQTT Client Creation failed with error %s\n", ErrorDebugString(m_mqttClient->LastError()));
state = false;
}
m_connection = m_mqttClient->NewConnection(clientConfig);
if (!m_connection)
{
fprintf(stderr, "MQTT Connection Creation failed with error %s\n", ErrorDebugString(m_mqttClient->LastError()));
state = false;
}
auto onConnectionCompleted = [&](Mqtt::MqttConnection &, int errorCode, Mqtt::ReturnCode returnCode, bool) {
if (errorCode)
{
fprintf(stdout, "Connection failed with error %s\n", ErrorDebugString(errorCode));
connectionCompletedPromise.set_value(false);
}
else
{
if (returnCode != AWS_MQTT_CONNECT_ACCEPTED)
{
fprintf(stdout, "Connection failed with mqtt return code %d\n", (int)returnCode);
connectionCompletedPromise.set_value(false);
}
else
{
fprintf(stdout, "Connection completed successfully.\n");
connectionCompletedPromise.set_value(true);
}
}
};
auto onInterrupted = [&](Mqtt::MqttConnection &, int error) {
fprintf(stdout, "Connection interrupted with error %s\n", ErrorDebugString(error));
};
auto onResumed = [&](Mqtt::MqttConnection &, Mqtt::ReturnCode, bool) { fprintf(stdout, "Connection resumed\n"); };
auto onDisconnect = [&](Mqtt::MqttConnection &) {
{
fprintf(stdout, "Disconnect completed\n");
connectionClosedPromise.set_value();
}
};
m_connection->OnConnectionCompleted = std::move(onConnectionCompleted);
m_connection->OnDisconnect = std::move(onDisconnect);
m_connection->OnConnectionInterrupted = std::move(onInterrupted);
m_connection->OnConnectionResumed = std::move(onResumed);
String topic(m_topic.toStdString().c_str());
String clientId(String("test-") + Aws::Crt::UUID().ToString());
qDebug()<<"Connecting...\n";
if (!m_connection->Connect(clientId.c_str(), false, 1000))
{
fprintf(stderr, "MQTT Connection failed with error %s\n", ErrorDebugString(m_connection->LastError()));
state = false;
}
if (connectionCompletedPromise.get_future().get())
{
auto onMessage = [&](Mqtt::MqttConnection &,
const String &topic,
const ByteBuf &byteBuf,
bool,
Mqtt::QOS,
bool) {
QString _topic = QString(topic.c_str());
QString _message = QString::fromUtf8(reinterpret_cast<char *>(byteBuf.buffer), byteBuf.len);
this->message_received_func(_message);
};
std::promise<void> subscribeFinishedPromise;
auto onSubAck =
[&](Mqtt::MqttConnection &, uint16_t packetId, const String &topic, Mqtt::QOS QoS, int errorCode) {
if (errorCode)
{
fprintf(stderr, "Subscribe failed with error %s\n", aws_error_debug_str(errorCode));
state = false;
}
else
{
if (!packetId || QoS == AWS_MQTT_QOS_FAILURE)
{
fprintf(stderr, "Subscribe rejected by the broker.");
state = false;
}
else
{
fprintf(stdout, "Subscribe on topic %s on packetId %d Succeeded\n", topic.c_str(), packetId);
}
}
subscribeFinishedPromise.set_value();
};
m_connection->Subscribe(topic.c_str(), AWS_MQTT_QOS_AT_LEAST_ONCE, onMessage, onSubAck);
subscribeFinishedPromise.get_future().wait();
}
return state;
}
void AWSConnection::unsubscribe(){
std::promise<void> unsubscribeFinishedPromise;
m_connection->Unsubscribe(
m_topic.toStdString().c_str(), [&](Mqtt::MqttConnection &, uint16_t, int) { unsubscribeFinishedPromise.set_value(); });
unsubscribeFinishedPromise.get_future().wait();
}
void AWSConnection::disconnect(){
if (m_connection->Disconnect())
{
connectionClosedPromise.get_future().wait();
}
}
void AWSConnection::set_crt_path(QString crt_path){
m_path_to_crt = crt_path;
}
void AWSConnection::set_ca_path(QString ca_path){
m_path_to_ca = ca_path;
}
void AWSConnection::set_private_key_path(QString key_path){
m_path_to_private_key = key_path;
}
void AWSConnection::set_enpoint(QString endpoint){
m_endpoint = endpoint;
}
void AWSConnection::set_topic(QString topic){
m_topic = topic;
}
void AWSConnection::message_received_func(QString message){
emit message_received_signal(message);
}
void AWSConnection::send_message(QString message){
std::string input = message.toStdString().c_str();
ByteBuf payload = ByteBufNewCopy(DefaultAllocator(), (const uint8_t *)input.data(), input.length());
ByteBuf *payloadPtr = &payload;
auto onPublishComplete = [payloadPtr](Mqtt::MqttConnection &, uint16_t packetId, int errorCode) {
aws_byte_buf_clean_up(payloadPtr);
if (packetId)
{
fprintf(stdout, "Operation on packetId %d Succeeded\n", packetId);
}
else
{
fprintf(stdout, "Operation failed with error %s\n", aws_error_debug_str(errorCode));
}
};
m_connection->Publish(m_topic.toStdString().c_str(), AWS_MQTT_QOS_AT_LEAST_ONCE, false, payload, onPublishComplete);
}
| 32.780952 | 140 | 0.633934 | recaisinekli |
5281c30c6b6d7bd81ef9284c262126f764d9ad0c | 4,170 | cpp | C++ | src/gameoflife_test.cpp | meteoritenhagel/conways_game_of_life | 5a15cc008b9e7b700cd1c900bcc2509a3a22f233 | [
"MIT"
] | null | null | null | src/gameoflife_test.cpp | meteoritenhagel/conways_game_of_life | 5a15cc008b9e7b700cd1c900bcc2509a3a22f233 | [
"MIT"
] | null | null | null | src/gameoflife_test.cpp | meteoritenhagel/conways_game_of_life | 5a15cc008b9e7b700cd1c900bcc2509a3a22f233 | [
"MIT"
] | null | null | null | #include "gameoflife_test.h"
#include "gameoflife.h"
#include <iostream>
void GameOfLife_Test::testAll()
{
// invoke all tests
testTogglingCellStatus();
testNeighbourUpdateWhenAddingCell();
testNeighbourUpdateWhenAddingAndRemovingCell();
testComplexGridNeighbours();
}
void GameOfLife_Test::testTogglingCellState()
{
bool testPassed = true;
GameOfLife game(5, 5);
const GameOfLife::SizeType i_toggle = 2;
const GameOfLife::SizeType j_toggle = 3;
// toggle cell
game.toggleCellState(i_toggle, j_toggle);
// check if everything is correct
// only the toggled cell should be alive
for (GameOfLife::SizeType i = 0; i < game.getHeight(); ++i)
for (GameOfLife::SizeType j = 0; j < game.getWidth(); ++j)
{
if (i == i_toggle && j == j_toggle)
testPassed = testPassed && game.isCellAlive(i, j);
else
testPassed = testPassed && !(game.isCellAlive(i, j));
}
std::cout << "testTogglingCellStatus: " << testPassedMessage[testPassed] << std::endl;
return;
}
void GameOfLife_Test::testNeighbourUpdateWhenAddingCell()
{
bool testPassed = true;
const int size = 5;
GameOfLife game(size, size);
// toggle two cells
game.toggleCellState(2, 3);
game.toggleCellState(1, 1);
// test against manually calculated grid of neighbours
const int correctNeighbours[size][size] = {1, 1, 1, 0, 0,
1, 0, 2, 1, 1,
1, 1, 2, 0, 1,
0, 0, 1, 1, 1,
0, 0, 0, 0, 0};
for (GameOfLife::SizeType i = 0; i < game.getHeight(); ++i)
for (GameOfLife::SizeType j = 0; j < game.getWidth(); ++j)
testPassed = testPassed && (game.getNumberOfNeighbours(i, j) == correctNeighbours[i][j]);
std::cout << "testNeighbourUpdateWhenAddingCell: " << testPassedMessage[testPassed] << std::endl;
return;
}
void GameOfLife_Test::testNeighbourUpdateWhenAddingAndRemovingCell()
{
bool testPassed = true;
const int size = 5;
GameOfLife game(size, size);
// toggle cells
game.toggleCellState(2, 3);
game.toggleCellState(1, 1);
game.toggleCellState(2, 3);
// test against manually calculated grid of neighbours
const int correctNeighbours[size][size] = {
1, 1, 1, 0, 0,
1, 0, 1, 0, 0,
1, 1, 1, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0
};
for (GameOfLife::SizeType i = 0; i < game.getHeight(); ++i)
for (GameOfLife::SizeType j = 0; j < game.getWidth(); ++j)
testPassed = testPassed && (game.getNumberOfNeighbours(i, j) == correctNeighbours[i][j]);
std::cout << "testNeighbourUpdateWhenAddingAndRemovingCell: " << testPassedMessage[testPassed] << std::endl;
return;
}
void GameOfLife_Test::testComplexGridNeighbours()
{
bool testPassed = true;
const int size = 5;
GameOfLife game(size, size);
// toggle cells
game.toggleCellState(0, 1);
game.toggleCellState(1, 0);
game.toggleCellState(1, 1);
game.toggleCellState(1, 3);
game.toggleCellState(2, 0);
game.toggleCellState(2, 2);
game.toggleCellState(3, 3);
game.toggleCellState(4, 0);
game.toggleCellState(4, 1);
game.toggleCellState(4, 2);
game.toggleCellState(4, 4);
// test against manually calculated grid of neighbours
const int correctNeighbours[size][size] = {
3, 2, 3, 1, 1,
3, 4, 4, 1, 1,
2, 4, 3, 3, 2,
3, 5, 4, 3, 2,
1, 2, 2, 3, 1
};
for (GameOfLife::SizeType i = 0; i < game.getHeight(); ++i)
for (GameOfLife::SizeType j = 0; j < game.getWidth(); ++j)
testPassed = testPassed && (game.getNumberOfNeighbours(i, j) == correctNeighbours[i][j]);
std::cout << "testComplexGridNeighbours: " << testPassedMessage[testPassed] << std::endl;
return;
}
std::map<bool, std::string> GameOfLife_Test::testPassedMessage = {
{true, "passed"},
{false, "FAILED"}
};
| 29.785714 | 112 | 0.584892 | meteoritenhagel |
52847f6a8298ad61698f6ed0084b9342f6b08fc5 | 762 | hpp | C++ | test/src/Algorithm/FindIf.hpp | changjurhee/CppML | 6d4cc6d0dd2fa3055823f191dc7fe953e4966fc5 | [
"MIT"
] | 48 | 2019-05-14T10:07:08.000Z | 2021-04-08T08:26:20.000Z | test/src/Algorithm/FindIf.hpp | changjurhee/CppML | 6d4cc6d0dd2fa3055823f191dc7fe953e4966fc5 | [
"MIT"
] | null | null | null | test/src/Algorithm/FindIf.hpp | changjurhee/CppML | 6d4cc6d0dd2fa3055823f191dc7fe953e4966fc5 | [
"MIT"
] | 4 | 2019-11-18T15:35:32.000Z | 2021-12-02T05:23:04.000Z | #include "CppML/CppML.hpp"
namespace FindIfTest {
template <typename T> using Predicate = ml::f<ml::IsSame<>, char, T>;
template <typename T> struct R {};
void run() {
{
using T = ml::f<ml::FindIf<ml::F<Predicate>, ml::F<R>>, int, char, bool>;
static_assert(std::is_same<T, R<char>>::value,
"FindIf with a non-empty pack 1");
}
{
using T =
ml::f<ml::FindIf<ml::F<Predicate>, ml::F<R>>, int, double, int, char>;
static_assert(std::is_same<T, R<char>>::value,
"FindIf with a non-empty pack 2");
}
{
using T = ml::f<ml::FindIf<ml::F<Predicate>, ml::F<R>>>;
static_assert(std::is_same<T, R<ml::None>>::value,
"FindIf with empty pack");
}
}
} // namespace FindIfTest
| 29.307692 | 78 | 0.568241 | changjurhee |
528487b78082d510660b1cc934f048ec41668cab | 32,568 | hxx | C++ | couchbase/errors.hxx | jrawsthorne/couchbase-cxx-client | b8fea51f900af80abe09cbdda90aef944b05c10a | [
"Apache-2.0"
] | null | null | null | couchbase/errors.hxx | jrawsthorne/couchbase-cxx-client | b8fea51f900af80abe09cbdda90aef944b05c10a | [
"Apache-2.0"
] | null | null | null | couchbase/errors.hxx | jrawsthorne/couchbase-cxx-client | b8fea51f900af80abe09cbdda90aef944b05c10a | [
"Apache-2.0"
] | null | null | null | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2020-2021 Couchbase, 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.
*/
#pragma once
#include <system_error>
namespace couchbase::error
{
enum class common_errc {
/// A request is cancelled and cannot be resolved in a non-ambiguous way. Most likely the request is in-flight on the socket and the
/// socket gets closed.
request_canceled = 2,
/// It is unambiguously determined that the error was caused because of invalid arguments from the user.
/// Usually only thrown directly when doing request arg validation
invalid_argument = 3,
/// It can be determined from the config unambiguously that a given service is not available. I.e. no query node in the config, or a
/// memcached bucket is accessed and views or n1ql queries should be performed
service_not_available = 4,
/// Query: Error range 5xxx
/// Analytics: Error range 25xxx
/// KV: error code ERR_INTERNAL (0x84)
/// Search: HTTP 500
internal_server_failure = 5,
/// Query: Error range 10xxx
/// Analytics: Error range 20xxx
/// View: HTTP status 401
/// KV: error code ERR_ACCESS (0x24), ERR_AUTH_ERROR (0x20), AUTH_STALE (0x1f)
/// Search: HTTP status 401, 403
authentication_failure = 6,
/// Analytics: Errors: 23000, 23003
/// KV: Error code ERR_TMPFAIL (0x86), ERR_BUSY (0x85) ERR_OUT_OF_MEMORY (0x82), ERR_NOT_INITIALIZED (0x25)
temporary_failure = 7,
/// Query: code 3000
/// Analytics: codes 24000
parsing_failure = 8,
/// KV: ERR_EXISTS (0x02) when replace or remove with cas
/// Query: code 12009
cas_mismatch = 9,
/// A request is made but the current bucket is not found
bucket_not_found = 10,
/// A request is made but the current collection (including scope) is not found
collection_not_found = 11,
/// KV: 0x81 (unknown command), 0x83 (not supported)
unsupported_operation = 12,
/// A timeout occurs and we aren't sure if the underlying operation has completed. This normally occurs because we sent the request to
/// the server successfully, but timed out waiting for the response. Note that idempotent operations should never return this, as they
/// do not have ambiguity.
ambiguous_timeout = 13,
/// A timeout occurs and we are confident that the operation could not have succeeded. This normally would occur because we received
/// confident failures from the server, or never managed to successfully dispatch the operation.
unambiguous_timeout = 14,
/// A feature which is not available was used.
feature_not_available = 15,
/// A management API attempts to target a scope which does not exist.
scope_not_found = 16,
/// Query: Codes 12004, 12016 (warning: regex ahead!) Codes 5000 AND message contains index .+ not found
/// Analytics: Raised When 24047
/// Search: Http status code 400 AND text contains “index not found”
index_not_found = 17,
/// Query:
/// Note: the uppercase index for 5000 is not a mistake (also only match on exist not exists because there is a typo
/// somewhere in query engine which might either print exist or exists depending on the codepath)
/// Code 5000 AND message contains Index .+ already exist
/// Code 4300 AND message contains index .+ already exist
///
/// Analytics: Raised When 24048
index_exists = 18,
/// Raised when encoding of a user object failed while trying to write it to the cluster
encoding_failure = 19,
/// Raised when decoding of the data into the user object failed
decoding_failure = 20,
/**
* Raised when a service decides that the caller must be rate limited due to exceeding a rate threshold of some sort.
*
* * KeyValue
* 0x30 RateLimitedNetworkIngress -> NetworkIngressRateLimitReached
* 0x31 RateLimitedNetworkEgress -> NetworkEgressRateLimitReached
* 0x32 RateLimitedMaxConnections -> MaximumConnectionsReached
* 0x33 RateLimitedMaxCommands -> RequestRateLimitReached
*
* * Cluster Manager (body check tbd)
* HTTP 429, Body contains "Limit(s) exceeded [num_concurrent_requests]" -> ConcurrentRequestLimitReached
* HTTP 429, Body contains "Limit(s) exceeded [ingress]" -> NetworkIngressRateLimitReached
* HTTP 429, Body contains "Limit(s) exceeded [egress]" -> NetworkEgressRateLimitReached
* Note: when multiple user limits are exceeded the array would contain all the limits exceeded, as "Limit(s) exceeded
* [num_concurrent_requests,egress]"
*
* * Query
* Code 1191, Message E_SERVICE_USER_REQUEST_EXCEEDED -> RequestRateLimitReached
* Code 1192, Message E_SERVICE_USER_REQUEST_RATE_EXCEEDED -> ConcurrentRequestLimitReached
* Code 1193, Message E_SERVICE_USER_REQUEST_SIZE_EXCEEDED -> NetworkIngressRateLimitReached
* Code 1194, Message E_SERVICE_USER_RESULT_SIZE_EXCEEDED -> NetworkEgressRateLimitReached
*
* * Search
* HTTP 429, {"status": "fail", "error": "num_concurrent_requests, value >= limit"} -> ConcurrentRequestLimitReached
* HTTP 429, {"status": "fail", "error": "num_queries_per_min, value >= limit"}: -> RequestRateLimitReached
* HTTP 429, {"status": "fail", "error": "ingress_mib_per_min >= limit"} -> NetworkIngressRateLimitReached
* HTTP 429, {"status": "fail", "error": "egress_mib_per_min >= limit"} -> NetworkEgressRateLimitReached
*
* * Analytics
* Not applicable at the moment.
*
* * Views
* Not applicable.
*/
rate_limited = 21,
/**
* Raised when a service decides that the caller must be limited due to exceeding a quota threshold of some sort.
*
* * KeyValue
* 0x34 ScopeSizeLimitExceeded
*
* * Cluster Manager
* HTTP 429, Body contains "Maximum number of collections has been reached for scope "<scope_name>""
*
* * Query
* Code 5000, Body contains "Limit for number of indexes that can be created per scope has been reached. Limit : value"
*
* * Search
* HTTP 400 (Bad request), {"status": "fail", "error": "rest_create_index: error creating index: {indexName}, err: manager_api:
* CreateIndex, Prepare failed, err: num_fts_indexes (active + pending) >= limit"}
* * Analytics
* Not applicable at the moment
*
* * Views
* Not applicable
*/
quota_limited = 22,
};
/// Errors for related to KeyValue service (kv_engine)
enum class key_value_errc {
/// The document requested was not found on the server.
/// KV Code 0x01
document_not_found = 101,
/// In get_any_replica, the get_all_replicas returns an empty stream because all the individual errors are dropped (i.e. all returned a
/// document_not_found)
document_irretrievable = 102,
/// The document requested was locked.
/// KV Code 0x09
document_locked = 103,
/// The value that was sent was too large to store (typically > 20MB)
/// KV Code 0x03
value_too_large = 104,
/// An operation which relies on the document not existing fails because the document existed.
/// KV Code 0x02
document_exists = 105,
/// The specified durability level is invalid.
/// KV Code 0xa0
durability_level_not_available = 107,
/// The specified durability requirements are not currently possible (for example, there are an insufficient number of replicas online).
/// KV Code 0xa1
durability_impossible = 108,
/// A sync-write has not completed in the specified time and has an ambiguous result - it may have succeeded or failed, but the final
/// result is not yet known.
/// A SEQNO OBSERVE operation is performed and the vbucket UUID changes during polling.
/// KV Code 0xa3
durability_ambiguous = 109,
/// A durable write is attempted against a key which already has a pending durable write.
/// KV Code 0xa2
durable_write_in_progress = 110,
/// The server is currently working to synchronize all replicas for previously performed durable operations (typically occurs after a
/// rebalance).
/// KV Code 0xa4
durable_write_re_commit_in_progress = 111,
/// The path provided for a sub-document operation was not found.
/// KV Code 0xc0
path_not_found = 113,
/// The path provided for a sub-document operation did not match the actual structure of the document.
/// KV Code 0xc1
path_mismatch = 114,
/// The path provided for a sub-document operation was not syntactically correct.
/// KV Code 0xc2
path_invalid = 115,
/// The path provided for a sub-document operation is too long, or contains too many independent components.
/// KV Code 0xc3
path_too_big = 116,
/// The document contains too many levels to parse.
/// KV Code 0xc4
path_too_deep = 117,
/// The value provided, if inserted into the document, would cause the document to become too deep for the server to accept.
/// KV Code 0xca
value_too_deep = 118,
/// The value provided for a sub-document operation would invalidate the JSON structure of the document if inserted as requested.
/// KV Code 0xc5
value_invalid = 119,
/// A sub-document operation is performed on a non-JSON document.
/// KV Code 0xc6
document_not_json = 120,
/// The existing number is outside the valid range for arithmetic operations.
/// KV Code 0xc7
number_too_big = 121,
/// The delta value specified for an operation is too large.
/// KV Code 0xc8
delta_invalid = 122,
/// A sub-document operation which relies on a path not existing encountered a path which exists.
/// KV Code 0xc9
path_exists = 123,
/// A macro was used which the server did not understand.
/// KV Code: 0xd0
xattr_unknown_macro = 124,
/// A sub-document operation attempts to access multiple xattrs in one operation.
/// KV Code: 0xcf
xattr_invalid_key_combo = 126,
/// A sub-document operation attempts to access an unknown virtual attribute.
/// KV Code: 0xd1
xattr_unknown_virtual_attribute = 127,
/// A sub-document operation attempts to modify a virtual attribute.
/// KV Code: 0xd2
xattr_cannot_modify_virtual_attribute = 128,
/// The user does not have permission to access the attribute. Occurs when the user attempts to read or write a system attribute (name
/// starts with underscore) but does not have the SystemXattrRead / SystemXattrWrite permission.
/// KV Code: 0x24
xattr_no_access = 130,
/// Only deleted document could be revived
/// KV Code: 0xd6
cannot_revive_living_document = 131,
};
/// Errors related to Query service (N1QL)
enum class query_errc {
/// Raised When code range 4xxx other than those explicitly covered
planning_failure = 201,
/// Raised When code range 12xxx and 14xxx (other than 12004 and 12016)
index_failure = 202,
/// Raised When codes 4040, 4050, 4060, 4070, 4080, 4090
prepared_statement_failure = 203,
/// Raised when code 12009 AND message does not contain CAS mismatch
dml_failure = 204,
};
/// Errors related to Analytics service (CBAS)
enum class analytics_errc {
/// Error range 24xxx (excluded are specific codes in the errors below)
compilation_failure = 301,
/// Error code 23007
job_queue_full = 302,
/// Error codes 24044, 24045, 24025
dataset_not_found = 303,
/// Error code 24034
dataverse_not_found = 304,
/// Raised When 24040
dataset_exists = 305,
/// Raised When 24039
dataverse_exists = 306,
/// Raised When 24006
link_not_found = 307,
/// Raised When 24055
link_exists = 308,
};
/// Errors related to Search service (CBFT)
enum class search_errc {
index_not_ready = 401,
consistency_mismatch = 402,
};
/// Errors related to Views service (CAPI)
enum class view_errc {
/// Http status code 404
/// Reason or error contains "not_found"
view_not_found = 501,
/// Raised on the Management APIs only when
/// * Getting a design document
/// * Dropping a design document
/// * And the server returns 404
design_document_not_found = 502,
};
/// Errors related to management service (ns_server)
enum class management_errc {
/// Raised from the collection management API
collection_exists = 601,
/// Raised from the collection management API
scope_exists = 602,
/// Raised from the user management API
user_not_found = 603,
/// Raised from the user management API
group_not_found = 604,
/// Raised from the bucket management API
bucket_exists = 605,
/// Raised from the user management API
user_exists = 606,
/// Raised from the bucket management API
bucket_not_flushable = 607,
/// Occurs if the function is not found
/// name is "ERR_APP_NOT_FOUND_TS"
eventing_function_not_found = 608,
/// Occurs if the function is not deployed, but the action expects it to
/// name is "ERR_APP_NOT_DEPLOYED"
eventing_function_not_deployed = 609,
/// Occurs when the compilation of the function code failed
/// name is "ERR_HANDLER_COMPILATION"
eventing_function_compilation_failure = 610,
/// Occurs when source and metadata keyspaces are the same.
/// name is "ERR_SRC_MB_SAME"
eventing_function_identical_keyspace = 611,
/// Occurs when a function is deployed but not “fully” bootstrapped
/// name is "ERR_APP_NOT_BOOTSTRAPPED"
eventing_function_not_bootstrapped = 612,
/// Occurs when a function is deployed but the action does not expect it to
/// name is "ERR_APP_NOT_UNDEPLOYED"
eventing_function_deployed = 613,
/// Occurs when a function is paused but the action does not expect it to
/// name is "ERR_APP_PAUSED"
eventing_function_paused = 614,
};
/// Field-Level Encryption Error Definitions
enum class field_level_encryption_errc {
/// Generic cryptography failure.
generic_cryptography_failure = 700,
/// Raised by CryptoManager.encrypt() when encryption fails for any reason. Should have one of the other Field-Level Encryption errors
/// as a cause.
encryption_failure = 701,
/// Raised by CryptoManager.decrypt() when decryption fails for any reason. Should have one of the other Field-Level Encryption errors
/// as a cause.
decryption_failure = 702,
/// Raised when a crypto operation fails because a required key is missing.
crypto_key_not_found = 703,
/// Raised by an encrypter or decrypter when the key does not meet expectations (for example, if the key is the wrong size).
invalid_crypto_key = 704,
/// Raised when a message cannot be decrypted because there is no decrypter registered for the algorithm.
decrypter_not_found = 705,
/// Raised when a message cannot be encrypted because there is no encrypter registered under the requested alias.
encrypter_not_found = 706,
/// Raised when decryption fails due to malformed input, integrity check failure, etc.
invalid_ciphertext = 707
};
/// Errors related to networking IO
enum class network_errc {
/// Unable to resolve node address
resolve_failure = 1001,
/// No hosts left to connect
no_endpoints_left = 1002,
/// Failed to complete protocol handshake
handshake_failure = 1003,
/// Unexpected protocol state or input
protocol_error = 1004,
/// Configuration is not available for some reason
configuration_not_available = 1005,
};
namespace detail
{
struct common_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.common";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (common_errc(ev)) {
case common_errc::unambiguous_timeout:
return "unambiguous_timeout";
case common_errc::ambiguous_timeout:
return "ambiguous_timeout";
case common_errc::request_canceled:
return "request_canceled";
case common_errc::invalid_argument:
return "invalid_argument";
case common_errc::service_not_available:
return "service_not_available";
case common_errc::internal_server_failure:
return "internal_server_failure";
case common_errc::authentication_failure:
return "authentication_failure";
case common_errc::temporary_failure:
return "temporary_failure";
case common_errc::parsing_failure:
return "parsing_failure";
case common_errc::cas_mismatch:
return "cas_mismatch";
case common_errc::bucket_not_found:
return "bucket_not_found";
case common_errc::scope_not_found:
return "scope_not_found";
case common_errc::collection_not_found:
return "collection_not_found";
case common_errc::unsupported_operation:
return "unsupported_operation";
case common_errc::feature_not_available:
return "feature_not_available";
case common_errc::encoding_failure:
return "encoding_failure";
case common_errc::decoding_failure:
return "decoding_failure";
case common_errc::index_not_found:
return "index_not_found";
case common_errc::index_exists:
return "index_exists";
case common_errc::rate_limited:
return "rate_limited";
case common_errc::quota_limited:
return "quota_limited";
}
return "FIXME: unknown error code common (recompile with newer library)";
}
};
inline const std::error_category&
get_common_category()
{
static detail::common_error_category instance;
return instance;
}
struct key_value_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.key_value";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (key_value_errc(ev)) {
case key_value_errc::document_not_found:
return "document_not_found";
case key_value_errc::document_irretrievable:
return "document_irretrievable";
case key_value_errc::document_locked:
return "document_locked";
case key_value_errc::value_too_large:
return "value_too_large";
case key_value_errc::document_exists:
return "document_exists";
case key_value_errc::durability_level_not_available:
return "durability_level_not_available";
case key_value_errc::durability_impossible:
return "durability_impossible";
case key_value_errc::durability_ambiguous:
return "durability_ambiguous";
case key_value_errc::durable_write_in_progress:
return "durable_write_in_progress";
case key_value_errc::durable_write_re_commit_in_progress:
return "durable_write_re_commit_in_progress";
case key_value_errc::path_not_found:
return "path_not_found";
case key_value_errc::path_mismatch:
return "path_mismatch";
case key_value_errc::path_invalid:
return "path_invalid";
case key_value_errc::path_too_big:
return "path_too_big";
case key_value_errc::path_too_deep:
return "path_too_deep";
case key_value_errc::value_too_deep:
return "value_too_deep";
case key_value_errc::value_invalid:
return "value_invalid";
case key_value_errc::document_not_json:
return "document_not_json";
case key_value_errc::number_too_big:
return "number_too_big";
case key_value_errc::delta_invalid:
return "delta_invalid";
case key_value_errc::path_exists:
return "path_exists";
case key_value_errc::xattr_unknown_macro:
return "xattr_unknown_macro";
case key_value_errc::xattr_invalid_key_combo:
return "xattr_invalid_key_combo";
case key_value_errc::xattr_unknown_virtual_attribute:
return "xattr_unknown_virtual_attribute";
case key_value_errc::xattr_cannot_modify_virtual_attribute:
return "xattr_cannot_modify_virtual_attribute";
case key_value_errc::cannot_revive_living_document:
return "cannot_revive_living_document";
case key_value_errc::xattr_no_access:
return "xattr_no_access";
}
return "FIXME: unknown error code key_value (recompile with newer library)";
}
};
inline const std::error_category&
get_key_value_category()
{
static detail::key_value_error_category instance;
return instance;
}
struct query_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.query";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (query_errc(ev)) {
case query_errc::planning_failure:
return "planning_failure";
case query_errc::index_failure:
return "index_failure";
case query_errc::prepared_statement_failure:
return "prepared_statement_failure";
case query_errc::dml_failure:
return "dml_failure";
}
return "FIXME: unknown error code in query category (recompile with newer library)";
}
};
inline const std::error_category&
get_query_category()
{
static detail::query_error_category instance;
return instance;
}
struct search_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.search";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (search_errc(ev)) {
case search_errc::index_not_ready:
return "index_not_ready";
case search_errc::consistency_mismatch:
return "consistency_mismatch";
}
return "FIXME: unknown error code in search category (recompile with newer library)";
}
};
inline const std::error_category&
get_search_category()
{
static detail::search_error_category instance;
return instance;
}
struct view_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.view";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (view_errc(ev)) {
case view_errc::view_not_found:
return "view_not_found";
case view_errc::design_document_not_found:
return "design_document_not_found";
}
return "FIXME: unknown error code in view category (recompile with newer library)";
}
};
inline const std::error_category&
get_view_category()
{
static detail::view_error_category instance;
return instance;
}
struct analytics_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.analytics";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (analytics_errc(ev)) {
case analytics_errc::compilation_failure:
return "compilation_failure";
case analytics_errc::job_queue_full:
return "job_queue_full";
case analytics_errc::dataset_not_found:
return "dataset_not_found";
case analytics_errc::dataverse_not_found:
return "dataverse_not_found";
case analytics_errc::dataset_exists:
return "dataset_exists";
case analytics_errc::dataverse_exists:
return "dataverse_exists";
case analytics_errc::link_not_found:
return "link_not_found";
case analytics_errc::link_exists:
return "link_exists";
}
return "FIXME: unknown error code in analytics category (recompile with newer library)";
}
};
inline const std::error_category&
get_analytics_category()
{
static detail::analytics_error_category instance;
return instance;
}
struct management_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.management";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (management_errc(ev)) {
case management_errc::collection_exists:
return "collection_exists";
case management_errc::scope_exists:
return "scope_exists";
case management_errc::user_not_found:
return "user_not_found";
case management_errc::group_not_found:
return "group_not_found";
case management_errc::user_exists:
return "user_exists";
case management_errc::bucket_exists:
return "bucket_exists";
case management_errc::bucket_not_flushable:
return "bucket_not_flushable";
case management_errc::eventing_function_not_found:
return "eventing_function_not_found";
case management_errc::eventing_function_not_deployed:
return "eventing_function_not_deployed";
case management_errc::eventing_function_compilation_failure:
return "eventing_function_compilation_failure";
case management_errc::eventing_function_identical_keyspace:
return "eventing_function_identical_keyspace";
case management_errc::eventing_function_not_bootstrapped:
return "eventing_function_not_bootstrapped";
case management_errc::eventing_function_deployed:
return "eventing_function_deployed";
case management_errc::eventing_function_paused:
return "eventing_function_paused";
}
return "FIXME: unknown error code in management category (recompile with newer library)";
}
};
inline const std::error_category&
get_management_category()
{
static detail::management_error_category instance;
return instance;
}
struct network_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.network";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (network_errc(ev)) {
case network_errc::resolve_failure:
return "resolve_failure";
case network_errc::no_endpoints_left:
return "no_endpoints_left";
case network_errc::handshake_failure:
return "handshake_failure";
case network_errc::protocol_error:
return "protocol_error";
case network_errc::configuration_not_available:
return "configuration_not_available";
}
return "FIXME: unknown error code in network category (recompile with newer library)";
}
};
inline const std::error_category&
get_network_category()
{
static detail::network_error_category instance;
return instance;
}
struct field_level_encryption_error_category : std::error_category {
[[nodiscard]] const char* name() const noexcept override
{
return "couchbase.field_level_encryption";
}
[[nodiscard]] std::string message(int ev) const noexcept override
{
switch (field_level_encryption_errc(ev)) {
case field_level_encryption_errc::generic_cryptography_failure:
return "generic_cryptography_failure";
case field_level_encryption_errc::encryption_failure:
return "encryption_failure";
case field_level_encryption_errc::decryption_failure:
return "decryption_failure";
case field_level_encryption_errc::crypto_key_not_found:
return "crypto_key_not_found";
case field_level_encryption_errc::invalid_crypto_key:
return "invalid_crypto_key";
case field_level_encryption_errc::decrypter_not_found:
return "decrypter_not_found";
case field_level_encryption_errc::encrypter_not_found:
return "encrypter_not_found";
case field_level_encryption_errc::invalid_ciphertext:
return "invalid_ciphertext";
}
return "FIXME: unknown error code in field level encryption category (recompile with newer library)";
}
};
inline const std::error_category&
get_field_level_encryption_category()
{
static detail::field_level_encryption_error_category instance;
return instance;
}
} // namespace detail
} // namespace couchbase::error
namespace std
{
template<>
struct is_error_code_enum<couchbase::error::common_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::key_value_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::query_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::search_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::view_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::analytics_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::management_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::network_errc> : true_type {
};
template<>
struct is_error_code_enum<couchbase::error::field_level_encryption_errc> : true_type {
};
} // namespace std
namespace couchbase::error
{
inline std::error_code
make_error_code(couchbase::error::common_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_common_category() };
}
inline std::error_code
make_error_code(couchbase::error::key_value_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_key_value_category() };
}
inline std::error_code
make_error_code(couchbase::error::query_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_query_category() };
}
inline std::error_code
make_error_code(couchbase::error::search_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_search_category() };
}
inline std::error_code
make_error_code(couchbase::error::view_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_view_category() };
}
inline std::error_code
make_error_code(couchbase::error::analytics_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_analytics_category() };
}
inline std::error_code
make_error_code(couchbase::error::management_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_management_category() };
}
inline std::error_code
make_error_code(couchbase::error::network_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_network_category() };
}
inline std::error_code
make_error_code(couchbase::error::field_level_encryption_errc e)
{
return { static_cast<int>(e), couchbase::error::detail::get_field_level_encryption_category() };
}
} // namespace couchbase::error
| 35.632385 | 140 | 0.675325 | jrawsthorne |
52876ae3972891c398c3f1bc637cb69486966a39 | 12,484 | cpp | C++ | fdbserver/MemoryPager.actor.cpp | timansky/foundationdb | 97dd83d94060145687395fe1fa440b88aaa078a8 | [
"Apache-2.0"
] | 1 | 2020-08-17T10:57:40.000Z | 2020-08-17T10:57:40.000Z | fdbserver/MemoryPager.actor.cpp | timansky/foundationdb | 97dd83d94060145687395fe1fa440b88aaa078a8 | [
"Apache-2.0"
] | 2 | 2019-02-06T08:10:00.000Z | 2019-02-06T08:12:11.000Z | fdbserver/MemoryPager.actor.cpp | timansky/foundationdb | 97dd83d94060145687395fe1fa440b88aaa078a8 | [
"Apache-2.0"
] | 1 | 2019-03-12T20:17:26.000Z | 2019-03-12T20:17:26.000Z | /*
* MemoryPager.actor.cpp
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
*
* 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 <cinttypes>
#include "fdbserver/MemoryPager.h"
#include "fdbserver/Knobs.h"
#include "flow/Arena.h"
#include "flow/UnitTest.h"
#include "flow/actorcompiler.h"
typedef uint8_t* PhysicalPageID;
typedef std::vector<std::pair<Version, PhysicalPageID>> PageVersionMap;
typedef std::vector<PageVersionMap> LogicalPageTable;
class MemoryPager;
class MemoryPage : public IPage, ReferenceCounted<MemoryPage> {
public:
MemoryPage();
MemoryPage(uint8_t *data);
virtual ~MemoryPage();
virtual void addref() const {
ReferenceCounted<MemoryPage>::addref();
}
virtual void delref() const {
ReferenceCounted<MemoryPage>::delref();
}
virtual int size() const;
virtual uint8_t const* begin() const;
virtual uint8_t* mutate();
private:
friend class MemoryPager;
uint8_t *data;
bool allocated;
static const int PAGE_BYTES;
};
class MemoryPagerSnapshot : public IPagerSnapshot, ReferenceCounted<MemoryPagerSnapshot> {
public:
MemoryPagerSnapshot(MemoryPager *pager, Version version) : pager(pager), version(version) {}
virtual Future<Reference<const IPage>> getPhysicalPage(LogicalPageID pageID);
virtual Version getVersion() const {
return version;
}
virtual void addref() {
ReferenceCounted<MemoryPagerSnapshot>::addref();
}
virtual void delref() {
ReferenceCounted<MemoryPagerSnapshot>::delref();
}
private:
MemoryPager *pager;
Version version;
};
class MemoryPager : public IPager, ReferenceCounted<MemoryPager> {
public:
MemoryPager();
virtual Reference<IPage> newPageBuffer();
virtual int getUsablePageSize();
virtual Reference<IPagerSnapshot> getReadSnapshot(Version version);
virtual LogicalPageID allocateLogicalPage();
virtual void freeLogicalPage(LogicalPageID pageID, Version version);
virtual void writePage(LogicalPageID pageID, Reference<IPage> contents, Version updateVersion, LogicalPageID referencePageID);
virtual void forgetVersions(Version begin, Version end);
virtual Future<Void> commit();
virtual StorageBytes getStorageBytes() {
// TODO: Get actual values for used and free memory
return StorageBytes();
}
virtual void setLatestVersion(Version version);
virtual Future<Version> getLatestVersion();
virtual Future<Void> getError();
virtual Future<Void> onClosed();
virtual void dispose();
virtual void close();
virtual Reference<const IPage> getPage(LogicalPageID pageID, Version version);
private:
Version latestVersion;
Version committedVersion;
Standalone<VectorRef<VectorRef<uint8_t>>> data;
LogicalPageTable pageTable;
Promise<Void> closed;
std::vector<PhysicalPageID> freeList; // TODO: is this good enough for now?
PhysicalPageID allocatePage(Reference<IPage> contents);
void extendData();
static const PhysicalPageID INVALID_PAGE;
};
IPager * createMemoryPager() {
return new MemoryPager();
}
MemoryPage::MemoryPage() : allocated(true) {
data = (uint8_t*)FastAllocator<4096>::allocate();
}
MemoryPage::MemoryPage(uint8_t *data) : data(data), allocated(false) {}
MemoryPage::~MemoryPage() {
if(allocated) {
FastAllocator<4096>::release(data);
}
}
uint8_t const* MemoryPage::begin() const {
return data;
}
uint8_t* MemoryPage::mutate() {
return data;
}
int MemoryPage::size() const {
return PAGE_BYTES;
}
const int MemoryPage::PAGE_BYTES = 4096;
Future<Reference<const IPage>> MemoryPagerSnapshot::getPhysicalPage(LogicalPageID pageID) {
return pager->getPage(pageID, version);
}
MemoryPager::MemoryPager() : latestVersion(0), committedVersion(0) {
extendData();
pageTable.resize(SERVER_KNOBS->PAGER_RESERVED_PAGES);
}
Reference<IPage> MemoryPager::newPageBuffer() {
return Reference<IPage>(new MemoryPage());
}
int MemoryPager::getUsablePageSize() {
return MemoryPage::PAGE_BYTES;
}
Reference<IPagerSnapshot> MemoryPager::getReadSnapshot(Version version) {
ASSERT(version <= latestVersion);
return Reference<IPagerSnapshot>(new MemoryPagerSnapshot(this, version));
}
LogicalPageID MemoryPager::allocateLogicalPage() {
ASSERT(pageTable.size() >= SERVER_KNOBS->PAGER_RESERVED_PAGES);
pageTable.push_back(PageVersionMap());
return pageTable.size() - 1;
}
void MemoryPager::freeLogicalPage(LogicalPageID pageID, Version version) {
ASSERT(pageID < pageTable.size());
PageVersionMap &pageVersionMap = pageTable[pageID];
ASSERT(!pageVersionMap.empty());
auto itr = std::lower_bound(pageVersionMap.begin(), pageVersionMap.end(), version, [](std::pair<Version, PhysicalPageID> p, Version v) {
return p.first < v;
});
pageVersionMap.erase(itr, pageVersionMap.end());
if(pageVersionMap.size() > 0 && pageVersionMap.back().second != INVALID_PAGE) {
pageVersionMap.push_back(std::make_pair(version, INVALID_PAGE));
}
}
void MemoryPager::writePage(LogicalPageID pageID, Reference<IPage> contents, Version updateVersion, LogicalPageID referencePageID) {
ASSERT(updateVersion > latestVersion || updateVersion == 0);
ASSERT(pageID < pageTable.size());
if(referencePageID != invalidLogicalPageID) {
PageVersionMap &rpv = pageTable[referencePageID];
ASSERT(!rpv.empty());
updateVersion = rpv.back().first;
}
PageVersionMap &pageVersionMap = pageTable[pageID];
ASSERT(updateVersion >= committedVersion || updateVersion == 0);
PhysicalPageID physicalPageID = allocatePage(contents);
ASSERT(pageVersionMap.empty() || pageVersionMap.back().second != INVALID_PAGE);
if(updateVersion == 0) {
ASSERT(pageVersionMap.size());
updateVersion = pageVersionMap.back().first;
pageVersionMap.back().second = physicalPageID;
// TODO: what to do with old page?
}
else {
ASSERT(pageVersionMap.empty() || pageVersionMap.back().first < updateVersion);
pageVersionMap.push_back(std::make_pair(updateVersion, physicalPageID));
}
}
void MemoryPager::forgetVersions(Version begin, Version end) {
ASSERT(begin <= end);
ASSERT(end <= latestVersion);
// TODO
}
Future<Void> MemoryPager::commit() {
ASSERT(committedVersion < latestVersion);
committedVersion = latestVersion;
return Void();
}
void MemoryPager::setLatestVersion(Version version) {
ASSERT(version > latestVersion);
latestVersion = version;
}
Future<Version> MemoryPager::getLatestVersion() {
return latestVersion;
}
Reference<const IPage> MemoryPager::getPage(LogicalPageID pageID, Version version) {
ASSERT(pageID < pageTable.size());
PageVersionMap const& pageVersionMap = pageTable[pageID];
auto itr = std::upper_bound(pageVersionMap.begin(), pageVersionMap.end(), version, [](Version v, std::pair<Version, PhysicalPageID> p) {
return v < p.first;
});
if(itr == pageVersionMap.begin()) {
return Reference<IPage>(); // TODO: should this be an error?
}
--itr;
ASSERT(itr->second != INVALID_PAGE);
return Reference<const IPage>(new MemoryPage(itr->second)); // TODO: Page memory owned by the pager. Change this?
}
Future<Void> MemoryPager::getError() {
return Void();
}
Future<Void> MemoryPager::onClosed() {
return closed.getFuture();
}
void MemoryPager::dispose() {
closed.send(Void());
delete this;
}
void MemoryPager::close() {
dispose();
}
PhysicalPageID MemoryPager::allocatePage(Reference<IPage> contents) {
if(freeList.size()) {
PhysicalPageID pageID = freeList.back();
freeList.pop_back();
memcpy(pageID, contents->begin(), contents->size());
return pageID;
}
else {
ASSERT(data.size() && data.back().capacity() - data.back().size() >= contents->size());
PhysicalPageID pageID = data.back().end();
data.back().append(data.arena(), contents->begin(), contents->size());
if(data.back().size() == data.back().capacity()) {
extendData();
}
else {
ASSERT(data.back().size() <= data.back().capacity() - 4096);
}
return pageID;
}
}
void MemoryPager::extendData() {
if(data.size() > 1000) { // TODO: is this an ok way to handle large data size?
throw io_error();
}
VectorRef<uint8_t> d;
d.reserve(data.arena(), 1 << 22);
data.push_back(data.arena(), d);
}
// TODO: these tests are not MemoryPager specific, we should make them more general
void fillPage(Reference<IPage> page, LogicalPageID pageID, Version version) {
ASSERT(page->size() > sizeof(LogicalPageID) + sizeof(Version));
memset(page->mutate(), 0, page->size());
memcpy(page->mutate(), (void*)&pageID, sizeof(LogicalPageID));
memcpy(page->mutate() + sizeof(LogicalPageID), (void*)&version, sizeof(Version));
}
bool validatePage(Reference<const IPage> page, LogicalPageID pageID, Version version) {
bool valid = true;
LogicalPageID readPageID = *(LogicalPageID*)page->begin();
if(readPageID != pageID) {
fprintf(stderr, "Invalid PageID detected: %u (expected %u)\n", readPageID, pageID);
valid = false;
}
Version readVersion = *(Version*)(page->begin()+sizeof(LogicalPageID));
if(readVersion != version) {
fprintf(stderr, "Invalid Version detected on page %u: %" PRId64 "(expected %" PRId64 ")\n", pageID, readVersion, version);
valid = false;
}
return valid;
}
void writePage(IPager *pager, Reference<IPage> page, LogicalPageID pageID, Version version, bool updateVersion=true) {
fillPage(page, pageID, version);
pager->writePage(pageID, page, updateVersion ? version : 0);
}
ACTOR Future<Void> commit(IPager *pager) {
static int commitNum = 1;
state int myCommit = commitNum++;
debug_printf("Commit%d\n", myCommit);
wait(pager->commit());
debug_printf("FinishedCommit%d\n", myCommit);
return Void();
}
ACTOR Future<Void> read(IPager *pager, LogicalPageID pageID, Version version, Version expectedVersion=-1) {
static int readNum = 1;
state int myRead = readNum++;
state Reference<IPagerSnapshot> readSnapshot = pager->getReadSnapshot(version);
debug_printf("Read%d\n", myRead);
Reference<const IPage> readPage = wait(readSnapshot->getPhysicalPage(pageID));
debug_printf("FinishedRead%d\n", myRead);
ASSERT(validatePage(readPage, pageID, expectedVersion >= 0 ? expectedVersion : version));
return Void();
}
ACTOR Future<Void> simplePagerTest(IPager *pager) {
state Reference<IPage> page = pager->newPageBuffer();
Version latestVersion = wait(pager->getLatestVersion());
debug_printf("Got latest version: %lld\n", latestVersion);
state Version version = latestVersion+1;
state Version v1 = version;
state LogicalPageID pageID1 = pager->allocateLogicalPage();
writePage(pager, page, pageID1, v1);
pager->setLatestVersion(v1);
wait(commit(pager));
state LogicalPageID pageID2 = pager->allocateLogicalPage();
state Version v2 = ++version;
writePage(pager, page, pageID1, v2);
writePage(pager, page, pageID2, v2);
pager->setLatestVersion(v2);
wait(commit(pager));
wait(read(pager, pageID1, v2));
wait(read(pager, pageID1, v1));
state Version v3 = ++version;
writePage(pager, page, pageID1, v3, false);
pager->setLatestVersion(v3);
wait(read(pager, pageID1, v2, v3));
wait(read(pager, pageID1, v3, v3));
state LogicalPageID pageID3 = pager->allocateLogicalPage();
state Version v4 = ++version;
writePage(pager, page, pageID2, v4);
writePage(pager, page, pageID3, v4);
pager->setLatestVersion(v4);
wait(commit(pager));
wait(read(pager, pageID2, v4, v4));
state Version v5 = ++version;
writePage(pager, page, pageID2, v5);
state LogicalPageID pageID4 = pager->allocateLogicalPage();
writePage(pager, page, pageID4, v5);
state Version v6 = ++version;
pager->freeLogicalPage(pageID2, v5);
pager->freeLogicalPage(pageID3, v3);
pager->setLatestVersion(v6);
wait(commit(pager));
pager->forgetVersions(0, v4);
wait(commit(pager));
wait(delay(3.0));
wait(commit(pager));
return Void();
}
/*
TEST_CASE("/fdbserver/memorypager/simple") {
state IPager *pager = new MemoryPager();
wait(simplePagerTest(pager));
Future<Void> closedFuture = pager->onClosed();
pager->dispose();
wait(closedFuture);
return Void();
}
*/
const PhysicalPageID MemoryPager::INVALID_PAGE = nullptr;
| 27.317287 | 137 | 0.734941 | timansky |
5288d48d136e2e32f4f3784eb0a99f770704f015 | 1,238 | cpp | C++ | test/features.cpp | Ogiwara-CostlierRain464/transaction-system | fb63b96e03e480bc2ae6ebc06f5c392af1ab9012 | [
"Apache-2.0"
] | 9 | 2020-06-09T04:28:36.000Z | 2022-02-02T05:27:51.000Z | test/features.cpp | Ogiwara-CostlierRain464/transaction-system | fb63b96e03e480bc2ae6ebc06f5c392af1ab9012 | [
"Apache-2.0"
] | null | null | null | test/features.cpp | Ogiwara-CostlierRain464/transaction-system | fb63b96e03e480bc2ae6ebc06f5c392af1ab9012 | [
"Apache-2.0"
] | null | null | null | #include <gtest/gtest.h>
using namespace std;
/**
* Used to check C++ features.
*/
class Features: public ::testing::Test{};
template <typename T>
bool typeCheck ( T x )
{
reference_wrapper<int> r=ref(x);
// should return false, so ref(int) ≠ int&
return is_same<T&,decltype(r)>::value;
}
/**
* A reference_wrapper object can be used to create an array of references
* which was not possible with T&.
*
* @see https://stackoverflow.com/questions/33240993/c-difference-between-stdreft-and-t/33241552
*/
TEST_F(Features, std_ref){
int x = 5;
EXPECT_EQ(typeCheck(x), false);
int x_ = 5, y = 7, z = 8;
//int& ar[] = {x,y,z}; NOT Possible
reference_wrapper<int> arr[] = {x, y, z};
}
TEST_F(Features, asm_ext_basic){
int src = 1;
int dst;
asm("mov %1, %0\n\t"
"add $1, %0"
: "=r" (dst) // output operands
: "r" (src)); // input operands
EXPECT_EQ(dst, 2);
}
TEST_F(Features, asm_volatile){
uint64_t msr;
asm volatile (
"rdtsc\n\t"
"shl $32, %%rdx\n\t"
"or %%rdx, %0"
: "=a" (msr)
:
: "rdx"
);
printf("%lld\n", msr);
asm volatile (
"rdtsc\n\t"
"shl $32, %%rdx\n\t"
"or %%rdx, %0"
: "=a" (msr)
:
: "rdx"
);
printf("%lld\n", msr);
}
| 17.942029 | 96 | 0.575929 | Ogiwara-CostlierRain464 |
52943455ab9c912707ad9d4daae1e997d6ae5f8a | 43,772 | cpp | C++ | R/src/rcpp_functions.cpp | hillarykoch/pGMCM | 2aeac31fdac4e87c8349222d595afd78dedf4b84 | [
"Artistic-2.0"
] | null | null | null | R/src/rcpp_functions.cpp | hillarykoch/pGMCM | 2aeac31fdac4e87c8349222d595afd78dedf4b84 | [
"Artistic-2.0"
] | null | null | null | R/src/rcpp_functions.cpp | hillarykoch/pGMCM | 2aeac31fdac4e87c8349222d595afd78dedf4b84 | [
"Artistic-2.0"
] | null | null | null | // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
#include <RcppArmadillo.h>
#include <algorithm>
using namespace Rcpp;
using namespace RcppArmadillo;
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::plugins(cpp11)]]
//
// Stuff for general penalized Gaussian mixture model
//
// Made this so that absolute value of double returns double, not integer
// [[Rcpp::export]]
double abs3(double val){
return std::abs(val);
}
// First derivative of SCAD penalty
// NOTE THAT THIS PENALTY LOOKS A LIL DIFFERENT THAN SCAD, BECAUSE HUANG PUTS LAMBDA OUTSIDE THE PENALIZATION TERM
// [[Rcpp::export]]
arma::rowvec SCAD_1d(arma::rowvec prop, double lambda, int k, double a = 3.7) {
arma::colvec term2(k, arma::fill::zeros);
arma::rowvec out(k, arma::fill::none);
for(int i = 0; i < k; ++i) {
if(a*lambda - prop(i) > 0) {
term2(i) = (a*lambda - prop(i))/(a*lambda-lambda);
}
out(i) = ((prop(i) <= lambda) + term2(i)*(prop(i) > lambda));
}
return out;
}
// First derivative of SCAD penalty, when only passing an integer and not a vector
// NOTE THAT THIS PENALTY LOOKS A LIL DIFFERENT THAN SCAD, BECAUSE HUANG PUTS LAMBDA OUTSIDE THE PENALIZATION TERM
// [[Rcpp::export]]
double double_SCAD_1d(double prop, double lambda, double a = 3.7) {
double term2 = 0.0;
double out;
if(a*lambda - prop > 0) {
term2 = (a*lambda - prop)/(a*lambda-lambda);
}
out = ((prop <= lambda) + term2*(prop > lambda));
return out;
}
// SCAD penalty
// NOTE THAT THIS PENALTY LOOKS A LIL DIFFERENT THAN SCAD, BECAUSE HUANG PUTS LAMBDA OUTSIDE THE PENALIZATION TERM
// [[Rcpp::export]]
arma::rowvec SCAD(arma::rowvec prop, double lambda, int k, double a = 3.7) {
arma::rowvec out(k, arma::fill::none);
double val;
for(int i = 0; i < k; ++i) {
val = abs3(prop(i));
if(val <= lambda) {
out(i) = lambda;
} else if(lambda < val & val <= a * lambda) {
out(i) = -((pow(val,2)-2*a*lambda*val+pow(lambda,2)) / (2 * (a-1) * lambda));
} else {
out(i) = ((a+1) * lambda) / 2;
}
}
return out;
}
// SCAD penalty, when only passing an integer and not a vector
// NOTE THAT THIS PENALTY LOOKS A LIL DIFFERENT THAN SCAD, BECAUSE HUANG PUTS LAMBDA OUTSIDE THE PENALIZATION TERM
// [[Rcpp::export]]
double double_SCAD(double prop, double lambda, double a = 3.7) {
double out;
double val;
val = abs3(prop);
if(val <= lambda) {
out = lambda;
} else if(lambda < val & val <= a * lambda) {
out = -((pow(val,2)-2*a*lambda*val+pow(lambda,2)) / (2 * (a-1) * lambda));
} else {
out = ((a+1) * lambda) / 2;
}
return out;
}
// choose slices from a cube given index
// [[Rcpp::export]]
arma::cube choose_slice(arma::cube& Q, arma::uvec idx, int d, int k) {
arma::cube y(d, d, k, arma::fill::none);
for(int i = 0; i < k; ++i) {
y.slice(i) = Q.slice(idx(i));
}
return y;
}
// compute Mahalanobis distance for multivariate normal
// [[Rcpp::export]]
arma::vec Mahalanobis(arma::mat x, arma::rowvec mu, arma::mat sigma){
const int n = x.n_rows;
arma::mat x_cen;
x_cen.copy_size(x);
for (int i=0; i < n; i++) {
x_cen.row(i) = x.row(i) - mu;
}
return sum((x_cen * sigma.i()) % x_cen, 1); // can probably change sigma.i() to inversion for positive semi-definite matrices (for speed!)
}
// Compute density of multivariate normal
// [[Rcpp::export]]
arma::vec cdmvnorm(arma::mat x, arma::rowvec mu, arma::mat sigma){
arma::vec mdist = Mahalanobis(x, mu, sigma);
double logdet = log(arma::det(sigma));
const double log2pi = std::log(2.0 * M_PI);
arma::vec logretval = -(x.n_cols * log2pi + logdet + mdist)/2;
return exp(logretval);
}
// estimation and model selection of penalized GMM
// [[Rcpp::export]]
Rcpp::List cfpGMM(arma::mat& x,
arma::rowvec prop,
arma::mat& mu,
arma::cube& sigma,
int k,
double df,
double lambda,
int citermax,
double tol
) {
const int n = x.n_rows;
const int d = x.n_cols;
double delta = 1;
arma::rowvec prop_old = prop;
arma::mat mu_old = mu;
arma::cube sigma_old = sigma;
arma::uvec tag(n, arma::fill::none);
arma::mat pdf_est(n, k, arma::fill::none);
arma::mat prob0(n, k, arma::fill::none);
arma::mat h_est(n, k, arma::fill::none);
//double thresh = 1/(log(n) * sqrt(n));
double thresh = 1E-03;
for(int step = 0; step < citermax; ++step) {
// E step
for(int i = 0; i < k; ++i) {
arma::rowvec tmp_mu = mu_old.row(i);
arma::mat tmp_sigma = sigma_old.slice(i);
pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
prob0.col(i) = pdf_est.col(i) * prop_old(i);
}
h_est.set_size(n, k);
for(int i = 0; i < n; ++i) {
h_est.row(i) = prob0.row(i)/(sum(prob0.row(i)) * 1.0L);
}
// M step
// update mean
arma::mat mu_new(k, d, arma::fill::none);
for(int i = 0; i < k; ++i) {
mu_new.row(i) = trans(h_est.col(i))*x/(sum(h_est.col(i)) * 1.0L);
}
// update sigma
arma::cube dist(n, d, k, arma::fill::none);
arma::cube sigma_new = sigma_old;
arma::mat ones(n, 1, arma::fill::ones);
for(int i = 0; i < k; ++i) {
dist.slice(i) = x - ones * mu_new.row(i);
sigma_new.slice(i) = trans(dist.slice(i)) * diagmat(h_est.col(i)) * dist.slice(i) / (sum(h_est.col(i)) * 1.0L);
}
// update proportion
arma::rowvec prop_new(k, arma::fill::none);
for(int i = 0; i < k; ++i){
prop_new(i) = (sum(h_est.col(i)) - lambda * df) / (n-k*lambda*df) * 1.0L;
if(prop_new(i) < thresh) // tolerance greater than 0 for numerical stability (Huang2013)
prop_new(i) = 0;
}
prop_new = prop_new/(sum(prop_new) * 1.0L);
// calculate difference between two iterations
delta = sum(abs(prop_new - prop_old));
// eliminate small clusters
if(sum(prop_new == 0) > 0) {
arma::uvec idx = find(prop_new > 0);
k = idx.size();
prop_old.set_size(k);
prop_old = trans(prop_new.elem(idx));
mu_old.set_size(k,d);
mu_old = mu_new.rows(idx);
sigma_old.set_size(d,d,k);
sigma_old = choose_slice(sigma_new, idx, d, k);
pdf_est = pdf_est.cols(idx);
prob0 = prob0.cols(idx);
h_est = h_est.cols(idx);
delta = 1;
}
else{
prop_old = prop_new;
mu_old = mu_new;
sigma_old = sigma_new;
}
//calculate cluster with maximum posterior probability
tag = index_max(h_est, 1);
if(delta < tol)
break;
if(k <= 1)
break;
}
// update likelihood for output
for(int i = 0; i < k; ++i) {
arma::rowvec tmp_mu = mu_old.row(i);
arma::mat tmp_sigma = sigma_old.slice(i);
pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
prob0.col(i) = pdf_est.col(i) * prop_old(i);
}
return Rcpp::List::create(Rcpp::Named("k") = k,
Rcpp::Named("prop") = prop_old,
Rcpp::Named("mu") = mu_old,
Rcpp::Named("sigma") = sigma_old,
Rcpp::Named("pdf_est") = pdf_est,
Rcpp::Named("ll") = sum(log(sum(prob0,1))),
Rcpp::Named("cluster") = tag+1,
Rcpp::Named("post_prob") = h_est);
}
//
// Stuff for constrained penalized Gaussian mixture model
//
// Calculate variance covariance matrix for constrained pGMM
// [[Rcpp::export]]
arma::mat cget_constr_sigma(arma::rowvec sigma, double rho, arma::rowvec combos, int d){
arma::mat Sigma = diagmat(sigma);
for(int i = 0; i < d-1; ++i){
for(int j = i+1; j < d; ++j){
if(combos(i) == combos(j) & combos(i) != 0){
Sigma(i,j) = rho;
Sigma(j,i) = rho;
} else if(combos(i) == -combos(j) & combos(i) != 0){
Sigma(i,j) = -rho;
Sigma(j,i) = -rho;
}
}
}
return Sigma;
}
// objective function to be optimized
// [[Rcpp::export]]
double func_to_optim(const arma::colvec& init_val,
arma::mat& x,
arma::mat& h_est,
arma::mat& combos) {
double mu = init_val(0);
double sigma = exp(init_val(1));
double rho = init_val(2);
int n = x.n_rows;
int d = x.n_cols;
int k = h_est.n_cols;
double nll;
arma::mat tmp_sigma(d, d, arma::fill::none);
arma::rowvec tmp_mu(d, arma::fill::none);
arma::mat pdf_est(n, k, arma::fill::none);
if( (abs3(rho) >= sigma)) {// || (abs3(rho) >= 1) ) {
return std::numeric_limits<double>::infinity();
}
for(int i = 0; i < k; ++i) {
// get sigma_in to pass to cget_constr_sigma
// This amount to finding the diagonal of Sigma
arma::rowvec sigma_in(abs(sigma*combos.row(i)));
arma::uvec zeroidx = find(combos.row(i) == 0);
sigma_in.elem(zeroidx).ones();
// This min part accounts for the possibility that sigma is actually bigger than 1
// Need to enforce strict inequality between rho and sigma
tmp_sigma = cget_constr_sigma(sigma_in, rho, combos.row(i), d); // rho * sigma should constrain rho to be less than sigma in the optimization
tmp_mu = mu*combos.row(i);
pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
}
// Adjust for numerically zero values
arma::uvec zeroidx = find(pdf_est == 0);
if(zeroidx.size() > 0) {
arma::uvec posidx = find(pdf_est != 0);
double clamper = pdf_est.elem(posidx).min();
arma::colvec populate_vec = arma::ones(zeroidx.size());
populate_vec = populate_vec * clamper;
pdf_est.elem(zeroidx) = populate_vec;
}
nll = -accu(h_est % log(pdf_est));
return nll;
}
// optimize objective function using 'optim' is R-package 'stats'
// [[Rcpp::export]]
arma::vec optim_rcpp(const arma::vec& init_val,
arma::mat& x,
arma::mat& h_est,
arma::mat& combos){
Rcpp::Environment stats("package:stats");
Rcpp::Function optim = stats["optim"];
try{
Rcpp::List opt = optim(Rcpp::_["par"] = init_val,
Rcpp::_["fn"] = Rcpp::InternalFunction(&func_to_optim),
Rcpp::_["method"] = "Nelder-Mead",
Rcpp::_["x"] = x,
Rcpp::_["h_est"] = h_est,
Rcpp::_["combos"] = combos);
arma::vec mles = Rcpp::as<arma::vec>(opt["par"]);
return mles;
}
catch(...){
arma::colvec err = { NA_REAL, NA_REAL, NA_REAL };
return err;
}
}
// // estimation and model selection of constrained penalized GMM
// // [[Rcpp::export]]
// Rcpp::List cfconstr_pGMM(arma::mat& x,
// arma::rowvec prop,
// arma::mat mu,
// arma::mat sigma,
// double rho,
// arma::mat combos,
// int k,
// arma::rowvec df,
// int lambda,
// int citermax,
// double tol,
// unsigned int LASSO) {
//
// const int n = x.n_rows;
// const int d = x.n_cols;
// double delta = 1;
// arma::rowvec prop_old = prop;
// arma::rowvec prop_new;
// arma::mat mu_old = mu;
// arma::mat sigma_old = sigma;
// double rho_old = rho;
// arma::uvec tag(n, arma::fill::none);
// arma::mat pdf_est(n, k, arma::fill::none);
// arma::mat prob0(n, k, arma::fill::none);
// arma::mat tmp_sigma(d,d,arma::fill::none);
// arma::mat h_est(n, k, arma::fill::none);
// double term; // for SCAD
// arma::colvec err_test = { NA_REAL };
//
// double thresh = 1E-03;
//
// for(int step = 0; step < citermax; ++step) {
// // E step
// for(int i = 0; i < k; ++i) {
// arma::rowvec tmp_mu = mu_old.row(i);
// tmp_sigma = cget_constr_sigma(sigma_old.row(i), rho_old, combos.row(i), d);
//
// try {
// pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
// prob0.col(i) = pdf_est.col(i) * prop_old(i);
// }
// catch(...){
// arma::colvec err = { NA_REAL, NA_REAL, NA_REAL };
// return Rcpp::List::create(Rcpp::Named("optim_err") = NA_REAL);
// }
// }
//
// h_est.set_size(n, k);
// for(int i = 0; i < n; ++i) {
// h_est.row(i) = prob0.row(i)/(sum(prob0.row(i)) * 1.0L);
// }
//
// // M step
// // update mean and variance covariance with numerical optimization
//
// // Select the mean and variance associated with reproducibility
// arma::uvec repidx = find(combos, 0);
// int idx = repidx(0);
// double mu_in = abs3(mu_old(idx));
// double sigma_in = sigma_old(idx);
// arma::colvec init_val = arma::colvec( { mu_in, log(sigma_in), rho_old } );
//
// // Optimize using optim (for now)
// arma::colvec param_new(3, arma::fill::none);
// param_new = optim_rcpp(init_val, x, h_est, combos);
//
// if(param_new(0) == err_test(0)) {
// return Rcpp::List::create(Rcpp::Named("optim_err") = NA_REAL);
// }
//
// // transform sigma back
// param_new(1) = exp(param_new(1));
//
// prop_new.set_size(k);
// if(LASSO == 1) {
// // update proportion via LASSO penalty
// for(int i = 0; i < k; ++i){
// prop_new(i) = (sum(h_est.col(i)) - lambda * df(i)) / (n-lambda*sum(df)) * 1.0L;
// if(prop_new(i) < thresh) // tolerance greater than 0 for numerical stability (Huang2013)
// prop_new(i) = 0;
// }
// } else {
// // proportion update via SCAD penalty
// term = accu((SCAD_1d(prop, lambda, k) % prop_old) % (1 / (1E-06 + SCAD(prop, lambda, k))));
// for(int i = 0; i < k; ++i) {
// prop_new(i) = sum(h_est.col(i)) /
// (n - (double_SCAD_1d(prop_old(i), lambda) / (1E-06 + double_SCAD(prop_old(i), lambda)) +
// term) * lambda * df(i)) * 1.0L;
// if(prop_new(i) < thresh) // tolerance greater than 0 for numerical stability (Huang2013)
// prop_new(i) = 0;
// }
// }
// prop_new = prop_new/(sum(prop_new) * 1.0L); // renormalize weights
//
// // calculate difference between two iterations
// delta = sum(abs(prop_new - prop_old));
//
// // eliminate small clusters
// if(sum(prop_new == 0) > 0) {
// arma::uvec idx = find(prop_new > 0);
// k = idx.size();
// prop_old = trans(prop_new.elem(idx));
// combos = combos.rows(idx);
// df = trans(df.elem(idx));
//
// mu_old.set_size(k,d);
// mu_old = combos*param_new(0);
//
// sigma_old.set_size(k,d);
// sigma_old = abs(combos*param_new(1));
// arma::uvec zeroidx2 = find(sigma_old == 0);
// sigma_old.elem(zeroidx2).ones();
//
// rho_old = param_new(2);
//
// pdf_est = pdf_est.cols(idx);
// prob0 = prob0.cols(idx);
// h_est = h_est.cols(idx);
// delta = 1;
// }
// else{
// prop_old = prop_new;
// mu_old = combos*param_new(0);
//
// sigma_old = abs(combos*param_new(1));
// arma::uvec zeroidx2 = find(sigma_old == 0);
// sigma_old.elem(zeroidx2).ones();
//
// rho_old = param_new(2);
// }
//
// //calculate cluster with maximum posterior probability
// tag = index_max(h_est, 1);
//
// if(delta < tol)
// break;
//
// if(k <= 1)
// break;
//
// }
//
// // update the likelihood for output
// for(int i = 0; i < k; ++i) {
// arma::rowvec tmp_mu = mu_old.row(i);
// tmp_sigma = cget_constr_sigma(sigma_old.row(i), rho_old, combos.row(i), d);
// pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
// prob0.col(i) = pdf_est.col(i) * prop_old(i);
// }
//
// return Rcpp::List::create(Rcpp::Named("k") = k,
// Rcpp::Named("prop") = prop_old,
// Rcpp::Named("mu") = mu_old,
// Rcpp::Named("sigma") = sigma_old,
// Rcpp::Named("rho") = rho_old,
// Rcpp::Named("df") = df,
// Rcpp::Named("pdf_est") = pdf_est,
// Rcpp::Named("ll") = sum(log(sum(prob0,1))),
// Rcpp::Named("cluster") = tag+1,
// Rcpp::Named("post_prob") = h_est,
// Rcpp::Named("combos") = combos);
// }
// objective function to be optimized
// [[Rcpp::export]]
double func_to_optim_bound(const arma::colvec& init_val,
arma::mat& x,
arma::mat& h_est,
arma::mat& combos,
double& bound) {
double mu = init_val(0);
double sigma = exp(init_val(1));
double rho = init_val(2);
int n = x.n_rows;
int d = x.n_cols;
int k = h_est.n_cols;
double nll;
if( (abs3(rho) >= sigma)) {
return std::numeric_limits<double>::infinity();
}
if( (abs3(mu) < bound)) {
return std::numeric_limits<double>::infinity();
}
arma::mat tmp_sigma(d, d, arma::fill::none);
arma::rowvec tmp_mu(d, arma::fill::none);
arma::mat pdf_est(n, k, arma::fill::none);
for(int i = 0; i < k; ++i) {
// get sigma_in to pass to cget_constr_sigma
// This amount to finding the diagonal of Sigma
arma::rowvec sigma_in(abs(sigma*combos.row(i)));
arma::uvec zeroidx = find(combos.row(i) == 0);
sigma_in.elem(zeroidx).ones();
// This min part accounts for the possibility that sigma is actually bigger than 1
// Need to enforce strict inequality between rho and sigma
tmp_sigma = cget_constr_sigma(sigma_in, rho, combos.row(i), d); // rho * sigma should constrain rho to be less than sigma in the optimization
tmp_mu = mu*combos.row(i);
pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
}
// Adjust for numerically zero values
arma::uvec zeroidx = find(pdf_est == 0);
if(zeroidx.size() > 0) {
arma::uvec posidx = find(pdf_est != 0);
double clamper = pdf_est.elem(posidx).min();
arma::colvec populate_vec = arma::ones(zeroidx.size());
populate_vec = populate_vec * clamper;
pdf_est.elem(zeroidx) = populate_vec;
}
nll = -accu(h_est % log(pdf_est));
return nll;
}
// optimize objective function using 'optim' is R-package 'stats'
// [[Rcpp::export]]
arma::vec optim_rcpp_bound(const arma::vec& init_val,
arma::mat& x,
arma::mat& h_est,
arma::mat& combos,
double& bound){
Rcpp::Environment stats("package:stats");
Rcpp::Function optim = stats["optim"];
try{
Rcpp::List opt = optim(Rcpp::_["par"] = init_val,
Rcpp::_["fn"] = Rcpp::InternalFunction(&func_to_optim_bound),
Rcpp::_["method"] = "Nelder-Mead",
Rcpp::_["x"] = x,
Rcpp::_["h_est"] = h_est,
Rcpp::_["combos"] = combos,
Rcpp::_["bound"] = bound);
arma::vec mles = Rcpp::as<arma::vec>(opt["par"]);
return mles;
}
catch(...){
arma::colvec err = { NA_REAL, NA_REAL, NA_REAL };
return err;
}
}
// estimation and model selection of constrained penalized GMM
// [[Rcpp::export]]
Rcpp::List cfconstr_pgmm(arma::mat& x,
arma::rowvec prop,
arma::mat mu,
arma::mat sigma,
double rho,
arma::mat combos,
int k,
arma::rowvec df,
int lambda,
int citermax,
double tol,
unsigned int LASSO,
double bound = 0.0) {
const int n = x.n_rows;
const int d = x.n_cols;
double delta = 1;
arma::rowvec prop_old = prop;
arma::rowvec prop_new;
arma::mat mu_old = mu;
arma::mat sigma_old = sigma;
double rho_old = rho;
arma::uvec tag(n, arma::fill::none);
arma::mat pdf_est(n, k, arma::fill::none);
arma::mat prob0(n, k, arma::fill::none);
arma::mat tmp_sigma(d,d,arma::fill::none);
arma::mat h_est(n, k, arma::fill::none);
double term; // for SCAD
arma::colvec err_test = { NA_REAL };
double thresh = 1E-03;
for(int step = 0; step < citermax; ++step) {
// E step
for(int i = 0; i < k; ++i) {
arma::rowvec tmp_mu = mu_old.row(i);
tmp_sigma = cget_constr_sigma(sigma_old.row(i), rho_old, combos.row(i), d);
try {
pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
prob0.col(i) = pdf_est.col(i) * prop_old(i);
}
catch(...){
arma::colvec err = { NA_REAL, NA_REAL, NA_REAL };
return Rcpp::List::create(Rcpp::Named("optim_err") = NA_REAL);
}
}
h_est.set_size(n, k);
for(int i = 0; i < n; ++i) {
h_est.row(i) = prob0.row(i)/(sum(prob0.row(i)) * 1.0L);
}
// M step
// update mean and variance covariance with numerical optimization
// Select the mean and variance associated with reproducibility
arma::uvec repidx = find(combos, 0);
int idx = repidx(0);
double mu_in = std::max(abs3(mu_old(idx)), bound);
double sigma_in = sigma_old(idx);
arma::colvec init_val = arma::colvec( { mu_in, log(sigma_in), rho_old } );
// Optimize using optim (for now)
arma::colvec param_new(3, arma::fill::none);
if(bound == 0.0) {
param_new = optim_rcpp(init_val, x, h_est, combos);
} else {
param_new = optim_rcpp_bound(init_val, x, h_est, combos, bound);
}
if(param_new(0) == err_test(0)) {
return Rcpp::List::create(Rcpp::Named("optim_err") = NA_REAL);
}
// transform sigma back
param_new(1) = exp(param_new(1));
prop_new.set_size(k);
if(LASSO == 1) {
// update proportion via LASSO penalty
for(int i = 0; i < k; ++i){
prop_new(i) = (sum(h_est.col(i)) - lambda * df(i)) / (n-lambda*sum(df)) * 1.0L;
if(prop_new(i) < thresh) // tolerance greater than 0 for numerical stability (Huang2013)
prop_new(i) = 0;
}
} else {
// proportion update via SCAD penalty
term = accu((SCAD_1d(prop, lambda, k) % prop_old) % (1 / (1E-06 + SCAD(prop, lambda, k))));
for(int i = 0; i < k; ++i) {
prop_new(i) = sum(h_est.col(i)) /
(n - (double_SCAD_1d(prop_old(i), lambda) / (1E-06 + double_SCAD(prop_old(i), lambda)) +
term) * lambda * df(i)) * 1.0L;
if(prop_new(i) < thresh) // tolerance greater than 0 for numerical stability (Huang2013)
prop_new(i) = 0;
}
}
prop_new = prop_new/(sum(prop_new) * 1.0L); // renormalize weights
// calculate difference between two iterations
delta = sum(abs(prop_new - prop_old));
// eliminate small clusters
if(sum(prop_new == 0) > 0) {
arma::uvec idx = find(prop_new > 0);
k = idx.size();
prop_old = trans(prop_new.elem(idx));
combos = combos.rows(idx);
df = trans(df.elem(idx));
mu_old.set_size(k,d);
mu_old = combos*param_new(0);
sigma_old.set_size(k,d);
sigma_old = abs(combos*param_new(1));
arma::uvec zeroidx2 = find(sigma_old == 0);
sigma_old.elem(zeroidx2).ones();
rho_old = param_new(2);
pdf_est = pdf_est.cols(idx);
prob0 = prob0.cols(idx);
h_est = h_est.cols(idx);
delta = 1;
}
else{
prop_old = prop_new;
mu_old = combos*param_new(0);
sigma_old = abs(combos*param_new(1));
arma::uvec zeroidx2 = find(sigma_old == 0);
sigma_old.elem(zeroidx2).ones();
rho_old = param_new(2);
}
//calculate cluster with maximum posterior probability
tag = index_max(h_est, 1);
if(delta < tol)
break;
if(k <= 1)
break;
}
// update the likelihood for output
for(int i = 0; i < k; ++i) {
arma::rowvec tmp_mu = mu_old.row(i);
tmp_sigma = cget_constr_sigma(sigma_old.row(i), rho_old, combos.row(i), d);
pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
prob0.col(i) = pdf_est.col(i) * prop_old(i);
}
return Rcpp::List::create(Rcpp::Named("k") = k,
Rcpp::Named("prop") = prop_old,
Rcpp::Named("mu") = mu_old,
Rcpp::Named("sigma") = sigma_old,
Rcpp::Named("rho") = rho_old,
Rcpp::Named("df") = df,
Rcpp::Named("pdf_est") = pdf_est,
Rcpp::Named("ll") = sum(log(sum(prob0,1))),
Rcpp::Named("cluster") = tag+1,
Rcpp::Named("post_prob") = h_est,
Rcpp::Named("combos") = combos);
}
// //
// // Stuff for the less constrained (constr0) penalized Gaussian mixture model
// //
//
// // Bind diagonals from covariances into one matrix (for use by optim)
// // [[Rcpp::export]]
// arma::mat bind_diags(arma::cube Sigma_in) {
// int n = Sigma_in.n_slices;
// arma::mat diagbind(n, 2, arma::fill::none);
// for(int i = 0; i < n; ++i) {
// diagbind.row(i) = Sigma_in.slice(i).diag().t();
// }
// return diagbind;
// }
//
// // Bind off-diagonals from covariances into one matrix (for use by optim)
// // [[Rcpp::export]]
// arma::colvec bind_offdiags(arma::cube Sigma_in) {
// arma::colvec rhobind = Sigma_in.tube(1,0);
// return rhobind;
// }
//
// // get vector of association-related variances for optim input
// // [[Rcpp::export]]
// arma::colvec get_sigma_optim(arma::mat diagbind, arma::mat combos) {
// arma::uvec neg = find(combos == -1);
// arma::uvec pos = find(combos == 1);
// arma::colvec sig_out;
//
// if(neg.n_rows > 0 & pos.n_rows > 0){
// sig_out = { diagbind(neg(0)), diagbind(pos(0)) };
// } else if(neg.n_rows > 0 & pos.n_rows == 0){
// sig_out = { diagbind(neg(0)) };
// } else if(neg.n_rows == 0 & pos.n_rows > 0){
// sig_out = { diagbind(pos(0)) };
// }
// return sig_out;
// }
//
// // get vector of association-related means for optim input
// // [[Rcpp::export]]
// arma::colvec get_mu_optim(arma::mat mu_in, arma::mat combos) {
// arma::uvec neg = find(combos == -1);
// arma::uvec pos = find(combos == 1);
// arma::colvec mu_out;
//
// if(neg.n_rows > 0 & pos.n_rows > 0){
// mu_out = { mu_in(neg(0)), mu_in(pos(0)) };
// } else if(neg.n_rows > 0 & pos.n_rows == 0){
// mu_out = { mu_in(neg(0)) };
// } else if(neg.n_rows == 0 & pos.n_rows > 0){
// mu_out = { mu_in(pos(0)) };
// }
// return mu_out;
// }
//
// // get rho for optim
// // [[Rcpp::export]]
// arma::colvec get_rho_optim(arma::colvec rhobind, arma::mat combos) {
// int n = combos.n_rows;
// int len = 0;
// arma::colvec rho_out(3);
//
// arma::colvec twoneg = { -1, -1 };
// arma::colvec twopos = { 1, 1 };
// arma::colvec cross1 = { -1, 1 };
// arma::colvec cross2 = { 1, -1 };
//
// for(int i = 0; i < n; ++i){
// if(combos(i,0) == twoneg(0) & combos(i,1) == twoneg(1)) {
// rho_out(len) = rhobind(i);
// ++len;
// break;
// }
// }
//
// for(int i = 0; i < n; ++i){
// if((combos(i,0) == cross1(0) & combos(i,1) == cross1(1)) ||
// (combos(i,0) == cross2(0) & combos(i,1) == cross2(1))){
// rho_out(len) = rhobind(i);
// ++len;
// break;
// }
// }
//
// for(int i = 0; i < n; ++i){
// if(combos(i,0) == twopos(0) & combos(i,1) == twopos(1)){
// rho_out(len) = rhobind(i);
// ++len;
// break;
// }
// }
// return rho_out.head(len);
// }
//
// // objective function to be optimized
// // [[Rcpp::export]]
// double func_to_optim0(const arma::colvec& init_val,
// const arma::mat& x,
// const arma::mat& h_est,
// const arma::mat& combos,
// const int& a, const int& b, const int& c,
// const arma::uvec& negidx) {
// arma::colvec mu(a);
// arma::colvec sigma(b);
// arma::colvec rho(c);
//
// mu.insert_rows(0, exp(init_val.subvec(0,a-1)));
// mu.elem(negidx) = -mu.elem(negidx);
// sigma.insert_rows(0, exp(init_val.subvec(a,a+b-1)));
// rho.insert_rows(0, init_val.subvec(a+b, a+b+c-1));
// for(int i = 0; i < c; ++i){
// rho(i) = trans_rho_inv(rho(i));
// }
//
// int n = x.n_rows;
// int d = x.n_cols;
// int k = h_est.n_cols;
// double nll;
//
// // get appropriate mean vector and covariance matrix to pass to cdmvnorm
// arma::mat tmp_sigma(d, d, arma::fill::zeros);
// arma::rowvec tmp_mu(d, arma::fill::zeros);
// arma::mat pdf_est(n, k, arma::fill::none);
//
// for(int i = 0; i < k; ++i) {
// for(int j = 0; j < d; ++j){
// if(combos(i,j) == -1){
// tmp_mu(j) = mu(0);
// tmp_sigma(j,j) = sigma(0);
// } else if(combos(i,j) == 0){
// tmp_sigma(j,j) = 1;
// } else{
// tmp_mu(j) = mu(a-1);
// tmp_sigma(j,j) = sigma(b-1);
// }
// }
//
// if(combos(i,0) == -1 & combos(i,1) == -1) {
// tmp_sigma(0,1) = rho(0);
// tmp_sigma(1,0) = rho(0);
// } else if(combos(i,0) == 1 & combos(i,1) == 1){
// tmp_sigma(0,1) = rho(c-1);
// tmp_sigma(1,0) = rho(c-1);
// } else if((combos(i,0) == -1 & combos(i,1) == 1) ||
// (combos(i,0) == 1 & combos(i,1) == -1)){
// if(rho(0) < 0){
// tmp_sigma(0,1) = rho(0);
// tmp_sigma(1,0) = rho(0);
// } else if(rho(1) < 0){
// tmp_sigma(0,1) = rho(1);
// tmp_sigma(1,0) = rho(1);
// } else{
// tmp_sigma(0,1) = rho(2);
// tmp_sigma(1,0) = rho(2);
// }
// }
// pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_sigma);
// }
// nll = -accu(h_est % log(pdf_est));
// return nll;
// }
//
// // optimize objective function using 'optim' is R-package 'stats'
// // [[Rcpp::export]]
// arma::vec optim0_rcpp(const arma::vec& init_val,
// arma::mat& x,
// arma::mat& h_est,
// arma::mat& combos,
// int& a, int& b, int& c,
// arma::uvec& negidx){
//
// Rcpp::Environment stats("package:stats");
// Rcpp::Function optim = stats["optim"];
//
// Rcpp::List opt = optim(Rcpp::_["par"] = init_val,
// Rcpp::_["fn"] = Rcpp::InternalFunction(&func_to_optim0),
// Rcpp::_["method"] = "Nelder-Mead",
// Rcpp::_["x"] = x,
// Rcpp::_["h_est"] = h_est,
// Rcpp::_["combos"] = combos,
// Rcpp::_["a"] = a,
// Rcpp::_["b"] = b,
// Rcpp::_["c"] = c,
// Rcpp::_["negidx"] = negidx);
// arma::vec mles = Rcpp::as<arma::vec>(opt["par"]);
//
// return mles;
// }
//
// // estimation and model selection of constrained penalized GMM
// // [[Rcpp::export]]
// Rcpp::List cfconstr0_pGMM(arma::mat& x,
// arma::rowvec prop,
// arma::mat mu,
// arma::cube Sigma,
// arma::mat combos,
// int k,
// arma::rowvec df,
// int lambda,
// int citermax,
// double tol) {
//
// const int n = x.n_rows;
// const int d = x.n_cols;
// double delta = 1;
// arma::rowvec prop_old = prop;
// arma::mat mu_old = mu;
// arma::cube Sigma_old = Sigma;
// arma::uvec tag(n, arma::fill::none);
// arma::mat pdf_est(n, k, arma::fill::none);
// arma::mat prob0(n, k, arma::fill::none);
// arma::mat tmp_Sigma(d,d,arma::fill::none);
// arma::mat h_est(n, k, arma::fill::none);
// arma::colvec init_val;
// arma::colvec param_new;
// arma::rowvec tmp_mu(d, arma::fill::none);
// arma::rowvec prop_new;
// double thresh = 1E-03;
//
// for(int step = 0; step < citermax; ++step) {
// // E step
// for(int i = 0; i < k; ++i) {
// tmp_mu = mu_old.row(i);
// tmp_Sigma = Sigma_old.slice(i);
//
// pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_Sigma);
// prob0.col(i) = pdf_est.col(i) * prop_old(i);
// }
//
// h_est.set_size(n, k);
// for(int i = 0; i < n; ++i) {
// h_est.row(i) = prob0.row(i)/(sum(prob0.row(i)) * 1.0L);
// }
//
// // M step
// // update mean and variance covariance with numerical optimization
// arma::colvec sgn_mu_in = get_mu_optim(mu_old, combos);
// arma::uvec negidx = find(sgn_mu_in < 0);
// arma::colvec sigma_in = get_sigma_optim(bind_diags(Sigma_old), combos);
// arma::colvec rho_in = get_rho_optim(bind_offdiags(Sigma_old), combos);
// int a = sgn_mu_in.n_rows;
// int b = sigma_in.n_rows;
// int c = rho_in.n_rows;
//
// for(int i = 0; i < c; ++i){
// rho_in(i) = trans_rho(rho_in(i));
// }
//
// init_val.set_size(a+b+c);
// init_val.subvec(0,a-1) = log(abs(sgn_mu_in));
// init_val.subvec(a,a+b-1) = log(sigma_in);
// init_val.subvec(a+b, a+b+c-1) = rho_in;
//
// // Optimize using optim
// param_new.copy_size(init_val);
// param_new = optim0_rcpp(init_val, x, h_est, combos, a, b, c, negidx);
//
// // Transform parameters back
// param_new.subvec(0,a-1) = exp(param_new.subvec(0,a-1));
// param_new.elem(negidx) = -param_new.elem(negidx);
// param_new.subvec(a,a+b-1) = exp(param_new.subvec(a,a+b-1));
// for(int i = 0; i < c; ++i){
// param_new(a+b+i) = trans_rho_inv(param_new(a+b+i));
// }
//
// // Make Sigma cube, mu matrix again
// for(int i = 0; i < k; ++i) {
// for(int j = 0; j < d; ++j){
// if(combos(i,j) == -1){
// mu_old(i,j) = param_new(0);
// Sigma_old(j,j,i) = param_new(a);
// } else if(combos(i,j) == 0){
// mu_old(i,j) = 0;
// Sigma_old(j,j,i) = 1;
// } else{
// mu_old(i,j) = param_new(a-1);
// Sigma_old(j,j,i) = param_new(a+b-1);
// }
// }
// if(combos(i,0) == -1 & combos(i,1) == -1) {
// Sigma_old(0,1,i) = param_new(a+b);
// Sigma_old(1,0,i) = param_new(a+b);
// } else if(combos(i,0) == 1 & combos(i,1) == 1){
// Sigma_old(0,1,i) = param_new(a+b+c-1);
// Sigma_old(1,0,i) = param_new(a+b+c-1);
// } else if((combos(i,0) == -1 & combos(i,1) == 1) ||
// (combos(i,0) == 1 & combos(i,1) == -1)){
// if(param_new(a+b) < 0){
// Sigma_old(0,1,i) = param_new(a+b);
// Sigma_old(1,0,i) = param_new(a+b);
// } else if(param_new(a+b+1) < 0){
// Sigma_old(0,1,i) = param_new(a+b+1);
// Sigma_old(1,0,i) = param_new(a+b+1);
// } else{
// Sigma_old(0,1,i) = param_new(a+b+c-1);
// Sigma_old(1,0,i) = param_new(a+b+c-1);
// }
// }
// }
//
// // update proportion
// prop_new.set_size(k);
// for(int i = 0; i < k; ++i){
// prop_new(i) = (sum(h_est.col(i)) - lambda * df(i)) / (n-lambda*sum(df)) * 1.0L;
// if(prop_new(i) < thresh) // tolerance greater than 0 for numerical stability (Huang2013)
// prop_new(i) = 0;
// }
// prop_new = prop_new/(sum(prop_new) * 1.0L);
//
// // calculate difference between two iterations
// delta = sum(abs(prop_new - prop_old));
//
// // eliminate small clusters
// if(sum(prop_new == 0) > 0) {
// arma::uvec idx = find(prop_new > 0);
// k = idx.size();
// prop_old = trans(prop_new.elem(idx));
// combos = combos.rows(idx);
// df = trans(df.elem(idx));
//
// mu_old = mu_old.rows(idx);
// Sigma_old = choose_slice(Sigma_old, idx, d, k);
//
// pdf_est = pdf_est.cols(idx);
// prob0 = prob0.cols(idx);
// h_est = h_est.cols(idx);
// delta = 1;
// }
// else{
// prop_old = prop_new;
// }
//
// //calculate cluster with maximum posterior probability
// tag = index_max(h_est, 1);
//
// if(delta < tol)
// break;
// if(k <= 1)
// break;
// }
//
// // update the likelihood for output
// for(int i = 0; i < k; ++i) {
// arma::rowvec tmp_mu = mu_old.row(i);
// tmp_Sigma = Sigma_old.slice(i);
// pdf_est.col(i) = cdmvnorm(x, tmp_mu, tmp_Sigma);
// prob0.col(i) = pdf_est.col(i) * prop_old(i);
// }
//
// return Rcpp::List::create(Rcpp::Named("k") = k,
// Rcpp::Named("prop") = prop_old,
// Rcpp::Named("mu") = mu_old,
// Rcpp::Named("Sigma") = Sigma_old,
// Rcpp::Named("df") = df,
// Rcpp::Named("pdf_est") = pdf_est,
// Rcpp::Named("ll") = sum(log(sum(prob0,1))),
// Rcpp::Named("cluster") = tag+1,
// Rcpp::Named("post_prob") = h_est);
// }
// Compute density of univariate normal
// [[Rcpp::export]]
arma::colvec cduvnorm(arma::colvec x, double mu, double sigma){
arma::colvec mdist = ((x-mu) % (x-mu))/(sigma);
const double log2pi = std::log(2.0 * M_PI);
double logcoef = -(log2pi + log(sigma));
arma::colvec logretval = (logcoef - mdist)/2;
return exp(logretval);
}
// computing marginal likelihood of constrained gmm (for copula likelihood)
// [[Rcpp::export]]
double cmarg_ll_gmm(arma::mat& z,
arma::mat mu,
arma::mat sigma,
arma::rowvec prop,
arma::mat combos,
int k) {
const int n = z.n_rows;
const int d = z.n_cols;
arma::mat mll(n,d,arma::fill::none);
arma::mat pdf_est(n,k,arma::fill::none);
double tmp_sigma;
double tmp_mu;
for(int i = 0; i < d; ++i){
for(int j = 0; j < k; ++j) {
tmp_mu = mu(j,i);
tmp_sigma = sigma(j,i);
pdf_est.col(j) = prop(j) * cduvnorm(z.col(i), tmp_mu, tmp_sigma);
}
mll.col(i) = log(sum(pdf_est,1));
}
return accu(mll);
}
// computing joint likelihood of constrained gmm (for copula likelihood)
// [[Rcpp::export]]
double cll_gmm(arma::mat& z,
arma::mat mu,
arma::mat sigma,
double rho,
arma::rowvec prop,
arma::mat combos,
int k) {
const int n = z.n_rows;
const int d = z.n_cols;
arma::rowvec tmp_mu(d, arma::fill::none);
arma::mat tmp_sigma(d, d, arma::fill::none);
arma::mat pdf_est(n,k,arma::fill::none);
for(int i = 0; i < k; ++i) {
tmp_mu = mu.row(i);
tmp_sigma = cget_constr_sigma(sigma.row(i), rho, combos.row(i), d);
pdf_est.col(i) = prop(i) * cdmvnorm(z, tmp_mu, tmp_sigma);
}
return accu(log(sum(pdf_est,1)));
}
// // computing marginal likelihood of LESS constrained (0) gmm (for copula likelihood)
// // [[Rcpp::export]]
// double cmarg0_ll_gmm(arma::mat& z,
// arma::mat mu,
// arma::cube Sigma,
// arma::rowvec prop,
// int k) {
// const int n = z.n_rows;
// const int d = z.n_cols;
// arma::mat mll(n,d,arma::fill::none);
// arma::mat pdf_est(n,k,arma::fill::none);
// double tmp_sigma;
// double tmp_mu;
// arma::mat tmp_Sigma(d,d,arma::fill::none);
//
// for(int i = 0; i < d; ++i){
// for(int j = 0; j < k; ++j) {
// tmp_mu = mu(j,i);
// tmp_Sigma = Sigma.slice(j);
// tmp_sigma = tmp_Sigma(i,i);
// pdf_est.col(j) = prop(j) * cduvnorm(z.col(i), tmp_mu, tmp_sigma);
// }
// mll.col(i) = log(sum(pdf_est,1));
// }
// return accu(mll);
// }
//
// // computing joint likelihood of LESS xconstrained (0) gmm (for copula likelihood)
// // [[Rcpp::export]]
// double cll0_gmm(arma::mat& z,
// arma::mat mu,
// arma::cube Sigma,
// arma::rowvec prop,
// int k) {
// const int n = z.n_rows;
// const int d = z.n_cols;
// arma::rowvec tmp_mu(d, arma::fill::none);
// arma::mat tmp_sigma(d, d, arma::fill::none);
// arma::mat pdf_est(n,k,arma::fill::none);
//
// for(int i = 0; i < k; ++i) {
// tmp_mu = mu.row(i);
// tmp_sigma = Sigma.slice(i);
// pdf_est.col(i) = prop(i) * cdmvnorm(z, tmp_mu, tmp_sigma);
// }
// return accu(log(sum(pdf_est,1)));
// }
//
//
| 35.271555 | 149 | 0.486018 | hillarykoch |
529a8e2fab9f629782fa7a9d338c22dacac2a961 | 2,426 | hpp | C++ | dependencies/generator/include/ph_coroutines/generator/generator.hpp | phiwen96/ph_coroutines | 985c3ba5efa735d6756f8d777b9d2fcc3ac8fd18 | [
"Apache-2.0"
] | null | null | null | dependencies/generator/include/ph_coroutines/generator/generator.hpp | phiwen96/ph_coroutines | 985c3ba5efa735d6756f8d777b9d2fcc3ac8fd18 | [
"Apache-2.0"
] | null | null | null | dependencies/generator/include/ph_coroutines/generator/generator.hpp | phiwen96/ph_coroutines | 985c3ba5efa735d6756f8d777b9d2fcc3ac8fd18 | [
"Apache-2.0"
] | null | null | null | #pragma once
#include <experimental/coroutine>
#include <concepts>
#include "iterator.hpp"
//#include <ph_coroutines/coroutines.hpp>
//using namespace std;
using namespace std::experimental;
using namespace std::chrono_literals;
template <class promise>
struct generator
{
using value_type = typename promise::value_type;
using promise_type = promise;
coroutine_handle <promise_type> handle;
explicit generator (coroutine_handle <promise_type> h) : handle {h} {
cout << "generator(handle)" << endl;
}
generator (generator&& other) : handle {exchange (other.handle, {})} {
cout << "generator(other)" << endl;
}
generator& operator=(generator&& other) noexcept {
if (this != &other) {
if (handle) {
handle.destroy();
}
swap (handle, other.handle);
} else
{
throw std::runtime_error ("coro");
}
return *this;
}
~generator () {
cout << "~generator()" << endl;
// destroy the coroutine
if (handle)
{
handle.destroy();
}
}
generator(generator const&) = delete;
generator& operator=(const generator&) = delete;
explicit operator bool() {
return !handle.done();
}
template <typename O>
requires requires (value_type t, O o) {
o = t;
}
operator O () {
if (handle.done())
{
throw std::runtime_error ("no, coroutine is done");
}
handle.resume();
return handle.promise().value;
}
auto operator () () -> decltype (auto) {
// will allocate a new stack frame and store the return-address of the caller in the
// stack frame before transfering execution to the function.
// resumes the coroutine from the point it was suspended
if (handle.done())
{
throw std::runtime_error ("no, coroutine is done");
}
handle.resume();
return handle.promise().value;
}
using iterator = typename promise_type::iterator;
auto begin() -> decltype (auto) {
if (handle) {
handle.resume();
}
return iterator {handle};
}
auto end() -> decltype (auto) {
return typename iterator::sentinel{};
}
};
| 25.270833 | 92 | 0.545754 | phiwen96 |
52b00100248ae4696a8454cebd4087b5dc4e8fbf | 925 | cpp | C++ | src/core/loader/internal/AbstractLoaderInternal.cpp | alexbatashev/athena | eafbb1e16ed0b273a63a20128ebd4882829aa2db | [
"MIT"
] | 2 | 2020-07-16T06:42:27.000Z | 2020-07-16T06:42:28.000Z | src/core/loader/internal/AbstractLoaderInternal.cpp | PolarAI/polarai-framework | c5fd886732afe787a06ebf6fb05fc38069257457 | [
"MIT"
] | null | null | null | src/core/loader/internal/AbstractLoaderInternal.cpp | PolarAI/polarai-framework | c5fd886732afe787a06ebf6fb05fc38069257457 | [
"MIT"
] | null | null | null | //===----------------------------------------------------------------------===//
// Copyright (c) 2020 PolarAI. All rights reserved.
//
// Licensed under MIT license.
//
// 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 <polarai/core/loader/internal/AbstractLoaderInternal.hpp>
namespace polarai::core::internal {
AbstractLoaderInternal::AbstractLoaderInternal(
utils::WeakPtr<ContextInternal> context, utils::Index publicIndex,
utils::String name)
: Entity(std::move(context), publicIndex, std::move(name)) {}
} // namespace polarai::core::internal
| 44.047619 | 80 | 0.629189 | alexbatashev |
52b0d4b4284f3565532ef9c76599df007167424f | 1,306 | cpp | C++ | src/systems/RenderSystem.cpp | TheoVerhelst/Aphelion | 357df0ba5542ce22dcff10c434aa4a20da0c1b17 | [
"Beerware"
] | 8 | 2022-01-18T09:58:21.000Z | 2022-02-21T00:08:58.000Z | src/systems/RenderSystem.cpp | TheoVerhelst/Aphelion | 357df0ba5542ce22dcff10c434aa4a20da0c1b17 | [
"Beerware"
] | null | null | null | src/systems/RenderSystem.cpp | TheoVerhelst/Aphelion | 357df0ba5542ce22dcff10c434aa4a20da0c1b17 | [
"Beerware"
] | null | null | null | #include <SFML/System/Time.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <systems/RenderSystem.hpp>
#include <components/Body.hpp>
#include <components/components.hpp>
#include <components/Animations.hpp>
#include <vector.hpp>
RenderSystem::RenderSystem(Scene& scene):
_scene{scene} {
}
void RenderSystem::draw(sf::RenderTarget& target, sf::RenderStates states) const {
for (auto& [id, sprite] : _scene.view<Sprite>()) {
target.draw(sprite.sprite, states);
}
for (auto& [id, animations] : _scene.view<Animations>()) {
for (auto& [action, animationData] : animations) {
if (not animationData.animation.isStopped()) {
target.draw(animationData.animation.getSprite(), states);
}
}
}
}
void RenderSystem::update() {
for (auto& [id, body, sprite] : _scene.view<Body, Sprite>()) {
sprite.sprite.setPosition(body.position);
sprite.sprite.setRotation(radToDeg(body.rotation));
}
for (auto& [id, body, animations] : _scene.view<Body, Animations>()) {
for (auto& [action, animationData] : animations) {
animationData.animation.getSprite().setPosition(body.position);
animationData.animation.getSprite().setRotation(radToDeg(body.rotation));
}
}
}
| 34.368421 | 85 | 0.652374 | TheoVerhelst |
52b50a908db902afa0e13d51d584d664204d4995 | 1,371 | hpp | C++ | include/Buffer2OS2.hpp | notwa/crap | fe81ca33f7940a98321d9efce5bc43f400016955 | [
"MIT"
] | 1 | 2017-11-27T00:03:28.000Z | 2017-11-27T00:03:28.000Z | include/Buffer2OS2.hpp | notwa/crap | fe81ca33f7940a98321d9efce5bc43f400016955 | [
"MIT"
] | null | null | null | include/Buffer2OS2.hpp | notwa/crap | fe81ca33f7940a98321d9efce5bc43f400016955 | [
"MIT"
] | null | null | null | template<class Mixin>
struct Buffer2OS2 : public Mixin {
virtual void
process2(v2df *buf, ulong rem) = 0;
halfband_t<v2df> hb_up, hb_down;
TEMPLATE void
_process(T *in_L, T *in_R, T *out_L, T *out_R, ulong count)
{
disable_denormals();
v2df buf[BLOCK_SIZE];
v2df over[FULL_SIZE];
for (ulong pos = 0; pos < count; pos += BLOCK_SIZE) {
ulong rem = BLOCK_SIZE;
if (pos + BLOCK_SIZE > count)
rem = count - pos;
ulong rem2 = rem*OVERSAMPLING;
for (ulong i = 0; i < rem; i++) {
buf[i][0] = in_L[i];
buf[i][1] = in_R[i];
}
for (ulong i = 0; i < rem; i++) {
over[i*2+0] = interpolate_a(&hb_up, buf[i]);
over[i*2+1] = interpolate_b(&hb_up, buf[i]);
}
process2(over, rem2);
for (ulong i = 0; i < rem; i++) {
decimate_a(&hb_down, over[i*2+0]);
buf[i] = decimate_b(&hb_down, over[i*2+1]);
}
for (ulong i = 0; i < rem; i++) {
out_L[i] = (T)buf[i][0];
out_R[i] = (T)buf[i][1];
}
in_L += BLOCK_SIZE;
in_R += BLOCK_SIZE;
out_L += BLOCK_SIZE;
out_R += BLOCK_SIZE;
}
}
void
process(
double *in_L, double *in_R,
double *out_L, double *out_R,
ulong count)
{
_process(in_L, in_R, out_L, out_R, count);
}
void
process(
float *in_L, float *in_R,
float *out_L, float *out_R,
ulong count)
{
_process(in_L, in_R, out_L, out_R, count);
}
};
| 19.869565 | 60 | 0.574034 | notwa |
52b64135199edef65d9c32051761db1a2092f890 | 2,225 | cpp | C++ | mrstelephonedigits/mrstelephonedigits/mrstelephonedigits.cpp | msalazar266/ITSE-1307 | e224f535e2b2537833241df90877c1d9669db108 | [
"MIT"
] | 1 | 2019-09-11T04:55:06.000Z | 2019-09-11T04:55:06.000Z | mrstelephonedigits/mrstelephonedigits/mrstelephonedigits.cpp | msalazar266/ITSE-1307 | e224f535e2b2537833241df90877c1d9669db108 | [
"MIT"
] | null | null | null | mrstelephonedigits/mrstelephonedigits/mrstelephonedigits.cpp | msalazar266/ITSE-1307 | e224f535e2b2537833241df90877c1d9669db108 | [
"MIT"
] | null | null | null | // mrstelephonedigits.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
/*
Matthew Salazar
ITSE - 1307 Spring 2019
20190402
This program outputs telephone digits that correspond to uppercase letters.
Pseudo Code :
1. User inputs numbers and or letters
2. if(a, b, or c), cout << "2"....etc.
3. if invalid character input, cout << "Invalid character"
*/
#include "pch.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
string strInput = "";
char chrLetter = ' ';
cout << "This program outputs telephone digits that correspond to uppercase letters.\n" << endl;
cout << "Please input something(letters and/or digits): ";
cin >> strInput; //User inputs something
cout << endl << endl;
cout << strInput << " is ";
for (unsigned int intLetter = 0; intLetter < strInput.length(); intLetter++) { // Checks each char
chrLetter = strInput.at(intLetter);
chrLetter = tolower(chrLetter);
switch (chrLetter) { //The corresponding digits is chosen
case '1': //User input 1
cout << "1";
break;
case '2': case 'a': case 'b': case 'c': //User input2, a, b, or c
cout << "2";
break;
case '3': case 'd': case 'e': case 'f': //User input 3, d, e, or f
cout << "3";
break;
case '4': case 'g': case 'h': case 'i': //User input 4, g, h, or i
cout << "4";
break;
case '5': case 'j': case 'k': case 'l': //User input 5, j, k, or l
cout << "5";
break;
case '6': case 'm': case 'n': case 'o': //User input 6, m, n, or o
cout << "6";
break;
case '7': case 'p': case 'q': case 'r': case 's': //User input 7, p, q, r, or s
cout << "7";
break;
case '8': case 't': case 'u': case 'v': //User input 8, t, u, or v
cout << "8";
break;
case '9': case 'w': case 'x': case 'y': case 'z': //User input 9, w, x, y, or z
cout << "9";
break;
case '0': //User input 0
cout << "0";
break;
default: //User input an invalid character
cout << ". ERROR: Invalid Character(s) " << "'" << strInput.at(intLetter) << "'" << ", " << endl;
cout << endl << endl;
}
}
}
| 25.872093 | 109 | 0.556404 | msalazar266 |
1ec13ce474f44a4f39295fdf3ddc6bec91cd769a | 4,746 | hh | C++ | AssocTools/AstSTLKeyMap.hh | brownd1978/FastSim | 05f590d72d8e7f71856fd833114a38b84fc7fd48 | [
"Apache-2.0"
] | null | null | null | AssocTools/AstSTLKeyMap.hh | brownd1978/FastSim | 05f590d72d8e7f71856fd833114a38b84fc7fd48 | [
"Apache-2.0"
] | null | null | null | AssocTools/AstSTLKeyMap.hh | brownd1978/FastSim | 05f590d72d8e7f71856fd833114a38b84fc7fd48 | [
"Apache-2.0"
] | null | null | null | #ifndef ASTSTLKEYMAP_HH
#define ASTSTLKEYMAP_HH
//----------------------------------------------------------------
// File and Version Information:
// $Id: AstSTLKeyMap.hh 436 2010-01-13 16:51:56Z stroili $
//
// Description:
// one-directional association map ofbetween two data types.
// the operator [] returns a std::vector<T*>
// of the second data type. Based on AstMap, this stores the
// first data type by VALUE, not by pointer.
//
// User must provide a hashing function which takes a T1 and
// returns an unsigned (this may be a static member function
// or a global function).
//
// usage:
// T1 t1; T2* t2;
// static unsigned t1hash(const T1& aT1);
// IfrMap<T1, T2> map(&t1hash);
//
// // appends the asociation (t1, t2)
// map[t1].append(t2);
//
// // returns a vector of objects associated to t1
// std::vector<T2*> v1 = map[t1];
//
// // checks for the asociation (t1, t2)
// bool associated map[t1].contains(t2);
//
//
// Author List:
// Michael Kelsey <[email protected]>
//
// Copyright (C) 2000 Princeton University
//
//---------------------------------------------------------------
//-------------
// C Headers --
//-------------
//---------------
// C++ Headers --
//---------------
#include <vector>
#include <set>
#include <map>
//----------------------
// Base Class Headers --
//----------------------
#include "AbsEvent/AbsEvtObj.hh"
//-------------------------------
// Collaborating Class Headers --
//-------------------------------
//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
// ---------------------
// -- Class Interface --
// ---------------------
template<class T1, class T2>
class AstSTLKeyMap :
public AbsEvtObj,
public std::map<T1, std::vector<T2*> >
{
public:
// NOTE: Unlike AstMap, the user _must_ provide a hashing function
AstSTLKeyMap(unsigned (*hashFunction)(const T1 &), size_t buckets=50);
virtual ~AstSTLKeyMap();
// Return a list of all T2
const std::vector<T2*> & allType2() const;
// This is the same as RW's insertKeyAndValue,
// but keeps a track of the T1s. There is nothing to stop
// users calling the original function, but no set
// operations will be possible thereafter.
void append(const T1&, T2* const&);
// Given a set of T1, return all associated T2. No check is made on the
// returned vector - if of non-zero length, items are simply appended.
// Returns false if no matches are found
bool findIntersectionSet(const std::set<T1> &, std::vector<T2*> &returned) const;
// As above but copies the intersection of the given HashSet and the known
// table into the final argument.
bool findIntersectionSet(const std::set<T1> &,
std::vector<T2*> &returned,
std::set<T1> &returnedSet) const;
// As above but saves user having to think about hash functions. Slower, as
// it has to copy the vector into a hash set first.
bool findIntersectionSet(const std::vector<T1> &,
std::vector<T2*> &returned) const;
// Given a set of T1, return all T2 for which no T1 in the given set exists.
// No check is made on the
// returned vector - if of non-zero length, items are simply appended.
// Returns false if no matches are found
bool findDifferenceSet(const std::set<T1> &,
std::vector<T2*> &returned) const;
// As above but copies the intersection of the given HashSet and the known
// table into the final argument.
bool findDifferenceSet(const std::set<T1> &,
std::vector<T2*> &returned,
std::set<T1> &) const;
// As above but saves user having to think about hash functions. Slower, as
// it has to copy the vector into a hash set first.
bool findDifferenceSet(const std::vector<T1> &,
std::vector<T2*> &returned) const;
// Compute the union with another map, modifying & returning self.
// Note that this is a union with the T1 type ONLY. No comparison
// is made with the associated (vector of) T2. Maybe one day I'll get
// around to writing one of those.
AstSTLKeyMap<T1, T2> &unionMap(const AstSTLKeyMap<T1, T2> &);
// Compute the union with another map, modifying & returningself.
AstSTLKeyMap<T1, T2> &intersectionMap(const AstSTLKeyMap<T1, T2> &);
private:
unsigned (*_myHashFunction)(const T1&);
std::vector<T2*> *_allT2;
std::set<T1> *_hashSetT1;
};
//--------------------
// Member functions --
//--------------------
//---------------
// Constructor --
//---------------
#ifdef BABAR_COMP_INST
#include "AssocTools/AstSTLKeyMap.icc"
#endif // BABAR_COMP_INST
#endif // ASTSTLKEYMAP_HH
| 31.223684 | 83 | 0.59271 | brownd1978 |
1ec2fbaca2371284f2ebc1edd5e492bee3a1717d | 5,517 | cpp | C++ | DNLS/cpu-implementation/DNLS.cpp | pisto/nlchains | 6e94b7a1dcacdd6fccb2b9e862bc648c1b263286 | [
"MIT"
] | 1 | 2019-06-25T01:09:19.000Z | 2019-06-25T01:09:19.000Z | DNLS/cpu-implementation/DNLS.cpp | pisto/nlchains | 6e94b7a1dcacdd6fccb2b9e862bc648c1b263286 | [
"MIT"
] | null | null | null | DNLS/cpu-implementation/DNLS.cpp | pisto/nlchains | 6e94b7a1dcacdd6fccb2b9e862bc648c1b263286 | [
"MIT"
] | null | null | null | #include <cmath>
#include <vector>
#include <fftw3.h>
#include "../../common/utilities.hpp"
#include "../../common/configuration.hpp"
#include "../../common/results.hpp"
#include "../../common/symplectic.hpp"
#include "../../common/loop_control.hpp"
#include "../../common/wisdom_sync.hpp"
#include "../DNLS.hpp"
using namespace std;
namespace DNLS {
namespace cpu {
namespace {
//XXX this is necessary because std::complex doesn't compile to SIMD
[[gnu::always_inline]] void split_complex_mul(double &r1, double &i1, double r2, double i2) {
double r3 = r1 * r2 - i1 * i2, i3 = i2 * r1 + i1 * r2;
r1 = r3, i1 = i3;
}
}
make_simd_clones("default,avx,avx512f")
int main(int argc, char *argv[]) {
double beta;
wisdom_sync wsync;
{
using namespace boost::program_options;
parse_cmdline parser("Options for "s + argv[0]);
parser.options.add_options()("beta", value(&beta)->required(), "fourth order nonlinearity");
wsync.add_options(parser.options);
parser.run(argc, argv);
}
auto omega = dispersion();
vector<complex<double>, simd_allocator<complex<double>>> evolve_linear_tables[7];
{
auto linear_tables_unaligned = DNLS::evolve_linear_table();
loopi(7) evolve_linear_tables[i].assign(linear_tables_unaligned[i].begin(),
linear_tables_unaligned[i].end());
}
vector<double> beta_dt_symplectic(8);
loopk(8) beta_dt_symplectic[k] = beta * gconf.dt * (k == 7 ? 2. : 1.) * symplectic_c[k];
results res(true);
vector<double, simd_allocator<double>> psi_r_buff(gconf.chain_length), psi_i_buff(gconf.chain_length);
double *__restrict__ psi_r = psi_r_buff.data();
double *__restrict__ psi_i = psi_i_buff.data();
BOOST_ALIGN_ASSUME_ALIGNED(psi_r, 64);
BOOST_ALIGN_ASSUME_ALIGNED(psi_i, 64);
destructor(fftw_cleanup);
wsync.gather();
fftw_iodim fft_dim{ gconf.chain_length, 1, 1 };
auto fft = fftw_plan_guru_split_dft(1, &fft_dim, 0, 0, psi_r, psi_i, psi_r, psi_i, FFTW_EXHAUSTIVE | wsync.fftw_flags);
//XXX fftw_execute_split_dft(fft, psi_i, psi_r, psi_i, psi_r) should do an inverse transform but it returns garbage
auto fft_back = fftw_plan_guru_split_dft(1, &fft_dim, 0, 0, psi_i, psi_r, psi_i, psi_r, FFTW_EXHAUSTIVE | wsync.fftw_flags);
destructor([=] { fftw_destroy_plan(fft); fftw_destroy_plan(fft_back); });
if (!fft || !fft_back) throw runtime_error("Cannot create FFTW3 plan");
wsync.scatter();
auto accumulate_linenergies = [&](size_t c) {
auto planar = &gres.shard_host[c * gconf.chain_length];
loopi(gconf.chain_length) psi_r[i] = planar[i].x, psi_i[i] = planar[i].y;
fftw_execute(fft);
loopi(gconf.chain_length) gres.linenergies_host[i] += psi_r[i] * psi_r[i] + psi_i[i] * psi_i[i];
};
//loop expects linenergies to be accumulated during move phase
loopi(gconf.shard_copies) accumulate_linenergies(i);
auto evolve_nonlinear = [&](double beta_dt_symplectic)[[gnu::always_inline]]{
openmp_simd
for (uint16_t i = 0; i < gconf.chain_length; i++) {
auto norm = psi_r[i] * psi_r[i] + psi_i[i] * psi_i[i];
double exp_r, exp_i, angle = -beta_dt_symplectic * norm;
#if 0
//XXX sincos is not being vectorized by GCC as of version 8.3, I don't know why
sincos(angle, &exp_i, &exp_r);
#else
//best-effort workaround
exp_r = cos(angle); //vectorized
#if 0
//naive
exp_i = sin(angle); //vectorized
#else
//This appears faster because of the sqrt opcode
exp_i = sqrt(1 - exp_r * exp_r); //vectorized (native VSQRTPD), exp_i = abs(sin(angle))
//branchless sign fix
auto invert_sign = int32_t(angle / M_PI) & 1; //0 -> even half-circles, 1 -> odd half-circles
exp_i *= (1. - 2. * invert_sign) * copysign(1., angle);
#endif
#endif
split_complex_mul(psi_r[i], psi_i[i], exp_r, exp_i);
}
};
loop_control loop_ctl;
while (1) {
loopi(gconf.chain_length) gres.linenergies_host[i] *= omega[i];
res.calc_linenergies(1. / gconf.shard_elements).calc_entropies().check_entropy().write_entropy(loop_ctl);
if (loop_ctl % gconf.dump_interval == 0) res.write_linenergies(loop_ctl).write_shard(loop_ctl);
if (loop_ctl.break_now()) break;
loopi(gconf.chain_length) gres.linenergies_host[i] = 0;
for (int c = 0; c < gconf.shard_copies; c++) {
auto planar = &gres.shard_host[c * gconf.chain_length];
loopi(gconf.chain_length) psi_r[i] = planar[i].x, psi_i[i] = planar[i].y;
for (uint32_t i = 0; i < gconf.kernel_batching; i++)
for (int k = 0; k < 7; k++) {
evolve_nonlinear(beta * gconf.dt * (!k && i ? 2. : 1.) * symplectic_c[k]);
fftw_execute(fft);
complex<double> * __restrict__ table = evolve_linear_tables[k].data();
BOOST_ALIGN_ASSUME_ALIGNED(table, 64);
openmp_simd
for (uint16_t i = 0; i < gconf.chain_length; i++)
split_complex_mul(psi_r[i], psi_i[i], table[i].real(), table[i].imag());
fftw_execute(fft_back);
}
evolve_nonlinear(beta * gconf.dt * symplectic_c[7]);
loopi(gconf.chain_length) planar[i] = { psi_r[i], psi_i[i] };
accumulate_linenergies(c);
}
loop_ctl += gconf.kernel_batching;
}
if (loop_ctl % gconf.dump_interval != 0) res.write_linenergies(loop_ctl).write_shard(loop_ctl);
return 0;
}
}
}
ginit = [] {
::programs()["DNLS-cpu"] = DNLS::cpu::main;
};
| 38.3125 | 127 | 0.649085 | pisto |
1ec3a8617265c163a3f252b88e8e6b6eaba4c3f3 | 79 | cpp | C++ | Tests/DigitTest.cpp | Bow0628/Qentem-Engine | 9d16acfaa4b9c8822edbb5903aa3e90cce1b0cd0 | [
"MIT"
] | 2 | 2021-07-03T06:26:42.000Z | 2021-08-16T12:22:22.000Z | Tests/DigitTest.cpp | fahad512/Qentem-Engine | 95090ea13058a2d3006c564c26d1f9474a1071c5 | [
"MIT"
] | null | null | null | Tests/DigitTest.cpp | fahad512/Qentem-Engine | 95090ea13058a2d3006c564c26d1f9474a1071c5 | [
"MIT"
] | null | null | null | #include "DigitTest.hpp"
int main() { return Qentem::Test::RunDigitTests(); }
| 19.75 | 52 | 0.696203 | Bow0628 |
1eca1e3b0e17ddabf630826e466dd37cfa8ecae8 | 1,712 | cpp | C++ | impl/jamtemplate/common/sound_group.cpp | Laguna1989/JamTemplateCpp | 66f6e547b3702d106d26c29f9eb0e7d052bcbdb5 | [
"CC0-1.0"
] | 6 | 2021-09-05T08:31:36.000Z | 2021-12-09T21:14:37.000Z | impl/jamtemplate/common/sound_group.cpp | Laguna1989/JamTemplateCpp | 66f6e547b3702d106d26c29f9eb0e7d052bcbdb5 | [
"CC0-1.0"
] | 30 | 2021-05-19T15:33:03.000Z | 2022-03-30T19:26:37.000Z | impl/jamtemplate/common/sound_group.cpp | Laguna1989/JamTemplateCpp | 66f6e547b3702d106d26c29f9eb0e7d052bcbdb5 | [
"CC0-1.0"
] | 3 | 2021-05-23T16:06:01.000Z | 2021-10-01T01:17:08.000Z | #include "sound_group.hpp"
#include "random/random.hpp"
#include "sound.hpp"
#include <algorithm>
namespace {
std::shared_ptr<jt::Sound> loadSound(std::string const& filename)
{
auto snd = std::make_shared<jt::Sound>();
snd->load(filename);
return snd;
}
} // namespace
jt::SoundGroup::SoundGroup(std::vector<std::string> const& sounds)
{
for (auto const& f : sounds) {
m_sounds.emplace_back(loadSound(f));
}
m_isInitialized = true;
}
void jt::SoundGroup::doLoad(std::string const& fileName)
{
m_sounds.emplace_back(loadSound(fileName));
}
bool jt::SoundGroup::doIsPlaying() const
{
return std::any_of(m_sounds.cbegin(), m_sounds.cend(),
[](std::shared_ptr<SoundBase> const& snd) { return snd->isPlaying(); });
}
void jt::SoundGroup::doPlay()
{
if (m_sounds.empty()) {
return;
}
std::size_t const index = Random::getInt(0, static_cast<int>(m_sounds.size()) - 1);
m_sounds.at(index)->play();
}
void jt::SoundGroup::doStop()
{
for (auto& snd : m_sounds) {
snd->stop();
}
}
float jt::SoundGroup::doGetVolume() const
{
if (m_sounds.empty()) {
return 0.0f;
}
return m_sounds.at(0)->getVolume();
}
void jt::SoundGroup::doSetVolume(float newVolume)
{
for (auto& snd : m_sounds) {
snd->setVolume(newVolume);
}
}
void jt::SoundGroup::doSetLoop(bool doLoop)
{
for (auto& snd : m_sounds) {
snd->setLoop(doLoop);
}
}
bool jt::SoundGroup::doGetLoop()
{
if (m_sounds.empty()) {
return false;
}
return m_sounds.at(0)->getLoop();
}
float jt::SoundGroup::doGetDuration() const { return 0.0f; }
float jt::SoundGroup::doGetPosition() const { return 0.0f; }
| 20.380952 | 87 | 0.630257 | Laguna1989 |
1ecca6b25bb8fe54956c9dc44601e315f9d0bf88 | 446 | hpp | C++ | src/Engine.hpp | AgaBuu/TankBotFight | 154b176b697b5d88fffb4b0c9c9c2f8dac334afb | [
"MIT"
] | null | null | null | src/Engine.hpp | AgaBuu/TankBotFight | 154b176b697b5d88fffb4b0c9c9c2f8dac334afb | [
"MIT"
] | null | null | null | src/Engine.hpp | AgaBuu/TankBotFight | 154b176b697b5d88fffb4b0c9c9c2f8dac334afb | [
"MIT"
] | null | null | null | #pragma once
#include <SFML/System/Vector2.hpp>
#include <memory>
enum class Gear { Drive, Neutral, Reverse };
class Engine {
public:
virtual void set_gear(Gear) = 0;
[[nodiscard]] virtual float get_current_speed() const = 0;
[[nodiscard]] virtual sf::Vector2f get_position_delta(float rotation_radians) = 0;
virtual void update() = 0;
[[nodiscard]] virtual std::unique_ptr<Engine> copy() const = 0;
virtual ~Engine() = default;
};
| 29.733333 | 84 | 0.70852 | AgaBuu |
1eccfd96d413a263c0a9a473c59290c595bd7e45 | 1,134 | cpp | C++ | src/csapex_core/src/param/null_parameter.cpp | betwo/csapex | f2c896002cf6bd4eb7fba2903ebeea4a1e811191 | [
"BSD-3-Clause"
] | 21 | 2016-09-02T15:33:25.000Z | 2021-06-10T06:34:39.000Z | src/csapex_core/src/param/null_parameter.cpp | cogsys-tuebingen/csAPEX | e80051384e08d81497d7605e988cab8c19f6280f | [
"BSD-3-Clause"
] | null | null | null | src/csapex_core/src/param/null_parameter.cpp | cogsys-tuebingen/csAPEX | e80051384e08d81497d7605e988cab8c19f6280f | [
"BSD-3-Clause"
] | 10 | 2016-10-12T00:55:17.000Z | 2020-04-24T19:59:02.000Z | /// HEADER
#include <csapex/param/null_parameter.h>
/// PROJECT
#include <csapex/param/register_parameter.h>
#include <csapex/serialization/io/std_io.h>
#include <csapex/utility/yaml.h>
CSAPEX_REGISTER_PARAM(NullParameter)
using namespace csapex;
using namespace param;
NullParameter::NullParameter() : ParameterImplementation("null", ParameterDescription())
{
}
NullParameter::NullParameter(const std::string& name, const ParameterDescription& description) : ParameterImplementation(name, description)
{
}
NullParameter::~NullParameter()
{
}
bool NullParameter::hasState() const
{
return false;
}
const std::type_info& NullParameter::type() const
{
return typeid(void);
}
std::string NullParameter::toStringImpl() const
{
return std::string("[null]");
}
void NullParameter::get_unsafe(std::any& out) const
{
throw std::logic_error("cannot use null parameters");
}
bool NullParameter::set_unsafe(const std::any& /*v*/)
{
throw std::logic_error("cannot use null parameters");
}
void NullParameter::doSerialize(YAML::Node& /*n*/) const
{
}
void NullParameter::doDeserialize(const YAML::Node& /*n*/)
{
}
| 19.551724 | 139 | 0.738095 | betwo |
1ecd18516e68adf3b5710df766cbfee49a1ff29a | 599 | cpp | C++ | Dia2/C-PermutationDescentCounts.cpp | pauolivares/ICPCCL2018 | 72708a14ff5c1911ab87f7b758f131603603c808 | [
"Apache-2.0"
] | null | null | null | Dia2/C-PermutationDescentCounts.cpp | pauolivares/ICPCCL2018 | 72708a14ff5c1911ab87f7b758f131603603c808 | [
"Apache-2.0"
] | null | null | null | Dia2/C-PermutationDescentCounts.cpp | pauolivares/ICPCCL2018 | 72708a14ff5c1911ab87f7b758f131603603c808 | [
"Apache-2.0"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
long long dp[101][101];
long long mod = 1001113;
long long solve(long long a,long long b){
if(a==0 && b== 0) return 1;
if(b==0 ) return 1;
if(b>=a) return 0;
if(dp[a][b]!=-1) return dp[a][b];
return dp[a][b] = (((a-b)*solve(a-1,b-1))%mod + ((b+1)*solve(a-1,b))%mod)%mod;
}
int main(){
long long t;
for(long long i=0;i<101;i++){
for(long long j=0;j<101;j++){
dp[i][j]=-1;
}
}
dp[1][0]=1;
dp[1][1]=1;
cin>>t;
while(t--){
long long a,b,c;
cin>>a>>b>>c;
cout<<a<<" "<<solve(b,c)<<endl;
}
return 0;
}
| 18.71875 | 80 | 0.512521 | pauolivares |
1ecf5c4fb5a9e61cd9cf632b2401608d24e6c28b | 1,332 | hpp | C++ | include/tweedledum/utils/hash.hpp | AriJordan/tweedledum | 9f98aad8cb01587854247eb755ecf4a1eec41941 | [
"MIT"
] | null | null | null | include/tweedledum/utils/hash.hpp | AriJordan/tweedledum | 9f98aad8cb01587854247eb755ecf4a1eec41941 | [
"MIT"
] | null | null | null | include/tweedledum/utils/hash.hpp | AriJordan/tweedledum | 9f98aad8cb01587854247eb755ecf4a1eec41941 | [
"MIT"
] | null | null | null | /*--------------------------------------------------------------------------------------------------
| This file is distributed under the MIT License.
| See accompanying file /LICENSE for details.
*-------------------------------------------------------------------------------------------------*/
#pragma once
#include <functional>
#include <set>
#include <vector>
namespace tweedledum {
template<typename T>
struct hash : public std::hash<T> {};
template<>
struct hash<std::set<uint32_t>> {
using argument_type = std::set<uint32_t>;
using result_type = size_t;
void combine(std::size_t& seed, uint32_t const& v) const
{
seed ^= std::hash<uint32_t>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
result_type operator()(argument_type const& in) const
{
result_type seed = 0;
for (auto& element : in) {
combine(seed, element);
}
return seed;
}
};
template<>
struct hash<std::vector<uint32_t>> {
using argument_type = std::vector<uint32_t>;
using result_type = size_t;
void combine(std::size_t& seed, uint32_t const& v) const
{
seed ^= std::hash<uint32_t>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
result_type operator()(argument_type const& in) const
{
result_type seed = 0;
for (auto& element : in) {
combine(seed, element);
}
return seed;
}
};
} // namespace tweedledum
| 23.368421 | 100 | 0.567568 | AriJordan |
1ed0f2023f31e1426b8dc324ab909ba7ed20edde | 1,237 | hpp | C++ | 9_ranges/filter.hpp | rgrover/yap-demos | d4e100f9fb835bea2a6505f2ed9b8e87ee1ee928 | [
"BSD-2-Clause"
] | null | null | null | 9_ranges/filter.hpp | rgrover/yap-demos | d4e100f9fb835bea2a6505f2ed9b8e87ee1ee928 | [
"BSD-2-Clause"
] | null | null | null | 9_ranges/filter.hpp | rgrover/yap-demos | d4e100f9fb835bea2a6505f2ed9b8e87ee1ee928 | [
"BSD-2-Clause"
] | null | null | null | #ifndef _FILTER_HPP
#define _FILTER_HPP
#include "range.hpp"
#include "range_expr.hpp"
#include <boost/yap/algorithm.hpp>
#include <boost/callable_traits/args.hpp>
#include <boost/callable_traits/return_type.hpp>
#include <boost/callable_traits/function_type.hpp>
#include <type_traits>
template <typename Predicate>
struct filter_function
{
Predicate predicate;
};
template <boost::yap::expr_kind Kind, typename Tuple>
struct filter_expr {
constexpr static boost::yap::expr_kind kind = Kind;
Tuple elements;
};
BOOST_YAP_USER_BINARY_OPERATOR(shift_left_assign, filter_expr, range_expr)
template <typename Predicate>
constexpr auto filter(Predicate&& predicate)
{
using arg_type = boost::callable_traits::args_t<Predicate>;
using return_type = boost::callable_traits::return_type_t<Predicate>;
static_assert(std::tuple_size_v<arg_type> == 1,
"Predicate argument for filter needs to take one argument");
static_assert(std::is_same_v<return_type, bool>,
"Predicate argument for filter needs to return a bool");
return boost::yap::make_terminal<filter_expr>(filter_function<Predicate>{std::forward<Predicate>(predicate)});
}
#endif //_FILTER_HPP
| 28.767442 | 114 | 0.742926 | rgrover |
1ed10d782a2f461a5471e60cc06762abc511c0dc | 20,585 | cc | C++ | src/CCA/Components/Arches/Properties.cc | damu1000/Uintah | 0c768664c1fe0a80eff2bbbd9b837e27f281f0a5 | [
"MIT"
] | 2 | 2021-12-17T05:50:44.000Z | 2021-12-22T21:37:32.000Z | src/CCA/Components/Arches/Properties.cc | damu1000/Uintah | 0c768664c1fe0a80eff2bbbd9b837e27f281f0a5 | [
"MIT"
] | null | null | null | src/CCA/Components/Arches/Properties.cc | damu1000/Uintah | 0c768664c1fe0a80eff2bbbd9b837e27f281f0a5 | [
"MIT"
] | 1 | 2020-11-30T04:46:05.000Z | 2020-11-30T04:46:05.000Z | /*
* The MIT License
*
* Copyright (c) 1997-2020 The University of Utah
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
//----- Properties.cc --------------------------------------------------
#include <CCA/Components/Arches/Properties.h>
#include <CCA/Components/Arches/ArchesLabel.h>
# include <CCA/Components/Arches/ChemMix/ClassicTableInterface.h>
# include <CCA/Components/Arches/ChemMix/ColdFlow.h>
# include <CCA/Components/Arches/ChemMix/ConstantProps.h>
#include <CCA/Components/Arches/ArchesMaterial.h>
#include <CCA/Components/Arches/CellInformationP.h>
#include <CCA/Components/Arches/CellInformation.h>
#include <CCA/Components/Arches/PhysicalConstants.h>
#include <CCA/Components/Arches/TimeIntegratorLabel.h>
#include <CCA/Components/MPMArches/MPMArchesLabel.h>
#include <CCA/Components/Arches/TransportEqns/EqnFactory.h>
#include <CCA/Components/Arches/TransportEqns/EqnBase.h>
#include <CCA/Ports/Scheduler.h>
#include <CCA/Ports/DataWarehouse.h>
#include <Core/Grid/Variables/PerPatch.h>
#include <Core/Grid/Variables/CellIterator.h>
#include <Core/Grid/Variables/VarTypes.h>
#include <Core/Grid/MaterialManager.h>
#include <Core/Exceptions/InvalidValue.h>
#include <Core/Exceptions/ProblemSetupException.h>
#include <Core/Exceptions/VariableNotFoundInGrid.h>
#include <Core/Math/MiscMath.h>
#include <Core/Parallel/Parallel.h>
#include <Core/Parallel/ProcessorGroup.h>
#include <Core/ProblemSpec/ProblemSpec.h>
#include <iostream>
using namespace std;
using namespace Uintah;
//****************************************************************************
// Default constructor for Properties
//****************************************************************************
Properties::Properties(ArchesLabel* label,
const MPMArchesLabel* MAlb,
PhysicalConstants* phys_const,
const ProcessorGroup* myworld):
d_lab(label), d_MAlab(MAlb),
d_physicalConsts(phys_const),
d_myworld(myworld)
{
}
//****************************************************************************
// Destructor
//****************************************************************************
Properties::~Properties()
{
if ( mixModel == "TabProps" || mixModel == "ClassicTable"
|| mixModel == "ColdFlow" || mixModel == "ConstantProps" ){
delete d_mixingRxnTable;
}
}
//****************************************************************************
// Problem Setup for Properties
//****************************************************************************
void
Properties::problemSetup(const ProblemSpecP& params)
{
ProblemSpecP db = params->findBlock("Properties");
if ( db == nullptr ){
throw ProblemSetupException("Error: Please specify a <Properties> section in <Arches>.", __FILE__, __LINE__);
}
db->getWithDefault("filter_drhodt", d_filter_drhodt, false);
db->getWithDefault("first_order_drhodt", d_first_order_drhodt, true);
db->getWithDefault("inverse_density_average",d_inverse_density_average,false);
d_denRef = d_physicalConsts->getRefPoint();
// check to see if gas is adiabatic and (if DQMOM) particles are not:
d_adiabGas_nonadiabPart = false;
if (params->findBlock("DQMOM")) {
ProblemSpecP db_dqmom = params->findBlock("DQMOM");
db_dqmom->getWithDefault("adiabGas_nonadiabPart", d_adiabGas_nonadiabPart, false);
}
// // read type of mixing model
// mixModel = "NA";
// if (db->findBlock("ClassicTable"))
// mixModel = "ClassicTable";
// else if (db->findBlock("ColdFlow"))
// mixModel = "ColdFlow";
// else if (db->findBlock("ConstantProps"))
// mixModel = "ConstantProps";
// #if HAVE_TABPROPS
// else if (db->findBlock("TabProps"))
// mixModel = "TabProps";
// #endif
// else
// throw InvalidValue("ERROR!: No mixing/reaction table specified! If you are attempting to use the new TabProps interface, ensure that you configured properly with TabProps and Boost libs.",__FILE__,__LINE__);
//
// MaterialManagerP& materialManager = d_lab->d_materialManager;
//
// if (mixModel == "ClassicTable") {
//
// // New Classic interface
// d_mixingRxnTable = scinew ClassicTableInterface( materialManager );
// d_mixingRxnTable->problemSetup( db );
// } else if (mixModel == "ColdFlow") {
// d_mixingRxnTable = scinew ColdFlow( materialManager );
// d_mixingRxnTable->problemSetup( db );
// } else if (mixModel == "ConstantProps" ) {
// d_mixingRxnTable = scinew ConstantProps( materialManager );
// d_mixingRxnTable->problemSetup( db );
// }
// #if HAVE_TABPROPS
// else if (mixModel == "TabProps") {
// // New TabPropsInterface stuff...
// d_mixingRxnTable = scinew TabPropsInterface( materialManager );
// d_mixingRxnTable->problemSetup( db );
// }
// #endif
// else{
// throw InvalidValue("Mixing Model not supported: " + mixModel, __FILE__, __LINE__);
// }
}
//****************************************************************************
// Schedule the averaging of properties for Runge-Kutta step
//****************************************************************************
void
Properties::sched_averageRKProps( SchedulerP& sched, const PatchSet* patches,
const MaterialSet* matls,
const TimeIntegratorLabel* timelabels )
{
string taskname = "Properties::averageRKProps" +
timelabels->integrator_step_name;
Task* tsk = scinew Task(taskname, this,
&Properties::averageRKProps,
timelabels);
Ghost::GhostType gn = Ghost::None;
tsk->requires(Task::OldDW, d_lab->d_densityCPLabel, gn, 0);
tsk->requires(Task::NewDW, d_lab->d_densityTempLabel, gn, 0);
tsk->requires(Task::NewDW, d_lab->d_densityCPLabel, gn, 0);
tsk->modifies(d_lab->d_densityGuessLabel);
sched->addTask(tsk, patches, matls);
}
//****************************************************************************
// Actually average the Runge-Kutta properties here
//****************************************************************************
void
Properties::averageRKProps( const ProcessorGroup*,
const PatchSubset* patches,
const MaterialSubset*,
DataWarehouse* old_dw,
DataWarehouse* new_dw,
const TimeIntegratorLabel* timelabels )
{
for (int p = 0; p < patches->size(); p++) {
const Patch* patch = patches->get(p);
int archIndex = 0; // only one arches material
int indx = d_lab->d_materialManager->
getMaterial( "Arches", archIndex)->getDWIndex();
constCCVariable<double> old_density;
constCCVariable<double> rho1_density;
constCCVariable<double> new_density;
CCVariable<double> density_guess;
Ghost::GhostType gn = Ghost::None;
old_dw->get(old_density, d_lab->d_densityCPLabel, indx, patch, gn, 0);
new_dw->get(rho1_density, d_lab->d_densityTempLabel, indx, patch, gn, 0);
new_dw->get(new_density, d_lab->d_densityCPLabel, indx, patch, gn, 0);
new_dw->getModifiable(density_guess, d_lab->d_densityGuessLabel, indx, patch);
double factor_old, factor_new, factor_divide;
factor_old = timelabels->factor_old;
factor_new = timelabels->factor_new;
factor_divide = timelabels->factor_divide;
IntVector indexLow = patch->getExtraCellLowIndex();
IntVector indexHigh = patch->getExtraCellHighIndex();
for (int colZ = indexLow.z(); colZ < indexHigh.z(); colZ ++) {
for (int colY = indexLow.y(); colY < indexHigh.y(); colY ++) {
for (int colX = indexLow.x(); colX < indexHigh.x(); colX ++) {
IntVector currCell(colX, colY, colZ);
if (new_density[currCell] > 0.0) {
double predicted_density;
if (old_density[currCell] > 0.0) {
//predicted_density = rho1_density[currCell];
if (d_inverse_density_average)
predicted_density = 1.0/((factor_old/old_density[currCell] + factor_new/new_density[currCell])/factor_divide);
else
predicted_density = (factor_old*old_density[currCell] + factor_new*new_density[currCell])/factor_divide;
} else {
predicted_density = new_density[currCell];
}
density_guess[currCell] = predicted_density;
}
}
}
}
}
}
//****************************************************************************
// Schedule saving of temp density
//****************************************************************************
void
Properties::sched_saveTempDensity(SchedulerP& sched,
const PatchSet* patches,
const MaterialSet* matls,
const TimeIntegratorLabel* timelabels)
{
string taskname = "Properties::saveTempDensity" +
timelabels->integrator_step_name;
Task* tsk = scinew Task(taskname, this,
&Properties::saveTempDensity,
timelabels);
tsk->requires(Task::NewDW, d_lab->d_densityCPLabel, Ghost::None, 0);
tsk->modifies(d_lab->d_densityTempLabel);
sched->addTask(tsk, patches, matls);
}
//****************************************************************************
// Actually save temp density here
//****************************************************************************
void
Properties::saveTempDensity(const ProcessorGroup*,
const PatchSubset* patches,
const MaterialSubset*,
DataWarehouse*,
DataWarehouse* new_dw,
const TimeIntegratorLabel* )
{
for (int p = 0; p < patches->size(); p++) {
const Patch* patch = patches->get(p);
int archIndex = 0; // only one arches material
int indx = d_lab->d_materialManager->
getMaterial( "Arches", archIndex)->getDWIndex();
CCVariable<double> temp_density;
new_dw->getModifiable(temp_density, d_lab->d_densityTempLabel,indx, patch);
new_dw->copyOut(temp_density, d_lab->d_densityCPLabel, indx, patch);
}
}
//****************************************************************************
// Schedule the computation of drhodt
//****************************************************************************
void
Properties::sched_computeDrhodt(SchedulerP& sched,
const PatchSet* patches,
const MaterialSet* matls,
const TimeIntegratorLabel* timelabels)
{
string taskname = "Properties::computeDrhodt" +
timelabels->integrator_step_name;
Task* tsk = scinew Task(taskname, this,
&Properties::computeDrhodt,
timelabels);
tsk->requires( Task::OldDW, d_lab->d_timeStepLabel );
Task::WhichDW parent_old_dw;
if (timelabels->recursion){
parent_old_dw = Task::ParentOldDW;
}else{
parent_old_dw = Task::OldDW;
}
Ghost::GhostType gn = Ghost::None;
Ghost::GhostType ga = Ghost::AroundCells;
tsk->requires(Task::NewDW, d_lab->d_cellInfoLabel, gn);
tsk->requires(parent_old_dw, d_lab->d_delTLabel);
tsk->requires(parent_old_dw, d_lab->d_oldDeltaTLabel);
tsk->requires(Task::NewDW , d_lab->d_densityCPLabel , gn , 0);
tsk->requires(parent_old_dw , d_lab->d_densityCPLabel , gn , 0);
tsk->requires(Task::NewDW , d_lab->d_filterVolumeLabel , ga , 1);
tsk->requires(Task::NewDW , d_lab->d_cellTypeLabel , ga , 1);
//tsk->requires(Task::NewDW, VarLabel::find("mixture_fraction"), gn, 0);
if ( timelabels->integrator_step_number == TimeIntegratorStepNumber::First ) {
tsk->computes(d_lab->d_filterdrhodtLabel);
tsk->computes(d_lab->d_oldDeltaTLabel);
}
else{
tsk->modifies(d_lab->d_filterdrhodtLabel);
}
sched->addTask(tsk, patches, matls);
}
//****************************************************************************
// Compute drhodt
//****************************************************************************
void
Properties::computeDrhodt(const ProcessorGroup* pc,
const PatchSubset* patches,
const MaterialSubset*,
DataWarehouse* old_dw,
DataWarehouse* new_dw,
const TimeIntegratorLabel* timelabels)
{
// int timeStep = m_materialManager->getCurrentTopLevelTimeStep();
timeStep_vartype timeStep;
old_dw->get( timeStep, d_lab->d_timeStepLabel );
DataWarehouse* parent_old_dw;
if (timelabels->recursion){
parent_old_dw = new_dw->getOtherDataWarehouse(Task::ParentOldDW);
}else{
parent_old_dw = old_dw;
}
int drhodt_1st_order = 1;
if (d_MAlab){
drhodt_1st_order = 2;
}
delt_vartype delT, old_delT;
parent_old_dw->get(delT, d_lab->d_delTLabel );
if (timelabels->integrator_step_number == TimeIntegratorStepNumber::First){
new_dw->put(delT, d_lab->d_oldDeltaTLabel);
}
double delta_t = delT;
delta_t *= timelabels->time_multiplier;
delta_t *= timelabels->time_position_multiplier_after_average;
parent_old_dw->get(old_delT, d_lab->d_oldDeltaTLabel);
double old_delta_t = old_delT;
//__________________________________
for (int p = 0; p < patches->size(); p++) {
const Patch* patch = patches->get(p);
int archIndex = 0; // only one arches material
int indx = d_lab->d_materialManager->
getMaterial( "Arches", archIndex)->getDWIndex();
constCCVariable<double> new_density;
constCCVariable<double> old_density;
constCCVariable<double> old_old_density;
//constCCVariable<double> mf;
CCVariable<double> drhodt;
CCVariable<double> filterdrhodt;
constCCVariable<double> filterVolume;
constCCVariable<int> cellType;
Ghost::GhostType gn = Ghost::None;
Ghost::GhostType ga = Ghost::AroundCells;
parent_old_dw->get(old_density, d_lab->d_densityCPLabel, indx, patch,gn, 0);
new_dw->get( cellType, d_lab->d_cellTypeLabel, indx, patch, ga, 1 );
new_dw->get( filterVolume, d_lab->d_filterVolumeLabel, indx, patch, ga, 1 );
//new_dw->get( mf, VarLabel::find("mixture_fraction"), indx, patch, gn, 0);
PerPatch<CellInformationP> cellInfoP;
new_dw->get(cellInfoP, d_lab->d_cellInfoLabel, indx, patch);
CellInformation* cellinfo = cellInfoP.get().get_rep();
new_dw->get(new_density, d_lab->d_densityCPLabel, indx, patch, gn, 0);
if ( timelabels->integrator_step_number == TimeIntegratorStepNumber::First ){
new_dw->allocateAndPut(filterdrhodt, d_lab->d_filterdrhodtLabel, indx, patch);
}else{
new_dw->getModifiable(filterdrhodt, d_lab->d_filterdrhodtLabel, indx, patch);
}
filterdrhodt.initialize(0.0);
// Get the patch and variable indices
IntVector idxLo = patch->getFortranCellLowIndex();
IntVector idxHi = patch->getFortranCellHighIndex();
// compute drhodt and its filtered value
drhodt.allocate(patch->getExtraCellLowIndex(), patch->getExtraCellHighIndex());
drhodt.initialize(0.0);
//__________________________________
if ((d_first_order_drhodt)||(timeStep <= (unsigned int)drhodt_1st_order)) {
// 1st order drhodt
for (int kk = idxLo.z(); kk <= idxHi.z(); kk++) {
for (int jj = idxLo.y(); jj <= idxHi.y(); jj++) {
for (int ii = idxLo.x(); ii <= idxHi.x(); ii++) {
IntVector currcell(ii,jj,kk);
double vol =cellinfo->sns[jj]*cellinfo->stb[kk]*cellinfo->sew[ii];
//double rho_f = 1.18;
//double rho_ox = 0.5;
//double newnewrho = mf[currcell]/rho_ox + (1.0 - mf[currcell])/rho_f;
drhodt[currcell] = (new_density[currcell] -
old_density[currcell])*vol/delta_t;
//drhodt[currcell] = (newnewrho - old_density[currcell]*vol/delta_t);
}
}
}
}
else {
// 2nd order drhodt, assuming constant volume
double factor = 1.0 + old_delta_t/delta_t;
double new_factor = factor * factor - 1.0;
double old_factor = factor * factor;
for (int kk = idxLo.z(); kk <= idxHi.z(); kk++) {
for (int jj = idxLo.y(); jj <= idxHi.y(); jj++) {
for (int ii = idxLo.x(); ii <= idxHi.x(); ii++) {
IntVector currcell(ii,jj,kk);
double vol =cellinfo->sns[jj]*cellinfo->stb[kk]*cellinfo->sew[ii];
drhodt[currcell] = (new_factor*new_density[currcell] -
old_factor*old_density[currcell] +
old_old_density[currcell])*vol /
(old_delta_t*factor);
//double rho_f = 1.18;
//double rho_ox = 0.5;
//double newnewrho = mf[currcell]/rho_f + (1.0 - mf[currcell])/rho_ox;
}
}
}
}
if ((d_filter_drhodt)&&(!(d_3d_periodic))) {
// filtering for periodic case is not implemented
// if it needs to be then drhodt will require 1 layer of boundary cells to be computed
d_filter->applyFilter_noPetsc<CCVariable<double> >(pc, patch, drhodt, filterVolume, cellType, filterdrhodt);
}else{
filterdrhodt.copy(drhodt, drhodt.getLowIndex(),
drhodt.getHighIndex());
}
for (int kk = idxLo.z(); kk <= idxHi.z(); kk++) {
for (int jj = idxLo.y(); jj <= idxHi.y(); jj++) {
for (int ii = idxLo.x(); ii <= idxHi.x(); ii++) {
IntVector currcell(ii,jj,kk);
double vol =cellinfo->sns[jj]*cellinfo->stb[kk]*cellinfo->sew[ii];
if (Abs(filterdrhodt[currcell]/vol) < 1.0e-9){
filterdrhodt[currcell] = 0.0;
}
}
}
}
}
}
void
Properties::sched_computeProps( const LevelP& level,
SchedulerP& sched,
const bool initialize,
const bool modify_ref_den,
const int time_substep )
{
// this method is temporary while we get rid of properties.cc
d_mixingRxnTable->sched_getState( level, sched, time_substep, initialize, modify_ref_den );
}
void
Properties::sched_checkTableBCs( const LevelP& level,
SchedulerP& sched )
{
d_mixingRxnTable->sched_checkTableBCs( level, sched );
}
void
Properties::addLookupSpecies( ){
ChemHelper& helper = ChemHelper::self();
std::vector<std::string> sps;
sps = helper.model_req_species;
if ( mixModel == "ClassicTable" || mixModel == "TabProps"
|| "ColdFlow" || "ConstantProps" ) {
for ( vector<string>::iterator i = sps.begin(); i != sps.end(); i++ ){
bool test = d_mixingRxnTable->insertIntoMap( *i );
if ( !test ){
throw InvalidValue("Error: Cannot locate the following variable for lookup in the table: "+*i, __FILE__, __LINE__ );
}
}
}
std::vector<std::string> old_sps;
old_sps = helper.model_req_old_species;
if ( mixModel == "ClassicTable" || mixModel == "TabProps"
|| "ColdFlow" || "ConstantProps") {
for ( vector<string>::iterator i = old_sps.begin(); i != old_sps.end(); i++ ){
d_mixingRxnTable->insertOldIntoMap( *i );
}
}
}
void
Properties::doTableMatching(){
d_mixingRxnTable->tableMatching();
}
| 38.12037 | 214 | 0.595579 | damu1000 |
1ed31cfaff50f31ffc6baa199f9a6071773c54ea | 1,054 | cpp | C++ | src/6_2_voxel_grid.cpp | liwind/PCL_Example | 9f807412ecf8110e0e05d5f41df31335a1c7d4ae | [
"MIT"
] | 2 | 2019-12-05T15:05:11.000Z | 2021-04-17T09:15:04.000Z | src/6_2_voxel_grid.cpp | liwind/PCL_Example | 9f807412ecf8110e0e05d5f41df31335a1c7d4ae | [
"MIT"
] | null | null | null | src/6_2_voxel_grid.cpp | liwind/PCL_Example | 9f807412ecf8110e0e05d5f41df31335a1c7d4ae | [
"MIT"
] | 2 | 2019-12-05T15:05:15.000Z | 2021-04-18T01:57:24.000Z | #include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/PCLPointCloud2.h>
#include <pcl/point_types.h>
#include <pcl/filters/voxel_grid.h>
using namespace std;
int main(int argc, char** argv)
{
pcl::PCLPointCloud2::Ptr cloud(new pcl::PCLPointCloud2());
pcl::PCLPointCloud2::Ptr cloud_filtered(new pcl::PCLPointCloud2());
pcl::PCDReader reader;
reader.read("../data/table_scene_lms400.pcd", *cloud);
std::cerr << "PointCloud before filtering: " << cloud->width * cloud->height
<< " data points (" << pcl::getFieldsList(*cloud) << ").\n";
pcl::VoxelGrid<pcl::PCLPointCloud2> vg;
vg.setInputCloud(cloud);
vg.setLeafSize(0.1f, 0.1f, 0.1f);
vg.filter(*cloud_filtered);
std::cerr << "PointCloud after filtering: " << cloud_filtered->width * cloud_filtered->height
<< " data points (" << pcl::getFieldsList(*cloud_filtered) << ").";
pcl::PCDWriter writer;
writer.write("../data/table_scene_lms400_downsampled.pcd", *cloud_filtered,
Eigen::Vector4f::Zero(), Eigen::Quaternionf::Identity(), false);
system("pause");
return (0);
}
| 31.939394 | 94 | 0.701139 | liwind |
1ed9532e2da37d7fb8b2fe6f2e25983f51b0106e | 5,492 | cpp | C++ | src/wcmodel.cpp | anrichter/qsvn | d048023ddcf7c23540cdde47096c2187b19e3710 | [
"MIT"
] | 22 | 2015-02-12T07:38:09.000Z | 2021-11-03T07:42:39.000Z | src/wcmodel.cpp | anrichter/qsvn | d048023ddcf7c23540cdde47096c2187b19e3710 | [
"MIT"
] | null | null | null | src/wcmodel.cpp | anrichter/qsvn | d048023ddcf7c23540cdde47096c2187b19e3710 | [
"MIT"
] | 17 | 2015-01-26T01:11:51.000Z | 2020-10-29T10:00:28.000Z | /********************************************************************************
* This file is part of QSvn Project http://www.anrichter.net/projects/qsvn *
* Copyright (c) 2004-2010 Andreas Richter <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License Version 2 *
* as published by the Free Software Foundation. *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
*******************************************************************************/
//QSvn
#include "config.h"
#include "wcmodel.h"
#include "wcmodel.moc"
//SvnCpp
#include "svnqt/wc.hpp"
//Qt
#include <QtGui>
WcModel::WcModel(QObject *parent)
: QStandardItemModel(parent)
{
setHorizontalHeaderLabels(QStringList("Working Copy"));
loadWcList();
}
WcModel::~WcModel()
{
saveWcList();
}
bool WcModel::hasChildren(const QModelIndex &parent) const
{
if (!parent.isValid())
return true;
else {
QStandardItem *_item = itemFromIndex(parent);
if (!_item->data(PopulatedRole).toBool())
populate(_item);
return _item->rowCount();
}
}
void WcModel::populate(QStandardItem * parent) const
{
parent->removeRows(0, parent->rowCount());
foreach (QString _dir, QDir(parent->data(PathRole).toString()).entryList(QDir::AllDirs).filter(QRegExp("^[^.]")))
insertDir(_dir, parent, parent->rowCount());
parent->setData(true, PopulatedRole);
}
void WcModel::insertWc(QString dir)
{
dir = QDir::toNativeSeparators(QDir::cleanPath(dir));
int row = 0;
for (int i = 0; i < invisibleRootItem()->rowCount(); i++)
{
if (dir > getPath(invisibleRootItem()->child(i)->index()))
row = i + 1;
}
insertDir(dir, invisibleRootItem(), row);
}
void WcModel::removeWc(QString dir)
{
foreach(QStandardItem* _item, findItems(dir))
{
removeRow(_item->row(), _item->index().parent());
}
}
void WcModel::updateWc(QString dir)
{
QStandardItem *_item = itemFromDirectory(dir);
if (_item)
populate(_item->parent());
}
QString WcModel::getPath(const QModelIndex &index) const
{
return itemFromIndex(index)->data(PathRole).toString();
}
void WcModel::insertDir(QString dir, QStandardItem * parent, int row) const
{
QStandardItem *item = new QStandardItem();
item->setText(QDir::toNativeSeparators(QDir::cleanPath(dir)));
//complete dir in data(PathRole) to full path for subdirectories of root-wc-items
if (parent != invisibleRootItem())
dir = parent->data(PathRole).toString() + QDir::separator() + dir;
item->setData(QDir::toNativeSeparators(dir), PathRole);
if (svn::Wc::checkWc(dir.toLocal8Bit()))
item->setIcon(QIcon(":/images/folder.png"));
else
item->setIcon(QIcon(":/images/unknownfolder.png"));
parent->insertRow(row, item);
}
void WcModel::saveWcList()
{
QStringList wcList;
for (int i = 0; i < invisibleRootItem()->rowCount(); i++)
wcList << invisibleRootItem()->child(i)->data(PathRole).toString();
Config::instance()->saveStringList("workingCopies", wcList);
}
void WcModel::loadWcList()
{
QStringList wcList = Config::instance()->getStringList("workingCopies");
wcList.sort();
foreach (QString wc, wcList)
insertDir(wc, invisibleRootItem(), invisibleRootItem()->rowCount());
}
void WcModel::doCollapse(const QModelIndex & index)
{
itemFromIndex(index)->setData(false, PopulatedRole);
}
QStandardItem * WcModel::itemFromDirectory(const QString dir, const QStandardItem * parent)
{
if (parent)
{
for (int i = 0; i < parent->rowCount(); i++)
{
if (parent->child(i)->data(PathRole) == dir)
return parent->child(i);
}
//search recursive
QStandardItem *_result;
for (int i = 0; i < parent->rowCount(); i++)
{
_result = itemFromDirectory(dir, parent->child(i));
if (_result)
return _result;
}
}
else
{
for (int i = 0; i < rowCount(); i++)
{
if (item(i)->data(PathRole) == dir)
return item(i);
}
//search recursive
QStandardItem *_result;
for (int i = 0; i < rowCount(); i++)
{
_result = itemFromDirectory(dir, item(i));
if (_result)
return _result;
}
}
return 0;
}
| 31.028249 | 117 | 0.5437 | anrichter |
1eda477cefef2a4c78c409045f5588eaf7277aec | 9,855 | cpp | C++ | src/ExpressionContext.cpp | VincentPT/xpression | 3aed63a899e20ac0fe36eaa090f49f1ed85e4673 | [
"MIT"
] | null | null | null | src/ExpressionContext.cpp | VincentPT/xpression | 3aed63a899e20ac0fe36eaa090f49f1ed85e4673 | [
"MIT"
] | null | null | null | src/ExpressionContext.cpp | VincentPT/xpression | 3aed63a899e20ac0fe36eaa090f49f1ed85e4673 | [
"MIT"
] | null | null | null | #include "ExpressionContext.h"
#include "SimpleCompilerSuite.h"
#include "xutility.h"
#include <string.h>
#include <DefaultPreprocessor.h>
#include <CLamdaProg.h>
#include <Program.h>
#include <string>
#include <list>
#include "VariableManager.h"
#include "ExpressionGlobalScope.h"
#include "ExpressionInternal.h"
namespace xpression {
#if _WIN32 || _WIN64
__declspec(thread) ExpressionContext* _threadExpressionContext = nullptr;
// Check GCC
#elif __GNUC__
__thread ExpressionContext* _threadExpressionContext = nullptr;
#endif
class ExpressionEventManager {
std::list<ExpressionEventHandler*> _handlers;
public:
void addHandler(ExpressionEventHandler* handler) {
_handlers.push_back(handler);
}
void removeHandler(ExpressionEventHandler* handler) {
_handlers.remove(handler);
}
void notifyUpdate() {
for(auto hander : _handlers) {
hander->onRequestUpdate();
}
}
};
class ExpressionGlobalScopeCreator : public GlobalScopeCreator {
std::function<ffscript::GlobalScope*(int, ffscript::ScriptCompiler*)> _funcCreator;
public:
ExpressionGlobalScopeCreator(std::function<ffscript::GlobalScope*(int, ffscript::ScriptCompiler*)>&& fx) : _funcCreator(fx) {}
ffscript::GlobalScope* create(int stackSize, ffscript::ScriptCompiler* scriptCompiler) {
return _funcCreator(stackSize, scriptCompiler);
}
};
ExpressionContext::ExpressionContext(int stackSize) :
_pRawProgram(nullptr), _allocatedDataSize(0), _allocatedScopeSize(0),
_pVariableManager(nullptr), _needUpdateVariable(false),
_needRunGlobalCode(false), _needRegenerateCode(false) {
ExpressionGlobalScopeCreator globalScopeCreator([this](int stackSize, ffscript::ScriptCompiler* scriptCompiler){
return new ExpressionGlobalScope(this, stackSize, scriptCompiler);
});
_pCompilerSuite = new SimpleCompilerSuite(stackSize, &globalScopeCreator);
_pCompilerSuite->setPreprocessor(std::make_shared<DefaultPreprocessor>());
_userData.data = nullptr;
_userData.dt = UserDataType::NotUsed;
_pVariableManager = new VariableManager(_pCompilerSuite->getGlobalScope()->getContext());
_eventManager = new ExpressionEventManager();
}
ExpressionContext::~ExpressionContext() {
if(_pRawProgram) {
delete _pRawProgram;
}
if(_pCompilerSuite) {
delete _pCompilerSuite;
}
if(_pVariableManager) {
delete _pVariableManager;
}
if(_eventManager) {
delete _eventManager;
}
}
SimpleCompilerSuite* ExpressionContext::getCompilerSuite() const {
return _pCompilerSuite;
}
ExpressionContext* ExpressionContext::getCurrentContext() {
return _threadExpressionContext;
}
void ExpressionContext::setCurrentContext(ExpressionContext* pContext) {
_threadExpressionContext = pContext;
}
void ExpressionContext::setCustomScript(const wchar_t* customScript) {
if(_pRawProgram) {
throw std::runtime_error("custom script is already available");
}
auto len = wcslen(customScript);
_pRawProgram = _pCompilerSuite->compileProgram(customScript, customScript + len);
// check if the compiling process is failed...
if (_pRawProgram == nullptr) {
// ...then get error information
// then shows to user
int line, column;
_pCompilerSuite->getLastCompliedPosition(line, column);
string errorMsg("error at line = ");
errorMsg.append(std::to_string(line + 1));
errorMsg.append(", column = ");
errorMsg.append(std::to_string(column + 1));
errorMsg.append(" msg: ");
errorMsg.append(_pCompilerSuite->getCompiler()->getLastError());
throw std::runtime_error(errorMsg);
}
_needRunGlobalCode = true;
}
void ExpressionContext::startEvaluating() {
if(_pVariableManager && _needUpdateVariable) {
_pVariableManager->requestUpdateVariables();
_pVariableManager->checkVariablesFullFilled();
// all registered variables are updated now
_needUpdateVariable = false;
}
auto globalScope = _pCompilerSuite->getGlobalScope();
if(_needRegenerateCode && _pRawProgram) {
_pRawProgram->resetExcutors();
_pRawProgram->resetFunctionMap();
if(!globalScope->extractCode(_pRawProgram)) {
throw std::runtime_error("Regenerate code is failed");
}
_needRunGlobalCode = true;
}
// check if need to run global code
if(!_needRunGlobalCode) return;
auto context = globalScope->getContext();
if(_allocatedDataSize || _allocatedScopeSize) {
context->scopeUnallocate(_allocatedDataSize, _allocatedScopeSize);
}
_allocatedDataSize = globalScope->getDataSize();
_allocatedScopeSize = globalScope->getScopeSize(); // space need to run the code
context->pushContext(globalScope->getConstructorCommandCount());
context->scopeAllocate(_allocatedDataSize, _allocatedScopeSize);
context->run();
context->runDestructorCommands();
}
ffscript::Variable* ExpressionContext::addVariable(xpression::Variable* pVariable) {
if(pVariable->name == nullptr || pVariable->name[0] == 0) {
throw std::runtime_error("Variable name cannot be empty");
}
if(pVariable->type == DataType::Unknown) {
throw std::runtime_error("type of variable '" + std::string(pVariable->name) + "' is unknown");
}
auto globalScope = _pCompilerSuite->getGlobalScope();
// convert static type to lambda script type
auto& typeManager = _pCompilerSuite->getTypeManager();
auto& basicType = typeManager->getBasicTypes();
int iType = staticToDynamic(basicType, pVariable->type);
if(DATA_TYPE_UNKNOWN == iType) {
throw std::runtime_error("type of variable '" + std::string(pVariable->name) + "' is not supported");
}
// regist variable with specified name
auto pScriptVariable = globalScope->registVariable(pVariable->name);
if(pScriptVariable == nullptr) {
throw std::runtime_error("Variable '" + std::string(pVariable->name) + "' is already exist");
}
// set variable type
ScriptType type(iType, typeManager->getType(iType));
pScriptVariable->setDataType(type);
_pVariableManager->addVariable(pVariable);
_pVariableManager->addRequestUpdateVariable(pScriptVariable, pVariable->dataPtr == nullptr);
// the variable now is register success, then it need evaluate before expression evaluate
_needUpdateVariable = true;
// request existing expression in current scope update when new variable is added to the scope
_eventManager->notifyUpdate();
// update the last added variable' offset
globalScope->updateLastVariableOffset();
// need re-generate code after add new variable
_needRegenerateCode = true;
return pScriptVariable;
}
void ExpressionContext::removeVariable(Variable* pVariable) {
_pVariableManager->removeVariable(pVariable);
}
VariableUpdater* ExpressionContext::getVariableUpdater() {
if(_pVariableManager == nullptr) {
return nullptr;
}
return _pVariableManager->getVariableUpdater();
}
void ExpressionContext::setVariableUpdater(VariableUpdater* pVariableUpdater, bool deleteIt) {
_pVariableManager->setVariableUdater(pVariableUpdater, deleteIt);
}
void ExpressionContext::setUserData(const UserData& userData) {
_userData = userData;
}
UserData& ExpressionContext::getUserData() {
return _userData;
}
void ExpressionContext::addExpressionEventHandler(ExpressionEventHandler* handler) {
_eventManager->addHandler(handler);
}
void ExpressionContext::removeExpressionEventHandler(ExpressionEventHandler* handler) {
_eventManager->removeHandler(handler);
}
void ExpressionContext::fillVariable(const char* name, Variable* resultVariable) {
auto globalScope = _pCompilerSuite->getGlobalScope();
auto& compiler = _pCompilerSuite->getCompiler();
auto scriptVarible = globalScope->findVariable(name);
if(scriptVarible == nullptr) {
throw std::runtime_error("variable '" + std::string(name) + "'not found");
}
// need run global code before fill variable
startEvaluating();
auto variableContext = globalScope->getContext();
auto& typeManager = _pCompilerSuite->getTypeManager();
auto& basicType = typeManager->getBasicTypes();
resultVariable->type = dynamicToStatic(basicType, scriptVarible->getDataType().iType());
resultVariable->dataSize = compiler->getTypeSize(scriptVarible->getDataType());
void* variableDataAddressDst =
variableContext->getAbsoluteAddress(variableContext->getCurrentOffset() + scriptVarible->getOffset());
resultVariable->dataPtr = variableDataAddressDst;
}
VariableManager* ExpressionContext::getVariableManager() {
return _pVariableManager;
}
} | 38.197674 | 135 | 0.645561 | VincentPT |
1edecb27d8e09c4670cba165a18a2b56fe1b62df | 5,438 | cpp | C++ | android/jni/JNIRegistStaticMethod.cpp | 15d23/NUIEngine | a1369d5cea90cca81d74a39b8a853b3fba850595 | [
"Apache-2.0"
] | 204 | 2017-05-08T05:41:29.000Z | 2022-03-29T16:57:44.000Z | android/jni/JNIRegistStaticMethod.cpp | 15d23/NUIEngine | a1369d5cea90cca81d74a39b8a853b3fba850595 | [
"Apache-2.0"
] | 7 | 2017-05-10T15:32:09.000Z | 2020-12-23T06:00:30.000Z | android/jni/JNIRegistStaticMethod.cpp | 15d23/NUIEngine | a1369d5cea90cca81d74a39b8a853b3fba850595 | [
"Apache-2.0"
] | 65 | 2017-05-25T05:46:56.000Z | 2021-02-06T11:07:38.000Z | #include "JNIRegistStaticMethod.h"
#include <stdlib.h>
extern JavaVM * gJavaVM; // 全局变量, 在JNI_OnLoad时获取
#define JR_MUTEX
JNIRegistStaticMethod::JNIRegistStaticMethod()
{
m_bRegistered = false;
m_isAttached = false;
m_class = NULL;
m_methodCallback = NULL;
}
int JNIRegistStaticMethod::UnregisterCallback(JNIEnv * env)
{
JR_MUTEX
m_bRegistered = false;
if(m_class)
{
env->DeleteGlobalRef(m_class);
m_class = NULL;
}
return 0;
}
// 避免抛出异常挂掉
void AvoidException(JNIEnv* env)
{
if(env->ExceptionCheck())
{
// 通过System.out.err 输出
env->ExceptionDescribe();
// 清除异常
env->ExceptionClear();
}
}
int JNIRegistStaticMethod::RegisterCallback(JNIEnv* env, const char* pszClassName, const char* szMethodName, const char* szMethodSign)
{
JR_MUTEX // register 和 Call不能同时进行
m_bRegistered = false;
if(m_class)
{
// 避免重复Register
env->DeleteGlobalRef(m_class);
m_class = NULL;
}
// 获取类名 "android/navi/ui/mainmap/MainMapActivity"
jclass jcLocal = env->FindClass(pszClassName);
if(jcLocal == NULL)
{
LOGE("FindClass %s error", pszClassName);
AvoidException(env);
return -1;
}
m_class = (jclass)env->NewGlobalRef(jcLocal);
LOGI ("RegisterCallback jcLocal = %p, m_class = %p", jcLocal, m_class);
env->DeleteLocalRef(jcLocal);
if(m_class == NULL)
{
LOGE("NewGlobalRef %s error", pszClassName);
AvoidException(env);
return -3;
}
// 获取方法的签名 javap -s -public MainActivity
// "requestRenderFromLocator", "()V"
// 获取方法
m_methodCallback = env->GetStaticMethodID(m_class, szMethodName, szMethodSign);
if (m_methodCallback == NULL)
{
LOGE("GetMethodID %s - %s error", szMethodName, szMethodSign);
AvoidException(env);
return -2;
}
LOGI("RegisterCallback ok");
m_bRegistered = true;
m_strClassName = pszClassName;
m_strMethodName = szMethodName;
m_strMethodSign = szMethodSign;
return 0;
}
// 获取JNIEnv
JNIEnv *JNIRegistStaticMethod::BeginCallback()
{
if (!m_bRegistered)
{
return NULL;
}
JavaVM *jvm = gJavaVM;
JNIEnv *env = NULL;
m_isAttached = false;
int status = jvm->GetEnv((void **) &env, JNI_VERSION_1_6);
if (status != JNI_OK)
{
// LOGI("CallRequestRenderFromLocator jvm->GetEnv = %p, iStatus = %d", env, status);
status = jvm->AttachCurrentThread(&env, NULL);
//LOGI("CallRequestRenderFromLocator AttachCurrentThread = %d, Env = %p", status, env);
if (status != JNI_OK)
{
LOGE("CallRequestRenderFromLocator: failed to AttachCurrentThread = %d", status);
return NULL;
}
m_isAttached = true;
}
return env;
}
void JNIRegistStaticMethod::EndCallback(JNIEnv * env)
{
//LOGI ("CallRequestRenderFromLocator end");
AvoidException(env);
if(m_isAttached)
{
gJavaVM->DetachCurrentThread();
}
}
void JNIRegistStaticMethod::CallRequestedMothod()
{
JR_MUTEX
JNIEnv * env = BeginCallback();
if(env != NULL)
{
env->CallStaticVoidMethod(m_class, m_methodCallback);
EndCallback(env);
}
//LOGI ("JNIRegistStaticMethod::CallRequestedMothod");
}
void JNIRegistStaticMethod::CallRequestedMothod(int p1, int p2)
{
JR_MUTEX
JNIEnv * env = BeginCallback();
if(env != NULL)
{
env->CallStaticVoidMethod(m_class, m_methodCallback, p1, p2);
EndCallback(env);
}
//LOGI ("JNIRegistStaticMethod::CallRequestedMothod p1(%d) p2(%d)", p1, p2);
}
void JNIRegistStaticMethod::CallRequestedMothod(int p1)
{
JR_MUTEX
JNIEnv * env = BeginCallback();
if(env != NULL)
{
env->CallStaticVoidMethod(m_class, m_methodCallback, p1);
EndCallback(env);
}
//LOGI ("JNIRegistStaticMethod::CallRequestedMothod p1(%d)", p1);
}
int JNIRegistStaticMethod::CallRequestedMothodRet()
{
JR_MUTEX
JNIEnv * env = BeginCallback();
int ret = 0;
if(env != NULL)
{
ret = env->CallStaticIntMethod(m_class, m_methodCallback);
EndCallback(env);
}
//LOGI ("JNIRegistStaticMethod::CallRequestedMothod ret(%d)", ret);
return ret;
}
kn_string JNIRegistStaticMethod::CallRequestedMothodObjectRet(short* points, int iArraySize)
{
JR_MUTEX
JNIEnv * env = BeginCallback();
kn_string strRet;
if(env != NULL)
{
jshortArray jShortArray= env->NewShortArray(iArraySize);
jshort* pJavaBuf = env->GetShortArrayElements(jShortArray, NULL);
memcpy(pJavaBuf, points, iArraySize * sizeof(short));
jobject ret = env->CallStaticObjectMethod(m_class, m_methodCallback, jShortArray, iArraySize);
env->ReleaseShortArrayElements(jShortArray, pJavaBuf, 0);
jsize iStringLen = env->GetStringLength((jstring)ret);
if(iStringLen > 0)
{
const jchar* pWChars = env->GetStringChars((jstring)ret, NULL);
kn_char* pszTemp = new kn_char [iStringLen + 1];
pszTemp[iStringLen] = 0;
for(int i = 0; i < iStringLen; i++)
{
pszTemp[i] = pWChars[i];
}
strRet = pszTemp;
delete [] pszTemp;
env->ReleaseStringChars((jstring)ret, pWChars);
}
EndCallback(env);
}
//LOGI ("JNIRegistStaticMethod::CallRequestedMothod ret(%d)", ret);
return strRet;
}
int JNIRegistStaticMethod::CallRequestedMothodIntRet(int p1, int p2, int p3, const char* szp4)
{
JR_MUTEX
JNIEnv * env = BeginCallback();
int iRet = 0;
if(env != NULL)
{
jstring jstr = env->NewStringUTF(szp4);
iRet = env->CallStaticIntMethod(m_class, m_methodCallback, p1, p2, p3, jstr);
env->DeleteLocalRef(jstr);
EndCallback(env);
}
return iRet;
}
| 24.944954 | 135 | 0.683523 | 15d23 |
1ee1c1a03180101329705d42a18c44e34535805b | 3,011 | cc | C++ | Source/BladeBase/source/utility/Delegate.cc | OscarGame/blade | 6987708cb011813eb38e5c262c7a83888635f002 | [
"MIT"
] | 146 | 2018-12-03T08:08:17.000Z | 2022-03-21T06:04:06.000Z | Source/BladeBase/source/utility/Delegate.cc | huangx916/blade | 3fa398f4d32215bbc7e292d61e38bb92aad1ee1c | [
"MIT"
] | 1 | 2019-01-18T03:35:49.000Z | 2019-01-18T03:36:08.000Z | Source/BladeBase/source/utility/Delegate.cc | huangx916/blade | 3fa398f4d32215bbc7e292d61e38bb92aad1ee1c | [
"MIT"
] | 31 | 2018-12-03T10:32:43.000Z | 2021-10-04T06:31:44.000Z | /********************************************************************
created: 2013/11/21
filename: Delegate.cc
author: Crazii
purpose:
*********************************************************************/
#include <BladePCH.h>
#include <utility/Delegate.h>
namespace Blade
{
//////////////////////////////////////////////////////////////////////////
const char Delegate::ZERO[Delegate::MAX_SIZE] = {0};
//////////////////////////////////////////////////////////////////////////
namespace Impl
{
class DelegateListImpl : public List<Delegate>, public Allocatable {};
}//namespace Impl
using namespace Impl;
//////////////////////////////////////////////////////////////////////////
DelegateList::DelegateList()
{
}
//////////////////////////////////////////////////////////////////////////
DelegateList::~DelegateList()
{
}
//////////////////////////////////////////////////////////////////////////
DelegateList::DelegateList(const DelegateList& src)
{
if(src.mList != NULL)
*mList = *src.mList;
}
//////////////////////////////////////////////////////////////////////////
DelegateList& DelegateList::operator=(const DelegateList& rhs)
{
if (rhs.mList != NULL)
*mList = *rhs.mList;
else
mList.destruct();
return *this;
}
//////////////////////////////////////////////////////////////////////////
void DelegateList::push_back(const Delegate& _delegate)
{
mList->push_back(_delegate);
}
//////////////////////////////////////////////////////////////////////////
bool DelegateList::erase(index_t index)
{
if(mList != NULL && index < mList->size() )
{
DelegateListImpl::iterator i = mList->begin();
while( index-- > 0)
++i;
mList->erase(i);
return true;
}
else
{
assert(false);
return false;
}
}
//////////////////////////////////////////////////////////////////////////
const Delegate& DelegateList::at(index_t index) const
{
if(mList != NULL && index < mList->size() )
{
DelegateListImpl::const_iterator i = mList->begin();
while( index-- > 0)
++i;
return *i;
}
else
BLADE_EXCEPT(EXC_OUT_OF_RANGE, BTString("index out of range"));
}
//////////////////////////////////////////////////////////////////////////
size_t DelegateList::size() const
{
return mList != NULL ? mList->size() : 0;
}
//////////////////////////////////////////////////////////////////////////
void DelegateList::call(void* data) const
{
if (mList == NULL)
return;
for (DelegateListImpl::const_iterator i = mList->begin(); i != mList->end(); ++i)
{
const Delegate& d = (*i);
if (d.hasParameter())
d.call(data);
else
d.call();
}
}
//////////////////////////////////////////////////////////////////////////
void DelegateList::call() const
{
if (mList == NULL)
return;
for (DelegateListImpl::const_iterator i = mList->begin(); i != mList->end(); ++i)
{
const Delegate& d = (*i);
if (!d.hasParameter())
d.call();
}
}
}//namespace Blade | 24.088 | 83 | 0.406177 | OscarGame |
1ee378688d73b111128c3a5e92105221a99bfaff | 8,324 | cpp | C++ | GameEngine/cMesh.cpp | GottaCodeHarder/GT-Engine | 44ae4d8c974605cc1cd5fd240af81f999b613e8a | [
"MIT"
] | 1 | 2017-09-15T23:56:00.000Z | 2017-09-15T23:56:00.000Z | GameEngine/cMesh.cpp | GottaCodeHarder/GT-Engine | 44ae4d8c974605cc1cd5fd240af81f999b613e8a | [
"MIT"
] | 5 | 2017-09-20T07:13:20.000Z | 2017-10-12T10:57:16.000Z | GameEngine/cMesh.cpp | GottaCodeHarder/GT-Engine | 44ae4d8c974605cc1cd5fd240af81f999b613e8a | [
"MIT"
] | null | null | null | #include "glew/include/glew.h"
#include "SDL/include/SDL_opengl.h"
#include <gl/GL.h>
#include <gl/GLU.h>
#include "cMesh.h"
#include "ResourceMesh.h"
#include "cTransform.h"
#include "Application.h"
#include "ModuleRenderer3D.h"
#include "GameObject.h"
cMesh::cMesh(GameObject* _gameObject) : Component(MESH, _gameObject)
{
type = MESH;
}
cMesh::~cMesh()
{
}
void cMesh::RealUpdate()
{
}
void cMesh::DrawUI()
{
if (ImGui::CollapsingHeader("Mesh"))
{
if (ImGui::TreeNodeEx("Geometry", ImGuiTreeNodeFlags_DefaultOpen))
{
ImGui::Text("Vertex Count: %i", resource->numVertex);
ImGui::Text("Triangle Count: %i", resource->numIndex / 3);
ImGui::TreePop();
}
ImGui::Spacing();
if (ImGui::Checkbox("AABB box", &aabbActive)){}
if (aabbActive)
{
DrawAABB(gameObject->aabbBox);
}
if (ImGui::TreeNodeEx("AABB information", ImGuiTreeNodeFlags_DefaultOpen))
{
ImGui::Text("Center Point: %f, %f, %f", gameObject->aabbBox.CenterPoint().x, gameObject->aabbBox.CenterPoint().y, gameObject->aabbBox.CenterPoint().z);
//ImGui::Text("Scale: %f, %f, %f", scaleLocal.x, scaleLocal.y, scaleLocal.z);
//ImGui::Text("Rotation: %f, %f, %f, %f ", rotationLocal.x, rotationLocal.y, rotationLocal.z, rotationLocal.w);
ImGui::TreePop();
}
ImGui::Spacing();
//glColor3f(color.r, color.g, color.b);
}
}
void cMesh::DrawAABB(AABB aabbBox)
{
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.minPoint.x, aabbBox.minPoint.y, aabbBox.minPoint.z), btVector3(aabbBox.minPoint.x, aabbBox.maxPoint.y, aabbBox.minPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.minPoint.x, aabbBox.minPoint.y, aabbBox.minPoint.z), btVector3(aabbBox.maxPoint.x, aabbBox.minPoint.y, aabbBox.minPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.minPoint.x, aabbBox.minPoint.y, aabbBox.minPoint.z), btVector3(aabbBox.minPoint.x, aabbBox.minPoint.y, aabbBox.maxPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.maxPoint.x, aabbBox.minPoint.y, aabbBox.maxPoint.z), btVector3(aabbBox.minPoint.x, aabbBox.minPoint.y, aabbBox.maxPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.maxPoint.x, aabbBox.minPoint.y, aabbBox.maxPoint.z), btVector3(aabbBox.maxPoint.x, aabbBox.minPoint.y, aabbBox.minPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.maxPoint.x, aabbBox.maxPoint.y, aabbBox.maxPoint.z), btVector3(aabbBox.maxPoint.x, aabbBox.minPoint.y, aabbBox.maxPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.maxPoint.x, aabbBox.maxPoint.y, aabbBox.maxPoint.z), btVector3(aabbBox.maxPoint.x, aabbBox.maxPoint.y, aabbBox.minPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.maxPoint.x, aabbBox.maxPoint.y, aabbBox.maxPoint.z), btVector3(aabbBox.minPoint.x, aabbBox.maxPoint.y, aabbBox.maxPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.minPoint.x, aabbBox.maxPoint.y, aabbBox.maxPoint.z), btVector3(aabbBox.minPoint.x, aabbBox.minPoint.y, aabbBox.maxPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.minPoint.x, aabbBox.maxPoint.y, aabbBox.maxPoint.z), btVector3(aabbBox.minPoint.x, aabbBox.maxPoint.y, aabbBox.minPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.maxPoint.x, aabbBox.maxPoint.y, aabbBox.minPoint.z), btVector3(aabbBox.minPoint.x, aabbBox.maxPoint.y, aabbBox.minPoint.z), btVector3(0, 0.7f, 0));
App->renderer3D->debugDraw->drawLine(btVector3(aabbBox.maxPoint.x, aabbBox.maxPoint.y, aabbBox.minPoint.z), btVector3(aabbBox.maxPoint.x, aabbBox.minPoint.y, aabbBox.minPoint.z), btVector3(0, 0.7f, 0));
}
uint cMesh::Serialize(char * &buffer)
{
uint length = 0;
length += sizeof(int);
length += sizeof(uint);
length += resource->numVertex * sizeof(float3);
length += sizeof(uint);
length += resource->numIndex * sizeof(uint);
length += sizeof(uint);
length += resource->numVertex * sizeof(float3);
length += resource->numVertex * sizeof(float2);
buffer = new char[length];
char* it = buffer;
int iType = (int)componentType::MESH;
memcpy(it, &iType, sizeof(int));
it += sizeof(int);
// Normals
uint size = resource->numVertex;
memcpy(it, &size, sizeof(uint));
it += sizeof(uint);
memcpy(it, resource->normals.data(), sizeof(float3) * resource->numVertex);
it += resource->numVertex * sizeof(float3);
// Index
size = resource->numIndex;
memcpy(it, &size, sizeof(uint));
it += sizeof(uint);
memcpy(it, resource->index.data(), sizeof(uint) * resource->numIndex);
it += resource->numIndex * sizeof(uint);
// Vertex
size = resource->numVertex;
memcpy(it, &size, sizeof(uint));
it += sizeof(uint);
memcpy(it, resource->vertex.data(), sizeof(float3) * resource->numVertex);
it += resource->numVertex * sizeof(float3);
float2* uv = new float2[resource->numVertex];
glGetBufferSubData(resource->buffUv, NULL, resource->vertex.size() * sizeof(float2), uv);
memcpy(it, uv, resource->numVertex * sizeof(float2));
it += resource->numVertex * sizeof(float2);
delete[] uv;
return length;
}
uint cMesh::DeSerialize(char * &buffer, GameObject * parent)
{
char* it = buffer;
uint ret = 0;
resource = new ResourceMesh();
// Normals Size
uint size;
memcpy(&size, it, sizeof(uint));
resource->numVertex = size;
it += sizeof(uint);
ret += sizeof(uint);
// Normals
if (resource->numVertex > 0)
{
resource->normals.reserve(resource->numVertex);
memcpy(resource->normals.data(), it, resource->numVertex * sizeof(float3));
}
it += resource->numVertex * sizeof(float3);
ret += resource->numVertex * sizeof(float3);
// Index Size
memcpy(&size, it, sizeof(uint));
resource->numIndex = size;
it += sizeof(uint);
ret += sizeof(uint);
// Index
if (resource->numIndex > 0)
{
resource->index.reserve(resource->numIndex);
memcpy(resource->index.data(), it, resource->numIndex * sizeof(uint));
}
it += resource->numIndex * sizeof(uint);
ret += resource->numIndex * sizeof(uint);
// Vertex Size
memcpy(&size, it, sizeof(uint));
resource->numVertex = size;
it += sizeof(uint);
ret += sizeof(uint);
// Vertex
if (resource->numVertex > 0)
{
resource->vertex.reserve(resource->numVertex);
memcpy(resource->vertex.data(), it, resource->numVertex * sizeof(float3));
}
it += resource->numVertex * sizeof(float3);
ret += resource->numVertex * sizeof(float3);
// UVs
float2* uv = new float2[resource->numVertex];
//memcpy(&uv, it, resource->numVertex * sizeof(float2));
it += resource->numVertex * sizeof(float2);
ret += resource->numVertex * sizeof(float2);
///////////////////////
// Vertex
if (resource->vertex.empty() != false)
{
glGenBuffers(1, (GLuint*) &(resource->buffVertex));
glBindBuffer(GL_ARRAY_BUFFER, resource->buffVertex);
glBufferData(GL_ARRAY_BUFFER, sizeof(float3) * resource->numVertex, resource->vertex.data(), GL_STATIC_DRAW);
MYLOG("DeSerialize - Loading %i vertex succesful!", resource->numVertex);
}
else
{
MYLOG("WARNING, the .GTE scene has 0 vertex!");
}
if (resource->vertex.size() == 0)
{
for (int j = 0; j < resource->numVertex; j++)
{
//SAVE VERTEX
//resource->vertex.push_back(float3(scene->mMeshes[i]->mVertices[j].x, scene->mMeshes[i]->mVertices[j].y, scene->mMeshes[i]->mVertices[j].z));
}
}
// Normals
if (resource->normals.empty() != false)
{
glGenBuffers(1, (GLuint*) &(resource->buffNormals));
glBindBuffer(GL_ARRAY_BUFFER, resource->buffNormals);
glBufferData(GL_ARRAY_BUFFER, sizeof(float3) * resource->numVertex, resource->normals.data(), GL_STATIC_DRAW);
}
// UVs
if (uv->Size > NULL)
{
glGenBuffers(1, (GLuint*) &(resource->buffUv));
glBindBuffer(GL_ARRAY_BUFFER, resource->buffUv);
glBufferData(GL_ARRAY_BUFFER, sizeof(float) * resource->numVertex * 2, uv, GL_STATIC_DRAW);
}
// Index
if (resource->numIndex > 0)
{
glGenBuffers(1, (GLuint*) &(resource->buffIndex));
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, resource->buffIndex);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, resource->numIndex * 3, &resource->index, GL_STATIC_DRAW);
MYLOG("DeSerialize - Loading %i index succesful!", resource->numIndex * 3);
}
return ret;
}
| 34.396694 | 203 | 0.704469 | GottaCodeHarder |
1ee59a5ae98048b0f7ffa8b13de4f4aab1e432bc | 4,703 | cpp | C++ | problem/Sumo.cpp | esegredo/Optimisation-Real-world-Traffic-Light-Cycle-Programs-Evolutionary-Computation | cfe6e3e8f333f906430d668f4f2b475dfdd71d9e | [
"MIT"
] | null | null | null | problem/Sumo.cpp | esegredo/Optimisation-Real-world-Traffic-Light-Cycle-Programs-Evolutionary-Computation | cfe6e3e8f333f906430d668f4f2b475dfdd71d9e | [
"MIT"
] | null | null | null | problem/Sumo.cpp | esegredo/Optimisation-Real-world-Traffic-Light-Cycle-Programs-Evolutionary-Computation | cfe6e3e8f333f906430d668f4f2b475dfdd71d9e | [
"MIT"
] | null | null | null | /***********************************************************************************
* AUTHOR
* - Eduardo Segredo
*
* LAST MODIFIED
* October 2018
************************************************************************************/
#include "Sumo.h"
bool Sumo::init (const vector<string> ¶ms) {
if (params.size() != 6) {
cerr << "Error in init - Parameters: instanceFile execDir tlFileName resultsFileName mut_op cross_op" << endl;
exit(-1);
}
instance.read(params[0]);
command = "mkdir -p " + instance.getPath() + params[1] + "/";
execCommandPipe(command);
tlFile = instance.getPath() + params[1] + "/" + params[2];
resultsFile = instance.getPath() + params[1] + "/" + params[3];
command = "~/sumo-wrapper/sumo-wrapper " + params[0] + " " + params[1] + " " + tlFile + " " + resultsFile + " 0";
mut_op = params[4];
cross_op = params[5];
setNumberOfVar(instance.getNumberOfTLlogics() + instance.getTotalNumberOfPhases());
setNumberOfObj(NOBJ);
return true;
}
// Evaluation
void Sumo::evaluate (void) {
doubleToIntSolution();
writeSolutionFile();
//cout << "command: " << command << endl;
string result = execCommandPipe(command);
//cout << "result: " << result << endl;
double fitness = readFitnessFile();
//cout << "fitness: " << fitness << endl;
setObj(0, fitness);
}
// Cloning procedure
Individual* Sumo::clone (void) const {
Sumo* aux = new Sumo();
aux->instance = instance;
aux->command = command;
aux->tlFile = tlFile;
aux->resultsFile = resultsFile;
aux->mut_op = mut_op;
aux->cross_op = cross_op;
return aux;
}
void Sumo::print(ostream &os) const {
for (unsigned int i = 0; i < getNumberOfVar(); i++)
os << getVar(i) << " " << flush;
for (unsigned int i = 0; i < getNumberOfObj(); i++)
os << getObj(i) << " " << flush;
os << endl << flush;
}
void Sumo::dependentMutation(double pm) {
if (mut_op == "Mutate_Uniform") {
mutate_uniform(pm, 0, getNumberOfVar());
}
else if (mut_op == "Mutate_Pol") {
mutate_Pol(pm, 0, getNumberOfVar());
}
repair();
}
void Sumo::dependentCrossover(Individual* ind) {
if (cross_op == "Crossover_Uniform") {
crossover_uniform(ind, 0, getNumberOfVar());
}
else if (cross_op == "Crossover_SBX") {
crossover_SBX(ind, 0, getNumberOfVar());
}
((Sumo*)ind)->repair();
repair();
}
void Sumo::restart(void) {
int abs_pos = 0;
for(int j = 0; j < instance.getNumberOfTLlogics(); j++) {
setVar(abs_pos, rand() % 120);
abs_pos++;
for(int k = 0; k < instance.getPhases(j).size(); k++) {
setVar(abs_pos, ((double) rand () / (double) RAND_MAX));
setVar(abs_pos, getVar(abs_pos) * (getMaximum(abs_pos) - getMinimum(abs_pos)) + getMinimum(abs_pos));
abs_pos++;
}
}
repair();
}
void Sumo::repair(void) {
int abs_pos = 0;
for(int j = 0; j < instance.getNumberOfTLlogics(); j++) {
if (getVar(abs_pos) >= 120.0) {
setVar(abs_pos, rand() % 120);
}
abs_pos++;
vector<string> phases = instance.getPhases(j);
for(int k = 0; k < phases.size(); k++) {
int pos;
// Those cases where all the TLs belonging to a phase change from "G"reen to "y"ellow
if (areAllYellow(phases[k]))
setVar(abs_pos, (double) 4.0 * phases[k].size());
// Remaining cases where there exist TLs that change from "G"reen to "y"ellow
else if (isSubString(phases[k], "y", pos))
setVar(abs_pos, (double) 4.0);
abs_pos++;
}
}
}
void Sumo::doubleToIntSolution(void) {
for (int i = 0; i < getNumberOfVar(); i++)
// if (((double) rand () / (double) RAND_MAX) >= 0.5)
// setVar(i, ceil(getVar(i)));
// else
// setVar(i, floor(getVar(i)));
setVar(i, round(getVar(i)));
}
bool Sumo::areAllYellow(string phase) {
for (int i = 0; i < phase.size(); i++)
if (phase[i] != 'y')
return false;
return true;
}
void Sumo::writeSolutionFile() {
ofstream f(tlFile);
for(int i = 0; i < getNumberOfVar(); i++)
f << (unsigned int)getVar(i) << " ";
f.close();
}
double Sumo::readFitnessFile() {
double fitness;
ifstream f(resultsFile);
string s;
for(int i = 0; i < 6; i++) // skip lines
getline(f, s);
f >> fitness;
f.close();
return fitness;
}
string Sumo::execCommandPipe(string command) {
const int MAX_BUFFER_SIZE = 128;
FILE* pipe = popen(command.c_str(), "r");
// Waits until the execution ends
if (wait(NULL) == -1){
cerr << "Error waiting for simulator results" << endl;
return "-1";
}
char buffer[MAX_BUFFER_SIZE];
string result = "";
while (!feof(pipe)) {
if (fgets(buffer, MAX_BUFFER_SIZE, pipe) != NULL)
result += buffer;
}
pclose(pipe);
return result;
}
| 26.273743 | 115 | 0.584946 | esegredo |
1ee6ca3ec182f0d67d3a2ffa921535469bee15ba | 366 | cpp | C++ | src/main.cpp | mwerlberger/cpp11_tutorial | e02e7a1fb61b029681060db97ff16e1b8be53ad1 | [
"BSD-3-Clause"
] | null | null | null | src/main.cpp | mwerlberger/cpp11_tutorial | e02e7a1fb61b029681060db97ff16e1b8be53ad1 | [
"BSD-3-Clause"
] | null | null | null | src/main.cpp | mwerlberger/cpp11_tutorial | e02e7a1fb61b029681060db97ff16e1b8be53ad1 | [
"BSD-3-Clause"
] | null | null | null | // system includes
#include <assert.h>
#include <cstdint>
#include <iostream>
int main(int /*argc*/, char** /*argv*/)
{
try
{
std::cout << "Hello World" << std::endl;
}
catch (std::exception& e)
{
std::cout << "[exception] " << e.what() << std::endl;
assert(false);
}
// std::cout << imp::ok_msg << std::endl;
return EXIT_SUCCESS;
}
| 17.428571 | 57 | 0.557377 | mwerlberger |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.