blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 905
values | visit_date timestamp[us]date 2015-08-09 11:21:18 2023-09-06 10:45:07 | revision_date timestamp[us]date 1997-09-14 05:04:47 2023-09-17 19:19:19 | committer_date timestamp[us]date 1997-09-14 05:04:47 2023-09-06 06:22:19 | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-07 00:51:45 2023-09-14 21:58:39 ⌀ | gha_created_at timestamp[us]date 2008-03-27 23:40:48 2023-08-21 23:17:38 ⌀ | gha_language stringclasses 141
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 115
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7bb1d12493dca904c4fbd1bd6f02e601dcafbc09 | 3e6b2ae737c3476498cfe8116dfe7085292463c9 | /tests/test_entity.h | df4339a8e9841d69b2f0f0656c3c8b03c8fe56e7 | [] | no_license | peter-kish/libcs | 41665a84fe542372d35788ef0419f1382417534f | 795241ba0494c54317b64771148da490c4749f09 | refs/heads/master | 2021-05-04T05:16:50.406151 | 2016-11-12T14:36:35 | 2016-11-12T14:36:35 | 70,973,264 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 578 | h | #ifndef TEST_ENTITY_H
#define TEST_ENTITY_H
#include "cs.h"
#include <cppunit/extensions/HelperMacros.h>
class EntityTests : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(EntityTests);
CPPUNIT_TEST(testGetComponent);
CPPUNIT_TEST(testHasComponent);
CPPUNIT_TEST(testAddComponent);
CPPUNIT_TEST(testRemoveComponent);
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
void tearDown();
void testGetComponent();
void testHasComponent();
void testAddComponent();
void testRemoveComponent();
private:
};
#endif // TEST_IDFACTORY_H
| [
"pkish023@gmail.com"
] | pkish023@gmail.com |
a11b5887d1bae61df37843d55749d86715ff42cb | e67f8a44d1715f60d726a9f1ff32ee42f7893365 | /C++/bits/linear/basic_string.hpp | 5798c3f8ba4f21264d7f15932308c3b63dcc3aa6 | [
"MIT"
] | permissive | unnamed42/code_learning | 58248ccf7b9d3e2353c2b59e465bc511b630a757 | 1e64c29869903ca7f3cf7c682461766d702866c8 | refs/heads/master | 2020-04-06T14:35:56.598546 | 2018-09-30T10:29:22 | 2018-09-30T10:29:22 | 53,417,969 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,865 | hpp | #ifndef __RUBBISH_BASIC_STRING__
#define __RUBBISH_BASIC_STRING__
#include <cstring> // string manipulation
#include <vector> // result of basic_string<Char>::split
#include "../iterator.hpp"
namespace rubbish {
template <class Char> class basic_string {
public:
typedef basic_string<Char> self_type;
class iterator:public rubbish::iterator<std::random_access_iterator_tag,Char>{
private:
typedef rubbish::iterator<std::random_access_iterator_tag,Char> base_class;
public:
typedef typename base_class::reference reference;
typedef typename base_class::pointer pointer;
typedef typename base_class::difference_type difference_type;
typedef iterator self_type;
typedef Char* data_type;
explicit iterator(const data_type &cursor):m_cursor(cursor) {}
iterator(const self_type &o):m_cursor(o.m_cursor) {}
~iterator() {}
reference operator*() const {return *m_cursor;}
pointer operator->() const {return &operator*();}
reference operator[](difference_type n) const {return m_cursor[n];}
data_type get() const {return m_cursor;}
self_type& operator++() {++m_cursor;return *this;}
self_type operator++(int) {auto i=*this;operator++();return i;}
self_type& operator--() {--m_cursor;return *this;}
self_type operator--(int) {auto i=*this;operator--();return i;}
self_type& operator+=(const difference_type &diff) {m_cursor+=diff;return *this;}
self_type operator+(const difference_type &diff) const {return self_type(m_cursor+diff);}
self_type& operator-=(const difference_type &diff) {m_cursor-=diff;return *this;}
self_type operator-(const difference_type &diff) const {return self_type(m_cursor-diff);}
bool operator<(const self_type &o) const {return m_cursor<o.m_cursor;}
bool operator>(const self_type &o) const {return m_cursor>o.m_cursor;}
bool operator<=(const self_type &o) const {return !operator>(o);}
bool operator>=(const self_type &o) const {return !operator<(o);}
bool operator==(const self_type &o) const {return m_cursor==o.m_cursor;}
bool operator!=(const self_type &o) const {return !operator==(o);}
self_type& operator=(const self_type &other) {m_cursor=other.m_cursor;return *this;}
private:
data_type m_cursor;
};
typedef rubbish::const_iterator<iterator> const_iterator;
typedef rubbish::reverse_iterator<iterator> reverse_iterator;
typedef rubbish::const_iterator<reverse_iterator> const_reverse_iterator;
public:
constexpr basic_string();
basic_string(const Char*);
basic_string(const self_type&);
basic_string(self_type&&);
basic_string(std::size_t count,const Char &val);
~basic_string();
std::size_t size() const;
bool empty() const;
const Char* base() const;
iterator find(const self_type&,std::size_t pos=0ULL) const;
iterator find(const Char&,std::size_t pos=0ULL) const;
void replace(const self_type &from,const self_type &to);
void replace(const Char &from,const Char &to);
std::vector<basic_string<Char>> split(const self_type &delim);
self_type& operator=(const self_type&);
self_type& operator=(const Char*);
self_type& operator+=(const self_type&);
self_type& operator+=(const Char*);
self_type operator+(const self_type&);
self_type operator+(const Char*);
iterator begin();
iterator end();
const_iterator cbegin() const;
const_iterator cend() const;
reverse_iterator rbegin();
reverse_iterator rend();
const_reverse_iterator crbegin() const;
const_reverse_iterator crend() const;
private:
Char *m_str;
};
} // namespace rubbish
#include "basic_string.cc"
#endif // __RUBBISH_BASIC_STRING__
| [
"a390517426@gmail.com"
] | a390517426@gmail.com |
5b12213d378477cb30119e33ee84ca0e2800e5dc | 36ac07d3ca4add8f55d0039b47d3a36f9c95821e | /include/CelulaComando.hpp | e807270627c9503fd6740ebaab4c44ae9dc1d410 | [] | no_license | Augustonildo/Extracao-Z | 16af1c673d8a9e2763f30393eb2fc9afba7d18b3 | e850bbeb1d6baae38b373674cd42386ac3f89335 | refs/heads/master | 2023-03-02T06:03:09.386976 | 2021-02-11T23:27:35 | 2021-02-11T23:27:35 | 336,664,213 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 198 | hpp | #include "Comando.hpp"
class CelulaComando
{
public:
CelulaComando();
private:
Comando item;
CelulaComando *prox;
friend class FilaEncadeadaComandos;
}; | [
"augustocarvalhopp@gmail.com"
] | augustocarvalhopp@gmail.com |
7c2c4a787fd05c9830526eabf84d251b3a655f12 | 19be08b4e79ec613fd45ee5262c7065cc07ec78a | /include/Machine.hpp | f48ef2e4f5dccaa1eacfd727a5259b74d561cc4c | [] | no_license | alexander-zibert/msp432-polar-plotter | 797faca04961c6e6c8cfeaed2b9bd053abe9a434 | ace3db7e0f428e11a147a530b1df0b875df2a9a1 | refs/heads/master | 2022-11-19T11:30:22.336238 | 2020-07-23T06:32:11 | 2020-07-23T06:32:11 | 275,115,379 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,531 | hpp | #ifndef MATSE_MCT_MACHINE_HPP
#define MATSE_MCT_MACHINE_HPP
#include <type_traits>
#include <variant>
#include "Debouncer.hpp"
#include "DrawInterface.hpp"
#include "Events.hpp"
#include "Menu.hpp"
#include "Model.hpp"
namespace MATSE::MCT {
template <typename StateVariant> struct CompositeState {
StateVariant currentState;
uGUIDrawer _drawer{};
CompositeState(StateVariant &&s) : currentState{s} {}
template <typename Event> void on(Event e) noexcept {
std::visit(
[&](auto &state) {
_drawer.printDebug("State ");
_drawer.printDebug(state.name);
_drawer.printDebug(" is handling the event.\n");
state.on(e);
},
currentState);
}
template <typename S,
typename std::enable_if<std::is_constructible<StateVariant, S>{},
int>::type = 0>
void transition(S s) noexcept {
if (!std::holds_alternative<S>(currentState)) {
this->exitSubState();
currentState = s;
_drawer.printDebug(s.name);
_drawer.printDebug("\n");
this->enterSubState();
}
}
template <typename S,
typename std::enable_if<!std::is_constructible<StateVariant, S>{},
int>::type = 0>
void transition(S s) noexcept {
subStateTransition(s);
}
void entry() noexcept {
enterCompositeState();
enterSubState();
}
void exit() noexcept {
exitSubState();
exitCompositeState();
}
void enterSubState() noexcept {
std::visit([&](auto &state) { state.entry(); }, currentState);
}
void exitSubState() noexcept {
std::visit([&](auto &state) { state.exit(); }, currentState);
}
template <typename S> void subStateTransition(S s) noexcept {
std::visit([&](auto &state) { state.transition(s); }, currentState);
}
virtual void enterCompositeState() noexcept {}
virtual void exitCompositeState() noexcept {}
};
struct LeafState {
template <typename S> void transition(S &&) noexcept {}
};
struct Machine;
struct DrawMenu : public LeafState {
Machine *base;
DrawMenu(Machine *base) : base{base} {}
template <typename Event> void on(Event) {}
void entry() noexcept;
void exit() noexcept;
void on(a_button_up) noexcept;
void on(b_button_up) noexcept;
void on(joystick_up) noexcept;
void on(joystick_down) noexcept;
enum class menu_state { BACK, CLEAR, SAVE, PLOT, EXIT, NUM_ITEMS };
Menu<menu_state, menu_state::BACK> menu{
{"Back", "Clear", "Save", "Plot", "Exit"}};
static constexpr const char *name = "DrawMenu";
};
struct DrawDefault : public LeafState {
Machine *base;
DrawDefault(Machine *base) : base{base} {}
template <typename Event> void on(Event) {}
void on(a_button_up) noexcept;
void on(b_button_up) noexcept;
void on(JoystickSample) noexcept;
void entry() noexcept;
void exit() noexcept;
static constexpr const char *name = "DrawDefault";
};
using DrawState = std::variant<DrawDefault, DrawMenu>;
struct Draw : public CompositeState<DrawState> {
using super_t = CompositeState<DrawState>;
Machine *base;
Draw(Machine *base);
void enterCompositeState() noexcept override;
void exitCompositeState() noexcept override;
static constexpr const char *name = "Draw";
};
struct Start : public LeafState {
Machine *base;
Start(Machine *base) : base{base} {}
void entry() noexcept;
void exit() noexcept;
void on(a_button_up) noexcept;
void on(joystick_up) noexcept;
void on(joystick_down) noexcept;
template <typename Event> void on(Event) noexcept {}
enum class menu_state { GALLERY, DRAW, NUM_ITEMS };
Menu<menu_state, menu_state::GALLERY> menu{{"Gallery", "Draw"}};
static constexpr const char *name = "Start";
};
struct PlotPlotting : public LeafState {
Machine *base;
Point lastModelPoint;
PlotPlotting(Machine *base) : base{base} {}
template <typename Event> void on(Event) {}
void on(a_button_up) noexcept;
void on(timestep) noexcept;
void entry() noexcept;
void exit() noexcept;
static constexpr const char *name = "PlotPlotting";
};
struct PlotPaused : public LeafState {
Machine *base;
PlotPaused(Machine *base) : base{base} {}
template <typename Event> void on(Event) {}
void on(a_button_up) noexcept;
void on(b_button_up) noexcept;
void entry() noexcept;
void exit() noexcept;
static constexpr const char *name = "PlotPaused";
};
using PlotState = std::variant<PlotPaused, PlotPlotting>;
struct Plot : public CompositeState<PlotState> {
using super_t = CompositeState<PlotState>;
Machine *base;
Plot(Machine *base);
void enterCompositeState() noexcept override;
void exitCompositeState() noexcept override;
static constexpr const char *name = "Plot";
};
struct GalleryMenu : public LeafState {
Machine *base;
GalleryMenu(Machine *base) : base{base} {}
template <typename Event> void on(Event) {}
void entry() noexcept;
void exit() noexcept;
void on(a_button_up) noexcept;
void on(b_button_up) noexcept;
void on(joystick_up) noexcept;
void on(joystick_down) noexcept;
enum class menu_state { BACK, DELETE, PLOT, EDIT, EXIT, NUM_ITEMS };
Menu<menu_state, menu_state::BACK> menu{
{"Back", "Delete", "Plot", "Edit", "Exit"}};
static constexpr const char *name = "GalleryMenu";
};
struct GalleryDefault : public LeafState {
Machine *base;
GalleryDefault(Machine *base) : base{base} {}
template <typename Event> void on(Event) {}
void on(a_button_up) noexcept;
void on(b_button_up) noexcept;
void on(joystick_left) noexcept;
void on(joystick_right) noexcept;
void on(joystick_up) noexcept;
void on(joystick_down) noexcept;
void entry() noexcept;
void exit() noexcept;
static constexpr const char *name = "GalleryDefault";
private:
void drawBorders() noexcept;
};
using GalleryState = std::variant<GalleryDefault, GalleryMenu>;
struct Gallery : public CompositeState<GalleryState> {
using super_t = CompositeState<GalleryState>;
Machine *base;
Gallery(Machine *base);
void enterCompositeState() noexcept override;
void exitCompositeState() noexcept override;
static constexpr const char *name = "Gallery";
};
using State = std::variant<Start, Draw, Plot, Gallery>;
struct Machine : public CompositeState<State> {
using super_t = CompositeState<State>;
Machine(Model *model);
void start() noexcept;
Model *model;
uGUIDrawer drawer{};
static constexpr const char *name = "Machine";
};
} // namespace MATSE::MCT
#endif | [
"alexander.zibert@googlemail.com"
] | alexander.zibert@googlemail.com |
7f0f276d4a6c8aebd80b1c24f5e50ad555920b2e | 97478e6083db1b7ec79680cfcfd78ed6f5895c7d | /services/shape_detection/face_detection_impl_win.cc | 6b5b4df2e98d1489b1f683d4acd1365382d16d5b | [
"BSD-3-Clause"
] | permissive | zeph1912/milkomeda_chromium | 94e81510e1490d504b631a29af2f1fef76110733 | 7b29a87147c40376bcdd1742f687534bcd0e4c78 | refs/heads/master | 2023-03-15T11:05:27.924423 | 2018-12-19T07:58:08 | 2018-12-19T07:58:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,062 | cc | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/shape_detection/face_detection_impl_win.h"
#include <windows.media.faceanalysis.h>
namespace shape_detection {
base::OnceCallback<void(bool)> g_callback_for_testing;
FaceDetectionImplWin::FaceDetectionImplWin(
Microsoft::WRL::ComPtr<IFaceDetectorStatics> factory,
Microsoft::WRL::ComPtr<IFaceDetector> face_detector)
: face_detector_factory_(std::move(factory)),
face_detector_(std::move(face_detector)) {}
FaceDetectionImplWin::~FaceDetectionImplWin() = default;
void FaceDetectionImplWin::Detect(const SkBitmap& bitmap,
DetectCallback callback) {
DCHECK_EQ(kN32_SkColorType, bitmap.colorType());
if (g_callback_for_testing) {
std::move(g_callback_for_testing).Run(face_detector_ ? true : false);
std::move(callback).Run(std::vector<mojom::FaceDetectionResultPtr>());
}
}
} // namespace shape_detection | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
36280f8e1792f9f2a824821d852879452ec81ac9 | aa9887968b39c45f0cda27cf22152fc5e5b7d46d | /src/vendor/cget/cget/pkg/pqrs-org__cpp-dispatcher/install/include/pqrs/dispatcher.hpp | 6e997605585bbf00fb1ede69c6a75f2beac4d08f | [
"Unlicense"
] | permissive | paganholiday/key-remap | 9edef7910dc8a791090d559997d42e94fca8b904 | a9154a6b073a3396631f43ed11f6dc603c28ea7b | refs/heads/master | 2021-07-06T05:11:50.653378 | 2020-01-11T14:21:58 | 2020-01-11T14:21:58 | 233,709,937 | 0 | 1 | Unlicense | 2021-04-13T18:21:39 | 2020-01-13T22:50:13 | C++ | UTF-8 | C++ | false | false | 440 | hpp | #pragma once
// pqrs::dispatcher v2.5
// (C) Copyright Takayama Fumihiko 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
#include "dispatcher/dispatcher.hpp"
#include "dispatcher/object_id.hpp"
#include "dispatcher/time_source.hpp"
#include "dispatcher/extra/dispatcher_client.hpp"
#include "dispatcher/extra/shared_dispatcher.hpp"
#include "dispatcher/extra/timer.hpp"
| [
"tekezo@pqrs.org"
] | tekezo@pqrs.org |
eba670f31425c130254ac7859b19b5f90ca893ea | f7738ac20de6f5a84484caa755e01d4439648343 | /example/unity/ARDemoApp/Temp/il2cppOutput/il2cppOutput/UnityEngine.AnimationModule.cpp | 247f95e004aa437152e0c9b52cbf60bc6abe7fa7 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | mjserrato/flutter-unity-view-widget | 95c39555283e24cf5ea031f9d29f4dafc25952b0 | 2765fb121bc6d430ebfee2b641768da3bbb7b04d | refs/heads/master | 2020-08-23T05:15:36.476350 | 2019-10-18T14:16:36 | 2019-10-18T14:16:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 287,345 | cpp | #include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include <stdint.h>
#include "codegen/il2cpp-codegen.h"
#include "il2cpp-object-internals.h"
template <typename R, typename T1>
struct VirtFuncInvoker1
{
typedef R (*Func)(void*, T1, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R>
struct VirtFuncInvoker0
{
typedef R (*Func)(void*, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, invokeData.method);
}
};
struct VirtActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
((Action)invokeData.methodPtr)(obj, invokeData.method);
}
};
struct GenericVirtActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
((Action)invokeData.methodPtr)(obj, invokeData.method);
}
};
struct InterfaceActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
((Action)invokeData.methodPtr)(obj, invokeData.method);
}
};
struct GenericInterfaceActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
((Action)invokeData.methodPtr)(obj, invokeData.method);
}
};
// System.AsyncCallback
struct AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4;
// System.Char[]
struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2;
// System.Collections.IDictionary
struct IDictionary_t1BD5C1546718A374EA8122FBD6C6EE45331E8CE7;
// System.Delegate
struct Delegate_t;
// System.DelegateData
struct DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE;
// System.Delegate[]
struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86;
// System.Diagnostics.StackTrace[]
struct StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196;
// System.IAsyncResult
struct IAsyncResult_t8E194308510B375B42432981AE5E7488C458D598;
// System.IntPtr[]
struct IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD;
// System.InvalidCastException
struct InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA;
// System.InvalidOperationException
struct InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1;
// System.Reflection.MethodInfo
struct MethodInfo_t;
// System.Runtime.Serialization.SafeSerializationManager
struct SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770;
// System.String
struct String_t;
// System.Void
struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017;
// UnityEngine.AnimationEvent
struct AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F;
// UnityEngine.AnimationState
struct AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386;
// UnityEngine.Animator
struct Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A;
// UnityEngine.AnimatorControllerParameter
struct AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68;
// UnityEngine.AnimatorControllerParameter[]
struct AnimatorControllerParameterU5BU5D_t7B886A2A1648ECF218447ED1DE8D241652F863FD;
// UnityEngine.AnimatorOverrideController
struct AnimatorOverrideController_t130F04B57E753FD4288EF3235699ABE7C88FF312;
// UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback
struct OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E;
// UnityEngine.Object
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0;
// UnityEngine.ScriptableObject
struct ScriptableObject_tAB015486CEAB714DA0D5C1BA389B84FB90427734;
// UnityEngine.StateMachineBehaviour
struct StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C;
IL2CPP_EXTERN_C RuntimeClass* AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C String_t* _stringLiteral04E4E32AA834F9BA9336C5388E9470F196EB0891;
IL2CPP_EXTERN_C String_t* _stringLiteral35482DF98E7DEED2FC6BDE9BDD1E273E27CF1F2C;
IL2CPP_EXTERN_C String_t* _stringLiteral4518459D262696CF9B5DAB1E0A1BC3AC2F9BD9DF;
IL2CPP_EXTERN_C String_t* _stringLiteral59BDBA16999CF4EF3F7712740907B2C5E860459C;
IL2CPP_EXTERN_C String_t* _stringLiteral6502516F734DD885173E353D47AAEB82BC7070A9;
IL2CPP_EXTERN_C String_t* _stringLiteral7E3996230D9AF0349B43FF7B536FC25AF0C19C71;
IL2CPP_EXTERN_C String_t* _stringLiteralB47C26932C83DD7E0C54FC87EDDE2F3B50E5104C;
IL2CPP_EXTERN_C String_t* _stringLiteralB9DF0CBB713EC6E9DFD70C9BFB0B820148433428;
IL2CPP_EXTERN_C String_t* _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709;
IL2CPP_EXTERN_C String_t* _stringLiteralFCF5307272E4A4426DDA9E4E6930E2B834B95B2C;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_mC3942EB4B00EAC10035AA7EBE23CA679C8790D20_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_m172B8D6DA48AD49F0740833F7D18CD468B072E5E_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_mCC63F3E0D55A21A9E56D80D26150AD2B78C6EC50_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_mF434E44E279E1DBD0887921B38A5C57812B1371A_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_m35A103AAF8E80E7C007214546C71B4E90901C2A2_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_m1E16540EE6283270E3DE85D46C3BE1F8B85E73C2_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_m1767ADED196AAA8B4D6FBB9313003E33A967E799_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_mC6A8CB67F39B0B39BF77ED6177B3C2DF1BC91533_RuntimeMethod_var;
IL2CPP_EXTERN_C const uint32_t AnimationClipPlayable_Equals_m06BA3E1C3AE0CC205C8531CCF6596C99C8D927EE_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationEvent__ctor_m6C228EB716B6B53DE2665091C056428EFB90897F_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationLayerMixerPlayable_Equals_m0A6A86FEDCE98E63B84BD01D0D362D03EA733E59_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationLayerMixerPlayable__cctor_m3712A5D44F275E70624C0D734C9CED9BD12D0AC9_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationMixerPlayable_Equals_m7CB1B61B74A6BE00A35AD072490F07D4C7A17B0F_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationMixerPlayable__cctor_m820F56C1D4257D4F5446BD66402D4428E0DF8E3E_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationMotionXToDeltaPlayable_Equals_m53B4AAB54D7F3633C3954056F8C334BB8B7D590E_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationMotionXToDeltaPlayable__cctor_mCB948CE31E0AAEC53CB1D6746D091604413C5EEE_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationOffsetPlayable_Equals_m30B207FC6287EABF6FC1FDA47784322A3ABB98DF_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationOffsetPlayable__cctor_m174AD41778526FA15E41C6A11303A4F190A4CEA6_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationPosePlayable_Equals_m4417430115DCF9B39D3E4B64424120CE7E555961_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationPosePlayable__cctor_mDE42A26BC2624427AA8086C4AB69FB531949153F_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationRemoveScalePlayable_Equals_m58B139243E3B27CE86CA4CC470895BF719CD9BAD_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationRemoveScalePlayable__cctor_m7BA13559FDA2BF8E061839B333085C402DED6829_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationScriptPlayable_Equals_m4995D1AD353F43FE3FA854A8384601F58156E69E_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationScriptPlayable__cctor_m3FA9E1E2E1EADACBC718598BEFECB25F867E454E_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimatorControllerParameter_Equals_m71402007E47A2C82599B74BE7E95476B89838682_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimatorControllerParameter__ctor_mCCC1C8C5E13550B5745B4F10D0FCF6F948517797_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimatorControllerPlayable_Equals_m04685CCA5A5FC388A0387D3453A677C0CB47D173_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimatorControllerPlayable__cctor_m6FCC197F3BF33EAFC37D5217617FCDC64E8B304E_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t AnimatorControllerPlayable__ctor_m739B1BFC592B6C160410141057F1B2BA1B971897_MetadataUsageId;
struct Delegate_t_marshaled_com;
struct Delegate_t_marshaled_pinvoke;
struct Exception_t_marshaled_com;
struct Exception_t_marshaled_pinvoke;
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0;;
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com;
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com;;
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke;
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke;;
struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86;
struct AnimatorControllerParameterU5BU5D_t7B886A2A1648ECF218447ED1DE8D241652F863FD;
IL2CPP_EXTERN_C_BEGIN
IL2CPP_EXTERN_C_END
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <Module>
struct U3CModuleU3E_t6EFABDA0B2A020FB3DD6CA286799D867733667F1
{
public:
public:
};
// System.Object
struct Il2CppArrayBounds;
// System.Array
// System.Attribute
struct Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74 : public RuntimeObject
{
public:
public:
};
// System.String
struct String_t : public RuntimeObject
{
public:
// System.Int32 System.String::m_stringLength
int32_t ___m_stringLength_0;
// System.Char System.String::m_firstChar
Il2CppChar ___m_firstChar_1;
public:
inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); }
inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; }
inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; }
inline void set_m_stringLength_0(int32_t value)
{
___m_stringLength_0 = value;
}
inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); }
inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; }
inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; }
inline void set_m_firstChar_1(Il2CppChar value)
{
___m_firstChar_1 = value;
}
};
struct String_t_StaticFields
{
public:
// System.String System.String::Empty
String_t* ___Empty_5;
public:
inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); }
inline String_t* get_Empty_5() const { return ___Empty_5; }
inline String_t** get_address_of_Empty_5() { return &___Empty_5; }
inline void set_Empty_5(String_t* value)
{
___Empty_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___Empty_5), (void*)value);
}
};
// System.ValueType
struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF : public RuntimeObject
{
public:
public:
};
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_com
{
};
// System.Boolean
struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C
{
public:
// System.Boolean System.Boolean::m_value
bool ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C, ___m_value_0)); }
inline bool get_m_value_0() const { return ___m_value_0; }
inline bool* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(bool value)
{
___m_value_0 = value;
}
};
struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields
{
public:
// System.String System.Boolean::TrueString
String_t* ___TrueString_5;
// System.String System.Boolean::FalseString
String_t* ___FalseString_6;
public:
inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___TrueString_5)); }
inline String_t* get_TrueString_5() const { return ___TrueString_5; }
inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; }
inline void set_TrueString_5(String_t* value)
{
___TrueString_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___TrueString_5), (void*)value);
}
inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___FalseString_6)); }
inline String_t* get_FalseString_6() const { return ___FalseString_6; }
inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; }
inline void set_FalseString_6(String_t* value)
{
___FalseString_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FalseString_6), (void*)value);
}
};
// System.Enum
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521 : public ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF
{
public:
public:
};
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields
{
public:
// System.Char[] System.Enum::enumSeperatorCharArray
CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___enumSeperatorCharArray_0;
public:
inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields, ___enumSeperatorCharArray_0)); }
inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; }
inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; }
inline void set_enumSeperatorCharArray_0(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value)
{
___enumSeperatorCharArray_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___enumSeperatorCharArray_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_com
{
};
// System.Int32
struct Int32_t585191389E07734F19F3156FF88FB3EF4800D102
{
public:
// System.Int32 System.Int32::m_value
int32_t ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int32_t585191389E07734F19F3156FF88FB3EF4800D102, ___m_value_0)); }
inline int32_t get_m_value_0() const { return ___m_value_0; }
inline int32_t* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(int32_t value)
{
___m_value_0 = value;
}
};
// System.IntPtr
struct IntPtr_t
{
public:
// System.Void* System.IntPtr::m_value
void* ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); }
inline void* get_m_value_0() const { return ___m_value_0; }
inline void** get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(void* value)
{
___m_value_0 = value;
}
};
struct IntPtr_t_StaticFields
{
public:
// System.IntPtr System.IntPtr::Zero
intptr_t ___Zero_1;
public:
inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); }
inline intptr_t get_Zero_1() const { return ___Zero_1; }
inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; }
inline void set_Zero_1(intptr_t value)
{
___Zero_1 = value;
}
};
// System.Single
struct Single_tDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1
{
public:
// System.Single System.Single::m_value
float ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Single_tDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1, ___m_value_0)); }
inline float get_m_value_0() const { return ___m_value_0; }
inline float* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(float value)
{
___m_value_0 = value;
}
};
// System.Void
struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017
{
public:
union
{
struct
{
};
uint8_t Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017__padding[1];
};
public:
};
// UnityEngine.Animations.NotKeyableAttribute
struct NotKeyableAttribute_tC0F8DAA85C33BBE045EFE59BB65D9A060D4282BE : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
// UnityEngine.AnimatorClipInfo
struct AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180
{
public:
// System.Int32 UnityEngine.AnimatorClipInfo::m_ClipInstanceID
int32_t ___m_ClipInstanceID_0;
// System.Single UnityEngine.AnimatorClipInfo::m_Weight
float ___m_Weight_1;
public:
inline static int32_t get_offset_of_m_ClipInstanceID_0() { return static_cast<int32_t>(offsetof(AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180, ___m_ClipInstanceID_0)); }
inline int32_t get_m_ClipInstanceID_0() const { return ___m_ClipInstanceID_0; }
inline int32_t* get_address_of_m_ClipInstanceID_0() { return &___m_ClipInstanceID_0; }
inline void set_m_ClipInstanceID_0(int32_t value)
{
___m_ClipInstanceID_0 = value;
}
inline static int32_t get_offset_of_m_Weight_1() { return static_cast<int32_t>(offsetof(AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180, ___m_Weight_1)); }
inline float get_m_Weight_1() const { return ___m_Weight_1; }
inline float* get_address_of_m_Weight_1() { return &___m_Weight_1; }
inline void set_m_Weight_1(float value)
{
___m_Weight_1 = value;
}
};
// UnityEngine.AnimatorStateInfo
struct AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2
{
public:
// System.Int32 UnityEngine.AnimatorStateInfo::m_Name
int32_t ___m_Name_0;
// System.Int32 UnityEngine.AnimatorStateInfo::m_Path
int32_t ___m_Path_1;
// System.Int32 UnityEngine.AnimatorStateInfo::m_FullPath
int32_t ___m_FullPath_2;
// System.Single UnityEngine.AnimatorStateInfo::m_NormalizedTime
float ___m_NormalizedTime_3;
// System.Single UnityEngine.AnimatorStateInfo::m_Length
float ___m_Length_4;
// System.Single UnityEngine.AnimatorStateInfo::m_Speed
float ___m_Speed_5;
// System.Single UnityEngine.AnimatorStateInfo::m_SpeedMultiplier
float ___m_SpeedMultiplier_6;
// System.Int32 UnityEngine.AnimatorStateInfo::m_Tag
int32_t ___m_Tag_7;
// System.Int32 UnityEngine.AnimatorStateInfo::m_Loop
int32_t ___m_Loop_8;
public:
inline static int32_t get_offset_of_m_Name_0() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_Name_0)); }
inline int32_t get_m_Name_0() const { return ___m_Name_0; }
inline int32_t* get_address_of_m_Name_0() { return &___m_Name_0; }
inline void set_m_Name_0(int32_t value)
{
___m_Name_0 = value;
}
inline static int32_t get_offset_of_m_Path_1() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_Path_1)); }
inline int32_t get_m_Path_1() const { return ___m_Path_1; }
inline int32_t* get_address_of_m_Path_1() { return &___m_Path_1; }
inline void set_m_Path_1(int32_t value)
{
___m_Path_1 = value;
}
inline static int32_t get_offset_of_m_FullPath_2() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_FullPath_2)); }
inline int32_t get_m_FullPath_2() const { return ___m_FullPath_2; }
inline int32_t* get_address_of_m_FullPath_2() { return &___m_FullPath_2; }
inline void set_m_FullPath_2(int32_t value)
{
___m_FullPath_2 = value;
}
inline static int32_t get_offset_of_m_NormalizedTime_3() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_NormalizedTime_3)); }
inline float get_m_NormalizedTime_3() const { return ___m_NormalizedTime_3; }
inline float* get_address_of_m_NormalizedTime_3() { return &___m_NormalizedTime_3; }
inline void set_m_NormalizedTime_3(float value)
{
___m_NormalizedTime_3 = value;
}
inline static int32_t get_offset_of_m_Length_4() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_Length_4)); }
inline float get_m_Length_4() const { return ___m_Length_4; }
inline float* get_address_of_m_Length_4() { return &___m_Length_4; }
inline void set_m_Length_4(float value)
{
___m_Length_4 = value;
}
inline static int32_t get_offset_of_m_Speed_5() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_Speed_5)); }
inline float get_m_Speed_5() const { return ___m_Speed_5; }
inline float* get_address_of_m_Speed_5() { return &___m_Speed_5; }
inline void set_m_Speed_5(float value)
{
___m_Speed_5 = value;
}
inline static int32_t get_offset_of_m_SpeedMultiplier_6() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_SpeedMultiplier_6)); }
inline float get_m_SpeedMultiplier_6() const { return ___m_SpeedMultiplier_6; }
inline float* get_address_of_m_SpeedMultiplier_6() { return &___m_SpeedMultiplier_6; }
inline void set_m_SpeedMultiplier_6(float value)
{
___m_SpeedMultiplier_6 = value;
}
inline static int32_t get_offset_of_m_Tag_7() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_Tag_7)); }
inline int32_t get_m_Tag_7() const { return ___m_Tag_7; }
inline int32_t* get_address_of_m_Tag_7() { return &___m_Tag_7; }
inline void set_m_Tag_7(int32_t value)
{
___m_Tag_7 = value;
}
inline static int32_t get_offset_of_m_Loop_8() { return static_cast<int32_t>(offsetof(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2, ___m_Loop_8)); }
inline int32_t get_m_Loop_8() const { return ___m_Loop_8; }
inline int32_t* get_address_of_m_Loop_8() { return &___m_Loop_8; }
inline void set_m_Loop_8(int32_t value)
{
___m_Loop_8 = value;
}
};
// UnityEngine.AnimatorTransitionInfo
struct AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B
{
public:
// System.Int32 UnityEngine.AnimatorTransitionInfo::m_FullPath
int32_t ___m_FullPath_0;
// System.Int32 UnityEngine.AnimatorTransitionInfo::m_UserName
int32_t ___m_UserName_1;
// System.Int32 UnityEngine.AnimatorTransitionInfo::m_Name
int32_t ___m_Name_2;
// System.Boolean UnityEngine.AnimatorTransitionInfo::m_HasFixedDuration
bool ___m_HasFixedDuration_3;
// System.Single UnityEngine.AnimatorTransitionInfo::m_Duration
float ___m_Duration_4;
// System.Single UnityEngine.AnimatorTransitionInfo::m_NormalizedTime
float ___m_NormalizedTime_5;
// System.Boolean UnityEngine.AnimatorTransitionInfo::m_AnyState
bool ___m_AnyState_6;
// System.Int32 UnityEngine.AnimatorTransitionInfo::m_TransitionType
int32_t ___m_TransitionType_7;
public:
inline static int32_t get_offset_of_m_FullPath_0() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_FullPath_0)); }
inline int32_t get_m_FullPath_0() const { return ___m_FullPath_0; }
inline int32_t* get_address_of_m_FullPath_0() { return &___m_FullPath_0; }
inline void set_m_FullPath_0(int32_t value)
{
___m_FullPath_0 = value;
}
inline static int32_t get_offset_of_m_UserName_1() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_UserName_1)); }
inline int32_t get_m_UserName_1() const { return ___m_UserName_1; }
inline int32_t* get_address_of_m_UserName_1() { return &___m_UserName_1; }
inline void set_m_UserName_1(int32_t value)
{
___m_UserName_1 = value;
}
inline static int32_t get_offset_of_m_Name_2() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_Name_2)); }
inline int32_t get_m_Name_2() const { return ___m_Name_2; }
inline int32_t* get_address_of_m_Name_2() { return &___m_Name_2; }
inline void set_m_Name_2(int32_t value)
{
___m_Name_2 = value;
}
inline static int32_t get_offset_of_m_HasFixedDuration_3() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_HasFixedDuration_3)); }
inline bool get_m_HasFixedDuration_3() const { return ___m_HasFixedDuration_3; }
inline bool* get_address_of_m_HasFixedDuration_3() { return &___m_HasFixedDuration_3; }
inline void set_m_HasFixedDuration_3(bool value)
{
___m_HasFixedDuration_3 = value;
}
inline static int32_t get_offset_of_m_Duration_4() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_Duration_4)); }
inline float get_m_Duration_4() const { return ___m_Duration_4; }
inline float* get_address_of_m_Duration_4() { return &___m_Duration_4; }
inline void set_m_Duration_4(float value)
{
___m_Duration_4 = value;
}
inline static int32_t get_offset_of_m_NormalizedTime_5() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_NormalizedTime_5)); }
inline float get_m_NormalizedTime_5() const { return ___m_NormalizedTime_5; }
inline float* get_address_of_m_NormalizedTime_5() { return &___m_NormalizedTime_5; }
inline void set_m_NormalizedTime_5(float value)
{
___m_NormalizedTime_5 = value;
}
inline static int32_t get_offset_of_m_AnyState_6() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_AnyState_6)); }
inline bool get_m_AnyState_6() const { return ___m_AnyState_6; }
inline bool* get_address_of_m_AnyState_6() { return &___m_AnyState_6; }
inline void set_m_AnyState_6(bool value)
{
___m_AnyState_6 = value;
}
inline static int32_t get_offset_of_m_TransitionType_7() { return static_cast<int32_t>(offsetof(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B, ___m_TransitionType_7)); }
inline int32_t get_m_TransitionType_7() const { return ___m_TransitionType_7; }
inline int32_t* get_address_of_m_TransitionType_7() { return &___m_TransitionType_7; }
inline void set_m_TransitionType_7(int32_t value)
{
___m_TransitionType_7 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.AnimatorTransitionInfo
struct AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_pinvoke
{
int32_t ___m_FullPath_0;
int32_t ___m_UserName_1;
int32_t ___m_Name_2;
int32_t ___m_HasFixedDuration_3;
float ___m_Duration_4;
float ___m_NormalizedTime_5;
int32_t ___m_AnyState_6;
int32_t ___m_TransitionType_7;
};
// Native definition for COM marshalling of UnityEngine.AnimatorTransitionInfo
struct AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_com
{
int32_t ___m_FullPath_0;
int32_t ___m_UserName_1;
int32_t ___m_Name_2;
int32_t ___m_HasFixedDuration_3;
float ___m_Duration_4;
float ___m_NormalizedTime_5;
int32_t ___m_AnyState_6;
int32_t ___m_TransitionType_7;
};
// UnityEngine.Quaternion
struct Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357
{
public:
// System.Single UnityEngine.Quaternion::x
float ___x_0;
// System.Single UnityEngine.Quaternion::y
float ___y_1;
// System.Single UnityEngine.Quaternion::z
float ___z_2;
// System.Single UnityEngine.Quaternion::w
float ___w_3;
public:
inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___x_0)); }
inline float get_x_0() const { return ___x_0; }
inline float* get_address_of_x_0() { return &___x_0; }
inline void set_x_0(float value)
{
___x_0 = value;
}
inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___y_1)); }
inline float get_y_1() const { return ___y_1; }
inline float* get_address_of_y_1() { return &___y_1; }
inline void set_y_1(float value)
{
___y_1 = value;
}
inline static int32_t get_offset_of_z_2() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___z_2)); }
inline float get_z_2() const { return ___z_2; }
inline float* get_address_of_z_2() { return &___z_2; }
inline void set_z_2(float value)
{
___z_2 = value;
}
inline static int32_t get_offset_of_w_3() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___w_3)); }
inline float get_w_3() const { return ___w_3; }
inline float* get_address_of_w_3() { return &___w_3; }
inline void set_w_3(float value)
{
___w_3 = value;
}
};
struct Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357_StaticFields
{
public:
// UnityEngine.Quaternion UnityEngine.Quaternion::identityQuaternion
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 ___identityQuaternion_4;
public:
inline static int32_t get_offset_of_identityQuaternion_4() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357_StaticFields, ___identityQuaternion_4)); }
inline Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 get_identityQuaternion_4() const { return ___identityQuaternion_4; }
inline Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 * get_address_of_identityQuaternion_4() { return &___identityQuaternion_4; }
inline void set_identityQuaternion_4(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 value)
{
___identityQuaternion_4 = value;
}
};
// UnityEngine.SharedBetweenAnimatorsAttribute
struct SharedBetweenAnimatorsAttribute_tD52C4EACCF9B8F7A21A34D11D3971A823B131F03 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
// UnityEngine.Vector3
struct Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720
{
public:
// System.Single UnityEngine.Vector3::x
float ___x_2;
// System.Single UnityEngine.Vector3::y
float ___y_3;
// System.Single UnityEngine.Vector3::z
float ___z_4;
public:
inline static int32_t get_offset_of_x_2() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___x_2)); }
inline float get_x_2() const { return ___x_2; }
inline float* get_address_of_x_2() { return &___x_2; }
inline void set_x_2(float value)
{
___x_2 = value;
}
inline static int32_t get_offset_of_y_3() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___y_3)); }
inline float get_y_3() const { return ___y_3; }
inline float* get_address_of_y_3() { return &___y_3; }
inline void set_y_3(float value)
{
___y_3 = value;
}
inline static int32_t get_offset_of_z_4() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___z_4)); }
inline float get_z_4() const { return ___z_4; }
inline float* get_address_of_z_4() { return &___z_4; }
inline void set_z_4(float value)
{
___z_4 = value;
}
};
struct Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields
{
public:
// UnityEngine.Vector3 UnityEngine.Vector3::zeroVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___zeroVector_5;
// UnityEngine.Vector3 UnityEngine.Vector3::oneVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___oneVector_6;
// UnityEngine.Vector3 UnityEngine.Vector3::upVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___upVector_7;
// UnityEngine.Vector3 UnityEngine.Vector3::downVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___downVector_8;
// UnityEngine.Vector3 UnityEngine.Vector3::leftVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___leftVector_9;
// UnityEngine.Vector3 UnityEngine.Vector3::rightVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___rightVector_10;
// UnityEngine.Vector3 UnityEngine.Vector3::forwardVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___forwardVector_11;
// UnityEngine.Vector3 UnityEngine.Vector3::backVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___backVector_12;
// UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___positiveInfinityVector_13;
// UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___negativeInfinityVector_14;
public:
inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___zeroVector_5)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_zeroVector_5() const { return ___zeroVector_5; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_zeroVector_5() { return &___zeroVector_5; }
inline void set_zeroVector_5(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___zeroVector_5 = value;
}
inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___oneVector_6)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_oneVector_6() const { return ___oneVector_6; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_oneVector_6() { return &___oneVector_6; }
inline void set_oneVector_6(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___oneVector_6 = value;
}
inline static int32_t get_offset_of_upVector_7() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___upVector_7)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_upVector_7() const { return ___upVector_7; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_upVector_7() { return &___upVector_7; }
inline void set_upVector_7(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___upVector_7 = value;
}
inline static int32_t get_offset_of_downVector_8() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___downVector_8)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_downVector_8() const { return ___downVector_8; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_downVector_8() { return &___downVector_8; }
inline void set_downVector_8(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___downVector_8 = value;
}
inline static int32_t get_offset_of_leftVector_9() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___leftVector_9)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_leftVector_9() const { return ___leftVector_9; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_leftVector_9() { return &___leftVector_9; }
inline void set_leftVector_9(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___leftVector_9 = value;
}
inline static int32_t get_offset_of_rightVector_10() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___rightVector_10)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_rightVector_10() const { return ___rightVector_10; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_rightVector_10() { return &___rightVector_10; }
inline void set_rightVector_10(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___rightVector_10 = value;
}
inline static int32_t get_offset_of_forwardVector_11() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___forwardVector_11)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_forwardVector_11() const { return ___forwardVector_11; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_forwardVector_11() { return &___forwardVector_11; }
inline void set_forwardVector_11(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___forwardVector_11 = value;
}
inline static int32_t get_offset_of_backVector_12() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___backVector_12)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_backVector_12() const { return ___backVector_12; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_backVector_12() { return &___backVector_12; }
inline void set_backVector_12(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___backVector_12 = value;
}
inline static int32_t get_offset_of_positiveInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___positiveInfinityVector_13)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_positiveInfinityVector_13() const { return ___positiveInfinityVector_13; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_positiveInfinityVector_13() { return &___positiveInfinityVector_13; }
inline void set_positiveInfinityVector_13(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___positiveInfinityVector_13 = value;
}
inline static int32_t get_offset_of_negativeInfinityVector_14() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___negativeInfinityVector_14)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_negativeInfinityVector_14() const { return ___negativeInfinityVector_14; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_negativeInfinityVector_14() { return &___negativeInfinityVector_14; }
inline void set_negativeInfinityVector_14(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___negativeInfinityVector_14 = value;
}
};
// System.Delegate
struct Delegate_t : public RuntimeObject
{
public:
// System.IntPtr System.Delegate::method_ptr
Il2CppMethodPointer ___method_ptr_0;
// System.IntPtr System.Delegate::invoke_impl
intptr_t ___invoke_impl_1;
// System.Object System.Delegate::m_target
RuntimeObject * ___m_target_2;
// System.IntPtr System.Delegate::method
intptr_t ___method_3;
// System.IntPtr System.Delegate::delegate_trampoline
intptr_t ___delegate_trampoline_4;
// System.IntPtr System.Delegate::extra_arg
intptr_t ___extra_arg_5;
// System.IntPtr System.Delegate::method_code
intptr_t ___method_code_6;
// System.Reflection.MethodInfo System.Delegate::method_info
MethodInfo_t * ___method_info_7;
// System.Reflection.MethodInfo System.Delegate::original_method_info
MethodInfo_t * ___original_method_info_8;
// System.DelegateData System.Delegate::data
DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9;
// System.Boolean System.Delegate::method_is_virtual
bool ___method_is_virtual_10;
public:
inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_ptr_0)); }
inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; }
inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; }
inline void set_method_ptr_0(Il2CppMethodPointer value)
{
___method_ptr_0 = value;
}
inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t, ___invoke_impl_1)); }
inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; }
inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; }
inline void set_invoke_impl_1(intptr_t value)
{
___invoke_impl_1 = value;
}
inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t, ___m_target_2)); }
inline RuntimeObject * get_m_target_2() const { return ___m_target_2; }
inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; }
inline void set_m_target_2(RuntimeObject * value)
{
___m_target_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_target_2), (void*)value);
}
inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_3)); }
inline intptr_t get_method_3() const { return ___method_3; }
inline intptr_t* get_address_of_method_3() { return &___method_3; }
inline void set_method_3(intptr_t value)
{
___method_3 = value;
}
inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t, ___delegate_trampoline_4)); }
inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; }
inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; }
inline void set_delegate_trampoline_4(intptr_t value)
{
___delegate_trampoline_4 = value;
}
inline static int32_t get_offset_of_extra_arg_5() { return static_cast<int32_t>(offsetof(Delegate_t, ___extra_arg_5)); }
inline intptr_t get_extra_arg_5() const { return ___extra_arg_5; }
inline intptr_t* get_address_of_extra_arg_5() { return &___extra_arg_5; }
inline void set_extra_arg_5(intptr_t value)
{
___extra_arg_5 = value;
}
inline static int32_t get_offset_of_method_code_6() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_code_6)); }
inline intptr_t get_method_code_6() const { return ___method_code_6; }
inline intptr_t* get_address_of_method_code_6() { return &___method_code_6; }
inline void set_method_code_6(intptr_t value)
{
___method_code_6 = value;
}
inline static int32_t get_offset_of_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_info_7)); }
inline MethodInfo_t * get_method_info_7() const { return ___method_info_7; }
inline MethodInfo_t ** get_address_of_method_info_7() { return &___method_info_7; }
inline void set_method_info_7(MethodInfo_t * value)
{
___method_info_7 = value;
Il2CppCodeGenWriteBarrier((void**)(&___method_info_7), (void*)value);
}
inline static int32_t get_offset_of_original_method_info_8() { return static_cast<int32_t>(offsetof(Delegate_t, ___original_method_info_8)); }
inline MethodInfo_t * get_original_method_info_8() const { return ___original_method_info_8; }
inline MethodInfo_t ** get_address_of_original_method_info_8() { return &___original_method_info_8; }
inline void set_original_method_info_8(MethodInfo_t * value)
{
___original_method_info_8 = value;
Il2CppCodeGenWriteBarrier((void**)(&___original_method_info_8), (void*)value);
}
inline static int32_t get_offset_of_data_9() { return static_cast<int32_t>(offsetof(Delegate_t, ___data_9)); }
inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * get_data_9() const { return ___data_9; }
inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE ** get_address_of_data_9() { return &___data_9; }
inline void set_data_9(DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * value)
{
___data_9 = value;
Il2CppCodeGenWriteBarrier((void**)(&___data_9), (void*)value);
}
inline static int32_t get_offset_of_method_is_virtual_10() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_is_virtual_10)); }
inline bool get_method_is_virtual_10() const { return ___method_is_virtual_10; }
inline bool* get_address_of_method_is_virtual_10() { return &___method_is_virtual_10; }
inline void set_method_is_virtual_10(bool value)
{
___method_is_virtual_10 = value;
}
};
// Native definition for P/Invoke marshalling of System.Delegate
struct Delegate_t_marshaled_pinvoke
{
intptr_t ___method_ptr_0;
intptr_t ___invoke_impl_1;
Il2CppIUnknown* ___m_target_2;
intptr_t ___method_3;
intptr_t ___delegate_trampoline_4;
intptr_t ___extra_arg_5;
intptr_t ___method_code_6;
MethodInfo_t * ___method_info_7;
MethodInfo_t * ___original_method_info_8;
DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9;
int32_t ___method_is_virtual_10;
};
// Native definition for COM marshalling of System.Delegate
struct Delegate_t_marshaled_com
{
intptr_t ___method_ptr_0;
intptr_t ___invoke_impl_1;
Il2CppIUnknown* ___m_target_2;
intptr_t ___method_3;
intptr_t ___delegate_trampoline_4;
intptr_t ___extra_arg_5;
intptr_t ___method_code_6;
MethodInfo_t * ___method_info_7;
MethodInfo_t * ___original_method_info_8;
DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9;
int32_t ___method_is_virtual_10;
};
// System.Exception
struct Exception_t : public RuntimeObject
{
public:
// System.String System.Exception::_className
String_t* ____className_1;
// System.String System.Exception::_message
String_t* ____message_2;
// System.Collections.IDictionary System.Exception::_data
RuntimeObject* ____data_3;
// System.Exception System.Exception::_innerException
Exception_t * ____innerException_4;
// System.String System.Exception::_helpURL
String_t* ____helpURL_5;
// System.Object System.Exception::_stackTrace
RuntimeObject * ____stackTrace_6;
// System.String System.Exception::_stackTraceString
String_t* ____stackTraceString_7;
// System.String System.Exception::_remoteStackTraceString
String_t* ____remoteStackTraceString_8;
// System.Int32 System.Exception::_remoteStackIndex
int32_t ____remoteStackIndex_9;
// System.Object System.Exception::_dynamicMethods
RuntimeObject * ____dynamicMethods_10;
// System.Int32 System.Exception::_HResult
int32_t ____HResult_11;
// System.String System.Exception::_source
String_t* ____source_12;
// System.Runtime.Serialization.SafeSerializationManager System.Exception::_safeSerializationManager
SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13;
// System.Diagnostics.StackTrace[] System.Exception::captured_traces
StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14;
// System.IntPtr[] System.Exception::native_trace_ips
IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* ___native_trace_ips_15;
public:
inline static int32_t get_offset_of__className_1() { return static_cast<int32_t>(offsetof(Exception_t, ____className_1)); }
inline String_t* get__className_1() const { return ____className_1; }
inline String_t** get_address_of__className_1() { return &____className_1; }
inline void set__className_1(String_t* value)
{
____className_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____className_1), (void*)value);
}
inline static int32_t get_offset_of__message_2() { return static_cast<int32_t>(offsetof(Exception_t, ____message_2)); }
inline String_t* get__message_2() const { return ____message_2; }
inline String_t** get_address_of__message_2() { return &____message_2; }
inline void set__message_2(String_t* value)
{
____message_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&____message_2), (void*)value);
}
inline static int32_t get_offset_of__data_3() { return static_cast<int32_t>(offsetof(Exception_t, ____data_3)); }
inline RuntimeObject* get__data_3() const { return ____data_3; }
inline RuntimeObject** get_address_of__data_3() { return &____data_3; }
inline void set__data_3(RuntimeObject* value)
{
____data_3 = value;
Il2CppCodeGenWriteBarrier((void**)(&____data_3), (void*)value);
}
inline static int32_t get_offset_of__innerException_4() { return static_cast<int32_t>(offsetof(Exception_t, ____innerException_4)); }
inline Exception_t * get__innerException_4() const { return ____innerException_4; }
inline Exception_t ** get_address_of__innerException_4() { return &____innerException_4; }
inline void set__innerException_4(Exception_t * value)
{
____innerException_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____innerException_4), (void*)value);
}
inline static int32_t get_offset_of__helpURL_5() { return static_cast<int32_t>(offsetof(Exception_t, ____helpURL_5)); }
inline String_t* get__helpURL_5() const { return ____helpURL_5; }
inline String_t** get_address_of__helpURL_5() { return &____helpURL_5; }
inline void set__helpURL_5(String_t* value)
{
____helpURL_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____helpURL_5), (void*)value);
}
inline static int32_t get_offset_of__stackTrace_6() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTrace_6)); }
inline RuntimeObject * get__stackTrace_6() const { return ____stackTrace_6; }
inline RuntimeObject ** get_address_of__stackTrace_6() { return &____stackTrace_6; }
inline void set__stackTrace_6(RuntimeObject * value)
{
____stackTrace_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&____stackTrace_6), (void*)value);
}
inline static int32_t get_offset_of__stackTraceString_7() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTraceString_7)); }
inline String_t* get__stackTraceString_7() const { return ____stackTraceString_7; }
inline String_t** get_address_of__stackTraceString_7() { return &____stackTraceString_7; }
inline void set__stackTraceString_7(String_t* value)
{
____stackTraceString_7 = value;
Il2CppCodeGenWriteBarrier((void**)(&____stackTraceString_7), (void*)value);
}
inline static int32_t get_offset_of__remoteStackTraceString_8() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackTraceString_8)); }
inline String_t* get__remoteStackTraceString_8() const { return ____remoteStackTraceString_8; }
inline String_t** get_address_of__remoteStackTraceString_8() { return &____remoteStackTraceString_8; }
inline void set__remoteStackTraceString_8(String_t* value)
{
____remoteStackTraceString_8 = value;
Il2CppCodeGenWriteBarrier((void**)(&____remoteStackTraceString_8), (void*)value);
}
inline static int32_t get_offset_of__remoteStackIndex_9() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackIndex_9)); }
inline int32_t get__remoteStackIndex_9() const { return ____remoteStackIndex_9; }
inline int32_t* get_address_of__remoteStackIndex_9() { return &____remoteStackIndex_9; }
inline void set__remoteStackIndex_9(int32_t value)
{
____remoteStackIndex_9 = value;
}
inline static int32_t get_offset_of__dynamicMethods_10() { return static_cast<int32_t>(offsetof(Exception_t, ____dynamicMethods_10)); }
inline RuntimeObject * get__dynamicMethods_10() const { return ____dynamicMethods_10; }
inline RuntimeObject ** get_address_of__dynamicMethods_10() { return &____dynamicMethods_10; }
inline void set__dynamicMethods_10(RuntimeObject * value)
{
____dynamicMethods_10 = value;
Il2CppCodeGenWriteBarrier((void**)(&____dynamicMethods_10), (void*)value);
}
inline static int32_t get_offset_of__HResult_11() { return static_cast<int32_t>(offsetof(Exception_t, ____HResult_11)); }
inline int32_t get__HResult_11() const { return ____HResult_11; }
inline int32_t* get_address_of__HResult_11() { return &____HResult_11; }
inline void set__HResult_11(int32_t value)
{
____HResult_11 = value;
}
inline static int32_t get_offset_of__source_12() { return static_cast<int32_t>(offsetof(Exception_t, ____source_12)); }
inline String_t* get__source_12() const { return ____source_12; }
inline String_t** get_address_of__source_12() { return &____source_12; }
inline void set__source_12(String_t* value)
{
____source_12 = value;
Il2CppCodeGenWriteBarrier((void**)(&____source_12), (void*)value);
}
inline static int32_t get_offset_of__safeSerializationManager_13() { return static_cast<int32_t>(offsetof(Exception_t, ____safeSerializationManager_13)); }
inline SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * get__safeSerializationManager_13() const { return ____safeSerializationManager_13; }
inline SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 ** get_address_of__safeSerializationManager_13() { return &____safeSerializationManager_13; }
inline void set__safeSerializationManager_13(SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * value)
{
____safeSerializationManager_13 = value;
Il2CppCodeGenWriteBarrier((void**)(&____safeSerializationManager_13), (void*)value);
}
inline static int32_t get_offset_of_captured_traces_14() { return static_cast<int32_t>(offsetof(Exception_t, ___captured_traces_14)); }
inline StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* get_captured_traces_14() const { return ___captured_traces_14; }
inline StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196** get_address_of_captured_traces_14() { return &___captured_traces_14; }
inline void set_captured_traces_14(StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* value)
{
___captured_traces_14 = value;
Il2CppCodeGenWriteBarrier((void**)(&___captured_traces_14), (void*)value);
}
inline static int32_t get_offset_of_native_trace_ips_15() { return static_cast<int32_t>(offsetof(Exception_t, ___native_trace_ips_15)); }
inline IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* get_native_trace_ips_15() const { return ___native_trace_ips_15; }
inline IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD** get_address_of_native_trace_ips_15() { return &___native_trace_ips_15; }
inline void set_native_trace_ips_15(IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* value)
{
___native_trace_ips_15 = value;
Il2CppCodeGenWriteBarrier((void**)(&___native_trace_ips_15), (void*)value);
}
};
struct Exception_t_StaticFields
{
public:
// System.Object System.Exception::s_EDILock
RuntimeObject * ___s_EDILock_0;
public:
inline static int32_t get_offset_of_s_EDILock_0() { return static_cast<int32_t>(offsetof(Exception_t_StaticFields, ___s_EDILock_0)); }
inline RuntimeObject * get_s_EDILock_0() const { return ___s_EDILock_0; }
inline RuntimeObject ** get_address_of_s_EDILock_0() { return &___s_EDILock_0; }
inline void set_s_EDILock_0(RuntimeObject * value)
{
___s_EDILock_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_EDILock_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Exception
struct Exception_t_marshaled_pinvoke
{
char* ____className_1;
char* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_pinvoke* ____innerException_4;
char* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
char* ____stackTraceString_7;
char* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
char* ____source_12;
SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13;
StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14;
Il2CppSafeArray/*NONE*/* ___native_trace_ips_15;
};
// Native definition for COM marshalling of System.Exception
struct Exception_t_marshaled_com
{
Il2CppChar* ____className_1;
Il2CppChar* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_com* ____innerException_4;
Il2CppChar* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
Il2CppChar* ____stackTraceString_7;
Il2CppChar* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
Il2CppChar* ____source_12;
SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13;
StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14;
Il2CppSafeArray/*NONE*/* ___native_trace_ips_15;
};
// UnityEngine.AnimationEventSource
struct AnimationEventSource_t0CA86CB3D775209B46F475A99887C93530F20702
{
public:
// System.Int32 UnityEngine.AnimationEventSource::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(AnimationEventSource_t0CA86CB3D775209B46F475A99887C93530F20702, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// UnityEngine.Animations.AnimationHumanStream
struct AnimationHumanStream_t4E6A2B8E37C9F4DCC77F8B2A802AD604EDEC4FB2
{
public:
// System.IntPtr UnityEngine.Animations.AnimationHumanStream::stream
intptr_t ___stream_0;
public:
inline static int32_t get_offset_of_stream_0() { return static_cast<int32_t>(offsetof(AnimationHumanStream_t4E6A2B8E37C9F4DCC77F8B2A802AD604EDEC4FB2, ___stream_0)); }
inline intptr_t get_stream_0() const { return ___stream_0; }
inline intptr_t* get_address_of_stream_0() { return &___stream_0; }
inline void set_stream_0(intptr_t value)
{
___stream_0 = value;
}
};
// UnityEngine.Animations.AnimationStream
struct AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E
{
public:
// System.UInt32 UnityEngine.Animations.AnimationStream::m_AnimatorBindingsVersion
uint32_t ___m_AnimatorBindingsVersion_0;
// System.IntPtr UnityEngine.Animations.AnimationStream::constant
intptr_t ___constant_1;
// System.IntPtr UnityEngine.Animations.AnimationStream::input
intptr_t ___input_2;
// System.IntPtr UnityEngine.Animations.AnimationStream::output
intptr_t ___output_3;
// System.IntPtr UnityEngine.Animations.AnimationStream::workspace
intptr_t ___workspace_4;
// System.IntPtr UnityEngine.Animations.AnimationStream::inputStreamAccessor
intptr_t ___inputStreamAccessor_5;
// System.IntPtr UnityEngine.Animations.AnimationStream::animationHandleBinder
intptr_t ___animationHandleBinder_6;
public:
inline static int32_t get_offset_of_m_AnimatorBindingsVersion_0() { return static_cast<int32_t>(offsetof(AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E, ___m_AnimatorBindingsVersion_0)); }
inline uint32_t get_m_AnimatorBindingsVersion_0() const { return ___m_AnimatorBindingsVersion_0; }
inline uint32_t* get_address_of_m_AnimatorBindingsVersion_0() { return &___m_AnimatorBindingsVersion_0; }
inline void set_m_AnimatorBindingsVersion_0(uint32_t value)
{
___m_AnimatorBindingsVersion_0 = value;
}
inline static int32_t get_offset_of_constant_1() { return static_cast<int32_t>(offsetof(AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E, ___constant_1)); }
inline intptr_t get_constant_1() const { return ___constant_1; }
inline intptr_t* get_address_of_constant_1() { return &___constant_1; }
inline void set_constant_1(intptr_t value)
{
___constant_1 = value;
}
inline static int32_t get_offset_of_input_2() { return static_cast<int32_t>(offsetof(AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E, ___input_2)); }
inline intptr_t get_input_2() const { return ___input_2; }
inline intptr_t* get_address_of_input_2() { return &___input_2; }
inline void set_input_2(intptr_t value)
{
___input_2 = value;
}
inline static int32_t get_offset_of_output_3() { return static_cast<int32_t>(offsetof(AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E, ___output_3)); }
inline intptr_t get_output_3() const { return ___output_3; }
inline intptr_t* get_address_of_output_3() { return &___output_3; }
inline void set_output_3(intptr_t value)
{
___output_3 = value;
}
inline static int32_t get_offset_of_workspace_4() { return static_cast<int32_t>(offsetof(AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E, ___workspace_4)); }
inline intptr_t get_workspace_4() const { return ___workspace_4; }
inline intptr_t* get_address_of_workspace_4() { return &___workspace_4; }
inline void set_workspace_4(intptr_t value)
{
___workspace_4 = value;
}
inline static int32_t get_offset_of_inputStreamAccessor_5() { return static_cast<int32_t>(offsetof(AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E, ___inputStreamAccessor_5)); }
inline intptr_t get_inputStreamAccessor_5() const { return ___inputStreamAccessor_5; }
inline intptr_t* get_address_of_inputStreamAccessor_5() { return &___inputStreamAccessor_5; }
inline void set_inputStreamAccessor_5(intptr_t value)
{
___inputStreamAccessor_5 = value;
}
inline static int32_t get_offset_of_animationHandleBinder_6() { return static_cast<int32_t>(offsetof(AnimationStream_t2104CE46F2C21C34F635E991A1BEE4B8924D188E, ___animationHandleBinder_6)); }
inline intptr_t get_animationHandleBinder_6() const { return ___animationHandleBinder_6; }
inline intptr_t* get_address_of_animationHandleBinder_6() { return &___animationHandleBinder_6; }
inline void set_animationHandleBinder_6(intptr_t value)
{
___animationHandleBinder_6 = value;
}
};
// UnityEngine.AnimatorControllerParameterType
struct AnimatorControllerParameterType_t340CE2BBAB87F4684FEA76C24F1BCB9FC10D5B1F
{
public:
// System.Int32 UnityEngine.AnimatorControllerParameterType::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(AnimatorControllerParameterType_t340CE2BBAB87F4684FEA76C24F1BCB9FC10D5B1F, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// UnityEngine.HumanLimit
struct HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3
{
public:
// UnityEngine.Vector3 UnityEngine.HumanLimit::m_Min
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___m_Min_0;
// UnityEngine.Vector3 UnityEngine.HumanLimit::m_Max
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___m_Max_1;
// UnityEngine.Vector3 UnityEngine.HumanLimit::m_Center
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___m_Center_2;
// System.Single UnityEngine.HumanLimit::m_AxisLength
float ___m_AxisLength_3;
// System.Int32 UnityEngine.HumanLimit::m_UseDefaultValues
int32_t ___m_UseDefaultValues_4;
public:
inline static int32_t get_offset_of_m_Min_0() { return static_cast<int32_t>(offsetof(HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3, ___m_Min_0)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_m_Min_0() const { return ___m_Min_0; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_m_Min_0() { return &___m_Min_0; }
inline void set_m_Min_0(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___m_Min_0 = value;
}
inline static int32_t get_offset_of_m_Max_1() { return static_cast<int32_t>(offsetof(HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3, ___m_Max_1)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_m_Max_1() const { return ___m_Max_1; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_m_Max_1() { return &___m_Max_1; }
inline void set_m_Max_1(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___m_Max_1 = value;
}
inline static int32_t get_offset_of_m_Center_2() { return static_cast<int32_t>(offsetof(HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3, ___m_Center_2)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_m_Center_2() const { return ___m_Center_2; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_m_Center_2() { return &___m_Center_2; }
inline void set_m_Center_2(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___m_Center_2 = value;
}
inline static int32_t get_offset_of_m_AxisLength_3() { return static_cast<int32_t>(offsetof(HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3, ___m_AxisLength_3)); }
inline float get_m_AxisLength_3() const { return ___m_AxisLength_3; }
inline float* get_address_of_m_AxisLength_3() { return &___m_AxisLength_3; }
inline void set_m_AxisLength_3(float value)
{
___m_AxisLength_3 = value;
}
inline static int32_t get_offset_of_m_UseDefaultValues_4() { return static_cast<int32_t>(offsetof(HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3, ___m_UseDefaultValues_4)); }
inline int32_t get_m_UseDefaultValues_4() const { return ___m_UseDefaultValues_4; }
inline int32_t* get_address_of_m_UseDefaultValues_4() { return &___m_UseDefaultValues_4; }
inline void set_m_UseDefaultValues_4(int32_t value)
{
___m_UseDefaultValues_4 = value;
}
};
// UnityEngine.Object
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 : public RuntimeObject
{
public:
// System.IntPtr UnityEngine.Object::m_CachedPtr
intptr_t ___m_CachedPtr_0;
public:
inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0, ___m_CachedPtr_0)); }
inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; }
inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; }
inline void set_m_CachedPtr_0(intptr_t value)
{
___m_CachedPtr_0 = value;
}
};
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_StaticFields
{
public:
// System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject
int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1;
public:
inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); }
inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; }
inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; }
inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value)
{
___OffsetOfInstanceIDInCPlusPlusObject_1 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.Object
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke
{
intptr_t ___m_CachedPtr_0;
};
// Native definition for COM marshalling of UnityEngine.Object
struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com
{
intptr_t ___m_CachedPtr_0;
};
// UnityEngine.Playables.PlayableHandle
struct PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182
{
public:
// System.IntPtr UnityEngine.Playables.PlayableHandle::m_Handle
intptr_t ___m_Handle_0;
// System.UInt32 UnityEngine.Playables.PlayableHandle::m_Version
uint32_t ___m_Version_1;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182, ___m_Handle_0)); }
inline intptr_t get_m_Handle_0() const { return ___m_Handle_0; }
inline intptr_t* get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(intptr_t value)
{
___m_Handle_0 = value;
}
inline static int32_t get_offset_of_m_Version_1() { return static_cast<int32_t>(offsetof(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182, ___m_Version_1)); }
inline uint32_t get_m_Version_1() const { return ___m_Version_1; }
inline uint32_t* get_address_of_m_Version_1() { return &___m_Version_1; }
inline void set_m_Version_1(uint32_t value)
{
___m_Version_1 = value;
}
};
struct PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_StaticFields
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Playables.PlayableHandle::m_Null
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Null_2;
public:
inline static int32_t get_offset_of_m_Null_2() { return static_cast<int32_t>(offsetof(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_StaticFields, ___m_Null_2)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Null_2() const { return ___m_Null_2; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Null_2() { return &___m_Null_2; }
inline void set_m_Null_2(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Null_2 = value;
}
};
// UnityEngine.Playables.PlayableOutputHandle
struct PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922
{
public:
// System.IntPtr UnityEngine.Playables.PlayableOutputHandle::m_Handle
intptr_t ___m_Handle_0;
// System.UInt32 UnityEngine.Playables.PlayableOutputHandle::m_Version
uint32_t ___m_Version_1;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922, ___m_Handle_0)); }
inline intptr_t get_m_Handle_0() const { return ___m_Handle_0; }
inline intptr_t* get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(intptr_t value)
{
___m_Handle_0 = value;
}
inline static int32_t get_offset_of_m_Version_1() { return static_cast<int32_t>(offsetof(PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922, ___m_Version_1)); }
inline uint32_t get_m_Version_1() const { return ___m_Version_1; }
inline uint32_t* get_address_of_m_Version_1() { return &___m_Version_1; }
inline void set_m_Version_1(uint32_t value)
{
___m_Version_1 = value;
}
};
struct PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922_StaticFields
{
public:
// UnityEngine.Playables.PlayableOutputHandle UnityEngine.Playables.PlayableOutputHandle::m_Null
PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 ___m_Null_2;
public:
inline static int32_t get_offset_of_m_Null_2() { return static_cast<int32_t>(offsetof(PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922_StaticFields, ___m_Null_2)); }
inline PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 get_m_Null_2() const { return ___m_Null_2; }
inline PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 * get_address_of_m_Null_2() { return &___m_Null_2; }
inline void set_m_Null_2(PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 value)
{
___m_Null_2 = value;
}
};
// UnityEngine.SkeletonBone
struct SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5
{
public:
// System.String UnityEngine.SkeletonBone::name
String_t* ___name_0;
// System.String UnityEngine.SkeletonBone::parentName
String_t* ___parentName_1;
// UnityEngine.Vector3 UnityEngine.SkeletonBone::position
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___position_2;
// UnityEngine.Quaternion UnityEngine.SkeletonBone::rotation
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 ___rotation_3;
// UnityEngine.Vector3 UnityEngine.SkeletonBone::scale
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___scale_4;
public:
inline static int32_t get_offset_of_name_0() { return static_cast<int32_t>(offsetof(SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5, ___name_0)); }
inline String_t* get_name_0() const { return ___name_0; }
inline String_t** get_address_of_name_0() { return &___name_0; }
inline void set_name_0(String_t* value)
{
___name_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___name_0), (void*)value);
}
inline static int32_t get_offset_of_parentName_1() { return static_cast<int32_t>(offsetof(SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5, ___parentName_1)); }
inline String_t* get_parentName_1() const { return ___parentName_1; }
inline String_t** get_address_of_parentName_1() { return &___parentName_1; }
inline void set_parentName_1(String_t* value)
{
___parentName_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___parentName_1), (void*)value);
}
inline static int32_t get_offset_of_position_2() { return static_cast<int32_t>(offsetof(SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5, ___position_2)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_position_2() const { return ___position_2; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_position_2() { return &___position_2; }
inline void set_position_2(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___position_2 = value;
}
inline static int32_t get_offset_of_rotation_3() { return static_cast<int32_t>(offsetof(SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5, ___rotation_3)); }
inline Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 get_rotation_3() const { return ___rotation_3; }
inline Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 * get_address_of_rotation_3() { return &___rotation_3; }
inline void set_rotation_3(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 value)
{
___rotation_3 = value;
}
inline static int32_t get_offset_of_scale_4() { return static_cast<int32_t>(offsetof(SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5, ___scale_4)); }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_scale_4() const { return ___scale_4; }
inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_scale_4() { return &___scale_4; }
inline void set_scale_4(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value)
{
___scale_4 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.SkeletonBone
struct SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_pinvoke
{
char* ___name_0;
char* ___parentName_1;
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___position_2;
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 ___rotation_3;
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___scale_4;
};
// Native definition for COM marshalling of UnityEngine.SkeletonBone
struct SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_com
{
Il2CppChar* ___name_0;
Il2CppChar* ___parentName_1;
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___position_2;
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 ___rotation_3;
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___scale_4;
};
// UnityEngine.StateInfoIndex
struct StateInfoIndex_tB33643A51F1038D1AA318A291031162A6A79814E
{
public:
// System.Int32 UnityEngine.StateInfoIndex::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(StateInfoIndex_tB33643A51F1038D1AA318A291031162A6A79814E, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// UnityEngine.TrackedReference
struct TrackedReference_tE93229EF7055CBB35B2A98DD2493947428D06107 : public RuntimeObject
{
public:
// System.IntPtr UnityEngine.TrackedReference::m_Ptr
intptr_t ___m_Ptr_0;
public:
inline static int32_t get_offset_of_m_Ptr_0() { return static_cast<int32_t>(offsetof(TrackedReference_tE93229EF7055CBB35B2A98DD2493947428D06107, ___m_Ptr_0)); }
inline intptr_t get_m_Ptr_0() const { return ___m_Ptr_0; }
inline intptr_t* get_address_of_m_Ptr_0() { return &___m_Ptr_0; }
inline void set_m_Ptr_0(intptr_t value)
{
___m_Ptr_0 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.TrackedReference
struct TrackedReference_tE93229EF7055CBB35B2A98DD2493947428D06107_marshaled_pinvoke
{
intptr_t ___m_Ptr_0;
};
// Native definition for COM marshalling of UnityEngine.TrackedReference
struct TrackedReference_tE93229EF7055CBB35B2A98DD2493947428D06107_marshaled_com
{
intptr_t ___m_Ptr_0;
};
// System.MulticastDelegate
struct MulticastDelegate_t : public Delegate_t
{
public:
// System.Delegate[] System.MulticastDelegate::delegates
DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* ___delegates_11;
public:
inline static int32_t get_offset_of_delegates_11() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___delegates_11)); }
inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* get_delegates_11() const { return ___delegates_11; }
inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86** get_address_of_delegates_11() { return &___delegates_11; }
inline void set_delegates_11(DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* value)
{
___delegates_11 = value;
Il2CppCodeGenWriteBarrier((void**)(&___delegates_11), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.MulticastDelegate
struct MulticastDelegate_t_marshaled_pinvoke : public Delegate_t_marshaled_pinvoke
{
Delegate_t_marshaled_pinvoke** ___delegates_11;
};
// Native definition for COM marshalling of System.MulticastDelegate
struct MulticastDelegate_t_marshaled_com : public Delegate_t_marshaled_com
{
Delegate_t_marshaled_com** ___delegates_11;
};
// System.SystemException
struct SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782 : public Exception_t
{
public:
public:
};
// UnityEngine.AnimationEvent
struct AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F : public RuntimeObject
{
public:
// System.Single UnityEngine.AnimationEvent::m_Time
float ___m_Time_0;
// System.String UnityEngine.AnimationEvent::m_FunctionName
String_t* ___m_FunctionName_1;
// System.String UnityEngine.AnimationEvent::m_StringParameter
String_t* ___m_StringParameter_2;
// UnityEngine.Object UnityEngine.AnimationEvent::m_ObjectReferenceParameter
Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * ___m_ObjectReferenceParameter_3;
// System.Single UnityEngine.AnimationEvent::m_FloatParameter
float ___m_FloatParameter_4;
// System.Int32 UnityEngine.AnimationEvent::m_IntParameter
int32_t ___m_IntParameter_5;
// System.Int32 UnityEngine.AnimationEvent::m_MessageOptions
int32_t ___m_MessageOptions_6;
// UnityEngine.AnimationEventSource UnityEngine.AnimationEvent::m_Source
int32_t ___m_Source_7;
// UnityEngine.AnimationState UnityEngine.AnimationEvent::m_StateSender
AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 * ___m_StateSender_8;
// UnityEngine.AnimatorStateInfo UnityEngine.AnimationEvent::m_AnimatorStateInfo
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___m_AnimatorStateInfo_9;
// UnityEngine.AnimatorClipInfo UnityEngine.AnimationEvent::m_AnimatorClipInfo
AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180 ___m_AnimatorClipInfo_10;
public:
inline static int32_t get_offset_of_m_Time_0() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_Time_0)); }
inline float get_m_Time_0() const { return ___m_Time_0; }
inline float* get_address_of_m_Time_0() { return &___m_Time_0; }
inline void set_m_Time_0(float value)
{
___m_Time_0 = value;
}
inline static int32_t get_offset_of_m_FunctionName_1() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_FunctionName_1)); }
inline String_t* get_m_FunctionName_1() const { return ___m_FunctionName_1; }
inline String_t** get_address_of_m_FunctionName_1() { return &___m_FunctionName_1; }
inline void set_m_FunctionName_1(String_t* value)
{
___m_FunctionName_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_FunctionName_1), (void*)value);
}
inline static int32_t get_offset_of_m_StringParameter_2() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_StringParameter_2)); }
inline String_t* get_m_StringParameter_2() const { return ___m_StringParameter_2; }
inline String_t** get_address_of_m_StringParameter_2() { return &___m_StringParameter_2; }
inline void set_m_StringParameter_2(String_t* value)
{
___m_StringParameter_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_StringParameter_2), (void*)value);
}
inline static int32_t get_offset_of_m_ObjectReferenceParameter_3() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_ObjectReferenceParameter_3)); }
inline Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * get_m_ObjectReferenceParameter_3() const { return ___m_ObjectReferenceParameter_3; }
inline Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 ** get_address_of_m_ObjectReferenceParameter_3() { return &___m_ObjectReferenceParameter_3; }
inline void set_m_ObjectReferenceParameter_3(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * value)
{
___m_ObjectReferenceParameter_3 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_ObjectReferenceParameter_3), (void*)value);
}
inline static int32_t get_offset_of_m_FloatParameter_4() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_FloatParameter_4)); }
inline float get_m_FloatParameter_4() const { return ___m_FloatParameter_4; }
inline float* get_address_of_m_FloatParameter_4() { return &___m_FloatParameter_4; }
inline void set_m_FloatParameter_4(float value)
{
___m_FloatParameter_4 = value;
}
inline static int32_t get_offset_of_m_IntParameter_5() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_IntParameter_5)); }
inline int32_t get_m_IntParameter_5() const { return ___m_IntParameter_5; }
inline int32_t* get_address_of_m_IntParameter_5() { return &___m_IntParameter_5; }
inline void set_m_IntParameter_5(int32_t value)
{
___m_IntParameter_5 = value;
}
inline static int32_t get_offset_of_m_MessageOptions_6() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_MessageOptions_6)); }
inline int32_t get_m_MessageOptions_6() const { return ___m_MessageOptions_6; }
inline int32_t* get_address_of_m_MessageOptions_6() { return &___m_MessageOptions_6; }
inline void set_m_MessageOptions_6(int32_t value)
{
___m_MessageOptions_6 = value;
}
inline static int32_t get_offset_of_m_Source_7() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_Source_7)); }
inline int32_t get_m_Source_7() const { return ___m_Source_7; }
inline int32_t* get_address_of_m_Source_7() { return &___m_Source_7; }
inline void set_m_Source_7(int32_t value)
{
___m_Source_7 = value;
}
inline static int32_t get_offset_of_m_StateSender_8() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_StateSender_8)); }
inline AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 * get_m_StateSender_8() const { return ___m_StateSender_8; }
inline AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 ** get_address_of_m_StateSender_8() { return &___m_StateSender_8; }
inline void set_m_StateSender_8(AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 * value)
{
___m_StateSender_8 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_StateSender_8), (void*)value);
}
inline static int32_t get_offset_of_m_AnimatorStateInfo_9() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_AnimatorStateInfo_9)); }
inline AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 get_m_AnimatorStateInfo_9() const { return ___m_AnimatorStateInfo_9; }
inline AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * get_address_of_m_AnimatorStateInfo_9() { return &___m_AnimatorStateInfo_9; }
inline void set_m_AnimatorStateInfo_9(AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 value)
{
___m_AnimatorStateInfo_9 = value;
}
inline static int32_t get_offset_of_m_AnimatorClipInfo_10() { return static_cast<int32_t>(offsetof(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F, ___m_AnimatorClipInfo_10)); }
inline AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180 get_m_AnimatorClipInfo_10() const { return ___m_AnimatorClipInfo_10; }
inline AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180 * get_address_of_m_AnimatorClipInfo_10() { return &___m_AnimatorClipInfo_10; }
inline void set_m_AnimatorClipInfo_10(AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180 value)
{
___m_AnimatorClipInfo_10 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.AnimationEvent
struct AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_pinvoke
{
float ___m_Time_0;
char* ___m_FunctionName_1;
char* ___m_StringParameter_2;
Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke ___m_ObjectReferenceParameter_3;
float ___m_FloatParameter_4;
int32_t ___m_IntParameter_5;
int32_t ___m_MessageOptions_6;
int32_t ___m_Source_7;
AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 * ___m_StateSender_8;
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___m_AnimatorStateInfo_9;
AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180 ___m_AnimatorClipInfo_10;
};
// Native definition for COM marshalling of UnityEngine.AnimationEvent
struct AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_com
{
float ___m_Time_0;
Il2CppChar* ___m_FunctionName_1;
Il2CppChar* ___m_StringParameter_2;
Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com* ___m_ObjectReferenceParameter_3;
float ___m_FloatParameter_4;
int32_t ___m_IntParameter_5;
int32_t ___m_MessageOptions_6;
int32_t ___m_Source_7;
AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 * ___m_StateSender_8;
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___m_AnimatorStateInfo_9;
AnimatorClipInfo_t78457ABBA83D388EDFF26F436F5E61A29CF4E180 ___m_AnimatorClipInfo_10;
};
// UnityEngine.AnimationState
struct AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 : public TrackedReference_tE93229EF7055CBB35B2A98DD2493947428D06107
{
public:
public:
};
// UnityEngine.Animations.AnimationClipPlayable
struct AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
// UnityEngine.Animations.AnimationLayerMixerPlayable
struct AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_StaticFields
{
public:
// UnityEngine.Animations.AnimationLayerMixerPlayable UnityEngine.Animations.AnimationLayerMixerPlayable::m_NullPlayable
AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_StaticFields, ___m_NullPlayable_1)); }
inline AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationMixerPlayable
struct AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_StaticFields
{
public:
// UnityEngine.Animations.AnimationMixerPlayable UnityEngine.Animations.AnimationMixerPlayable::m_NullPlayable
AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_StaticFields, ___m_NullPlayable_1)); }
inline AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationMotionXToDeltaPlayable
struct AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_StaticFields
{
public:
// UnityEngine.Animations.AnimationMotionXToDeltaPlayable UnityEngine.Animations.AnimationMotionXToDeltaPlayable::m_NullPlayable
AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_StaticFields, ___m_NullPlayable_1)); }
inline AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationOffsetPlayable
struct AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_StaticFields
{
public:
// UnityEngine.Animations.AnimationOffsetPlayable UnityEngine.Animations.AnimationOffsetPlayable::m_NullPlayable
AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_StaticFields, ___m_NullPlayable_1)); }
inline AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationPlayableOutput
struct AnimationPlayableOutput_tA10178429D6528BDB4516F6788CE680E349553E6
{
public:
// UnityEngine.Playables.PlayableOutputHandle UnityEngine.Animations.AnimationPlayableOutput::m_Handle
PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationPlayableOutput_tA10178429D6528BDB4516F6788CE680E349553E6, ___m_Handle_0)); }
inline PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableOutputHandle_t0D0C9D8ACC1A4061BD4EAEB61F3EE0357052F922 value)
{
___m_Handle_0 = value;
}
};
// UnityEngine.Animations.AnimationPosePlayable
struct AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_StaticFields
{
public:
// UnityEngine.Animations.AnimationPosePlayable UnityEngine.Animations.AnimationPosePlayable::m_NullPlayable
AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_StaticFields, ___m_NullPlayable_1)); }
inline AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationRemoveScalePlayable
struct AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_StaticFields
{
public:
// UnityEngine.Animations.AnimationRemoveScalePlayable UnityEngine.Animations.AnimationRemoveScalePlayable::m_NullPlayable
AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_StaticFields, ___m_NullPlayable_1)); }
inline AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationScriptPlayable
struct AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_StaticFields
{
public:
// UnityEngine.Animations.AnimationScriptPlayable UnityEngine.Animations.AnimationScriptPlayable::m_NullPlayable
AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_StaticFields, ___m_NullPlayable_1)); }
inline AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimatorControllerPlayable
struct AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::m_Handle
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B, ___m_Handle_0)); }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 value)
{
___m_Handle_0 = value;
}
};
struct AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_StaticFields
{
public:
// UnityEngine.Animations.AnimatorControllerPlayable UnityEngine.Animations.AnimatorControllerPlayable::m_NullPlayable
AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_StaticFields, ___m_NullPlayable_1)); }
inline AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.AnimatorControllerParameter
struct AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 : public RuntimeObject
{
public:
// System.String UnityEngine.AnimatorControllerParameter::m_Name
String_t* ___m_Name_0;
// UnityEngine.AnimatorControllerParameterType UnityEngine.AnimatorControllerParameter::m_Type
int32_t ___m_Type_1;
// System.Single UnityEngine.AnimatorControllerParameter::m_DefaultFloat
float ___m_DefaultFloat_2;
// System.Int32 UnityEngine.AnimatorControllerParameter::m_DefaultInt
int32_t ___m_DefaultInt_3;
// System.Boolean UnityEngine.AnimatorControllerParameter::m_DefaultBool
bool ___m_DefaultBool_4;
public:
inline static int32_t get_offset_of_m_Name_0() { return static_cast<int32_t>(offsetof(AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68, ___m_Name_0)); }
inline String_t* get_m_Name_0() const { return ___m_Name_0; }
inline String_t** get_address_of_m_Name_0() { return &___m_Name_0; }
inline void set_m_Name_0(String_t* value)
{
___m_Name_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_Name_0), (void*)value);
}
inline static int32_t get_offset_of_m_Type_1() { return static_cast<int32_t>(offsetof(AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68, ___m_Type_1)); }
inline int32_t get_m_Type_1() const { return ___m_Type_1; }
inline int32_t* get_address_of_m_Type_1() { return &___m_Type_1; }
inline void set_m_Type_1(int32_t value)
{
___m_Type_1 = value;
}
inline static int32_t get_offset_of_m_DefaultFloat_2() { return static_cast<int32_t>(offsetof(AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68, ___m_DefaultFloat_2)); }
inline float get_m_DefaultFloat_2() const { return ___m_DefaultFloat_2; }
inline float* get_address_of_m_DefaultFloat_2() { return &___m_DefaultFloat_2; }
inline void set_m_DefaultFloat_2(float value)
{
___m_DefaultFloat_2 = value;
}
inline static int32_t get_offset_of_m_DefaultInt_3() { return static_cast<int32_t>(offsetof(AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68, ___m_DefaultInt_3)); }
inline int32_t get_m_DefaultInt_3() const { return ___m_DefaultInt_3; }
inline int32_t* get_address_of_m_DefaultInt_3() { return &___m_DefaultInt_3; }
inline void set_m_DefaultInt_3(int32_t value)
{
___m_DefaultInt_3 = value;
}
inline static int32_t get_offset_of_m_DefaultBool_4() { return static_cast<int32_t>(offsetof(AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68, ___m_DefaultBool_4)); }
inline bool get_m_DefaultBool_4() const { return ___m_DefaultBool_4; }
inline bool* get_address_of_m_DefaultBool_4() { return &___m_DefaultBool_4; }
inline void set_m_DefaultBool_4(bool value)
{
___m_DefaultBool_4 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.AnimatorControllerParameter
struct AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_pinvoke
{
char* ___m_Name_0;
int32_t ___m_Type_1;
float ___m_DefaultFloat_2;
int32_t ___m_DefaultInt_3;
int32_t ___m_DefaultBool_4;
};
// Native definition for COM marshalling of UnityEngine.AnimatorControllerParameter
struct AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_com
{
Il2CppChar* ___m_Name_0;
int32_t ___m_Type_1;
float ___m_DefaultFloat_2;
int32_t ___m_DefaultInt_3;
int32_t ___m_DefaultBool_4;
};
// UnityEngine.Avatar
struct Avatar_t14B515893D5504566D487FFE046DCB8C8C50D02B : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0
{
public:
public:
};
// UnityEngine.Component
struct Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0
{
public:
public:
};
// UnityEngine.HumanBone
struct HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995
{
public:
// System.String UnityEngine.HumanBone::m_BoneName
String_t* ___m_BoneName_0;
// System.String UnityEngine.HumanBone::m_HumanName
String_t* ___m_HumanName_1;
// UnityEngine.HumanLimit UnityEngine.HumanBone::limit
HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 ___limit_2;
public:
inline static int32_t get_offset_of_m_BoneName_0() { return static_cast<int32_t>(offsetof(HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995, ___m_BoneName_0)); }
inline String_t* get_m_BoneName_0() const { return ___m_BoneName_0; }
inline String_t** get_address_of_m_BoneName_0() { return &___m_BoneName_0; }
inline void set_m_BoneName_0(String_t* value)
{
___m_BoneName_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_BoneName_0), (void*)value);
}
inline static int32_t get_offset_of_m_HumanName_1() { return static_cast<int32_t>(offsetof(HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995, ___m_HumanName_1)); }
inline String_t* get_m_HumanName_1() const { return ___m_HumanName_1; }
inline String_t** get_address_of_m_HumanName_1() { return &___m_HumanName_1; }
inline void set_m_HumanName_1(String_t* value)
{
___m_HumanName_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_HumanName_1), (void*)value);
}
inline static int32_t get_offset_of_limit_2() { return static_cast<int32_t>(offsetof(HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995, ___limit_2)); }
inline HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 get_limit_2() const { return ___limit_2; }
inline HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 * get_address_of_limit_2() { return &___limit_2; }
inline void set_limit_2(HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 value)
{
___limit_2 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.HumanBone
struct HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_pinvoke
{
char* ___m_BoneName_0;
char* ___m_HumanName_1;
HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 ___limit_2;
};
// Native definition for COM marshalling of UnityEngine.HumanBone
struct HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_com
{
Il2CppChar* ___m_BoneName_0;
Il2CppChar* ___m_HumanName_1;
HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 ___limit_2;
};
// UnityEngine.Motion
struct Motion_t497BF9244B6A769D1AE925C3876B187C56C8CF8F : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0
{
public:
public:
};
// UnityEngine.RuntimeAnimatorController
struct RuntimeAnimatorController_tDA6672C8194522C2F60F8F2F241657E57C3520BD : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0
{
public:
public:
};
// UnityEngine.ScriptableObject
struct ScriptableObject_tAB015486CEAB714DA0D5C1BA389B84FB90427734 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0
{
public:
public:
};
// Native definition for P/Invoke marshalling of UnityEngine.ScriptableObject
struct ScriptableObject_tAB015486CEAB714DA0D5C1BA389B84FB90427734_marshaled_pinvoke : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke
{
};
// Native definition for COM marshalling of UnityEngine.ScriptableObject
struct ScriptableObject_tAB015486CEAB714DA0D5C1BA389B84FB90427734_marshaled_com : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com
{
};
// System.AsyncCallback
struct AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4 : public MulticastDelegate_t
{
public:
public:
};
// System.InvalidCastException
struct InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA : public SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782
{
public:
public:
};
// System.InvalidOperationException
struct InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 : public SystemException_t5380468142AA850BE4A341D7AF3EAB9C78746782
{
public:
public:
};
// UnityEngine.AnimationClip
struct AnimationClip_t336CFC94F6275526DC0B9BEEF833D4D89D6DEDDE : public Motion_t497BF9244B6A769D1AE925C3876B187C56C8CF8F
{
public:
public:
};
// UnityEngine.AnimatorOverrideController
struct AnimatorOverrideController_t130F04B57E753FD4288EF3235699ABE7C88FF312 : public RuntimeAnimatorController_tDA6672C8194522C2F60F8F2F241657E57C3520BD
{
public:
// UnityEngine.AnimatorOverrideController_OnOverrideControllerDirtyCallback UnityEngine.AnimatorOverrideController::OnOverrideControllerDirty
OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * ___OnOverrideControllerDirty_4;
public:
inline static int32_t get_offset_of_OnOverrideControllerDirty_4() { return static_cast<int32_t>(offsetof(AnimatorOverrideController_t130F04B57E753FD4288EF3235699ABE7C88FF312, ___OnOverrideControllerDirty_4)); }
inline OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * get_OnOverrideControllerDirty_4() const { return ___OnOverrideControllerDirty_4; }
inline OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E ** get_address_of_OnOverrideControllerDirty_4() { return &___OnOverrideControllerDirty_4; }
inline void set_OnOverrideControllerDirty_4(OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * value)
{
___OnOverrideControllerDirty_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___OnOverrideControllerDirty_4), (void*)value);
}
};
// UnityEngine.AnimatorOverrideController_OnOverrideControllerDirtyCallback
struct OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E : public MulticastDelegate_t
{
public:
public:
};
// UnityEngine.Behaviour
struct Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8 : public Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621
{
public:
public:
};
// UnityEngine.StateMachineBehaviour
struct StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C : public ScriptableObject_tAB015486CEAB714DA0D5C1BA389B84FB90427734
{
public:
public:
};
// UnityEngine.Animator
struct Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A : public Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// UnityEngine.AnimatorControllerParameter[]
struct AnimatorControllerParameterU5BU5D_t7B886A2A1648ECF218447ED1DE8D241652F863FD : public RuntimeArray
{
public:
ALIGN_FIELD (8) AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * m_Items[1];
public:
inline AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Delegate[]
struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86 : public RuntimeArray
{
public:
ALIGN_FIELD (8) Delegate_t * m_Items[1];
public:
inline Delegate_t * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline Delegate_t ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, Delegate_t * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline Delegate_t * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline Delegate_t ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, Delegate_t * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
IL2CPP_EXTERN_C void Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshal_pinvoke(const Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0& unmarshaled, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke& marshaled);
IL2CPP_EXTERN_C void Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshal_pinvoke_back(const Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke& marshaled, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0& unmarshaled);
IL2CPP_EXTERN_C void Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshal_pinvoke_cleanup(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke& marshaled);
IL2CPP_EXTERN_C void Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshal_com(const Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0& unmarshaled, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com& marshaled);
IL2CPP_EXTERN_C void Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshal_com_back(const Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com& marshaled, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0& unmarshaled);
IL2CPP_EXTERN_C void Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshal_com_cleanup(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com& marshaled);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationLayerMixerPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_mC3942EB4B00EAC10035AA7EBE23CA679C8790D20_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMixerPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_m172B8D6DA48AD49F0740833F7D18CD468B072E5E_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMotionXToDeltaPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_mCC63F3E0D55A21A9E56D80D26150AD2B78C6EC50_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationOffsetPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_mF434E44E279E1DBD0887921B38A5C57812B1371A_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationPosePlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_m35A103AAF8E80E7C007214546C71B4E90901C2A2_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationRemoveScalePlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_m1E16540EE6283270E3DE85D46C3BE1F8B85E73C2_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationScriptPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_m1767ADED196AAA8B4D6FBB9313003E33A967E799_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimatorControllerPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_mC6A8CB67F39B0B39BF77ED6177B3C2DF1BC91533_gshared (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Void System.Object::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0 (RuntimeObject * __this, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationClipPlayable_GetHandle_mB1B706B9ADB194766DC938C332469AC698AD0D9E (AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::op_Equality(UnityEngine.Playables.PlayableHandle,UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_op_Equality_mBA774AE123AF794A1EB55148206CDD52DAFA42DF (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___x0, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___y1, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationClipPlayable::Equals(UnityEngine.Animations.AnimationClipPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationClipPlayable_Equals_m06BA3E1C3AE0CC205C8531CCF6596C99C8D927EE (AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 * __this, AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsValid()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059 (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationLayerMixerPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_mC3942EB4B00EAC10035AA7EBE23CA679C8790D20 (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_mC3942EB4B00EAC10035AA7EBE23CA679C8790D20_gshared)(__this, method);
}
// System.Void System.InvalidCastException::.ctor(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812 (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * __this, String_t* ___message0, const RuntimeMethod* method);
// System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C (AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationLayerMixerPlayable_GetHandle_mD4159505D29B17D507599ED6FA3BEC1370691DB8 (AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationLayerMixerPlayable::Equals(UnityEngine.Animations.AnimationLayerMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationLayerMixerPlayable_Equals_m0A6A86FEDCE98E63B84BD01D0D362D03EA733E59 (AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * __this, AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 ___other0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Playables.PlayableHandle::get_Null()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1 (const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMixerPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_m172B8D6DA48AD49F0740833F7D18CD468B072E5E (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_m172B8D6DA48AD49F0740833F7D18CD468B072E5E_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43 (AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationMixerPlayable_GetHandle_mC5939239D7C47C6E0FF4EC72021EE793863BC567 (AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationMixerPlayable::Equals(UnityEngine.Animations.AnimationMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMixerPlayable_Equals_m7CB1B61B74A6BE00A35AD072490F07D4C7A17B0F (AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * __this, AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMotionXToDeltaPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_mCC63F3E0D55A21A9E56D80D26150AD2B78C6EC50 (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_mCC63F3E0D55A21A9E56D80D26150AD2B78C6EC50_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6 (AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationMotionXToDeltaPlayable_GetHandle_mE36F0671962333EAF5B434A062930D9E76A79076 (AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationMotionXToDeltaPlayable::Equals(UnityEngine.Animations.AnimationMotionXToDeltaPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMotionXToDeltaPlayable_Equals_m53B4AAB54D7F3633C3954056F8C334BB8B7D590E (AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * __this, AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationOffsetPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_mF434E44E279E1DBD0887921B38A5C57812B1371A (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_mF434E44E279E1DBD0887921B38A5C57812B1371A_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationOffsetPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607 (AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationOffsetPlayable_GetHandle_m5213878A6D7F29801F74CD3A8B866D444793665E (AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationOffsetPlayable::Equals(UnityEngine.Animations.AnimationOffsetPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationOffsetPlayable_Equals_m30B207FC6287EABF6FC1FDA47784322A3ABB98DF (AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * __this, AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationPosePlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_m35A103AAF8E80E7C007214546C71B4E90901C2A2 (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_m35A103AAF8E80E7C007214546C71B4E90901C2A2_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationPosePlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D (AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationPosePlayable_GetHandle_m9D856E83755A447ABCD6C0D8FE011AFF659A016E (AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationPosePlayable::Equals(UnityEngine.Animations.AnimationPosePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationPosePlayable_Equals_m4417430115DCF9B39D3E4B64424120CE7E555961 (AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * __this, AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationRemoveScalePlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_m1E16540EE6283270E3DE85D46C3BE1F8B85E73C2 (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_m1E16540EE6283270E3DE85D46C3BE1F8B85E73C2_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1 (AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationRemoveScalePlayable_GetHandle_mA5063F10E01C8546F88E9ABE07B71373BF290EED (AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationRemoveScalePlayable::Equals(UnityEngine.Animations.AnimationRemoveScalePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationRemoveScalePlayable_Equals_m58B139243E3B27CE86CA4CC470895BF719CD9BAD (AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * __this, AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationScriptPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_m1767ADED196AAA8B4D6FBB9313003E33A967E799 (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_m1767ADED196AAA8B4D6FBB9313003E33A967E799_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationScriptPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412 (AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationScriptPlayable_GetHandle_m661730E4C17F10A8D3C46492A9AD1D61EF0F4315 (AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationScriptPlayable::Equals(UnityEngine.Animations.AnimationScriptPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationScriptPlayable_Equals_m4995D1AD353F43FE3FA854A8384601F58156E69E (AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * __this, AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E ___other0, const RuntimeMethod* method);
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::SetHandle(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__ctor_m739B1BFC592B6C160410141057F1B2BA1B971897 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimatorControllerPlayable_GetHandle_mB83731910E1534BECA36F64BA22AA68A71D08CA8 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, const RuntimeMethod* method);
// System.Void System.InvalidOperationException::.ctor(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void InvalidOperationException__ctor_m72027D5F1D513C25C05137E203EEED8FD8297706 (InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 * __this, String_t* ___message0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimatorControllerPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_mC6A8CB67F39B0B39BF77ED6177B3C2DF1BC91533 (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_mC6A8CB67F39B0B39BF77ED6177B3C2DF1BC91533_gshared)(__this, method);
}
// System.Boolean UnityEngine.Animations.AnimatorControllerPlayable::Equals(UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimatorControllerPlayable_Equals_m04685CCA5A5FC388A0387D3453A677C0CB47D173 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___other0, const RuntimeMethod* method);
// System.Single UnityEngine.Animator::GetFloatID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float Animator_GetFloatID_m651CA5557BCABC522FAC92CF89CFE39240E82BD8 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::SetFloatID(System.Int32,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetFloatID_mC8049D4DC5D19929FF51172902E35D496F9EB805 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, float ___value1, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animator::GetBoolID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Animator_GetBoolID_m69B15F09CC6076D1778A729FD2CF360C30666C1E (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::SetBoolString(System.String,System.Boolean)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetBoolString_mA61F1A44D13EF82A7C2CAF466EBA81E65D054D46 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, bool ___value1, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::SetBoolID(System.Int32,System.Boolean)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetBoolID_m03BC09B1F267F9B07FF9F8EDDBAA4D0AA8D61EF0 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, bool ___value1, const RuntimeMethod* method);
// System.Int32 UnityEngine.Animator::GetIntegerID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Animator_GetIntegerID_m7BE46FDFA31412B2F0F604989D1074381158ACF8 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::SetIntegerID(System.Int32,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetIntegerID_mF9CF13102019C3714F927B3827EEF4473C0AB5BA (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, int32_t ___value1, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::SetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerString_m77CE57996467D0C973FA2D0CB4DF87BD062C8A1E (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::SetTriggerID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerID_mD08597B567A91FC132350A343E69A084EC958040 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::ResetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTriggerString_m31B233F948D7551D220FEDA56B002E6724B89851 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::GetAnimatorStateInfo(System.Int32,UnityEngine.StateInfoIndex,UnityEngine.AnimatorStateInfo&)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_GetAnimatorStateInfo_mBDC199173734AF60218E4727E74F689180BC8D8B (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, int32_t ___stateInfoIndex1, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * ___info2, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::GetAnimatorTransitionInfo(System.Int32,UnityEngine.AnimatorTransitionInfo&)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_GetAnimatorTransitionInfo_m729E8495EC0CEC63E0968BDCFC92D72392589F48 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B * ___info1, const RuntimeMethod* method);
// System.Int32 UnityEngine.Animator::StringToHash(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Animator_StringToHash_m80E4CCCB84AAD032A5D84EF5832B7F35C1E5AE3F (String_t* ___name0, const RuntimeMethod* method);
// System.Boolean System.String::op_Equality(System.String,System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool String_op_Equality_m139F0E4195AE2F856019E63B241F36F016997FCE (String_t* ___a0, String_t* ___b1, const RuntimeMethod* method);
// System.String UnityEngine.AnimatorControllerParameter::get_name()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* AnimatorControllerParameter_get_name_mBC6037CF46E647026CF3AD51E76B4003A181EB60 (AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * __this, const RuntimeMethod* method);
// System.Void UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback::Invoke()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback_Invoke_m002CFC2CE3C42A058380BE98F015E654D5F9F177 (OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * __this, const RuntimeMethod* method);
// System.Int32 UnityEngine.AnimatorStateInfo::get_fullPathHash()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t AnimatorStateInfo_get_fullPathHash_m2865A5467A1201025DAD3E58E420D0870CDF90C2 (AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * __this, const RuntimeMethod* method);
// System.Single UnityEngine.AnimatorStateInfo::get_normalizedTime()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float AnimatorStateInfo_get_normalizedTime_m3AB6A2DB592BB9CA0B9A4EF8A382C4DF3F5F6BBD (AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * __this, const RuntimeMethod* method);
// System.Int32 UnityEngine.AnimatorTransitionInfo::get_fullPathHash()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t AnimatorTransitionInfo_get_fullPathHash_mCB00E82B499A9F4084FEFFE8757F352541EA055E (AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B * __this, const RuntimeMethod* method);
// System.Void UnityEngine.ScriptableObject::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ScriptableObject__ctor_m6E2B3821A4A361556FC12E9B1C71E1D5DC002C5B (ScriptableObject_tAB015486CEAB714DA0D5C1BA389B84FB90427734 * __this, const RuntimeMethod* method);
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Conversion methods for marshalling of: UnityEngine.AnimationEvent
IL2CPP_EXTERN_C void AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshal_pinvoke(const AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F& unmarshaled, AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_pinvoke& marshaled)
{
Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL);
}
IL2CPP_EXTERN_C void AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshal_pinvoke_back(const AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_pinvoke& marshaled, AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F& unmarshaled)
{
Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL);
}
// Conversion method for clean up from marshalling of: UnityEngine.AnimationEvent
IL2CPP_EXTERN_C void AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshal_pinvoke_cleanup(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_pinvoke& marshaled)
{
}
// Conversion methods for marshalling of: UnityEngine.AnimationEvent
IL2CPP_EXTERN_C void AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshal_com(const AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F& unmarshaled, AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_com& marshaled)
{
Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL);
}
IL2CPP_EXTERN_C void AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshal_com_back(const AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_com& marshaled, AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F& unmarshaled)
{
Exception_t* ___m_StateSender_8Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_StateSender' of type 'AnimationEvent': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___m_StateSender_8Exception, NULL);
}
// Conversion method for clean up from marshalling of: UnityEngine.AnimationEvent
IL2CPP_EXTERN_C void AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshal_com_cleanup(AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F_marshaled_com& marshaled)
{
}
// System.Void UnityEngine.AnimationEvent::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationEvent__ctor_m6C228EB716B6B53DE2665091C056428EFB90897F (AnimationEvent_tEDD4E45FEA5CA4657CBBF1E0CFF657191D90673F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationEvent__ctor_m6C228EB716B6B53DE2665091C056428EFB90897F_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0(__this, /*hidden argument*/NULL);
__this->set_m_Time_0((0.0f));
__this->set_m_FunctionName_1(_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709);
__this->set_m_StringParameter_2(_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709);
__this->set_m_ObjectReferenceParameter_3((Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL);
__this->set_m_FloatParameter_4((0.0f));
__this->set_m_IntParameter_5(0);
__this->set_m_MessageOptions_6(0);
__this->set_m_Source_7(0);
__this->set_m_StateSender_8((AnimationState_t48FF4D41FEF3492F8286100BE3758CE3A4656386 *)NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationClipPlayable_GetHandle_mB1B706B9ADB194766DC938C332469AC698AD0D9E (AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationClipPlayable_GetHandle_mB1B706B9ADB194766DC938C332469AC698AD0D9E_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 * _thisAdjusted = reinterpret_cast<AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 *>(__this + _offset);
return AnimationClipPlayable_GetHandle_mB1B706B9ADB194766DC938C332469AC698AD0D9E(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationClipPlayable::Equals(UnityEngine.Animations.AnimationClipPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationClipPlayable_Equals_m06BA3E1C3AE0CC205C8531CCF6596C99C8D927EE (AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 * __this, AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationClipPlayable_Equals_m06BA3E1C3AE0CC205C8531CCF6596C99C8D927EE_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationClipPlayable_GetHandle_mB1B706B9ADB194766DC938C332469AC698AD0D9E((AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 *)__this, /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = AnimationClipPlayable_GetHandle_mB1B706B9ADB194766DC938C332469AC698AD0D9E((AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
bool L_2 = PlayableHandle_op_Equality_mBA774AE123AF794A1EB55148206CDD52DAFA42DF(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_0016;
}
IL_0016:
{
bool L_3 = V_0;
return L_3;
}
}
IL2CPP_EXTERN_C bool AnimationClipPlayable_Equals_m06BA3E1C3AE0CC205C8531CCF6596C99C8D927EE_AdjustorThunk (RuntimeObject * __this, AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 * _thisAdjusted = reinterpret_cast<AnimationClipPlayable_t6EF38F9EED94096D4793638AFC8D11D285B43183 *>(__this + _offset);
return AnimationClipPlayable_Equals_m06BA3E1C3AE0CC205C8531CCF6596C99C8D927EE(_thisAdjusted, ___other0, method);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C (AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2 = PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_mC3942EB4B00EAC10035AA7EBE23CA679C8790D20((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_mC3942EB4B00EAC10035AA7EBE23CA679C8790D20_RuntimeMethod_var);
V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_1;
if (!L_3)
{
goto IL_0026;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_4 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_4, _stringLiteral6502516F734DD885173E353D47AAEB82BC7070A9, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C_RuntimeMethod_var);
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * _thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 *>(__this + _offset);
AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationLayerMixerPlayable_GetHandle_mD4159505D29B17D507599ED6FA3BEC1370691DB8 (AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationLayerMixerPlayable_GetHandle_mD4159505D29B17D507599ED6FA3BEC1370691DB8_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * _thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 *>(__this + _offset);
return AnimationLayerMixerPlayable_GetHandle_mD4159505D29B17D507599ED6FA3BEC1370691DB8(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationLayerMixerPlayable::Equals(UnityEngine.Animations.AnimationLayerMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationLayerMixerPlayable_Equals_m0A6A86FEDCE98E63B84BD01D0D362D03EA733E59 (AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * __this, AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationLayerMixerPlayable_Equals_m0A6A86FEDCE98E63B84BD01D0D362D03EA733E59_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationLayerMixerPlayable_GetHandle_mD4159505D29B17D507599ED6FA3BEC1370691DB8((AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 *)__this, /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = AnimationLayerMixerPlayable_GetHandle_mD4159505D29B17D507599ED6FA3BEC1370691DB8((AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
bool L_2 = PlayableHandle_op_Equality_mBA774AE123AF794A1EB55148206CDD52DAFA42DF(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_0016;
}
IL_0016:
{
bool L_3 = V_0;
return L_3;
}
}
IL2CPP_EXTERN_C bool AnimationLayerMixerPlayable_Equals_m0A6A86FEDCE98E63B84BD01D0D362D03EA733E59_AdjustorThunk (RuntimeObject * __this, AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 * _thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 *>(__this + _offset);
return AnimationLayerMixerPlayable_Equals_m0A6A86FEDCE98E63B84BD01D0D362D03EA733E59(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__cctor_m3712A5D44F275E70624C0D734C9CED9BD12D0AC9 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationLayerMixerPlayable__cctor_m3712A5D44F275E70624C0D734C9CED9BD12D0AC9_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationLayerMixerPlayable__ctor_mA2156DFDEA435F14446528098837ED3FF6B7147C((&L_1), L_0, /*hidden argument*/NULL);
((AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_StaticFields*)il2cpp_codegen_static_fields_for(AnimationLayerMixerPlayable_t699CCDE32ABD6FC79BFC09064E473D785D9F9371_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimationMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43 (AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2 = PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_m172B8D6DA48AD49F0740833F7D18CD468B072E5E((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_m172B8D6DA48AD49F0740833F7D18CD468B072E5E_RuntimeMethod_var);
V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_1;
if (!L_3)
{
goto IL_0026;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_4 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_4, _stringLiteral35482DF98E7DEED2FC6BDE9BDD1E273E27CF1F2C, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43_RuntimeMethod_var);
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * _thisAdjusted = reinterpret_cast<AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A *>(__this + _offset);
AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationMixerPlayable_GetHandle_mC5939239D7C47C6E0FF4EC72021EE793863BC567 (AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationMixerPlayable_GetHandle_mC5939239D7C47C6E0FF4EC72021EE793863BC567_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * _thisAdjusted = reinterpret_cast<AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A *>(__this + _offset);
return AnimationMixerPlayable_GetHandle_mC5939239D7C47C6E0FF4EC72021EE793863BC567(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationMixerPlayable::Equals(UnityEngine.Animations.AnimationMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMixerPlayable_Equals_m7CB1B61B74A6BE00A35AD072490F07D4C7A17B0F (AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * __this, AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationMixerPlayable_Equals_m7CB1B61B74A6BE00A35AD072490F07D4C7A17B0F_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationMixerPlayable_GetHandle_mC5939239D7C47C6E0FF4EC72021EE793863BC567((AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A *)__this, /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = AnimationMixerPlayable_GetHandle_mC5939239D7C47C6E0FF4EC72021EE793863BC567((AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
bool L_2 = PlayableHandle_op_Equality_mBA774AE123AF794A1EB55148206CDD52DAFA42DF(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_0016;
}
IL_0016:
{
bool L_3 = V_0;
return L_3;
}
}
IL2CPP_EXTERN_C bool AnimationMixerPlayable_Equals_m7CB1B61B74A6BE00A35AD072490F07D4C7A17B0F_AdjustorThunk (RuntimeObject * __this, AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A * _thisAdjusted = reinterpret_cast<AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A *>(__this + _offset);
return AnimationMixerPlayable_Equals_m7CB1B61B74A6BE00A35AD072490F07D4C7A17B0F(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimationMixerPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__cctor_m820F56C1D4257D4F5446BD66402D4428E0DF8E3E (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationMixerPlayable__cctor_m820F56C1D4257D4F5446BD66402D4428E0DF8E3E_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationMixerPlayable__ctor_mD446E3257F803A3D4C04D394A75AA5376533CF43((&L_1), L_0, /*hidden argument*/NULL);
((AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_StaticFields*)il2cpp_codegen_static_fields_for(AnimationMixerPlayable_tA71C834654979CF92B034B537EE5A3DA9713030A_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6 (AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2 = PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_mCC63F3E0D55A21A9E56D80D26150AD2B78C6EC50((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_mCC63F3E0D55A21A9E56D80D26150AD2B78C6EC50_RuntimeMethod_var);
V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_1;
if (!L_3)
{
goto IL_0026;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_4 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_4, _stringLiteral59BDBA16999CF4EF3F7712740907B2C5E860459C, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6_RuntimeMethod_var);
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * _thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC *>(__this + _offset);
AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationMotionXToDeltaPlayable_GetHandle_mE36F0671962333EAF5B434A062930D9E76A79076 (AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationMotionXToDeltaPlayable_GetHandle_mE36F0671962333EAF5B434A062930D9E76A79076_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * _thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC *>(__this + _offset);
return AnimationMotionXToDeltaPlayable_GetHandle_mE36F0671962333EAF5B434A062930D9E76A79076(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationMotionXToDeltaPlayable::Equals(UnityEngine.Animations.AnimationMotionXToDeltaPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMotionXToDeltaPlayable_Equals_m53B4AAB54D7F3633C3954056F8C334BB8B7D590E (AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * __this, AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationMotionXToDeltaPlayable_Equals_m53B4AAB54D7F3633C3954056F8C334BB8B7D590E_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationMotionXToDeltaPlayable_GetHandle_mE36F0671962333EAF5B434A062930D9E76A79076((AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC *)__this, /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = AnimationMotionXToDeltaPlayable_GetHandle_mE36F0671962333EAF5B434A062930D9E76A79076((AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
bool L_2 = PlayableHandle_op_Equality_mBA774AE123AF794A1EB55148206CDD52DAFA42DF(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_0016;
}
IL_0016:
{
bool L_3 = V_0;
return L_3;
}
}
IL2CPP_EXTERN_C bool AnimationMotionXToDeltaPlayable_Equals_m53B4AAB54D7F3633C3954056F8C334BB8B7D590E_AdjustorThunk (RuntimeObject * __this, AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC * _thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC *>(__this + _offset);
return AnimationMotionXToDeltaPlayable_Equals_m53B4AAB54D7F3633C3954056F8C334BB8B7D590E(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__cctor_mCB948CE31E0AAEC53CB1D6746D091604413C5EEE (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationMotionXToDeltaPlayable__cctor_mCB948CE31E0AAEC53CB1D6746D091604413C5EEE_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationMotionXToDeltaPlayable__ctor_mC51D5F76DD0CE29B305932303A4A5AA42ACCD9E6((&L_1), L_0, /*hidden argument*/NULL);
((AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_StaticFields*)il2cpp_codegen_static_fields_for(AnimationMotionXToDeltaPlayable_tA5F0BE3BA966E1A6661311F185C1544F90302CDC_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimationOffsetPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607 (AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2 = PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_mF434E44E279E1DBD0887921B38A5C57812B1371A((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_mF434E44E279E1DBD0887921B38A5C57812B1371A_RuntimeMethod_var);
V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_1;
if (!L_3)
{
goto IL_0026;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_4 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_4, _stringLiteral04E4E32AA834F9BA9336C5388E9470F196EB0891, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607_RuntimeMethod_var);
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * _thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E *>(__this + _offset);
AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationOffsetPlayable_GetHandle_m5213878A6D7F29801F74CD3A8B866D444793665E (AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationOffsetPlayable_GetHandle_m5213878A6D7F29801F74CD3A8B866D444793665E_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * _thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E *>(__this + _offset);
return AnimationOffsetPlayable_GetHandle_m5213878A6D7F29801F74CD3A8B866D444793665E(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationOffsetPlayable::Equals(UnityEngine.Animations.AnimationOffsetPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationOffsetPlayable_Equals_m30B207FC6287EABF6FC1FDA47784322A3ABB98DF (AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * __this, AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationOffsetPlayable_Equals_m30B207FC6287EABF6FC1FDA47784322A3ABB98DF_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationOffsetPlayable_GetHandle_m5213878A6D7F29801F74CD3A8B866D444793665E((AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E *)(&___other0), /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = L_0;
RuntimeObject * L_2 = Box(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var, &L_1);
RuntimeObject * L_3 = Box(AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_il2cpp_TypeInfo_var, __this);
NullCheck(L_3);
bool L_4 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2);
*__this = *(AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E *)UnBox(L_3);
V_0 = L_4;
goto IL_001c;
}
IL_001c:
{
bool L_5 = V_0;
return L_5;
}
}
IL2CPP_EXTERN_C bool AnimationOffsetPlayable_Equals_m30B207FC6287EABF6FC1FDA47784322A3ABB98DF_AdjustorThunk (RuntimeObject * __this, AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E * _thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E *>(__this + _offset);
return AnimationOffsetPlayable_Equals_m30B207FC6287EABF6FC1FDA47784322A3ABB98DF(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimationOffsetPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__cctor_m174AD41778526FA15E41C6A11303A4F190A4CEA6 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationOffsetPlayable__cctor_m174AD41778526FA15E41C6A11303A4F190A4CEA6_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationOffsetPlayable__ctor_m380B4761BE82E4684F82A18933DBBC79E3D5F607((&L_1), L_0, /*hidden argument*/NULL);
((AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_StaticFields*)il2cpp_codegen_static_fields_for(AnimationOffsetPlayable_t1534674D22C39D6ED74F24A108C3475C7301A93E_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimationPosePlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D (AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2 = PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_m35A103AAF8E80E7C007214546C71B4E90901C2A2((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_m35A103AAF8E80E7C007214546C71B4E90901C2A2_RuntimeMethod_var);
V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_1;
if (!L_3)
{
goto IL_0026;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_4 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_4, _stringLiteralFCF5307272E4A4426DDA9E4E6930E2B834B95B2C, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D_RuntimeMethod_var);
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * _thisAdjusted = reinterpret_cast<AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 *>(__this + _offset);
AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationPosePlayable_GetHandle_m9D856E83755A447ABCD6C0D8FE011AFF659A016E (AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationPosePlayable_GetHandle_m9D856E83755A447ABCD6C0D8FE011AFF659A016E_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * _thisAdjusted = reinterpret_cast<AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 *>(__this + _offset);
return AnimationPosePlayable_GetHandle_m9D856E83755A447ABCD6C0D8FE011AFF659A016E(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationPosePlayable::Equals(UnityEngine.Animations.AnimationPosePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationPosePlayable_Equals_m4417430115DCF9B39D3E4B64424120CE7E555961 (AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * __this, AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationPosePlayable_Equals_m4417430115DCF9B39D3E4B64424120CE7E555961_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationPosePlayable_GetHandle_m9D856E83755A447ABCD6C0D8FE011AFF659A016E((AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 *)(&___other0), /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = L_0;
RuntimeObject * L_2 = Box(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var, &L_1);
RuntimeObject * L_3 = Box(AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_il2cpp_TypeInfo_var, __this);
NullCheck(L_3);
bool L_4 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2);
*__this = *(AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 *)UnBox(L_3);
V_0 = L_4;
goto IL_001c;
}
IL_001c:
{
bool L_5 = V_0;
return L_5;
}
}
IL2CPP_EXTERN_C bool AnimationPosePlayable_Equals_m4417430115DCF9B39D3E4B64424120CE7E555961_AdjustorThunk (RuntimeObject * __this, AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 * _thisAdjusted = reinterpret_cast<AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 *>(__this + _offset);
return AnimationPosePlayable_Equals_m4417430115DCF9B39D3E4B64424120CE7E555961(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimationPosePlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__cctor_mDE42A26BC2624427AA8086C4AB69FB531949153F (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationPosePlayable__cctor_mDE42A26BC2624427AA8086C4AB69FB531949153F_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationPosePlayable__ctor_mF02468DCD2C8C0226C89C4DF90454DD9D230595D((&L_1), L_0, /*hidden argument*/NULL);
((AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_StaticFields*)il2cpp_codegen_static_fields_for(AnimationPosePlayable_t92EAB5BB4093D236F90ED0242488039EA87AFA07_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1 (AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2 = PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_m1E16540EE6283270E3DE85D46C3BE1F8B85E73C2((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_m1E16540EE6283270E3DE85D46C3BE1F8B85E73C2_RuntimeMethod_var);
V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_1;
if (!L_3)
{
goto IL_0026;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_4 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_4, _stringLiteralB9DF0CBB713EC6E9DFD70C9BFB0B820148433428, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1_RuntimeMethod_var);
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * _thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B *>(__this + _offset);
AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationRemoveScalePlayable_GetHandle_mA5063F10E01C8546F88E9ABE07B71373BF290EED (AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationRemoveScalePlayable_GetHandle_mA5063F10E01C8546F88E9ABE07B71373BF290EED_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * _thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B *>(__this + _offset);
return AnimationRemoveScalePlayable_GetHandle_mA5063F10E01C8546F88E9ABE07B71373BF290EED(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationRemoveScalePlayable::Equals(UnityEngine.Animations.AnimationRemoveScalePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationRemoveScalePlayable_Equals_m58B139243E3B27CE86CA4CC470895BF719CD9BAD (AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * __this, AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationRemoveScalePlayable_Equals_m58B139243E3B27CE86CA4CC470895BF719CD9BAD_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationRemoveScalePlayable_GetHandle_mA5063F10E01C8546F88E9ABE07B71373BF290EED((AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B *)(&___other0), /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = L_0;
RuntimeObject * L_2 = Box(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var, &L_1);
RuntimeObject * L_3 = Box(AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_il2cpp_TypeInfo_var, __this);
NullCheck(L_3);
bool L_4 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2);
*__this = *(AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B *)UnBox(L_3);
V_0 = L_4;
goto IL_001c;
}
IL_001c:
{
bool L_5 = V_0;
return L_5;
}
}
IL2CPP_EXTERN_C bool AnimationRemoveScalePlayable_Equals_m58B139243E3B27CE86CA4CC470895BF719CD9BAD_AdjustorThunk (RuntimeObject * __this, AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B * _thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B *>(__this + _offset);
return AnimationRemoveScalePlayable_Equals_m58B139243E3B27CE86CA4CC470895BF719CD9BAD(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__cctor_m7BA13559FDA2BF8E061839B333085C402DED6829 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationRemoveScalePlayable__cctor_m7BA13559FDA2BF8E061839B333085C402DED6829_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationRemoveScalePlayable__ctor_mB06216973E6B635E7F4A3C8E372E5F7E89D327E1((&L_1), L_0, /*hidden argument*/NULL);
((AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_StaticFields*)il2cpp_codegen_static_fields_for(AnimationRemoveScalePlayable_t02381EE856ADF73C82C1EA6D2AD1878EC5879A7B_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimationScriptPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412 (AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2 = PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_m1767ADED196AAA8B4D6FBB9313003E33A967E799((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_m1767ADED196AAA8B4D6FBB9313003E33A967E799_RuntimeMethod_var);
V_1 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_1;
if (!L_3)
{
goto IL_0026;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_4 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_4, _stringLiteral4518459D262696CF9B5DAB1E0A1BC3AC2F9BD9DF, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412_RuntimeMethod_var);
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * _thisAdjusted = reinterpret_cast<AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E *>(__this + _offset);
AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationScriptPlayable_GetHandle_m661730E4C17F10A8D3C46492A9AD1D61EF0F4315 (AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimationScriptPlayable_GetHandle_m661730E4C17F10A8D3C46492A9AD1D61EF0F4315_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * _thisAdjusted = reinterpret_cast<AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E *>(__this + _offset);
return AnimationScriptPlayable_GetHandle_m661730E4C17F10A8D3C46492A9AD1D61EF0F4315(_thisAdjusted, method);
}
// System.Boolean UnityEngine.Animations.AnimationScriptPlayable::Equals(UnityEngine.Animations.AnimationScriptPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationScriptPlayable_Equals_m4995D1AD353F43FE3FA854A8384601F58156E69E (AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * __this, AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationScriptPlayable_Equals_m4995D1AD353F43FE3FA854A8384601F58156E69E_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimationScriptPlayable_GetHandle_m661730E4C17F10A8D3C46492A9AD1D61EF0F4315((AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E *)__this, /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = AnimationScriptPlayable_GetHandle_m661730E4C17F10A8D3C46492A9AD1D61EF0F4315((AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
bool L_2 = PlayableHandle_op_Equality_mBA774AE123AF794A1EB55148206CDD52DAFA42DF(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_0016;
}
IL_0016:
{
bool L_3 = V_0;
return L_3;
}
}
IL2CPP_EXTERN_C bool AnimationScriptPlayable_Equals_m4995D1AD353F43FE3FA854A8384601F58156E69E_AdjustorThunk (RuntimeObject * __this, AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E * _thisAdjusted = reinterpret_cast<AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E *>(__this + _offset);
return AnimationScriptPlayable_Equals_m4995D1AD353F43FE3FA854A8384601F58156E69E(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimationScriptPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__cctor_m3FA9E1E2E1EADACBC718598BEFECB25F867E454E (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimationScriptPlayable__cctor_m3FA9E1E2E1EADACBC718598BEFECB25F867E454E_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationScriptPlayable__ctor_mDA5EA55852F0A1079954B2DCB90398C4D7FFC412((&L_1), L_0, /*hidden argument*/NULL);
((AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_StaticFields*)il2cpp_codegen_static_fields_for(AnimationScriptPlayable_t1EDF8E51A9ED180BB012656916323FA4F68CA27E_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__ctor_m739B1BFC592B6C160410141057F1B2BA1B971897 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimatorControllerPlayable__ctor_m739B1BFC592B6C160410141057F1B2BA1B971897_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
__this->set_m_Handle_0(L_0);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = ___handle0;
AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96((AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B *)__this, L_1, /*hidden argument*/NULL);
return;
}
}
IL2CPP_EXTERN_C void AnimatorControllerPlayable__ctor_m739B1BFC592B6C160410141057F1B2BA1B971897_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B *>(__this + _offset);
AnimatorControllerPlayable__ctor_m739B1BFC592B6C160410141057F1B2BA1B971897(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimatorControllerPlayable_GetHandle_mB83731910E1534BECA36F64BA22AA68A71D08CA8 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, const RuntimeMethod* method)
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 AnimatorControllerPlayable_GetHandle_mB83731910E1534BECA36F64BA22AA68A71D08CA8_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B *>(__this + _offset);
return AnimatorControllerPlayable_GetHandle_mB83731910E1534BECA36F64BA22AA68A71D08CA8(_thisAdjusted, method);
}
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::SetHandle(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
bool V_2 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 * L_0 = __this->get_address_of_m_Handle_0();
bool L_1 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)L_0, /*hidden argument*/NULL);
V_0 = L_1;
bool L_2 = V_0;
if (!L_2)
{
goto IL_001b;
}
}
{
InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 * L_3 = (InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1 *)il2cpp_codegen_object_new(InvalidOperationException_t0530E734D823F78310CAFAFA424CA5164D93A1F1_il2cpp_TypeInfo_var);
InvalidOperationException__ctor_m72027D5F1D513C25C05137E203EEED8FD8297706(L_3, _stringLiteral7E3996230D9AF0349B43FF7B536FC25AF0C19C71, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96_RuntimeMethod_var);
}
IL_001b:
{
bool L_4 = PlayableHandle_IsValid_mDA0A998EA6E2442C5F3B6CDFAF07EBA9A6873059((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/NULL);
V_1 = L_4;
bool L_5 = V_1;
if (!L_5)
{
goto IL_0041;
}
}
{
bool L_6 = PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_mC6A8CB67F39B0B39BF77ED6177B3C2DF1BC91533((PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_mC6A8CB67F39B0B39BF77ED6177B3C2DF1BC91533_RuntimeMethod_var);
V_2 = (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0);
bool L_7 = V_2;
if (!L_7)
{
goto IL_0040;
}
}
{
InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA * L_8 = (InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA *)il2cpp_codegen_object_new(InvalidCastException_t91DF9E7D7FCCDA6C562CB4A9A18903E016680FDA_il2cpp_TypeInfo_var);
InvalidCastException__ctor_m3795145150387C6C362DA693613505C604AB8812(L_8, _stringLiteralB47C26932C83DD7E0C54FC87EDDE2F3B50E5104C, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_8, AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96_RuntimeMethod_var);
}
IL_0040:
{
}
IL_0041:
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_9 = ___handle0;
__this->set_m_Handle_0(L_9);
return;
}
}
IL2CPP_EXTERN_C void AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 ___handle0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B *>(__this + _offset);
AnimatorControllerPlayable_SetHandle_m2CAE8DABC4B19AB6BD90249D0D7FC7A9E07C3A96(_thisAdjusted, ___handle0, method);
}
// System.Boolean UnityEngine.Animations.AnimatorControllerPlayable::Equals(UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimatorControllerPlayable_Equals_m04685CCA5A5FC388A0387D3453A677C0CB47D173 (AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * __this, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimatorControllerPlayable_Equals_m04685CCA5A5FC388A0387D3453A677C0CB47D173_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = AnimatorControllerPlayable_GetHandle_mB83731910E1534BECA36F64BA22AA68A71D08CA8((AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B *)__this, /*hidden argument*/NULL);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_1 = AnimatorControllerPlayable_GetHandle_mB83731910E1534BECA36F64BA22AA68A71D08CA8((AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
bool L_2 = PlayableHandle_op_Equality_mBA774AE123AF794A1EB55148206CDD52DAFA42DF(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_0016;
}
IL_0016:
{
bool L_3 = V_0;
return L_3;
}
}
IL2CPP_EXTERN_C bool AnimatorControllerPlayable_Equals_m04685CCA5A5FC388A0387D3453A677C0CB47D173_AdjustorThunk (RuntimeObject * __this, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___other0, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B * _thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B *>(__this + _offset);
return AnimatorControllerPlayable_Equals_m04685CCA5A5FC388A0387D3453A677C0CB47D173(_thisAdjusted, ___other0, method);
}
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__cctor_m6FCC197F3BF33EAFC37D5217617FCDC64E8B304E (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimatorControllerPlayable__cctor_m6FCC197F3BF33EAFC37D5217617FCDC64E8B304E_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182_il2cpp_TypeInfo_var);
PlayableHandle_t9D3B4E540D4413CED81DDD6A24C5373BEFA1D182 L_0 = PlayableHandle_get_Null_m09DE585EF795EFA2811950173C80F4FA24CBAAD1(/*hidden argument*/NULL);
AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B L_1;
memset((&L_1), 0, sizeof(L_1));
AnimatorControllerPlayable__ctor_m739B1BFC592B6C160410141057F1B2BA1B971897((&L_1), L_0, /*hidden argument*/NULL);
((AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_StaticFields*)il2cpp_codegen_static_fields_for(AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B_il2cpp_TypeInfo_var))->set_m_NullPlayable_1(L_1);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Single UnityEngine.Animator::GetFloat(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float Animator_GetFloat_mD81DFC8E86940E023CF5512DC8E7003A5FF63260 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
float V_0 = 0.0f;
{
int32_t L_0 = ___id0;
float L_1 = Animator_GetFloatID_m651CA5557BCABC522FAC92CF89CFE39240E82BD8(__this, L_0, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_000b;
}
IL_000b:
{
float L_2 = V_0;
return L_2;
}
}
// System.Void UnityEngine.Animator::SetFloat(System.Int32,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetFloat_mF9C412D31B389EC3305BB8FC299A09AA95A8A415 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, float ___value1, const RuntimeMethod* method)
{
{
int32_t L_0 = ___id0;
float L_1 = ___value1;
Animator_SetFloatID_mC8049D4DC5D19929FF51172902E35D496F9EB805(__this, L_0, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Boolean UnityEngine.Animator::GetBool(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Animator_GetBool_m3EF049B6FDEE9452A1F23A4B0710B49F43342A66 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
bool V_0 = false;
{
int32_t L_0 = ___id0;
bool L_1 = Animator_GetBoolID_m69B15F09CC6076D1778A729FD2CF360C30666C1E(__this, L_0, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_000b;
}
IL_000b:
{
bool L_2 = V_0;
return L_2;
}
}
// System.Void UnityEngine.Animator::SetBool(System.String,System.Boolean)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetBool_m497805BA217139E42808899782FA05C15BC9879E (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, bool ___value1, const RuntimeMethod* method)
{
{
String_t* L_0 = ___name0;
bool L_1 = ___value1;
Animator_SetBoolString_mA61F1A44D13EF82A7C2CAF466EBA81E65D054D46(__this, L_0, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void UnityEngine.Animator::SetBool(System.Int32,System.Boolean)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetBool_m706B7DB1DAED4AE10ECD1BF6876FB0B524082A10 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, bool ___value1, const RuntimeMethod* method)
{
{
int32_t L_0 = ___id0;
bool L_1 = ___value1;
Animator_SetBoolID_m03BC09B1F267F9B07FF9F8EDDBAA4D0AA8D61EF0(__this, L_0, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Int32 UnityEngine.Animator::GetInteger(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Animator_GetInteger_m1DDF7A3E992C16F0DB2FF02BF37A280181BE90BC (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = ___id0;
int32_t L_1 = Animator_GetIntegerID_m7BE46FDFA31412B2F0F604989D1074381158ACF8(__this, L_0, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_000b;
}
IL_000b:
{
int32_t L_2 = V_0;
return L_2;
}
}
// System.Void UnityEngine.Animator::SetInteger(System.Int32,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetInteger_m89D0F15197F3B4D75E02194B432685F68F458B70 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, int32_t ___value1, const RuntimeMethod* method)
{
{
int32_t L_0 = ___id0;
int32_t L_1 = ___value1;
Animator_SetIntegerID_mF9CF13102019C3714F927B3827EEF4473C0AB5BA(__this, L_0, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void UnityEngine.Animator::SetTrigger(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTrigger_m68D29B7FA54C2F230F5AD780D462612B18E74245 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, const RuntimeMethod* method)
{
{
String_t* L_0 = ___name0;
Animator_SetTriggerString_m77CE57996467D0C973FA2D0CB4DF87BD062C8A1E(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Void UnityEngine.Animator::SetTrigger(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTrigger_m2ED217B225743B9C9EB3E7B0B8905FFEEB221002 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
{
int32_t L_0 = ___id0;
Animator_SetTriggerID_mD08597B567A91FC132350A343E69A084EC958040(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Void UnityEngine.Animator::ResetTrigger(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTrigger_m70120C9A00EA482BF0880D2C02EC814CE3D71FD1 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, const RuntimeMethod* method)
{
{
String_t* L_0 = ___name0;
Animator_ResetTriggerString_m31B233F948D7551D220FEDA56B002E6724B89851(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Void UnityEngine.Animator::GetAnimatorStateInfo(System.Int32,UnityEngine.StateInfoIndex,UnityEngine.AnimatorStateInfo&)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_GetAnimatorStateInfo_mBDC199173734AF60218E4727E74F689180BC8D8B (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, int32_t ___stateInfoIndex1, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * ___info2, const RuntimeMethod* method)
{
typedef void (*Animator_GetAnimatorStateInfo_mBDC199173734AF60218E4727E74F689180BC8D8B_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t, int32_t, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 *);
static Animator_GetAnimatorStateInfo_mBDC199173734AF60218E4727E74F689180BC8D8B_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_GetAnimatorStateInfo_mBDC199173734AF60218E4727E74F689180BC8D8B_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::GetAnimatorStateInfo(System.Int32,UnityEngine.StateInfoIndex,UnityEngine.AnimatorStateInfo&)");
_il2cpp_icall_func(__this, ___layerIndex0, ___stateInfoIndex1, ___info2);
}
// UnityEngine.AnimatorStateInfo UnityEngine.Animator::GetCurrentAnimatorStateInfo(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 Animator_GetCurrentAnimatorStateInfo_mBE5ED0D60A6F5CD0EDD40AF1494098D4E7BF84F2 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, const RuntimeMethod* method)
{
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 V_0;
memset((&V_0), 0, sizeof(V_0));
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 V_1;
memset((&V_1), 0, sizeof(V_1));
{
int32_t L_0 = ___layerIndex0;
Animator_GetAnimatorStateInfo_mBDC199173734AF60218E4727E74F689180BC8D8B(__this, L_0, 0, (AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 *)(&V_0), /*hidden argument*/NULL);
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 L_1 = V_0;
V_1 = L_1;
goto IL_0010;
}
IL_0010:
{
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 L_2 = V_1;
return L_2;
}
}
// UnityEngine.AnimatorStateInfo UnityEngine.Animator::GetNextAnimatorStateInfo(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 Animator_GetNextAnimatorStateInfo_m66A6A93E12C1AB63FDB255483B66A57A0E2D527D (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, const RuntimeMethod* method)
{
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 V_0;
memset((&V_0), 0, sizeof(V_0));
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 V_1;
memset((&V_1), 0, sizeof(V_1));
{
int32_t L_0 = ___layerIndex0;
Animator_GetAnimatorStateInfo_mBDC199173734AF60218E4727E74F689180BC8D8B(__this, L_0, 1, (AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 *)(&V_0), /*hidden argument*/NULL);
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 L_1 = V_0;
V_1 = L_1;
goto IL_0010;
}
IL_0010:
{
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 L_2 = V_1;
return L_2;
}
}
// System.Void UnityEngine.Animator::GetAnimatorTransitionInfo(System.Int32,UnityEngine.AnimatorTransitionInfo&)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_GetAnimatorTransitionInfo_m729E8495EC0CEC63E0968BDCFC92D72392589F48 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B * ___info1, const RuntimeMethod* method)
{
typedef void (*Animator_GetAnimatorTransitionInfo_m729E8495EC0CEC63E0968BDCFC92D72392589F48_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t, AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B *);
static Animator_GetAnimatorTransitionInfo_m729E8495EC0CEC63E0968BDCFC92D72392589F48_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_GetAnimatorTransitionInfo_m729E8495EC0CEC63E0968BDCFC92D72392589F48_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::GetAnimatorTransitionInfo(System.Int32,UnityEngine.AnimatorTransitionInfo&)");
_il2cpp_icall_func(__this, ___layerIndex0, ___info1);
}
// UnityEngine.AnimatorTransitionInfo UnityEngine.Animator::GetAnimatorTransitionInfo(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B Animator_GetAnimatorTransitionInfo_mF4E216230B82075A0F27113CFD86AFC6290DE941 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, const RuntimeMethod* method)
{
AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B V_0;
memset((&V_0), 0, sizeof(V_0));
AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B V_1;
memset((&V_1), 0, sizeof(V_1));
{
int32_t L_0 = ___layerIndex0;
Animator_GetAnimatorTransitionInfo_m729E8495EC0CEC63E0968BDCFC92D72392589F48(__this, L_0, (AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B *)(&V_0), /*hidden argument*/NULL);
AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B L_1 = V_0;
V_1 = L_1;
goto IL_000f;
}
IL_000f:
{
AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B L_2 = V_1;
return L_2;
}
}
// System.Boolean UnityEngine.Animator::IsInTransition(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Animator_IsInTransition_m03E4399EA4D614A08F61AD5295CDFE5E4B43798C (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___layerIndex0, const RuntimeMethod* method)
{
typedef bool (*Animator_IsInTransition_m03E4399EA4D614A08F61AD5295CDFE5E4B43798C_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t);
static Animator_IsInTransition_m03E4399EA4D614A08F61AD5295CDFE5E4B43798C_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_IsInTransition_m03E4399EA4D614A08F61AD5295CDFE5E4B43798C_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::IsInTransition(System.Int32)");
bool retVal = _il2cpp_icall_func(__this, ___layerIndex0);
return retVal;
}
// UnityEngine.AnimatorControllerParameter[] UnityEngine.Animator::get_parameters()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR AnimatorControllerParameterU5BU5D_t7B886A2A1648ECF218447ED1DE8D241652F863FD* Animator_get_parameters_m1BD5F40B26D17498C0DD24E7720A2788953542FA (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, const RuntimeMethod* method)
{
typedef AnimatorControllerParameterU5BU5D_t7B886A2A1648ECF218447ED1DE8D241652F863FD* (*Animator_get_parameters_m1BD5F40B26D17498C0DD24E7720A2788953542FA_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *);
static Animator_get_parameters_m1BD5F40B26D17498C0DD24E7720A2788953542FA_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_get_parameters_m1BD5F40B26D17498C0DD24E7720A2788953542FA_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::get_parameters()");
AnimatorControllerParameterU5BU5D_t7B886A2A1648ECF218447ED1DE8D241652F863FD* retVal = _il2cpp_icall_func(__this);
return retVal;
}
// System.Void UnityEngine.Animator::Play(System.Int32,System.Int32,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_Play_m20B525F785DA59888E645125DB2DDC071E924F3E (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___stateNameHash0, int32_t ___layer1, float ___normalizedTime2, const RuntimeMethod* method)
{
typedef void (*Animator_Play_m20B525F785DA59888E645125DB2DDC071E924F3E_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t, int32_t, float);
static Animator_Play_m20B525F785DA59888E645125DB2DDC071E924F3E_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_Play_m20B525F785DA59888E645125DB2DDC071E924F3E_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::Play(System.Int32,System.Int32,System.Single)");
_il2cpp_icall_func(__this, ___stateNameHash0, ___layer1, ___normalizedTime2);
}
// System.Boolean UnityEngine.Animator::get_hasBoundPlayables()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Animator_get_hasBoundPlayables_m283AF0BA9B841E3FD1ADC5541C41B936A9D1EB05 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, const RuntimeMethod* method)
{
typedef bool (*Animator_get_hasBoundPlayables_m283AF0BA9B841E3FD1ADC5541C41B936A9D1EB05_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *);
static Animator_get_hasBoundPlayables_m283AF0BA9B841E3FD1ADC5541C41B936A9D1EB05_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_get_hasBoundPlayables_m283AF0BA9B841E3FD1ADC5541C41B936A9D1EB05_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::get_hasBoundPlayables()");
bool retVal = _il2cpp_icall_func(__this);
return retVal;
}
// System.Int32 UnityEngine.Animator::StringToHash(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Animator_StringToHash_m80E4CCCB84AAD032A5D84EF5832B7F35C1E5AE3F (String_t* ___name0, const RuntimeMethod* method)
{
typedef int32_t (*Animator_StringToHash_m80E4CCCB84AAD032A5D84EF5832B7F35C1E5AE3F_ftn) (String_t*);
static Animator_StringToHash_m80E4CCCB84AAD032A5D84EF5832B7F35C1E5AE3F_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_StringToHash_m80E4CCCB84AAD032A5D84EF5832B7F35C1E5AE3F_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::StringToHash(System.String)");
int32_t retVal = _il2cpp_icall_func(___name0);
return retVal;
}
// System.Void UnityEngine.Animator::SetFloatID(System.Int32,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetFloatID_mC8049D4DC5D19929FF51172902E35D496F9EB805 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, float ___value1, const RuntimeMethod* method)
{
typedef void (*Animator_SetFloatID_mC8049D4DC5D19929FF51172902E35D496F9EB805_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t, float);
static Animator_SetFloatID_mC8049D4DC5D19929FF51172902E35D496F9EB805_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_SetFloatID_mC8049D4DC5D19929FF51172902E35D496F9EB805_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetFloatID(System.Int32,System.Single)");
_il2cpp_icall_func(__this, ___id0, ___value1);
}
// System.Single UnityEngine.Animator::GetFloatID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float Animator_GetFloatID_m651CA5557BCABC522FAC92CF89CFE39240E82BD8 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
typedef float (*Animator_GetFloatID_m651CA5557BCABC522FAC92CF89CFE39240E82BD8_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t);
static Animator_GetFloatID_m651CA5557BCABC522FAC92CF89CFE39240E82BD8_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_GetFloatID_m651CA5557BCABC522FAC92CF89CFE39240E82BD8_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::GetFloatID(System.Int32)");
float retVal = _il2cpp_icall_func(__this, ___id0);
return retVal;
}
// System.Void UnityEngine.Animator::SetBoolString(System.String,System.Boolean)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetBoolString_mA61F1A44D13EF82A7C2CAF466EBA81E65D054D46 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, bool ___value1, const RuntimeMethod* method)
{
typedef void (*Animator_SetBoolString_mA61F1A44D13EF82A7C2CAF466EBA81E65D054D46_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, String_t*, bool);
static Animator_SetBoolString_mA61F1A44D13EF82A7C2CAF466EBA81E65D054D46_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_SetBoolString_mA61F1A44D13EF82A7C2CAF466EBA81E65D054D46_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetBoolString(System.String,System.Boolean)");
_il2cpp_icall_func(__this, ___name0, ___value1);
}
// System.Void UnityEngine.Animator::SetBoolID(System.Int32,System.Boolean)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetBoolID_m03BC09B1F267F9B07FF9F8EDDBAA4D0AA8D61EF0 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, bool ___value1, const RuntimeMethod* method)
{
typedef void (*Animator_SetBoolID_m03BC09B1F267F9B07FF9F8EDDBAA4D0AA8D61EF0_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t, bool);
static Animator_SetBoolID_m03BC09B1F267F9B07FF9F8EDDBAA4D0AA8D61EF0_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_SetBoolID_m03BC09B1F267F9B07FF9F8EDDBAA4D0AA8D61EF0_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetBoolID(System.Int32,System.Boolean)");
_il2cpp_icall_func(__this, ___id0, ___value1);
}
// System.Boolean UnityEngine.Animator::GetBoolID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Animator_GetBoolID_m69B15F09CC6076D1778A729FD2CF360C30666C1E (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
typedef bool (*Animator_GetBoolID_m69B15F09CC6076D1778A729FD2CF360C30666C1E_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t);
static Animator_GetBoolID_m69B15F09CC6076D1778A729FD2CF360C30666C1E_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_GetBoolID_m69B15F09CC6076D1778A729FD2CF360C30666C1E_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::GetBoolID(System.Int32)");
bool retVal = _il2cpp_icall_func(__this, ___id0);
return retVal;
}
// System.Void UnityEngine.Animator::SetIntegerID(System.Int32,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetIntegerID_mF9CF13102019C3714F927B3827EEF4473C0AB5BA (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, int32_t ___value1, const RuntimeMethod* method)
{
typedef void (*Animator_SetIntegerID_mF9CF13102019C3714F927B3827EEF4473C0AB5BA_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t, int32_t);
static Animator_SetIntegerID_mF9CF13102019C3714F927B3827EEF4473C0AB5BA_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_SetIntegerID_mF9CF13102019C3714F927B3827EEF4473C0AB5BA_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetIntegerID(System.Int32,System.Int32)");
_il2cpp_icall_func(__this, ___id0, ___value1);
}
// System.Int32 UnityEngine.Animator::GetIntegerID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Animator_GetIntegerID_m7BE46FDFA31412B2F0F604989D1074381158ACF8 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
typedef int32_t (*Animator_GetIntegerID_m7BE46FDFA31412B2F0F604989D1074381158ACF8_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t);
static Animator_GetIntegerID_m7BE46FDFA31412B2F0F604989D1074381158ACF8_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_GetIntegerID_m7BE46FDFA31412B2F0F604989D1074381158ACF8_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::GetIntegerID(System.Int32)");
int32_t retVal = _il2cpp_icall_func(__this, ___id0);
return retVal;
}
// System.Void UnityEngine.Animator::SetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerString_m77CE57996467D0C973FA2D0CB4DF87BD062C8A1E (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, const RuntimeMethod* method)
{
typedef void (*Animator_SetTriggerString_m77CE57996467D0C973FA2D0CB4DF87BD062C8A1E_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, String_t*);
static Animator_SetTriggerString_m77CE57996467D0C973FA2D0CB4DF87BD062C8A1E_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_SetTriggerString_m77CE57996467D0C973FA2D0CB4DF87BD062C8A1E_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetTriggerString(System.String)");
_il2cpp_icall_func(__this, ___name0);
}
// System.Void UnityEngine.Animator::SetTriggerID(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerID_mD08597B567A91FC132350A343E69A084EC958040 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, int32_t ___id0, const RuntimeMethod* method)
{
typedef void (*Animator_SetTriggerID_mD08597B567A91FC132350A343E69A084EC958040_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, int32_t);
static Animator_SetTriggerID_mD08597B567A91FC132350A343E69A084EC958040_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_SetTriggerID_mD08597B567A91FC132350A343E69A084EC958040_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetTriggerID(System.Int32)");
_il2cpp_icall_func(__this, ___id0);
}
// System.Void UnityEngine.Animator::ResetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTriggerString_m31B233F948D7551D220FEDA56B002E6724B89851 (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * __this, String_t* ___name0, const RuntimeMethod* method)
{
typedef void (*Animator_ResetTriggerString_m31B233F948D7551D220FEDA56B002E6724B89851_ftn) (Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A *, String_t*);
static Animator_ResetTriggerString_m31B233F948D7551D220FEDA56B002E6724B89851_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_ResetTriggerString_m31B233F948D7551D220FEDA56B002E6724B89851_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::ResetTriggerString(System.String)");
_il2cpp_icall_func(__this, ___name0);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Conversion methods for marshalling of: UnityEngine.AnimatorControllerParameter
IL2CPP_EXTERN_C void AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshal_pinvoke(const AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68& unmarshaled, AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_pinvoke& marshaled)
{
marshaled.___m_Name_0 = il2cpp_codegen_marshal_string(unmarshaled.get_m_Name_0());
marshaled.___m_Type_1 = unmarshaled.get_m_Type_1();
marshaled.___m_DefaultFloat_2 = unmarshaled.get_m_DefaultFloat_2();
marshaled.___m_DefaultInt_3 = unmarshaled.get_m_DefaultInt_3();
marshaled.___m_DefaultBool_4 = static_cast<int32_t>(unmarshaled.get_m_DefaultBool_4());
}
IL2CPP_EXTERN_C void AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshal_pinvoke_back(const AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_pinvoke& marshaled, AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68& unmarshaled)
{
unmarshaled.set_m_Name_0(il2cpp_codegen_marshal_string_result(marshaled.___m_Name_0));
int32_t unmarshaled_m_Type_temp_1 = 0;
unmarshaled_m_Type_temp_1 = marshaled.___m_Type_1;
unmarshaled.set_m_Type_1(unmarshaled_m_Type_temp_1);
float unmarshaled_m_DefaultFloat_temp_2 = 0.0f;
unmarshaled_m_DefaultFloat_temp_2 = marshaled.___m_DefaultFloat_2;
unmarshaled.set_m_DefaultFloat_2(unmarshaled_m_DefaultFloat_temp_2);
int32_t unmarshaled_m_DefaultInt_temp_3 = 0;
unmarshaled_m_DefaultInt_temp_3 = marshaled.___m_DefaultInt_3;
unmarshaled.set_m_DefaultInt_3(unmarshaled_m_DefaultInt_temp_3);
bool unmarshaled_m_DefaultBool_temp_4 = false;
unmarshaled_m_DefaultBool_temp_4 = static_cast<bool>(marshaled.___m_DefaultBool_4);
unmarshaled.set_m_DefaultBool_4(unmarshaled_m_DefaultBool_temp_4);
}
// Conversion method for clean up from marshalling of: UnityEngine.AnimatorControllerParameter
IL2CPP_EXTERN_C void AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshal_pinvoke_cleanup(AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_pinvoke& marshaled)
{
il2cpp_codegen_marshal_free(marshaled.___m_Name_0);
marshaled.___m_Name_0 = NULL;
}
// Conversion methods for marshalling of: UnityEngine.AnimatorControllerParameter
IL2CPP_EXTERN_C void AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshal_com(const AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68& unmarshaled, AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_com& marshaled)
{
marshaled.___m_Name_0 = il2cpp_codegen_marshal_bstring(unmarshaled.get_m_Name_0());
marshaled.___m_Type_1 = unmarshaled.get_m_Type_1();
marshaled.___m_DefaultFloat_2 = unmarshaled.get_m_DefaultFloat_2();
marshaled.___m_DefaultInt_3 = unmarshaled.get_m_DefaultInt_3();
marshaled.___m_DefaultBool_4 = static_cast<int32_t>(unmarshaled.get_m_DefaultBool_4());
}
IL2CPP_EXTERN_C void AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshal_com_back(const AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_com& marshaled, AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68& unmarshaled)
{
unmarshaled.set_m_Name_0(il2cpp_codegen_marshal_bstring_result(marshaled.___m_Name_0));
int32_t unmarshaled_m_Type_temp_1 = 0;
unmarshaled_m_Type_temp_1 = marshaled.___m_Type_1;
unmarshaled.set_m_Type_1(unmarshaled_m_Type_temp_1);
float unmarshaled_m_DefaultFloat_temp_2 = 0.0f;
unmarshaled_m_DefaultFloat_temp_2 = marshaled.___m_DefaultFloat_2;
unmarshaled.set_m_DefaultFloat_2(unmarshaled_m_DefaultFloat_temp_2);
int32_t unmarshaled_m_DefaultInt_temp_3 = 0;
unmarshaled_m_DefaultInt_temp_3 = marshaled.___m_DefaultInt_3;
unmarshaled.set_m_DefaultInt_3(unmarshaled_m_DefaultInt_temp_3);
bool unmarshaled_m_DefaultBool_temp_4 = false;
unmarshaled_m_DefaultBool_temp_4 = static_cast<bool>(marshaled.___m_DefaultBool_4);
unmarshaled.set_m_DefaultBool_4(unmarshaled_m_DefaultBool_temp_4);
}
// Conversion method for clean up from marshalling of: UnityEngine.AnimatorControllerParameter
IL2CPP_EXTERN_C void AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshal_com_cleanup(AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_marshaled_com& marshaled)
{
il2cpp_codegen_marshal_free_bstring(marshaled.___m_Name_0);
marshaled.___m_Name_0 = NULL;
}
// System.String UnityEngine.AnimatorControllerParameter::get_name()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* AnimatorControllerParameter_get_name_mBC6037CF46E647026CF3AD51E76B4003A181EB60 (AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * __this, const RuntimeMethod* method)
{
String_t* V_0 = NULL;
{
String_t* L_0 = __this->get_m_Name_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
String_t* L_1 = V_0;
return L_1;
}
}
// System.Int32 UnityEngine.AnimatorControllerParameter::get_nameHash()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t AnimatorControllerParameter_get_nameHash_m1C54FD6635D2D92654118A59C11BE52D06903FF1 (AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
String_t* L_0 = __this->get_m_Name_0();
int32_t L_1 = Animator_StringToHash_m80E4CCCB84AAD032A5D84EF5832B7F35C1E5AE3F(L_0, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_000f;
}
IL_000f:
{
int32_t L_2 = V_0;
return L_2;
}
}
// UnityEngine.AnimatorControllerParameterType UnityEngine.AnimatorControllerParameter::get_type()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t AnimatorControllerParameter_get_type_mA0A786BD2BA5886464351B355E59395F87B98F02 (AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_Type_1();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Boolean UnityEngine.AnimatorControllerParameter::Equals(System.Object)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimatorControllerParameter_Equals_m71402007E47A2C82599B74BE7E95476B89838682 (AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * __this, RuntimeObject * ___o0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimatorControllerParameter_Equals_m71402007E47A2C82599B74BE7E95476B89838682_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * V_0 = NULL;
bool V_1 = false;
int32_t G_B7_0 = 0;
{
RuntimeObject * L_0 = ___o0;
V_0 = ((AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 *)IsInstClass((RuntimeObject*)L_0, AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68_il2cpp_TypeInfo_var));
AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * L_1 = V_0;
if (!L_1)
{
goto IL_0058;
}
}
{
String_t* L_2 = __this->get_m_Name_0();
AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * L_3 = V_0;
NullCheck(L_3);
String_t* L_4 = L_3->get_m_Name_0();
bool L_5 = String_op_Equality_m139F0E4195AE2F856019E63B241F36F016997FCE(L_2, L_4, /*hidden argument*/NULL);
if (!L_5)
{
goto IL_0058;
}
}
{
int32_t L_6 = __this->get_m_Type_1();
AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * L_7 = V_0;
NullCheck(L_7);
int32_t L_8 = L_7->get_m_Type_1();
if ((!(((uint32_t)L_6) == ((uint32_t)L_8))))
{
goto IL_0058;
}
}
{
float L_9 = __this->get_m_DefaultFloat_2();
AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * L_10 = V_0;
NullCheck(L_10);
float L_11 = L_10->get_m_DefaultFloat_2();
if ((!(((float)L_9) == ((float)L_11))))
{
goto IL_0058;
}
}
{
int32_t L_12 = __this->get_m_DefaultInt_3();
AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * L_13 = V_0;
NullCheck(L_13);
int32_t L_14 = L_13->get_m_DefaultInt_3();
if ((!(((uint32_t)L_12) == ((uint32_t)L_14))))
{
goto IL_0058;
}
}
{
bool L_15 = __this->get_m_DefaultBool_4();
AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * L_16 = V_0;
NullCheck(L_16);
bool L_17 = L_16->get_m_DefaultBool_4();
G_B7_0 = ((((int32_t)L_15) == ((int32_t)L_17))? 1 : 0);
goto IL_0059;
}
IL_0058:
{
G_B7_0 = 0;
}
IL_0059:
{
V_1 = (bool)G_B7_0;
goto IL_005c;
}
IL_005c:
{
bool L_18 = V_1;
return L_18;
}
}
// System.Int32 UnityEngine.AnimatorControllerParameter::GetHashCode()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t AnimatorControllerParameter_GetHashCode_mF9447E55008C5B10243C7D0D81376BFC2CAA1730 (AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
String_t* L_0 = AnimatorControllerParameter_get_name_mBC6037CF46E647026CF3AD51E76B4003A181EB60(__this, /*hidden argument*/NULL);
NullCheck(L_0);
int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(2 /* System.Int32 System.Object::GetHashCode() */, L_0);
V_0 = L_1;
goto IL_000f;
}
IL_000f:
{
int32_t L_2 = V_0;
return L_2;
}
}
// System.Void UnityEngine.AnimatorControllerParameter::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerParameter__ctor_mCCC1C8C5E13550B5745B4F10D0FCF6F948517797 (AnimatorControllerParameter_t63F7756B07B981111CB00490DE84B06BC2A25E68 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (AnimatorControllerParameter__ctor_mCCC1C8C5E13550B5745B4F10D0FCF6F948517797_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
__this->set_m_Name_0(_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709);
Object__ctor_m925ECA5E85CA100E3FB86A4F9E15C120E9A184C0(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.AnimatorOverrideController::OnInvalidateOverrideController(UnityEngine.AnimatorOverrideController)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorOverrideController_OnInvalidateOverrideController_mA538F1349FCF3968C5042F2D8860114F51818CB2 (AnimatorOverrideController_t130F04B57E753FD4288EF3235699ABE7C88FF312 * ___controller0, const RuntimeMethod* method)
{
bool V_0 = false;
{
AnimatorOverrideController_t130F04B57E753FD4288EF3235699ABE7C88FF312 * L_0 = ___controller0;
NullCheck(L_0);
OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * L_1 = L_0->get_OnOverrideControllerDirty_4();
V_0 = (bool)((!(((RuntimeObject*)(OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E *)L_1) <= ((RuntimeObject*)(RuntimeObject *)NULL)))? 1 : 0);
bool L_2 = V_0;
if (!L_2)
{
goto IL_001a;
}
}
{
AnimatorOverrideController_t130F04B57E753FD4288EF3235699ABE7C88FF312 * L_3 = ___controller0;
NullCheck(L_3);
OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * L_4 = L_3->get_OnOverrideControllerDirty_4();
NullCheck(L_4);
OnOverrideControllerDirtyCallback_Invoke_m002CFC2CE3C42A058380BE98F015E654D5F9F177(L_4, /*hidden argument*/NULL);
}
IL_001a:
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E (OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * __this, const RuntimeMethod* method)
{
typedef void (DEFAULT_CALL *PInvokeFunc)();
PInvokeFunc il2cppPInvokeFunc = reinterpret_cast<PInvokeFunc>(il2cpp_codegen_get_method_pointer(((RuntimeDelegate*)__this)->method));
// Native function invocation
il2cppPInvokeFunc();
}
// System.Void UnityEngine.AnimatorOverrideController_OnOverrideControllerDirtyCallback::.ctor(System.Object,System.IntPtr)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback__ctor_m9277DED194C85B1C3B4C7ABBB1D54CCB43C724D8 (OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method)
{
__this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1));
__this->set_method_3(___method1);
__this->set_m_target_2(___object0);
}
// System.Void UnityEngine.AnimatorOverrideController_OnOverrideControllerDirtyCallback::Invoke()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback_Invoke_m002CFC2CE3C42A058380BE98F015E654D5F9F177 (OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * __this, const RuntimeMethod* method)
{
DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* delegateArrayToInvoke = __this->get_delegates_11();
Delegate_t** delegatesToInvoke;
il2cpp_array_size_t length;
if (delegateArrayToInvoke != NULL)
{
length = delegateArrayToInvoke->max_length;
delegatesToInvoke = reinterpret_cast<Delegate_t**>(delegateArrayToInvoke->GetAddressAtUnchecked(0));
}
else
{
length = 1;
delegatesToInvoke = reinterpret_cast<Delegate_t**>(&__this);
}
for (il2cpp_array_size_t i = 0; i < length; i++)
{
Delegate_t* currentDelegate = delegatesToInvoke[i];
Il2CppMethodPointer targetMethodPointer = currentDelegate->get_method_ptr_0();
RuntimeObject* targetThis = currentDelegate->get_m_target_2();
RuntimeMethod* targetMethod = (RuntimeMethod*)(currentDelegate->get_method_3());
if (!il2cpp_codegen_method_is_virtual(targetMethod))
{
il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod);
}
bool ___methodIsStatic = MethodIsStatic(targetMethod);
int ___parameterCount = il2cpp_codegen_method_parameter_count(targetMethod);
if (___methodIsStatic)
{
if (___parameterCount == 0)
{
// open
typedef void (*FunctionPointerType) (const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(targetMethod);
}
else
{
// closed
typedef void (*FunctionPointerType) (void*, const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod);
}
}
else
{
// closed
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
GenericInterfaceActionInvoker0::Invoke(targetMethod, targetThis);
else
GenericVirtActionInvoker0::Invoke(targetMethod, targetThis);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
InterfaceActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis);
else
VirtActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis);
}
}
else
{
typedef void (*FunctionPointerType) (void*, const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod);
}
}
}
}
// System.IAsyncResult UnityEngine.AnimatorOverrideController_OnOverrideControllerDirtyCallback::BeginInvoke(System.AsyncCallback,System.Object)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* OnOverrideControllerDirtyCallback_BeginInvoke_m35CE43BF7D40E88192183CF666F2BB7EFE8C6F9D (OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * __this, AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4 * ___callback0, RuntimeObject * ___object1, const RuntimeMethod* method)
{
void *__d_args[1] = {0};
return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback0, (RuntimeObject*)___object1);
}
// System.Void UnityEngine.AnimatorOverrideController_OnOverrideControllerDirtyCallback::EndInvoke(System.IAsyncResult)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback_EndInvoke_m39CFD9FD2CC3035CFF6809F56447932B1394C08E (OnOverrideControllerDirtyCallback_t73560E6E30067C09BC58A15F9D2726051B077E2E * __this, RuntimeObject* ___result0, const RuntimeMethod* method)
{
il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int32 UnityEngine.AnimatorStateInfo::get_fullPathHash()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t AnimatorStateInfo_get_fullPathHash_m2865A5467A1201025DAD3E58E420D0870CDF90C2 (AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_FullPath_2();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C int32_t AnimatorStateInfo_get_fullPathHash_m2865A5467A1201025DAD3E58E420D0870CDF90C2_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * _thisAdjusted = reinterpret_cast<AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 *>(__this + _offset);
return AnimatorStateInfo_get_fullPathHash_m2865A5467A1201025DAD3E58E420D0870CDF90C2(_thisAdjusted, method);
}
// System.Single UnityEngine.AnimatorStateInfo::get_normalizedTime()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float AnimatorStateInfo_get_normalizedTime_m3AB6A2DB592BB9CA0B9A4EF8A382C4DF3F5F6BBD (AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * __this, const RuntimeMethod* method)
{
float V_0 = 0.0f;
{
float L_0 = __this->get_m_NormalizedTime_3();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
float L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C float AnimatorStateInfo_get_normalizedTime_m3AB6A2DB592BB9CA0B9A4EF8A382C4DF3F5F6BBD_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 * _thisAdjusted = reinterpret_cast<AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 *>(__this + _offset);
return AnimatorStateInfo_get_normalizedTime_m3AB6A2DB592BB9CA0B9A4EF8A382C4DF3F5F6BBD(_thisAdjusted, method);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Conversion methods for marshalling of: UnityEngine.AnimatorTransitionInfo
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshal_pinvoke(const AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B& unmarshaled, AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_pinvoke& marshaled)
{
marshaled.___m_FullPath_0 = unmarshaled.get_m_FullPath_0();
marshaled.___m_UserName_1 = unmarshaled.get_m_UserName_1();
marshaled.___m_Name_2 = unmarshaled.get_m_Name_2();
marshaled.___m_HasFixedDuration_3 = static_cast<int32_t>(unmarshaled.get_m_HasFixedDuration_3());
marshaled.___m_Duration_4 = unmarshaled.get_m_Duration_4();
marshaled.___m_NormalizedTime_5 = unmarshaled.get_m_NormalizedTime_5();
marshaled.___m_AnyState_6 = static_cast<int32_t>(unmarshaled.get_m_AnyState_6());
marshaled.___m_TransitionType_7 = unmarshaled.get_m_TransitionType_7();
}
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshal_pinvoke_back(const AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_pinvoke& marshaled, AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B& unmarshaled)
{
int32_t unmarshaled_m_FullPath_temp_0 = 0;
unmarshaled_m_FullPath_temp_0 = marshaled.___m_FullPath_0;
unmarshaled.set_m_FullPath_0(unmarshaled_m_FullPath_temp_0);
int32_t unmarshaled_m_UserName_temp_1 = 0;
unmarshaled_m_UserName_temp_1 = marshaled.___m_UserName_1;
unmarshaled.set_m_UserName_1(unmarshaled_m_UserName_temp_1);
int32_t unmarshaled_m_Name_temp_2 = 0;
unmarshaled_m_Name_temp_2 = marshaled.___m_Name_2;
unmarshaled.set_m_Name_2(unmarshaled_m_Name_temp_2);
bool unmarshaled_m_HasFixedDuration_temp_3 = false;
unmarshaled_m_HasFixedDuration_temp_3 = static_cast<bool>(marshaled.___m_HasFixedDuration_3);
unmarshaled.set_m_HasFixedDuration_3(unmarshaled_m_HasFixedDuration_temp_3);
float unmarshaled_m_Duration_temp_4 = 0.0f;
unmarshaled_m_Duration_temp_4 = marshaled.___m_Duration_4;
unmarshaled.set_m_Duration_4(unmarshaled_m_Duration_temp_4);
float unmarshaled_m_NormalizedTime_temp_5 = 0.0f;
unmarshaled_m_NormalizedTime_temp_5 = marshaled.___m_NormalizedTime_5;
unmarshaled.set_m_NormalizedTime_5(unmarshaled_m_NormalizedTime_temp_5);
bool unmarshaled_m_AnyState_temp_6 = false;
unmarshaled_m_AnyState_temp_6 = static_cast<bool>(marshaled.___m_AnyState_6);
unmarshaled.set_m_AnyState_6(unmarshaled_m_AnyState_temp_6);
int32_t unmarshaled_m_TransitionType_temp_7 = 0;
unmarshaled_m_TransitionType_temp_7 = marshaled.___m_TransitionType_7;
unmarshaled.set_m_TransitionType_7(unmarshaled_m_TransitionType_temp_7);
}
// Conversion method for clean up from marshalling of: UnityEngine.AnimatorTransitionInfo
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshal_pinvoke_cleanup(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_pinvoke& marshaled)
{
}
// Conversion methods for marshalling of: UnityEngine.AnimatorTransitionInfo
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshal_com(const AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B& unmarshaled, AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_com& marshaled)
{
marshaled.___m_FullPath_0 = unmarshaled.get_m_FullPath_0();
marshaled.___m_UserName_1 = unmarshaled.get_m_UserName_1();
marshaled.___m_Name_2 = unmarshaled.get_m_Name_2();
marshaled.___m_HasFixedDuration_3 = static_cast<int32_t>(unmarshaled.get_m_HasFixedDuration_3());
marshaled.___m_Duration_4 = unmarshaled.get_m_Duration_4();
marshaled.___m_NormalizedTime_5 = unmarshaled.get_m_NormalizedTime_5();
marshaled.___m_AnyState_6 = static_cast<int32_t>(unmarshaled.get_m_AnyState_6());
marshaled.___m_TransitionType_7 = unmarshaled.get_m_TransitionType_7();
}
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshal_com_back(const AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_com& marshaled, AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B& unmarshaled)
{
int32_t unmarshaled_m_FullPath_temp_0 = 0;
unmarshaled_m_FullPath_temp_0 = marshaled.___m_FullPath_0;
unmarshaled.set_m_FullPath_0(unmarshaled_m_FullPath_temp_0);
int32_t unmarshaled_m_UserName_temp_1 = 0;
unmarshaled_m_UserName_temp_1 = marshaled.___m_UserName_1;
unmarshaled.set_m_UserName_1(unmarshaled_m_UserName_temp_1);
int32_t unmarshaled_m_Name_temp_2 = 0;
unmarshaled_m_Name_temp_2 = marshaled.___m_Name_2;
unmarshaled.set_m_Name_2(unmarshaled_m_Name_temp_2);
bool unmarshaled_m_HasFixedDuration_temp_3 = false;
unmarshaled_m_HasFixedDuration_temp_3 = static_cast<bool>(marshaled.___m_HasFixedDuration_3);
unmarshaled.set_m_HasFixedDuration_3(unmarshaled_m_HasFixedDuration_temp_3);
float unmarshaled_m_Duration_temp_4 = 0.0f;
unmarshaled_m_Duration_temp_4 = marshaled.___m_Duration_4;
unmarshaled.set_m_Duration_4(unmarshaled_m_Duration_temp_4);
float unmarshaled_m_NormalizedTime_temp_5 = 0.0f;
unmarshaled_m_NormalizedTime_temp_5 = marshaled.___m_NormalizedTime_5;
unmarshaled.set_m_NormalizedTime_5(unmarshaled_m_NormalizedTime_temp_5);
bool unmarshaled_m_AnyState_temp_6 = false;
unmarshaled_m_AnyState_temp_6 = static_cast<bool>(marshaled.___m_AnyState_6);
unmarshaled.set_m_AnyState_6(unmarshaled_m_AnyState_temp_6);
int32_t unmarshaled_m_TransitionType_temp_7 = 0;
unmarshaled_m_TransitionType_temp_7 = marshaled.___m_TransitionType_7;
unmarshaled.set_m_TransitionType_7(unmarshaled_m_TransitionType_temp_7);
}
// Conversion method for clean up from marshalling of: UnityEngine.AnimatorTransitionInfo
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshal_com_cleanup(AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B_marshaled_com& marshaled)
{
}
// System.Int32 UnityEngine.AnimatorTransitionInfo::get_fullPathHash()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t AnimatorTransitionInfo_get_fullPathHash_mCB00E82B499A9F4084FEFFE8757F352541EA055E (AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_FullPath_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C int32_t AnimatorTransitionInfo_get_fullPathHash_mCB00E82B499A9F4084FEFFE8757F352541EA055E_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
int32_t _offset = 1;
AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B * _thisAdjusted = reinterpret_cast<AnimatorTransitionInfo_t66D37578B8898C817BD5A5781B420BF92F60AA6B *>(__this + _offset);
return AnimatorTransitionInfo_get_fullPathHash_mCB00E82B499A9F4084FEFFE8757F352541EA055E(_thisAdjusted, method);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Conversion methods for marshalling of: UnityEngine.HumanBone
IL2CPP_EXTERN_C void HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshal_pinvoke(const HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995& unmarshaled, HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_pinvoke& marshaled)
{
marshaled.___m_BoneName_0 = il2cpp_codegen_marshal_string(unmarshaled.get_m_BoneName_0());
marshaled.___m_HumanName_1 = il2cpp_codegen_marshal_string(unmarshaled.get_m_HumanName_1());
marshaled.___limit_2 = unmarshaled.get_limit_2();
}
IL2CPP_EXTERN_C void HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshal_pinvoke_back(const HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_pinvoke& marshaled, HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995& unmarshaled)
{
unmarshaled.set_m_BoneName_0(il2cpp_codegen_marshal_string_result(marshaled.___m_BoneName_0));
unmarshaled.set_m_HumanName_1(il2cpp_codegen_marshal_string_result(marshaled.___m_HumanName_1));
HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 unmarshaled_limit_temp_2;
memset((&unmarshaled_limit_temp_2), 0, sizeof(unmarshaled_limit_temp_2));
unmarshaled_limit_temp_2 = marshaled.___limit_2;
unmarshaled.set_limit_2(unmarshaled_limit_temp_2);
}
// Conversion method for clean up from marshalling of: UnityEngine.HumanBone
IL2CPP_EXTERN_C void HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshal_pinvoke_cleanup(HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_pinvoke& marshaled)
{
il2cpp_codegen_marshal_free(marshaled.___m_BoneName_0);
marshaled.___m_BoneName_0 = NULL;
il2cpp_codegen_marshal_free(marshaled.___m_HumanName_1);
marshaled.___m_HumanName_1 = NULL;
}
// Conversion methods for marshalling of: UnityEngine.HumanBone
IL2CPP_EXTERN_C void HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshal_com(const HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995& unmarshaled, HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_com& marshaled)
{
marshaled.___m_BoneName_0 = il2cpp_codegen_marshal_bstring(unmarshaled.get_m_BoneName_0());
marshaled.___m_HumanName_1 = il2cpp_codegen_marshal_bstring(unmarshaled.get_m_HumanName_1());
marshaled.___limit_2 = unmarshaled.get_limit_2();
}
IL2CPP_EXTERN_C void HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshal_com_back(const HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_com& marshaled, HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995& unmarshaled)
{
unmarshaled.set_m_BoneName_0(il2cpp_codegen_marshal_bstring_result(marshaled.___m_BoneName_0));
unmarshaled.set_m_HumanName_1(il2cpp_codegen_marshal_bstring_result(marshaled.___m_HumanName_1));
HumanLimit_t6AB2A599FC9E1F7E1598954FA9A0E568ECA5B6F3 unmarshaled_limit_temp_2;
memset((&unmarshaled_limit_temp_2), 0, sizeof(unmarshaled_limit_temp_2));
unmarshaled_limit_temp_2 = marshaled.___limit_2;
unmarshaled.set_limit_2(unmarshaled_limit_temp_2);
}
// Conversion method for clean up from marshalling of: UnityEngine.HumanBone
IL2CPP_EXTERN_C void HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshal_com_cleanup(HumanBone_t2CE168CF8638CEABF48FB7B7CCF77BBE0CECF995_marshaled_com& marshaled)
{
il2cpp_codegen_marshal_free_bstring(marshaled.___m_BoneName_0);
marshaled.___m_BoneName_0 = NULL;
il2cpp_codegen_marshal_free_bstring(marshaled.___m_HumanName_1);
marshaled.___m_HumanName_1 = NULL;
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Conversion methods for marshalling of: UnityEngine.SkeletonBone
IL2CPP_EXTERN_C void SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshal_pinvoke(const SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5& unmarshaled, SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_pinvoke& marshaled)
{
marshaled.___name_0 = il2cpp_codegen_marshal_string(unmarshaled.get_name_0());
marshaled.___parentName_1 = il2cpp_codegen_marshal_string(unmarshaled.get_parentName_1());
marshaled.___position_2 = unmarshaled.get_position_2();
marshaled.___rotation_3 = unmarshaled.get_rotation_3();
marshaled.___scale_4 = unmarshaled.get_scale_4();
}
IL2CPP_EXTERN_C void SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshal_pinvoke_back(const SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_pinvoke& marshaled, SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5& unmarshaled)
{
unmarshaled.set_name_0(il2cpp_codegen_marshal_string_result(marshaled.___name_0));
unmarshaled.set_parentName_1(il2cpp_codegen_marshal_string_result(marshaled.___parentName_1));
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 unmarshaled_position_temp_2;
memset((&unmarshaled_position_temp_2), 0, sizeof(unmarshaled_position_temp_2));
unmarshaled_position_temp_2 = marshaled.___position_2;
unmarshaled.set_position_2(unmarshaled_position_temp_2);
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 unmarshaled_rotation_temp_3;
memset((&unmarshaled_rotation_temp_3), 0, sizeof(unmarshaled_rotation_temp_3));
unmarshaled_rotation_temp_3 = marshaled.___rotation_3;
unmarshaled.set_rotation_3(unmarshaled_rotation_temp_3);
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 unmarshaled_scale_temp_4;
memset((&unmarshaled_scale_temp_4), 0, sizeof(unmarshaled_scale_temp_4));
unmarshaled_scale_temp_4 = marshaled.___scale_4;
unmarshaled.set_scale_4(unmarshaled_scale_temp_4);
}
// Conversion method for clean up from marshalling of: UnityEngine.SkeletonBone
IL2CPP_EXTERN_C void SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshal_pinvoke_cleanup(SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_pinvoke& marshaled)
{
il2cpp_codegen_marshal_free(marshaled.___name_0);
marshaled.___name_0 = NULL;
il2cpp_codegen_marshal_free(marshaled.___parentName_1);
marshaled.___parentName_1 = NULL;
}
// Conversion methods for marshalling of: UnityEngine.SkeletonBone
IL2CPP_EXTERN_C void SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshal_com(const SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5& unmarshaled, SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_com& marshaled)
{
marshaled.___name_0 = il2cpp_codegen_marshal_bstring(unmarshaled.get_name_0());
marshaled.___parentName_1 = il2cpp_codegen_marshal_bstring(unmarshaled.get_parentName_1());
marshaled.___position_2 = unmarshaled.get_position_2();
marshaled.___rotation_3 = unmarshaled.get_rotation_3();
marshaled.___scale_4 = unmarshaled.get_scale_4();
}
IL2CPP_EXTERN_C void SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshal_com_back(const SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_com& marshaled, SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5& unmarshaled)
{
unmarshaled.set_name_0(il2cpp_codegen_marshal_bstring_result(marshaled.___name_0));
unmarshaled.set_parentName_1(il2cpp_codegen_marshal_bstring_result(marshaled.___parentName_1));
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 unmarshaled_position_temp_2;
memset((&unmarshaled_position_temp_2), 0, sizeof(unmarshaled_position_temp_2));
unmarshaled_position_temp_2 = marshaled.___position_2;
unmarshaled.set_position_2(unmarshaled_position_temp_2);
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 unmarshaled_rotation_temp_3;
memset((&unmarshaled_rotation_temp_3), 0, sizeof(unmarshaled_rotation_temp_3));
unmarshaled_rotation_temp_3 = marshaled.___rotation_3;
unmarshaled.set_rotation_3(unmarshaled_rotation_temp_3);
Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 unmarshaled_scale_temp_4;
memset((&unmarshaled_scale_temp_4), 0, sizeof(unmarshaled_scale_temp_4));
unmarshaled_scale_temp_4 = marshaled.___scale_4;
unmarshaled.set_scale_4(unmarshaled_scale_temp_4);
}
// Conversion method for clean up from marshalling of: UnityEngine.SkeletonBone
IL2CPP_EXTERN_C void SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshal_com_cleanup(SkeletonBone_tCDF297229129311214294465F3FA353DB09726F5_marshaled_com& marshaled)
{
il2cpp_codegen_marshal_free_bstring(marshaled.___name_0);
marshaled.___name_0 = NULL;
il2cpp_codegen_marshal_free_bstring(marshaled.___parentName_1);
marshaled.___parentName_1 = NULL;
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void UnityEngine.StateMachineBehaviour::OnStateEnter(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateEnter_mAB25325C96611ADDF93038EC6792EC4F76AEF4EE (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateUpdate(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateUpdate_mE12079F72B209DDFFAB4088B2B210EA20C2C4266 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateExit(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateExit_m83F9656CE5265BD15F3B5D1AB91411A211922730 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateMove(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMove_mAE38B3B50B0A495AF30E6711F52381668B63DAA2 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateIK(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateIK_mB977958BB73727EF2F721BB449DFEA781529785B (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateMachineEnter(UnityEngine.Animator,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineEnter_m5497D76EAE53BEF94431E3C1AAD0B58B89E745C7 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, int32_t ___stateMachinePathHash1, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateMachineExit(UnityEngine.Animator,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineExit_m8A0744B8E90157AE466269DF324C44BFCBB47FF3 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, int32_t ___stateMachinePathHash1, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateEnter(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateEnter_mAAD23D49A3F84438928677D2FA3F8E26CFDE2522 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___controller3, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateUpdate(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateUpdate_mF1E4E77449D427AE5DDD68FD8EECCAD1E54E1EE9 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___controller3, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateExit(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateExit_m43A13AA682B9E86F6D2952338F47CE1B2BF9D4A7 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___controller3, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateMove(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMove_mD8060C6C70456CDC4D678184723C05A7750846F3 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___controller3, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateIK(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateIK_m09D6AC0300060ACF7B82283AD947E9A260585576 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, AnimatorStateInfo_tF6D8ADF771CD13DC578AC9A574FD33CC99AD46E2 ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___controller3, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateMachineEnter(UnityEngine.Animator,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineEnter_m6DE0F767D565EFC33361BA13A6DCC65AC89D3D07 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, int32_t ___stateMachinePathHash1, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___controller2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::OnStateMachineExit(UnityEngine.Animator,System.Int32,UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateMachineExit_m01575716EA20F88A56C3CB778FACE2CBDA68EF26 (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, Animator_tF1A88E66B3B731DDA75A066DBAE9C55837660F5A * ___animator0, int32_t ___stateMachinePathHash1, AnimatorControllerPlayable_t352C2C3D059CFC0404FF4FBBA302F16C5966F44B ___controller2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour__ctor_m60289315ADCB494227D881EEFA6C4458BACA79DB (StateMachineBehaviour_t698612ED92024B087045C388731B7673550C786C * __this, const RuntimeMethod* method)
{
{
ScriptableObject__ctor_m6E2B3821A4A361556FC12E9B1C71E1D5DC002C5B(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"rex.raphael@outlook.com"
] | rex.raphael@outlook.com |
f8b3d76a8427c6a5edb596e0924644135a8c272a | 59959353175a5f6245824821edf87f3078633b15 | /semantic-server-flask-docker/AnnService/inc/Helper/ArgumentsParser.h | 0ae19b8e8fee218781157a2b95a2f2be3a2964f9 | [
"MIT"
] | permissive | liamca/covid19search | bf24b32ddb2f98f122dae70eca98d2824e3ebcfe | 4c71c76f243684e7ea7baafd14b641f46481cb36 | refs/heads/master | 2023-04-18T08:03:15.580256 | 2021-04-30T19:05:41 | 2021-04-30T19:05:41 | 261,308,162 | 17 | 6 | MIT | 2020-05-04T22:28:12 | 2020-05-04T22:20:38 | JavaScript | UTF-8 | C++ | false | false | 7,136 | h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_HELPER_ARGUMENTSPARSER_H_
#define _SPTAG_HELPER_ARGUMENTSPARSER_H_
#include "inc/Helper/StringConvert.h"
#include <cstdint>
#include <cstddef>
#include <memory>
#include <vector>
#include <string>
namespace SPTAG
{
namespace Helper
{
class ArgumentsParser
{
public:
ArgumentsParser();
virtual ~ArgumentsParser();
virtual bool Parse(int p_argc, char** p_args);
virtual void PrintHelp();
protected:
class IArgument
{
public:
IArgument();
virtual ~IArgument();
virtual bool ParseValue(int& p_restArgc, char** (&p_args)) = 0;
virtual void PrintDescription(FILE* p_output) = 0;
virtual bool IsRequiredButNotSet() const = 0;
};
template<typename DataType>
class ArgumentT : public IArgument
{
public:
ArgumentT(DataType& p_target,
const std::string& p_representStringShort,
const std::string& p_representString,
const std::string& p_description,
bool p_followedValue,
const DataType& p_switchAsValue,
bool p_isRequired)
: m_value(p_target),
m_representStringShort(p_representStringShort),
m_representString(p_representString),
m_description(p_description),
m_followedValue(p_followedValue),
c_switchAsValue(p_switchAsValue),
m_isRequired(p_isRequired),
m_isSet(false)
{
}
virtual ~ArgumentT()
{
}
virtual bool ParseValue(int& p_restArgc, char** (&p_args))
{
if (0 == p_restArgc)
{
return true;
}
if (0 != strcmp(*p_args, m_representString.c_str())
&& 0 != strcmp(*p_args, m_representStringShort.c_str()))
{
return true;
}
if (!m_followedValue)
{
m_value = c_switchAsValue;
--p_restArgc;
++p_args;
m_isSet = true;
return true;
}
if (p_restArgc < 2)
{
return false;
}
DataType tmp;
if (!Helper::Convert::ConvertStringTo(p_args[1], tmp))
{
return false;
}
m_value = std::move(tmp);
p_restArgc -= 2;
p_args += 2;
m_isSet = true;
return true;
}
virtual void PrintDescription(FILE* p_output)
{
std::size_t padding = 30;
if (!m_representStringShort.empty())
{
fprintf(p_output, "%s", m_representStringShort.c_str());
padding -= m_representStringShort.size();
}
if (!m_representString.empty())
{
if (!m_representStringShort.empty())
{
fprintf(p_output, ", ");
padding -= 2;
}
fprintf(p_output, "%s", m_representString.c_str());
padding -= m_representString.size();
}
if (m_followedValue)
{
fprintf(p_output, " <value>");
padding -= 8;
}
while (padding-- > 0)
{
fputc(' ', p_output);
}
fprintf(p_output, "%s", m_description.c_str());
}
virtual bool IsRequiredButNotSet() const
{
return m_isRequired && !m_isSet;
}
private:
DataType & m_value;
std::string m_representStringShort;
std::string m_representString;
std::string m_description;
bool m_followedValue;
const DataType c_switchAsValue;
bool m_isRequired;
bool m_isSet;
};
template<typename DataType>
void AddRequiredOption(DataType& p_target,
const std::string& p_representStringShort,
const std::string& p_representString,
const std::string& p_description)
{
m_arguments.emplace_back(std::shared_ptr<IArgument>(
new ArgumentT<DataType>(p_target,
p_representStringShort,
p_representString,
p_description,
true,
DataType(),
true)));
}
template<typename DataType>
void AddOptionalOption(DataType& p_target,
const std::string& p_representStringShort,
const std::string& p_representString,
const std::string& p_description)
{
m_arguments.emplace_back(std::shared_ptr<IArgument>(
new ArgumentT<DataType>(p_target,
p_representStringShort,
p_representString,
p_description,
true,
DataType(),
false)));
}
template<typename DataType>
void AddRequiredSwitch(DataType& p_target,
const std::string& p_representStringShort,
const std::string& p_representString,
const std::string& p_description,
const DataType& p_switchAsValue)
{
m_arguments.emplace_back(std::shared_ptr<IArgument>(
new ArgumentT<DataType>(p_target,
p_representStringShort,
p_representString,
p_description,
false,
p_switchAsValue,
true)));
}
template<typename DataType>
void AddOptionalSwitch(DataType& p_target,
const std::string& p_representStringShort,
const std::string& p_representString,
const std::string& p_description,
const DataType& p_switchAsValue)
{
m_arguments.emplace_back(std::shared_ptr<IArgument>(
new ArgumentT<DataType>(p_target,
p_representStringShort,
p_representString,
p_description,
false,
p_switchAsValue,
false)));
}
private:
std::vector<std::shared_ptr<IArgument>> m_arguments;
};
} // namespace Helper
} // namespace SPTAG
#endif // _SPTAG_HELPER_ARGUMENTSPARSER_H_
| [
"liamca@microsoft.com"
] | liamca@microsoft.com |
e030f2143d29496e0d36c9f472adcf8ad13fad17 | 798bbe52556fb9d0e2b48e6dac00309aa8bf4129 | /class/Image_Engineering_F/sharpning.cpp | d08d978f89fc70fa5ce9861acd4f6150e0072594 | [] | no_license | HAVRM/work | 3b900684fe43e21265b3e66071e6a033dfaddf23 | 147a53bcbf18e3505623636f2bbed840f6dd857d | refs/heads/master | 2020-04-15T15:54:01.276246 | 2017-06-26T04:13:37 | 2017-06-26T04:13:37 | 44,515,163 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 455 | cpp | #include <opencv2/opencv.hpp>
int main(int arg,char *argv[]){
cv::Mat src_img=cv::imread("image/avr3_averaging.png",1);
cv::Mat chg_img;
if(!src_img.data)return -1;
float dataA[][3]={{0.0,-1.0,0.0},{-1.0,5.0,-1.0},{0.0,-1.0,0.0}};
cv::Mat kernel(3,3,CV_32FC1,dataA);
cv::filter2D(src_img,chg_img,-1,kernel);
cv::namedWindow("img1");
cv::namedWindow("img2");
cv::imshow("img1",src_img);
cv::imshow("img2",chg_img);
cv::waitKey(0);
}
| [
"hiroki.mine.0614.163@gmail.com"
] | hiroki.mine.0614.163@gmail.com |
c7ba2b9e0ce5d220c53735e2bc45d104f7adf519 | aec7bfee77445a1e21261b6d4ca0a62d8c08bee3 | /Antidote.cpp | 8fc7be379e526ee98348ace3da06742881989926 | [] | no_license | Tetewet/TheophileGit | ad4d1a84b8074d6bf5830fbd773a69f322dc1cf7 | 0c5060c3047328d8fb4cacb2f0facbe751748301 | refs/heads/master | 2020-09-30T04:48:07.851825 | 2019-12-10T22:46:18 | 2019-12-10T22:46:18 | 227,206,324 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,461 | cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "Antidote.h"
#include "Engine.h"
#include "TheophileCharacter.h"
#include "Materials/MaterialInstanceDynamic.h"
// Sets default values
AAntidote::AAntidote()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
BaseMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
CollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("Box"));
CollisionBox->AttachTo(BaseMesh);
RootComponent = BaseMesh;
}
// Called when the game starts or when spawned
void AAntidote::BeginPlay()
{
Super::BeginPlay();
Rotation.Add(0, 1, 0);
}
// Called every frame
void AAntidote::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
BaseMesh->AddLocalRotation(Rotation);
}
void AAntidote::Heal()
{
auto player = Cast<ATheophileCharacter>(Player);
player->Hp += Heal;
player->StopPoison();
//HKHeal = (1.0 - player->Hp) * Time / tduree;
}
void AAntidote::NotifyActorBeginOverlap(AActor* OtherActor)
{
if (Cast<ATheophileCharacter>(OtherActor) != nullptr)
{
auto player = Cast<ATheophileCharacter>(OtherActor);
if (player != nullptr)
{
if (player->Hp >= 1 || player->Hp <= 0)
{
Destroy();
}
if (AntidoteSound != nullptr)
{
UGameplayStatics::PlaySoundAtLocation(this, AntidoteSound, GetActorLocation());
}
}
}
}
| [
"theogorisse@gmail.com"
] | theogorisse@gmail.com |
4e028aad1ae37c78f7f19d9304c7946e031628b7 | 8b3bd5278095c70d34a4fd8dbcee6ffe4b356067 | /dpc.cpp | 97463c74ca51a158eec11350f89055f8a9a99516 | [] | no_license | Jackfrost2639/ex | 5d1c963aeb69f7e57cbc40612feb40c0b76c0b2f | dbd5897934a2fe55b6bb5601b78613e101015ec1 | refs/heads/master | 2021-06-27T03:25:51.508201 | 2021-03-30T12:07:36 | 2021-03-30T12:07:36 | 220,775,367 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 916 | cpp | #include <bits/stdc++.h>
#define smax(a, b) ((a) < (b) ? ((a)=(b), true) : false)
#define smin(a, b) ((a) > (b) ? ((a)=(b), true) : false)
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
using namespace std;
int n;
int dp[100000][3];
int arr[100000][3];
int main() {
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> arr[i][0] >> arr[i][1] >> arr[i][2];
}
dp[0][0] = arr[0][0];
dp[0][1] = arr[0][1];
dp[0][2] = arr[0][2];
for(int i = 1; i < n; i++)
{
for(int j = 0; j < 3; j++)
{
for(int h = 0; h < 3; h++)
{
if(j != h)
{
dp[i][j] = max(dp[i][j], dp[i-1][h] + arr[i][j]);
}
}
}
}
int ans = 0;
for(int i = 0; i < 3; i++)
{
ans = max(ans, dp[n-1][i]);
}
cout << ans << endl;
return 0;
} | [
"hellobye587846@gmail.com"
] | hellobye587846@gmail.com |
2292cd2ff94a99be592c7e254b3d0a052c2c3ace | ba9870275f7aa719269ccfec591270caef029b06 | /util.hpp | ae23461cce20bc7d4e3ae774e88e7beb80e99fc1 | [
"BSD-3-Clause"
] | permissive | haskelladdict/phantom | d95d13364838ec847541652fe39e3796401d50aa | 3d883df06787a3595df37574de375a7ee9f49033 | refs/heads/master | 2021-01-10T19:59:11.745809 | 2015-08-01T16:05:03 | 2015-08-01T16:05:03 | 39,606,186 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,501 | hpp | // helper functions for file system manipulation
//
// (C) Markus Dittrich, 2015
#ifndef UTIL_HPP
#define UTIL_HPP
#include <cstdio>
#include <dirent.h>
#include <exception>
#include <iostream>
#include <mutex>
#include <stdexcept>
#include <string>
#include "parallel_queue.hpp"
const std::string version = "0.2";
// forward declarations
class Stats;
// custom exception class for failed file access (e.g. due to improper permissions)
class FailedFileAccess : public std::runtime_error {
public:
FailedFileAccess(const std::string& msg)
: runtime_error("Failed to access file: " + msg) {}
};
// custom exception class for failed directory access (e.g. due to improper permissions)
class FailedDirAccess : public std::runtime_error {
public:
FailedDirAccess(const std::string& msg)
: runtime_error("Failed to access directory: " + msg) {}
};
// File is a thin wrapper class for managing C style filepointers
class File {
public:
File(const std::string& fileName);
~File();
FILE* get();
private:
FILE *fp_;
};
// Dir is a thin wrapper class for managing C style directory pointers
class Dir {
public:
Dir(const std::string& dirName);
~Dir();
DIR* get();
private:
DIR *dp_;
};
// Printer is a helper class for serializing stdout and stderr
class Printer {
public:
void cout(const std::string& msg) const {
std::lock_guard<std::mutex> lg(mx_);
std::cout << msg << "\n";
}
void cerr(const std::string& msg) const {
std::lock_guard<std::mutex> lg(mx_);
std::cerr << msg << "\n";
}
private:
mutable std::mutex mx_;
};
// add_directory adds the content of the provided directory to the queue
void add_directory(StringQueue& queue, const std::string& path,
const Printer& print);
// helper function to compute the buf size required for dirent for
// the particular filesystem in use. Code used mostly verbatim from
// http://womble.decadent.org.uk/readdir_r-advisory.html
// Returns 0 on failure.
size_t dirent_buf_size(DIR * dirp);
// concat_filepaths concatenates two filepaths into one single path
std::string concat_filepaths(std::string& s1, const std::string& s2);
// simple usage message
void usage();
// error wrapper
void error(const std::string& msg);
// print final file/data statistics to stdout
void print_stats(const Stats& stats);
// convert a std::chrono::time_point to a human readable string
std::string time_point_to_c_time(const std::chrono::system_clock::time_point& tp);
#endif
| [
"haskelladdict@gmail.com"
] | haskelladdict@gmail.com |
e2fc1cafc251e0c636abae99cb3c64218c3ce524 | 7a7dc1615336ce939fcbc28153822eb10d450a38 | /example/blink.cpp | 263e8fdba9ff5c73601468643ba932418c1971a2 | [
"MIT"
] | permissive | ChisholmKyle/ArduinoCMake | 4cf726bf92d17043e5243ec24de47cf5c10393ff | 3123e54a7f4a9edd24cc76867d9f18e1e62c9184 | refs/heads/master | 2021-04-22T12:38:23.306824 | 2020-01-07T04:20:22 | 2020-01-07T04:20:22 | 53,593,716 | 4 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 565 | cpp | #include <Arduino.h>
// Pin 13 has an LED connected on most Arduino boards
#define PIN_LED 13
void loop() {
Serial.println("LED on");
digitalWrite(PIN_LED, HIGH); // Set the LED on
delay(1000); // Wait for one second
Serial.println("LED off");
digitalWrite(PIN_LED, LOW); // Set the LED off
delay(1000); // Wait for one second
}
int main(void)
{
// Mandatory init
init();
// set LED pin mode as output
pinMode(PIN_LED, OUTPUT);
while (true)
loop();
return 0;
}
| [
"dev@kylechisholm.ca"
] | dev@kylechisholm.ca |
82a2d5bbdb27452e7d0c84d7ba5585cf455f082e | cb1c84b3b4a766d1524e187507eb4e726211ee0e | /SOA/d6st/output/types/gensrc/D6SoaWork/cpp/d6/schemas/work/_2012_02/manhourmanagement/ManHourBillType.hxx | 8421eb5303c062c8cb3434a6f4bc817ba695a516 | [] | no_license | michaelccm/YFT | 6caaea98c06eed69ee593cb9b9cd3e1a7cb7f56d | 597d2c6e069737c8ec503c26540f23edf869e864 | refs/heads/master | 2021-01-05T01:59:29.290516 | 2020-02-16T06:02:15 | 2020-02-16T06:02:15 | 240,670,379 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,031 | hxx | /*
@<COPYRIGHT>@
==================================================
Copyright 2012
Siemens Product Lifecycle Management Software Inc.
All Rights Reserved.
==================================================
@<COPYRIGHT>@
==================================================
Auto-generated source from service interface.
DO NOT EDIT
==================================================
*/
#ifndef D6__SCHEMAS__WORK___2012_02__MANHOURMANAGEMENT_MANHOURBILLTYPE_HXX
#define D6__SCHEMAS__WORK___2012_02__MANHOURMANAGEMENT_MANHOURBILLTYPE_HXX
#include <vector>
#include <string>
#include <set>
#include <ostream>
#include <new> // for size_t
#include <teamcenter/soa/common/MemoryManager.hxx>
#include <teamcenter/soa/common/DateTime.hxx>
#include <teamcenter/soa/common/AutoPtr.hxx>
#include <teamcenter/soa/common/xml/BaseObject.hxx>
#include <teamcenter/soa/common/xml/XmlUtils.hxx>
#include <teamcenter/soa/common/xml/XmlStream.hxx>
#include <teamcenter/soa/common/xml/JsonStream.hxx>
#include <d6/schemas/work/_2012_02/manhourmanagement/Manhourmanagement_exports.h>
namespace D6
{
namespace Schemas
{
namespace Work
{
namespace _2012_02
{
namespace Manhourmanagement
{
class ManHourBillType;
typedef std::vector< Teamcenter::Soa::Common::AutoPtr<ManHourBillType> > ManHourBillTypeArray;
}
}
}
}
}
class MANHOURMANAGEMENT_API D6::Schemas::Work::_2012_02::Manhourmanagement::ManHourBillType :
public Teamcenter::Soa::Common::Xml::BaseObject
{
public:
ManHourBillType( );
std::string& getBillTypeInternal() ;
const std::string& getBillTypeInternal() const;
void setBillTypeInternal( const std::string& billTypeInternal );
std::string& getBillRateName() ;
const std::string& getBillRateName() const;
void setBillRateName( const std::string& billRateName );
std::string& getMyRefBR() ;
const std::string& getMyRefBR() const;
void setMyRefBR( const std::string& myRefBR );
virtual void outputXML( Teamcenter::Soa::Common::Xml::XmlStream& out ) const { outputXML( out, "ManHourBillType" ); }
virtual void outputXML( Teamcenter::Soa::Common::Xml::XmlStream& out, const std::string& elementName ) const;
virtual void parse ( const Teamcenter::Soa::Common::Xml::XMLNode& node );
virtual void getNamespaces( std::set< std::string >& namespaces ) const;
virtual void writeJSON( Teamcenter::Soa::Common::Xml::JsonStream* stream ) const;
virtual void parseJSON( const Teamcenter::Soa::Common::AutoPtr<Teamcenter::Soa::Internal::Json::JSONObject> node );
SOA_CLASS_NEW_OPERATORS
protected:
virtual ManHourBillType* reallyClone();
std::string m_billTypeInternal;
std::string m_billRateName;
std::string m_myRefBR;
};
#include <d6/schemas/work/_2012_02/manhourmanagement/Manhourmanagement_undef.h>
#endif
| [
"chunmeichan@gmail.com"
] | chunmeichan@gmail.com |
e747b2febfb59a0b37e5706b2a2707b088d40aea | d939ea588d1b215261b92013e050993b21651f9a | /domain/src/v20180808/model/DeleteTemplateResponse.cpp | e21cc9815eb24e15c7d4f55c6298174c17f8c413 | [
"Apache-2.0"
] | permissive | chenxx98/tencentcloud-sdk-cpp | 374e6d1349f8992893ded7aa08f911dd281f1bda | a9e75d321d96504bc3437300d26e371f5f4580a0 | refs/heads/master | 2023-03-27T05:35:50.158432 | 2021-03-26T05:18:10 | 2021-03-26T05:18:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,445 | cpp | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <tencentcloud/domain/v20180808/model/DeleteTemplateResponse.h>
#include <tencentcloud/core/utils/rapidjson/document.h>
#include <tencentcloud/core/utils/rapidjson/writer.h>
#include <tencentcloud/core/utils/rapidjson/stringbuffer.h>
using TencentCloud::CoreInternalOutcome;
using namespace TencentCloud::Domain::V20180808::Model;
using namespace rapidjson;
using namespace std;
DeleteTemplateResponse::DeleteTemplateResponse()
{
}
CoreInternalOutcome DeleteTemplateResponse::Deserialize(const string &payload)
{
Document d;
d.Parse(payload.c_str());
if (d.HasParseError() || !d.IsObject())
{
return CoreInternalOutcome(Error("response not json format"));
}
if (!d.HasMember("Response") || !d["Response"].IsObject())
{
return CoreInternalOutcome(Error("response `Response` is null or not object"));
}
Value &rsp = d["Response"];
if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString())
{
return CoreInternalOutcome(Error("response `Response.RequestId` is null or not string"));
}
string requestId(rsp["RequestId"].GetString());
SetRequestId(requestId);
if (rsp.HasMember("Error"))
{
if (!rsp["Error"].IsObject() ||
!rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() ||
!rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString())
{
return CoreInternalOutcome(Error("response `Response.Error` format error").SetRequestId(requestId));
}
string errorCode(rsp["Error"]["Code"].GetString());
string errorMsg(rsp["Error"]["Message"].GetString());
return CoreInternalOutcome(Error(errorCode, errorMsg).SetRequestId(requestId));
}
return CoreInternalOutcome(true);
}
| [
"tencentcloudapi@tenent.com"
] | tencentcloudapi@tenent.com |
126cdc42db8de944d90ff4dfc23851d8f4f1aa99 | 9bbfdc049ecce220e897258ccc125942640ac7ef | /OpenGL/shadow/shadow/camera.h | d5e9155d606e5c777c0a8a33ad3b5bef2af31e7b | [] | no_license | Niemand-co/Computer-Graphics | 4a98050d126dee66c2541b8bb984ab7b129bdd59 | 6c9d8033d84075078ffed0c6faa6d1a9968d2042 | refs/heads/main | 2023-03-18T19:51:15.598961 | 2021-03-04T12:31:46 | 2021-03-04T12:31:46 | 344,462,785 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,718 | h | #ifndef CAMERA_H
#define CAMERA_H
#include<glad/glad.h>
#include<glm/glm.hpp>
#include<glm/gtc/matrix_transform.hpp>
#include<vector>
enum camera_movement {
FORWARD,
BACKWARD,
LEFT,
RIGHT,
UP,
DOWN
};
const float YAW = -90.0f;
const float PITCH = 0.0f;
const float SPEED = 2.5f;
const float SENSITIVITY = 0.05f;
const float ZOOM = 45.0f;
class Camera {
public:
glm::vec3 Position;
glm::vec3 Front;
glm::vec3 Up;
glm::vec3 Right;
glm::vec3 WorldUp;
float Yaw;
float Pitch;
float movementSpeed;
float mouseSensitivity;
float zoom;
Camera(glm::u8vec3 position = glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 up = glm::vec3(0.0f, 1.0f, 0.0f), float yaw = YAW
, float pitch = PITCH) : Front(glm::vec3(0.0f, 0.0f, -1.0f)), movementSpeed(SPEED), mouseSensitivity(SENSITIVITY), zoom(ZOOM) {
Position = position;
WorldUp = up;
Yaw = yaw;
Pitch = pitch;
updateCameraVector();
}
Camera(float Xpos, float Ypos, float Zpos, float Xup, float Yup, float Zup, float yaw, float pitch) : Front(glm::vec3(0.0f, 0.0f, -1.0f))
, movementSpeed(SPEED), mouseSensitivity(SENSITIVITY), zoom(ZOOM) {
Position = glm::vec3(Xpos, Ypos, Zpos);
WorldUp = glm::vec3(Xup, Yup, Zup);
Pitch = pitch;
Yaw = yaw;
updateCameraVector();
}
glm::mat4 getViewMatrix() {
return glm::lookAt(Position, Position + Front, Up);
}
void processKeyboard(camera_movement direction, float deltaTime) {
float displacement = movementSpeed * deltaTime;
if (direction == FORWARD)
Position += Front * displacement;
else if (direction == BACKWARD)
Position -= Front * displacement;
else if (direction == RIGHT)
Position += Right * displacement;
else if (direction == LEFT)
Position -= Right * displacement;
else if (direction == UP)
Position += Up * displacement;
else if (direction == DOWN)
Position -= Up * displacement;
}
void processMouseMovement(float Xoffset, float Yoffset, GLboolean constrainPitch = true) {
Xoffset *= mouseSensitivity;
Yoffset *= mouseSensitivity;
Yaw += Xoffset;
Pitch += Yoffset;
if (constrainPitch) {
if (Pitch > 89.0f)
Pitch = 89.0f;
if (Pitch < -89.0f)
Pitch = -89.0f;
}
updateCameraVector();
}
void processMouseScroll(float Yoffset) {
zoom -= (float)Yoffset;
if (zoom < 1.0f)
zoom = 1.0f;
if (zoom > 45.0f)
zoom = 45.0f;
}
private:
void updateCameraVector() {
glm::vec3 front;
front.x = cos(glm::radians(Yaw)) * cos(glm::radians(Pitch));
front.y = sin(glm::radians(Pitch));
front.z = sin(glm::radians(Yaw)) * cos(glm::radians(Pitch));
Front = glm::normalize(front);
Right = glm::normalize(glm::cross(Front, WorldUp));
Up = glm::normalize(glm::cross(Right, Front));
}
};
#endif // !CAMERA_H
| [
"735232844@qq.com"
] | 735232844@qq.com |
cbb77bb00e75f3f9df49a8c9cfc058ca6ab1452e | efa3d708e129ba23f422ee160844e50a01d4b349 | /src/spacetree/impl/StaticTraversal.hpp | 30e8ff869bc2599eaa3193b88214faee37ff312b | [] | no_license | numsim1415/precice | 4ba9e9dc339bb857e9e39bbaaa707966f46d5e7b | 7bf685adf318a82001a2e2c06337f3a64633d1c1 | refs/heads/master | 2021-01-12T03:57:51.187846 | 2014-10-06T07:10:22 | 2014-10-06T07:10:22 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 25,719 | hpp | // Copyright (C) 2011 Technische Universitaet Muenchen
// This file is part of the preCICE project. For conditions of distribution and
// use, please see the license notice at http://www5.in.tum.de/wiki/index.php/PreCICE_License
#ifndef PRECICE_NEWSPACETREE_STATICTRAVERSAL_HPP_
#define PRECICE_NEWSPACETREE_STATICTRAVERSAL_HPP_
#include "spacetree/Spacetree.hpp"
#include "spacetree/impl/Environment.hpp"
#include "mesh/Merge.hpp"
#include "query/FindClosest.hpp"
#include "query/FindVoxelContent.hpp"
#include "boost/smart_ptr.hpp"
#include "utils/PointerVector.hpp"
#include "utils/Dimensions.hpp"
#include "tarch/logging/Log.h"
#include "utils/Helpers.hpp"
#include <list>
namespace precice {
namespace spacetree {
namespace impl {
template<typename CELL_T>
class StaticTraversal
{
public:
void refineAll (
CELL_T& cell,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
double refinementLimit,
Environment& environment );
int searchPosition (
CELL_T& cell,
const utils::DynVector& searchPoint,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths );
bool searchDistance (
CELL_T& cell,
query::FindClosest& findClosest,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths );
int searchContent (
CELL_T& cell,
query::FindVoxelContent& findContent,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths );
private:
struct RefineAllResult
{
int position;
std::list<CELL_T*> cells;
std::list<utils::DynVector> cellCenters;
std::list<utils::DynVector> cellHalflengths;
std::list<Environment> cellEnvironments;
RefineAllResult()
: position(Spacetree::positionUndefined()), cells(),
cellCenters(), cellHalflengths(), cellEnvironments() {}
};
struct SearchPositionResult
{
int position;
bool ambiguous;
std::list<CELL_T*> uncachedCells;
std::list<utils::DynVector> uncachedCellCenters;
query::FindClosest findClosest;
SearchPositionResult ( const utils::DynVector& searchPoint )
: position(Spacetree::positionUndefined()), ambiguous(false), uncachedCells(),
uncachedCellCenters(), findClosest(searchPoint) {}
};
struct SearchContentResult
{
int position;
std::list<CELL_T*> uncachedCells;
std::list<utils::DynVector> uncachedCellCenters;
SearchContentResult()
: position(Spacetree::positionUndefined()), uncachedCells(),
uncachedCellCenters() {}
};
static tarch::logging::Log _log;
void refineUndefinedCells (
RefineAllResult& refineAllResult,
CELL_T& cell,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
double refinementLimit );
void refineAllInternal (
CELL_T& cell,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
double refinementLimit,
Environment& environment,
RefineAllResult& result );
boost::shared_ptr<SearchPositionResult> searchPositionInternal (
CELL_T& cell,
const utils::DynVector& searchPoint,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths );
boost::shared_ptr<SearchContentResult> searchContentInternal (
CELL_T& cell,
query::FindVoxelContent& findContent,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths );
double distanceToBoundary (
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
const utils::DynVector& searchPoint ) const;
bool isCovered (
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
const utils::DynVector& voxelCenter,
const utils::DynVector& voxelHalflengths ) const;
bool isOverlapped (
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
const utils::DynVector& voxelCenter,
const utils::DynVector& voxelHalflengths ) const;
template<typename VISITOR_T>
void visitAllCells (
CELL_T& cell,
VISITOR_T& visitor );
template<typename VISITOR_T>
void visitRemainingCells (
const CELL_T& toExclude,
CELL_T& cell,
VISITOR_T& visitor );
};
// ----------------------------------------------------- HEADER IMPLEMENTATIONS
template<typename CELL_T>
tarch::logging::Log StaticTraversal<CELL_T>::
_log("precice::spacetree::impl::StaticTraversal");
template<typename CELL_T>
void StaticTraversal<CELL_T>:: refineAll
(
CELL_T& cell,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
double refinementLimit,
Environment& env )
{
preciceTrace3("refineAll()", cellCenter, cellHalflengths, refinementLimit);
// The environment gives information on the position of the cells surrounding
// a current cell of consideration. Since a mixture of in- and out-cells is
// not possible, the 0th component of the environment vector is used to
// indicate, whether there are only on-geometry, out-geometry (and on), or
// in-geometry (and on) cells surrounding.
utils::DynVector outsidePoint(cellHalflengths);
outsidePoint *= 2.0;
outsidePoint += cellCenter;
query::FindClosest findClosest(outsidePoint);
findClosest(cell.content());
assertion(not tarch::la::equals(findClosest.getClosest().distance, 0.0));
int pos = findClosest.getClosest().distance > 0
? Spacetree::positionOutsideOfGeometry()
: Spacetree::positionInsideOfGeometry();
env.setAllNeighborCellPositions(pos);
env.computePosition();
RefineAllResult result;
refineAllInternal(cell, cellCenter, cellHalflengths, refinementLimit, env, result);
refineUndefinedCells(result, cell, cellCenter, cellHalflengths, refinementLimit);
}
template<typename CELL_T>
void StaticTraversal<CELL_T>:: refineAllInternal
(
CELL_T& cell,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
double refinementLimit,
Environment& env,
RefineAllResult& result )
{
preciceTrace4 ( "refineAllInternal()", cellCenter, cellHalflengths,
refinementLimit, env.getNeighborCellPositions() );
using namespace tarch::la;
bool environmentIncomplete = false;
if (cell.isLeaf()){
preciceDebug(" Leaf");
if (cell.needsRefinement(cellHalflengths, refinementLimit)){
preciceDebug(" Needs refinement");
assertion(not cell.content().empty());
assertion(cell.getPosition() == Spacetree::positionOnGeometry());
cell.refine(cellCenter, cellHalflengths);
Environment oldEnvironment(env);
for (int i=0; i < cell.getChildCount(); i++){
CELL_T& childCell = cell.child(i);
if (childCell.getPosition() == Spacetree::positionUndefined()){
// Modify environment positions
const DynamicVector<int>& cellIndices = env.getNeighborCellIndices(i);
const DynamicVector<int>& sideIndices = env.getNeighborSideIndices(i);
assertion2(cellIndices.size() == sideIndices.size(),
cellIndices.size(), sideIndices.size());
for (int j=0; j < (int)cellIndices.size(); j++){
env.setNeighborCellPosition(
sideIndices[j], cell.child(cellIndices[j]).getPosition());
}
env.computePosition();
assertion(env.getPosition() != Spacetree::positionUndefined());
if (env.getPosition() != Spacetree::positionOnGeometry()){
preciceDebug(" Derive cell position " << env.getPosition()
<< " from environment = " << env.getNeighborCellPositions());
// If some of the surrounding cells are either outside or inside,
// the new empty cell has to be also outside or inside respectively.
childCell.setPosition(env.getPosition());
}
else {
preciceDebug(" Environment incomplete to derive position");
environmentIncomplete = true;
}
env = oldEnvironment;
}
}
}
}
if ( environmentIncomplete ){
preciceDebug ( " Incomplete environment, storing cell" );
result.cells.push_back(&cell);
result.cellCenters.push_back(cellCenter);
result.cellHalflengths.push_back(cellHalflengths);
result.cellEnvironments.push_back(env);
}
else if ( not cell.isLeaf() ){
preciceDebug ( " Node" );
assertion ( cell.getPosition() != Spacetree::positionUndefined() );
utils::DynVector childCenter(cellCenter.size());
utils::DynVector childHalflengths(cellCenter.size());
Environment oldEnvironment(env);
for ( int i=0; i < cell.getChildCount(); i++ ){
cell.getChildData(i, cellCenter, cellHalflengths, childCenter, childHalflengths);
CELL_T& childCell = cell.child(i);
// Modify environment positions
const DynamicVector<int>& cellIndices = env.getNeighborCellIndices(i);
const DynamicVector<int>& sideIndices = env.getNeighborSideIndices(i);
assertion2 ( cellIndices.size() == sideIndices.size(),
cellIndices.size(), sideIndices.size() );
for (int j=0; j < (int)cellIndices.size(); j++){
env.setNeighborCellPosition(
sideIndices[j], cell.child(cellIndices[j]).getPosition());
}
env.computePosition();
refineAllInternal ( childCell, childCenter, childHalflengths, refinementLimit,
env, result );
env = oldEnvironment;
}
}
}
template<typename CELL_T>
void StaticTraversal<CELL_T>:: refineUndefinedCells
(
RefineAllResult& refineAllResult,
CELL_T& cell,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
double refinementLimit )
{
preciceTrace3("refineUndefinedCells()", cellCenter, cellHalflengths, refinementLimit);
typename std::list<CELL_T*>::iterator cellIter;
std::list<utils::DynVector>::iterator centerIter;
std::list<utils::DynVector>::iterator hIter;
std::list<Environment>::iterator envIter;
cellIter = refineAllResult.cells.begin();
centerIter = refineAllResult.cellCenters.begin();
hIter = refineAllResult.cellHalflengths.begin();
envIter = refineAllResult.cellEnvironments.begin();
while ( cellIter != refineAllResult.cells.end() ){
assertion(centerIter != refineAllResult.cellCenters.end());
assertion(hIter != refineAllResult.cellHalflengths.end());
assertion(envIter != refineAllResult.cellEnvironments.end());
preciceDebug(" Compute child positions of cell with center = " << *centerIter
<< ", h = " << *hIter);
bool knowPosition = false;
int pos = Spacetree::positionUndefined();
for ( int i=0; i < (*cellIter)->getChildCount(); i++ ){
preciceDebug(" Child number " << i);
CELL_T& child = (*cellIter)->child(i);
if (child.getPosition() == Spacetree::positionUndefined()){
if (knowPosition){
preciceDebug(" Know position already, position = " << pos);
child.setPosition(pos);
}
else {
preciceDebug(" Compute position by findDistance");
query::FindClosest findDistance ( *centerIter );
searchDistance ( cell, findDistance, cellCenter, cellHalflengths );
assertion(not tarch::la::equals(findDistance.getEuclidianDistance(), 0.0));
pos = findDistance.getClosest().distance > 0
? Spacetree::positionOutsideOfGeometry()
: Spacetree::positionInsideOfGeometry();
preciceDebug(" Set computed position = " << pos);
child.setPosition(pos);
knowPosition = true;
}
}
}
RefineAllResult result;
preciceDebug(" Go on computing subcell positions");
refineAllInternal ( **cellIter, *centerIter, *hIter, refinementLimit, *envIter, result );
refineUndefinedCells ( result, cell, cellCenter, cellHalflengths, refinementLimit );
cellIter++;
centerIter++;
hIter++;
envIter++;
}
}
template<typename CELL_T>
int StaticTraversal<CELL_T>:: searchPosition
(
CELL_T& cell,
const utils::DynVector& searchPoint,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths )
{
preciceTrace3 ( "searchPosition()", searchPoint, cellCenter, cellHalflengths );
typedef boost::shared_ptr<SearchPositionResult> PtrResult;
PtrResult result = searchPositionInternal ( cell, searchPoint, cellCenter,
cellHalflengths );
assertion ( result.use_count() > 0 );
assertion ( result->position != Spacetree::positionUndefined() );
assertion ( result->uncachedCells.empty() );
return result->position;
}
template<typename CELL_T>
bool StaticTraversal<CELL_T>:: searchDistance
(
CELL_T& cell,
query::FindClosest& findClosest,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths )
{
preciceTrace2 ( "searchDistance()", cellCenter, cellHalflengths );
if ( cell.isLeaf() ){
preciceDebug ( " Leaf" );
findClosest ( cell.content() );
}
if ( not cell.isLeaf() ){
preciceDebug ( " Node" );
int childIndex = cell.getChildIndex (findClosest.getSearchPoint(), cellCenter,
cellHalflengths);
utils::DynVector newCenter(cellCenter);
utils::DynVector newHalflengths(cellHalflengths);
cell.getChildData (childIndex, cellCenter, cellHalflengths, newCenter,
newHalflengths);
CELL_T& subtree = cell.child ( childIndex );
bool ambiguous = searchDistance(subtree, findClosest, newCenter,
newHalflengths );
if ( ambiguous ){
visitRemainingCells ( subtree, cell, findClosest );
}
}
if ( findClosest.hasFound() ){
double distance = distanceToBoundary(cellCenter, cellHalflengths,
findClosest.getSearchPoint());
using tarch::la::greater;
bool isAmbiguous = greater ( findClosest.getEuclidianDistance(), distance );
preciceDebug ( " hasfound, return " << isAmbiguous );
return isAmbiguous;
}
preciceDebug ( " return true" );
return true;
}
template<typename CELL_T>
int StaticTraversal<CELL_T>:: searchContent
(
CELL_T& cell,
query::FindVoxelContent& findContent,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths )
{
preciceTrace2 ( "searchContent()", findContent.getVoxelCenter(),
findContent.getVoxelHalflengths() );
boost::shared_ptr<SearchContentResult> result = searchContentInternal (
cell, findContent, cellCenter, cellHalflengths );
assertion ( result.use_count() > 0 );
assertion ( result->uncachedCells.empty() );
if ( result->position == Spacetree::positionUndefined() ){
// Some/all searched cells had content, but not in the search voxel
if ( result->position == Spacetree::positionUndefined() ){
preciceDebug ( "Computing position of search voxel" );
query::FindClosest findDistance ( findContent.getVoxelCenter() );
searchDistance ( cell, findDistance, cellCenter, cellHalflengths );
double distance = findDistance.getClosest().distance;
assertion ( not tarch::la::equals(distance, 0.0) );
result->position = distance > 0 ? Spacetree::positionOutsideOfGeometry()
: Spacetree::positionInsideOfGeometry();
}
}
assertion ( result->position != Spacetree::positionUndefined() );
preciceDebug ( "return content().size() = " << findContent.content().size() );
return result->position;
}
template<typename CELL_T>
boost::shared_ptr<typename StaticTraversal<CELL_T>::SearchPositionResult>
StaticTraversal<CELL_T>:: searchPositionInternal
(
CELL_T& cell,
const utils::DynVector& searchPoint,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths )
{
preciceTrace3 ( "searchPositionInternal()", searchPoint, cellCenter,
cellHalflengths );
using namespace tarch::la;
boost::shared_ptr<SearchPositionResult> data;
double distance = 0.0;
if ( cell.isLeaf() ){
preciceDebug ( " Leaf" );
assertion ( data.use_count() == 0 );
data = boost::shared_ptr<SearchPositionResult> (
new SearchPositionResult(searchPoint) );
if ( cell.getPosition() == Spacetree::positionOnGeometry() ){
preciceDebug ( " Has content" );
//query::FindClosest findClosest ( searchPoint );
data->findClosest ( cell.content() );
if ( data->findClosest.hasFound() ){
preciceDebug ( " Found elements" );
distance = data->findClosest.getClosest().distance;
data->position = Spacetree::positionOnGeometry(); // May by altered later
}
}
else {
preciceDebug ( " Is empty" );
assertion ( cell.content().empty() );
assertion ( cell.getPosition() != Spacetree::positionUndefined() );
data->position = cell.getPosition();
}
}
if ( not cell.isLeaf() ) { // could be a leaf on entrance to searchPositionInternal
preciceDebug ( " Node" );
assertion ( cell.getPosition() == Spacetree::positionOnGeometry() );
int childIndex = cell.getChildIndex(searchPoint, cellCenter, cellHalflengths);
utils::DynVector newCenter(cellCenter);
utils::DynVector newHalflengths(cellHalflengths);
cell.getChildData (childIndex, cellCenter, cellHalflengths, newCenter,
newHalflengths);
CELL_T& subtree = cell.child(childIndex);
assertion ( data.use_count() == 0 );
data = searchPositionInternal ( subtree, searchPoint, newCenter, newHalflengths );
if ( (data->position == Spacetree::positionUndefined()) || data->ambiguous ){
preciceDebug ( " Did not find elements or ambiguous, visit others" );
visitRemainingCells(subtree, cell, data->findClosest);
if ( data->findClosest.hasFound() ){
preciceDebug ( " Found elements in others" );
distance = data->findClosest.getClosest().distance;
data->position = Spacetree::positionOnGeometry();
data->ambiguous = false;
}
}
}
// Set inside/outside and check for ambiguities
if ( not equals(distance, 0.0) ){
preciceDebug( " Checking for ambiguities of found objects");
assertion ( data.use_count() > 0 );
if ( greater(distance, 0.0) ){
data->position = Spacetree::positionOutsideOfGeometry();
}
else if ( tarch::la::greater(0.0, distance) ){
data->position = Spacetree::positionInsideOfGeometry();
}
preciceDebug ( " found pos = " << data->position );
double distanceToBound = distanceToBoundary(cellCenter, cellHalflengths,
searchPoint);
if ( greater(std::abs(distance), distanceToBound) ){
preciceDebug ( " is ambigious" );
data->ambiguous = true;
}
}
preciceDebug ( " return position = " << data->position << ", ambiguous = "
<< data->ambiguous );
return data;
}
template<typename CELL_T>
boost::shared_ptr<typename StaticTraversal<CELL_T>::SearchContentResult>
StaticTraversal<CELL_T>:: searchContentInternal
(
CELL_T& cell,
query::FindVoxelContent& findContent,
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths )
{
preciceTrace4 ( "searchContentInternal()", cellCenter, cellHalflengths,
findContent.getVoxelCenter(), findContent.getVoxelHalflengths() );
if ( cell.isLeaf() ){
preciceDebug ( "Leaf..." );
boost::shared_ptr<SearchContentResult> data ( new SearchContentResult() );
assertion ( cell.getPosition() != Spacetree::positionUndefined() );
if ( (cell.getPosition() == Spacetree::positionOutsideOfGeometry())
|| (cell.getPosition() == Spacetree::positionInsideOfGeometry()) )
{
preciceDebug ( "empty, position = " << cell.getPosition() );
data->position = cell.getPosition();
}
else {
preciceDebug ( "content size = " << cell.content().size() );
assertion ( cell.getPosition() == Spacetree::positionOnGeometry() );
assertion ( not cell.content().empty() );
bool set = isCovered ( cellCenter, cellHalflengths,
findContent.getVoxelCenter(),
findContent.getVoxelHalflengths() );
set &= findContent.getBoundaryInclusion() == query::FindVoxelContent::INCLUDE_BOUNDARY;
if ( set ){
preciceDebug ( "Is covered by voxel, add cell content to find content" );
findContent.content().add ( cell.content() );
data->position = Spacetree::positionOnGeometry();
}
else {
preciceDebug ( "Isn't covered by voxel, apply find content" );
findContent ( cell.content() );
if ( not findContent.content().empty() ){
preciceDebug("Some content is contained in voxel");
data->position = Spacetree::positionOnGeometry();
}
}
}
preciceDebug ( "return size = " << findContent.content().size()
<< ", pos = " << data->position );
return data;
}
if ( not cell.isLeaf() ) {
preciceDebug ( "Node..." );
int searchCount = 0;
boost::shared_ptr<SearchContentResult> data ( new SearchContentResult() );
utils::DynVector childCenter(cellCenter.size());
utils::DynVector childHalflengths(cellCenter.size());
for ( int i=0; i < cell.getChildCount(); i++ ){
cell.getChildData(i, cellCenter, cellHalflengths, childCenter, childHalflengths);
if ( isOverlapped(childCenter, childHalflengths,
findContent.getVoxelCenter(), findContent.getVoxelHalflengths()) )
{
boost::shared_ptr<SearchContentResult> tempData ( new SearchContentResult() );
searchCount++;
CELL_T& childCell = cell.child(i);
tempData = searchContentInternal ( childCell, findContent, childCenter,
childHalflengths );
if ( (tempData->position != Spacetree::positionUndefined())
&& (data->position == Spacetree::positionUndefined()) )
{
data->position = tempData->position;
}
else if ( tempData->position == Spacetree::positionOnGeometry() ){
data->position = Spacetree::positionOnGeometry();
}
//# ifdef Asserts
// else if ( (tempData->position != Spacetree::positionUndefined())
// && (data->position != Spacetree::positionOnGeometry()) )
// {
// assertion ( tempData->position == data->position );
// }
//# endif // Asserts
}
}
return data;
}
preciceError("findContentInternal()", "Reached invalid code location!");
}
template<typename CELL_T>
double StaticTraversal<CELL_T>:: distanceToBoundary
(
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
const utils::DynVector& searchPoint ) const
{
utils::DynVector centerDiff ( cellCenter );
centerDiff -= searchPoint;
tarch::la::abs(centerDiff, centerDiff);
double maxDistanceToCenter = tarch::la::max ( centerDiff );
assertion ( tarch::la::greaterEquals(cellHalflengths[0], maxDistanceToCenter) );
return cellHalflengths[0] - maxDistanceToCenter;
}
template<typename CELL_T>
bool StaticTraversal<CELL_T>:: isCovered
(
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
const utils::DynVector& voxelCenter,
const utils::DynVector& voxelHalflengths ) const
{
preciceTrace4 ( "isCovered()", cellCenter, cellHalflengths, voxelCenter,
voxelHalflengths );
utils::DynVector coverage ( cellCenter );
coverage -= voxelCenter;
tarch::la::abs ( coverage, coverage );
coverage += cellHalflengths;
preciceDebug ( "return " << not tarch::la::oneGreater(coverage, voxelHalflengths) );
return not tarch::la::oneGreater(coverage, voxelHalflengths);
}
template<typename CELL_T>
bool StaticTraversal<CELL_T>:: isOverlapped
(
const utils::DynVector& cellCenter,
const utils::DynVector& cellHalflengths,
const utils::DynVector& voxelCenter,
const utils::DynVector& voxelHalflengths ) const
{
preciceTrace4 ( "isOverlapped()", cellCenter, cellHalflengths, voxelCenter,
voxelHalflengths );
utils::DynVector overlap = cellCenter;
overlap -= voxelCenter;
tarch::la::abs ( overlap, overlap );
overlap -= cellHalflengths;
preciceDebug ( "return = " << tarch::la::allGreater(voxelHalflengths, overlap) );
return tarch::la::allGreater(voxelHalflengths, overlap);
}
template<typename CELL_T>
template<typename VISITOR_T>
void StaticTraversal<CELL_T>:: visitAllCells
(
CELL_T& cell,
VISITOR_T& visitor )
{
if ( cell.isLeaf() ){
visitor(cell.content());
}
else {
for ( int i=0; i < cell.getChildCount(); i++ ){
visitAllCells ( cell.child(i), visitor );
}
}
}
template<typename CELL_T>
template<typename VISITOR_T>
void StaticTraversal<CELL_T>:: visitRemainingCells
(
const CELL_T& toExclude,
CELL_T& cell,
VISITOR_T& visitor )
{
assertion ( not cell.isLeaf() );
for ( int i=0; i < cell.getChildCount(); i++ ){
if ( &toExclude != &cell.child(i) ) {
visitAllCells ( cell.child(i), visitor );
}
}
}
}}} // namespace precice, spacetree, impl
#endif /* PRECICE_NEWSPACETREE_STATICTRAVERSAL_HPP_ */
| [
"gatzhamm@in.tum.de"
] | gatzhamm@in.tum.de |
8851dda60e05efd55d10e3d1afe56491318a1c0b | 57870c29d6bf7c47ab6b0073ab67bf4ec33e5369 | /ChartDrawer/ChartDrawer/CChartView.cpp | 10e910b5ddcf2512e54dad4292d523a419b93c18 | [] | no_license | daria-grebneva/OOD | 48952d2ad269114a89e440fbf1aacd0041e77352 | 58aff752b2f36eec6ab64010f1fe7bf887b4e4ed | refs/heads/master | 2020-04-20T19:24:42.011376 | 2019-06-03T06:36:39 | 2019-06-03T06:36:39 | 169,048,770 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,968 | cpp | #include "stdafx.h"
#include "CChartView.h"
CChartView::CChartView()
{
}
CChartView::~CChartView()
{
}
void CChartView::SetData(const Points2D& data)
{
m_points = data;
UpdateBounds();
RedrawWindow();
}
void CChartView::UpdateBounds()
{
m_leftTop = m_rightBottom = Point2D(0, 0);
if (!m_points.empty())
{
m_leftTop = m_points.front();
m_rightBottom = m_points.front();
for (auto& pt : m_points)
{
m_leftTop.x = min(m_leftTop.x, pt.x);
m_rightBottom.x = max(m_rightBottom.x, pt.x);
m_leftTop.y = min(m_leftTop.y, pt.y);
m_rightBottom.y = max(m_rightBottom.y, pt.y);
}
if (m_leftTop.y == m_rightBottom.y)
{
m_leftTop.y -= 1;
m_rightBottom.y += 1;
}
if (m_leftTop.x == m_rightBottom.x)
{
m_leftTop.x -= 1;
m_rightBottom.x += 1;
}
}
}
void CChartView::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
if (m_points.empty())
{
return;
}
CRect rc = lpDrawItemStruct->rcItem;
int w = rc.Width();
int h = rc.Height();
double graphWidth = m_rightBottom.x - m_leftTop.x;
double graphHeight = m_rightBottom.y - m_leftTop.y;
double scaleX = w / graphWidth;
double scaleY = h / graphHeight;
auto TransformX = [&](double x) {
return int((x - m_leftTop.x) * scaleX);
};
auto TransformY = [&](double y) {
return int((y - m_leftTop.y) * scaleY);
};
auto dc = CDC::FromHandle(lpDrawItemStruct->hDC);
dc->FillSolidRect(0, 0, w, h, RGB(255, 255, 255));
dc->MoveTo(TransformX(0), TransformY(m_leftTop.y));
dc->LineTo(TransformX(0), TransformY(m_rightBottom.y));
dc->MoveTo(TransformX(m_leftTop.x), TransformY(0));
dc->LineTo(TransformX(m_rightBottom.x), TransformY(0));
CPen pen;
pen.CreatePen(PS_SOLID, 1, RGB(255, 0, 0));
auto oldPen = dc->SelectObject(&pen);
dc->MoveTo(TransformX(m_points.front().x), TransformY(m_points.front().y));
for (size_t i = 1; i < m_points.size(); ++i)
{
auto& pt = m_points[i];
dc->LineTo(TransformX(pt.x), TransformY(pt.y));
}
dc->SelectObject(oldPen);
}
| [
"greda2598@gmail.com"
] | greda2598@gmail.com |
ee0379111e3048f7e5bf181c3dabc67571bc27e7 | 244e37c131f0b58ad6c33e5c5eacd6c422d67fbb | /joindialog.cpp | 5275b0045c25c66e65266f4f4f917f00c8de718f | [] | no_license | aki237/chatterbox | e18298041047827511d3c7ca9e4f9f558c98576a | 785c02ce3b972bfea58cd4bd3f2324404a06a3ba | refs/heads/master | 2020-04-17T15:04:02.135063 | 2017-08-25T06:57:04 | 2017-08-25T06:57:04 | 67,438,731 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 515 | cpp | #include "joindialog.h"
JoinDialog::JoinDialog(QObject *p_parent) : dui(new Ui::Dialog)
{
parent = p_parent;
this->setWindowTitle ("Join chatPi network");
this->setModal (true);
dui->setupUi (this);
dui->nickname->setValidator (new QRegExpValidator(QRegExp("[0-9,A-Z,a-z]{1,20}")));
dui->password->setValidator (new QRegExpValidator(QRegExp("[0-9,A-Z,a-z]{1,20}")));
connect(this, SIGNAL(accepted()), parent, SLOT(Join()));
connect(this, SIGNAL(rejected()), parent, SLOT(Out()));
}
| [
"akilan1997@gmail.com"
] | akilan1997@gmail.com |
4f2121a599bfff6075e15fee173a1495b3d4516d | 0b3d17131917bc7097156219ddc2e05a416f8eed | /Arduino/TEmp/TEmp.ino | 895c3edc7f8fff839cdffedd2409680bce68b941 | [] | no_license | rkbear-mirp/rkbear-mirp | e849352356d7bc2e66790f5293c35f97693cbce6 | 2c59005b49128867789f3106eba8dbbb22134b81 | refs/heads/master | 2021-01-23T02:00:14.551396 | 2017-06-16T01:28:53 | 2017-06-16T01:28:53 | 92,903,122 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 175 | ino | void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello");
}
| [
"asaha-mirp@mit.edu"
] | asaha-mirp@mit.edu |
f3d04769f9a1ffe3463bfb3808ae7f76e99af4d9 | fb8a82d8cdedf9095b455e6457f312a90f791745 | /matrix.cpp | ce7f668d0f36e7f68cf3c99939188125de75b28e | [] | no_license | Napol-Napol/Practice-algorithm | 07885a42205e9ff67403feaf6f65e2c40f1b0ab5 | dca90b016cc1e3303e8ee8e42102655f06e256b6 | refs/heads/master | 2023-07-10T01:56:57.041349 | 2023-06-29T04:38:40 | 2023-06-29T04:38:40 | 279,951,280 | 0 | 1 | null | 2023-06-29T04:38:41 | 2020-07-15T18:49:28 | C++ | WINDOWS-1252 | C++ | false | false | 573 | cpp | #include <iostream>
using namespace std;
int matrix1[100][100]; //NxM Çà·Ä
int matrix2[100][100]; //MxK Çà·Ä
int main() {
int n, m, k;
cin >> n >> m;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
cin >> matrix1[i][j];
cin >> m >> k;
for (int i = 0; i < m; i++)
for (int j = 0; j < k; j++)
cin >> matrix2[i][j];
for (int i = 0; i < n; i++) {
for (int j = 0; j < k; j++) {
int sum = 0;
for (int h = 0; h < m; h++) {
sum += matrix1[i][h] * matrix2[h][j];
}
cout << sum << " ";
}
cout << endl;
}
system("pause");
} | [
"gc9612@gmail.com"
] | gc9612@gmail.com |
3dad9c205c7c09052b8ed463cdcb5867ea941b18 | 6d4299ea826239093a91ff56c2399f66f76cc72a | /Visual Studio 2017/Projects/baekjun/baekjun/11502.cpp | 9d6c2588a4e592fb7851707d438e1160ee2c9234 | [] | no_license | kongyi123/Algorithms | 3eba88cff7dfb36fb4c7f3dc03800640b685801b | 302750036b06cd6ead374d034d29a1144f190979 | refs/heads/master | 2022-06-18T07:23:35.652041 | 2022-05-29T16:07:56 | 2022-05-29T16:07:56 | 142,523,662 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 672 | cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int check[2000];
int main(void) {
int t;
check[1] = check[0] = 1;
for (int i = 2;i <= 1100;i++) {
for (int j = i * 2;j <= 1100;j += i) {
check[j] = 1;
}
}
fscanf(stdin, "%d", &t);
for (int i = 1;i <= t;i++) {
int n;
fscanf(stdin, "%d", &n);
int flag = 0;
for (int a = 1;a <= n;a++) {
if (check[a]) continue;
for (int b = a;b <= n;b++) {
if (check[b]) continue;
int c = n - (a + b);
if (c < 0) break;
if (check[c]) continue;
flag = 1;
fprintf(stdout, "%d %d %d\n", a, b, c);
a = b = n;
break;
}
}
if (flag == 0) fprintf(stdout, "0\n");
}
return 0;
} | [
"kongyi123@nate.com"
] | kongyi123@nate.com |
fe0bb48cd4538cb9148691f38d5f64d197625722 | 0926ce7b4ab7b18968e5d3ec2dce2afa14e286e2 | /Libraries/open-powerplant/PowerPlantX/Files/PPxFSObject.h | 0fc2ba3b7298d8098a521a04daecb703eb58aa8a | [
"Apache-2.0"
] | permissive | quanah/mulberry-main | dd4557a8c1fe3bc79bb76a2720278b2332c7d0ae | 02581ac16f849c8d89e6a22cb97b07b7b5e7185a | refs/heads/master | 2020-06-18T08:48:01.653513 | 2019-07-11T01:59:15 | 2019-07-11T01:59:15 | 196,239,708 | 1 | 0 | null | 2019-07-10T16:26:52 | 2019-07-10T16:26:51 | null | WINDOWS-1252 | C++ | false | false | 6,515 | h | // Copyright ©2005, 2006 Freescale Semiconductor, Inc.
// Please see the License for the specific language governing rights and
// limitations under the License.
// ===========================================================================
// PPxFSObject.h
//
// Copyright © 2002-2005 Metrowerks Corporation. All rights reserved.
//
// $Date: 2006/01/18 01:37:19 $
// $Revision: 1.1.1.1 $
// ===========================================================================
/**
@file PPxFSObject.h
@brief Wrapper for FSRef and related File Manager and MoreFiles X
functions
*/
#ifndef H_PPxFSObject
#define H_PPxFSObject
#pragma once
#include <PPxPrefix.h>
#include <SysCFString.h>
#include "MoreFilesX.h"
namespace PPx {
class CFURL;
class Folder;
// ===========================================================================
// FSObject
/**
Wrapper for a system file reference (FSRef) and related File Manager
and MoreFiles X functions.
FSObject supports describing an entity that does not yet exist. FSRef
does not have this feature, but FSSpec, the former standard OS file
description, does have this feature.
Entities that do not exist are described by their name and parent folder.
The File and Folder subclasses of FSObject have CreateOnDisk() functions
to create an entity. FSObject throws an exception if you attempt to
perform a file system operation on an entity that does not exist. */
class FSObject {
public:
// Constructors
FSObject();
explicit FSObject( const FSRef& inFSRef );
FSObject(
const FSRef& inParentRef,
const CFString& inName);
FSObject(
const FSRef& inParentRef,
const HFSUniStr255& inName);
FSObject(
FSVolumeRefNum inVRefNum,
SInt32 inParentDirID,
const CFString& inName);
FSObject(
FSVolumeRefNum inVRefNum,
SInt32 inParentDirID,
const HFSUniStr255& inName);
FSObject(
const FSSpec& inFSSpec,
CFStringEncoding inNameEncoding = encoding_System);
explicit FSObject( CFURLRef inURL );
FSObject(
const CFString& inAbsolutePath,
CFURLPathStyle inPathStyle = kCFURLPOSIXPathStyle);
FSObject(
const CFString& inRelativePath,
const FSRef& inBaseDir,
CFURLPathStyle inPathStyle = kCFURLPOSIXPathStyle);
FSObject( const FSObject& inOriginal );
virtual ~FSObject();
// Assignment operators
FSObject& operator = ( const FSObject& inSource );
FSObject& operator = ( const FSRef& inFSRef );
// State accessors
const FSRef& UseRef() const;
bool IsValid() const;
bool Exists() const;
// Comparison
bool IsEqualTo( const FSObject& inOther ) const;
bool IsEqualTo( const FSRef& inFSRef ) const;
OSStatus CompareTo( const FSObject& inOther ) const;
OSStatus CompareTo( const FSRef& inFSRef ) const;
// Getting file system information
void GetName( HFSUniStr255& outName ) const;
CFString GetName() const;
CFString GetPath( CFURLPathStyle inPathStyle = kCFURLPOSIXPathStyle ) const;
FSVolumeRefNum GetVolume() const;
void GetParent( FSRef& outParentRef ) const;
void GetParent( FSObject &outParent ) const;
SInt32 GetParentDirID() const;
void GetFSSpec(
FSSpec& outSpec,
CFStringEncoding inNameEncoding = encoding_System) const;
CFURL GetURL() const;
void GetCatalogInfo(
FSCatalogInfoBitmap inWhichInfo,
FSCatalogInfo& outCatInfo) const;
void SetCatalogInfo(
FSCatalogInfoBitmap inWhichInfo,
const FSCatalogInfo& inCatInfo);
bool IsFile() const;
bool IsFolder() const;
OSStatus CheckLock() const;
void SetIsLocked( bool inLock );
// Getting/Setting Finder information
void GetFinderInfo(
FinderInfo* outFinderInfo,
ExtendedFinderInfo* outExtFinderInfo = nil,
bool* outIsFolder = nil) const;
void SetFinderInfo(
const FinderInfo* inFinderInfo,
const ExtendedFinderInfo* inExtFinderInfo = nil);
UInt16 GetFinderFlags() const;
void ChangeFinderFlags(
bool inSetFlags,
UInt32 inFlagsToChange);
// File system operations
void Rename( const HFSUniStr255& inName,
TextEncoding inEncodingHint = kTextEncodingUnknown);
void Rename( const CFString& inName,
TextEncoding inEncodingHint = kTextEncodingUnknown);
void Delete();
void DeleteContainer();
void DeleteContainerContents();
// State change operations
void Update();
void Invalidate();
private:
FSRef& GetRef();
void InitFromVolDirName(
FSVolumeRefNum inVRefNum,
SInt32 inParentDirID,
const HFSUniStr255& inName);
void InitFromURL( CFURLRef inURLRef );
private:
enum EState {
ref_Invalid,
ref_Exists,
ref_ParentAndName
};
FSRef mFSRef; /**< System file reference */
CFString mName; /**< Name of file */
EState mState; /**< State of file reference */
};
// -----------------------------------------------------------------------
// IsValid
/**
Returns whether the FSObject refers to a valid file system item
@return Whether the FSObject refers to a valid file system item */
inline bool
FSObject::IsValid() const
{
return (mState != ref_Invalid);
}
// -----------------------------------------------------------------------
// Exists
/**
Returns whether the FSObject refers to an existing file system item
@return Whether the FSObject refers to an existing file system item */
inline bool
FSObject::Exists() const
{
return (mState == ref_Exists);
}
// -----------------------------------------------------------------------
// IsEqualTo
/**
Returns whether the FSObject is equal to another FSObject
@param inOther FSObject to which to compare
@return Whether the FSObject is equal to the other FSObject */
inline bool
FSObject::IsEqualTo(const FSObject &inOther) const
{
return (CompareTo(inOther) == noErr);
}
// -----------------------------------------------------------------------
// IsEqualTo
/**
Returns whether the FSObject is equal to a FSRef
@param inFSRef FSRef to which to compare
@return Whether the FSObject refers to the same item as the FSRef */
inline bool
FSObject::IsEqualTo(const FSRef &inFSRef) const
{
return (CompareTo(inFSRef) == noErr);
}
} // namespace PPx
#endif // H_PPxFSObject
| [
"mdietze@gmail.com"
] | mdietze@gmail.com |
39d3bf9c520230d8cb00a8d3e344903a093ef40c | 78bae575fe525533c5bb0f6ac0c8075b11a4271d | /525 Contiguous Array.cpp | b6a185aba063fce37e075e935a716d36cd968b00 | [] | no_license | Shubhamrawat5/LeetCode | 23eba3bfd3a03451d0f04014cb47de12504b6399 | 939b5f33ad5aef78df761e930d6ff873324eb4bb | refs/heads/master | 2023-07-18T00:01:21.140280 | 2021-08-21T18:51:27 | 2021-08-21T18:51:27 | 280,733,721 | 1 | 3 | null | 2020-10-21T11:18:24 | 2020-07-18T20:26:20 | C++ | UTF-8 | C++ | false | false | 632 | cpp | #include<iostream>
#include<vector>
#include<unordered_map>
using namespace std;
int findMaxLength(vector<int>& nums) {
int i;
if(nums.empty()) return 0;
nums[0]=nums[0]?1:-1;
for(i=1;i<nums.size();++i)
if(nums[i]==0) nums[i]=nums[i-1]-1;
else nums[i]=nums[i-1]+1;
// for(auto k:nums) cout<<k<<" ";
unordered_map<int,int> mp;
mp[0]=0;
int m=0;
for(i=0;i<nums.size();++i)
{
if(mp.find(nums[i])==mp.end())
mp[nums[i]]=i+1;
else
m=max(m,i+1-mp[nums[i]]);
}
/* for(auto k:mp)
cout<<k.first<<" "<<k.second<<endl;
cout<<m;*/
return m;
}
int main()
{
vector<int> v={0,1,0};
cout<<findMaxLength(v);
} | [
"sr856161@gmail.com"
] | sr856161@gmail.com |
71e25c218bd9bc7901d3d9a5b9b8520caa1f0836 | 94e5a9e157d3520374d95c43fe6fec97f1fc3c9b | /@DOC by DIPTA/Oldest/math10 code library/Data Structure/Trie(link list).cpp | 8a0fbb474c28be8166e604accbf129a6ed9107cb | [
"MIT"
] | permissive | dipta007/Competitive-Programming | 0127c550ad523884a84eb3ea333d08de8b4ba528 | 998d47f08984703c5b415b98365ddbc84ad289c4 | refs/heads/master | 2021-01-21T14:06:40.082553 | 2020-07-06T17:40:46 | 2020-07-06T17:40:46 | 54,851,014 | 8 | 4 | null | 2020-05-02T13:14:41 | 2016-03-27T22:30:02 | C++ | UTF-8 | C++ | false | false | 1,144 | cpp | #define max_child 128
int get_id(int id){
return id;
}
struct node{
int val;
node *next[max_child];
node(){
val=0;
rep(i,max_child)
next[i]=NULL;
}
};
node *root=new node();
int tot;
void insert(string str){
node *curr=root;
int len = str.size();
rep(i,len){
if(curr->next[get_id(str[i])]==NULL){
curr->next[get_id(str[i])]=new node();
}
curr=curr->next[get_id(str[i])];
}
curr->val++;
}
bool find(string str){
node *curr=root;
int len = str.size();
rep(i,len){
if(curr->next[get_id(str[i])]==NULL){
return 0;
}
curr=curr->next[get_id(str[i])];
}
return (curr->val != 0);
}
void traverse(node *p){
rep(i,max_child){
if(p->next[i]!=NULL){
traverse(p->next[i]);
p->next[i] = NULL;
delete p->next[i];
}
}
}
| [
"iamdipta@gmail.com"
] | iamdipta@gmail.com |
62a4c7d6ca81a6e62061e99961531367952f3a36 | 7974d2b8aa577dff94ef9036bf69af6b3f42754c | /moses/src/RuleTable/LoaderStandard.h | aea1b447e1ef6b6a157ae5eb6d48c478713c31f4 | [] | no_license | xwd/mosesGit-hiero | a01382c6f72721e0717005093b2acb0d8121a9e4 | 7346f8614462cf3e9cdd7c69b4693ab309094afd | refs/heads/master | 2021-01-19T10:08:19.547148 | 2012-12-08T14:45:14 | 2012-12-08T14:45:14 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,887 | h | /***********************************************************************
Moses - statistical machine translation system
Copyright (C) 2006-2011 University of Edinburgh
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***********************************************************************/
#pragma once
#include "RuleTable/Loader.h"
namespace Moses
{
enum FormatType
{
MosesFormat
,HieroFormat
};
class RuleTableLoaderStandard : public RuleTableLoader
{
protected:
bool Load(FormatType format,
const std::vector<FactorType> &input,
const std::vector<FactorType> &output,
std::istream &inStream,
const std::vector<float> &weight,
size_t tableLimit,
const LMList &languageModels,
const WordPenaltyProducer* wpProducer,
RuleTableTrie &);
public:
bool Load(const std::vector<FactorType> &input,
const std::vector<FactorType> &output,
std::istream &inStream,
const std::vector<float> &weight,
size_t tableLimit,
const LMList &languageModels,
const WordPenaltyProducer* wpProducer,
RuleTableTrie &);
};
} // namespace Moses
| [
"wenduan.xu@cl.cam.ac.uk"
] | wenduan.xu@cl.cam.ac.uk |
ae715d8dc25126c324a123231acd77b41d603259 | 29b81bdc013d76b057a2ba12e912d6d4c5b033ef | /boost/include/boost/test/detail/throw_exception.hpp | 7964803a039c343411d40126a8e466483fc690ac | [] | no_license | GSIL-Monitor/third_dependences | 864d2ad73955ffe0ce4912966a4f0d1c60ebd960 | 888ebf538db072a92d444a9e5aaa5e18b0f11083 | refs/heads/master | 2020-04-17T07:32:49.546337 | 2019-01-18T08:47:28 | 2019-01-18T08:47:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 129 | hpp | version https://git-lfs.github.com/spec/v1
oid sha256:f9b3784728189bf300e22f7adf07d5114b9538df798c5f42b2e00caa3cfb0f24
size 2143
| [
"you@example.com"
] | you@example.com |
5c4400716054f957b8a733f054548508e7766b71 | 89dd6f2ec8ef1c1dd8bf2515c021753756b9ed66 | /Common/Resolve.cpp | de12ef732a97379a90e7055a7292a1611a6585e4 | [
"Artistic-1.0"
] | permissive | d0liver/realpolitik | 51d468e74311ce69674a17cc331b515b9fbd9b8d | 3aa6d7238f3eb77494637861813206295f44f6e0 | refs/heads/master | 2021-04-14T21:36:12.811494 | 2020-03-22T20:47:03 | 2020-03-22T20:47:03 | 249,269,170 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 29,079 | cpp | //---------------------------------------------------------------------------------
// Copyright (C) 2001 James M. Van Verth
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Clarified Artistic License.
// In addition, to meet copyright restrictions you must also own at
// least one copy of any of the following board games:
// Diplomacy, Deluxe Diplomacy, Colonial Diplomacy or Machiavelli.
//
// 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
// Clarified Artistic License for more details.
//
// You should have received a copy of the Clarified Artistic License
// along with this program; if not, write to the Open Source Initiative
// at www.opensource.org
//---------------------------------------------------------------------------------
/*
* resolve.c
*
* routines to handle resolution of orders
*
*/
#include "MapData.h"
#include "Unit.h"
#include "Order.h"
#include "Game.h"
#include "Graph.h"
#include "Fails.h"
#include "OrdersDisplay.h"
#include "Resolve.h"
#include <string.h>
/* local prototypes */
void remselfsupp (GraphNode start, GraphNode finish);
void remselfsupp2(GraphNode start, GraphNode finish);
void cutsupports();
void reslv_moves(Orderlist orders[], bool ign_dislodge);
void civildisband (short country, short build, Orderlist orders);
void reslv_builds(Orderlist builds[]);
void reslv_retreats(Orderlist orders[]);
int follow (GraphNode sector);
int stronger (GraphNode reg1, GraphNode reg2);
int stronger_noselfsupp (GraphNode reg1, GraphNode reg2);
int strongest (GraphNode reg1);
int convbrkn (GraphNode support);
int broken (GraphNode support);
int dislodged (GraphNode support);
int convdslg (GraphNode support);
int incomingdslg (GraphNode support);
void gendislodges();
int setdislodge();
bool unnecessaryconvoy( GraphNode fleet );
int strength_noselfsupp(GraphNode reg);
#define supp_against(support, attacker) \
(gspec(support) == attacker)
void resolve_orders(Orderlist orders[], bool ign_units)
{
if (dislodges > 0)
reslv_retreats(orders);
else if (adjustments)
reslv_builds(orders);
else
reslv_moves(orders, ign_units);
}
/* perform the disband or retreat, depending */
void
reslv_retreats(Orderlist orders[])
{
GraphNode gp;
register Order op;
register bool found;
char text[256];
makegraph(orders, 0);
/* find out what happens */
for (gp = startnode(); isnode(gp); nextnode(gp))
if (gtype(gp) == O_MOVE) {
if (!gfails(gp))
follow(gp);
if (gresolution(gp) == R_BOUNCES)
gresolution(gp) = R_DISBAND;
}
/* copy the resolve information back to the orders */
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (isorder(gorder(gp)))
{
if (gresolution(gp) == R_DISBAND)
setofails(gorder(gp), R_BOUNCES);
else
setofails(gorder(gp), gresolution(gp));
order2string(text, gorder(gp), false, false);
SetOrderLine(text, oindex(gorder(gp)));
}
}
Dislodge* dp = dslglist.Start();
while (dp != dslglist.End())
{
/* don't worry about already disbanded stuff, in fact, remove it */
if (dp->Retreats() == NULL)
{
Dislodge* np = dslglist.Next( dp );
dslglist.Delete( dp->Sector() );
dislodges--;
dp = np;
continue;
}
found = false;
for (op = startorder(orders[dp->Owner()]); isorder(op); nextorder(op))
{
if (dp->Sector() == ostart(op))
{
if (otype(op) == O_NMR)
{
dp->SetType(DB_NRR);
ofails(op) = R_DISBAND;
order2string(text, op, false, false);
SetOrderLine(text, oindex(op));
}
else if (orderfails(op))
{
dp->SetType(DB_ILL);
}
found = true;
break;
}
}
if (!found)
{
dp->SetType(DB_NRR);
}
dp = dslglist.Next(dp);
}
}
void
reslv_builds(Orderlist orders[])
{
register short i, reg, build;
register Order op;
GraphNode gp;
char text[256];
// need to make graph to catch duplicate orders and for civil disbands
makegraph(orders, false);
for (i = 1; i <= NUM_COUN; i++)
{
build = countries[i].builds;
for (op = startorder(orders[i]); isorder(op); nextorder(op))
{
reg = ostart(op);
if (otype(op) == O_BUILD && !orderfails(op))
{
if (reg == 0)
{
otype(op) = O_WAIVE;
order2string(text, op, false, false);
SetOrderLine(text, oindex(op));
}
else
{
if (build > 0)
build--;
else
setofails(op, R_ADJUST);
}
}
else if ((otype(op) == O_REMOVE || otype(op) == O_DEF_REM)
&& !orderfails(op))
{
if (reg == 0)
civildisband(i, build, orders[i]);
if (build < 0)
build++;
else
setofails(op, R_ADJUST);
}
if (ofails(op))
{
order2string(text, op, false, false);
SetOrderLine(text, oindex(op));
}
}
/* if not all disband orders given */
if (build < 0)
{
/* civil disorder -- disband stuff farthest away */
civildisband(i, build, orders[i]);
}
}
// set status of orders from graph
for (gp = startnode(); isnode(gp); nextnode(gp))
{
if (isorder(gorder(gp)) && !ofails(gorder(gp)))
{
setofails(gorder(gp), gresolution(gp));
order2string(text, gorder(gp), false, false);
SetOrderLine(text, oindex(gorder(gp)));
}
}
}
/* disband units farthest from home */
void
civildisband (short country, short build, Orderlist orders)
{
register short i, distance, currdist;
register Unit up, farthest;
Order op;
for (i = -build; i; i--)
{
farthest = NULL;
distance = 0;
for (up = startunit(units[country]); isunit(up); nextunit(up))
{
// if this one is already being removed, move on
if (gtype(getnode(usector(up))) == O_REMOVE)
continue;
if (utype(up) == U_ARM)
{
currdist = armydistance(up, country);
if (currdist > distance)
{
distance = currdist;
farthest = up;
}
}
else
{
currdist = fleetdistance(up,country);
if (currdist > distance
|| (currdist == distance && (farthest == NULL || utype(farthest) == U_ARM)))
{
distance = currdist;
farthest = up;
}
}
}
op = neworder();
ounit(op) = utype(farthest);
ostart(op) = usector(farthest);
oscoast(op) = ucoast(farthest);
ocountry(op) = country;
otype(op) = O_DEF_REM;
ofails(op) = R_SUCCESS;
otext(op) = (char *) new char[2];
strcpy(otext(op), "*");
gtype(getnode(ostart(op))) = O_REMOVE;
addorder(orders, op, false);
}
}
void
reslv_moves(Orderlist orders[], bool ign_dislodge)
{
register GraphNode gp, move;
char text[256];
makegraph(orders, ign_dislodge);
// cut all supports
cutsupports();
// resolve moves that might dislodge units that are supported by units of same type
for (gp = startnode(); isnode(gp); nextnode(gp))
{
// if support order against unit of same type
if (gtype(gp) == O_SUPP && !gfails(gp) && gdest(gp) != gspec(gp)
&& gowner(gp) == gowner(gspec(gp)))
{
for (move = startnode(); isnode(move); nextnode(move))
{
// if this is the move we're supporting
if (gtype(move) == O_MOVE && move == gdest(gp) &&
gdest(move) == gspec(gp))
{
// succeeds, and is strongest move into that area
if (!gfails(move) && strongest(move))
{
(void) follow(move);
}
}
}
}
}
// resolve moves
for (gp = startnode(); isnode(gp); nextnode(gp))
{
if (gtype(gp) == O_MOVE && !gresolved(gp))
{
(void) follow(gp);
}
}
/* resolve self-dislodges */
for (gp = startnode(); isnode(gp); nextnode(gp))
{
/* if this move would dislodge a unit of its country */
if (gtype(gp) == O_MOVE && !gresolved(gp)
&& strongest(gp) && stronger(gp, gdest(gp))
&& gowner(gp) == gowner(gdest(gp)))
{
/* don't do it */
setgresolution(gp, R_FAILS);
}
}
// one final resolution pass, just to be sure
for (gp = startnode(); isnode(gp); nextnode(gp))
{
if (gtype(gp) == O_MOVE && !gresolved(gp))
{
if (!follow(gp))
setgresolution(gp, R_FAILS);
}
}
/* deal with dislodges */
if (!ign_dislodge)
dislodges = setdislodge();
/* set status of orders */
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (isorder(gorder(gp)))
{
setofails(gorder(gp), gresolution(gp));
order2string(text, gorder(gp), false, false);
SetOrderLine(text, oindex(gorder(gp)));
}
}
}
void
cutsupports ()
{
register GraphNode gp;
/* cut supports from all moves except convoyed armies and for attacks against us */
for (gp = startnode(); isnode(gp); nextnode(gp))
{
if (gtype(gp) == O_MOVE && !gfails(gp) && !convoyed(gp)
&& gtype(gdest(gp)) == O_SUPP && !gfails(gdest(gp))
&& gstrength(gp) > 0 /* Loeb9 */
&& !supp_against(gdest(gp), gp) /* Rule X. */
&& gowner(gdest(gp)) != gowner(gp) /* can't break own support */
) {
setgresolution(gdest(gp), R_CUT);
decgstrength(gdest(gdest(gp)));
}
}
/* mark possible dislodges of convoying fleets */
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (gtype(gp) == O_MOVE && !gfails(gp)
&& gtype(gdest(gp)) == O_CONV && !gfails(gdest(gp))
&& stronger(gp, gdest(gp)))
setgresolution(gdest(gp), R_MAYBE);
}
/* check the convoyed armies */
clearmarks();
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (gtype(gp) == O_MOVE && !gfails(gp)
&& convoyed(gp) && !canconvoy(gp, gp))
setgresolution(gp, R_MAYBE);
}
/* cut supports by convoyed armies that *will* get there */
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (gtype(gp) == O_MOVE && !gfails(gp) && convoyed(gp)
&& gtype(gdest(gp)) == O_SUPP && !gfails(gdest(gp))
&& !supp_against(gdest(gp), gp) /* Rule X. */
/* not supporting convoying unit */
&& /* ( */
(gtype(gdest(gdest(gp))) != O_CONV
/* not supporting attack against convoying unit */
// || gtype(gspec(gdest(gp))) != O_CONV /* Rule XII.5 */
// convoying unit not necessary for successful convoy
|| unnecessaryconvoy( gdest(gdest(gp)) )
)
/* || stronger(gp, gdest(gp))) */
)
{
setgresolution(gdest(gp), R_CUT);
decgstrength(gdest(gdest(gp)));
}
}
/* clear the "maybes" */
for (gp = startnode(); isnode(gp); nextnode(gp))
if (gresolution(gp) == R_MAYBE)
setgresolution(gp, R_NONE);
/* mark dislodges of convoying fleets */
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (gtype(gp) == O_MOVE && !gfails(gp)
&& gtype(gdest(gp)) == O_CONV && !gfails(gdest(gp))
&& follow(gp))
setgresolution(gdest(gp), R_DISLODGE);
}
/* check the convoyed armies */
clearmarks();
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (gtype(gp) == O_MOVE && !gfails(gp)
&& convoyed(gp) && !canconvoy(gp, gp))
setgresolution(gp, R_FAILS);
}
/* cut supports by all convoyed armies */
for (gp = startnode(); isnode(gp); nextnode(gp))
{
if (gtype(gp) == O_MOVE && !gfails(gp) && convoyed(gp)
&& gtype(gdest(gp)) == O_SUPP && !gfails(gdest(gp))
&& !supp_against(gdest(gp), gp) /* Rule X.a */
&& gowner(gdest(gp)) != gowner(gp) /* can't break own support */
&& /* ( */
(gtype(gdest(gdest(gp))) != O_CONV
&& gtype(gspec(gdest(gp))) != O_CONV) /* Rule XII.5 */
/* || stronger(gp, gdest(gp))) */
)
{
setgresolution(gdest(gp), R_CUT);
decgstrength(gdest(gdest(gp)));
}
}
/* check all dislodged supports against attacker (Rule X.b) */
for (gp = startnode(); isnode(gp); nextnode(gp)) {
if (gtype(gp) == O_MOVE && !gfails(gp)
&& gtype(gdest(gp)) == O_SUPP && !gfails(gdest(gp))
&& gowner(gdest(gp)) != gowner(gp) /* can't break own support */
// only care about supports against us
&& supp_against(gdest(gp), gp)
// can't dislodge with self-supports
&& stronger_noselfsupp(gp, gdest(gp)))
{
setgresolution(gdest(gp), R_CUT);
decgstrength(gdest(gdest(gp)));
}
}
}
/* returns 1 if support order involving convoy is broken */
int convbrkn (GraphNode support)
{
register GraphNode attacker;
/* make sure we're supporting convoy, convoyed attack, or attack
* against convoy
*/
if (gtype(gdest(support)) != O_CONV
&& (gtype(gdest(support)) != O_MOVE
|| !convoyed(gdest(support)))
&& (gtype(gdest(support)) != O_MOVE
|| gtype(gdest(gdest(support))) != O_CONV))
return 0;
for (attacker = startnode(); isnode(attacker); nextnode(attacker))
/* if attacker is going into support sector */
if (!gfails(attacker)
&& gtype(attacker) == O_MOVE && gdest(attacker) == support) {
/* if attacker is being convoyed */
if (convoyed(attacker)
/* and support is into a body of water with convoying fleet */
/* (Rule XII.5) */
&& (gtype(gdest(support)) == O_CONV
|| gtype(gspec(support)) == O_CONV))
/* forget it */
continue;
/* otherwise support fails */
setgresolution(support, R_CUT);
/* decrement strength of supported sector */
decgstrength(gdest(support));
return 1;
}
return 0;
}
/* returns 1 if any support order is broken */
int broken (GraphNode support)
{
register GraphNode attacker;
for (attacker = startnode(); isnode(attacker); nextnode(attacker))
/* if attacker is going into support sector */
if (!gfails(attacker)
&& gtype(attacker) == O_MOVE && gdest(attacker) == support
/* and support is not against the attacker */
&& gspec(support) != attacker)
{
/* if attacker is being convoyed */
if (convoyed(attacker)
/* and support is into a body of water with convoying fleet */
/* (Rule XII.5) */
&& (gtype(gdest(support)) == O_CONV
|| gtype(gspec(support)) == O_CONV))
/* forget it */
continue;
/* otherwise, support fails */
setgresolution(support, R_CUT);
/* decrement strength of supported sector */
decgstrength(gdest(support));
return 1;
}
return 0;
}
/* returns 1 if support order is dislodged */
int dislodged (GraphNode support)
{
GraphNode attacker;
if (gfails(support))
return 0;
/* if sector we're supporting isn't moving, this doesn't apply */
if (gtype(gdest(support)) != O_MOVE)
return 0;
attacker = gspec(support);
if (gfails(attacker))
return 0;
/* if sector we're supporting into is attacking us and is stronger */
if (gdest(attacker) == support && stronger(attacker, support)
/* and isn't our own unit and isn't convoyed */
&& gowner(attacker) != gowner(support) && !convoyed(attacker)) {
/* unit is dislodged */
setgresolution(support, R_DISLODGE);
decgstrength(gdest(support));
return 1;
}
return 0;
}
/* returns 1 if support is dislodged by convoy that can definitely make it */
int convdslg (GraphNode support)
{
if (gfails(support))
return 0;
else
return 1;
}
/* returns 1 if support order against convoy is dislodged by convoy */
/* not used, right now -- my interpretation is that this isn't possible */
int incomingdslg (GraphNode support)
{
GraphNode attacker;
if (gfails(support))
return 0;
/* if sector we're supporting isn't moving, this doesn't apply */
if (gtype(gdest(support)) != O_MOVE
&& gtype(gdest(gdest(support))) != O_CONV)
return 0;
attacker = gdest(gspec(support));
if (gfails(attacker))
return 0;
/* if sector we're supporting into is attacking us and is stronger */
if (gdest(attacker) == support && stronger(attacker, support)
/* and isn't our own unit */
&& gowner(attacker) != gowner(support)) {
/* unit is dislodged */
setgresolution(support, R_DISLODGE);
decgstrength(gdest(support));
return 1;
}
return 0;
}
/* returns 1 if order generates a move from that sector */
int follow (GraphNode sector)
{
/* if not a moving order */
if (gtype(sector) != O_MOVE)
return 0;
/* if already resolved */
if (gresolved(sector))
return (!(gfails(sector)));
/* if we've come full circle */
if (gmarked(sector))
{
unsetgmark(sector);
/* can't switch with neighbor */
/* unless convoyed! */
if (gdest(gdest(sector)) == sector
&& !convoyed(sector) && !convoyed(gdest(sector)))
return 0;
else
return 1;
}
/* if dest coming at us full blast */
if (gdest(gdest(sector)) == sector && stronger(gdest(sector), sector)
/* and neither of us are convoyed */
&& !convoyed(sector) && !convoyed(gdest(sector)))
{
return 0;
}
/* if strongest vying for dest */
if (!strongest(sector))
return 0;
/* if no unit there */
if (gtype(gdest(sector)) == O_UNKN)
{
setgresolution(sector, R_SUCCESS);
decgbounce(sector);
incgbounce(gdest(sector));
return 1;
}
/* see if unit successfully moves */
setgmark(sector, 1);
if (follow(gdest(sector)))
{
/* follow could lead to a move that dislodges this one */
if (gfails(sector))
return 0;
/* way is clear, go for it */
setgresolution(sector, R_SUCCESS);
decgbounce(sector);
incgbounce(gdest(sector));
unsetgmark(sector);
return 1;
}
unsetgmark(sector);
/* remove supports by us against us */
/*** does this need to be here, or could it be combined with
remselfsupp2 above? (If it ain't broke, don't fix it) */
remselfsupp(sector, gdest(sector));
/* if our strength is greater than that of our destination */
if (strongest(sector) && stronger(sector, gdest(sector)))
{
/* and our destination is not our own unit */
if (gowner(sector) != gowner(gdest(sector)))
{
/* then we plow our way through! */
setgresolution(sector, R_SUCCESS);
setgresolution(gdest(sector), R_DISLODGE);
decgbounce(sector);
incgbounce(gdest(sector));
return 1;
}
/* no self-dislodges (mark failure later) */
else
{
incgbounce(gdest(sector));
return 0;
}
}
/* anything else is just failure */
if (!gresolved(sector))
setgresolution(sector, R_FAILS);
return 0;
}
/* returns true if reg1 unit can overpower reg2 unit */
int stronger (GraphNode reg1, GraphNode reg2)
{
if (gtype(reg1) != O_MOVE)
return 0;
if (gtype(reg2) == O_MOVE)
if (gdest(reg1) == gdest(reg2)
|| (gdest(reg2) == reg1 && gdest(reg1) == reg2))
return (gstrength(reg1) > gstrength(reg2));
else
return (gstrength(reg1) > 1);
else
return (gstrength(reg1) > gstrength(reg2));
}
/* returns true if reg1 unit can overpower reg2 unit w/o support against own unit */
int stronger_noselfsupp(GraphNode reg1, GraphNode reg2)
{
if (gtype(reg1) != O_MOVE)
return 0;
if (gtype(reg2) == O_MOVE)
{
if (gdest(reg1) == gdest(reg2)
|| (gdest(reg2) == reg1 && gdest(reg1) == reg2))
return (strength_noselfsupp(reg1) > gstrength(reg2));
else
return (strength_noselfsupp(reg1) > 1);
}
else
{
return (strength_noselfsupp(reg1) > gstrength(reg2));
}
}
//#define PATCH
/* returns true if we're the strongest going into destination */
int strongest (GraphNode reg1)
{
register GraphNode dest, other;
dest = gdest(reg1);
for (other = startnode(); isnode(other); nextnode(other))
{
/* check all moves into our destination */
if (gtype(other) == O_MOVE && gdest(other) == dest
// not this move
&& other != reg1
// that haven't failed or have bounced here
&& ( !gfails(other) || gresolution(other) == R_BOUNCES || gresolution(other) == R_DISLODGE) )
{
/* cf. rule IX.7 */
/* other guy dislodged by attack from destination */
if (gdest(dest) == other
&& stronger(dest, other)
&& follow(dest))
{
setgresolution(other, R_DISLODGE);
}
/* we're dislodged by attack from destination */
else if (gdest(dest) == reg1 && stronger(dest, reg1))
{
// only mark as dislodged by dislodging unit
// setgresolution(reg1, R_DISLODGE);
return 0;
}
// if we're stronger
else if (stronger(reg1, other))
{
// if we fail for some other reason, other guy *might* succeed
// setgresolution(other, R_FAILS);
}
// if other guy is stronger
else if (stronger(other, reg1))
{
setgresolution(reg1, R_FAILS);
}
else // same strength
{
if (gresolution(other) == R_DISLODGE)
setgresolution(other, R_BNCE_DIS);
else
setgresolution(other, R_BOUNCES);
setgresolution(reg1, R_BOUNCES);
incgbounce(dest);
}
}
}
if (!gfails(reg1))
return 1;
else
return 0;
}
/* look for supports against our own unit at finish and remove */
/* C.f. Rule IX.3 */
void remselfsupp (GraphNode start, GraphNode finish)
{
register GraphNode support;
for (support = startnode(); isnode(support); nextnode(support))
{
/* if the move is a support of the attack, */
if (gtype(support) == O_SUPP && gdest(support) == start
/* succeeds, and the destination has the same owner as the support */
&& !gfails(support) && gowner(support) == gowner(finish)
/* and this move is the strongest going in */
&& strongest(start)
)
{
/* remove support */
setgresolution(support, R_FAILS);
decgstrength(start);
}
}
}
/* look for supports by us against our unit moving into finish and remove */
/* C.f. Rule IX.3 */
void remselfsupp2(GraphNode start, GraphNode finish)
{
register GraphNode support;
for (support = startnode(); isnode(support); nextnode(support))
{
/* if the move is a support of an attack against our move */
if (gtype(support) == O_SUPP && !gfails(support)
&& gdest(support) != start
&& gspec(support) == finish && gspec(support) != gdest(support)
/* and has the same owner as our move */
&& gowner(support) == gowner(start))
{
/* remove support */
setgresolution(support, R_FAILS);
decgstrength(gdest(support));
}
}
}
int setdislodge()
{
GraphNode gp;
Sector destp;
Order op;
bool order_found = false;
Neighbor lp, retreats = NULL;
Unit up;
short dcount = 0;
DislodgeType dtype = DB_GEN;
dslglist.Clean();
for (gp = startnode(); isnode(gp); nextnode(gp))
{
/* look for moves that dislodge */
if (!gfails(gp) && gtype(gp) == O_MOVE
&& (gresolution(gdest(gp)) == R_DISLODGE ||
gresolution(gdest(gp)) == R_NSO_DIS ||
gresolution(gdest(gp)) == R_CUT_DIS))
{
/* copy information */
up = getunit(units[gowner(gdest(gp))], U_NON, gindex(gdest(gp)), C_NONE);
if (up == NULL)
continue;
destp = gsector(gdest(gp));
/* get neighbors */
if (utype(up) == U_ARM)
lp = startneighbor(landneigh(destp));
else if (!isbicoastal(destp) || ucoast(up) == scoast1(destp))
lp = startneighbor(coast1neigh(destp));
else
lp = startneighbor(coast2neigh(destp));
/* check retreats */
retreats = NULL;
while (isneighbor(lp))
{
/* if the neighboring sector is not the attacking sector */
if (getsector(map, nsector(lp)) != gsector(gp)
/* and there hasn't been a bounce there */
&& !(gbounce(getnode(nsector(lp))))
&& !(season == S_FALL && isice(getsector(map, nsector(lp)))))
addneighbor(&retreats, nsector(lp), ncoast(lp));
nextneighbor(lp);
}
dtype = DB_GEN;
/* if no retreats, disband */
if (retreats == NULL)
setgresolution(gdest(gp), R_DISBAND);
/* else if no orders, civil disobediance */
else
{
op = orders[gowner(gdest(gp))];
order_found = false;
while (op-orders[gowner(gdest(gp))] < MAX_ORD && isorder(op))
{
if (otype(op) != O_NONE && otype(op) != O_NMR &&
otype(op) != O_NMR_DIS)
{
order_found = true;
break;
}
nextorder(op);
}
if (gStrictNMR && !order_found)
{
dtype = DB_NMR;
setgresolution(gdest(gp), R_DISBAND);
if (retreats != NULL)
cleanneighbors(&retreats);
}
}
dslglist.Add(utype(up), usector(up), ucoast(up), gowner(gdest(gp)),
dtype, retreats);
dcount++;
}
}
return dcount;
}
void gendislodges()
{
makegraph(orders, false);
dislodges = setdislodge();
}
//----------------------------------------------------------------------------
// @ unnecessaryconvoy()
//----------------------------------------------------------------------------
// returns true if convoying fleet is unnecessary to complete convoy
//----------------------------------------------------------------------------
bool
unnecessaryconvoy( GraphNode fleet )
{
if (gtype(fleet) != O_CONV)
return false;
// mark this position as already visited
clearmarks();
setgmark(fleet, 1);
bool result = (canconvoy( gdest(fleet), gdest(fleet) ) != 0);
clearmarks();
return result;
}
//----------------------------------------------------------------------------
// @ strength_noselfsupp()
//----------------------------------------------------------------------------
// returns strength without self-supports against our own destination
//----------------------------------------------------------------------------
int
strength_noselfsupp(GraphNode reg)
{
int strength = gstrength(reg);
GraphNode gp;
for (gp = startnode(); isnode(gp); nextnode(gp))
{
if (!gfails(gp)
&& gtype(gp) == O_SUPP
&& gdest(gp) == reg
&& gowner(gp) == gowner(gdest(reg))
)
{
--strength;
}
}
return strength;
} | [
"t3tris.d3vil@gmail.com"
] | t3tris.d3vil@gmail.com |
c21c34d08c271dc56a16121d867f72891c3066c5 | 9de18ef120a8ae68483b866c1d4c7b9c2fbef46e | /third_party/concurrentqueue/benchmarks/boost/throw_exception.hpp | 200683ec2510e4f8976265e82220c58f8e83bb25 | [
"Zlib",
"BSD-2-Clause",
"BSL-1.0",
"LicenseRef-scancode-free-unknown"
] | permissive | google/orbit | 02a5b4556cd2f979f377b87c24dd2b0a90dff1e2 | 68c4ae85a6fe7b91047d020259234f7e4961361c | refs/heads/main | 2023-09-03T13:14:49.830576 | 2023-08-25T06:28:36 | 2023-08-25T06:28:36 | 104,358,587 | 2,680 | 325 | BSD-2-Clause | 2023-08-25T06:28:37 | 2017-09-21T14:28:35 | C++ | UTF-8 | C++ | false | false | 3,061 | hpp | #ifndef UUID_AA15E74A856F11E08B8D93F24824019B
#define UUID_AA15E74A856F11E08B8D93F24824019B
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
//
// boost/throw_exception.hpp
//
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc.
//
// 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)
//
// http://www.boost.org/libs/utility/throw_exception.html
//
#include <boost/exception/detail/attribute_noreturn.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config.hpp>
#include <exception>
#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
# define BOOST_EXCEPTION_DISABLE
#endif
#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 )
# define BOOST_EXCEPTION_DISABLE
#endif
#if !defined( BOOST_EXCEPTION_DISABLE )
# include <boost/exception/exception.hpp>
#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION)
# include <boost/current_function.hpp>
# define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION
#endif
# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__)
#else
# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
#endif
namespace boost
{
#ifdef BOOST_NO_EXCEPTIONS
void throw_exception( std::exception const & e ); // user defined
#else
inline void throw_exception_assert_compatibility( std::exception const & ) { }
template<class E> BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const & e )
{
//All boost exceptions are required to derive from std::exception,
//to ensure compatibility with BOOST_NO_EXCEPTIONS.
throw_exception_assert_compatibility(e);
#ifndef BOOST_EXCEPTION_DISABLE
throw enable_current_exception(enable_error_info(e));
#else
throw e;
#endif
}
#endif
#if !defined( BOOST_EXCEPTION_DISABLE )
namespace
exception_detail
{
template <class E>
BOOST_ATTRIBUTE_NORETURN
void
throw_exception_( E const & x, char const * current_function, char const * file, int line )
{
boost::throw_exception(
set_info(
set_info(
set_info(
enable_error_info(x),
throw_function(current_function)),
throw_file(file)),
throw_line(line)));
}
}
#endif
} // namespace boost
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(pop)
#endif
#endif
| [
"pierric.gimmig@gmail.com"
] | pierric.gimmig@gmail.com |
caf9c8f1864d412833b989d5eff158214c6dfaeb | 67b627c4deee954e4b5f77c32d4672cc141ad50f | /grader/pocCountRegtangle.cpp | aebc3b8278eb9825d52da080c63d5d68c7d10e00 | [] | no_license | KornSiwat/algoLab-1 | 5809c4468f683baabcfff1a494ed61215ab464ba | 7abd8948235ae3e3be9e5792d45be931c69f0143 | refs/heads/master | 2020-11-24T00:21:35.149058 | 2019-12-13T16:44:41 | 2019-12-13T16:44:41 | 227,881,254 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 936 | cpp | #include <iostream>
#include <vector>
using namespace std;
int main()
{
int board[3][3] = {{1, 1},
{0, 1}};
int rowCount = 2;
int columnCount = 2;
int rectangleCount = 0;
for (int width = 1; width < columnCount + 1; ++width)
{
for (int height = 1; height < rowCount + 1; ++height)
{
int area = width * height;
for (int origin_x = 0; origin_x < columnCount; origin_x++)
{
for (int origin_y = 0; origin_y < rowCount; origin_y++)
{
int sum_point_value = 0;
for (int i = origin_x; i < width + origin_x; ++i)
{
for (int j = origin_y; j < height + origin_y; ++j)
{
sum_point_value += board[i][j];
}
}
if (area == sum_point_value)
{
++rectangleCount;
}
}
}
}
}
cout << rectangleCount << endl;
return 0;
} | [
"siwat@siwat.dev"
] | siwat@siwat.dev |
cb5bc53c77864c2482828e1f241e136cdb50eacd | 0e025932221723f7d35008f815d2ef1d6f981884 | /AtCoder/Contest 171/A.cpp | df3eba89992358b596857397f112329a28ef94c1 | [
"MIT"
] | permissive | gauravsingh58/competitive-programming | cfe38e663da463ac80746fc2ec60e329c3d3a283 | fa5548f435cdf2aa059e1d6ab733885790c6a592 | refs/heads/master | 2022-12-23T16:18:44.796017 | 2020-09-30T19:43:19 | 2020-09-30T19:43:19 | 300,041,127 | 1 | 0 | MIT | 2020-09-30T19:40:58 | 2020-09-30T19:40:57 | null | UTF-8 | C++ | false | false | 1,636 | cpp | /****************************************************
* Template for coding contests *
* Author : Sanjeev Sharma *
* Email : thedevelopersanjeev@gmail.com *
*****************************************************/
#pragma GCC optimize ("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("fast-math")
#pragma GCC target ("sse4")
#pragma comment(linker, "/stack:200000000")
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define deb(x) cout << #x << " is " << x << "\n";
#define int long long
#define mod 1000000007
const double PI = 2 * acos(0.0);
const long long INF = 1e18L + 5;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// template<class... Args>
// auto create(size_t n, Args&&... args) {
// if constexpr(sizeof...(args) == 1)
// return vector(n, args...);
// else
// return vector(n, create(args...));
// }
// template<typename... T>
// void read(T&... args) {
// ((cin >> args), ...);
// }
// template<typename... T>
// void write(T&&... args) {
// ((cout << args), ...);
// }
void solve() {
char a;
cin >> a;
if(a >= 'A' && a <= 'Z') {
cout << "A";
} else {
cout << "a";
}
}
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
solve();
return 0;
}
| [
"thedevelopersanjeev@gmail.com"
] | thedevelopersanjeev@gmail.com |
17e08d988d65a01a0b22d7ae11e67495a8c21395 | 27ef6b50e8d2d388ab0f745e5c402117baedf983 | /06Command/remote/Hottub.cpp | b87ea588d31a505569ecb64d098a639335c6495f | [] | no_license | sanqima/HeadFirstDesignPatternsCPP | c7decb6d4af5165ba5ada99e22cd4fe095e4bff3 | 1d8e20d9745610d69fbce92a600125a7ba5e1386 | refs/heads/master | 2023-03-16T18:45:04.567965 | 2020-09-28T13:48:37 | 2020-09-28T13:48:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,099 | cpp | #include "Hottub.h"
#include <iostream>
namespace command::remote
{
void Hottub::on()
{
isOn = true;
}
void Hottub::off()
{
isOn = false;
}
void Hottub::bubblesOn()
{
if (isOn)
{
std::cout << "Hottub is bubbling!" << '\n';
}
}
void Hottub::bubblesOff()
{
if (!isOn)
{
std::cout << "Hottub is not bubbling" << '\n';
}
}
void Hottub::jetsOn()
{
if (isOn)
{
std::cout << "Hottub jets are on" << '\n';
}
}
void Hottub::jetsOff()
{
if (!isOn)
{
std::cout << "Hottub jets are off" << '\n';
}
}
void Hottub::setTemperature(int newTemperature)
{
temperature = newTemperature;
}
void Hottub::heat()
{
temperature = 105;
std::cout << "Hottub is heating to a steaming 105 degrees" << '\n';
}
void Hottub::cool()
{
temperature = 98;
std::cout << "Hottub is cooling to 98 degrees" << '\n';
}
}
| [
"knapecz.adam@gmail.com"
] | knapecz.adam@gmail.com |
3b9ae9d8637544782fa09c9129136c92a290cf4c | 8fdd2abae4f151c624d89b45eb11c5401dd02ee4 | /Classes/HelpLayer.h | 50ecc028cc85c1a179e7269c7804191d8377b50e | [] | no_license | 619224202/CatchPK | 05a6f305ab172a716efd5a8dbf03ad5db09c4d26 | fb622678906640d43f645115ed5d38d42a786e34 | refs/heads/master | 2020-03-31T08:09:59.953396 | 2018-10-09T07:35:34 | 2018-10-09T07:35:34 | 152,048,523 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,106 | h | #ifndef _CCB_HELPLAYER_H_
#define _CCB_HELPLAYER_H_
#include "cocos2d.h"
#include "cocos-ext.h"
class ccbHelpLayer
: public cocos2d::CCLayer
, public cocos2d::extension::CCBSelectorResolver
, public cocos2d::extension::CCBMemberVariableAssigner
, public cocos2d::extension::CCNodeLoaderListener
{
public:
CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(ccbHelpLayer, create);
ccbHelpLayer();
virtual ~ccbHelpLayer();
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::CCObject * pTarget, const char * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::CCObject * pTarget, const char * pSelectorName);
virtual bool onAssignCCBMemberVariable(cocos2d::CCObject * pTarget, const char * pMemberVariableName, cocos2d::CCNode * pNode);
virtual bool onAssignCCBCustomProperty(cocos2d::CCObject* pTarget, const char* pMemberVariableName, cocos2d::extension::CCBValue* pCCBValue);
virtual void onNodeLoaded(cocos2d::CCNode * pNode, cocos2d::extension::CCNodeLoader * pNodeLoader);
virtual cocos2d::SEL_CallFuncN onResolveCCBCCCallFuncSelector(cocos2d::CCObject * pTarget, const char* pSelectorName);
void setAnimationManager(cocos2d::extension::CCBAnimationManager *pAnimationManager, cocos2d::CCNode* _pNode);
void On1(cocos2d::CCObject *pSender);
void On2(cocos2d::CCObject *pSender);
void On3(cocos2d::CCObject *pSender);
void On4(cocos2d::CCObject *pSender);
void On5(cocos2d::CCObject *pSender);
void On6(cocos2d::CCObject *pSender);
virtual void ccTouchesBegan(cocos2d::CCSet *pTouches, cocos2d::CCEvent *pEvent);
void Show(cocos2d::CCNode* sender = NULL);
void OK(cocos2d::CCNode* sender = NULL);
void END(cocos2d::CCNode* sender = NULL);
int m_iHelpType;
private:
cocos2d::extension::CCBAnimationManager* m_AnimationManager;
cocos2d::CCNode* m_pNode;
};
class CCBReader;
class ccbHelpLayerLoader : public cocos2d::extension::CCLayerLoader
{
public:
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(ccbHelpLayerLoader, loader);
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(ccbHelpLayer);
};
#endif
| [
"619224202@qq.com"
] | 619224202@qq.com |
be67527ba2727de5496338846cec040dae646a72 | 5d83739af703fb400857cecc69aadaf02e07f8d1 | /Archive2/34/2065c0041fb0d3/main.cpp | 6f624031db5cf9672c96accc8408f4fb158ec1e6 | [] | no_license | WhiZTiM/coliru | 3a6c4c0bdac566d1aa1c21818118ba70479b0f40 | 2c72c048846c082f943e6c7f9fa8d94aee76979f | refs/heads/master | 2021-01-01T05:10:33.812560 | 2015-08-24T19:09:22 | 2015-08-24T19:09:22 | 56,789,706 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 458 | cpp | #include <iostream>
#include <string>
#include <vector>
#include <type_traits>
struct A{
};
struct B{
A a;
};
void test(B &&b){
// is rvalue referenced. Its ok
std::cout << std::is_rvalue_reference<decltype(b)>::value;
// shouldn't it be also rvalue referenced?
auto &&in = b.a;
std::cout << std::is_rvalue_reference<decltype(in)>::value;
}
int main()
{
test(B());
return 0;
}
| [
"francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df"
] | francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df |
454f6f8be225edf50190792a00afbac17072fc2e | bfbe11b830fdc52cc2cf203c3c488e41a3927ae4 | /getindex.h | 7f5c68ba612a06fb02f3a64fe1d98b858e96ceb3 | [
"MIT"
] | permissive | smilingthax/cttrie | ece2f9f4f596b4e587ebb82cf3e4bc3cb47579fa | 010182660de3c978343bc8148dd08963c9c4c5be | refs/heads/master | 2021-01-17T12:55:12.398007 | 2019-04-24T23:14:40 | 2019-04-24T23:14:40 | 62,383,404 | 46 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 1,049 | h | #ifndef _GETINDEX_H
#define _GETINDEX_H
// provides pack_tools::get_index<I>(Ts&&... ts)
// (similar to what std::get<I>(std::make_tuple(ts...)) does)
namespace pack_tools {
namespace detail {
template <unsigned int> struct int_c {};
template <unsigned int I>
constexpr void *get_index_impl(int_c<I>) // invalid index
{
return {};
}
template <typename T0,typename... Ts>
constexpr T0&& get_index_impl(int_c<0>,T0&& t0,Ts&&... ts)
{
return (T0&&)t0;
}
template <unsigned int I,typename T0,typename... Ts>
constexpr auto get_index_impl(int_c<I>,T0&& t0,Ts&&... ts)
-> decltype(get_index_impl(int_c<I-1>(),(Ts&&)ts...))
{
return get_index_impl(int_c<I-1>(),(Ts&&)ts...);
}
} // namespace detail
template <unsigned int I,typename... Ts>
constexpr auto get_index(Ts&&... ts)
-> decltype(detail::get_index_impl(detail::int_c<I>(),(Ts&&)ts...))
{
static_assert((I<sizeof...(Ts)),"Invalid Index");
return detail::get_index_impl(detail::int_c<I>(),(Ts&&)ts...);
}
} // namespace pack_tools
#endif
| [
"thobi@worker"
] | thobi@worker |
58add1865e130f89f4b87ca7e8d92d94f4d5fc59 | 9c7584da436d9f44c966abe28105644aece6931c | /p1106.cpp | eeafe9349b85b481801d6253a82e111fd074730a | [] | no_license | Leo-Ngok/UVa_solutions | c6b703c910fcc5e534b576394b8522a89701f642 | c890ef4f33b66cff348c29eb2ca130edbc7417a8 | refs/heads/master | 2022-01-19T22:27:18.048148 | 2022-01-04T15:54:12 | 2022-01-04T15:54:12 | 202,375,424 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 498 | cpp | #include <string>
#include <iostream>
int n;
using namespace std;
string s1;
int num[10];
int main(){
cin>>s1>>n;
int m=s1.size();
//for(int i=0;i<s1.size();i++)num[s1[i]-'0']++;
while(n>0){
if(s1.size()>1&&s1[0]>s1[1]){
s1.erase(0,1);
n--;
}
for(int i=1;i<s1.size();i++){
if(i==s1.size()-1||(s1[i]>s1[i-1]&&s1[i]>s1[i+1])){
s1.erase(i,1);
n--;
break;
}
}
}bool flg=0;
for(int i=0;i<s1.size();i++){
if(s1[i]!='0')flg=1;
if(flg)cout<<s1[i];
}
return 0;
}
| [
"z1023825@outlook.com"
] | z1023825@outlook.com |
53a1be47280b895cda10df547e6b4ce96941448e | b30ce2bde2534904932266f67d93444360d21db2 | /Arduino/libraries/ros_lib/jsk_gui_msgs/Touch.h | c94fd65b34b18ffc9c9ff161da636baa262d31cd | [] | no_license | MaxDeSantis/pid_ball_balancer_cbs | ee987b00474ec69d09ddc5f74bf9b9a3bc08f722 | 5266c1802631bdfce0425fbba75240a5f29c1c71 | refs/heads/main | 2023-04-07T15:12:24.028858 | 2021-04-18T16:44:02 | 2021-04-18T16:44:02 | 339,237,652 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,092 | h | #ifndef _ROS_jsk_gui_msgs_Touch_h
#define _ROS_jsk_gui_msgs_Touch_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace jsk_gui_msgs
{
class Touch : public ros::Msg
{
public:
typedef int64_t _finger_id_type;
_finger_id_type finger_id;
typedef float _x_type;
_x_type x;
typedef float _y_type;
_y_type y;
typedef int64_t _image_width_type;
_image_width_type image_width;
typedef int64_t _image_height_type;
_image_height_type image_height;
Touch():
finger_id(0),
x(0),
y(0),
image_width(0),
image_height(0)
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
union {
int64_t real;
uint64_t base;
} u_finger_id;
u_finger_id.real = this->finger_id;
*(outbuffer + offset + 0) = (u_finger_id.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_finger_id.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_finger_id.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_finger_id.base >> (8 * 3)) & 0xFF;
*(outbuffer + offset + 4) = (u_finger_id.base >> (8 * 4)) & 0xFF;
*(outbuffer + offset + 5) = (u_finger_id.base >> (8 * 5)) & 0xFF;
*(outbuffer + offset + 6) = (u_finger_id.base >> (8 * 6)) & 0xFF;
*(outbuffer + offset + 7) = (u_finger_id.base >> (8 * 7)) & 0xFF;
offset += sizeof(this->finger_id);
offset += serializeAvrFloat64(outbuffer + offset, this->x);
offset += serializeAvrFloat64(outbuffer + offset, this->y);
union {
int64_t real;
uint64_t base;
} u_image_width;
u_image_width.real = this->image_width;
*(outbuffer + offset + 0) = (u_image_width.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_image_width.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_image_width.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_image_width.base >> (8 * 3)) & 0xFF;
*(outbuffer + offset + 4) = (u_image_width.base >> (8 * 4)) & 0xFF;
*(outbuffer + offset + 5) = (u_image_width.base >> (8 * 5)) & 0xFF;
*(outbuffer + offset + 6) = (u_image_width.base >> (8 * 6)) & 0xFF;
*(outbuffer + offset + 7) = (u_image_width.base >> (8 * 7)) & 0xFF;
offset += sizeof(this->image_width);
union {
int64_t real;
uint64_t base;
} u_image_height;
u_image_height.real = this->image_height;
*(outbuffer + offset + 0) = (u_image_height.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_image_height.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_image_height.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_image_height.base >> (8 * 3)) & 0xFF;
*(outbuffer + offset + 4) = (u_image_height.base >> (8 * 4)) & 0xFF;
*(outbuffer + offset + 5) = (u_image_height.base >> (8 * 5)) & 0xFF;
*(outbuffer + offset + 6) = (u_image_height.base >> (8 * 6)) & 0xFF;
*(outbuffer + offset + 7) = (u_image_height.base >> (8 * 7)) & 0xFF;
offset += sizeof(this->image_height);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
union {
int64_t real;
uint64_t base;
} u_finger_id;
u_finger_id.base = 0;
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
u_finger_id.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
this->finger_id = u_finger_id.real;
offset += sizeof(this->finger_id);
offset += deserializeAvrFloat64(inbuffer + offset, &(this->x));
offset += deserializeAvrFloat64(inbuffer + offset, &(this->y));
union {
int64_t real;
uint64_t base;
} u_image_width;
u_image_width.base = 0;
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
u_image_width.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
this->image_width = u_image_width.real;
offset += sizeof(this->image_width);
union {
int64_t real;
uint64_t base;
} u_image_height;
u_image_height.base = 0;
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
u_image_height.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
this->image_height = u_image_height.real;
offset += sizeof(this->image_height);
return offset;
}
const char * getType(){ return "jsk_gui_msgs/Touch"; };
const char * getMD5(){ return "d96a284d39fcc410f375ac68fd380177"; };
};
}
#endif | [
"ctvmdesantis@cox.net"
] | ctvmdesantis@cox.net |
d750a53aea1bf83d14f46cfeba1ba70ab983ecc6 | 30bdd8ab897e056f0fb2f9937dcf2f608c1fd06a | /Codes/AC/1897.cpp | b894c63d2cee94e13d70d9f69bc6ea6261ad3ea8 | [] | no_license | thegamer1907/Code_Analysis | 0a2bb97a9fb5faf01d983c223d9715eb419b7519 | 48079e399321b585efc8a2c6a84c25e2e7a22a61 | refs/heads/master | 2020-05-27T01:20:55.921937 | 2019-11-20T11:15:11 | 2019-11-20T11:15:11 | 188,403,594 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 552 | cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=2e5+10;
map<int ,ll >mp,mmp;
int main()
{
int n,k;
int a;
ll ans;
ios::sync_with_stdio(false);
while(cin>>n>>k)
{
ans=0;
mp.clear();
mmp.clear();
for(int i=0;i<n;i++)
{
cin>>a;
if(a%(k*k)==0)
ans+=mmp[a/k];
if(a%k==0)
mmp[a]+=mp[a/k];
mp[a]++;
}
cout<<ans<<endl;
}
}
| [
"harshitagar1907@gmail.com"
] | harshitagar1907@gmail.com |
d97aa2fad164f615ae889469167f7a1323740a1d | 4aef06d566250681856e67e12255a520117f2fb8 | /New Year Chaos.cpp | 9e3e4eb0a167a999239e4875f0cd56fd17bacb08 | [] | no_license | gaurav4ever/Hackerrank-Solutions | 93d400af5636a87fabdf101256c828e7b7615386 | 39e964527ae9de2f295abc10209251956ec8497c | refs/heads/master | 2021-01-19T05:16:42.142691 | 2016-07-07T20:06:50 | 2016-07-07T20:06:50 | 61,032,202 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,780 | cpp | #include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
int check(int a[],int n){
int flag=0;
for(int i=0;i<n-1;i++){
if(a[i]>a[i+1]){
return 1;
}
}
return 0;
}
int main(){
int t;
cin >> t;
while(t--){
int n;
cin>>n;
int a[n+1],b[n+1],count[n+1]={0},c=0;
for(int i=0;i<n;i++){
cin>>a[i];
b[i]=i+1;
}
//code for Too Chaotic
int flag,done=0;
for(int k=0;k<3;k++){
//cout<<"loop "<<k<<endl;
for(int j=n-1;j>0;j--){
if(a[j]<a[j-1]){
count[a[j-1]]++;
if(count[a[j-1]]>2){done=1;break;}
int temp=a[j];
a[j]=a[j-1];
a[j-1]=temp;
c++;
}
/* for(int m=0;m<n;m++)
cout<<a[m]<<" ";
cout<<endl;
*/
flag=check(a,n);
//cout<<"flag value : "<<flag<<endl;
if(flag==0)break;
if(done==1)break;
}
if(flag==0)break;
if(done==1)break;
}
if(done==1)cout<<"Too chaotic"<<endl;
else
cout<<c<<endl;
//if(flag==0)cout<<c<<endl;
}
return 0;
}
| [
"gauravsharma.mvp@gmail.com"
] | gauravsharma.mvp@gmail.com |
65453681cdc22a6d4a27653bb64d8db120c12f15 | 19db91e3e1caa72e23284e3aea4353775a555541 | /libraries/clchain/wasi-polyfill/eosio_assert.cpp | fde4bb5d1a85ebe363135bb09d1bce7d47eada44 | [
"MIT"
] | permissive | Joshuagriffin9/Eden | 360c0bfd06e0d84d7b5601ce7c158a5da0ebb54b | ebdd1a0cd715eebf1e279586aaee1755c372f961 | refs/heads/main | 2023-07-18T00:16:29.348182 | 2021-08-26T17:25:48 | 2021-08-26T17:25:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 406 | cpp | #include <string.h>
#include "polyfill_helpers.hpp"
extern "C"
{
[[clang::import_name("eosio_assert_message"), noreturn]] void
eosio_assert_message(uint32_t, const char* msg, uint32_t len)
{
polyfill::abort_message(msg, len);
}
[[clang::import_name("eosio_assert"), noreturn]] void eosio_assert(uint32_t, const char* msg)
{
polyfill::abort_message(msg, strlen(msg));
}
}
| [
"tbfleming@gmail.com"
] | tbfleming@gmail.com |
40e634d85eba7ebbb22da6c24fb4cd410ef161b5 | 9f01e82772c1a2f3ac2e5c7be8ae77d47ae5253d | /smtk/project/view/IconConstructor.cxx | 964743b2b021cc084dddec4f6060cb69a3a855fd | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | JoonVan/SMTK | e2fcd8000778a22c8ce989bb6bdb4c3367fea0f3 | 8abc5967e156c2c1d53eae388a21f5e4b1214e25 | refs/heads/master | 2023-07-16T22:56:51.096550 | 2021-09-03T16:31:31 | 2021-09-03T16:31:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 931 | cxx | //=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#include "smtk/project/view/IconConstructor.h"
#include <regex>
namespace smtk
{
namespace project
{
namespace view
{
std::string IconConstructor::operator()(const std::string& secondaryColor) const
{
std::string fill = "gray";
std::string svg = std::regex_replace(
std::regex_replace(this->svg(), std::regex(m_defaultColor), fill),
std::regex(m_secondaryColor),
secondaryColor);
return svg;
}
} // namespace view
} // namespace project
} // namespace smtk
| [
"john.tourtellott@kitware.com"
] | john.tourtellott@kitware.com |
33df99726d00b96b8bba4e2bc9831a08663d94bb | 5bae8b53fed74f9e093f2fdedc08485182aa8d47 | /src/MG5_aMCNLO/HEF_MEKD/Spin2/qq_Spin2_UP_2l.h | 8c35001614cb10945213c13171bb8b66c81809f8 | [] | no_license | odysei/MEKD | eac098ea7241f287dde1fb625aaaeb7138823d8b | 1614a2192a1e7725cc96e3cb773b02f62ac3c52b | refs/heads/master | 2020-12-25T17:14:26.875430 | 2018-12-01T19:31:44 | 2018-12-01T19:31:44 | 10,505,338 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,902 | h | //==========================================================================
// This file has been automatically generated for C++ Standalone by
// MadGraph5_aMC@NLO v. 2.0.2, 2014-02-07
// By the MadGraph5_aMC@NLO Development Team
// Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch
//==========================================================================
#ifndef MG5_Sigma_HEF_MEKD2_1_ccx_xg_mummup_H
#define MG5_Sigma_HEF_MEKD2_1_ccx_xg_mummup_H
#include <complex>
#include <vector>
#include "Commons/Parameters_MEKD.h" // Changed by Convert_source 0.2
//==========================================================================
// A class for calculating the matrix elements for
// Process: c c~ > xg > mu- mu+ WEIGHTED=2 / h zp
//--------------------------------------------------------------------------
class qq_Spin2_UP_2l
{
public:
// Constructor.
qq_Spin2_UP_2l() {}
// Initialize process.
void initProc(std::string param_card_name);
// Update process.
void updateProc(SLHAReader_MEKD &slha);
// Calculate flavour-independent parts of cross section.
void sigmaKin();
// Evaluate sigmaHat(sHat).
double sigmaHat();
// Info on the subprocess.
std::string name() const { return "c c~ > mu- mu+ (HEF_MEKD2_1)"; }
int code() const { return 0; }
const std::vector<double> &getMasses() const { return mME; }
// Get and set momenta for matrix element evaluation
std::vector<double *> getMomenta() { return p; }
void setMomenta(std::vector<double *> &momenta) { p = momenta; }
void setInitial(int inid1, int inid2)
{
id1 = inid1;
id2 = inid2;
}
// Get matrix element vector
const double *getMatrixElements() const { return matrix_element; }
// Constants for array limits
static const int ninitial = 2;
static const int nexternal = 4;
static const int nprocesses = 2;
private:
// Private functions to calculate the matrix element for all subprocesses
// Calculate wavefunctions
void calculate_wavefunctions(const int perm[], const int hel[]);
static const int nwavefuncs = 5;
std::complex<double> w[nwavefuncs][18];
static const int namplitudes = 1;
std::complex<double> amp[namplitudes];
int ntry, sum_hel, ngood; // Moved here by Convert_source 0.2
double matrix_ccx_xg_mummup_no_hzp();
// Store the matrix element value from sigmaKin
double matrix_element[nprocesses];
// Color flows, used when selecting color
double *jamp2[nprocesses];
// Pointer to the model parameters
Parameters_MEKD *pars; // Changed by Convert_source 0.2
// vector with external particle masses
std::vector<double> mME;
// vector with momenta (to be changed each event)
std::vector<double *> p;
// Initial particle ids
int id1, id2;
};
#endif // MG5_Sigma_HEF_MEKD2_1_ccx_xg_mummup_H
| [
"odysei@gmail.com"
] | odysei@gmail.com |
e5466ba21358cdb50d61fd8ee3180e57bde8d6d7 | aec312f7892374a123f29400d411323d86341372 | /src/core/gpuMemory.cpp | db778d0e5f78584b0672727f20edcd1ba377f8d9 | [
"MIT"
] | permissive | FelixBellaby/pal | 1bda0e122cdbcbb846f921ba17ac88ae5310a6d2 | 3ce3d9a004e8ed15134567c0fd800ee81916b423 | refs/heads/master | 2021-01-24T00:14:50.251555 | 2018-04-06T18:40:14 | 2018-04-09T07:47:09 | 122,757,786 | 0 | 0 | null | 2018-02-24T16:29:46 | 2018-02-24T16:29:45 | null | UTF-8 | C++ | false | false | 37,241 | cpp | /*
***********************************************************************************************************************
*
* Copyright (c) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.
*
* 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 "core/device.h"
#include "core/gpuMemory.h"
#include "core/image.h"
#include "core/platform.h"
#include "palDeveloperHooks.h"
#include "palSysMemory.h"
#include "palFormatInfo.h"
using namespace Util;
namespace Pal
{
// =====================================================================================================================
Result GpuMemory::ValidateCreateInfo(
const Device* pDevice,
const GpuMemoryCreateInfo& createInfo)
{
Result result = Result::Success;
const auto& memProps = pDevice->MemoryProperties();
if ((memProps.flags.multipleVaRangeSupport == 0) &&
(createInfo.vaRange != VaRange::Default) &&
(createInfo.vaRange != VaRange::DescriptorTable)) // We map DescriptorTable to Default on low-VA space configs
{
result = Result::ErrorOutOfGpuMemory;
}
if (createInfo.flags.useReservedGpuVa)
{
if (createInfo.pReservedGpuVaOwner == nullptr)
{
result = Result::ErrorInvalidPointer;
}
else
{
const gpusize fragmentSize = pDevice->MemoryProperties().fragmentSize;
const gpusize alignment = Pow2Align(createInfo.alignment, fragmentSize);
const GpuMemory* const pObj = static_cast<const GpuMemory* const>(createInfo.pReservedGpuVaOwner);
const GpuMemoryDesc& desc = pObj->Desc();
if ((desc.gpuVirtAddr != Pow2Align(desc.gpuVirtAddr, alignment)) ||
(desc.alignment != createInfo.alignment) ||
(desc.size < createInfo.size) ||
(pObj->m_vaRange != createInfo.vaRange))
{
result = Result::ErrorInvalidValue;
}
}
}
if (createInfo.flags.typedBuffer)
{
if (Formats::IsUndefined(createInfo.typedBufferInfo.swizzledFormat.format))
{
result = Result::ErrorInvalidFormat;
}
else if ((createInfo.typedBufferInfo.extent.width == 0) ||
(createInfo.typedBufferInfo.extent.height == 0) ||
(createInfo.typedBufferInfo.extent.depth == 0) ||
(createInfo.typedBufferInfo.rowPitch == 0) ||
(createInfo.typedBufferInfo.depthPitch == 0))
{
result = Result::ErrorInvalidValue;
}
}
if ((result == Result::Success) && (createInfo.size == 0))
{
// Cannot create an allocation of size 0!
result = Result::ErrorInvalidMemorySize;
}
// If this is real GPU memory allocation, we need to know if it must reside in a non-local heap.
bool nonLocalOnly = true;
if (result == Result::Success)
{
if (createInfo.flags.virtualAlloc == false)
{
if (createInfo.heapCount == 0)
{
// Physical GPU memory allocations must specify at least one heap!
result = Result::ErrorInvalidValue;
}
else
{
for (uint32 idx = 0; idx < createInfo.heapCount; ++idx)
{
if ((createInfo.heaps[idx] == GpuHeapLocal) || (createInfo.heaps[idx] == GpuHeapInvisible))
{
nonLocalOnly = false;
break;
}
}
}
}
else if (createInfo.heapCount != 0)
{
// Virtual GPU memory allocations cannot specify any heaps!
result = Result::ErrorInvalidValue;
}
}
const gpusize allocGranularity = createInfo.flags.virtualAlloc ? memProps.virtualMemAllocGranularity
: memProps.realMemAllocGranularity;
if ((result == Result::Success) && ((createInfo.alignment % allocGranularity) != 0))
{
// Requested alignment must be zero or a multiple of the relevant allocation granularity!
result = Result::ErrorInvalidAlignment;
}
if ((result == Result::Success) && ((createInfo.size % allocGranularity) != 0))
{
// The requested allocation size doesn't match the allocation granularity requirements!
result = Result::ErrorInvalidMemorySize;
}
if ((result == Result::Success) && createInfo.flags.shareable && (nonLocalOnly == false))
{
// Shareable allocations must reside only in non-local heaps in order for multiple GPU's to access them
// simultaneously without problems!
result = Result::ErrorInvalidFlags;
}
if ((result == Result::Success) && createInfo.flags.globalGpuVa && (memProps.flags.globalGpuVaSupport == 0))
{
// The globalGpuVa flag can't be set if the feature isn't supported!
result = Result::ErrorInvalidFlags;
}
if ((result == Result::Success) && (createInfo.vaRange == Pal::VaRange::Svm) &&
((memProps.flags.svmSupport == 0) || (pDevice->GetPlatform()->SvmModeEnabled() == false)))
{
// The SVM range can't be used if the feature isn't supported!
result = Result::ErrorInvalidValue;
}
if ((result == Result::Success) && createInfo.flags.autoPriority && (memProps.flags.autoPrioritySupport == 0))
{
// The autoPriority flag can't be set if the feature isn't supported!
result = Result::ErrorInvalidFlags;
}
if (result == Result::Success)
{
if (createInfo.vaRange == VaRange::ShadowDescriptorTable)
{
const gpusize alignment = Max(createInfo.alignment, allocGranularity);
gpusize descrStartAddr = 0;
gpusize descrEndAddr = 0;
pDevice->VirtualAddressRange(VaPartition::DescriptorTable, &descrStartAddr, &descrEndAddr);
// The descriptor GPU VA must meet the address alignment and fit in the DescriptorTable range.
if (((createInfo.descrVirtAddr % alignment) != 0) ||
(createInfo.descrVirtAddr < descrStartAddr) ||
(createInfo.descrVirtAddr >= descrEndAddr))
{
result = Result::ErrorInvalidValue;
}
}
else if ((createInfo.descrVirtAddr != 0) && (createInfo.flags.useReservedGpuVa == false))
{
// The "descrVirtAddr" field is only used for the ShadowDescriptorTable VA range.
result = Result::ErrorInvalidValue;
}
}
return result;
}
// =====================================================================================================================
Result GpuMemory::ValidatePinInfo(
const Device* pDevice,
const PinnedGpuMemoryCreateInfo& createInfo)
{
Result result = Result::ErrorInvalidPointer;
const gpusize alignment = pDevice->MemoryProperties().realMemAllocGranularity;
if (IsPow2Aligned(reinterpret_cast<gpusize>(createInfo.pSysMem), alignment))
{
result = IsPow2Aligned(createInfo.size, alignment) ? Result::Success : Result::ErrorInvalidMemorySize;
}
return result;
}
// =====================================================================================================================
Result GpuMemory::ValidateSvmInfo(
const Device* pDevice,
const SvmGpuMemoryCreateInfo& createInfo)
{
Result result = Result::ErrorInvalidPointer;
const gpusize alignment = pDevice->MemoryProperties().realMemAllocGranularity;
if (IsPow2Aligned(createInfo.alignment, alignment))
{
result = IsPow2Aligned(createInfo.size, alignment) ? Result::Success : Result::ErrorInvalidAlignment;
}
return result;
}
// =====================================================================================================================
Result GpuMemory::ValidateOpenInfo(
const Device* pDevice,
const GpuMemoryOpenInfo& openInfo)
{
Result result = Result::Success;
const GpuMemory* pOriginalMem = static_cast<GpuMemory*>(openInfo.pSharedMem);
if (openInfo.pSharedMem == nullptr)
{
result = Result::ErrorInvalidPointer;
}
else if (pOriginalMem->IsShareable() == false)
{
result = Result::ErrorNotShareable;
}
return result;
}
// =====================================================================================================================
Result GpuMemory::ValidatePeerOpenInfo(
const Device* pDevice,
const PeerGpuMemoryOpenInfo& peerInfo)
{
Result result = Result::Success;
if (peerInfo.pOriginalMem == nullptr)
{
result = Result::ErrorInvalidPointer;
}
return result;
}
// =====================================================================================================================
GpuMemory::GpuMemory(
Device* pDevice)
:
m_pDevice(pDevice),
m_vaRange(VaRange::Default),
m_heapCount(0),
m_priority(GpuMemPriority::Unused),
m_priorityOffset(GpuMemPriorityOffset::Offset0),
m_pImage(nullptr),
m_hExternalResource(0),
m_mtype(MType::Default),
m_remoteSdiSurfaceIndex(0),
m_remoteSdiMarkerIndex(0)
{
memset(&m_desc, 0, sizeof(m_desc));
memset(&m_heaps[0], 0, sizeof(m_heaps));
memset(&m_typedBufferInfo, 0, sizeof(m_typedBufferInfo));
m_flags.u64All = 0;
m_pPinnedMemory = nullptr;
m_pOriginalMem = nullptr;
}
// =====================================================================================================================
GpuMemory::~GpuMemory()
{
Developer::GpuMemoryData data = {};
data.size = m_desc.size;
data.heap = m_heaps[0];
data.flags.isClient = IsClient();
data.flags.isFlippable = IsFlippable();
data.flags.isUdmaBuffer = IsUdmaBuffer();
data.flags.isCmdAllocator = IsCmdAllocator();
data.flags.isVirtual = IsVirtual();
m_pDevice->DeveloperCb(Developer::CallbackType::FreeGpuMemory, &data);
}
// =====================================================================================================================
// Initializes GPU memory objects that are build from create info structs. This includes:
// - Real GPU memory allocations owned by the local process.
// - Virtual GPU memory allocations owned by the local process.
// - External, shared GPU memory objects that point to GPU memory allocations owned by an external process.
Result GpuMemory::Init(
const GpuMemoryCreateInfo& createInfo,
const GpuMemoryInternalCreateInfo& internalInfo)
{
m_desc.flags.isVirtual = createInfo.flags.virtualAlloc || createInfo.flags.sdiExternal;
m_desc.flags.isExternPhys = createInfo.flags.sdiExternal;
m_desc.flags.isExternal = internalInfo.flags.isExternal;
m_desc.flags.isShared = internalInfo.flags.isExternal; // External memory is memory shared between processes.
m_flags.isShareable = createInfo.flags.shareable;
m_flags.isFlippable = createInfo.flags.flippable;
m_flags.interprocess = createInfo.flags.interprocess;
m_flags.globallyCoherent = createInfo.flags.globallyCoherent;
m_flags.xdmaBuffer = createInfo.flags.xdmaBuffer || internalInfo.flags.xdmaBuffer;
m_flags.globalGpuVa = createInfo.flags.globalGpuVa;
m_flags.useReservedGpuVa = createInfo.flags.useReservedGpuVa;
m_flags.typedBuffer = createInfo.flags.typedBuffer;
m_flags.turboSyncSurface = createInfo.flags.turboSyncSurface;
m_flags.busAddressable = createInfo.flags.busAddressable;
m_flags.isStereo = createInfo.flags.stereo;
m_flags.autoPriority = createInfo.flags.autoPriority;
m_flags.peerWritable = createInfo.flags.peerWritable;
m_flags.isClient = internalInfo.flags.isClient;
m_flags.pageDirectory = internalInfo.flags.pageDirectory;
m_flags.pageTableBlock = internalInfo.flags.pageTableBlock;
m_flags.udmaBuffer = internalInfo.flags.udmaBuffer;
m_flags.unmapInfoBuffer = internalInfo.flags.unmapInfoBuffer;
m_flags.historyBuffer = internalInfo.flags.historyBuffer;
m_flags.isCmdAllocator = internalInfo.flags.isCmdAllocator;
m_flags.buddyAllocated = internalInfo.flags.buddyAllocated;
m_flags.privateScreen = internalInfo.flags.privateScreen;
m_flags.isUserQueue = internalInfo.flags.userQueue;
m_flags.isTimestamp = internalInfo.flags.timestamp;
m_flags.accessedPhysically = internalInfo.flags.accessedPhysically;
if (!IsClient())
{
m_flags.autoPriority = m_pDevice->IsUsingAutoPriorityForInternalAllocations();
}
if (IsTypedBuffer())
{
memcpy(&m_typedBufferInfo, &(createInfo.typedBufferInfo), sizeof(TypedBufferCreateInfo));
}
// In general, private driver resources are expected to be always resident. The app and/or client is expected to
// manage residency for anything that doesn't set this flag, including:
// - Resources allocated using CreateGpuMemory().
// - Presentable images.
// - Private screens.
// - Peer memory and images.
// - Shared memory and images.
// - External, shared memory and images.
// - setting has enabled always resident by default
m_flags.alwaysResident = m_pDevice->Settings().alwaysResident || internalInfo.flags.alwaysResident;
// Asking for the paging fence value returned by the OS is pointless if the allocation is not marked as
// always resident.
PAL_ALERT((IsAlwaysResident() == false) && (internalInfo.pPagingFence != nullptr));
m_desc.size = createInfo.size;
m_desc.alignment = createInfo.alignment;
m_vaRange = createInfo.vaRange;
m_priority = createInfo.priority;
m_priorityOffset = createInfo.priorityOffset;
m_heapCount = createInfo.heapCount;
m_pImage = static_cast<Image*>(createInfo.pImage);
m_schedulerId = internalInfo.schedulerId;
m_mtype = internalInfo.mtype;
// The number of reserved compute units for a real-time queue
m_numReservedCu = internalInfo.numReservedCu;
if (IsBusAddressable())
{
// one extra page for marker
const gpusize pageSize = m_pDevice->MemoryProperties().virtualMemPageSize;
m_desc.size = Pow2Align(m_desc.size, pageSize) + pageSize;
}
// the handle is used for importing resource
m_hExternalResource = internalInfo.hExternalResource;
gpusize allocGranularity = 0;
if (IsVirtual())
{
allocGranularity = m_pDevice->MemoryProperties().virtualMemAllocGranularity;
}
else
{
allocGranularity = m_pDevice->MemoryProperties().realMemAllocGranularity;
// NOTE: Assume that the heap selection is both local-only and nonlocal-only temporarily. When we scan the
// heap selections below, this paradoxical assumption will be corrected.
m_flags.localOnly = 1;
m_flags.nonLocalOnly = 1;
// NOTE: Any memory object not being used as a page-directory or page-table block is considered to be CPU
// visible as long as all of its selected heaps are CPU visible.
m_flags.cpuVisible = ((m_flags.pageDirectory == 0) && (m_flags.pageTableBlock == 0));
for (uint32 heap = 0; heap < m_heapCount; ++heap)
{
m_heaps[heap] = createInfo.heaps[heap];
const GpuMemoryHeapProperties& heapProps = m_pDevice->HeapProperties(m_heaps[heap]);
if (heapProps.flags.cpuVisible == 0)
{
m_flags.cpuVisible = 0;
}
switch (m_heaps[heap])
{
case GpuHeapLocal:
case GpuHeapInvisible:
m_flags.nonLocalOnly = 0;
break;
case GpuHeapGartCacheable:
case GpuHeapGartUswc:
m_flags.localOnly = 0;
break;
default:
break;
}
}
// we cannot fire the assert if m_heapCount is 0
PAL_ASSERT(((m_flags.nonLocalOnly == 0) || (m_flags.localOnly == 0)) || (m_heapCount == 0));
}
m_desc.preferredHeap = m_heaps[0];
// Requested alignment must be a multiple of the relevant allocation granularity! If no alignment value was
// provided, use the allocation granularity.
if (m_desc.alignment == 0)
{
m_desc.alignment = allocGranularity;
}
else
{
// The caller provided their own alignment value, make sure it's a multiple of the allocation granularity.
PAL_ASSERT(IsPowerOfTwo(allocGranularity));
if (createInfo.flags.sdiExternal == 0)
{
PAL_ASSERT(IsPow2Aligned(m_desc.alignment, allocGranularity));
}
}
Result result = Result::Success;
if (IsShared())
{
result = OpenSharedMemory();
if (IsErrorResult(result) == false)
{
DescribeGpuMemory(Developer::GpuMemoryAllocationMethod::Opened);
}
}
else
{
gpusize baseVirtAddr = internalInfo.baseVirtAddr;
if (createInfo.flags.useReservedGpuVa && (createInfo.pReservedGpuVaOwner != nullptr))
{
const GpuMemoryDesc& desc = createInfo.pReservedGpuVaOwner->Desc();
// It's illegal for the internal path to specify non-zero base VA when client already does.
PAL_ASSERT(internalInfo.baseVirtAddr == 0);
// Do not expect client set "useReservedGpuVa" for ShadowDescriptorTable case
PAL_ASSERT(m_vaRange != VaRange::ShadowDescriptorTable);
baseVirtAddr = desc.gpuVirtAddr;
}
if (m_vaRange == VaRange::ShadowDescriptorTable)
{
// It's illegal for the internal path to use this VA range.
PAL_ASSERT(IsClient());
gpusize descrStartAddr = 0;
gpusize descrEndAddr = 0;
gpusize shadowStartAddr = 0;
gpusize shadowEndAddr = 0;
m_pDevice->VirtualAddressRange(VaPartition::DescriptorTable, &descrStartAddr, &descrEndAddr);
m_pDevice->VirtualAddressRange(VaPartition::ShadowDescriptorTable, &shadowStartAddr, &shadowEndAddr);
// The descriptor GPU VA must meet the address alignment and fit in the DescriptorTable range.
PAL_ASSERT(((createInfo.descrVirtAddr % m_desc.alignment) == 0) &&
(createInfo.descrVirtAddr >= descrStartAddr) &&
(createInfo.descrVirtAddr < descrEndAddr));
baseVirtAddr = shadowStartAddr + (createInfo.descrVirtAddr - descrStartAddr);
}
else if ((createInfo.vaRange == VaRange::Svm) && (m_pDevice->MemoryProperties().flags.iommuv2Support == 0))
{
result = AllocateSvmVirtualAddress(baseVirtAddr, createInfo.size, createInfo.alignment, false);
baseVirtAddr = m_desc.gpuVirtAddr;
}
else if (createInfo.vaRange == VaRange::Default)
{
// For performance reasons we may wish to force our GPU memory allocations' addresses and sizes to be
// either fragment-aligned or aligned to KMD's reported optimized large page size. This should be
// skipped if any of the following are true:
// - We're not using the default VA range because non-default VA ranges have special address usage rules.
// - We have selected a specific base VA for the allocation because it might not be 64KB aligned.
// - The allocation prefers a non-local heap because we can only get 64KB fragments in local memory.
// - Type is SDI ExternalPhysical because it has no real allocation and size must be consistent with KMD.
if ((baseVirtAddr == 0) &&
((m_desc.preferredHeap == GpuHeapLocal) || (m_desc.preferredHeap == GpuHeapInvisible)) &&
(createInfo.flags.sdiExternal == 0))
{
#if !defined(PAL_BUILD_BRANCH) || (PAL_BUILD_BRANCH >= 1740)
if (m_desc.size >= m_pDevice->MemoryProperties().largePageSupport.minSurfaceSizeForAlignmentInBytes)
{
const gpusize largePageSize = m_pDevice->MemoryProperties().largePageSupport.largePageSizeInBytes;
if (m_pDevice->MemoryProperties().largePageSupport.sizeAlignmentNeeded)
{
m_desc.size = Pow2Align(m_desc.size, largePageSize);
}
if (m_pDevice->MemoryProperties().largePageSupport.gpuVaAlignmentNeeded)
{
m_desc.alignment = Pow2Align(m_desc.alignment, largePageSize);
}
}
#endif
}
}
if (result == Result::Success && (Desc().flags.isExternPhys == false))
{
result = AllocateOrPinMemory(baseVirtAddr,
internalInfo.pPagingFence,
createInfo.virtualAccessMode,
0,
nullptr,
nullptr);
}
if (IsErrorResult(result) == false)
{
DescribeGpuMemory(Developer::GpuMemoryAllocationMethod::Normal);
}
}
// Verify that if the allocation succeeded, we got a GPU virtual address back as expected (except for
// page directory and page table allocations and SDI External Physical Memory).
if ((IsPageDirectory() == false) && (IsPageTableBlock() == false) && (Desc().flags.isExternPhys == false))
{
PAL_ASSERT((result != Result::Success) || (m_desc.gpuVirtAddr != 0));
}
return result;
}
// =====================================================================================================================
// Initializes this GPU memory object as a SVM memory allocation.
Result GpuMemory::Init(
const SvmGpuMemoryCreateInfo& createInfo)
{
Result result = Result::Success;
m_flags.isPinned = 1;
m_flags.nonLocalOnly = 1; // Pinned allocations always go into a non-local heap.
m_flags.cpuVisible = 1; // Pinned allocations are by definition CPU visible.
m_flags.useReservedGpuVa = createInfo.flags.useReservedGpuVa;
m_desc.size = createInfo.size;
m_desc.alignment = createInfo.alignment;
m_vaRange = Pal::VaRange::Svm;
gpusize baseVirtAddr = 0;
if (IsGpuVaPreReserved())
{
baseVirtAddr = createInfo.pReservedGpuVaOwner->Desc().gpuVirtAddr;
}
if (m_pDevice->MemoryProperties().flags.iommuv2Support)
{
m_desc.flags.isSvmAlloc = 1;
if (createInfo.isUsedForKernel)
{
m_desc.flags.isExecutable = 1;
}
}
else
{
result = AllocateSvmVirtualAddress(baseVirtAddr, createInfo.size, createInfo.alignment, true);
}
if (result == Result::Success)
{
// Scan the list of available GPU heaps to determine which heap(s) this pinned allocation will end up in.
for (uint32 idx = 0; idx < GpuHeapCount; ++idx)
{
const GpuHeap heap = static_cast<GpuHeap>(idx);
if (m_pDevice->HeapProperties(heap).flags.holdsPinned != 0)
{
m_heaps[m_heapCount++] = heap;
}
}
m_desc.preferredHeap = m_heaps[0];
result = AllocateOrPinMemory(m_desc.gpuVirtAddr,
nullptr,
VirtualGpuMemAccessMode::Undefined,
0,
nullptr,
nullptr);
m_pPinnedMemory = reinterpret_cast<const void*>(m_desc.gpuVirtAddr);
}
PAL_ASSERT((result != Result::Success) || (m_desc.gpuVirtAddr != 0));
if (IsErrorResult(result) == false)
{
DescribeGpuMemory(Developer::GpuMemoryAllocationMethod::Svm);
}
return result;
}
// =====================================================================================================================
// Initializes this GPU memory object as a pinned (GPU-accessible) system-memory allocation.
Result GpuMemory::Init(
const PinnedGpuMemoryCreateInfo& createInfo)
{
m_flags.isPinned = 1;
m_flags.nonLocalOnly = 1; // Pinned allocations always go into a non-local heap.
m_flags.cpuVisible = 1; // Pinned allocations are by definition CPU visible.
m_pPinnedMemory = createInfo.pSysMem;
m_desc.size = createInfo.size;
m_desc.alignment =
m_pDevice->MemoryProperties().realMemAllocGranularity;
m_vaRange = createInfo.vaRange;
// Scan the list of available GPU heaps to determine which heap(s) this pinned allocation will end up in.
for (uint32 idx = 0; idx < GpuHeapCount; ++idx)
{
const GpuHeap heap = static_cast<GpuHeap>(idx);
if (m_pDevice->HeapProperties(heap).flags.holdsPinned != 0)
{
m_heaps[m_heapCount++] = heap;
}
}
m_desc.preferredHeap = m_heaps[0];
const Result result = AllocateOrPinMemory(0, nullptr, VirtualGpuMemAccessMode::Undefined, 0, nullptr, nullptr);
// Verify that if the pinning succeeded, we got a GPU virtual address back as expected.
PAL_ASSERT((result != Result::Success) || (m_desc.gpuVirtAddr != 0));
if (IsErrorResult(result) == false)
{
DescribeGpuMemory(Developer::GpuMemoryAllocationMethod::Pinned);
}
return result;
}
// =====================================================================================================================
// Initializes this GPU memory object as a share of the other memory object specified in openInfo.pSharedMem.
// The shared memory must be owned by the local process, external shared memory uses a different init path.
Result GpuMemory::Init(
const GpuMemoryOpenInfo& openInfo)
{
m_pOriginalMem = static_cast<GpuMemory*>(openInfo.pSharedMem);
m_desc.size = m_pOriginalMem->m_desc.size;
m_desc.alignment = m_pOriginalMem->m_desc.alignment;
m_vaRange = m_pOriginalMem->m_vaRange;
m_mtype = m_pOriginalMem->m_mtype;
m_heapCount = m_pOriginalMem->m_heapCount;
for (uint32 i = 0; i < m_heapCount; ++i)
{
m_heaps[i] = m_pOriginalMem->m_heaps[i];
}
m_desc.preferredHeap = m_heaps[0];
m_desc.flags.isShared = 1;
m_flags.isShareable = m_pOriginalMem->m_flags.isShareable;
m_flags.isFlippable = m_pOriginalMem->m_flags.isFlippable;
m_flags.isStereo = m_pOriginalMem->m_flags.isStereo;
m_flags.localOnly = m_pOriginalMem->m_flags.localOnly;
m_flags.nonLocalOnly = m_pOriginalMem->m_flags.nonLocalOnly;
m_flags.interprocess = m_pOriginalMem->m_flags.interprocess;
m_flags.globalGpuVa = m_pOriginalMem->m_flags.globalGpuVa;
// Set the gpuVirtAddr if the GPU VA is visible to all devices
if (IsGlobalGpuVa())
{
m_desc.gpuVirtAddr = m_pOriginalMem->m_desc.gpuVirtAddr;
}
// NOTE: The following flags are not expected to be set for shared memory objects!
PAL_ASSERT((m_pOriginalMem->m_desc.flags.isVirtual == 0) &&
(m_pOriginalMem->m_desc.flags.isPeer == 0) &&
(m_pOriginalMem->m_flags.isPinned == 0) &&
(m_pOriginalMem->m_flags.pageDirectory == 0) &&
(m_pOriginalMem->m_flags.pageTableBlock == 0) &&
(m_pOriginalMem->m_flags.isCmdAllocator == 0) &&
(m_pOriginalMem->m_flags.udmaBuffer == 0) &&
(m_pOriginalMem->m_flags.historyBuffer == 0) &&
(m_pOriginalMem->m_flags.xdmaBuffer == 0) &&
(m_pOriginalMem->m_flags.buddyAllocated == 0) &&
(m_pOriginalMem->m_flags.alwaysResident == 0));
const Result result = OpenSharedMemory();
if (IsErrorResult(result) == false)
{
DescribeGpuMemory(Developer::GpuMemoryAllocationMethod::Opened);
}
// Verify that if opening the peer memory connection succeeded, we got a GPU virtual address back as expected.
PAL_ASSERT((result != Result::Success) || (m_desc.gpuVirtAddr != 0));
return result;
}
// =====================================================================================================================
// Initializes this GPU memory object as a peer of the other memory object specified in peerInfo.pOriginalMem.
Result GpuMemory::Init(
const PeerGpuMemoryOpenInfo& peerInfo)
{
m_pOriginalMem = static_cast<GpuMemory*>(peerInfo.pOriginalMem);
m_desc.size = m_pOriginalMem->m_desc.size;
m_desc.alignment = m_pOriginalMem->m_desc.alignment;
m_vaRange = m_pOriginalMem->m_vaRange;
m_mtype = m_pOriginalMem->m_mtype;
m_heapCount = m_pOriginalMem->m_heapCount;
for (uint32 i = 0; i < m_heapCount; ++i)
{
m_heaps[i] = m_pOriginalMem->m_heaps[i];
}
m_desc.preferredHeap = m_heaps[0];
m_desc.flags.isPeer = 1;
m_flags.isShareable = m_pOriginalMem->m_flags.isShareable;
m_flags.isFlippable = m_pOriginalMem->m_flags.isFlippable;
m_flags.isStereo = m_pOriginalMem->m_flags.isStereo;
m_flags.localOnly = m_pOriginalMem->m_flags.localOnly;
m_flags.nonLocalOnly = m_pOriginalMem->m_flags.nonLocalOnly;
m_flags.interprocess = m_pOriginalMem->m_flags.interprocess;
m_flags.globalGpuVa = m_pOriginalMem->m_flags.globalGpuVa;
m_flags.cpuVisible = m_pOriginalMem->m_flags.cpuVisible;
m_flags.peerWritable = m_pOriginalMem->m_flags.peerWritable;
PAL_ASSERT(m_flags.peerWritable == 1);
// Set the gpuVirtAddr if the GPU VA is visible to all devices
if (IsGlobalGpuVa())
{
m_desc.gpuVirtAddr = m_pOriginalMem->m_desc.gpuVirtAddr;
}
// NOTE: The following flags are not expected to be set for peer memory objects!
PAL_ASSERT((m_pOriginalMem->m_desc.flags.isVirtual == 0) &&
(m_pOriginalMem->m_desc.flags.isShared == 0) &&
(m_pOriginalMem->m_flags.isPinned == 0) &&
(m_pOriginalMem->m_flags.pageDirectory == 0) &&
(m_pOriginalMem->m_flags.pageTableBlock == 0) &&
(m_pOriginalMem->m_flags.isCmdAllocator == 0) &&
(m_pOriginalMem->m_flags.udmaBuffer == 0) &&
(m_pOriginalMem->m_flags.historyBuffer == 0) &&
(m_pOriginalMem->m_flags.xdmaBuffer == 0) &&
(m_pOriginalMem->m_flags.buddyAllocated == 0));
const Result result = OpenPeerMemory();
if (IsErrorResult(result) == false)
{
DescribeGpuMemory(Developer::GpuMemoryAllocationMethod::Peer);
}
// Verify that if opening the peer memory connection succeeded, we got a GPU virtual address back as expected.
PAL_ASSERT((result != Result::Success) || (m_desc.gpuVirtAddr != 0));
return result;
}
// =====================================================================================================================
// Destroys an internal GPU memory object: invokes the destructor and frees the system memory block it resides in.
void GpuMemory::DestroyInternal()
{
Platform* pPlatform = m_pDevice->GetPlatform();
Destroy();
PAL_FREE(this, pPlatform);
}
// =====================================================================================================================
// Set mapppedToPeerMemory flag for virtual GPU memory when mapped to peer real memory.
void GpuMemory::SetMapDestPeerMem(GpuMemory* pMapDestPeerMem)
{
// The p2p workaround only supports one mapping per virtual GPU memory object.
PAL_ASSERT(pMapDestPeerMem->IsPeer());
PAL_ASSERT((m_pMapDestPeerMem == nullptr) || (m_pMapDestPeerMem == pMapDestPeerMem));
m_pMapDestPeerMem = pMapDestPeerMem;
m_flags.mapppedToPeerMemory = 1;
}
// =====================================================================================================================
// Changes the allocation's priority. This is only supported for "real" allocations.
Result GpuMemory::SetPriority(
GpuMemPriority priority,
GpuMemPriorityOffset priorityOffset)
{
Result result = Result::ErrorUnavailable;
if ((IsPinned() == false) &&
(IsVirtual() == false) &&
(IsPeer() == false) &&
(IsAutoPriority() == false) &&
(IsShared() == false))
{
// Save off the new priority information.
m_priority = priority;
m_priorityOffset = priorityOffset;
// Call the OS to change the priority of the GpuMemory allocation.
result = OsSetPriority(priority, priorityOffset);
}
return result;
}
// =====================================================================================================================
// Maps the GPU memory allocation into CPU address space.
Result GpuMemory::Map(
void** ppData)
{
Result result = Result::ErrorInvalidPointer;
if (ppData != nullptr)
{
if (IsPinned())
{
PAL_ASSERT(m_pPinnedMemory != nullptr);
(*ppData) = const_cast<void*>(m_pPinnedMemory);
result = Result::Success;
}
else if (IsVirtual())
{
(*ppData) = nullptr;
result = Result::ErrorUnavailable;
}
else if (IsCpuVisible())
{
if (IsSvmAlloc())
{
(*ppData) = reinterpret_cast<void*>(m_desc.gpuVirtAddr);
result = Result::Success;
}
else
{
result = OsMap(ppData);
}
}
else
{
(*ppData) = nullptr;
result = Result::ErrorNotMappable;
}
}
return result;
}
// =====================================================================================================================
// Unmaps the GPU memory allocation out of CPU address space.
Result GpuMemory::Unmap()
{
Result result = Result::ErrorNotMappable;
if (IsPinned())
{
result = Result::Success;
}
else if (IsCpuVisible())
{
if (IsSvmAlloc())
{
result = Result::Success;
}
else
{
result = OsUnmap();
}
}
else if (IsVirtual())
{
result = Result::ErrorUnavailable;
}
return result;
}
// =====================================================================================================================
// Describes the GPU memory allocation to the above layers
void GpuMemory::DescribeGpuMemory(
Developer::GpuMemoryAllocationMethod allocMethod
) const
{
Developer::GpuMemoryData data = {};
data.size = m_desc.size;
data.heap = m_heaps[0];
data.flags.isClient = IsClient();
data.flags.isFlippable = IsFlippable();
data.flags.isCmdAllocator = IsCmdAllocator();
data.flags.isUdmaBuffer = IsUdmaBuffer();
data.flags.isVirtual = IsVirtual();
data.allocMethod = allocMethod;
m_pDevice->DeveloperCb(Developer::CallbackType::AllocGpuMemory, &data);
}
// =====================================================================================================================
bool GpuMemory::IsCpuVisible() const
{
bool isCpuVisible = (m_flags.cpuVisible != 0);
return isCpuVisible;
}
} // Pal
| [
"jacob.he@amd.com"
] | jacob.he@amd.com |
0760ad8169ac7dfedc0890ac76b7e1a09ba537e5 | 978570d38d466c5c39552d4d28d29768d2d6bfb8 | /TwoTracksISRProc/Class/mar6_2015.txt | f5113451c3fe759fec37caf3dfc3658b5bc49c61 | [] | no_license | hixio-mh/processors | 39e60fde0446ebee2d754afedb170e813e061897 | 7e557e6d2d128dc7c3a647f1d4d3f37a7e40408b | refs/heads/master | 2021-09-14T15:33:07.067376 | 2018-05-15T19:08:34 | 2018-05-15T19:08:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 53,743 | txt | // -*- C++ -*-
//
// Package: TwoTracksISRProc
// Module: TwoTracksISRProc
//
// Description: 1 shower & 2 tracks
//
// Implementation:
// <Notes on implementation>
//
// Author: Ting Xiao
// Created: Fri Jun 26 18:02:00 EDT 2009
// $Id$
//
// Revision history
//
// $Log$
//
#include "Experiment/Experiment.h"
// system include files
// user include files
#include "TwoTracksISRProc/TwoTracksISRProc.h"
#include "Experiment/report.h"
#include "Experiment/units.h" // for converting to/from standard CLEO units
#include "HistogramInterface/HINtupleVarNames.h"
#include "HistogramInterface/HINtupleArray.h"
#include "HistogramInterface/HIHist1D.h"
#include "DataHandler/Record.h"
#include "DataHandler/Frame.h"
#include "FrameAccess/extract.h"
#include "FrameAccess/FAItem.h"
#include "FrameAccess/FATable.h"
#include "Navigation/NavShower.h"
#include "C3cc/CcShowerAttributes.h"
#include "Navigation/NavShowerServer.h"
#include "C3ccProd/CcFortranShowerCorrector.h"
#include "C3Mu/MuTrack.h"
#include "Navigation/NavMuonId.h"
//I added the following at the suggestion of the NavShower web page
#include "Navigation/NavConReg.h"
#include "KinematicTrajectory/KTKinematicData.h"
#include "Navigation/NavTkShMatch.h"
#include "C3cc/CcAssignedEnergyHit.h"
#include "Navigation/NavTrack.h"
#include "TrackRoot/TRHelixFit.h"
#include "TrackRoot/TRTrackFitQuality.h"
#include "TrackRoot/TRSeedTrackQuality.h"
#include "TrackDelivery/TDKinematicFit.h"
#include "Navigation/NavElecId.h"
#include "FitEvt/FitEvtSettings.h"
#include "FitEvt/FitEvt.h"
#include "BeamEnergy/BeamEnergy.h"
#include "MagField/MagneticField.h"
#include "MagField/MFFieldMap.h"
#include "BeamSpot/BeamSpot.h"
#include "CleoDB/DBEventHeader.h"
#include "TriggerData/TriggerData.h"
#include "TriggerL1Data/TriggerL1Data.h"
#include "Level4Proc/Level4Decision.h"
//RICH example
#include "Navigation/NavRich.h"
//Dedx example
#include "DedxInfo/DedxInfo.h"
// STL classes
// You may have to uncomment some of these or other stl headers
// depending on what other header files you include (e.g. FrameAccess etc.)!
//#include <string>
//#include <vector>
//#include <set>
//#include <map>
//#include <algorithm>
//#include <utility>
//
// constants, enums and typedefs
//
static const char* const kFacilityString = "Processor.TwoTracksISRProc" ;
// ---- cvs-based strings (Id and Tag with which file was checked out)
static const char* const kIdString = "$Id: processor.cc,v 1.41 2006/02/08 19:38:02 wsun Exp $";
static const char* const kTagString = "$Name: v07_03_00 $";
//
// static data member definitions
//
//
// constructors and destructor
//
TwoTracksISRProc::TwoTracksISRProc( void ) // anal1
: Processor( "TwoTracksISRProc" )
{
report( DEBUG, kFacilityString ) << "here in ctor()" << endl;
// ---- bind a method to a stream -----
// These lines ARE VERY IMPORTANT! If you don't bind the
// code you've just written (the "action") to a stream,
// your code won't get executed!
bind( &TwoTracksISRProc::event, Stream::kEvent );
bind( &TwoTracksISRProc::beginRun, Stream::kBeginRun );
//bind( &TwoTracksISRProc::endRun, Stream::kEndRun );
// do anything here that needs to be done at creation time
// (e.g. allocate resources etc.)
}
TwoTracksISRProc::~TwoTracksISRProc() // anal5
{
report( DEBUG, kFacilityString ) << "here in dtor()" << endl;
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}
//
// member functions
//
// ------------ methods for beginning/end "Interactive" ------------
// --------------------------- init method -------------------------
void
TwoTracksISRProc::init( void ) // anal1 "Interactive"
{
report( DEBUG, kFacilityString ) << "here in init()" << endl;
// do any initialization here based on Parameter Input by User
// (e.g. run expensive algorithms that are based on parameters
// specified by user at run-time)
}
// -------------------- terminate method ----------------------------
void
TwoTracksISRProc::terminate( void ) // anal5 "Interactive"
{
report( DEBUG, kFacilityString ) << "here in terminate()" << endl;
// do anything here BEFORE New Parameter Change
// (e.g. write out result based on parameters from user-input)
}
// ---------------- standard place to book histograms ---------------
enum {knshower, ccknshower,
chisqvpi,chisqfpi, //chisq of pion fit
chisqvmu,chisqfmu, // chisq of muon fit
chisqvk,chisqfk, // chisq of kaon fit
chisqvpi1,chisqfpi1, //chisq of pion fit (additional FSR)
chisqvmu1,chisqfmu1, //chisq of muon fit (additional FSR)
chisqvk1,chisqfk1, //chisq of kaon fit (additional FSR)
e1,th1,phi1,e9251, // unfitted photon energy
e2,th2,phi2,e9252,
e3,th3,phi3,e9253,
e4,th4,phi4,e9254,
e5,th5,phi5,e9255,
e6,th6,phi6,e9256,
e7,th7,phi7,e9257,
e8,th8,phi8,e9258,
e9,th9,phi9,e9259,
e10,th10,phi10,e92510,
cce1,ccth1,ccphi1,cce9251, // without GoodThingsProd
cce2,ccth2,ccphi2,cce9252,
cce3,ccth3,ccphi3,cce9253,
cce4,ccth4,ccphi4,cce9254,
cce5,ccth5,ccphi5,cce9255,
cce6,ccth6,ccphi6,cce9256,
cce7,ccth7,ccphi7,cce9257,
cce8,ccth8,ccphi8,cce9258,
cce9,ccth9,ccphi9,cce9259,
cce10,ccth10,ccphi10,cce92510,
cce11,ccth11,ccphi11,cce92511,
cce12,ccth12,ccphi12,cce92512,
cce13,ccth13,ccphi13,cce92513,
cce14,ccth14,ccphi14,cce92514,
cce15,ccth15,ccphi15,cce92515,
cce16,ccth16,ccphi16,cce92516,
cce17,ccth17,ccphi17,cce92517,
cce18,ccth18,ccphi18,cce92518,
cce19,ccth19,ccphi19,cce92519,
cce20,ccth20,ccphi20,cce92520,
me1,eop1,me2,eop2, //matched energy and E/p
mudepth1,mudepth2, //muon depth
fepi,fthpi,fphipi, // fitted photon energy fitted with pions
femu,fthmu,fphimu, // fitted photon energy fitted with muons
fek,fthk,fphik, // fitted photon energy fitted with kaons
epi2,thpi2,phipi2, // unfitted photon energy fitted with pions (additional FSR)
f1epi1,f1thpi1,f1phipi1, // fitted photon energy fitted with pions (additional FSR)
f1epi2,f1thpi2,f1phipi2, //additional FSR
f1emu1,f1thmu1,f1phimu1, // fitted photon energy fitted with muons (additional FSR)
f1emu2,f1thmu2,f1phimu2, //additional FSR
f1ek1,f1thk1,f1phik1, // fitted photon energy fitted with kaons (additional FSR)
f1ek2,f1thk2,f1phik2, //additional FSR
pite1,pipx1,pipy1,pipz1,mute1,mupx1,mupy1,mupz1,kte1,kpx1,kpy1,kpz1,
pisigma1,musigma1,pill1,mull1,ksigma1,kll1,
pite2,pipx2,pipy2,pipz2,mute2,mupx2,mupy2,mupz2,kte2,kpx2,kpy2,kpz2,
pisigma2,musigma2,pill2,mull2,ksigma2,kll2,
fpite1,fpipx1,fpipy1,fpipz1,fmute1,fmupx1,fmupy1,fmupz1,fkte1,fkpx1,fkpy1,fkpz1,
fpite2,fpipx2,fpipy2,fpipz2,fmute2,fmupx2,fmupy2,fmupz2,fkte2,fkpx2,fkpy2,fkpz2,
f1pite1,f1pipx1,f1pipy1,f1pipz1,f1pite2,f1pipx2,f1pipy2,f1pipz2, //(additional FSR)
f1mute1,f1mupx1,f1mupy1,f1mupz1,f1mute2,f1mupx2,f1mupy2,f1mupz2, //(additional FSR)
f1kte1,f1kpx1,f1kpy1,f1kpz1,f1kte2,f1kpx2,f1kpy2,f1kpz2, //(additional FSR)
charge1, charge2, //charges of the 2 tracks
beam_e, // beam energy
m_trk, //track mass variable
l1trigger1,l1trigger2,l1trigger3,l1trigger4,l1trigger5,l1trigger6,l1trigger7,l1trigger8,
l1trigger9,l1trigger10,l1trigger11,l1trigger12,l1trigger13,l1trigger14,l1trigger15,l1trigger16,
kVarNum};
void
TwoTracksISRProc::hist_book( HIHistoManager& iHistoManager )
{
report( DEBUG, kFacilityString ) << "here in hist_book()" << endl;
// book your histograms here
HINtupleVarNames ntupleNames(kVarNum);
ntupleNames.addVar(knshower, "knshower");
ntupleNames.addVar(ccknshower, "ccknshower");
ntupleNames.addVar(chisqvpi, "chisqvpi");
ntupleNames.addVar(chisqfpi, "chisqfpi");
ntupleNames.addVar(chisqvmu, "chisqvmu");
ntupleNames.addVar(chisqfmu, "chisqfmu");
ntupleNames.addVar(chisqvk, "chisqvk");
ntupleNames.addVar(chisqfk, "chisqfk");
ntupleNames.addVar(chisqvpi1, "chisqvpi1");
ntupleNames.addVar(chisqfpi1, "chisqfpi1");
ntupleNames.addVar(chisqvmu1, "chisqvmu1");
ntupleNames.addVar(chisqfmu1, "chisqfmu1");
ntupleNames.addVar(chisqvk1, "chisqvk1");
ntupleNames.addVar(chisqfk1, "chisqfk1");
ntupleNames.addVar(e1, "e1");
ntupleNames.addVar(th1, "th1");
ntupleNames.addVar(phi1, "phi1");
ntupleNames.addVar(e9251, "e9251");
ntupleNames.addVar(e2, "e2");
ntupleNames.addVar(th2, "th2");
ntupleNames.addVar(phi2, "phi2");
ntupleNames.addVar(e9252, "e9252");
ntupleNames.addVar(e3, "e3");
ntupleNames.addVar(th3, "th3");
ntupleNames.addVar(phi3, "phi3");
ntupleNames.addVar(e9253, "e9253");
ntupleNames.addVar(e4, "e4");
ntupleNames.addVar(th4, "th4");
ntupleNames.addVar(phi4, "phi4");
ntupleNames.addVar(e9254, "e9254");
ntupleNames.addVar(e5, "e5");
ntupleNames.addVar(th5, "th5");
ntupleNames.addVar(phi5, "phi5");
ntupleNames.addVar(e9255, "e9255");
ntupleNames.addVar(e6, "e6");
ntupleNames.addVar(th6, "th6");
ntupleNames.addVar(phi6, "phi6");
ntupleNames.addVar(e9256, "e9256");
ntupleNames.addVar(e7, "e7");
ntupleNames.addVar(th7, "th7");
ntupleNames.addVar(phi7, "phi7");
ntupleNames.addVar(e9257, "e9257");
ntupleNames.addVar(e8, "e8");
ntupleNames.addVar(th8, "th8");
ntupleNames.addVar(phi8, "phi8");
ntupleNames.addVar(e9258, "e9258");
ntupleNames.addVar(e9, "e9");
ntupleNames.addVar(th9, "th9");
ntupleNames.addVar(phi9, "phi9");
ntupleNames.addVar(e9259, "e9259");
ntupleNames.addVar(e10, "e10");
ntupleNames.addVar(th10, "th10");
ntupleNames.addVar(phi10, "phi10");
ntupleNames.addVar(e92510, "e92510");
ntupleNames.addVar(cce1, "cce1");
ntupleNames.addVar(ccth1, "ccth1");
ntupleNames.addVar(ccphi1, "ccphi1");
ntupleNames.addVar(cce9251, "cce9251");
ntupleNames.addVar(cce2, "cce2");
ntupleNames.addVar(ccth2, "ccth2");
ntupleNames.addVar(ccphi2, "ccphi2");
ntupleNames.addVar(cce9252, "cce9252");
ntupleNames.addVar(cce3, "cce3");
ntupleNames.addVar(ccth3, "ccth3");
ntupleNames.addVar(ccphi3, "ccphi3");
ntupleNames.addVar(cce9253, "cce9253");
ntupleNames.addVar(cce4, "cce4");
ntupleNames.addVar(ccth4, "ccth4");
ntupleNames.addVar(ccphi4, "ccphi4");
ntupleNames.addVar(cce9254, "cce9254");
ntupleNames.addVar(cce5, "cce5");
ntupleNames.addVar(ccth5, "ccth5");
ntupleNames.addVar(ccphi5, "ccphi5");
ntupleNames.addVar(cce9255, "cce9255");
ntupleNames.addVar(cce6, "cce6");
ntupleNames.addVar(ccth6, "ccth6");
ntupleNames.addVar(ccphi6, "ccphi6");
ntupleNames.addVar(cce9256, "cce9256");
ntupleNames.addVar(cce7, "cce7");
ntupleNames.addVar(ccth7, "ccth7");
ntupleNames.addVar(ccphi7, "ccphi7");
ntupleNames.addVar(cce9257, "cce9257");
ntupleNames.addVar(cce8, "cce8");
ntupleNames.addVar(ccth8, "ccth8");
ntupleNames.addVar(ccphi8, "ccphi8");
ntupleNames.addVar(cce9258, "cce9258");
ntupleNames.addVar(cce9, "cce9");
ntupleNames.addVar(ccth9, "ccth9");
ntupleNames.addVar(ccphi9, "ccphi9");
ntupleNames.addVar(cce9259, "cce9259");
ntupleNames.addVar(cce10, "cce10");
ntupleNames.addVar(ccth10, "ccth10");
ntupleNames.addVar(ccphi10, "ccphi10");
ntupleNames.addVar(cce92510, "cce92510");
ntupleNames.addVar(cce11, "cce11");
ntupleNames.addVar(ccth11, "ccth11");
ntupleNames.addVar(ccphi11, "ccphi11");
ntupleNames.addVar(cce92511, "cce92511");
ntupleNames.addVar(cce12, "cce12");
ntupleNames.addVar(ccth12, "ccth12");
ntupleNames.addVar(ccphi12, "ccphi12");
ntupleNames.addVar(cce92512, "cce92512");
ntupleNames.addVar(cce13, "cce13");
ntupleNames.addVar(ccth13, "ccth13");
ntupleNames.addVar(ccphi13, "ccphi13");
ntupleNames.addVar(cce92513, "cce92513");
ntupleNames.addVar(cce14, "cce14");
ntupleNames.addVar(ccth14, "ccth14");
ntupleNames.addVar(ccphi14, "ccphi14");
ntupleNames.addVar(cce92514, "cce92514");
ntupleNames.addVar(cce15, "cce15");
ntupleNames.addVar(ccth15, "ccth15");
ntupleNames.addVar(ccphi15, "ccphi15");
ntupleNames.addVar(cce92515, "cce92515");
ntupleNames.addVar(cce16, "cce16");
ntupleNames.addVar(ccth16, "ccth16");
ntupleNames.addVar(ccphi16, "ccphi16");
ntupleNames.addVar(cce92516, "cce92516");
ntupleNames.addVar(cce17, "cce17");
ntupleNames.addVar(ccth17, "ccth17");
ntupleNames.addVar(ccphi17, "ccphi17");
ntupleNames.addVar(cce92517, "cce92517");
ntupleNames.addVar(cce18, "cce18");
ntupleNames.addVar(ccth18, "ccth18");
ntupleNames.addVar(ccphi18, "ccphi18");
ntupleNames.addVar(cce92518, "cce92518");
ntupleNames.addVar(cce19, "cce19");
ntupleNames.addVar(ccth19, "ccth19");
ntupleNames.addVar(ccphi19, "ccphi19");
ntupleNames.addVar(cce92519, "cce92519");
ntupleNames.addVar(cce20, "cce20");
ntupleNames.addVar(ccth20, "ccth20");
ntupleNames.addVar(ccphi20, "ccphi20");
ntupleNames.addVar(cce92520, "cce92520");
ntupleNames.addVar(me1, "me1");
ntupleNames.addVar(eop1, "eop1");
ntupleNames.addVar(me2, "me2");
ntupleNames.addVar(eop2, "eop2");
ntupleNames.addVar(mudepth1, "mudepth1");
ntupleNames.addVar(mudepth2, "mudepth2");
ntupleNames.addVar(epi2, "epi2");
ntupleNames.addVar(thpi2, "thpi2");
ntupleNames.addVar(phipi2, "phipi2");
ntupleNames.addVar(fepi, "fepi");
ntupleNames.addVar(fthpi, "fthpi");
ntupleNames.addVar(fphipi, "fphipi");
ntupleNames.addVar(femu, "femu");
ntupleNames.addVar(fthmu, "fthmu");
ntupleNames.addVar(fphimu, "fphimu");
ntupleNames.addVar(fek, "fek");
ntupleNames.addVar(fthk, "fthk");
ntupleNames.addVar(fphik, "fphik");
ntupleNames.addVar(f1epi1, "f1epi1");
ntupleNames.addVar(f1thpi1, "f1thpi1");
ntupleNames.addVar(f1phipi1, "f1phipi1");
ntupleNames.addVar(f1epi2, "f1epi2");
ntupleNames.addVar(f1thpi2, "f1thpi2");
ntupleNames.addVar(f1phipi2, "f1phipi2");
ntupleNames.addVar(f1emu1, "f1emu1");
ntupleNames.addVar(f1thmu1, "f1thmu1");
ntupleNames.addVar(f1phimu1, "f1phimu1");
ntupleNames.addVar(f1emu2, "f1emu2");
ntupleNames.addVar(f1thmu2, "f1thmu2");
ntupleNames.addVar(f1phimu2, "f1phimu2");
ntupleNames.addVar(f1ek1, "f1ek1");
ntupleNames.addVar(f1thk1, "f1thk1");
ntupleNames.addVar(f1phik1, "f1phik1");
ntupleNames.addVar(f1ek2, "f1ek2");
ntupleNames.addVar(f1thk2, "f1thk2");
ntupleNames.addVar(f1phik2, "f1phik2");
ntupleNames.addVar(pite1, "pite1");
ntupleNames.addVar(pipx1, "pipx1");
ntupleNames.addVar(pipy1, "pipy1");
ntupleNames.addVar(pipz1, "pipz1");
ntupleNames.addVar(mute1, "mute1");
ntupleNames.addVar(mupx1, "mupx1");
ntupleNames.addVar(mupy1, "mupy1");
ntupleNames.addVar(mupz1, "mupz1");
ntupleNames.addVar(kte1, "kte1");
ntupleNames.addVar(kpx1, "kpx1");
ntupleNames.addVar(kpy1, "kpy1");
ntupleNames.addVar(kpz1, "kpz1");
ntupleNames.addVar(pisigma1, "pisigma1");
ntupleNames.addVar(musigma1, "musigma1");
ntupleNames.addVar(ksigma1, "ksigma1");
ntupleNames.addVar(pill1, "pill1");
ntupleNames.addVar(mull1, "mull1");
ntupleNames.addVar(kll1, "kll1");
ntupleNames.addVar(pite2, "pite2");
ntupleNames.addVar(pipx2, "pipx2");
ntupleNames.addVar(pipy2, "pipy2");
ntupleNames.addVar(pipz2, "pipz2");
ntupleNames.addVar(mute2, "mute2");
ntupleNames.addVar(mupx2, "mupx2");
ntupleNames.addVar(mupy2, "mupy2");
ntupleNames.addVar(mupz2, "mupz2");
ntupleNames.addVar(kte2, "kte2");
ntupleNames.addVar(kpx2, "kpx2");
ntupleNames.addVar(kpy2, "kpy2");
ntupleNames.addVar(kpz2, "kpz2");
ntupleNames.addVar(pisigma2, "pisigma2");
ntupleNames.addVar(musigma2, "musigma2");
ntupleNames.addVar(ksigma2, "ksigma2");
ntupleNames.addVar(pill2, "pill2");
ntupleNames.addVar(mull2, "mull2");
ntupleNames.addVar(kll2, "kll2");
ntupleNames.addVar(fpite1, "fpite1");
ntupleNames.addVar(fpipx1, "fpipx1");
ntupleNames.addVar(fpipy1, "fpipy1");
ntupleNames.addVar(fpipz1, "fpipz1");
ntupleNames.addVar(fmute1, "fmute1");
ntupleNames.addVar(fmupx1, "fmupx1");
ntupleNames.addVar(fmupy1, "fmupy1");
ntupleNames.addVar(fmupz1, "fmupz1");
ntupleNames.addVar(fkte1, "fkte1");
ntupleNames.addVar(fkpx1, "fkpx1");
ntupleNames.addVar(fkpy1, "fkpy1");
ntupleNames.addVar(fkpz1, "fkpz1");
ntupleNames.addVar(fpite2, "fpite2");
ntupleNames.addVar(fpipx2, "fpipx2");
ntupleNames.addVar(fpipy2, "fpipy2");
ntupleNames.addVar(fpipz2, "fpipz2");
ntupleNames.addVar(fmute2, "fmute2");
ntupleNames.addVar(fmupx2, "fmupx2");
ntupleNames.addVar(fmupy2, "fmupy2");
ntupleNames.addVar(fmupz2, "fmupz2");
ntupleNames.addVar(fkte2, "fkte2");
ntupleNames.addVar(fkpx2, "fkpx2");
ntupleNames.addVar(fkpy2, "fkpy2");
ntupleNames.addVar(fkpz2, "fkpz2");
ntupleNames.addVar(f1pite1, "f1pite1");
ntupleNames.addVar(f1pipx1, "f1pipx1");
ntupleNames.addVar(f1pipy1, "f1pipy1");
ntupleNames.addVar(f1pipz1, "f1pipz1");
ntupleNames.addVar(f1pite2, "f1pite2");
ntupleNames.addVar(f1pipx2, "f1pipx2");
ntupleNames.addVar(f1pipy2, "f1pipy2");
ntupleNames.addVar(f1pipz2, "f1pipz2");
ntupleNames.addVar(f1mute1, "f1mute1");
ntupleNames.addVar(f1mupx1, "f1mupx1");
ntupleNames.addVar(f1mupy1, "f1mupy1");
ntupleNames.addVar(f1mupz1, "f1mupz1");
ntupleNames.addVar(f1mute2, "f1mute2");
ntupleNames.addVar(f1mupx2, "f1mupx2");
ntupleNames.addVar(f1mupy2, "f1mupy2");
ntupleNames.addVar(f1mupz2, "f1mupz2");
ntupleNames.addVar(f1kte1, "f1kte1");
ntupleNames.addVar(f1kpx1, "f1kpx1");
ntupleNames.addVar(f1kpy1, "f1kpy1");
ntupleNames.addVar(f1kpz1, "f1kpz1");
ntupleNames.addVar(f1kte2, "f1kte2");
ntupleNames.addVar(f1kpx2, "f1kpx2");
ntupleNames.addVar(f1kpy2, "f1kpy2");
ntupleNames.addVar(f1kpz2, "f1kpz2");
ntupleNames.addVar(charge1, "charge1");
ntupleNames.addVar(charge2, "charge2");
ntupleNames.addVar(beam_e,"beam_e");
ntupleNames.addVar(m_trk,"m_trk");
ntupleNames.addVar(l1trigger1, "l1trigger1");
ntupleNames.addVar(l1trigger2, "l1trigger2");
ntupleNames.addVar(l1trigger3, "l1trigger3");
ntupleNames.addVar(l1trigger4, "l1trigger4");
ntupleNames.addVar(l1trigger5, "l1trigger5");
ntupleNames.addVar(l1trigger6, "l1trigger6");
ntupleNames.addVar(l1trigger7, "l1trigger7");
ntupleNames.addVar(l1trigger8, "l1trigger8");
ntupleNames.addVar(l1trigger9, "l1trigger9");
ntupleNames.addVar(l1trigger10, "l1trigger10");
ntupleNames.addVar(l1trigger11, "l1trigger11");
ntupleNames.addVar(l1trigger12, "l1trigger12");
ntupleNames.addVar(l1trigger13, "l1trigger13");
ntupleNames.addVar(l1trigger14, "l1trigger14");
ntupleNames.addVar(l1trigger15, "l1trigger15");
ntupleNames.addVar(l1trigger16, "l1trigger16");
m_showerTuple = iHistoManager.ntuple(10,"tuple", kVarNum, 10000, ntupleNames.names());
}
// --------------------- methods bound to streams -------------------
ActionBase::ActionResult
TwoTracksISRProc::event( Frame& iFrame ) // anal3 equiv.
{
report( DEBUG, kFacilityString ) << "here in event()" << endl;
const int kMaxTrack = 2;
const int kMaxShower = 10;
const int cckMaxShower = 20;
double ChisqVpi = 10000000.;
double ChisqFpi = 10000000.;
double ChisqVmu = 10000000.;
double ChisqFmu = 10000000.;
double ChisqVk = 10000000.;
double ChisqFk = 10000000.;
double ChisqVpi1 = 10000000.;
double ChisqFpi1 = 10000000.;
double ChisqVmu1 = 10000000.;
double ChisqFmu1 = 10000000.;
double ChisqVk1 = 10000000.;
double ChisqFk1 = 10000000.;
double TempChisqVpi1 = 10000000.;
double TempChisqFpi1 = 10000000.;
double TempChisqVmu1 = 10000000.;
double TempChisqFmu1 = 10000000.;
double TempChisqVk1 = 10000000.;
double TempChisqFk1 = 10000000.;
double E[kMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double Theta[kMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double Phi[kMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double E925[kMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double CCE[cckMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double CCTheta[cckMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double CCPhi[cckMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double CCE925[cckMaxShower] = {-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.,-10.};
double ME[kMaxTrack] = {-10.,-10.};
double EOP[kMaxTrack] = {-10.,-10.};
double MUDEPTH[kMaxTrack] = {0.,0.};
double BEAME = -10.;
double TRKM = -10.;
double FE1 = -10.;
double FTheta1 = -10.;
double FPhi1 = -10.;
double FE2 = -10.;
double FTheta2 = -10.;
double FPhi2 = -10.;
double FE3 = -10.;
double FTheta3 = -10.;
double FPhi3 = -10.;
double PIE = -10.;
double PITheta = -10.;
double PIPhi = -10.;
double PIF1E[kMaxTrack] = {-10.,-10.};
double PIF1Theta[kMaxTrack] = {-10.,-10.};
double PIF1Phi[kMaxTrack] = {-10.,-10.};
double MUF1E[kMaxTrack] = {-10.,-10.};
double MUF1Theta[kMaxTrack] = {-10.,-10.};
double MUF1Phi[kMaxTrack] = {-10.,-10.};
double KF1E[kMaxTrack] = {-10.,-10.};
double KF1Theta[kMaxTrack] = {-10.,-10.};
double KF1Phi[kMaxTrack] = {-10.,-10.};
double PE1[kMaxTrack] = {-10.,-10.};
double PX1[kMaxTrack] = {-10.,-10.};
double PY1[kMaxTrack] = {-10.,-10.};
double PZ1[kMaxTrack] = {-10.,-10.};
double PE2[kMaxTrack] = {-10.,-10.};
double PX2[kMaxTrack] = {-10.,-10.};
double PY2[kMaxTrack] = {-10.,-10.};
double PZ2[kMaxTrack] = {-10.,-10.};
double PE3[kMaxTrack] = {-10.,-10.};
double PX3[kMaxTrack] = {-10.,-10.};
double PY3[kMaxTrack] = {-10.,-10.};
double PZ3[kMaxTrack] = {-10.,-10.};
double PPISIGMA[kMaxTrack] = {-1000.,-1000.};
double PMUSIGMA[kMaxTrack] = {-1000.,-1000.};
double PKSIGMA[kMaxTrack] = {-1000.,-1000.};
double PPILL[kMaxTrack] = {-1000.,-1000.};
double PMULL[kMaxTrack] = {-1000.,-1000.};
double PKLL[kMaxTrack] = {-1000.,-1000.};
double FPE1[kMaxTrack] = {-10.,-10.};
double FPX1[kMaxTrack] = {-10.,-10.};
double FPY1[kMaxTrack] = {-10.,-10.};
double FPZ1[kMaxTrack] = {-10.,-10.};
double FPE2[kMaxTrack] = {-10.,-10.};
double FPX2[kMaxTrack] = {-10.,-10.};
double FPY2[kMaxTrack] = {-10.,-10.};
double FPZ2[kMaxTrack] = {-10.,-10.};
double FPE3[kMaxTrack] = {-10.,-10.};
double FPX3[kMaxTrack] = {-10.,-10.};
double FPY3[kMaxTrack] = {-10.,-10.};
double FPZ3[kMaxTrack] = {-10.,-10.};
double PIF1PE[kMaxTrack] = {-10.,-10.};
double PIF1PX[kMaxTrack] = {-10.,-10.};
double PIF1PY[kMaxTrack] = {-10.,-10.};
double PIF1PZ[kMaxTrack] = {-10.,-10.};
double MUF1PE[kMaxTrack] = {-10.,-10.};
double MUF1PX[kMaxTrack] = {-10.,-10.};
double MUF1PY[kMaxTrack] = {-10.,-10.};
double MUF1PZ[kMaxTrack] = {-10.,-10.};
double KF1PE[kMaxTrack] = {-10.,-10.};
double KF1PX[kMaxTrack] = {-10.,-10.};
double KF1PY[kMaxTrack] = {-10.,-10.};
double KF1PZ[kMaxTrack] = {-10.,-10.};
double CHARGE[kMaxTrack] = {0.,0.};
double L1TRIGGER1 = 0.;
double L1TRIGGER2 = 0.;
double L1TRIGGER3 = 0.;
double L1TRIGGER4 = 0.;
double L1TRIGGER5 = 0.;
double L1TRIGGER6 = 0.;
double L1TRIGGER7 = 0.;
double L1TRIGGER8 = 0.;
double L1TRIGGER9 = 0.;
double L1TRIGGER10 = 0.;
double L1TRIGGER11 = 0.;
double L1TRIGGER12 = 0.;
double L1TRIGGER13 = 0.;
double L1TRIGGER14 = 0.;
double L1TRIGGER15 = 0.;
double L1TRIGGER16 = 0.;
float tuple[kVarNum];
// if we're in MC, check to see if the trigger fired
FAItem< DBEventHeader > eventHeader ;
extract( iFrame.record( Stream::kEvent ), eventHeader ) ;
double the_run = eventHeader->run();
double the_evt = eventHeader->number();
// if( eventHeader->monteCarlo() ) {
double L1Trigger = 0., L4Decision = 0.;
////////////////////////////////////////////////////////////////////////////
// Trigger L1
////////////////////////////////////////////////////////////////////////////
// int l1Trigger = 0, l1Trigger_Sel = 0, l1Trigger_Hadron = 0;
// int l1Trigger_MuPair = 0, l1Trigger_ElTrack = 0, l1Trigger_RadTau = 0;
// int l1Trigger_TwoTrack = 0;
FAItem< TriggerL1Data > trigDat;
extract (iFrame.record(Stream::kEvent), trigDat);
// All possible trigger lines
// --------------------------
// DABoolean isHadron() const; //Ax track > 2 & CB lo > 0
// DABoolean isMuPair() const; //Hi track > 1 & Back-to-back, 1 vs. 3/24
// DABoolean isElTrack() const; //Ax track > 0 & CB med > 0
// DABoolean isRadTau() const; //Stereo (hi + low) track > 1 & CB lo > 0
// DABoolean isBarrelBhabha() const; //Back-to-back Hi CB clusters
// DABoolean isCBSingleHi() const; //CB hi > 0
// DABoolean isCESingleHi() const; //CE hi > 0
// DABoolean isEndcapBhabha() const; //CE hi clusters in opposite ends
// DABoolean isTwoTrack() const; //Ax track > 1
// DABoolean isPulser() const; //Pulser trigger
// DABoolean isRandom() const; //Random trigger
// DABoolean isMinBias() const; //Tracking or CB Timing bit (Ax>0 || CB lo>1)
// Decode trigger line information //
// L1 Accept if any trigger line fires
/*
if(trigDat->isHadron()) L1Trigger = 1.;
if(trigDat->isRadTau()) L1Trigger = 2.;
if(trigDat->isElTrack()) L1Trigger = 3.;
if(trigDat->isBarrelBhabha()) L1Trigger = 4.;
if(trigDat->isEndcapBhabha()) L1Trigger = 5.;
if(trigDat->isMuPair()) L1Trigger = 6.;
if(trigDat->isCBSingleHi()) L1Trigger = 7.;
if(trigDat->isCESingleHi()) L1Trigger = 8.;
if(trigDat->isPulser()) L1Trigger = 9.;
if(trigDat->isRandom()) L1Trigger = 10.;
if(trigDat->isTwoTrack()) L1Trigger = 11.;
if(trigDat->isMinBias()) L1Trigger = 12.;
if(trigDat->isPhotonA()) L1Trigger = 13.;
if(trigDat->isPhotonB()) L1Trigger = 14.;
if(trigDat->isPhotonC()) L1Trigger = 15.;
if(trigDat->isPhotonD()) L1Trigger = 16.;
*/
if(trigDat->isHadron()) {
L1Trigger = 1.;
L1TRIGGER1 = 1.;
}
if(trigDat->isRadTau()) {
L1Trigger = 2.;
L1TRIGGER2 = 1.;
}
if(trigDat->isElTrack()) {
L1Trigger = 3.;
L1TRIGGER3 = 1.;
}
if(trigDat->isBarrelBhabha()) {
L1Trigger = 4.;
L1TRIGGER4 = 1.;
}
if(trigDat->isEndcapBhabha()) {
L1Trigger = 5.;
L1TRIGGER5 = 1.;
}
if(trigDat->isMuPair()) {
L1Trigger = 6.;
L1TRIGGER6 = 1.;
}
if(trigDat->isCBSingleHi()) {
L1Trigger = 7.;
L1TRIGGER7 = 1.;
}
if(trigDat->isCESingleHi()) {
L1Trigger = 8.;
L1TRIGGER8 = 1.;
}
if(trigDat->isPulser()) {
L1Trigger = 9.;
L1TRIGGER9 = 1.;
}
if(trigDat->isRandom()) {
L1Trigger = 10.;
L1TRIGGER10 = 1.;
}
if(trigDat->isTwoTrack()) {
L1Trigger = 11.;
L1TRIGGER11 = 1.;
}
if(trigDat->isMinBias()) {
L1Trigger = 12.;
L1TRIGGER12 = 1.;
}
if(trigDat->isPhotonA()) {
L1Trigger = 13.;
L1TRIGGER13 = 1.;
}
if(trigDat->isPhotonB()) {
L1Trigger = 14.;
L1TRIGGER14 = 1.;
}
if(trigDat->isPhotonC()) {
L1Trigger = 15.;
L1TRIGGER15 = 1.;
}
if(trigDat->isPhotonD()) {
L1Trigger = 16.;
L1TRIGGER16 = 1.;
}
// L1 Accept if any non-prescaled trigger line fires
// if ( (trigDat->isHadron()) ||
// (trigDat->isMuPair()) ||
// (trigDat->isElTrack()) ||
// (trigDat->isRadTau()) ||
// (trigDat->isBarrelBhabha()) )
// { l1Trigger_Sel = 1; }
////////////////////////////////////////////////////////////////////////////
// Software Trigger (L3 & L4)
////////////////////////////////////////////////////////////////////////////
FAItem<Level4Decision > decision;
extract(iFrame.record(Stream::kEvent), decision );
switch( decision->decision() )
{
case Level4Decision::kKeepLevel3Garbage :
{
L4Decision = 1.;
break;
}
case Level4Decision::kLevel3AutoAccept :
{
L4Decision = 2.;
break;
}
case Level4Decision::kLevel4Keep :
{
L4Decision = 3.;
break;
}
}
if( (!L1Trigger) || (!L4Decision) )
return ActionBase::kFailed;
// }
FATable< NavTrack > trackTable;
extract( iFrame.record( Stream::kEvent ) , trackTable, "GoodThings" );
FATable< NavTrack >::const_iterator trackBegin = trackTable.begin();
FATable< NavTrack >::const_iterator trackEnd = trackTable.end();
if(trackTable.size()!=2)
//if (trackEnd != trackBegin+2)
return ActionBase::kFailed;
FAItem<TDKinematicFit> pi1 = (*trackBegin).pionFit();
FAItem<TDKinematicFit> pi2 = (*(trackBegin+1)).pionFit();
FAItem<TDKinematicFit> mu1 = (*trackBegin).muonFit();
FAItem<TDKinematicFit> mu2 = (*(trackBegin+1)).muonFit();
FAItem<TDKinematicFit> k1 = (*trackBegin).kaonFit();
FAItem<TDKinematicFit> k2 = (*(trackBegin+1)).kaonFit();
if(!pi1.valid() || !pi2.valid())
return ActionBase::kFailed;
CHARGE[0] = (*pi1).charge();
CHARGE[1] = (*pi2).charge();
if(CHARGE[0]!=-CHARGE[1])
return ActionBase::kFailed;
int unmatchedTracks = 0;
for ( FATable< NavTrack >::const_iterator trackItr = trackBegin;
trackItr != trackEnd ;
++trackItr )
{
FAItem<DedxInfo> the_dedx = (*trackItr).dedxInfo();
FAItem<NavRich> the_rich = (*trackItr).richInfo();
FAItem<TDKinematicFit> pionFit = (*trackItr).pionFit();
FAItem<TDKinematicFit> muonFit = (*trackItr).muonFit();
FAItem<TDKinematicFit> kaonFit = (*trackItr).kaonFit();
double cos_theta1 = pionFit->pz() / pionFit->pmag();
double cos_theta2 = muonFit->pz() / muonFit->pmag();
double cos_theta3 = kaonFit->pz() / kaonFit->pmag();
int j = unmatchedTracks++;
if(j<kMaxTrack){
if(trackItr->trackShowerMatch().valid())
ME[j] = trackItr->trackShowerMatch()->matchedEnergy();
EOP[j] = trackItr->elecId().eOverP();
MUDEPTH[j] = trackItr->muonId().depth();
if(EOP[j]>0.8)
return ActionBase::kFailed;
if( (pionFit.valid()) && (the_dedx.valid()) ) {
PE1[j]=pionFit->lorentzMomentum().e();
PX1[j]=pionFit->px();
PY1[j]=pionFit->py();
PZ1[j]=pionFit->pz();
PPISIGMA[j]=the_dedx->piSigma();
if ((the_rich.valid()) && (fabs(cos_theta1) < 0.8) && (the_rich->pionHypWasAnalyzed()))
PPILL[j]=the_rich->pionLogLikelihood();
}
if( (muonFit.valid()) && (the_dedx.valid()) ) {
PE2[j]=muonFit->lorentzMomentum().e();
PX2[j]=muonFit->px();
PY2[j]=muonFit->py();
PZ2[j]=muonFit->pz();
PMUSIGMA[j]=the_dedx->muSigma();
if ((the_rich.valid()) && (fabs(cos_theta2) < 0.8) && (the_rich->muonHypWasAnalyzed()))
PMULL[j]=the_rich->muonLogLikelihood();
}
if( (kaonFit.valid()) && (the_dedx.valid()) ) {
PE3[j]=kaonFit->lorentzMomentum().e();
PX3[j]=kaonFit->px();
PY3[j]=kaonFit->py();
PZ3[j]=kaonFit->pz();
PKSIGMA[j]=the_dedx->kSigma();
if ((the_rich.valid()) && (fabs(cos_theta3) < 0.8) && (the_rich->kaonHypWasAnalyzed()))
PKLL[j]=the_rich->kaonLogLikelihood();
}
}
}
FATable< NavShower > showerTable;
extract( iFrame.record( Stream::kEvent ) , showerTable, "GoodThings" );
if(showerTable.size()==0)
return ActionBase::kFailed;
FATable< NavShower >::const_iterator showerBegin = showerTable.begin();
FATable< NavShower >::const_iterator showerEnd = showerTable.end();
FATable< NavShower >::const_iterator fastest_shower = showerBegin;
if(fastest_shower->attributes().x925() < 1)
return ActionBase::kFailed;
if(fastest_shower->attributes().energy() < 0.5)
return ActionBase::kFailed;
int unmatchedShowers = 0;
for ( FATable< NavShower >::const_iterator showerItr = showerBegin;
showerItr != showerEnd ;
++showerItr )
{
int j = unmatchedShowers++;
if(j<kMaxShower){
E[j] = showerItr->attributes().energy();
Theta[j] = showerItr->attributes().theta();
Phi[j] = showerItr->attributes().phi();
E925[j] = showerItr->attributes().x925();
}
}
FATable< NavShower > ccshowerTable;
extract( iFrame.record( Stream::kEvent ) , ccshowerTable );
FATable< NavShower >::const_iterator ccshowerBegin = ccshowerTable.begin();
FATable< NavShower >::const_iterator ccshowerEnd = ccshowerTable.end();
int ccunmatchedShowers = 0;
for ( FATable< NavShower >::const_iterator ccshowerItr = ccshowerBegin;
ccshowerItr != ccshowerEnd ;
++ccshowerItr )
{
int j = ccunmatchedShowers++;
if(j<cckMaxShower){
CCE[j] = ccshowerItr->attributes().energy();
CCTheta[j] = ccshowerItr->attributes().theta();
CCPhi[j] = ccshowerItr->attributes().phi();
CCE925[j] = ccshowerItr->attributes().x925();
}
}
///////////////////////////////////////////////////////////////// 4C fit ///////////////////////
// do the pion fit
FitEvt pipi( "Pipi", FitEvt::k_P4VecCM );
pipi.newPhoton(*fastest_shower);
pipi.newTrack(*pi1);
pipi.newTrack(*pi2);
pipi.doTheFit();
if( (pipi.chisqVtx()>0) && (pipi.chisqFit()>0) ) {
// fit converged - save this event
const HepLorentzVector vgpi (pipi.kdFitVec()[0]->lorentzMomentum());
const HepLorentzVector v1pi (pipi.kdFitVec()[1]->lorentzMomentum());
const HepLorentzVector v2pi (pipi.kdFitVec()[2]->lorentzMomentum());
ChisqVpi = pipi.chisqVtx();
ChisqFpi = pipi.chisqFit();
FE1 = vgpi.e();
FTheta1 = vgpi.theta();
FPhi1 = vgpi.phi();
FPE1[0]=v1pi.e();
FPX1[0]=v1pi.px();
FPY1[0]=v1pi.py();
FPZ1[0]=v1pi.pz();
FPE1[1]=v2pi.e();
FPX1[1]=v2pi.px();
FPY1[1]=v2pi.py();
FPZ1[1]=v2pi.pz();
}
// do the muon fit
FitEvt mumu( "Mumu", FitEvt::k_P4VecCM );
mumu.newPhoton(*fastest_shower);
mumu.newTrack(*mu1);
mumu.newTrack(*mu2);
mumu.doTheFit();
if( (mumu.chisqVtx()>0) && (mumu.chisqFit()>0) ) {
// fit converged - save this event
const HepLorentzVector vgmu (mumu.kdFitVec()[0]->lorentzMomentum());
const HepLorentzVector v1mu (mumu.kdFitVec()[1]->lorentzMomentum());
const HepLorentzVector v2mu (mumu.kdFitVec()[2]->lorentzMomentum());
ChisqVmu = mumu.chisqVtx();
ChisqFmu = mumu.chisqFit();
FE2 = vgmu.e();
FTheta2 = vgmu.theta();
FPhi2 = vgmu.phi();
FPE2[0]=v1mu.e();
FPX2[0]=v1mu.px();
FPY2[0]=v1mu.py();
FPZ2[0]=v1mu.pz();
FPE2[1]=v2mu.e();
FPX2[1]=v2mu.px();
FPY2[1]=v2mu.py();
FPZ2[1]=v2mu.pz();
}
// do the kaon fit
FitEvt kk( "Kk", FitEvt::k_P4VecCM );
kk.newPhoton(*fastest_shower);
kk.newTrack(*k1);
kk.newTrack(*k2);
kk.doTheFit();
if( (kk.chisqVtx()>0) && (kk.chisqFit()>0) ) {
// fit converged - save this event
const HepLorentzVector vgk (kk.kdFitVec()[0]->lorentzMomentum());
const HepLorentzVector v1k (kk.kdFitVec()[1]->lorentzMomentum());
const HepLorentzVector v2k (kk.kdFitVec()[2]->lorentzMomentum());
ChisqVk = kk.chisqVtx();
ChisqFk = kk.chisqFit();
FE3 = vgk.e();
FTheta3 = vgk.theta();
FPhi3 = vgk.phi();
FPE3[0]=v1k.e();
FPX3[0]=v1k.px();
FPY3[0]=v1k.py();
FPZ3[0]=v1k.pz();
FPE3[1]=v2k.e();
FPX3[1]=v2k.px();
FPY3[1]=v2k.py();
FPZ3[1]=v2k.pz();
}
////////////////////////////////////////////// add.FSR fit ///////////////////////////////////////////
if(showerTable.size() > 1){
for ( FATable< NavShower >::const_iterator showerItr = showerBegin+1;
showerItr != showerEnd ;
++showerItr ) {
if(showerItr->attributes().x925() < 1) continue;
// do the pion fit
FitEvt pipi1( "Pipi1", FitEvt::k_P4VecCM );
pipi1.newPhoton(*fastest_shower);
pipi1.newPhoton(*showerItr);
pipi1.newTrack(*pi1);
pipi1.newTrack(*pi2);
pipi1.doTheFit();
if( (pipi1.chisqVtx()>0) && (pipi1.chisqFit()>0) ) {
// fit converged - save this event
HepLorentzVector vgpi (pipi1.kdFitVec()[0]->lorentzMomentum());
HepLorentzVector v0pi (pipi1.kdFitVec()[1]->lorentzMomentum());
HepLorentzVector v1pi (pipi1.kdFitVec()[2]->lorentzMomentum());
HepLorentzVector v2pi (pipi1.kdFitVec()[3]->lorentzMomentum());
TempChisqVpi1 = pipi1.chisqVtx();
TempChisqFpi1 = pipi1.chisqFit();
if(TempChisqFpi1 < ChisqFpi1){
ChisqVpi1 = pipi1.chisqVtx();
ChisqFpi1 = pipi1.chisqFit();
PIE = showerItr->attributes().energy();
PITheta = showerItr->attributes().theta();
PIPhi = showerItr->attributes().phi();
PIF1E[0] = vgpi.e();
PIF1Theta[0] = vgpi.theta();
PIF1Phi[0] = vgpi.phi();
PIF1E[1] = v0pi.e();
PIF1Theta[1] = v0pi.theta();
PIF1Phi[1] = v0pi.phi();
PIF1PE[0]=v1pi.e();
PIF1PX[0]=v1pi.px();
PIF1PY[0]=v1pi.py();
PIF1PZ[0]=v1pi.pz();
PIF1PE[1]=v2pi.e();
PIF1PX[1]=v2pi.px();
PIF1PY[1]=v2pi.py();
PIF1PZ[1]=v2pi.pz();
}
}
// do the muon fit
FitEvt mumu1( "Mumu1", FitEvt::k_P4VecCM );
mumu1.newPhoton(*fastest_shower);
mumu1.newPhoton(*showerItr);
mumu1.newTrack(*mu1);
mumu1.newTrack(*mu2);
mumu1.doTheFit();
if( (mumu1.chisqVtx()>0) && (mumu1.chisqFit()>0) ) {
// fit converged - save this event
HepLorentzVector vgmu (mumu1.kdFitVec()[0]->lorentzMomentum());
HepLorentzVector v0mu (mumu1.kdFitVec()[1]->lorentzMomentum());
HepLorentzVector v1mu (mumu1.kdFitVec()[2]->lorentzMomentum());
HepLorentzVector v2mu (mumu1.kdFitVec()[3]->lorentzMomentum());
TempChisqVmu1 = mumu1.chisqVtx();
TempChisqFmu1 = mumu1.chisqFit();
if(TempChisqFmu1 < ChisqFmu1){
ChisqVmu1 = mumu1.chisqVtx();
ChisqFmu1 = mumu1.chisqFit();
MUF1E[0] = vgmu.e();
MUF1Theta[0] = vgmu.theta();
MUF1Phi[0] = vgmu.phi();
MUF1E[1] = v0mu.e();
MUF1Theta[1] = v0mu.theta();
MUF1Phi[1] = v0mu.phi();
MUF1PE[0]=v1mu.e();
MUF1PX[0]=v1mu.px();
MUF1PY[0]=v1mu.py();
MUF1PZ[0]=v1mu.pz();
MUF1PE[1]=v2mu.e();
MUF1PX[1]=v2mu.px();
MUF1PY[1]=v2mu.py();
MUF1PZ[1]=v2mu.pz();
}
}
// do the kaon fit
FitEvt kk1( "Kk1", FitEvt::k_P4VecCM );
kk1.newPhoton(*fastest_shower);
kk1.newPhoton(*showerItr);
kk1.newTrack(*k1);
kk1.newTrack(*k2);
kk1.doTheFit();
if( (kk1.chisqVtx()>0) && (kk1.chisqFit()>0) ) {
// fit converged - save this event
HepLorentzVector vgk (kk1.kdFitVec()[0]->lorentzMomentum());
HepLorentzVector v0k (kk1.kdFitVec()[1]->lorentzMomentum());
HepLorentzVector v1k (kk1.kdFitVec()[2]->lorentzMomentum());
HepLorentzVector v2k (kk1.kdFitVec()[3]->lorentzMomentum());
TempChisqVk1 = kk1.chisqVtx();
TempChisqFk1 = kk1.chisqFit();
if(TempChisqFk1 < ChisqFk1){
ChisqVk1 = kk1.chisqVtx();
ChisqFk1 = kk1.chisqFit();
KF1E[0] = vgk.e();
KF1Theta[0] = vgk.theta();
KF1Phi[0] = vgk.phi();
KF1E[1] = v0k.e();
KF1Theta[1] = v0k.theta();
KF1Phi[1] = v0k.phi();
KF1PE[0]=v1k.e();
KF1PX[0]=v1k.px();
KF1PY[0]=v1k.py();
KF1PZ[0]=v1k.pz();
KF1PE[1]=v2k.e();
KF1PX[1]=v2k.px();
KF1PY[1]=v2k.py();
KF1PZ[1]=v2k.pz();
}
}
}
}
FAItem< BeamEnergy > beam_energy;
extract( iFrame.record( Stream::kBeginRun ), beam_energy );
BEAME = beam_energy->value();
double s = pow((2*BEAME),2);
double pppn = sqrt(pow((PX1[0]+PX1[1]),2)+pow((PY1[0]+PY1[1]),2)+pow((PZ1[0]+PZ1[1]),2));
double pp2 = pow(PX1[0],2)+pow(PY1[0],2)+pow(PZ1[0],2);
double pn2 = pow(PX1[1],2)+pow(PY1[1],2)+pow(PZ1[1],2);
double mm = (pow((pow((sqrt(s)-pppn),2)-pp2-pn2),2)-4*pp2*pn2)/(4*pow((sqrt(s)-pppn),2));
// if(PIPX[0]<1000 && PIPY[0]<1000 && PIPZ[0] < 1000 && PIPX[1]<1000 && PIPY[1]<1000 && PIPZ[1] < 1000)
TRKM = sqrt(mm);
tuple[knshower] = unmatchedShowers;
tuple[ccknshower] = ccunmatchedShowers;
tuple[chisqvpi] = ChisqVpi;
tuple[chisqfpi] = ChisqFpi;
tuple[chisqvmu] = ChisqVmu;
tuple[chisqfmu] = ChisqFmu;
tuple[chisqvk] = ChisqVk;
tuple[chisqfk] = ChisqFk;
tuple[chisqvpi1] = ChisqVpi1;
tuple[chisqfpi1] = ChisqFpi1;
tuple[chisqvmu1] = ChisqVmu1;
tuple[chisqfmu1] = ChisqFmu1;
tuple[chisqvk1] = ChisqVk1;
tuple[chisqfk1] = ChisqFk1;
tuple[e1] = E[0];
tuple[th1] = Theta[0];
tuple[phi1] = Phi[0];
tuple[e9251] = E925[0];
tuple[e2] = E[1];
tuple[th2] = Theta[1];
tuple[phi2] = Phi[1];
tuple[e9252] = E925[1];
tuple[e3] = E[2];
tuple[th3] = Theta[2];
tuple[phi3] = Phi[2];
tuple[e9253] = E925[2];
tuple[e4] = E[3];
tuple[th4] = Theta[3];
tuple[phi4] = Phi[3];
tuple[e9254] = E925[3];
tuple[e5] = E[4];
tuple[th5] = Theta[4];
tuple[phi5] = Phi[4];
tuple[e9255] = E925[4];
tuple[e6] = E[5];
tuple[th6] = Theta[5];
tuple[phi6] = Phi[5];
tuple[e9256] = E925[5];
tuple[e7] = E[6];
tuple[th7] = Theta[6];
tuple[phi7] = Phi[6];
tuple[e9257] = E925[6];
tuple[e8] = E[7];
tuple[th8] = Theta[7];
tuple[phi8] = Phi[7];
tuple[e9258] = E925[7];
tuple[e9] = E[8];
tuple[th9] = Theta[8];
tuple[phi9] = Phi[8];
tuple[e9259] = E925[8];
tuple[e10] = E[9];
tuple[th10] = Theta[9];
tuple[phi10] = Phi[9];
tuple[e92510] = E925[9];
tuple[cce11] = CCE[10];
tuple[ccth11] = CCTheta[10];
tuple[ccphi11] = CCPhi[10];
tuple[cce92511] = CCE925[10];
tuple[cce12] = CCE[11];
tuple[ccth12] = CCTheta[11];
tuple[ccphi12] = CCPhi[11];
tuple[cce92512] = CCE925[11];
tuple[cce13] = CCE[12];
tuple[ccth13] = CCTheta[12];
tuple[ccphi13] = CCPhi[12];
tuple[cce92513] = CCE925[12];
tuple[cce14] = CCE[13];
tuple[ccth14] = CCTheta[13];
tuple[ccphi14] = CCPhi[13];
tuple[cce92514] = CCE925[13];
tuple[cce15] = CCE[14];
tuple[ccth15] = CCTheta[14];
tuple[ccphi15] = CCPhi[14];
tuple[cce92515] = CCE925[14];
tuple[cce16] = CCE[15];
tuple[ccth16] = CCTheta[15];
tuple[ccphi16] = CCPhi[15];
tuple[cce92516] = CCE925[15];
tuple[cce17] = CCE[16];
tuple[ccth17] = CCTheta[16];
tuple[ccphi17] = CCPhi[16];
tuple[cce92517] = CCE925[16];
tuple[cce18] = CCE[17];
tuple[ccth18] = CCTheta[17];
tuple[ccphi18] = CCPhi[17];
tuple[cce92518] = CCE925[17];
tuple[cce19] = CCE[18];
tuple[ccth19] = CCTheta[18];
tuple[ccphi19] = CCPhi[18];
tuple[cce92519] = CCE925[18];
tuple[cce20] = CCE[19];
tuple[ccth20] = CCTheta[19];
tuple[ccphi20] = CCPhi[19];
tuple[cce92520] = CCE925[19];
tuple[cce1] = CCE[0];
tuple[ccth1] = CCTheta[0];
tuple[ccphi1] = CCPhi[0];
tuple[cce9251] = CCE925[0];
tuple[cce2] = CCE[1];
tuple[ccth2] = CCTheta[1];
tuple[ccphi2] = CCPhi[1];
tuple[cce9252] = CCE925[1];
tuple[cce3] = CCE[2];
tuple[ccth3] = CCTheta[2];
tuple[ccphi3] = CCPhi[2];
tuple[cce9253] = CCE925[2];
tuple[cce4] = CCE[3];
tuple[ccth4] = CCTheta[3];
tuple[ccphi4] = CCPhi[3];
tuple[cce9254] = CCE925[3];
tuple[cce5] = CCE[4];
tuple[ccth5] = CCTheta[4];
tuple[ccphi5] = CCPhi[4];
tuple[cce9255] = CCE925[4];
tuple[cce6] = CCE[5];
tuple[ccth6] = CCTheta[5];
tuple[ccphi6] = CCPhi[5];
tuple[cce9256] = CCE925[5];
tuple[cce7] = CCE[6];
tuple[ccth7] = CCTheta[6];
tuple[ccphi7] = CCPhi[6];
tuple[cce9257] = CCE925[6];
tuple[cce8] = CCE[7];
tuple[ccth8] = CCTheta[7];
tuple[ccphi8] = CCPhi[7];
tuple[cce9258] = CCE925[7];
tuple[cce9] = CCE[8];
tuple[ccth9] = CCTheta[8];
tuple[ccphi9] = CCPhi[8];
tuple[cce9259] = CCE925[8];
tuple[cce10] = CCE[9];
tuple[ccth10] = CCTheta[9];
tuple[ccphi10] = CCPhi[9];
tuple[cce92510] = CCE925[9];
tuple[epi2] = PIE;
tuple[thpi2] = PITheta;
tuple[phipi2] = PIPhi;
tuple[fepi] = FE1;
tuple[fthpi] = FTheta1;
tuple[fphipi] = FPhi1;
tuple[femu] = FE2;
tuple[fthmu] = FTheta2;
tuple[fphimu] = FPhi2;
tuple[fek] = FE3;
tuple[fthk] = FTheta3;
tuple[fphik] = FPhi3;
tuple[f1epi1] = PIF1E[0];
tuple[f1thpi1] = PIF1Theta[0];
tuple[f1phipi1] = PIF1Phi[0];
tuple[f1epi2] = PIF1E[1];
tuple[f1thpi2] = PIF1Theta[1];
tuple[f1phipi2] = PIF1Phi[1];
tuple[f1emu1] = MUF1E[0];
tuple[f1thmu1] = MUF1Theta[0];
tuple[f1phimu1] = MUF1Phi[0];
tuple[f1emu2] = MUF1E[1];
tuple[f1thmu2] = MUF1Theta[1];
tuple[f1phimu2] = MUF1Phi[1];
tuple[f1ek1] = KF1E[0];
tuple[f1thk1] = KF1Theta[0];
tuple[f1phik1] = KF1Phi[0];
tuple[f1ek2] = KF1E[1];
tuple[f1thk2] = KF1Theta[1];
tuple[f1phik2] = KF1Phi[1];
tuple[l1trigger1] = L1TRIGGER1;
tuple[l1trigger2] = L1TRIGGER2;
tuple[l1trigger3] = L1TRIGGER3;
tuple[l1trigger4] = L1TRIGGER4;
tuple[l1trigger5] = L1TRIGGER5;
tuple[l1trigger6] = L1TRIGGER6;
tuple[l1trigger7] = L1TRIGGER7;
tuple[l1trigger8] = L1TRIGGER8;
tuple[l1trigger9] = L1TRIGGER9;
tuple[l1trigger10] = L1TRIGGER10;
tuple[l1trigger11] = L1TRIGGER11;
tuple[l1trigger12] = L1TRIGGER12;
tuple[l1trigger13] = L1TRIGGER13;
tuple[l1trigger14] = L1TRIGGER14;
tuple[l1trigger15] = L1TRIGGER15;
tuple[l1trigger16] = L1TRIGGER16;
if(CHARGE[0]==1 && CHARGE[1]==-1){
tuple[me1] = ME[0];
tuple[eop1] = EOP[0];
tuple[me2] = ME[1];
tuple[eop2] = EOP[1];
tuple[mudepth1] = MUDEPTH[0];
tuple[mudepth2] = MUDEPTH[1];
tuple[pite1] = PE1[0];
tuple[pipx1] = PX1[0];
tuple[pipy1] = PY1[0];
tuple[pipz1] = PZ1[0];
tuple[mute1] = PE2[0];
tuple[mupx1] = PX2[0];
tuple[mupy1] = PY2[0];
tuple[mupz1] = PZ2[0];
tuple[kte1] = PE3[0];
tuple[kpx1] = PX3[0];
tuple[kpy1] = PY3[0];
tuple[kpz1] = PZ3[0];
tuple[pisigma1] = PPISIGMA[0];
tuple[musigma1] = PMUSIGMA[0];
tuple[ksigma1] = PKSIGMA[0];
tuple[pill1] = PPILL[0];
tuple[mull1] = PMULL[0];
tuple[kll1] = PKLL[0];
tuple[pite2] = PE1[1];
tuple[pipx2] = PX1[1];
tuple[pipy2] = PY1[1];
tuple[pipz2] = PZ1[1];
tuple[mute2] = PE2[1];
tuple[mupx2] = PX2[1];
tuple[mupy2] = PY2[1];
tuple[mupz2] = PZ2[1];
tuple[kte2] = PE3[1];
tuple[kpx2] = PX3[1];
tuple[kpy2] = PY3[1];
tuple[kpz2] = PZ3[1];
tuple[pisigma2] = PPISIGMA[1];
tuple[musigma2] = PMUSIGMA[1];
tuple[ksigma2] = PKSIGMA[1];
tuple[pill2] = PPILL[1];
tuple[mull2] = PMULL[1];
tuple[kll2] = PKLL[1];
tuple[fpite1] = FPE1[0];
tuple[fpipx1] = FPX1[0];
tuple[fpipy1] = FPY1[0];
tuple[fpipz1] = FPZ1[0];
tuple[fmute1] = FPE2[0];
tuple[fmupx1] = FPX2[0];
tuple[fmupy1] = FPY2[0];
tuple[fmupz1] = FPZ2[0];
tuple[fkte1] = FPE3[0];
tuple[fkpx1] = FPX3[0];
tuple[fkpy1] = FPY3[0];
tuple[fkpz1] = FPZ3[0];
tuple[fpite2] = FPE1[1];
tuple[fpipx2] = FPX1[1];
tuple[fpipy2] = FPY1[1];
tuple[fpipz2] = FPZ1[1];
tuple[fmute2] = FPE2[1];
tuple[fmupx2] = FPX2[1];
tuple[fmupy2] = FPY2[1];
tuple[fmupz2] = FPZ2[1];
tuple[fkte2] = FPE3[1];
tuple[fkpx2] = FPX3[1];
tuple[fkpy2] = FPY3[1];
tuple[fkpz2] = FPZ3[1];
tuple[f1pite1] = PIF1PE[0];
tuple[f1pipx1] = PIF1PX[0];
tuple[f1pipy1] = PIF1PY[0];
tuple[f1pipz1] = PIF1PZ[0];
tuple[f1pite2] = PIF1PE[1];
tuple[f1pipx2] = PIF1PX[1];
tuple[f1pipy2] = PIF1PY[1];
tuple[f1pipz2] = PIF1PZ[1];
tuple[f1mute1] = MUF1PE[0];
tuple[f1mupx1] = MUF1PX[0];
tuple[f1mupy1] = MUF1PY[0];
tuple[f1mupz1] = MUF1PZ[0];
tuple[f1mute2] = MUF1PE[1];
tuple[f1mupx2] = MUF1PX[1];
tuple[f1mupy2] = MUF1PY[1];
tuple[f1mupz2] = MUF1PZ[1];
tuple[f1kte1] = KF1PE[0];
tuple[f1kpx1] = KF1PX[0];
tuple[f1kpy1] = KF1PY[0];
tuple[f1kpz1] = KF1PZ[0];
tuple[f1kte2] = KF1PE[1];
tuple[f1kpx2] = KF1PX[1];
tuple[f1kpy2] = KF1PY[1];
tuple[f1kpz2] = KF1PZ[1];
tuple[charge1] = CHARGE[0];
tuple[charge2] = CHARGE[1];
}
else if(CHARGE[1]==1 && CHARGE[0]==-1){
tuple[me1] = ME[1];
tuple[eop1] = EOP[1];
tuple[me2] = ME[0];
tuple[eop2] = EOP[0];
tuple[mudepth1] = MUDEPTH[1];
tuple[mudepth2] = MUDEPTH[0];
tuple[pite1] = PE1[1];
tuple[pipx1] = PX1[1];
tuple[pipy1] = PY1[1];
tuple[pipz1] = PZ1[1];
tuple[mute1] = PE2[1];
tuple[mupx1] = PX2[1];
tuple[mupy1] = PY2[1];
tuple[mupz1] = PZ2[1];
tuple[kte1] = PE3[1];
tuple[kpx1] = PX3[1];
tuple[kpy1] = PY3[1];
tuple[kpz1] = PZ3[1];
tuple[pisigma1] = PPISIGMA[1];
tuple[musigma1] = PMUSIGMA[1];
tuple[ksigma1] = PKSIGMA[1];
tuple[pill1] = PPILL[1];
tuple[mull1] = PMULL[1];
tuple[kll1] = PKLL[1];
tuple[pite2] = PE1[0];
tuple[pipx2] = PX1[0];
tuple[pipy2] = PY1[0];
tuple[pipz2] = PZ1[0];
tuple[mute2] = PE2[0];
tuple[mupx2] = PX2[0];
tuple[mupy2] = PY2[0];
tuple[mupz2] = PZ2[0];
tuple[kte2] = PE3[0];
tuple[kpx2] = PX3[0];
tuple[kpy2] = PY3[0];
tuple[kpz2] = PZ3[0];
tuple[pisigma2] = PPISIGMA[0];
tuple[musigma2] = PMUSIGMA[0];
tuple[ksigma2] = PKSIGMA[0];
tuple[pill2] = PPILL[0];
tuple[mull2] = PMULL[0];
tuple[kll2] = PKLL[0];
tuple[fpite1] = FPE1[1];
tuple[fpipx1] = FPX1[1];
tuple[fpipy1] = FPY1[1];
tuple[fpipz1] = FPZ1[1];
tuple[fmute1] = FPE2[1];
tuple[fmupx1] = FPX2[1];
tuple[fmupy1] = FPY2[1];
tuple[fmupz1] = FPZ2[1];
tuple[fkte1] = FPE3[1];
tuple[fkpx1] = FPX3[1];
tuple[fkpy1] = FPY3[1];
tuple[fkpz1] = FPZ3[1];
tuple[fpite2] = FPE1[0];
tuple[fpipx2] = FPX1[0];
tuple[fpipy2] = FPY1[0];
tuple[fpipz2] = FPZ1[0];
tuple[fmute2] = FPE2[0];
tuple[fmupx2] = FPX2[0];
tuple[fmupy2] = FPY2[0];
tuple[fmupz2] = FPZ2[0];
tuple[fkte2] = FPE3[0];
tuple[fkpx2] = FPX3[0];
tuple[fkpy2] = FPY3[0];
tuple[fkpz2] = FPZ3[0];
tuple[f1pite1] = PIF1PE[1];
tuple[f1pipx1] = PIF1PX[1];
tuple[f1pipy1] = PIF1PY[1];
tuple[f1pipz1] = PIF1PZ[1];
tuple[f1pite2] = PIF1PE[0];
tuple[f1pipx2] = PIF1PX[0];
tuple[f1pipy2] = PIF1PY[0];
tuple[f1pipz2] = PIF1PZ[0];
tuple[f1mute1] = MUF1PE[1];
tuple[f1mupx1] = MUF1PX[1];
tuple[f1mupy1] = MUF1PY[1];
tuple[f1mupz1] = MUF1PZ[1];
tuple[f1mute2] = MUF1PE[0];
tuple[f1mupx2] = MUF1PX[0];
tuple[f1mupy2] = MUF1PY[0];
tuple[f1mupz2] = MUF1PZ[0];
tuple[f1kte1] = KF1PE[1];
tuple[f1kpx1] = KF1PX[1];
tuple[f1kpy1] = KF1PY[1];
tuple[f1kpz1] = KF1PZ[1];
tuple[f1kte2] = KF1PE[0];
tuple[f1kpx2] = KF1PX[0];
tuple[f1kpy2] = KF1PY[0];
tuple[f1kpz2] = KF1PZ[0];
tuple[charge1] = CHARGE[1];
tuple[charge2] = CHARGE[0];
}
tuple[beam_e] = BEAME;
tuple[m_trk] = TRKM;
(*m_showerTuple).fill(tuple);
return ActionBase::kPassed;
}
ActionBase::ActionResult
TwoTracksISRProc::beginRun( Frame& iFrame ) // anal2 equiv.
{
report( DEBUG, kFacilityString ) << "here in beginRun()" << endl;
FAItem< BeamSpot > spot;
extract( iFrame.record( Stream::kBeginRun ), spot );
FAItem< BeamEnergy > beam_energy;
extract( iFrame.record( Stream::kBeginRun ), beam_energy );
FAItem< MagneticField > cleoBField;
extract( iFrame.record( Stream::kBeginRun ), cleoBField );
FitEvtSettings &settings(FitEvtSettings::instance());
settings.setField(*cleoBField);
settings.setBeamSpot(*spot);
settings.setLorVecCM( beam_energy->value() );
return ActionBase::kPassed;
}
/*
ActionBase::ActionResult
TwoTracksISRProc::endRun( Frame& iFrame ) // anal4 equiv.
{
report( DEBUG, kFacilityString ) << "here in endRun()" << endl;
return ActionBase::kPassed;
}
*/
//
// const member functions
//
//
// static member functions
//
| [
"tingxiao2007@gmail.com"
] | tingxiao2007@gmail.com |
5813c506700cc7c9872babc9faa87d76aad46198 | bfadc60e367c788077d66617907f3b1785f5573a | /GS_openspy/core/OS/legacy/enctypex_decoder.cpp | 9daf4654c95b0878a49fe1b146ed2a88ea869350 | [] | no_license | Synaxis/GameSpy-Repos | 2f046bf615197bab600d2aaf413880d48aea03ca | 02f6519d20afd50cd4d8e2b8baba5d8a823fba26 | refs/heads/master | 2023-08-08T21:51:41.211482 | 2023-07-20T14:02:57 | 2023-07-20T14:02:57 | 125,292,313 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 20,776 | cpp | /*
GS enctypeX servers list decoder/encoder 0.1.3a
by Luigi Auriemma
e-mail: aluigi@autistici.org
web: aluigi.org
This is the algorithm used by ANY new and old game which contacts the Gamespy master server.
It has been written for being used in gslist so there are no explanations or comments here,
if you want to understand something take a look to gslist.c
Copyright 2008,2009 Luigi Auriemma
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://www.gnu.org/licenses/gpl-2.0.txt
*/
#define _CRT_SECURE_NO_WARNINGS
#include "enctypex_decoder.h"
#ifndef LIST_CHALLENGE_LEN
#define LIST_CHALLENGE_LEN 8
#endif
int enctypex_func5(unsigned char *encxkey, int cnt, unsigned char *id, int idlen, int *n1, int *n2) {
int i,
tmp,
mask = 1;
if(!cnt) return(0);
if(cnt > 1) {
do {
mask = (mask << 1) + 1;
} while(mask < cnt);
}
i = 0;
do {
*n1 = encxkey[*n1 & 0xff] + id[*n2];
(*n2)++;
if(*n2 >= idlen) {
*n2 = 0;
*n1 += idlen;
}
tmp = *n1 & mask;
if(++i > 11) tmp %= cnt;
} while(tmp > cnt);
return(tmp);
}
void enctypex_func4(unsigned char *encxkey, unsigned char *id, int idlen) {
int i,
n1 = 0,
n2 = 0;
unsigned char t1,
t2;
if(idlen < 1) return;
for(i = 0; i < 256; i++) encxkey[i] = i;
for(i = 255; i >= 0; i--) {
t1 = enctypex_func5(encxkey, i, id, idlen, &n1, &n2);
t2 = encxkey[i];
encxkey[i] = encxkey[t1];
encxkey[t1] = t2;
}
encxkey[256] = encxkey[1];
encxkey[257] = encxkey[3];
encxkey[258] = encxkey[5];
encxkey[259] = encxkey[7];
encxkey[260] = encxkey[n1 & 0xff];
}
int enctypex_func7(unsigned char *encxkey, unsigned char d) {
unsigned char a,
b,
c;
a = encxkey[256];
b = encxkey[257];
c = encxkey[a];
encxkey[256] = a + 1;
encxkey[257] = b + c;
a = encxkey[260];
b = encxkey[257];
b = encxkey[b];
c = encxkey[a];
encxkey[a] = b;
a = encxkey[259];
b = encxkey[257];
a = encxkey[a];
encxkey[b] = a;
a = encxkey[256];
b = encxkey[259];
a = encxkey[a];
encxkey[b] = a;
a = encxkey[256];
encxkey[a] = c;
b = encxkey[258];
a = encxkey[c];
c = encxkey[259];
b += a;
encxkey[258] = b;
a = b;
c = encxkey[c];
b = encxkey[257];
b = encxkey[b];
a = encxkey[a];
c += b;
b = encxkey[260];
b = encxkey[b];
c += b;
b = encxkey[c];
c = encxkey[256];
c = encxkey[c];
a += c;
c = encxkey[b];
b = encxkey[a];
encxkey[260] = d;
c ^= b ^ d;
encxkey[259] = c;
return(c);
}
int enctypex_func7e(unsigned char *encxkey, unsigned char d) {
unsigned char a,
b,
c;
a = encxkey[256];
b = encxkey[257];
c = encxkey[a];
encxkey[256] = a + 1;
encxkey[257] = b + c;
a = encxkey[260];
b = encxkey[257];
b = encxkey[b];
c = encxkey[a];
encxkey[a] = b;
a = encxkey[259];
b = encxkey[257];
a = encxkey[a];
encxkey[b] = a;
a = encxkey[256];
b = encxkey[259];
a = encxkey[a];
encxkey[b] = a;
a = encxkey[256];
encxkey[a] = c;
b = encxkey[258];
a = encxkey[c];
c = encxkey[259];
b += a;
encxkey[258] = b;
a = b;
c = encxkey[c];
b = encxkey[257];
b = encxkey[b];
a = encxkey[a];
c += b;
b = encxkey[260];
b = encxkey[b];
c += b;
b = encxkey[c];
c = encxkey[256];
c = encxkey[c];
a += c;
c = encxkey[b];
b = encxkey[a];
c ^= b ^ d;
encxkey[260] = c; // encrypt
encxkey[259] = d; // encrypt
return(c);
}
int enctypex_func6(unsigned char *encxkey, unsigned char *data, int len) {
int i;
for(i = 0; i < len; i++) {
data[i] = enctypex_func7(encxkey, data[i]);
}
return(len);
}
int enctypex_func6e(unsigned char *encxkey, unsigned char *data, int len) {
int i;
for(i = 0; i < len; i++) {
data[i] = enctypex_func7e(encxkey, data[i]);
}
return(len);
}
void enctypex_funcx(unsigned char *encxkey, unsigned char *key, unsigned char *encxvalidate, unsigned char *data, int datalen) {
int i,
keylen;
keylen = strlen((const char *)key);
for(i = 0; i < datalen; i++) {
encxvalidate[(key[i % keylen] * i) % LIST_CHALLENGE_LEN] ^= encxvalidate[i % LIST_CHALLENGE_LEN] ^ data[i];
}
enctypex_func4(encxkey, encxvalidate, LIST_CHALLENGE_LEN);
}
static int enctypex_data_cleaner_level = 2; // 0 = do nothing
// 1 = colors
// 2 = colors + strange chars
// 3 = colors + strange chars + sql
int enctypex_data_cleaner(unsigned char *dst, unsigned char *src, int max) {
static const unsigned char strange_chars[] = {
' ','E',' ',',','f',',','.','t',' ','^','%','S','<','E',' ','Z',
' ',' ','`','`','"','"','.','-','-','~','`','S','>','e',' ','Z',
'Y','Y','i','c','e','o','Y','I','S','`','c','a','<','-','-','E',
'-','`','+','2','3','`','u','P','-',',','1','`','>','%','%','%',
'?','A','A','A','A','A','A','A','C','E','E','E','E','I','I','I',
'I','D','N','O','O','O','O','O','x','0','U','U','U','U','Y','D',
'B','a','a','a','a','a','a','e','c','e','e','e','e','i','i','i',
'i','o','n','o','o','o','o','o','+','o','u','u','u','u','y','b',
'y' };
unsigned char c,
*p;
if(!dst) return(0);
if(dst != src) dst[0] = 0; // the only change in 0.1.3a
if(!src) return(0);
if(max < 0) max = strlen((const char *)src);
for(p = dst; (c = *src) && (max > 0); src++, max--) {
if(c == '\\') { // avoids the backslash delimiter
*p++ = '/';
continue;
}
if(enctypex_data_cleaner_level >= 1) {
if(c == '^') { // Quake 3 colors
//if(src[1] == 'x') { // ^x112233 (I don't remember the game which used this format)
//src += 7;
//max -= 7;
//} else
if(isdigit(src[1]) || islower(src[1])) { // ^0-^9, ^a-^z... a good compromise
src++;
max--;
} else {
*p++ = c;
}
continue;
}
if(c == 0x1b) { // Unreal colors
src += 3;
max -= 3;
continue;
}
if(c < ' ') { // other colors
continue;
}
}
if(enctypex_data_cleaner_level >= 2) {
if(c >= 0x7f) c = strange_chars[c - 0x7f];
}
if(enctypex_data_cleaner_level >= 3) {
switch(c) { // html/SQL injection (paranoid mode)
case '\'':
case '\"':
case '&':
case '^':
case '?':
case '{':
case '}':
case '(':
case ')':
case '[':
case ']':
case '-':
case ';':
case '~':
case '|':
case '$':
case '!':
case '<':
case '>':
case '*':
case '%':
case ',': c = '.'; break;
default: break;
}
}
if((c == '\r') || (c == '\n')) { // no new line
continue;
}
*p++ = c;
}
*p = 0;
return(p - dst);
}
// function not related to the algorithm, I have created it only for a quick handling of the received data
// very quick explanation:
// - if you use out it will be considered as an output buffer where placing all the IP and ports of the servers in the classical format: 4 bytes for IP and 2 for the port
// - if you don't use out the function will return a non-zero value if you have received all the data from the master server
// - if you use infobuff it will be considered as an output buffer where placing all the informations of one server at time in the format "IP:port \parameter1\value1\...\parameterN\valueN"
// - infobuff_size is used to avoid to write more data than how much supported by infobuff
// - infobuff_offset instead is used for quickly handling the next servers for infobuff because, as just said, the function handles only one server at time
// infobuff_offset is just the offset of the server to handle in our enctypex buffer, the function returns the offset to the next one or a value zero or -1 if there are no other hosts
// data and out can't be the same buffer because in some games like AA the gamespy master server returns
// 5 bytes for each IP/port and so there is the risk of overwriting the data to handle, that's why I use
// an output buffer which is at least "(datalen / 5) * 6" bytes long
int enctypex_decoder_convert_to_ipport(unsigned char *data, int datalen, unsigned char *out, unsigned char *infobuff, int infobuff_size, int infobuff_offset) {
#define enctypex_infobuff_check(X) \
if(infobuff) { \
if((int)(infobuff_size - infobuff_len) <= (int)(X)) { \
infobuff_size = 0; \
} else
typedef struct {
unsigned char type;
unsigned char *name;
} par_t;
int i,
len,
pars = 0, // pars and vals are used for making the function
vals = 0, // thread-safe when infobuff is not used
infobuff_len = 0;
unsigned char tmpip[6],
port[2],
t,
*p,
*o,
*l;
static const int use_parval = 1; // par and val are required, so this bool is useless
static unsigned char // this function is not thread-safe if you use it for retrieving the extra data (infobuff)
parz = 0,
valz = 0,
**val = NULL;
static par_t *par = NULL; // par[255] and *val[255] was good too
if(!data) return(0);
if(datalen < 6) return(0); // covers the 6 bytes of IP:port
o = out;
p = data;
l = data + datalen;
p += 4; // your IP
port[0] = *p++; // the most used port
port[1] = *p++;
if((port[0] == 0xff) && (port[1] == 0xff)) {
return(-1); // error message from the server
}
if(infobuff && infobuff_offset) { // restore the data
p = data + infobuff_offset;
} else {
if(p < l) {
pars = *p++;
if(use_parval) { // save the static data
parz = pars;
par = (par_t *)realloc(par, sizeof(par_t) * parz);
}
for(i = 0; (i < pars) && (p < l); i++) {
t = *p++;
if(use_parval) {
par[i].type = t;
par[i].name = p;
}
p += strlen((const char *)p) + 1;
}
}
if(p < l) {
vals = *p++;
if(use_parval) { // save the static data
valz = vals;
*val = (unsigned char *)realloc(val, sizeof(unsigned char *) * valz);
}
for(i = 0; (i < vals) && (p < l); i++) {
if(use_parval) val[i] = p;
p += strlen((const char *)p) + 1;
}
}
}
if(use_parval) {
pars = parz;
vals = valz;
}
if(infobuff && (infobuff_size > 0)) {
infobuff[0] = 0;
}
while(p < l) {
t = *p++;
if(!t && !memcmp(p, "\xff\xff\xff\xff", 4)) {
if(!out) o = out - 1; // so the return is not 0 and means that we have reached the end
break;
}
len = 5;
if(t & 0x02) len = 9;
if(t & 0x08) len += 4;
if(t & 0x10) len += 2;
if(t & 0x20) len += 2;
tmpip[0] = p[0];
tmpip[1] = p[1];
tmpip[2] = p[2];
tmpip[3] = p[3];
if((len < 6) || !(t & 0x10)) {
tmpip[4] = port[0];
tmpip[5] = port[1];
} else {
tmpip[4] = p[4];
tmpip[5] = p[5];
}
if(out) {
memcpy(o, tmpip, 6);
o += 6;
}
enctypex_infobuff_check(22) {
infobuff_len = sprintf((char *)infobuff,
"%u.%u.%u.%u:%hu ",
tmpip[0], tmpip[1], tmpip[2], tmpip[3],
(unsigned short)((tmpip[4] << 8) | tmpip[5]));
}}
p += len - 1; // the value in len is no longer used from this point
if(t & 0x40) {
for(i = 0; (i < pars) && (p < l); i++) {
enctypex_infobuff_check(1 + strlen((const char *)par[i].name) + 1) {
infobuff[infobuff_len++] = '\\';
infobuff_len += enctypex_data_cleaner(infobuff + infobuff_len, par[i].name, -1);
infobuff[infobuff_len++] = '\\';
infobuff[infobuff_len] = 0;
}}
t = *p++;
if(use_parval) {
if(!par[i].type) { // string
if(t == 0xff) { // inline string
enctypex_infobuff_check(strlen((const char *)p)) {
infobuff_len += enctypex_data_cleaner(infobuff + infobuff_len, p, -1);
}}
p += strlen((const char *)p) + 1;
} else { // fixed string
if(t < vals) {
enctypex_infobuff_check(strlen((const char *)val[t])) {
infobuff_len += enctypex_data_cleaner(infobuff + infobuff_len, val[t], -1);
}}
}
}
} else { // number (-128 to 127)
enctypex_infobuff_check(5) {
infobuff_len += sprintf((char *)(infobuff + infobuff_len), "%d", (signed char)t);
}}
}
}
}
}
if(infobuff) { // do NOT touch par/val, I use realloc
return(p - data);
}
}
if((out == data) && ((o - out) > (p - data))) { // I need to remember this
fprintf(stderr, "\nError: input and output buffer are the same and there is not enough space\n");
exit(1);
}
if(infobuff) { // do NOT touch par/val, I use realloc
parz = 0;
valz = 0;
return(-1);
}
return(o - out);
}
void enctypex_decoder_rand_validate(unsigned char *validate) {
int i,
rnd;
rnd = ~time(NULL);
for(i = 0; i < 8; i++) {
do {
rnd = ((rnd * 0x343FD) + 0x269EC3) & 0x7f;
} while((rnd < 0x21) || (rnd >= 0x7f));
validate[i] = rnd;
}
validate[i] = 0;
}
unsigned char *enctypex_init(unsigned char *encxkey, unsigned char *key, unsigned char *validate, unsigned char *data, int *datalen, enctypex_data_t *enctypex_data) {
int a,
b;
unsigned char encxvalidate[LIST_CHALLENGE_LEN];
if(*datalen < 1) return(NULL);
a = (data[0] ^ 0xec) + 2;
if(*datalen < a) return(NULL);
b = data[a - 1] ^ 0xea;
if(*datalen < (a + b)) return(NULL);
memcpy(encxvalidate, validate, LIST_CHALLENGE_LEN);
enctypex_funcx(encxkey, key, encxvalidate, data + a, b);
a += b;
if(!enctypex_data) {
data += a;
*datalen -= a; // datalen is untouched in stream mode!!!
} else {
enctypex_data->offset = a;
enctypex_data->start = a;
}
return(data);
}
unsigned char *enctypex_decoder(unsigned char *key, unsigned char *validate, unsigned char *data, int *datalen, enctypex_data_t *enctypex_data) {
unsigned char encxkeyb[261],
*encxkey;
encxkey = enctypex_data ? enctypex_data->encxkey : encxkeyb;
if(!enctypex_data || (enctypex_data && !enctypex_data->start)) {
data = enctypex_init(encxkey, key, validate, data, datalen, enctypex_data);
if(!data) return(NULL);
}
if(!enctypex_data) {
enctypex_func6(encxkey, data, *datalen);
return(data);
} else if(enctypex_data && enctypex_data->start) {
enctypex_data->offset += enctypex_func6(encxkey, data + enctypex_data->offset, *datalen - enctypex_data->offset);
return(data + enctypex_data->start);
}
return(NULL);
}
// exactly as above but with enctypex_func6e instead of enctypex_func6
unsigned char *enctypex_encoder(unsigned char *key, unsigned char *validate, unsigned char *data, int *datalen, enctypex_data_t *enctypex_data) {
unsigned char encxkeyb[261],
*encxkey;
encxkey = enctypex_data ? enctypex_data->encxkey : encxkeyb;
if(!enctypex_data || (enctypex_data && !enctypex_data->start)) {
data = enctypex_init(encxkey, key, validate, data, datalen, enctypex_data);
if(!data) return(NULL);
}
if(!enctypex_data) {
enctypex_func6e(encxkey, data, *datalen);
return(data);
} else if(enctypex_data && enctypex_data->start) {
enctypex_data->offset += enctypex_func6e(encxkey, data + enctypex_data->offset, *datalen - enctypex_data->offset);
return(data + enctypex_data->start);
}
return(NULL);
}
unsigned char *enctypex_msname(unsigned char *gamename, unsigned char *retname) {
static unsigned char msname[256];
unsigned i,
c,
server_num;
server_num = 0;
for(i = 0; gamename[i]; i++) {
c = tolower(gamename[i]);
server_num = c - (server_num * 0x63306ce7);
}
server_num %= 20;
if(retname) {
snprintf((char *)retname, 256, "%s.ms%d.gamespy.com", gamename, server_num);
return(retname);
}
snprintf((char *)msname, sizeof(msname), "%s.ms%d.gamespy.com", gamename, server_num);
return(msname);
}
int enctypex_wrapper(unsigned char *key, unsigned char *validate, unsigned char *data, int size) {
unsigned char *p;
if(!key || !validate || !data || (size < 0)) return(0);
p = enctypex_decoder(key, validate, data, &size, NULL);
memmove(data, p, size);
return(size);
}
// data must be enough big to include the 23 bytes header, remember it: data = realloc(data, size + 23);
int enctypex_quick_encrypt(unsigned char *key, unsigned char *validate, unsigned char *data, int size) {
int i,
rnd,
tmpsize,
keylen,
vallen;
unsigned char tmp[23];
if(!key || !validate || !data || (size < 0)) return(0);
keylen = strlen((const char *)key); // only for giving a certain randomness, so useless
vallen = strlen((const char *)validate);
rnd = ~time(NULL);
for(i = 0; i < sizeof(tmp); i++) {
rnd = (rnd * 0x343FD) + 0x269EC3;
tmp[i] = rnd ^ key[i % keylen] ^ validate[i % vallen];
}
tmp[0] = 0xeb; // 7
tmp[1] = 0x00;
tmp[2] = 0x00;
tmp[8] = 0xe4; // 14
for(i = size - 1; i >= 0; i--) {
data[sizeof(tmp) + i] = data[i];
}
memcpy(data, tmp, sizeof(tmp));
size += sizeof(tmp);
tmpsize = size;
enctypex_encoder(key, validate, data, &tmpsize, NULL);
return(size);
}
| [
"01xtor@gmail.com"
] | 01xtor@gmail.com |
3bc9e50a894aeac39679b1f41521056702d1e76c | 89ae869293632359fd16ab150019fc05827eb335 | /SensorSimR3/widgetplugin/qwidgetmodplugin.cpp | 59eaa7df430f4ad92ea4ccd109cdbb45ae05a572 | [] | no_license | ipa320/accompany | f4546b6cc848d580f815f59d47cb09c43a8f5b2a | ac62484b035a0f9ebce888e840c27beaca038f13 | refs/heads/master | 2021-05-02T05:51:24.052693 | 2017-07-31T12:15:07 | 2017-07-31T12:15:07 | 3,283,388 | 0 | 1 | null | 2017-07-31T12:19:31 | 2012-01-27T15:05:55 | Python | UTF-8 | C++ | false | false | 1,789 | cpp | #include "qwidgetmodplugin.h"
#include "widget/qwidgetmod.h"
#include <QtPlugin>
#include <QInputDialog>
QWidgetModPlugin::QWidgetModPlugin(QObject *parent)
: QObject(parent)
{
initialized = false;
}
void QWidgetModPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
if (initialized)
{
return;
}
initialized = true;
}
bool QWidgetModPlugin::isInitialized() const
{
return initialized;
}
QWidget *QWidgetModPlugin::createWidget(QWidget *parent)
{
QWidgetMod* ui = new QWidgetMod(parent,true);
return ui;
}
QString QWidgetModPlugin::name() const
{
return "QWidgetMod";
}
QString QWidgetModPlugin::group() const
{
return "SensorSim Widget";
}
QIcon QWidgetModPlugin::icon() const
{
return QIcon();
}
QString QWidgetModPlugin::toolTip() const
{
return "toolTip()";
}
QString QWidgetModPlugin::whatsThis() const
{
return "whatsThis()";
}
bool QWidgetModPlugin::isContainer() const
{
return true;
}
QString QWidgetModPlugin::domXml() const
{
return "<ui language=\"c++\">\n"
" <widget class=\"QWidgetMod\" name=\"qWidgetMod\">\n"
" <property name=\"GroupId\">\n"
" <number>-1</number>\n"
" </property>\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>100</width>\n"
" <height>23</height>\n"
" </rect>\n"
" </property>\n"
" </widget>\n"
"</ui>\n";
}
QString QWidgetModPlugin::includeFile() const
{
return "widget/qwidgetmod.h";
}
#ifndef collectionplugin
//Q_EXPORT_PLUGIN2(qwidgetmod, QWidgetModPlugin)
#endif
| [
"Richard.Bormann@ipa.fraunhofer.de"
] | Richard.Bormann@ipa.fraunhofer.de |
b768cf69be0ef0b4b30661335385076195cd386b | df93ce63155a5ddfd054f8daba9653d1ad00eb24 | /applications/solvers/incompressible/simpleFoam_with_GAMGrenumbering/structuredFaceAreaPairGAMGAgglomeration.H | ce2f8fe3e38f358e5cdc908859399179bc5cd3da | [] | no_license | mattijsjanssens/mattijs-extensions | d4fb837e329b3372689481e9ebaac597272e0ab9 | 27b62bf191f1db59b045ce5c89c859a4737033e4 | refs/heads/master | 2023-07-19T20:57:04.034831 | 2023-07-16T20:35:12 | 2023-07-16T20:35:12 | 57,304,835 | 8 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 3,966 | h | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::structuredFaceAreaPairGAMGAgglomeration
Description
Agglomerate using the pair algorithm.
SourceFiles
structuredFaceAreaPairGAMGAgglomeration.C
\*---------------------------------------------------------------------------*/
#ifndef structuredFaceAreaPairGAMGAgglomeration_H
#define structuredFaceAreaPairGAMGAgglomeration_H
#include "GAMGAgglomeration.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class structuredFaceAreaPairGAMGAgglomeration Declaration
\*---------------------------------------------------------------------------*/
class structuredFaceAreaPairGAMGAgglomeration
:
public GAMGAgglomeration
{
// Private data
//- Number of levels to merge, 1 = don't merge, 2 = merge pairs etc.
label mergeLevels_;
//- Direction of cell loop for the current level
static bool forward_;
protected:
// Protected Member Functions
//- Agglomerate all levels starting from the given face weights
void agglomerate
(
const lduMesh& mesh,
const scalarField& faceWeights
);
//- Calculate and return agglomeration
static tmp<labelField> structuredAgglomerate
(
label& nCoarseCells,
const lduAddressing& fineMatrixAddressing,
const scalarField& faceWeights
);
//- Calculate and return agglomeration
static tmp<labelField> agglomerate
(
label& nCoarseCells,
const lduAddressing& fineMatrixAddressing,
const scalarField& faceWeights
);
//- Disallow default bitwise copy construct
structuredFaceAreaPairGAMGAgglomeration(const structuredFaceAreaPairGAMGAgglomeration&);
//- Disallow default bitwise assignment
void operator=(const structuredFaceAreaPairGAMGAgglomeration&);
public:
//- Runtime type information
TypeName("structuredFaceAreaPair");
// Constructors
//- Construct given mesh and controls
structuredFaceAreaPairGAMGAgglomeration
(
const lduMesh& mesh,
const dictionary& controlDict
);
// //- Construct given mesh and controls
// structuredFaceAreaPairGAMGAgglomeration
// (
// const lduMesh& mesh,
// const scalarField& cellVolumes,
// const vectorField& faceAreas,
// const dictionary& controlDict
// );
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
| [
"mattijs.janssens@gmail.com"
] | mattijs.janssens@gmail.com |
3bb2bd50e3dd3148c742b31c785f815691b739cd | b9c1098de9e26cedad92f6071b060dfeb790fbae | /src/binary/format/syntax.cpp | 3a1ef84724ed645712c957b4580af3960474f364 | [] | no_license | vitamin-caig/zxtune | 2a6f38a941f3ba2548a0eb8310eb5c61bb934dbe | 9940f3f0b0b3b19e94a01cebf803d1a14ba028a1 | refs/heads/master | 2023-08-31T01:03:45.603265 | 2023-08-27T11:50:45 | 2023-08-27T11:51:26 | 13,986,319 | 138 | 13 | null | 2021-09-13T13:58:32 | 2013-10-30T12:51:01 | C++ | UTF-8 | C++ | false | false | 10,658 | cpp | /**
*
* @file
*
* @brief Format syntax implementation
*
* @author vitamin.caig@gmail.com
*
**/
// local includes
#include "binary/format/syntax.h"
#include "binary/format/grammar.h"
// common includes
#include <contract.h>
#include <iterator.h>
#include <locale_helpers.h>
#include <make_ptr.h>
// std includes
#include <cctype>
#include <stack>
#include <utility>
namespace Binary::FormatDSL
{
inline uint_t ParseDecimalValue(StringView num)
{
Require(!num.empty());
uint_t res = 0;
for (RangeIterator<decltype(num.begin())> it(num.begin(), num.end()); it; ++it)
{
Require(IsDigit(*it));
res = res * 10 + (*it - '0');
}
return res;
}
struct Token
{
LexicalAnalysis::TokenType Type;
StringView Value;
Token()
: Type(DELIMITER)
, Value(" ")
{}
Token(LexicalAnalysis::TokenType type, StringView lexeme)
: Type(type)
, Value(lexeme)
{}
};
class State
{
public:
virtual ~State() = default;
virtual const State* Transition(const Token& tok, FormatTokensVisitor& visitor) const = 0;
static const State* Initial();
static const State* Quantor();
static const State* QuantorEnd();
static const State* Error();
};
class InitialStateType : public State
{
public:
InitialStateType() = default;
const State* Transition(const Token& tok, FormatTokensVisitor& visitor) const override
{
switch (tok.Type)
{
case DELIMITER:
return this;
case OPERATION:
return ParseOperation(tok, visitor);
case CONSTANT:
case MASK:
return ParseValue(tok, visitor);
default:
return State::Error();
}
}
private:
const State* ParseOperation(const Token& tok, FormatTokensVisitor& visitor) const
{
Require(tok.Value.size() == 1);
switch (tok.Value[0])
{
case GROUP_BEGIN:
visitor.GroupStart();
return this;
case GROUP_END:
visitor.GroupEnd();
return this;
case QUANTOR_BEGIN:
return State::Quantor();
case RANGE_TEXT:
case CONJUNCTION_TEXT:
case DISJUNCTION_TEXT:
visitor.Operation(tok.Value);
return this;
default:
return State::Error();
}
}
const State* ParseValue(const Token& tok, FormatTokensVisitor& visitor) const
{
if (tok.Value[0] == BINARY_MASK_TEXT || tok.Value[0] == MULTIPLICITY_TEXT || tok.Value[0] == ANY_BYTE_TEXT
|| tok.Value[0] == SYMBOL_TEXT)
{
visitor.Match(tok.Value);
return this;
}
else
{
Require(tok.Value.size() % 2 == 0);
auto val = tok.Value;
while (!val.empty())
{
visitor.Match(val.substr(0, 2));
val = val.substr(2);
}
return this;
}
}
};
class QuantorStateType : public State
{
public:
QuantorStateType() = default;
const State* Transition(const Token& tok, FormatTokensVisitor& visitor) const override
{
if (tok.Type == CONSTANT)
{
const uint_t num = ParseDecimalValue(tok.Value);
visitor.Quantor(num);
return State::QuantorEnd();
}
else
{
return State::Error();
}
}
};
class QuantorEndType : public State
{
public:
QuantorEndType() = default;
const State* Transition(const Token& tok, FormatTokensVisitor& /*visitor*/) const override
{
Require(tok.Type == OPERATION);
Require(tok.Value == StringView(&QUANTOR_END, 1));
return State::Initial();
}
};
class ErrorStateType : public State
{
public:
ErrorStateType() = default;
const State* Transition(const Token& /*token*/, FormatTokensVisitor& /*visitor*/) const override
{
return this;
}
};
const State* State::Initial()
{
static const InitialStateType instance;
return &instance;
}
const State* State::Quantor()
{
static const QuantorStateType instance;
return &instance;
}
const State* State::QuantorEnd()
{
static const QuantorEndType instance;
return &instance;
}
const State* State::Error()
{
static const ErrorStateType instance;
return &instance;
}
class ParseFSM : public LexicalAnalysis::Grammar::Callback
{
public:
explicit ParseFSM(FormatTokensVisitor& visitor)
: CurState(State::Initial())
, Visitor(visitor)
{}
void TokenMatched(StringView lexeme, LexicalAnalysis::TokenType type) override
{
CurState = CurState->Transition(Token(type, lexeme), Visitor);
Require(CurState != State::Error());
}
void MultipleTokensMatched(StringView /*lexeme*/, const LexicalAnalysis::TokenTypesSet& /*types*/) override
{
Require(false);
}
void AnalysisError(StringView /*notation*/, std::size_t /*position*/) override
{
Require(false);
}
private:
const State* CurState;
FormatTokensVisitor& Visitor;
};
const StringView GROUP_START(&GROUP_BEGIN, 1);
struct Operator
{
public:
Operator()
: Val()
{}
explicit Operator(StringView op)
: Val(op)
{
Require(!Val.empty());
switch (Val[0])
{
case RANGE_TEXT:
Prec = 3;
break;
case CONJUNCTION_TEXT:
Prec = 2;
break;
case DISJUNCTION_TEXT:
Prec = 1;
break;
}
}
StringView Value() const
{
return Val;
}
bool IsOperation() const
{
return Prec > 0;
}
std::size_t Precedence() const
{
return Prec;
}
static std::size_t Parameters()
{
return 2;
}
static bool LeftAssoc()
{
return true;
}
private:
const StringView Val;
std::size_t Prec = 0;
};
class RPNTranslation : public FormatTokensVisitor
{
public:
RPNTranslation(FormatTokensVisitor& delegate)
: Delegate(delegate)
{}
void Match(StringView val) override
{
if (LastIsMatch)
{
FlushOperations();
}
Delegate.Match(val);
LastIsMatch = true;
}
void GroupStart() override
{
FlushOperations();
Ops.emplace(GROUP_START);
Delegate.GroupStart();
LastIsMatch = false;
}
void GroupEnd() override
{
FlushOperations();
Require(!Ops.empty() && Ops.top().Value() == GROUP_START);
Ops.pop();
Delegate.GroupEnd();
LastIsMatch = false;
}
void Quantor(uint_t count) override
{
FlushOperations();
Delegate.Quantor(count);
LastIsMatch = false;
}
void Operation(StringView op) override
{
const Operator newOp(op);
FlushOperations(newOp);
Ops.push(newOp);
LastIsMatch = false;
}
void Flush()
{
while (!Ops.empty())
{
Require(Ops.top().IsOperation());
FlushOperations();
}
}
private:
void FlushOperations()
{
while (!Ops.empty())
{
const Operator& topOp = Ops.top();
if (!topOp.IsOperation())
{
break;
}
Delegate.Operation(topOp.Value());
Ops.pop();
}
}
void FlushOperations(const Operator& newOp)
{
while (!Ops.empty())
{
const Operator& topOp = Ops.top();
if (!topOp.IsOperation())
{
break;
}
if ((newOp.LeftAssoc() && newOp.Precedence() <= topOp.Precedence())
|| (newOp.Precedence() < topOp.Precedence()))
{
Delegate.Operation(topOp.Value());
Ops.pop();
}
else
{
break;
}
}
}
private:
FormatTokensVisitor& Delegate;
std::stack<Operator> Ops;
bool LastIsMatch = false;
};
class SyntaxCheck : public FormatTokensVisitor
{
public:
explicit SyntaxCheck(FormatTokensVisitor& delegate)
: Delegate(delegate)
{}
void Match(StringView val) override
{
Delegate.Match(val);
++Position;
}
void GroupStart() override
{
GroupStarts.push(Position);
Delegate.GroupStart();
}
void GroupEnd() override
{
Require(!GroupStarts.empty());
Require(GroupStarts.top() != Position);
Groups.emplace(GroupStarts.top(), Position);
GroupStarts.pop();
Delegate.GroupEnd();
}
void Quantor(uint_t count) override
{
Require(Position != 0);
Require(count != 0);
Delegate.Quantor(count);
}
void Operation(StringView op) override
{
const std::size_t usedVals = Operator(op).Parameters();
CheckAvailableParameters(usedVals, Position);
Position = Position - usedVals + 1;
Delegate.Operation(op);
}
private:
void CheckAvailableParameters(std::size_t parameters, std::size_t position)
{
if (!parameters)
{
return;
}
const std::size_t start = GroupStarts.empty() ? 0 : GroupStarts.top();
if (Groups.empty() || Groups.top().End < start)
{
Require(parameters + start <= position);
return;
}
const Group top = Groups.top();
const std::size_t nonGrouped = position - top.End;
if (nonGrouped < parameters)
{
if (nonGrouped)
{
CheckAvailableParameters(parameters - nonGrouped, top.End);
}
else
{
Require(top.Size() == 1);
Groups.pop();
CheckAvailableParameters(parameters - 1, top.Begin);
Groups.push(top);
}
}
}
private:
struct Group
{
Group(std::size_t begin, std::size_t end)
: Begin(begin)
, End(end)
{}
Group() = default;
std::size_t Size() const
{
return End - Begin;
}
std::size_t Begin = 0;
std::size_t End = 0;
};
private:
FormatTokensVisitor& Delegate;
std::size_t Position = 0;
std::stack<std::size_t> GroupStarts;
std::stack<Group> Groups;
};
} // namespace Binary::FormatDSL
namespace Binary::FormatDSL
{
void ParseFormatNotation(StringView notation, FormatTokensVisitor& visitor)
{
ParseFSM fsm(visitor);
CreateFormatGrammar()->Analyse(notation, fsm);
}
void ParseFormatNotationPostfix(StringView notation, FormatTokensVisitor& visitor)
{
RPNTranslation rpn(visitor);
ParseFormatNotation(notation, rpn);
rpn.Flush();
}
FormatTokensVisitor::Ptr CreatePostfixSyntaxCheckAdapter(FormatTokensVisitor& visitor)
{
return MakePtr<SyntaxCheck>(visitor);
}
} // namespace Binary::FormatDSL
| [
"vitamin.caig@gmail.com"
] | vitamin.caig@gmail.com |
f58a5553f8ca4cd78d52ed6eb1730f4d64cc8382 | 5d2343977bd25cae2c43addf2e19dd027a7ae198 | /Codechef/DSA Learning Series/contest3/dpairs.cpp | 5f62e0e5001c17623eee76db11b877d005ff9865 | [] | no_license | ayushgupta2959/CodeReview | 5ea844d180992ee80ba1f189af2ab3b0be90f5ce | 7d8a5a6610c9227e458c6fda0bbc5885301788d8 | refs/heads/master | 2021-08-22T13:07:59.314076 | 2020-04-26T14:30:08 | 2020-04-26T14:30:08 | 173,270,707 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 794 | cpp | #include <bits/stdc++.h>
using namespace std;
#define sp ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define pi pair<int,int>
#define FF first
#define SS second
#define EB emplace_back
int main() {
sp;
//////////////To Remove//////////////
// freopen("../../../input.txt", "r", stdin);
// freopen("../../../output.txt", "w", stdout);
///////////////////////////////////////
int n, m, x;
cin>>n>>m;
vector<pi> a(n);
vector<pi> b(m);
for(int i = 0; i < n; ++i){
cin>>x;
a[i] = {x, i};
}
for(int i = 0; i < m; ++i){
cin>>x;
b[i] = {x, i};
}
sort(a.begin(), a.end());
sort(b.begin(), b.end());
for(int i = 0; i < n; ++i){
cout<<a[i].SS<<" "<<b[0].SS<<"\n";
}
for(int i = 1; i < m; ++i){
cout<<a[n-1].SS<<" "<<b[i].SS<<"\n";
}
return 0;
} | [
"37008291+ayushgupta2959@users.noreply.github.com"
] | 37008291+ayushgupta2959@users.noreply.github.com |
726f9e87faa4e1fa0b9c87a43e66306a7b915ddd | d36186ae99d6c8940a1240a2b4cf1d37ea91fff1 | /SyncLED/SyncLED.h | 711b59b513d2951676553a666366b9f2d28cd65f | [] | no_license | GregoryNikolaishvili/libraries | 2ee6c8b53cc0550c0bd542a06302e77b8963c907 | af36fac0f493f2ba118c2011a6ba5f2b5c327a6a | refs/heads/master | 2023-01-06T17:06:50.340010 | 2022-12-29T17:50:03 | 2022-12-29T17:50:03 | 127,650,817 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,443 | h | #ifndef _SYNCLED_H_
#define _SYNCLED_H_
#include <Arduino.h>
class SyncLED {
public:
void begin(byte pin, byte initialState = LOW, boolean usePWM = false, unsigned long pwmMS = 500);
// Set the pattern (if desired) in binary ex: 0B1000010001
// Note that the max length is 32 bits...
// Rate represents the delay between bits
void blinkPattern(unsigned long pattern = 0B10101010101010101010101010101010, unsigned long delay = 1000, byte pattern_length = 32);
inline void setRate(unsigned long delay) { m_delay = delay; };
void setPattern(unsigned long pattern, byte pattern_length = 32);
inline void blinkPattern(uint8_t blinks, unsigned long delay = 1000);
// The following functions stop the current pattern and set the LED state explicitly
void On(unsigned long duration = 0UL);
void Off();
// Resume pattern once stopped
void resumePattern(boolean reset = false);
// Return true if the light is currently on
inline boolean isOn() { return(m_state == HIGH); }
// Call one of these to update LED State
void update();
void update(unsigned long time_ms);
private: // methods
void advanceState(unsigned long time_ms);
private: // variables
byte m_pin;
unsigned long m_pattern;
unsigned long m_delay;
unsigned long m_lastChange;
unsigned long m_pwmFadeMS;
unsigned long m_duration;
byte m_patternLength;
byte m_inPattern;
byte m_patternPosition;
byte m_state;
byte m_lastState;
byte m_usePWM;
};
#endif | [
"gianick68@gmail.com"
] | gianick68@gmail.com |
0ff509253aa48ff3ebcb3bf4be83d2249a71eaef | 0aeb1844bdea51531303e7897d8085f677215f75 | /geeks-practise/inorder-tree-traversal-without-recursion.cpp | dc83e8232fe9f389a84f509873016a8c559eae12 | [] | no_license | gamer496/pfp | 86c9b15946ea0d7e254b5661c8ae2f583d1a493a | a2c6bfd3d366856db77fea125b31dfba789afd26 | refs/heads/master | 2021-01-14T08:39:19.336653 | 2016-08-22T11:35:17 | 2016-08-22T11:35:17 | 81,969,577 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 950 | cpp | #include<bits/stdc++.h>
using namespace std;
struct node
{
int data;
struct node *left,*right;
};
node * newtNode(int data)
{
node *n=(struct node *)malloc(sizeof(struct node));
n->data=data;
n->left=NULL;
n->right=NULL;
return n;
}
// http://www.geeksforgeeks.org/inorder-tree-traversal-without-recursion/
void inorder(node *temp)
{
// cout<<"here"<<endl;
stack<node *>s;
s.push(temp);
node *curr_node=temp->left;
while(true)
{
if(curr_node!=NULL)
{
s.push(curr_node);
curr_node=curr_node->left;
}
else
{
if(s.empty())
{
break;
}
else
{
node *temp1=s.top();
s.pop();
cout<<temp1->data<<"\n";
curr_node=temp1->right;
}
}
}
}
int main()
{
ios::sync_with_stdio(false);
struct node *root = newtNode(1);
root->left = newtNode(2);
root->right = newtNode(3);
root->left->left = newtNode(4);
root->left->right = newtNode(5);
inorder(root);
return 0;
}
| [
"singhjasdeep496@gmail.com"
] | singhjasdeep496@gmail.com |
7db66d7d49bb7d2f30d712c98464baf49d60e0d5 | f48e27524ca5bf65eff46734828a1eb26b4eac73 | /XMLStreamer.h | 58f7e50596981d5e519a4cd1fa5ce0aa184d3a23 | [] | no_license | tdfischer/bart-o-clock | 57939c5f8254f7a6980bb9b10a8ea50047b0c936 | 0b5116e42b59c5bc8770e53dbcfa9c2e9239eb0c | refs/heads/master | 2021-01-20T08:00:58.745248 | 2017-04-30T00:45:26 | 2017-04-30T00:45:26 | 90,081,318 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 399 | h | #pragma once
#include <cstdint>
class WiFiClient;
class TinyXML;
class XMLStreamer {
public:
enum State {
Success,
Ready,
Error
};
XMLStreamer(WiFiClient& client, TinyXML& xml);
~XMLStreamer();
State stream();
State state() const;
void reset();
private:
TinyXML& m_xml;
WiFiClient& m_client;
State m_state;
uint32_t m_lastRead;
};
| [
"tdfischer@hackerbots.net"
] | tdfischer@hackerbots.net |
dc2d9b0da4053d21d8cdc1a70c4314a8ce7c650a | 7f98f218e3eb50c7020c49bfe15d9dbb6bd70d0b | /ch07/ex07_11.h | ef59572fd3f63d47c7b7f02ca03af83956a98873 | [] | no_license | MonstarCoder/MyCppPrimer | 1917494855b01dbe12a343d4c3e08752f291c0e9 | 3399701bb90c45bc0ee0dc843a4e0b93e20d898a | refs/heads/master | 2021-01-18T10:16:37.501209 | 2017-11-09T13:44:36 | 2017-11-09T13:44:36 | 84,318,673 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,209 | h | #ifndef CP5_ex07_11_h
#define CP5_ex07_11_h
#include <string>
#include <iostream>
struct Sales_data {
Sales_data() = default;
Sales_data(const std::string& s) : bookNo(s) {}
Sales_data(const std::string& s, unsigned n, double p)
: bookNo(s), units_sold(n), revenue(n * p)
{
}
Sales_data(std::istream& is);
std::string isbn() const { return bookNo; };
Sales_data& combine(const Sales_data&);
std::string bookNo;
unsigned units_sold = 0;
double revenue = 0.0;
};
std::istream& read(std::istream& is, Sales_data& item)
{
double price = 0;
is >> item.bookNo >> item.units_sold >> price;
item.revenue = price * item.units_sold;
return is;
}
std::ostream& print(std::ostream& os, const Sales_data& item)
{
os << item.isbn() << " " << item.units_sold << " " << item.revenue;
return os;
}
Sales_data add(const Sales_data& lhs, const Sales_data& rhs)
{
Sales_data sum = lhs;
sum.combine(rhs);
return sum;
}
Sales_data::Sales_data(std::istream& is)
{
read(is, *this);
}
Sales_data& Sales_data::combine(const Sales_data& rhs)
{
units_sold += rhs.units_sold;
revenue += rhs.revenue;
return *this;
}
#endif
| [
"652141046@qq.com"
] | 652141046@qq.com |
57a86f1b2fa16aab54358927635d11e2f98263b3 | 8590b7928fdcff351a6e347c4b04a085f29b7895 | /UED/library/UED_types.h | 9b30c6f90b6709d0a73b18d141ebbb86f0bf1c23 | [] | no_license | liao007/VIC-CropSyst-Package | 07fd0f29634cf28b96a299dc07156e4f98a63878 | 63a626250ccbf9020717b7e69b6c70e40a264bc2 | refs/heads/master | 2023-05-23T07:15:29.023973 | 2021-05-29T02:17:32 | 2021-05-29T02:17:32 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,032 | h | #ifndef UED_typesH
#define UED_typesH
#ifndef primitiveH
# include "corn/primitive.h"
#endif
namespace UED
{ typedef nat32 Variable_code;
}
#define UED_period_start_time_option 0x01
#define UED_period_start_date_option 0x02
#define UED_period_start_date_time_option 0x03
#define UED_period_end_time_option 0x04
#define UED_period_end_date_option 0x08
#define UED_period_end_date_time_option 0x0C
#define UED_period_application_code_option 0x10
#define UED_period_enumeration_option 0x20
#define UED_period_index_option 0x40
#define UED_period_variable_code_option 0x80
//190812 #define UED_variable_code UED::Variable_code
#define UED_units_code nat32
// The UED_variable_code and UED_units_code type macros are obsolete
// now use UED::Variable_code and CORN::Units_code
#ifndef UED_CODES_H
# include "UED/library/codes.h"
#endif
#endif
// UED_types.h
| [
"mingliang.liu@wsu.edu"
] | mingliang.liu@wsu.edu |
7ba768423072255a3d133af9aa135ea2319c38f6 | 7008d4e39c15ea01d9dcc59c37c7ed517ee67d7c | /NeWS/ice/PolygonIns.cc | 0672a7ddc610952bd8ace1283bf8ddd888db4244 | [] | no_license | LegalizeAdulthood/OpenLookCDROM | d99b829a446cfa281947c449c8496943f944fd2a | 2aa032ddc0a737bb420463c0a508a0f4867c1667 | refs/heads/master | 2023-03-19T12:02:53.777816 | 2021-03-11T14:36:41 | 2021-03-11T14:36:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 50,172 | cc | /*
* Copyright (c) 1990 by Columbia University.
*/
#include <stdio.h>
#include <ctype.h>
#include "ice_defines.h"
#include "ice_externs.h"
#include "Polygon.h"
#include "Pathdup.h"
extern "C" {
char * gconvert(double, int, int, char *);
int strcmp(char *, char *);
char * strcpy(char *, char *);
int strlen(char *);
int strncmp(char *, char *, int);
}
extern void attrpoly_proc(Menu *, Menu_item *);
extern unsigned long cmap_lookup(unsigned char, unsigned char, unsigned char, int);
extern void cmpop_proc(Menu *, Menu_item *);
extern void cppoly_proc(Menu *, Menu_item *);
extern void delpoly_proc(Menu *, Menu_item *);
extern void dmpobj_proc(Menu *, Menu_item *);
extern void drawcrosshairs();
extern void ice_err(char *, int);
extern void pg_draw();
extern void pg_erasecoords();
extern void pg_showcoords(int, int, int, int, float, float, int, int);
extern void poly_del(Polygon *);
extern void trpoly_proc(Menu *, Menu_item *);
extern char ice_iobuf[];
extern int insice_lineno;
extern Grobj *loc_grobj;
extern int loc_nvertices, loc_vertex;
extern float *loc_xvertices, *loc_yvertices;
extern boolean pgcoords_drawn;
extern boolean crosshairs_drawn;
extern crosshairs_x, crosshairs_y;
extern Pathdup *duppaths;
static Polygon *new_poly;
static int nvertices;
static float *xvert, *yvert;
static float ipp, xvorig, yvorig;
static int *ixvert, *iyvert;
static boolean poly_drawn;
void
inspoly_proc(Menu *m, Menu_item *mi)
{
char buf[80];
panelitem_set(polyattr_panel, polyattr_name, LXPTEXT_VALUE, "", LXPTEXT_RDONLY, FALSE, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_hscale, LXPI_STATE, LXPI_INACTIVE, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_vscale, LXPI_STATE, LXPI_INACTIVE, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_rot, LXPI_STATE, LXPI_INACTIVE, LXPI_NULL);
if (ins_newobj == INS_LASTEDIT) {
ice_op= POLY_INSERTATTR;
XMapRaised(dpy, polyattr_frame);
return;
}
panelitem_set(polyattr_panel, polyattr_closure, LXPENUM_VALUE, POLYGON_CLOSED, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_bndmode, LXPENUM_VALUE, POLYGON_OPAQUEBNDM, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_bndwd, LXPI_STATE, LXPI_ACTIVE, LXPENUM_VALUE, POLYGON_GLOBALBNDWIDTH, LXPI_NULL);
(void) gconvert((double) gdf_bndwidth, 10, 0, buf);
panelitem_set(polyattr_panel, polyattr_bwidth, LXPI_STATE, LXPI_INACTIVE, LXPTEXT_VALUE, buf, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_bndcolor, LXPI_STATE, LXPI_ACTIVE, LXPENUM_VALUE, POLYGON_GLOBALBND, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_rbnd);
panelitem_set(polyattr_panel, polyattr_rbnd, LXPI_STATE, LXPI_INACTIVE, LXPTEXT_VALUE, buf, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_gbnd);
panelitem_set(polyattr_panel, polyattr_gbnd, LXPI_STATE, LXPI_INACTIVE, LXPTEXT_VALUE, buf, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_bbnd);
panelitem_set(polyattr_panel, polyattr_bbnd, LXPI_STATE, LXPI_INACTIVE, LXPTEXT_VALUE, buf, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_fillmode, LXPI_STATE, LXPI_ACTIVE, LXPENUM_VALUE, POLYGON_TRANSPARENTFILLM, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_fillcolor, LXPI_STATE, LXPI_INACTIVE, LXPENUM_VALUE, POLYGON_GLOBALFILL, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_rfill);
panelitem_set(polyattr_panel, polyattr_rfill, LXPI_STATE, LXPI_INACTIVE, LXPTEXT_VALUE, buf, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_gfill);
panelitem_set(polyattr_panel, polyattr_gfill, LXPI_STATE, LXPI_INACTIVE, LXPTEXT_VALUE, buf, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_bfill);
panelitem_set(polyattr_panel, polyattr_bfill, LXPI_STATE, LXPI_INACTIVE, LXPTEXT_VALUE, buf, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_clip, LXPTEXT_VALUE, "", LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_dtk, LXPENUM_VALUE, GROBJ_GLOBALDTK, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_rdtk);
panelitem_set(polyattr_panel, polyattr_rdtk, LXPTEXT_VALUE, buf, LXPI_STATE, LXPI_INACTIVE, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_gdtk);
panelitem_set(polyattr_panel, polyattr_gdtk, LXPTEXT_VALUE, buf, LXPI_STATE, LXPI_INACTIVE, LXPI_NULL);
(void) sprintf(buf, "%1d", gdf_bdtk);
panelitem_set(polyattr_panel, polyattr_bdtk, LXPTEXT_VALUE, buf, LXPI_STATE, LXPI_INACTIVE, LXPI_NULL);
panelitem_set(polyattr_panel, polyattr_seq, LXPTEXT_VALUE, "0", LXPI_NULL);
ice_op= POLY_INSERTATTR;
XMapRaised(dpy, polyattr_frame);
return;
}
void
polyinscont_proc(Panel *p, Panel_item *pi)
{
char *cptr, *name, *buf;
float bndwidth;
int cl, bndmode, bndwd, bnd, fillmode, fill, dtk, seq;
unsigned char rbnd, gbnd, bbnd;
unsigned char rfill, gfill, bfill;
char *pathnm;
Path *pth;
unsigned char rdtk, gdtk, bdtk;
unsigned long dtkpix;
char nmbuf[30];
char vbuf[LXADEF_MAXSTORE+1];
int val;
float fx, fy;
char xbuf[30], ybuf[30];
char errmsg[MAX_ERRMSGLEN+1];
Menu_item *delitem, *tritem, *attritem, *dmpitem;
Menu_item *cpitem, *cmpopitem;
XUnmapWindow(dpy, polyattr_frame);
ice_op= MAIN_MENU;
name= (char *) panelitem_get(polyattr_panel, polyattr_name, LXPTEXT_VALUE);
if (strlen(name) == 0) {
(void) sprintf(nmbuf, "UnnamedPolygon-%d", unnamed_polygons++);
name= nmbuf;
}
cl= *((int *) panelitem_get(polyattr_panel, polyattr_closure, LXPENUM_VALUE));
bndmode= *((int *) panelitem_get(polyattr_panel, polyattr_bndmode, LXPENUM_VALUE));
switch (bndmode) {
case POLYGON_OPAQUEBNDM:
bndwd= *((int *) panelitem_get(polyattr_panel, polyattr_bndwd, LXPENUM_VALUE));
switch (bndwd) {
case POLYGON_GLOBALBNDWIDTH:
bndwidth= gdf_bndwidth;
break;
case POLYGON_OTHERBNDWIDTH:
buf= (char *) panelitem_get(polyattr_panel, polyattr_bwidth, LXPTEXT_VALUE);
bndwidth= (float) strtod(buf, &cptr);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid boundary width value.", NONFATAL);
return;
}
if (bndwidth < 0.) {
ice_err("Boundary width value may not be less than 0.", NONFATAL);
return;
}
break;
}
bnd= *((int *) panelitem_get(polyattr_panel, polyattr_bndcolor, LXPENUM_VALUE));
switch (bnd) {
case POLYGON_GLOBALBND:
rbnd= gdf_rbnd;
gbnd= gdf_gbnd;
bbnd= gdf_bbnd;
break;
case POLYGON_BLACKBND:
rbnd= gbnd= bbnd= 0;
break;
case POLYGON_WHITEBND:
rbnd= gbnd= bbnd= 255;
break;
case POLYGON_OTHERBND:
buf= (char *) panelitem_get(polyattr_panel, polyattr_rbnd, LXPTEXT_VALUE);
rbnd= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid red boundary color value.", NONFATAL);
return;
}
if ((rbnd < 0) || (rbnd > 255)) {
ice_err("Invalid red boundary color value.", NONFATAL);
return;
}
buf= (char *) panelitem_get(polyattr_panel, polyattr_gbnd, LXPTEXT_VALUE);
gbnd= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid green boundary color value.", NONFATAL);
return;
}
if ((gbnd < 0) || (gbnd > 255)) {
ice_err("Invalid green boundary color value.", NONFATAL);
return;
}
buf= (char *) panelitem_get(polyattr_panel, polyattr_bbnd, LXPTEXT_VALUE);
bbnd= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid blue boundary color value.", NONFATAL);
return;
}
if ((bbnd < 0) || (bbnd > 255)) {
ice_err("Invalid blue boundary color value.", NONFATAL);
return;
}
break;
}
break;
case POLYGON_TRANSPARENTBNDM:
bndwd= POLYGON_GLOBALBNDWIDTH;
bndwidth= gdf_bndwidth;
bnd= POLYGON_GLOBALBND;
rbnd= gdf_rbnd;
gbnd= gdf_gbnd;
bbnd= gdf_bbnd;
break;
}
switch (cl) {
case POLYGON_CLOSED:
fillmode= *((int *) panelitem_get(polyattr_panel, polyattr_fillmode, LXPENUM_VALUE));
switch (fillmode) {
case POLYGON_TRANSPARENTFILLM:
fill= POLYGON_GLOBALFILL;
rfill= gdf_rfill;
gfill= gdf_gfill;
bfill= gdf_bfill;
break;
case POLYGON_OPAQUEFILLM:
fill= *((int *) panelitem_get(polyattr_panel, polyattr_fillcolor, LXPENUM_VALUE));
switch (fill) {
case POLYGON_GLOBALFILL:
rfill= gdf_rfill;
gfill= gdf_gfill;
bfill= gdf_bfill;
break;
case POLYGON_WHITEFILL:
rfill= gfill= bfill= 255;
break;
case POLYGON_BLACKFILL:
rfill= gfill= bfill= 0;
break;
case POLYGON_OTHERFILL:
buf= (char *) panelitem_get(polyattr_panel, polyattr_rfill, LXPTEXT_VALUE);
rfill= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid red fill color value.", NONFATAL);
return;
}
if ((rfill < 0) || (rfill > 255)) {
ice_err("Invalid red fill color value.", NONFATAL);
return;
}
buf= (char *) panelitem_get(polyattr_panel, polyattr_gfill, LXPTEXT_VALUE);
gfill= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid green fill color value.", NONFATAL);
return;
}
if ((gfill < 0) || (gfill > 255)) {
ice_err("Invalid green fill color value.", NONFATAL);
return;
}
buf= (char *) panelitem_get(polyattr_panel, polyattr_bfill, LXPTEXT_VALUE);
bfill= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid blue fill color value.", NONFATAL);
return;
}
if ((bfill < 0) || (bfill > 255)) {
ice_err("Invalid blue fill color value.", NONFATAL);
return;
}
break;
}
break;
}
break;
case POLYGON_OPEN:
fillmode= POLYGON_TRANSPARENTFILLM;
fill= POLYGON_GLOBALFILL;
rfill= gdf_rfill;
gfill= gdf_gfill;
bfill= gdf_bfill;
break;
}
pathnm= (char *) panelitem_get(polyattr_panel, polyattr_clip, LXPTEXT_VALUE);
if (strlen(pathnm) == 0)
pth= (Path *) NULL;
else {
for (pth= paths; pth != (Path *) NULL; pth= (Path *) pth->succ()) {
if (!strcmp(pathnm, pth->getname()))
break;
}
if (pth == (Path *) NULL) {
ice_err("Specified path does not exist.", NONFATAL);
return;
}
}
dtk= *((int *) panelitem_get(polyattr_panel, polyattr_dtk, LXPENUM_VALUE));
switch (dtk) {
case GROBJ_GLOBALDTK:
rdtk= gdf_rdtk;
gdtk= gdf_gdtk;
bdtk= gdf_bdtk;
break;
case GROBJ_WHITEDTK:
rdtk= gdtk= bdtk= 255;
break;
case GROBJ_BLACKDTK:
rdtk= gdtk= bdtk= 0;
break;
case GROBJ_OTHERDTK:
buf= (char *) panelitem_get(polyattr_panel, polyattr_rdtk, LXPTEXT_VALUE);
rdtk= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid red dump transparency key value.", NONFATAL);
return;
}
if ((rdtk < 0) || (rdtk > 255)) {
ice_err("Invalid red dump transparency key value.", NONFATAL);
return;
}
buf= (char *) panelitem_get(polyattr_panel, polyattr_gdtk, LXPTEXT_VALUE);
gdtk= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid dump transparency key green value.", NONFATAL);
return;
}
if ((gdtk < 0) || (gdtk > 255)) {
ice_err("Invalid green dump transparency key value.", NONFATAL);
return;
}
buf= (char *) panelitem_get(polyattr_panel, polyattr_bdtk, LXPTEXT_VALUE);
bdtk= (unsigned char) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid blue dump transparency key value.", NONFATAL);
return;
}
if ((bdtk < 0) || (bdtk > 255)) {
ice_err("Invalid blue dump transparency key value.", NONFATAL);
return;
}
break;
}
buf= (char *) panelitem_get(polyattr_panel, polyattr_seq, LXPTEXT_VALUE);
seq= (int) strtol(buf, &cptr, 10);
if ((cptr == buf) || (*cptr != '\0')) {
ice_err("Invalid sequence value.", NONFATAL);
return;
}
if ((new_poly= new Polygon((Dlnk **) &grobjs, name, seq)) == (Polygon *) NULL) {
ice_err("Cannot create polygon object.", NONFATAL);
return;
}
npolygons++;
(void) new_poly->setclosure(cl);
(void) new_poly->setboundary(bndmode, bndwd, bndwidth, bnd, rbnd, gbnd, bbnd);
(void) new_poly->setfill(fillmode, fill, rfill, gfill, bfill);
if (pth != (Path *) NULL)
(void) pth->setreferences(PATH_REFINCR);
new_poly->setclip(pth);
(void) new_poly->setdtk(dtk, rdtk, gdtk, bdtk);
if (pg_pixdepth == 1)
dtkpix= cmap_lookup(rdtk, gdtk, bdtk, 2);
else
dtkpix= cmap_lookup(rdtk, gdtk, bdtk, PSEUDOCOLOR_MAPSZ);
new_poly->setdtkpix(dtkpix);
ice_op= POLY_INSERTLOC;
if (pg_loc == PG_CURSORLOC) {
nvertices= 0;
xvert= yvert= (float *) NULL;
ixvert= iyvert= (int *) NULL;
ipp= 1./pg_dpi;
poly_drawn= pgcoords_drawn= crosshairs_drawn= FALSE;
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | PointerMotionMask);
return;
}
else {
if (alert_prompt(progname, dpy, &val,
LXA_TEXT, "Number of Vertices:", "", vbuf,
LXA_BUTTON, "Continue", 0,
LXA_BUTTON, "Abort", 1,
LXA_NULL) == LX_ERROR)
ice_err("Alert failure.", FATAL);
if (val == 1) {
poly_del(new_poly);
ice_op= MAIN_MENU;
return;
}
if (strlen(vbuf) == 0) {
ice_err("Number of vertices unspecified.", NONFATAL);
poly_del(new_poly);
ice_op= MAIN_MENU;
return;
}
loc_nvertices= (unsigned char) strtol(vbuf, &cptr, 10);
if ((cptr == vbuf) || (*cptr != '\0')) {
ice_err("Invalid number of vertices.", NONFATAL);
poly_del(new_poly);
ice_op= MAIN_MENU;
return;
}
if (loc_nvertices < 3) {
ice_err("There must be at least three vertices.", NONFATAL);
poly_del(new_poly);
ice_op= MAIN_MENU;
return;
}
if ((loc_xvertices= new float[loc_nvertices]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
poly_del(new_poly);
ice_op= MAIN_MENU;
return;
}
if ((loc_yvertices= new float[loc_nvertices]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
poly_del(new_poly);
ice_op= MAIN_MENU;
delete loc_xvertices;
return;
}
loc_vertex= 0;
}
if ((delitem= menuitem_create(LXMI_STRING, name,
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, delpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
ice_op= MAIN_MENU;
if (pg_loc == PG_TEXTLOC) {
delete loc_xvertices;
delete loc_yvertices;
}
return;
}
if ((attritem= menuitem_create(LXMI_STRING, name,
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, attrpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
ice_op= MAIN_MENU;
if (pg_loc == PG_TEXTLOC) {
delete loc_xvertices;
delete loc_yvertices;
}
return;
}
if ((tritem= menuitem_create(LXMI_STRING, name,
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, trpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
ice_op= MAIN_MENU;
if (pg_loc == PG_TEXTLOC) {
delete loc_xvertices;
delete loc_yvertices;
}
return;
}
if ((cpitem= menuitem_create(LXMI_STRING, name,
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, cppoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
ice_op= MAIN_MENU;
if (pg_loc == PG_TEXTLOC) {
delete loc_xvertices;
delete loc_yvertices;
}
return;
}
if ((dmpitem= menuitem_create(LXMI_STRING, name,
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, dmpobj_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
menuitem_destroy(cpitem);
ice_op= MAIN_MENU;
if (pg_loc == PG_TEXTLOC) {
delete loc_xvertices;
delete loc_yvertices;
}
return;
}
if ((cmpopitem= menuitem_create(LXMI_STRING, name,
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, cmpop_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
menuitem_destroy(cpitem);
menuitem_destroy(dmpitem);
ice_op= MAIN_MENU;
if (pg_loc == PG_TEXTLOC) {
delete loc_xvertices;
delete loc_yvertices;
}
return;
}
(void) menuitem_insert(delpoly_menu, delitem);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "All"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(attrpoly_menu, attritem);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(trpoly_menu, tritem);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(cppoly_menu, cpitem);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(dmppoly_menu, dmpitem);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(pg_menu, LXMI_STRING, "Composite"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(cmpoppoly_menu, cmpopitem);
loc_grobj= (Grobj *) new_poly;
panelitem_set(locattr_panel, locattr_lab, LXPI_STRING, "Vertex 1", LXPI_STATE, LXPI_ACTIVE, LXPI_NULL);
panelitem_set(locattr_panel, locattr_abort, LXPI_STATE, LXPI_INACTIVE, LXPI_NULL);
switch (pg_units) {
case PG_PIXELS:
case PG_POINTS:
case PG_INCHES:
panelitem_set(locattr_panel, locattr_x, LXPTEXT_VALUE, "0", LXPI_NULL);
panelitem_set(locattr_panel, locattr_y, LXPTEXT_VALUE, "0", LXPI_NULL);
break;
case PG_USER:
fx= (float) (-pg_xri*pg_hsi)+pg_xru;
fy= (float) (-pg_yri*pg_vsi)+pg_yru;
(void) sprintf(xbuf, "%4.2f", fx);
(void) sprintf(ybuf, "%4.2f", fy);
panelitem_set(locattr_panel, locattr_x, LXPTEXT_VALUE, xbuf, LXPI_NULL);
panelitem_set(locattr_panel, locattr_y, LXPTEXT_VALUE, ybuf, LXPI_NULL);
break;
}
XMapRaised(dpy, locattr_frame);
return;
}
void
insicepoly_rd(FILE *fp, int gdf, int newobj)
{
char *name;
float bndwidth, hscale, vscale, rot;
float fx, fy;
int nvertices, rvertices;
float *xvertices, *yvertices;
int cl, bndmode, bndwd, bnd, fillmode, fill, dtk, seq;
int len, ir, ig, ib;
unsigned char rbnd, gbnd, bbnd;
unsigned char rfill, gfill, bfill;
char *c, *pathnm;
Path *pth;
unsigned char rdtk, gdtk, bdtk;
unsigned long dtkpix;
int iot;
boolean endfound;
char nmbuf[30];
char errmsg[MAX_ERRMSGLEN+1];
Polygon *poly;
Menu_item *delitem, *tritem, *attritem, *dmpitem;
Menu_item *cpitem, *cmpopitem;
len= strlen(ice_iobuf+strlen("%%ICE-Poly: Begin "));
if (len == 0)
return;
*(ice_iobuf+strlen("%%ICE-Poly: Begin ")+len-1)= '\0';
if ((name= new char[len]) == (char *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
return;
}
(void) strcpy(name, ice_iobuf+strlen("%%ICE-Poly: Begin "));
if (!strncmp(name, "UnnamedPolygon-", strlen("UnnamedPolygon-"))) {
delete name;
(void) sprintf(nmbuf, "UnnamedPolygon-%d", unnamed_polygons++);
if ((name= new char[strlen(nmbuf)+1]) == (char *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
return;
}
(void) strcpy(name, nmbuf);
}
fx= fy= 0.;
hscale= vscale= 1.;
rot= 0.;
nvertices= 0;
xvertices= yvertices= (float *) NULL;
cl= POLYGON_CLOSED;
bndmode= POLYGON_OPAQUEBNDM;
bndwd= POLYGON_GLOBALBNDWIDTH;
bndwidth= gdf_bndwidth;
bnd= POLYGON_GLOBALBND;
rbnd= gdf_rbnd;
gbnd= gdf_gbnd;
bbnd= gdf_bbnd;
fillmode= POLYGON_TRANSPARENTFILLM;
fill= POLYGON_GLOBALFILL;
rfill= gdf_rfill;
gfill= gdf_gfill;
bfill= gdf_bfill;
pathnm= (char *) NULL;
pth= (Path *) NULL;
dtk= GROBJ_GLOBALDTK;
rdtk= gdf_rdtk;
gdtk= gdf_gdtk;
bdtk= gdf_bdtk;
seq= 0;
iot= GROBJ_NULLIOTAG;
endfound= FALSE;
while (fgets(ice_iobuf, INPUT_BUFSZ, fp) != (char *) NULL) {
insice_lineno++;
if (strncmp("%%ICE-", ice_iobuf, strlen("%%ICE-")))
continue;
if (!strncmp("%%ICE-Poly: Loc ", ice_iobuf, strlen("%%ICE-Poly: Loc "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Loc "), "%f %f", &fx, &fy) != 2) {
ice_err("Invalid polygon location value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
}
else if (!strncmp("%%ICE-Poly: Trans ", ice_iobuf, strlen("%%ICE-Poly: Trans "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Trans "), "%f %f %f", &rot, &hscale, &vscale) != 3) {
ice_err("Invalid polygon transform value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
}
else if (!strncmp("%%ICE-Poly: Cls ", ice_iobuf, strlen("%%ICE-Poly: Cls "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Cls "), "%d", &cl) != 1) {
ice_err("Invalid polygon closure value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((cl != POLYGON_CLOSED) &&
(cl != POLYGON_OPEN)) {
ice_err("Invalid polygon closure value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
}
else if (!strncmp("%%ICE-Poly: Vert ", ice_iobuf, strlen("%%ICE-Poly: Vert "))) {
if (nvertices != 0) {
ice_err("Too many polygon vertices specified.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Vert "), "%d", &nvertices) != 1) {
ice_err("Invalid polygon vertices value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (nvertices <= 0) {
ice_err("Invalid polygon vertices value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((xvertices= new float[nvertices]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete name;
delete pathnm;
return;
}
if ((yvertices= new float[nvertices]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete name;
delete xvertices;
delete pathnm;
return;
}
rvertices= 0;
}
else if (!strncmp("%%ICE-Poly: Vert+ ", ice_iobuf, strlen("%%ICE-Poly: Vert+ "))) {
if (nvertices == 0) {
ice_err("Unknown number of polygon vertices.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (rvertices == nvertices) {
ice_err("Too many polygon vertices specified.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Vert+ "), "%f %f", &(xvertices[rvertices]), &(yvertices[rvertices])) != 2) {
ice_err("Invalid polygon vertices value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
rvertices++;
}
else if (!strncmp("%%ICE-Poly: Bnd ", ice_iobuf, strlen("%%ICE-Poly: Bnd "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Bnd "), "%d %d %f %d %d %d %d", &bndmode, &bndwd, &bndwidth, &bnd, &ir, &ig, &ib) != 7) {
ice_err("Invalid polygon boundary value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((bndmode != POLYGON_OPAQUEBNDM) &&
(bndmode != POLYGON_TRANSPARENTBNDM)) {
ice_err("Invalid polygon boundary mode value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((bndwd != POLYGON_GLOBALBNDWIDTH) &&
(bndwd != POLYGON_OTHERBNDWIDTH)) {
ice_err("Invalid polygon boundary width value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (bndwidth < 0.) {
ice_err("Invalid polygon boundary width value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((bnd != POLYGON_GLOBALBND) &&
(bnd != POLYGON_BLACKBND) &&
(bnd != POLYGON_WHITEBND) &&
(bnd != POLYGON_OTHERBND)) {
ice_err("Invalid polygon boundary value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ir < 0) || (ir > 255)) {
ice_err("Invalid polygon red boundary value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ig < 0) || (ig > 255)) {
ice_err("Invalid polygon green boundary value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ib < 0) || (ib > 255)) {
ice_err("Invalid polygon blue boundary value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
rbnd= (unsigned char) ir;
gbnd= (unsigned char) ig;
bbnd= (unsigned char) ib;
}
else if (!strncmp("%%ICE-Poly: Fill ", ice_iobuf, strlen("%%ICE-Poly: Fill "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Fill "), "%d %d %d %d %d", &fillmode, &fill, &ir, &ig, &ib) != 5) {
ice_err("Invalid polygon fill value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((fillmode != POLYGON_TRANSPARENTFILLM) &&
(fillmode != POLYGON_OPAQUEFILLM)) {
ice_err("Invalid polygon fill mode value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((fill != POLYGON_GLOBALFILL) &&
(fill != POLYGON_WHITEFILL) &&
(fill != POLYGON_BLACKFILL) &&
(fill != POLYGON_OTHERFILL)) {
ice_err("Invalid polygon fill value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ir < 0) || (ir > 255)) {
ice_err("Invalid polygon red fill value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ig < 0) || (ig > 255)) {
ice_err("Invalid polygon green fill value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ib < 0) || (ib > 255)) {
ice_err("Invalid polygon blue fill value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
rfill= (unsigned char) ir;
gfill= (unsigned char) ig;
bfill= (unsigned char) ib;
}
else if (!strncmp("%%ICE-Poly: Clip ", ice_iobuf, strlen("%%ICE-Poly: Clip "))) {
c= ice_iobuf+strlen("%%ICE-Poly: Clip ");
for ( ; isspace(*c); c++);
len= strlen(c);
*(c+len-1)= '\0';
delete pathnm;
if ((pathnm= new char[len]) == (char *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
return;
}
(void) strcpy(pathnm, c);
}
else if (!strncmp("%%ICE-Poly: DTK ", ice_iobuf, strlen("%%ICE-Poly: DTK "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: DTK "), "%d %d %d %d", &dtk, &ir, &ig, &ib) != 4) {
ice_err("Invalid polygon DTK value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((dtk != GROBJ_GLOBALDTK) &&
(dtk != GROBJ_WHITEDTK) &&
(dtk != GROBJ_BLACKDTK) &&
(dtk != GROBJ_OTHERDTK)) {
ice_err("Invalid polygon DTK value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ir < 0) || (ir > 255)) {
ice_err("Invalid polygon red DTK value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ig < 0) || (ig > 255)) {
ice_err("Invalid polygon green DTK value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if ((ib < 0) || (ib > 255)) {
ice_err("Invalid polygon blue DTK value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
rdtk= (unsigned char) ir;
gdtk= (unsigned char) ig;
bdtk= (unsigned char) ib;
}
else if (!strncmp("%%ICE-Poly: Seq ", ice_iobuf, strlen("%%ICE-Poly: Seq "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: Seq "), "%d", &seq) != 1) {
ice_err("Invalid polygon sequence value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
}
else if (!strncmp("%%ICE-Poly: IOT ", ice_iobuf, strlen("%%ICE-Poly: IOT "))) {
if (sscanf(ice_iobuf+strlen("%%ICE-Poly: IOT "), "%d", &iot) != 1) {
ice_err("Invalid polygon tag value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (iot <= GROBJ_NULLIOTAG) {
ice_err("Invalid polygon tag value.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
}
else if (!strcmp("%%ICE-Poly: End\n", ice_iobuf)) {
endfound= TRUE;
break;
}
}
if (endfound == FALSE) {
ice_err("Polygon end not found.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (rvertices < nvertices) {
ice_err("Polygon vertices specification incomplete.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
if (pathnm != (char *) NULL) {
char *oldname, *newname;
Pathdup *duppth;
for (duppth= duppaths; duppth != (Pathdup *) NULL; duppth= (Pathdup *) duppth->succ()) {
duppth->getnames(&oldname, &newname);
if (!strcmp(pathnm, oldname)) {
delete pathnm;
if ((pathnm= new char[strlen(newname)+1]) == (char *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
return;
}
(void) strcpy(pathnm, newname);
break;
}
}
for (pth= paths; pth != (Path *) NULL; pth= (Path *) pth->succ()) {
if (!strcmp(pathnm, pth->getname()))
break;
}
if (pth == (Path *) NULL) {
ice_err("Specified path does not exist.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
delete pathnm;
return;
}
}
else
pth= (Path *) NULL;
delete pathnm;
if (gdf == INSICE_CURRGDF) {
switch (newobj) {
case INSICE_NEWOBJCURRGDF:
if (bndwd == POLYGON_GLOBALBNDWIDTH)
bndwidth= gdf_bndwidth;
if (bnd == POLYGON_GLOBALBND) {
rbnd= gdf_rbnd;
gbnd= gdf_gbnd;
bbnd= gdf_bbnd;
}
if (fill == POLYGON_GLOBALFILL) {
rfill= gdf_rfill;
gfill= gdf_gfill;
bfill= gdf_bfill;
}
if (dtk == GROBJ_GLOBALDTK) {
rdtk= gdf_rdtk;
gdtk= gdf_gdtk;
bdtk= gdf_bdtk;
}
break;
case INSICE_NEWOBJNEWGDF:
if (bndwd == POLYGON_GLOBALBNDWIDTH)
bndwd= POLYGON_OTHERBNDWIDTH;
if (bnd == POLYGON_GLOBALBND)
bnd= POLYGON_OTHERBND;
if (fill == POLYGON_GLOBALFILL)
fill= POLYGON_OTHERFILL;
if (dtk == GROBJ_GLOBALDTK)
dtk= GROBJ_OTHERDTK;
break;
}
}
if ((poly= new Polygon((Dlnk **) &grobjs, name, seq)) == (Polygon *) NULL) {
ice_err("Cannot create polygon object.", NONFATAL);
delete name;
delete xvertices;
delete yvertices;
return;
}
delete name;
npolygons++;
(void) poly->setclosure(cl);
(void) poly->setboundary(bndmode, bndwd, bndwidth, bnd, rbnd, gbnd, bbnd);
(void) poly->setfill(fillmode, fill, rfill, gfill, bfill);
poly->setfloc(fx, fy, (float) pg_dpi);
poly->setscale(hscale, vscale);
poly->setrotation(rot);
if (pth != (Path *) NULL)
(void) pth->setreferences(PATH_REFINCR);
poly->setclip(pth);
poly->setiotag(iot);
(void) poly->setdtk(dtk, rdtk, gdtk, bdtk);
if (pg_pixdepth == 1)
dtkpix= cmap_lookup(rdtk, gdtk, bdtk, 2);
else
dtkpix= cmap_lookup(rdtk, gdtk, bdtk, PSEUDOCOLOR_MAPSZ);
poly->setdtkpix(dtkpix);
poly->setvertices(nvertices, xvertices, yvertices);
if ((delitem= menuitem_create(LXMI_STRING, poly->getname(),
LXMI_CLIENTDATA, (char *) poly,
LXMI_PROC, delpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(poly);
return;
}
if ((attritem= menuitem_create(LXMI_STRING, poly->getname(),
LXMI_CLIENTDATA, (char *) poly,
LXMI_PROC, attrpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(poly);
menuitem_destroy(delitem);
return;
}
if ((tritem= menuitem_create(LXMI_STRING, poly->getname(),
LXMI_CLIENTDATA, (char *) poly,
LXMI_PROC, trpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
return;
}
if ((cpitem= menuitem_create(LXMI_STRING, poly->getname(),
LXMI_CLIENTDATA, (char *) poly,
LXMI_PROC, cppoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
return;
}
if ((dmpitem= menuitem_create(LXMI_STRING, poly->getname(),
LXMI_CLIENTDATA, (char *) poly,
LXMI_PROC, dmpobj_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
menuitem_destroy(cpitem);
return;
}
if ((cmpopitem= menuitem_create(LXMI_STRING, poly->getname(),
LXMI_CLIENTDATA, (char *) poly,
LXMI_PROC, cmpop_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
menuitem_destroy(cpitem);
menuitem_destroy(dmpitem);
return;
}
(void) menuitem_insert(delpoly_menu, delitem);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "All"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(attrpoly_menu, attritem);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(trpoly_menu, tritem);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(cppoly_menu, cpitem);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(dmppoly_menu, dmpitem);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(pg_menu, LXMI_STRING, "Composite"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(cmpoppoly_menu, cmpopitem);
return;
}
void
polyins_event(XEvent *event)
{
XButtonEvent *bevt;
XMotionEvent *mevt;
int vx, vy, x, y, i;
float fx, fy, *oxvert, *oyvert;
int *oixvert, *oiyvert;
Menu_item *delitem, *attritem;
Menu_item *tritem, *dmpitem;
Menu_item *cpitem, *cmpopitem;
void poly_drawoutline();
vx= *((int *) canvas_get(pg_canvas, LXC_XOFFSET));
vy= *((int *) canvas_get(pg_canvas, LXC_YOFFSET));
if (xvert == (float *) NULL) {
if ((xvert= new float[3]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((yvert= new float[3]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete xvert;
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((ixvert= new int[3]) == (int *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete xvert;
delete yvert;
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((iyvert= new int[3]) == (int *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete xvert;
delete yvert;
delete ixvert;
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
}
switch (event->type) {
case ButtonRelease:
if (!crosshairs_drawn)
return;
bevt= (XButtonEvent *) event;
x= bevt->x+vx;
y= bevt->y+vy;
if (poly_drawn) {
poly_drawoutline();
poly_drawn= FALSE;
}
if (pgcoords_drawn)
pg_erasecoords();
drawcrosshairs();
if (nvertices == 0) {
new_poly->setploc(x, pg_pixheight-1-y, (float) pg_dpi);
nvertices++;
xvert[0]= 0.;
yvert[0]= 0.;
xvorig= ipp*((float) x);
yvorig= ipp*((float) (pg_pixheight-1-y));
ixvert[0]= x;
iyvert[0]= y;
return;
}
else if (nvertices == 1) {
nvertices++;
xvert[1]= (ipp*((float) x))-xvorig;
yvert[1]= (ipp*((float) (pg_pixheight-1-y)))-yvorig;
ixvert[1]= x;
iyvert[1]= y;
return;
}
else if (bevt->button != Button3) {
oxvert= xvert;
oyvert= yvert;
oixvert= ixvert;
oiyvert= iyvert;
nvertices++;
if ((xvert= new float[nvertices+1]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete oxvert;
delete oyvert;
delete oixvert;
delete oiyvert;
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((yvert= new float[nvertices+1]) == (float *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete oxvert;
delete oyvert;
delete oixvert;
delete oiyvert;
delete xvert;
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((ixvert= new int[nvertices+1]) == (int *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete oxvert;
delete oyvert;
delete oixvert;
delete oiyvert;
delete xvert;
delete yvert;
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((iyvert= new int[nvertices+1]) == (int *) NULL) {
ice_err("Memory allocation error.", NONFATAL);
delete oxvert;
delete oyvert;
delete oixvert;
delete oiyvert;
delete xvert;
delete yvert;
delete ixvert;
poly_del(new_poly);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
for (i= 0; i < nvertices-1; i++) {
xvert[i]= oxvert[i];
yvert[i]= oyvert[i];
ixvert[i]= oixvert[i];
iyvert[i]= oiyvert[i];
}
xvert[nvertices-1]= (ipp*((float) x))-xvorig;
yvert[nvertices-1]= (ipp*((float) (pg_pixheight-1-y)))-yvorig;
ixvert[nvertices-1]= x;
iyvert[nvertices-1]= y;
delete oxvert;
delete oyvert;
delete oixvert;
delete oiyvert;
return;
}
XDefineCursor(dpy, pg_cwin, hg_cursor);
XSync(dpy, False);
nvertices++;
xvert[nvertices-1]= (ipp*((float) x))-xvorig;
yvert[nvertices-1]= (ipp*((float) (pg_pixheight-1-y)))-yvorig;
new_poly->setvertices(nvertices, xvert, yvert);
delete ixvert;
delete iyvert;
if ((delitem= menuitem_create(LXMI_STRING, new_poly->getname(),
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, delpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
XDefineCursor(dpy, pg_cwin, std_cursor);
XSync(dpy, False);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((attritem= menuitem_create(LXMI_STRING, new_poly->getname(),
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, attrpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
XDefineCursor(dpy, pg_cwin, std_cursor);
XSync(dpy, False);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((tritem= menuitem_create(LXMI_STRING, new_poly->getname(),
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, trpoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
XDefineCursor(dpy, pg_cwin, std_cursor);
XSync(dpy, False);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((cpitem= menuitem_create(LXMI_STRING, new_poly->getname(),
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, cppoly_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
XDefineCursor(dpy, pg_cwin, std_cursor);
XSync(dpy, False);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((dmpitem= menuitem_create(LXMI_STRING, new_poly->getname(),
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, dmpobj_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
menuitem_destroy(cpitem);
XDefineCursor(dpy, pg_cwin, std_cursor);
XSync(dpy, False);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
if ((cmpopitem= menuitem_create(LXMI_STRING, new_poly->getname(),
LXMI_CLIENTDATA, (char *) new_poly,
LXMI_PROC, cmpop_proc,
LXMI_NULL)) == (Menu_item *) NULL) {
ice_err("Internal toolkit error.", NONFATAL);
poly_del(new_poly);
menuitem_destroy(delitem);
menuitem_destroy(attritem);
menuitem_destroy(tritem);
menuitem_destroy(cpitem);
menuitem_destroy(dmpitem);
XDefineCursor(dpy, pg_cwin, std_cursor);
XSync(dpy, False);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
}
(void) menuitem_insert(delpoly_menu, delitem);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "All"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(attrpoly_menu, attritem);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(trpoly_menu, tritem);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(cppoly_menu, cpitem);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(dmppoly_menu, dmpitem);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(pg_menu, LXMI_STRING, "Composite"), LXMI_STATE, LXMI_ACTIVE, LXMI_NULL);
(void) menuitem_insert(cmpoppoly_menu, cmpopitem);
pg_draw();
XDefineCursor(dpy, pg_cwin, std_cursor);
XSync(dpy, False);
XSelectInput(dpy, pg_cwin, ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
ice_op= MAIN_MENU;
return;
case ButtonPress:
bevt= (XButtonEvent *) event;
x= bevt->x+vx;
y= bevt->y+vy;
fx= ipp*((float) x);
fy= ipp*((float) (pg_pixheight-1-y));
if (nvertices == 0)
new_poly->setploc(x, pg_pixheight-1-y, (float) pg_dpi);
else {
xvert[nvertices]= fx-xvorig;
yvert[nvertices]= fy-yvorig;
}
break;
case MotionNotify:
mevt= (XMotionEvent *) event;
x= mevt->x+vx;
y= mevt->y+vy;
fx= ipp*((float) x);
fy= ipp*((float) (pg_pixheight-1-y));
if (nvertices == 0)
new_poly->setploc(x, pg_pixheight-1-y, (float) pg_dpi);
else {
xvert[nvertices]= fx-xvorig;
yvert[nvertices]= fy-yvorig;
}
break;
default:
return;
}
if (crosshairs_drawn)
drawcrosshairs();
if (poly_drawn)
poly_drawoutline();
if (nvertices > 0) {
ixvert[nvertices]= x;
iyvert[nvertices]= y;
poly_drawoutline();
poly_drawn= TRUE;
}
pg_showcoords(x-vx+1, y-vy+1, -1, -1, fx, fy, x, pg_pixheight-1-y);
crosshairs_x= x;
crosshairs_y= y;
drawcrosshairs();
return;
}
void
delpoly_proc(Menu *m, Menu_item *mi)
{
Polygon *poly;
Menu_item *item;
if ((poly= (Polygon *) menuitem_get(mi, LXMI_CLIENTDATA)) == (Polygon *) NULL) {
ice_err("Cannot locate selected polygon object.", NONFATAL);
return;
}
if ((ice_op != CMP_DELETE) && (ice_op != DELETE_ALL)) {
XDefineCursor(dpy, pg_cwin, hg_cursor);
XSync(dpy, False);
}
poly_del(poly);
menuitem_delete(m, mi);
menuitem_destroy(mi);
item= menuitem_find(attrpoly_menu, LXMI_CLIENTDATA, (char *) poly);
menuitem_delete(attrpoly_menu, item);
menuitem_destroy(item);
item= menuitem_find(trpoly_menu, LXMI_CLIENTDATA, (char *) poly);
menuitem_delete(trpoly_menu, item);
menuitem_destroy(item);
item= menuitem_find(cppoly_menu, LXMI_CLIENTDATA, (char *) poly);
menuitem_delete(cppoly_menu, item);
menuitem_destroy(item);
item= menuitem_find(dmppoly_menu, LXMI_CLIENTDATA, (char *) poly);
menuitem_delete(dmppoly_menu, item);
menuitem_destroy(item);
item= menuitem_find(cmpoppoly_menu, LXMI_CLIENTDATA, (char *) poly);
menuitem_delete(cmpoppoly_menu, item);
menuitem_destroy(item);
if (npolygons == 0) {
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Polygon"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
}
if (grobjs == (Grobj *) NULL) {
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(del_menu, LXMI_STRING, "All"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(attr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(tr_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(cp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(dmp_menu, LXMI_STRING, "Select"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
(void) menuitem_set(menuitem_find(pg_menu, LXMI_STRING, "Composite"), LXMI_STATE, LXMI_INACTIVE, LXMI_NULL);
}
if ((ice_op != CMP_DELETE) && (ice_op != DELETE_ALL)) {
pg_draw();
XSync(dpy, False);
XDefineCursor(dpy, pg_cwin, std_cursor);
}
return;
}
void
poly_del(Polygon *poly)
{
if (grobjs == poly) {
if (poly->succ() == (Dlnk *) NULL)
grobjs= (Grobj *) NULL;
else
grobjs= (Grobj *) poly->succ();
}
poly->unlink();
delete poly;
npolygons--;
return;
}
void
poly_drawoutline()
{
int vx, vy;
int x0, x1, y0, y1, i;
vx= *((int *) canvas_get(pg_canvas, LXC_XOFFSET));
vy= *((int *) canvas_get(pg_canvas, LXC_YOFFSET));
x0= ixvert[0];
y0= iyvert[0];
for (i= 1; i < nvertices+1; i++, x0= x1, y0= y1) {
x1= ixvert[i];
y1= iyvert[i];
XDrawLine(dpy, pg_cpm, pg_xgc, x0, y0, x1, y1);
XDrawLine(dpy, pg_cwin, pg_xgc, x0-vx, y0-vy, x1-vx, y1-vy);
}
if ((nvertices > 1) && (new_poly->getclosure() == POLYGON_CLOSED)) {
XDrawLine(dpy, pg_cpm, pg_xgc, ixvert[0], iyvert[0], x1, y1);
XDrawLine(dpy, pg_cwin, pg_xgc, ixvert[0]-vx, iyvert[0]-vy, x1-vx, y1-vy);
}
return;
}
| [
"ian@darwinsys.com"
] | ian@darwinsys.com |
9ed8e6c947eb0ca23454c65d7366533f600879d2 | d0fb46aecc3b69983e7f6244331a81dff42d9595 | /quickbi-public/include/alibabacloud/quickbi-public/model/DeleteDataLevelPermissionRuleUsersResult.h | 87b97916e87fee0c9fbce2b9a03066896ad67eb9 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-cpp-sdk | 3d8d051d44ad00753a429817dd03957614c0c66a | e862bd03c844bcb7ccaa90571bceaa2802c7f135 | refs/heads/master | 2023-08-29T11:54:00.525102 | 2023-08-29T03:32:48 | 2023-08-29T03:32:48 | 115,379,460 | 104 | 82 | NOASSERTION | 2023-09-14T06:13:33 | 2017-12-26T02:53:27 | C++ | UTF-8 | C++ | false | false | 1,613 | h | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_DELETEDATALEVELPERMISSIONRULEUSERSRESULT_H_
#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_DELETEDATALEVELPERMISSIONRULEUSERSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/quickbi-public/Quickbi_publicExport.h>
namespace AlibabaCloud
{
namespace Quickbi_public
{
namespace Model
{
class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT DeleteDataLevelPermissionRuleUsersResult : public ServiceResult
{
public:
DeleteDataLevelPermissionRuleUsersResult();
explicit DeleteDataLevelPermissionRuleUsersResult(const std::string &payload);
~DeleteDataLevelPermissionRuleUsersResult();
bool getSuccess()const;
bool getResult()const;
protected:
void parse(const std::string &payload);
private:
bool success_;
bool result_;
};
}
}
}
#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_DELETEDATALEVELPERMISSIONRULEUSERSRESULT_H_ | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
13e2f7047aaab790e32f896100bc402c17d21276 | dc00fd123651cb93b38773ccf8808910bde600d9 | /pro3/BST.h | 18a6aa6c1a8aedacd19c4a5d3d0ba8b9ed00536d | [] | no_license | anhduy09/project3_cpp201 | ab39a289fe1057bbe481e643db3f330f272dbfe9 | 53cf15612c49b1959936debdd9b22eb9949125b1 | refs/heads/master | 2023-04-18T14:09:19.843497 | 2021-05-05T23:48:41 | 2021-05-05T23:48:41 | 364,732,750 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 767 | h | #pragma once
#ifndef BST_H_
#define BST_H_
#include<iostream>
#include "Setting.h"
class BST {
private:
struct node {
Setting* data;
node* left;
node* right;
};
node* root;
void InsertNodePrivate(Setting* data, node* ptr);
void SaveDataOfNodesPrivate(node* ptr, ofstream& file);
node* searchNodeInKeyPrivate(string key, node* ptr);
int sizeTreePrivate(node* ptr);
void inorder_print(int type, node* leaf);
void searchNodeInnamePrivate(string name, node* ptr);
vector<node*> v;
public:
BST();
~BST();
node* createLeaf(Setting* data);
void InsertNode(Setting* data);
void SaveDataOfNodes();
node* searchNodeInKey(string key);
vector<node*> searchNodeInName(string name);
int sizeTree();
void inorder_print(int type);
};
#endif // !BST_H_
| [
"anhduys2v@gmail.com"
] | anhduys2v@gmail.com |
f12527574983933517885c55f6e3657fe08c84e3 | 3a22ae3c54dac5ee9770f3ce3c95fb9348dc61b6 | /classifier.cpp | dcabc88d7b64229880f68f9c330cb4d10dd3af23 | [] | no_license | bbbruno/HMPdetector | 7b4c651e5df81d6ded08ee79618b32860cef27a8 | 42841da3ddf6dfeeb3224130e640c3f3db754d9f | refs/heads/master | 2021-01-10T13:22:43.476690 | 2016-02-09T19:17:46 | 2016-02-09T19:17:46 | 51,315,558 | 2 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 18,236 | cpp | //===============================================================================//
// Name : classifier.hpp
// Author(s) : Barbara Bruno, Antonello Scalmato
// Affiliation : University of Genova, Italy - dept. DIBRIS
// Version : 2.0
// Description : Human Motion Primitives classifier module (on-line / off-line)
//===============================================================================//
#include <fstream>
#include "classifier.hpp"
#include "libs/SerialStream.h"
using namespace arma;
using namespace boost::posix_time;
//! constructor with variables initialization
//! @param[in] HMPn name of the motion primitive (within the dataset)
//! @param[in] gW weight of gravity feature for classification
//! @param[in] bW weight of body acc. feature for classification
//! @param[in] th max distance for possible motion occurrence
DYmodel::DYmodel(string HMPn, float gW, float bW, float th)
{
// initialize the class variables
cout<<"Loading model: " <<HMPn <<"...";
HMPname = HMPn;
gravityWeight = gW;
bodyWeight = bW;
threshold = th;
// load the model (initialization of gP, gS, bP, bS)
bP = loadMu(HMPname, "Body"); //DEBUG: cout<<"MuBody-";
bS = loadSigma(HMPname, "Body"); //DEBUG: cout<<"SigmaBody-";
gP = loadMu(HMPname, "Gravity"); //DEBUG: cout<<"MuGravity-";
gS = loadSigma(HMPname, "Gravity"); //DEBUG: cout<<"SigmaGravity-";
// compute the size of the model
size = gP.n_cols;
cout<<"DONE"<<endl;
}
//! print model information
void DYmodel::printInfo()
{
cout<<"DYmodel object information:" <<endl;
cout<<"HMPname = " <<HMPname <<endl;
cout<<"gravityWeight = " <<gravityWeight <<endl;
cout<<"bodyWeight = " <<bodyWeight <<endl;
cout<<"threshold = " <<threshold <<endl;
cout<<"size = " <<size <<endl;
}
//!\todo replace C-style reading from file with fstream
//! load the expected points (Mu) of one feature
//! @param[in] HMPname name of the model (within the dataset)
//! @param[in] component name of the feature
//! @return matrix of the expected points of the feature
mat DYmodel::loadMu(string HMPname, string component)
{
int row;
int col;
string fileName = HMPname + "Mu" + component + ".txt";
FILE *pf = fopen(fileName.c_str(), "r");
fscanf(pf, "%d,%d\n", &col, &row);
mat mod = zeros<mat>(row, col);
for (int r = 0; r < row; r++)
{
int c;
float fr;
for (c = 0; c < col - 1; c++)
{
fscanf(pf, "%f,", &fr);
mod(r, c) = fr;
}
fscanf(pf, "%f\n", &fr);
mod(r, c) = fr;
}
mod = mod.t();
fclose(pf);
return mod;
}
//!\todo replace C-style reading from file with fstream
//! load the expected variances (Sigma) of one feature
//! @param[in] HMPname name of the model (within the dataset)
//! @param[in] component name of the feature
//! @return matrix of the expected variances of the feature
cube DYmodel::loadSigma(string HMPname, string component)
{
int row;
int col;
int slice;
string fileName = HMPname + "Sigma" + component + ".txt";
FILE *pf = fopen(fileName.c_str(), "r");
fscanf(pf, "%d,%d,%d\n", &row, &col, &slice);
cube mod = zeros<cube>(row, col, slice);
for (int s = 0; s < slice; s++)
{
for (int r = 0; r < row; r++)
{
int c;
float fr;
for (c = 0; c < col - 1; c++)
{
fscanf(pf, "%f,", &fr);
mod(r, c, s) = fr;
}
fscanf(pf, "%f\n", &fr);
mod(r, c, s) = fr;
}
}
fclose(pf);
return mod;
}
//! set all the model variables and load the model
//! @param[in] HMPn name of the motion primitive (within the dataset)
//! @param[in] gW weight of gravity feature for classification
//! @param[in] bW weight of body acc. feature for classification
//! @param[in] th max distance for possible motion occurrence
void DYmodel::build(string HMPn, float gW, float bW, float th)
{
// initialize the class variables
cout<<"Loading model: " <<HMPn <<"...";
HMPname = HMPn;
gravityWeight = gW;
bodyWeight = bW;
threshold = th;
// load the model (initialization of gP, gS, bP, bS)
bP = loadMu(HMPname, "Body"); //DEBUG: cout<<"MuBody-";
bS = loadSigma(HMPname, "Body"); //DEBUG: cout<<"SigmaBody-";
gP = loadMu(HMPname, "Gravity"); //DEBUG: cout<<"MuGravity-";
gS = loadSigma(HMPname, "Gravity"); //DEBUG: cout<<"SigmaGravity-";
// compute the size of the model
size = gP.n_cols;
cout<<"DONE"<<endl;
}
//! constructor
//! @param[in] dF folder containing the modelling dataset
//! @param[in] dev driver for the device used for the dataset collection
//! @param[in] p interface for the publishing middleware
Classifier::Classifier(string dF, Device* dev, Publisher* p)
{
string one_HMPn;
float one_gW;
float one_bW;
float one_th;
DYmodel *one_model;
datasetFolder = "./Models/" + dF + "/";
driver = dev;
//DEBUG:driver->printInfo();
pub = p;
pub->printInfo();
string fileName = datasetFolder + "Classifierconfig.txt";
//DEBUG:cout<<"config file: " <<fileName <<endl;
ifstream configFile(fileName.c_str());
configFile >>nbM;
//DEBUG:cout<<"nbM: " <<nbM <<endl;
for(int i=0; i< nbM; i++)
{
configFile>>one_HMPn >>one_gW >>one_bW >>one_th;
one_HMPn = datasetFolder + one_HMPn;
//DEBUG:cout<<"DYmodel: " <<one_HMPn <<endl;
one_model = new DYmodel(one_HMPn, one_gW, one_bW, one_th);
//DEBUG:one_model->printInfo();
set.push_back(*one_model);
}
configFile.close();
// compute the size of the window
cout<<"HMP models loaded. Defining window size as: ";
int temp_ws = set[0].size;
for(int i=1; i< nbM; i++)
{
if(set[i].size > temp_ws)
temp_ws = set[i].size;
}
window_size = temp_ws;
cout<<window_size <<endl;
// publish the static information (number & names of models)
publishStatic();
}
//! print set information
void Classifier::printSetInfo()
{
for(int i=0; i<nbM; i++)
set[i].printInfo();
}
//! create a window of samples
//! @param[in] &one_sample reference to the sample to be added to the window
//! @param[in,out] &window reference to the window
//! @param[in] &N reference to the size of the window
//! @param[in,out] &numWritten reference to the number of samples in the window
void Classifier::createWindow(mat &one_sample, mat &window, int &N, int &numWritten)
{
// update the window content
if (numWritten < N)
{
window.row(numWritten) = one_sample.row(0);
numWritten = numWritten + 1;
}
else
{
for (int i = 0; i < N - 1; i++)
window.row(i) = window.row(i + 1);
window.row(N - 1) = one_sample;
numWritten = numWritten + 1;
}
}
//! get gravity and body acc. components of the window
//! @param[in] &window reference to the window
//! @param[out] &gravity reference to the gravity comp. extracted from the window
//! @param[out] &body reference to the body acc. comp. extracted from the window
void Classifier::analyzeWindow(mat &window, mat &gravity, mat &body)
{
// perform median filtering to reduce the noise
int n = 3;
mat clean_window = window.t();
medianFilter(clean_window, n);
clean_window = clean_window.t();
// discriminate between gravity and body acc. components
mat tempgr = clean_window.t();
gravity = ChebyshevFilter(tempgr);
gravity = gravity.t();
body = clean_window - gravity;
}
//! compute (trial)point-to-(model)point Mahalanobis distance
//! @param[in] index index of the points (in trial and model) to be compared
//! @param[in] &trial reference to the trial
//! @param[in] &model reference to the model
//! @param[in] &variance reference to the model variance
//! @return Mahalanobis distance between trial-point and model-point
float Classifier::mahalanobisDist(int index,mat &trial,mat &model,cube &variance)
{
mat difference = trial.col(index) - model.col(index);
mat distance = (difference.t() * (variance.slice(index)).i()) * difference;
return distance(0,0);
}
//! compute the overall distance between the trial and one model
//! @param[in] &Tgravity reference to the gravity component of the trial
//! @param[in] &Tbody reference to the body acc. component of the trial
//! @param[in] &MODEL reference to the model
//! @return Mahalanobis overall distance between trial and model
float Classifier::compareOne(mat &Tgravity, mat &Tbody, DYmodel &MODEL)
{
// extract the subwindow of interest from the trial (same size of the model)
mat gravity = Tgravity.rows(0, MODEL.size-1);
mat body = Tbody.rows(0, MODEL.size-1);
// acquire the relevant data from the model class
mat MODELgP = MODEL.gP;
cube MODELgS = MODEL.gS;
mat MODELbP = MODEL.bP;
cube MODELbS = MODEL.bS;
// discard the "time" row from the models
int numPoints = MODELgS.n_slices;
gravity = gravity.t();
body = body.t();
mat reference_G = zeros<mat>(3, MODELgP.n_cols);
mat reference_B = zeros<mat>(3, MODELbP.n_cols);
for (int i = 0; i < 3; i++)
{
reference_G.row(i) = MODELgP.row(i + 1);
reference_B.row(i) = MODELbP.row(i + 1);
}
// compute the components distances (gravity; body acc.)
mat dist = zeros<mat>(numPoints,2);
for (int i = 0; i < numPoints; i++)
{
dist(i,0) = mahalanobisDist(i, gravity, reference_G, MODELgS);
dist(i,1) = mahalanobisDist(i, body, reference_B, MODELbS);
}
// compute the overall distance
float distanceG = mean(dist.col(0));
float distanceB = mean(dist.col(1));
float overall = (MODEL.gravityWeight*distanceG)+(MODEL.bodyWeight*distanceB);
return overall;
}
//! compute the matching possibility of all the models
//! @param[in] &gravity reference to the gravity component of the trial
//! @param[in] &body reference to the body acc. component of the trial
//! @param[out] &possibilities reference to the models possibilities
void Classifier::compareAll(mat &gravity,mat &body, vector<float> &possibilities)
{
float distance[nbM];
// compare the features of the trial with those of each model
for(int i = 0; i < nbM; i++)
{
distance[i] = compareOne(gravity, body, set[i]);
//DEBUG: cout<<distance[i] <<endl;
}
// compute the possibilities from the trial_to_model distances
for(int i = 0; i < nbM; i++)
{
possibilities[i] = 1 - (distance[i] / set[i].threshold);
if (possibilities[i] < 0)
possibilities[i] = 0;
}
}
//! set all the classifier variables and load the models
//! @param[in] dF name of the dataset to be loaded
//! @param[in] dev driver for the device used for the dataset collection
//! @param[in] p interface for the publishing middleware
void Classifier::buildSet(string dF, Device* dev, Publisher* p)
{
string one_HMPn;
float one_gW;
float one_bW;
float one_th;
DYmodel *one_model;
// delete the existing models
set.clear();
// load the new set of models
datasetFolder = "./Models/" + dF + "/";
driver = dev;
//DEBUG:driver->printInfo();
pub = p;
pub->printInfo();
string fileName = datasetFolder + "Classifierconfig.txt";
//DEBUG:cout<<"config file: " <<fileName <<endl;
ifstream configFile(fileName.c_str());
configFile >>nbM;
//DEBUG:cout<<"nbM: " <<nbM <<endl;
for(int i=0; i< nbM; i++)
{
configFile>>one_HMPn >>one_gW >>one_bW >>one_th;
one_HMPn = datasetFolder + one_HMPn;
//DEBUG:cout<<"DYmodel: " <<one_HMPn <<endl;
one_model = new DYmodel(one_HMPn, one_gW, one_bW, one_th);
//DEBUG:one_model->printInfo();
set.push_back(*one_model);
}
configFile.close();
// compute the size of the window
cout<<"HMP models loaded. Defining window size as: ";
int temp_ws = set[0].size;
for(int i=1; i< nbM; i++)
{
if(set[i].size > temp_ws)
temp_ws = set[i].size;
}
window_size = temp_ws;
cout<<window_size <<endl;
// publish the static information (number & names of models)
publishStatic();
}
//! test one file (off-line)
//! @param[in] testFile name of the test file
//! @param[in] resultFile name of the result file
void Classifier::singleTest(string testFile, string resultFile)
{
int nSamples = 0; // number of samples acquired by the system
mat actualSample; // current sample in matrix format
vector<float> possibilities; // models possibilities
mat window = zeros<mat>(window_size, 3);
mat gravity = zeros<mat>(window_size, 3);
mat body = zeros<mat>(window_size, 3);
// initialize the possibilities
for (int i = 0; i < nbM; i++)
possibilities.push_back(0);
// create result file
ofstream outputFile;
outputFile.open(resultFile.c_str());
// read recorded data
ifstream tf(testFile.c_str());
cout <<"Reading trial: " <<testFile <<endl;
for (string line; std::getline(tf, line); )
{
//DEBUG:cout<<"Line: " <<line <<endl;
actualSample = driver->extractActual(line);
createWindow(actualSample, window, window_size, nSamples);
if (nSamples >= window_size)
{
analyzeWindow(window, gravity, body);
compareAll(gravity, body, possibilities);
// report the possibility values in the results file
for (int i = 0; i < nbM; i++)
outputFile<<possibilities[i] <<" ";
outputFile<<endl;
}
}
tf.close();
outputFile.close();
}
//! validate one model with given validation trials
//! @param[in] model name of the model to be validated
//! @param[in] dataset name of the referring dataset
//! @param[in] numTrials number of validation trials to be used
void Classifier::validateModel(string model, string dataset, int numTrials)
{
// analyze all validating trials one by one
for (int i = 0; i < numTrials; i++)
{
stringstream itos;
itos<<i+1;
string trial = model + "_test (" + itos.str() + ").txt";
string tf = "Validation/" + dataset + "/" + trial;
string rf = "Results/" + dataset + "/res_" + trial;
singleTest(tf, rf);
}
}
//! test one recorded file
//! @param[in] testFile name of the test file
void Classifier::longTest(string testFile)
{
string tf = "Validation/longTest/" + testFile;
string rf = "Results/longTest/res_" + testFile;
singleTest(tf, rf);
}
//! publish the static information (loaded HMPs)
void Classifier::publishStatic()
{
// HMP.numModels
stringstream ntos;
ntos<<nbM;
const char* sNumModels = ntos.str().c_str();
pub->publish("numModels", sNumModels);
//DEBUG: cout<<"numModels: " <<sNumModels <<endl;
//HMP.nameModels
string short_name;
string allNames;
int nRemove = datasetFolder.size();
for(int i=0; i<nbM; i++)
{
short_name = set[i].HMPname.erase(0,nRemove);
//DEBUG: cout<<short_name <<endl;
allNames = allNames + short_name + " ";
}
const char* sNameModels = allNames.c_str();
pub->publish("nameModels", sNameModels);
//DEBUG: cout<<"nameModels: " <<sNameModels <<endl;
}
//! publish the dynamic information (recognition results)
//! @param[in] &possibilities reference to the models possibilities
void Classifier::publishDynamic(vector<float> &possibilities)
{
// HMP.possibilities
string p;
for(int i=0; i<nbM; i++)
{
stringstream ptos;
ptos<<possibilities[i];
p = p + " " + ptos.str();
}
const char* sPossibilities = p.c_str();
pub->publish("possibilities", sPossibilities);
//DEBUG: cout<<"possibilities: " <<sPossibilities <<endl;
// identify the models with highest and second-highest possibility
int best = 0;
int secondBest = 0;
for (int i = 1; i < nbM; i++)
{
if (possibilities[i] > possibilities[best])
{
secondBest = best;
best = i;
}
else if (possibilities[i] > possibilities[secondBest])
secondBest = i;
}
if (possibilities[best] == 0)
best = -1;
if (possibilities[secondBest] == 0)
secondBest = -1;
// HMP.highest
string highest;
if (best == -1)
highest = "NONE";
else
highest = set[best].HMPname;
const char* sHighest = highest.c_str();
pub->publish("highest", sHighest);
//DEBUG: cout<<"highest: " <<sHighest <<endl;
// HMP.other
float other;
if (best == -1)
other = 1;
else
other = 1 - possibilities[best];
stringstream str_other;
str_other<<other;
const char* sOther = str_other.str().c_str();
pub->publish("other", sOther);
//DEBUG: cout<<"highest: " <<sHighest <<" other: " <<sOther <<endl;
// HMP.entropy
float entropy;
if (best == -1)
entropy = -1;
else if (secondBest == -1)
entropy = possibilities[best];
else
entropy = possibilities[best] - possibilities[secondBest];
stringstream str_entropy;
str_entropy<<entropy;
const char* sEntropy = str_entropy.str().c_str();
pub->publish("entropy", sEntropy);
//DEBUG: cout<<"highest: " <<sHighest <<" entropy: " <<sEntropy <<endl;
}
/*
//! classify real-time raw acceleration samples acquired via USB
//! @param port: USB port for data acquisition
//! @return: ---
void Classifier::onlineTest(char* port)
{
int nSamples = 0; // number of samples acquired by the system
string sample; // current sample acquired via USB
mat actsample; // current sample in matrix format
int ax, ay, az; // accelerometer current sample components
int gx, gy, gz; // gyroscope current sample components
char dev; // flag --> device type
string motion; // flag --> level of motion at the wrist
vector<float> possibilities; // models possibilities
mat window = zeros<mat>(window_size, 3);
mat gravity = zeros<mat>(window_size, 3);
mat body = zeros<mat>(window_size, 3);
// initialize the possibilities
for (int i = 0; i < nbM; i++)
possibilities.push_back(0);
// set up the serial communication (read-only)
SerialOptions options;
options.setDevice(port);
options.setBaudrate(9600);
options.setTimeout(seconds(1));
options.setParity(SerialOptions::noparity);
options.setCsize(8);
options.setFlowControl(SerialOptions::noflow);
options.setStopBits(SerialOptions::one);
SerialStream serial(options);
serial.exceptions(ios::badbit | ios::failbit);
// classify the stream of raw acceleration & gyroscope data
while(1)
{
try
{
// read the current sample
getline(serial,sample);
istringstream stream(sample);
stream >>dev >>ax >> ay >>az >>gx >>gy >>gz >>motion;
actsample <<ax <<ay <<az;
//DEBUG: cout<<"Acquired: " <<ax <<" " <<ay <<" " <<az <<" ";
// update the window of samples to be analyzed
createWindow(actsample, window, window_size, nSamples);
if (nSamples >= window_size)
{
// analyze the window and compute the models possibilities
analyzeWindow(window, gravity, body);
compareAll(gravity, body, possibilities);
// publish the dynamic tuples
publishDynamic(possibilities);
}
}
catch(TimeoutException&)
{
serial.clear();
cerr<<"Timeout occurred"<<endl;
}
}
}
*/ | [
"barbara.bruno@unige.it"
] | barbara.bruno@unige.it |
fdece5073f7adc86dc49e7c16c732e280adbb682 | 549b4ab273783948226793c34dd73859a65d1865 | /main.cpp | 71469f277eeaf64dbe8eee848d001d747736b6e8 | [] | no_license | daniel1302/CMakeLists | bd5ea96a6fabd5c403eacf76ee3a0bcbf764e4ef | 5d47326445e1f93f3c6c03e0913c5e62dc886b1e | refs/heads/master | 2022-01-05T20:16:12.743151 | 2019-07-21T15:29:15 | 2019-07-21T15:29:15 | 198,044,879 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 96 | cpp | #include <iostream>
int main()
{
std::cout<<"Some application entrypoint";
return 0;
}
| [
"daniel.1302@gmail.com"
] | daniel.1302@gmail.com |
75cde209bd2d6802c74a53c25aec69947bc7eb60 | c1169590b1e2e19d496586604680734544845cb7 | /AutobioCompUnreal/Source/AutobioCompUnreal/AutobioCompUnreal.cpp | b1a49c4ccddd82ef6360ed3b8fbe45d210818622 | [] | no_license | reiito/Autobiographical-Compendium | ca607575541448c027e786d267a376e927c93d5d | 85d81d73e8b0ffab75f5d79bf8a6004339dd14fc | refs/heads/master | 2023-07-19T16:20:41.782368 | 2021-09-19T01:54:39 | 2021-09-19T01:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 244 | cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "AutobioCompUnreal.h"
#include "Modules/ModuleManager.h"
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, AutobioCompUnreal, "AutobioCompUnreal" );
| [
"Rei Ito99@gmail.com"
] | Rei Ito99@gmail.com |
8be99e1b56ba3a793ba0078fdffe285a1085aa79 | 3a64d611b73e036ad01d0a84986a2ad56f4505d5 | /chrome/browser/ui/app_list/search/files/item_suggest_cache.cc | 8affcce6bda507f7a58991f154db6785868b3cdd | [
"BSD-3-Clause"
] | permissive | ISSuh/chromium | d32d1fccc03d7a78cd2fbebbba6685a3e16274a2 | e045f43a583f484cc4a9dfcbae3a639bb531cff1 | refs/heads/master | 2023-03-17T04:03:11.111290 | 2020-09-26T11:39:44 | 2020-09-26T11:39:44 | 298,805,518 | 0 | 0 | BSD-3-Clause | 2020-09-26T12:04:46 | 2020-09-26T12:04:46 | null | UTF-8 | C++ | false | false | 11,694 | cc | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/app_list/search/files/item_suggest_cache.h"
#include "base/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/strcat.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "components/google/core/common/google_util.h"
#include "components/signin/public/identity_manager/access_token_info.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/signin/public/identity_manager/consent_level.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/scope_set.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "url/gurl.h"
namespace app_list {
namespace {
// Maximum accepted size of an ItemSuggest response. 10 KB.
constexpr int kMaxResponseSize = 10 * 1024;
// TODO(crbug.com/1034842): Investigate:
// - enterprise policies that should limit this traffic.
// - settings that should disable drive results.
constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("launcher_item_suggest", R"(
semantics {
sender: "Launcher suggested drive files"
description:
"The Chrome OS launcher requests suggestions for Drive files from "
"the Drive ItemSuggest API. These are displayed in the launcher."
trigger:
"Once on login after Drive FS is mounted. Afterwards, whenever the "
"Chrome OS launcher is opened."
data:
"OAuth2 access token."
destination: GOOGLE_OWNED_SERVICE
}
policy {
cookies_allowed: NO
setting:
"This cannot be disabled."
})");
// The scope required for an access token in order to query ItemSuggest.
constexpr char kDriveScope[] = "https://www.googleapis.com/auth/drive.readonly";
// TODO(crbug.com/1034842): Check this is correct. Also consider:
// - controlling at least the scenario type by experiment param.
// - whether we can filter the response to certain fields
constexpr char kRequestBody[] = R"({
'max_suggestions': 5,
'client_info': {
'platform_type': 'CHROMEOS',
'application_type': 'GOOGLE_DRIVE',
'scenario_type': 'QUICK_ACCESS'
}})";
//----------------
// Error utilities
//----------------
// Possible error states of the item suggest cache. These values persist to
// logs. Entries should not be renumbered and numeric values should never be
// reused.
enum class Error {
kDisabled = 1,
kInvalidServerUrl = 2,
kNoIdentityManager = 3,
kGoogleAuthError = 4,
kNetError = 5,
k3xxError = 6,
k4xxError = 7,
k5xxError = 8,
kEmptyResponse = 9,
kNoResultsInResponse = 10,
kJsonParseFailure = 11,
kJsonConversionFailure = 12,
kMaxValue = kJsonConversionFailure,
};
void LogError(Error error) {
// TODO(crbug.com/1034842): Implement.
}
void LogResponseSize(const int size) {
// TODO(crbug.com/1034842): Implement.
}
//---------------
// JSON utilities
//---------------
base::Optional<base::Value::ConstListView> GetList(const base::Value* value,
const std::string& key) {
if (!value->is_dict())
return base::nullopt;
const base::Value* field = value->FindListKey(key);
if (!field)
return base::nullopt;
return field->GetList();
}
base::Optional<std::string> GetString(const base::Value* value,
const std::string& key) {
if (!value->is_dict())
return base::nullopt;
const std::string* field = value->FindStringKey(key);
if (!field)
return base::nullopt;
return *field;
}
//----------------------
// JSON response parsing
//----------------------
base::Optional<ItemSuggestCache::Result> ConvertResult(
const base::Value* value) {
const auto& item_id = GetString(value, "itemId");
const auto& display_text = GetString(value, "displayText");
if (!item_id || !display_text)
return base::nullopt;
return ItemSuggestCache::Result(item_id.value(), display_text.value());
}
base::Optional<ItemSuggestCache::Results> ConvertResults(
const base::Value* value) {
const auto& suggestion_id = GetString(value, "suggestionSessionId");
if (!suggestion_id)
return base::nullopt;
ItemSuggestCache::Results results(suggestion_id.value());
const auto items = GetList(value, "item");
if (!items)
return base::nullopt;
for (const auto& result_value : items.value()) {
auto result = ConvertResult(&result_value);
// If any result fails conversion, fail completely and return base::nullopt,
// rather than just skipping this result. This makes clear the distinction
// between a response format issue and the response containing no results.
if (!result)
return base::nullopt;
results.results.push_back(std::move(result.value()));
}
return results;
}
} // namespace
// static
const base::Feature ItemSuggestCache::kExperiment{
"LauncherItemSuggest", base::FEATURE_DISABLED_BY_DEFAULT};
constexpr base::FeatureParam<bool> ItemSuggestCache::kEnabled;
constexpr base::FeatureParam<std::string> ItemSuggestCache::kServerUrl;
ItemSuggestCache::Result::Result(const std::string& id,
const std::string& title)
: id(id), title(title) {}
ItemSuggestCache::Result::Result(const Result& other)
: id(other.id), title(other.title) {}
ItemSuggestCache::Result::~Result() = default;
ItemSuggestCache::Results::Results(const std::string& suggestion_id)
: suggestion_id(suggestion_id) {}
ItemSuggestCache::Results::Results(const Results& other)
: suggestion_id(other.suggestion_id), results(other.results) {}
ItemSuggestCache::Results::~Results() = default;
ItemSuggestCache::ItemSuggestCache(
Profile* profile,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory)
: enabled_(kEnabled.Get()),
server_url_(kServerUrl.Get()),
profile_(profile),
url_loader_factory_(std::move(url_loader_factory)) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
ItemSuggestCache::~ItemSuggestCache() = default;
void ItemSuggestCache::UpdateCache() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// TODO(crbug.com/1034842): Add rate-limiting for cache updates.
// Make no requests and exit in four cases:
// - item suggest has been disabled via experiment
// - the server url is not https
// - the server url is not trusted by Google
// - another request is in-flight (url_loader_ is non-null)
if (url_loader_) {
return;
} else if (!enabled_) {
LogError(Error::kDisabled);
return;
} else if (!server_url_.SchemeIs(url::kHttpsScheme) ||
!google_util::IsGoogleAssociatedDomainUrl(server_url_)) {
LogError(Error::kInvalidServerUrl);
return;
}
signin::IdentityManager* identity_manager =
IdentityManagerFactory::GetForProfile(profile_);
if (!identity_manager) {
LogError(Error::kNoIdentityManager);
return;
}
signin::ScopeSet scopes({kDriveScope});
// Fetch an OAuth2 access token.
token_fetcher_ = std::make_unique<signin::PrimaryAccountAccessTokenFetcher>(
"launcher_item_suggest", identity_manager, scopes,
base::BindOnce(&ItemSuggestCache::OnTokenReceived,
weak_factory_.GetWeakPtr()),
signin::PrimaryAccountAccessTokenFetcher::Mode::kImmediate,
signin::ConsentLevel::kSync);
}
void ItemSuggestCache::OnTokenReceived(GoogleServiceAuthError error,
signin::AccessTokenInfo token_info) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
token_fetcher_.reset();
if (error.state() != GoogleServiceAuthError::NONE) {
LogError(Error::kGoogleAuthError);
return;
}
// Make a new request.
url_loader_ = MakeRequestLoader(token_info.token);
url_loader_->SetRetryOptions(0, network::SimpleURLLoader::RETRY_NEVER);
url_loader_->AttachStringForUpload(kRequestBody, "application/json");
// Perform the request.
url_loader_->DownloadToString(
url_loader_factory_.get(),
base::BindOnce(&ItemSuggestCache::OnSuggestionsReceived,
weak_factory_.GetWeakPtr()),
kMaxResponseSize);
}
void ItemSuggestCache::OnSuggestionsReceived(
const std::unique_ptr<std::string> json_response) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
const int net_error = url_loader_->NetError();
if (net_error != net::OK) {
if (!url_loader_->ResponseInfo() || !url_loader_->ResponseInfo()->headers) {
LogError(Error::kNetError);
} else {
const int status = url_loader_->ResponseInfo()->headers->response_code();
if (status >= 500) {
LogError(Error::k5xxError);
} else if (status >= 400) {
LogError(Error::k4xxError);
} else if (status >= 300) {
LogError(Error::k3xxError);
}
}
return;
} else if (!json_response || json_response->empty()) {
LogError(Error::kEmptyResponse);
return;
}
LogResponseSize(json_response->size());
// Parse the JSON response from ItemSuggest.
data_decoder::DataDecoder::ParseJsonIsolated(
*json_response, base::BindOnce(&ItemSuggestCache::OnJsonParsed,
weak_factory_.GetWeakPtr()));
}
void ItemSuggestCache::OnJsonParsed(
data_decoder::DataDecoder::ValueOrError result) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!result.value) {
LogError(Error::kJsonParseFailure);
return;
}
// Convert the JSON value into a Results object. If the conversion fails, or
// if the conversion contains no results, we shouldn't update the stored
// results.
const auto& results = ConvertResults(&result.value.value());
if (!results) {
LogError(Error::kJsonConversionFailure);
} else if (results->results.empty()) {
LogError(Error::kNoResultsInResponse);
} else {
results_ = std::move(results.value());
}
}
std::unique_ptr<network::SimpleURLLoader> ItemSuggestCache::MakeRequestLoader(
const std::string& token) {
auto resource_request = std::make_unique<network::ResourceRequest>();
resource_request->method = "POST";
resource_request->url = server_url_;
// Do not allow cookies.
resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit;
// Ignore the cache because we always want fresh results.
resource_request->load_flags =
net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE;
DCHECK(resource_request->url.is_valid());
resource_request->headers.SetHeader(net::HttpRequestHeaders::kContentType,
"application/json");
resource_request->headers.SetHeader(net::HttpRequestHeaders::kAuthorization,
"Bearer " + token);
return network::SimpleURLLoader::Create(std::move(resource_request),
kTrafficAnnotation);
}
// static
base::Optional<ItemSuggestCache::Results> ItemSuggestCache::ConvertJsonForTest(
const base::Value* value) {
return ConvertResults(value);
}
} // namespace app_list
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
24780e2b56f6de6b04346ca8f92716065ccd8984 | 3ff1fe3888e34cd3576d91319bf0f08ca955940f | /cvm/include/tencentcloud/cvm/v20170312/model/ModifyInstanceDiskTypeRequest.h | b2be2141eb2e6b535e5443a5868555ae9e693083 | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-cpp | 9f5df8220eaaf72f7eaee07b2ede94f89313651f | 42a76b812b81d1b52ec6a217fafc8faa135e06ca | refs/heads/master | 2023-08-30T03:22:45.269556 | 2023-08-30T00:45:39 | 2023-08-30T00:45:39 | 188,991,963 | 55 | 37 | Apache-2.0 | 2023-08-17T03:13:20 | 2019-05-28T08:56:08 | C++ | UTF-8 | C++ | false | false | 6,733 | h | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TENCENTCLOUD_CVM_V20170312_MODEL_MODIFYINSTANCEDISKTYPEREQUEST_H_
#define TENCENTCLOUD_CVM_V20170312_MODEL_MODIFYINSTANCEDISKTYPEREQUEST_H_
#include <string>
#include <vector>
#include <map>
#include <tencentcloud/core/AbstractModel.h>
#include <tencentcloud/cvm/v20170312/model/DataDisk.h>
#include <tencentcloud/cvm/v20170312/model/SystemDisk.h>
namespace TencentCloud
{
namespace Cvm
{
namespace V20170312
{
namespace Model
{
/**
* ModifyInstanceDiskType请求参数结构体
*/
class ModifyInstanceDiskTypeRequest : public AbstractModel
{
public:
ModifyInstanceDiskTypeRequest();
~ModifyInstanceDiskTypeRequest() = default;
std::string ToJsonString() const;
/**
* 获取待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。
* @return InstanceId 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。
*
*/
std::string GetInstanceId() const;
/**
* 设置待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。
* @param _instanceId 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。
*
*/
void SetInstanceId(const std::string& _instanceId);
/**
* 判断参数 InstanceId 是否已赋值
* @return InstanceId 是否已赋值
*
*/
bool InstanceIdHasBeenSet() const;
/**
* 获取实例数据盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值,当前只支持一个数据盘转化。只支持CDHPAID类型实例指定CdcId参数。
* @return DataDisks 实例数据盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值,当前只支持一个数据盘转化。只支持CDHPAID类型实例指定CdcId参数。
*
*/
std::vector<DataDisk> GetDataDisks() const;
/**
* 设置实例数据盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值,当前只支持一个数据盘转化。只支持CDHPAID类型实例指定CdcId参数。
* @param _dataDisks 实例数据盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值,当前只支持一个数据盘转化。只支持CDHPAID类型实例指定CdcId参数。
*
*/
void SetDataDisks(const std::vector<DataDisk>& _dataDisks);
/**
* 判断参数 DataDisks 是否已赋值
* @return DataDisks 是否已赋值
*
*/
bool DataDisksHasBeenSet() const;
/**
* 获取实例系统盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值。只支持CDHPAID类型实例指定CdcId参数。
* @return SystemDisk 实例系统盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值。只支持CDHPAID类型实例指定CdcId参数。
*
*/
SystemDisk GetSystemDisk() const;
/**
* 设置实例系统盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值。只支持CDHPAID类型实例指定CdcId参数。
* @param _systemDisk 实例系统盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值。只支持CDHPAID类型实例指定CdcId参数。
*
*/
void SetSystemDisk(const SystemDisk& _systemDisk);
/**
* 判断参数 SystemDisk 是否已赋值
* @return SystemDisk 是否已赋值
*
*/
bool SystemDiskHasBeenSet() const;
private:
/**
* 待操作的实例ID。可通过[`DescribeInstances`](https://cloud.tencent.com/document/api/213/9388)接口返回值中的`InstanceId`获取。
*/
std::string m_instanceId;
bool m_instanceIdHasBeenSet;
/**
* 实例数据盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值,当前只支持一个数据盘转化。只支持CDHPAID类型实例指定CdcId参数。
*/
std::vector<DataDisk> m_dataDisks;
bool m_dataDisksHasBeenSet;
/**
* 实例系统盘配置信息,只需要指定要转换的目标云硬盘的介质类型,指定DiskType的值。只支持CDHPAID类型实例指定CdcId参数。
*/
SystemDisk m_systemDisk;
bool m_systemDiskHasBeenSet;
};
}
}
}
}
#endif // !TENCENTCLOUD_CVM_V20170312_MODEL_MODIFYINSTANCEDISKTYPEREQUEST_H_
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
79923ccda240876558ab258887d66346dde0666b | 4724afa8472b0d961d40cc3be71f5abd1373143f | /codeforces/184/b.cpp | ae27403fe8072c6a68a628609db1733982f030a1 | [] | no_license | banarun/my_competitive_codes | 2f88334c563ad050c21c68ae449134a28fb2ba95 | c5a5af3cf74341d02a328974e8e316d300a221b2 | refs/heads/master | 2021-01-18T22:46:47.419449 | 2016-06-25T14:14:15 | 2016-06-25T14:14:15 | 33,266,178 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 535 | cpp | #include <iostream>
using namespace std;
int main()
{
int n;
long long int p,q,a[100002];
cin>>p>>q;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}
int flag=0;
for(int i=0;i<n;i++){
if(q==0){
cout<<"NO"<<endl;
return 0;
}
if(i==n-1){
//cout<<a[i]<<endl;
if( (p/q)!=a[i] || p%q!=0){
cout<<"NO"<<endl;
return 0;
}
else
continue;
}
if((p/q)>=a[i]){
long long int temp=q;
q=p-a[i]*q;
p=temp;
}
else{
cout<<"NO"<<endl;
return 0;
}
}
cout<<"YES"<<endl;
return 0;
}
| [
"banarunk@gmail.com"
] | banarunk@gmail.com |
0af2a5f0b18a5b5bf03c34d0ad3edd3965ec0dec | 69e577a4c7e051c3e0399853e0f3233d5f52882a | /re.h | 0fdbf41f588c676c49cd75b7edc4aa071b7ceaa5 | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | atrn/ici | 07ce3849e96e4acaa35f30b4144ae48a7a584925 | c3807f5cc7ffd2d272818978060c0a04c19ed55d | refs/heads/master | 2023-07-08T19:36:58.035538 | 2023-06-27T20:59:29 | 2023-06-27T20:59:29 | 118,180,499 | 2 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,349 | h | // -*- mode:c++ -*-
#ifndef ICI_RE_H
#define ICI_RE_H
#include "object.h"
/*
* The following portion of this file exports to ici.h. --ici.h-start--
*/
#ifndef ICI_PCRE_TYPES_DEFINED
typedef void pcre;
typedef void pcre_extra;
#define ICI_PCRE_TYPES_DEFINED
#endif
/*
* End of ici.h export. --ici.h-end--
*/
namespace ici
{
/*
* The following portion of this file exports to ici.h. --ici.h-start--
*/
struct regexp : object
{
pcre *r_re;
pcre_extra *r_rex;
str *r_pat;
};
inline regexp *regexpof(object *o)
{
return o->as<regexp>();
}
inline bool isregexp(object *o)
{
return o->hastype(TC_REGEXP);
}
int ici_pcre_exec_simple(regexp *, str *);
int ici_pcre(regexp *r, const char *subject, int length, int start_offset, int options, int *offsets, int offsetcount);
class regexp_type : public type
{
public:
regexp_type() : type("regexp", sizeof(struct regexp))
{
}
size_t mark(object *o) override;
void free(object *o) override;
unsigned long hash(object *o) override;
int cmp(object *o1, object *o2) override;
object *fetch(object *o, object *k) override;
int save(archiver *, object *) override;
object *restore(archiver *) override;
};
/*
* End of ici.h export. --ici.h-end--
*/
} // namespace ici
#endif
| [
"an@atrn.org"
] | an@atrn.org |
2c2d53d348a908b854783d459f82f8f62da60798 | 0f8346e90f888a44cc313c51d93a8846bc26eb16 | /work/_jobdu/_leetcode_/_leetcode_/_leetcode_100.cpp | 76fc85f23e4df7b6bc79aa943995dcb1d8c7e932 | [] | no_license | Suanec/BachelorOfIS | 9eed9613df953eef46d797d0b38dab9ad8a5d855 | 063406e990328285093a27b99176f3921705d0c5 | refs/heads/master | 2020-07-13T21:16:09.533484 | 2016-11-16T04:56:54 | 2016-11-16T04:56:54 | 73,884,888 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 814 | cpp | /*
100. Same Tree My Submissions QuestionEditorial Solution
Total Accepted: 126467 Total Submissions: 292633 Difficulty: Easy
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
*/
#include"leetcode.h"
class Solution {
public:
bool isSameTree(TreeNode* p, TreeNode* q) {
if(!p&&!q) return true;
if((p && !q)||(q && !p)) return false;
if( p->val - q->val )return false;
return isSameTree(p->left,q->left)&&isSameTree(p->right,q->right);
}
};
/*********************************************************
main()
*********************************************************/
//void main(){
// Solution slt;
// //system("pause");
//}
| [
"shenenzhao@gmail.com"
] | shenenzhao@gmail.com |
45b12b0c5109604d9ae4a4c7b257bedc87092bd5 | 423b376890e725d49eff1eff545a6dad0d4976a5 | /Main.cpp | 61bdbf567e5ad5f673187d36c40d697f74678be7 | [] | no_license | chancesmith/simple-cpp-class | 0b4d8207adcf1b64a88d630dbfec1fdd83fa708b | 401501d8c50b79f850dbfb35d4963706953a8b37 | refs/heads/master | 2020-04-02T04:58:49.035730 | 2018-10-21T19:45:47 | 2018-10-21T19:45:47 | 154,046,074 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 827 | cpp | #include <iostream>
class Log
{
public:
const int LogLevelError = 0;
const int LogLevelWarning = 1;
const int LogLevelInfo = 2;
private:
int m_LogLevel = LogLevelInfo;
public:
void SetLevel(int level)
{
m_LogLevel = level;
}
void Error(const char *message)
{
if (m_LogLevel >= LogLevelError)
std::cout << "[ERROR]: " << message << std::endl;
}
void Warn(const char *message)
{
if (m_LogLevel >= LogLevelWarning)
std::cout << "[WARNING]: " << message << std::endl;
}
void Info(const char *message)
{
if (m_LogLevel >= LogLevelInfo)
std::cout << "[INFO]: " << message << std::endl;
}
Log(/* args */);
~Log();
};
Log::Log(/* args */)
{
}
Log::~Log()
{
}
int main()
{
Log log;
log.SetLevel(log.LogLevelWarning);
log.Warn("Hello!");
return 0;
}
| [
"chancesmithb@gmail.com"
] | chancesmithb@gmail.com |
b1f7827020968e418bcbed3557f4aa21b2ecd27d | e6a7743bcee28fbc39e495c4fdf005f1a2ff446f | /export/windows/cpp/obj/src/flixel/input/FlxPointer.cpp | 2e3bfb95356550ed1cad2b03ad223684cae0151d | [] | no_license | jwat445/DungeonCrawler | 56fd0b91d44793802e87097eb52d740709a10ffa | 5f60dbe509ec73dc9aa0cf8f38cf53ba486fdad2 | refs/heads/master | 2020-04-05T13:08:31.562552 | 2017-12-07T02:42:41 | 2017-12-07T02:42:41 | 95,114,406 | 0 | 0 | null | 2017-12-07T03:20:53 | 2017-06-22T12:41:59 | C++ | UTF-8 | C++ | false | true | 18,215 | cpp | // Generated by Haxe 3.4.2 (git build master @ 890f8c7)
#include <hxcpp.h>
#ifndef INCLUDED_Std
#include <Std.h>
#endif
#ifndef INCLUDED_flixel_FlxBasic
#include <flixel/FlxBasic.h>
#endif
#ifndef INCLUDED_flixel_FlxCamera
#include <flixel/FlxCamera.h>
#endif
#ifndef INCLUDED_flixel_FlxG
#include <flixel/FlxG.h>
#endif
#ifndef INCLUDED_flixel_FlxObject
#include <flixel/FlxObject.h>
#endif
#ifndef INCLUDED_flixel_group_FlxTypedGroup
#include <flixel/group/FlxTypedGroup.h>
#endif
#ifndef INCLUDED_flixel_input_FlxPointer
#include <flixel/input/FlxPointer.h>
#endif
#ifndef INCLUDED_flixel_math_FlxPoint
#include <flixel/math/FlxPoint.h>
#endif
#ifndef INCLUDED_flixel_system_scaleModes_BaseScaleMode
#include <flixel/system/scaleModes/BaseScaleMode.h>
#endif
#ifndef INCLUDED_flixel_util_FlxPool_flixel_math_FlxPoint
#include <flixel/util/FlxPool_flixel_math_FlxPoint.h>
#endif
#ifndef INCLUDED_flixel_util_FlxPool_flixel_util_LabelValuePair
#include <flixel/util/FlxPool_flixel_util_LabelValuePair.h>
#endif
#ifndef INCLUDED_flixel_util_FlxStringUtil
#include <flixel/util/FlxStringUtil.h>
#endif
#ifndef INCLUDED_flixel_util_IFlxDestroyable
#include <flixel/util/IFlxDestroyable.h>
#endif
#ifndef INCLUDED_flixel_util_IFlxPool
#include <flixel/util/IFlxPool.h>
#endif
#ifndef INCLUDED_flixel_util_IFlxPooled
#include <flixel/util/IFlxPooled.h>
#endif
#ifndef INCLUDED_flixel_util_LabelValuePair
#include <flixel/util/LabelValuePair.h>
#endif
HX_DEFINE_STACK_FRAME(_hx_pos_e74b11cf5585adaf_8_new,"flixel.input.FlxPointer","new",0x20c36c33,"flixel.input.FlxPointer.new","flixel/input/FlxPointer.hx",8,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_31_getWorldPosition,"flixel.input.FlxPointer","getWorldPosition",0x52927af2,"flixel.input.FlxPointer.getWorldPosition","flixel/input/FlxPointer.hx",31,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_55_getScreenPosition,"flixel.input.FlxPointer","getScreenPosition",0xae561a7e,"flixel.input.FlxPointer.getScreenPosition","flixel/input/FlxPointer.hx",55,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_75_getPosition,"flixel.input.FlxPointer","getPosition",0x9fea8a32,"flixel.input.FlxPointer.getPosition","flixel/input/FlxPointer.hx",75,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_92_overlaps,"flixel.input.FlxPointer","overlaps",0xe0967a59,"flixel.input.FlxPointer.overlaps","flixel/input/FlxPointer.hx",92,0xe6a2529b)
static const bool _hx_array_data_c28ed6c1_5[] = {
0,
};
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_100_overlaps,"flixel.input.FlxPointer","overlaps",0xe0967a59,"flixel.input.FlxPointer.overlaps","flixel/input/FlxPointer.hx",100,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_122_setGlobalScreenPositionUnsafe,"flixel.input.FlxPointer","setGlobalScreenPositionUnsafe",0x8f7aed13,"flixel.input.FlxPointer.setGlobalScreenPositionUnsafe","flixel/input/FlxPointer.hx",122,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_131_toString,"flixel.input.FlxPointer","toString",0xd3da77f9,"flixel.input.FlxPointer.toString","flixel/input/FlxPointer.hx",131,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_141_updatePositions,"flixel.input.FlxPointer","updatePositions",0xb47050b4,"flixel.input.FlxPointer.updatePositions","flixel/input/FlxPointer.hx",141,0xe6a2529b)
HX_LOCAL_STACK_FRAME(_hx_pos_e74b11cf5585adaf_18_boot,"flixel.input.FlxPointer","boot",0x825440ff,"flixel.input.FlxPointer.boot","flixel/input/FlxPointer.hx",18,0xe6a2529b)
namespace flixel{
namespace input{
void FlxPointer_obj::__construct(){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_8_new)
HXLINE( 17) this->_globalScreenY = (int)0;
HXLINE( 16) this->_globalScreenX = (int)0;
HXLINE( 14) this->screenY = (int)0;
HXLINE( 13) this->screenX = (int)0;
HXLINE( 11) this->y = (int)0;
HXLINE( 10) this->x = (int)0;
}
Dynamic FlxPointer_obj::__CreateEmpty() { return new FlxPointer_obj; }
void *FlxPointer_obj::_hx_vtable = 0;
Dynamic FlxPointer_obj::__Create(hx::DynamicArray inArgs)
{
hx::ObjectPtr< FlxPointer_obj > _hx_result = new FlxPointer_obj();
_hx_result->__construct();
return _hx_result;
}
bool FlxPointer_obj::_hx_isInstanceOf(int inClassId) {
return inClassId==(int)0x00000001 || inClassId==(int)0x0fe7efd5;
}
::flixel::math::FlxPoint FlxPointer_obj::getWorldPosition( ::flixel::FlxCamera Camera, ::flixel::math::FlxPoint point){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_31_getWorldPosition)
HXLINE( 32) if (hx::IsNull( Camera )) {
HXLINE( 34) Camera = ::flixel::FlxG_obj::camera;
}
HXLINE( 36) if (hx::IsNull( point )) {
HXLINE( 38) ::flixel::math::FlxPoint point1 = ::flixel::math::FlxPoint_obj::_pool->get()->set((int)0,(int)0);
HXDLIN( 38) point1->_inPool = false;
HXDLIN( 38) point = point1;
}
HXLINE( 40) this->getScreenPosition(Camera,::flixel::input::FlxPointer_obj::_cachedPoint);
HXLINE( 41) point->set_x((::flixel::input::FlxPointer_obj::_cachedPoint->x + Camera->scroll->x));
HXLINE( 42) point->set_y((::flixel::input::FlxPointer_obj::_cachedPoint->y + Camera->scroll->y));
HXLINE( 43) return point;
}
HX_DEFINE_DYNAMIC_FUNC2(FlxPointer_obj,getWorldPosition,return )
::flixel::math::FlxPoint FlxPointer_obj::getScreenPosition( ::flixel::FlxCamera Camera, ::flixel::math::FlxPoint point){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_55_getScreenPosition)
HXLINE( 56) if (hx::IsNull( Camera )) {
HXLINE( 58) Camera = ::flixel::FlxG_obj::camera;
}
HXLINE( 60) if (hx::IsNull( point )) {
HXLINE( 62) ::flixel::math::FlxPoint point1 = ::flixel::math::FlxPoint_obj::_pool->get()->set((int)0,(int)0);
HXDLIN( 62) point1->_inPool = false;
HXDLIN( 62) point = point1;
}
HXLINE( 65) Float _hx_tmp = (this->_globalScreenX - Camera->x);
HXDLIN( 65) Float _hx_tmp1 = (((Float)0.5) * Camera->width);
HXDLIN( 65) point->set_x(((Float)(_hx_tmp + (_hx_tmp1 * (Camera->zoom - Camera->initialZoom))) / (Float)Camera->zoom));
HXLINE( 66) Float _hx_tmp2 = (this->_globalScreenY - Camera->y);
HXDLIN( 66) Float _hx_tmp3 = (((Float)0.5) * Camera->height);
HXDLIN( 66) point->set_y(((Float)(_hx_tmp2 + (_hx_tmp3 * (Camera->zoom - Camera->initialZoom))) / (Float)Camera->zoom));
HXLINE( 68) return point;
}
HX_DEFINE_DYNAMIC_FUNC2(FlxPointer_obj,getScreenPosition,return )
::flixel::math::FlxPoint FlxPointer_obj::getPosition( ::flixel::math::FlxPoint point){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_75_getPosition)
HXLINE( 76) if (hx::IsNull( point )) {
HXLINE( 77) ::flixel::math::FlxPoint point1 = ::flixel::math::FlxPoint_obj::_pool->get()->set((int)0,(int)0);
HXDLIN( 77) point1->_inPool = false;
HXDLIN( 77) point = point1;
}
HXLINE( 78) return point->set(this->x,this->y);
}
HX_DEFINE_DYNAMIC_FUNC1(FlxPointer_obj,getPosition,return )
bool FlxPointer_obj::overlaps( ::flixel::FlxBasic ObjectOrGroup, ::flixel::FlxCamera Camera){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_92_overlaps)
HXLINE( 91) ::flixel::input::FlxPointer _gthis = hx::ObjectPtr<OBJ_>(this);
HXLINE( 93) ::Array< bool > result = ::Array_obj< bool >::fromData( _hx_array_data_c28ed6c1_5,1);
HXLINE( 95) ::flixel::group::FlxTypedGroup group = ::flixel::group::FlxTypedGroup_obj::resolveGroup(ObjectOrGroup);
HXLINE( 96) if (hx::IsNotNull( group )) {
HX_BEGIN_LOCAL_FUNC_S3(hx::LocalFunc,_hx_Closure_0, ::flixel::input::FlxPointer,_gthis, ::flixel::FlxCamera,Camera,::Array< bool >,result) HXARGC(1)
void _hx_run( ::flixel::FlxBasic basic){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_100_overlaps)
HXLINE( 100) if (_gthis->overlaps(basic,Camera)) {
HXLINE( 102) result[(int)0] = true;
HXLINE( 103) return;
}
}
HX_END_LOCAL_FUNC1((void))
HXLINE( 98) group->forEachExists( ::Dynamic(new _hx_Closure_0(_gthis,Camera,result)),null());
}
else {
HXLINE( 109) this->getPosition(::flixel::input::FlxPointer_obj::_cachedPoint);
HXLINE( 110) ::flixel::FlxObject object = ( ( ::flixel::FlxObject)(ObjectOrGroup) );
HXLINE( 111) bool _hx_tmp = object->overlapsPoint(::flixel::input::FlxPointer_obj::_cachedPoint,true,Camera);
HXDLIN( 111) result[(int)0] = _hx_tmp;
}
HXLINE( 114) return result->__get((int)0);
}
HX_DEFINE_DYNAMIC_FUNC2(FlxPointer_obj,overlaps,return )
void FlxPointer_obj::setGlobalScreenPositionUnsafe(Float newX,Float newY){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_122_setGlobalScreenPositionUnsafe)
HXLINE( 123) this->_globalScreenX = ::Std_obj::_hx_int(((Float)newX / (Float)::flixel::FlxG_obj::scaleMode->scale->x));
HXLINE( 124) this->_globalScreenY = ::Std_obj::_hx_int(((Float)newY / (Float)::flixel::FlxG_obj::scaleMode->scale->y));
HXLINE( 126) this->updatePositions();
}
HX_DEFINE_DYNAMIC_FUNC2(FlxPointer_obj,setGlobalScreenPositionUnsafe,(void))
::String FlxPointer_obj::toString(){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_131_toString)
HXLINE( 132) ::Dynamic value = this->x;
HXDLIN( 132) ::flixel::util::LabelValuePair _this = ::flixel::util::LabelValuePair_obj::_pool->get();
HXDLIN( 132) _this->label = HX_("x",78,00,00,00);
HXDLIN( 132) _this->value = value;
HXDLIN( 132) ::flixel::util::LabelValuePair _hx_tmp = _this;
HXLINE( 133) ::Dynamic value1 = this->y;
HXDLIN( 133) ::flixel::util::LabelValuePair _this1 = ::flixel::util::LabelValuePair_obj::_pool->get();
HXDLIN( 133) _this1->label = HX_("y",79,00,00,00);
HXDLIN( 133) _this1->value = value1;
HXLINE( 131) return ::flixel::util::FlxStringUtil_obj::getDebugString(::Array_obj< ::Dynamic>::__new(2)->init(0,_hx_tmp)->init(1,_this1));
}
HX_DEFINE_DYNAMIC_FUNC0(FlxPointer_obj,toString,return )
void FlxPointer_obj::updatePositions(){
HX_STACKFRAME(&_hx_pos_e74b11cf5585adaf_141_updatePositions)
HXLINE( 142) this->getScreenPosition(::flixel::FlxG_obj::camera,::flixel::input::FlxPointer_obj::_cachedPoint);
HXLINE( 143) this->screenX = ::Std_obj::_hx_int(::flixel::input::FlxPointer_obj::_cachedPoint->x);
HXLINE( 144) this->screenY = ::Std_obj::_hx_int(::flixel::input::FlxPointer_obj::_cachedPoint->y);
HXLINE( 146) this->getWorldPosition(::flixel::FlxG_obj::camera,::flixel::input::FlxPointer_obj::_cachedPoint);
HXLINE( 147) this->x = ::Std_obj::_hx_int(::flixel::input::FlxPointer_obj::_cachedPoint->x);
HXLINE( 148) this->y = ::Std_obj::_hx_int(::flixel::input::FlxPointer_obj::_cachedPoint->y);
}
HX_DEFINE_DYNAMIC_FUNC0(FlxPointer_obj,updatePositions,(void))
::flixel::math::FlxPoint FlxPointer_obj::_cachedPoint;
hx::ObjectPtr< FlxPointer_obj > FlxPointer_obj::__new() {
hx::ObjectPtr< FlxPointer_obj > __this = new FlxPointer_obj();
__this->__construct();
return __this;
}
hx::ObjectPtr< FlxPointer_obj > FlxPointer_obj::__alloc(hx::Ctx *_hx_ctx) {
FlxPointer_obj *__this = (FlxPointer_obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(FlxPointer_obj), false, "flixel.input.FlxPointer"));
*(void **)__this = FlxPointer_obj::_hx_vtable;
__this->__construct();
return __this;
}
FlxPointer_obj::FlxPointer_obj()
{
}
hx::Val FlxPointer_obj::__Field(const ::String &inName,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 1:
if (HX_FIELD_EQ(inName,"x") ) { return hx::Val( x ); }
if (HX_FIELD_EQ(inName,"y") ) { return hx::Val( y ); }
break;
case 7:
if (HX_FIELD_EQ(inName,"screenX") ) { return hx::Val( screenX ); }
if (HX_FIELD_EQ(inName,"screenY") ) { return hx::Val( screenY ); }
break;
case 8:
if (HX_FIELD_EQ(inName,"overlaps") ) { return hx::Val( overlaps_dyn() ); }
if (HX_FIELD_EQ(inName,"toString") ) { return hx::Val( toString_dyn() ); }
break;
case 11:
if (HX_FIELD_EQ(inName,"getPosition") ) { return hx::Val( getPosition_dyn() ); }
break;
case 14:
if (HX_FIELD_EQ(inName,"_globalScreenX") ) { return hx::Val( _globalScreenX ); }
if (HX_FIELD_EQ(inName,"_globalScreenY") ) { return hx::Val( _globalScreenY ); }
break;
case 15:
if (HX_FIELD_EQ(inName,"updatePositions") ) { return hx::Val( updatePositions_dyn() ); }
break;
case 16:
if (HX_FIELD_EQ(inName,"getWorldPosition") ) { return hx::Val( getWorldPosition_dyn() ); }
break;
case 17:
if (HX_FIELD_EQ(inName,"getScreenPosition") ) { return hx::Val( getScreenPosition_dyn() ); }
break;
case 29:
if (HX_FIELD_EQ(inName,"setGlobalScreenPositionUnsafe") ) { return hx::Val( setGlobalScreenPositionUnsafe_dyn() ); }
}
return super::__Field(inName,inCallProp);
}
bool FlxPointer_obj::__GetStatic(const ::String &inName, Dynamic &outValue, hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 12:
if (HX_FIELD_EQ(inName,"_cachedPoint") ) { outValue = ( _cachedPoint ); return true; }
}
return false;
}
hx::Val FlxPointer_obj::__SetField(const ::String &inName,const hx::Val &inValue,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 1:
if (HX_FIELD_EQ(inName,"x") ) { x=inValue.Cast< int >(); return inValue; }
if (HX_FIELD_EQ(inName,"y") ) { y=inValue.Cast< int >(); return inValue; }
break;
case 7:
if (HX_FIELD_EQ(inName,"screenX") ) { screenX=inValue.Cast< int >(); return inValue; }
if (HX_FIELD_EQ(inName,"screenY") ) { screenY=inValue.Cast< int >(); return inValue; }
break;
case 14:
if (HX_FIELD_EQ(inName,"_globalScreenX") ) { _globalScreenX=inValue.Cast< int >(); return inValue; }
if (HX_FIELD_EQ(inName,"_globalScreenY") ) { _globalScreenY=inValue.Cast< int >(); return inValue; }
}
return super::__SetField(inName,inValue,inCallProp);
}
bool FlxPointer_obj::__SetStatic(const ::String &inName,Dynamic &ioValue,hx::PropertyAccess inCallProp)
{
switch(inName.length) {
case 12:
if (HX_FIELD_EQ(inName,"_cachedPoint") ) { _cachedPoint=ioValue.Cast< ::flixel::math::FlxPoint >(); return true; }
}
return false;
}
void FlxPointer_obj::__GetFields(Array< ::String> &outFields)
{
outFields->push(HX_HCSTRING("x","\x78","\x00","\x00","\x00"));
outFields->push(HX_HCSTRING("y","\x79","\x00","\x00","\x00"));
outFields->push(HX_HCSTRING("screenX","\x6c","\xc3","\x36","\x2a"));
outFields->push(HX_HCSTRING("screenY","\x6d","\xc3","\x36","\x2a"));
outFields->push(HX_HCSTRING("_globalScreenX","\x8a","\xec","\xc1","\x8e"));
outFields->push(HX_HCSTRING("_globalScreenY","\x8b","\xec","\xc1","\x8e"));
super::__GetFields(outFields);
};
#if HXCPP_SCRIPTABLE
static hx::StorageInfo FlxPointer_obj_sMemberStorageInfo[] = {
{hx::fsInt,(int)offsetof(FlxPointer_obj,x),HX_HCSTRING("x","\x78","\x00","\x00","\x00")},
{hx::fsInt,(int)offsetof(FlxPointer_obj,y),HX_HCSTRING("y","\x79","\x00","\x00","\x00")},
{hx::fsInt,(int)offsetof(FlxPointer_obj,screenX),HX_HCSTRING("screenX","\x6c","\xc3","\x36","\x2a")},
{hx::fsInt,(int)offsetof(FlxPointer_obj,screenY),HX_HCSTRING("screenY","\x6d","\xc3","\x36","\x2a")},
{hx::fsInt,(int)offsetof(FlxPointer_obj,_globalScreenX),HX_HCSTRING("_globalScreenX","\x8a","\xec","\xc1","\x8e")},
{hx::fsInt,(int)offsetof(FlxPointer_obj,_globalScreenY),HX_HCSTRING("_globalScreenY","\x8b","\xec","\xc1","\x8e")},
{ hx::fsUnknown, 0, null()}
};
static hx::StaticInfo FlxPointer_obj_sStaticStorageInfo[] = {
{hx::fsObject /*::flixel::math::FlxPoint*/ ,(void *) &FlxPointer_obj::_cachedPoint,HX_HCSTRING("_cachedPoint","\x0f","\x9f","\x83","\xa5")},
{ hx::fsUnknown, 0, null()}
};
#endif
static ::String FlxPointer_obj_sMemberFields[] = {
HX_HCSTRING("x","\x78","\x00","\x00","\x00"),
HX_HCSTRING("y","\x79","\x00","\x00","\x00"),
HX_HCSTRING("screenX","\x6c","\xc3","\x36","\x2a"),
HX_HCSTRING("screenY","\x6d","\xc3","\x36","\x2a"),
HX_HCSTRING("_globalScreenX","\x8a","\xec","\xc1","\x8e"),
HX_HCSTRING("_globalScreenY","\x8b","\xec","\xc1","\x8e"),
HX_HCSTRING("getWorldPosition","\xa5","\x3e","\x0b","\xe6"),
HX_HCSTRING("getScreenPosition","\x6b","\x93","\x88","\x24"),
HX_HCSTRING("getPosition","\x5f","\x63","\xee","\xf0"),
HX_HCSTRING("overlaps","\x0c","\xd3","\x2a","\x45"),
HX_HCSTRING("setGlobalScreenPositionUnsafe","\x80","\x95","\xb5","\x56"),
HX_HCSTRING("toString","\xac","\xd0","\x6e","\x38"),
HX_HCSTRING("updatePositions","\x61","\xc4","\xdc","\x1f"),
::String(null()) };
static void FlxPointer_obj_sMarkStatics(HX_MARK_PARAMS) {
HX_MARK_MEMBER_NAME(FlxPointer_obj::__mClass,"__mClass");
HX_MARK_MEMBER_NAME(FlxPointer_obj::_cachedPoint,"_cachedPoint");
};
#ifdef HXCPP_VISIT_ALLOCS
static void FlxPointer_obj_sVisitStatics(HX_VISIT_PARAMS) {
HX_VISIT_MEMBER_NAME(FlxPointer_obj::__mClass,"__mClass");
HX_VISIT_MEMBER_NAME(FlxPointer_obj::_cachedPoint,"_cachedPoint");
};
#endif
hx::Class FlxPointer_obj::__mClass;
static ::String FlxPointer_obj_sStaticFields[] = {
HX_HCSTRING("_cachedPoint","\x0f","\x9f","\x83","\xa5"),
::String(null())
};
void FlxPointer_obj::__register()
{
hx::Object *dummy = new FlxPointer_obj;
FlxPointer_obj::_hx_vtable = *(void **)dummy;
hx::Static(__mClass) = new hx::Class_obj();
__mClass->mName = HX_HCSTRING("flixel.input.FlxPointer","\xc1","\xd6","\x8e","\xc2");
__mClass->mSuper = &super::__SGetClass();
__mClass->mConstructEmpty = &__CreateEmpty;
__mClass->mConstructArgs = &__Create;
__mClass->mGetStaticField = &FlxPointer_obj::__GetStatic;
__mClass->mSetStaticField = &FlxPointer_obj::__SetStatic;
__mClass->mMarkFunc = FlxPointer_obj_sMarkStatics;
__mClass->mStatics = hx::Class_obj::dupFunctions(FlxPointer_obj_sStaticFields);
__mClass->mMembers = hx::Class_obj::dupFunctions(FlxPointer_obj_sMemberFields);
__mClass->mCanCast = hx::TCanCast< FlxPointer_obj >;
#ifdef HXCPP_VISIT_ALLOCS
__mClass->mVisitFunc = FlxPointer_obj_sVisitStatics;
#endif
#ifdef HXCPP_SCRIPTABLE
__mClass->mMemberStorageInfo = FlxPointer_obj_sMemberStorageInfo;
#endif
#ifdef HXCPP_SCRIPTABLE
__mClass->mStaticStorageInfo = FlxPointer_obj_sStaticStorageInfo;
#endif
hx::_hx_RegisterClass(__mClass->mName, __mClass);
}
void FlxPointer_obj::__boot()
{
{
HX_GC_STACKFRAME(&_hx_pos_e74b11cf5585adaf_18_boot)
HXDLIN( 18) _cachedPoint = ::flixel::math::FlxPoint_obj::__alloc( HX_CTX ,null(),null());
}
}
} // end namespace flixel
} // end namespace input
| [
"jwat445@gmail.com"
] | jwat445@gmail.com |
c87962aa373179ecbe4404d1d3fad5a4f24e1d1f | 89df1ea7703a7d64ed2549027353b9f98b800e88 | /graphics_tests/src/cube.cpp | cf9fc92c8145aa61cf8061bc9659f72e598a04ca | [
"MIT"
] | permissive | llGuy/gamedev | 31a3e23f921fbe38af48177710eb7bae661f4cfd | 16aa203934fd767926c58558e021630288556399 | refs/heads/master | 2021-05-04T15:09:33.217825 | 2019-01-17T23:15:36 | 2019-01-17T23:15:36 | 120,221,445 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,774 | cpp | #include "cube.h"
#include <array>
cube::cube(float rad, glm::vec3 const & col)
: radius(rad), cube_color(col)
{
}
auto cube::create(resource_handler &) -> void
{
create_buffers();
create_vao();
}
auto cube::destroy(void) -> void
{
vertex_buffer.destroy();
index_buffer.destroy();
buffer_layout.destroy();
}
auto cube::element_buffer(void) -> buffer &
{
return index_buffer;
}
auto cube::create_buffers(void) -> void
{
std::array<glm::vec3, 16> verts
{
// front
glm::vec3(-radius, -radius, radius), cube_color,
glm::vec3(radius, -radius, radius), cube_color,
glm::vec3(radius, radius, radius), cube_color,
glm::vec3(-radius, radius, radius), cube_color,
// back
glm::vec3(-radius, -radius, -radius), cube_color,
glm::vec3(radius, -radius, -radius), cube_color,
glm::vec3(radius, radius, -radius), cube_color,
glm::vec3(-radius, radius, -radius), cube_color
};
vertex_buffer.create();
vertex_buffer.fill(verts.size() * sizeof(glm::vec3), verts.data(), GL_STATIC_DRAW, GL_ARRAY_BUFFER);
std::array<uint16_t, 36> indices
{
// front
0, 1, 2,
2, 3, 0,
// right
1, 5, 6,
6, 2, 1,
// back
7, 6, 5,
5, 4, 7,
// left
4, 0, 3,
3, 7, 4,
// bottom
4, 5, 1,
1, 0, 4,
// top
3, 2, 6,
6, 7, 3,
};
index_buffer.create();
index_buffer.fill(indices.size() * sizeof(uint16_t), indices.data(), GL_STATIC_DRAW, GL_ELEMENT_ARRAY_BUFFER);
}
auto cube::create_vao(void) -> void
{
buffer_layout.create();
buffer_layout.bind();
buffer_layout.enable(0);
buffer_layout.enable(1);
vertex_buffer.bind(GL_ARRAY_BUFFER);
index_buffer.bind(GL_ELEMENT_ARRAY_BUFFER);
buffer_layout.push<float>(0, 3, 6 * sizeof(float), nullptr);
buffer_layout.push<float>(1, 3, 6 * sizeof(float), (void *)(sizeof(float) * 3));
}
| [
"luc.rosenzweig@yahoo.com"
] | luc.rosenzweig@yahoo.com |
ff9400dd77f1cca0e8877191b291cc2c50e15fea | 1ce454491f42427cad050d8f633f4670c2c4fcbe | /Music/git_project2/divisorsum.cpp | bfdcdc8a20d152f648769636ec54422307d4c6c8 | [] | no_license | kushagraagrawal/codeforces-codechef | 515e27ff3b089863c842674ac9da9f2c05ff2bd1 | fbd0d2856b7b4d97576118e26733bc739be39f61 | refs/heads/master | 2020-12-28T19:11:57.768535 | 2016-10-25T10:50:53 | 2016-10-25T10:50:53 | 38,525,931 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 386 | cpp | #include<iostream>
#include<cmath>
long int divsum(long int);
using namespace std;
int main()
{
long int a;
cin>>a;
long int ca;
while(a--)
{
cin>>ca;
cout<<divsum(ca)<<endl;
}
return 0;
}
long int divsum(long int a)
{
long int b=1,c;
for(int i=2;i<=sqrt(a);i++)
{
if(a%i==0)
{c=a/i;
b+=i;
if(c!=i)
b+=c;
}
else if(a==1)
b=0;
}
return b;
}
| [
"kushagra106@gmail.com"
] | kushagra106@gmail.com |
827352fc69834ce176d9d32178164dd00828ab83 | d8c42e0c0e43c15d40209f8d804c1aad2a980ef7 | /src/TunErr.h | f679128982bd5c3b7a390a4b98ecc05f52d3adc2 | [] | no_license | LMY/TunErr | 1c82d25d1a60933daaa28b861767449e99c940e3 | b4bf30a1acf7c534f9ae0b38fb8bb68f8a6e1e4f | refs/heads/master | 2021-01-23T07:45:06.444038 | 2017-01-31T10:58:05 | 2017-01-31T10:58:05 | 80,512,608 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 352 | h | //
// File: TunErr.h
// Created by: User <Email>
// Created on: Wed May 10 16:10:39 2006
//
#ifndef _TUNERR_H_
#define _TUNERR_H_
#include "RuleSet.h"
class TunErr
{
public:
TunErr();
~TunErr();
int init();
int main();
protected:
RuleSet* getRuleset() const;
struct ipq_handle* handler;
void die();
};
#endif //_TUNERR_H_
| [
"miro.salvagni@gmail.com"
] | miro.salvagni@gmail.com |
811220e6e90f8aedc4fd3c1562d70260b6b29e0b | 9593216e8d48b5656a4b439e06ce0573d57ce715 | /exercises/chapter01/06.cpp | c5758e36accffd950d2292e8cfccb96db8804dc9 | [] | no_license | trandattin/ky-thuat-lap-trinh | aa18911d297444e1b3ad0415697acfe3a2053e42 | 42e70229789f463632b940a769a94e6c61bd060e | refs/heads/master | 2023-06-29T01:24:58.888784 | 2021-08-06T11:24:30 | 2021-08-06T11:24:30 | 346,017,452 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 130 | cpp | #include "stdio.h"
#include "math.h"
int main(){
int n;
printf("n = ");
scanf("%d",&n);
printf("%fUSD",pow(1.012,n)*60000);
} | [
"info@trandattin.com"
] | info@trandattin.com |
41aace804d9b53480fa877729c7c7d2942539054 | a758222442ce5e5a02236cb6add718c7627ccc44 | /lab_revision/c++/graphs/mst/kruskal/kruskal.cpp | fa07e2f82d77e41222a4942f3a946b09d10adb2b | [] | no_license | iamrajee/competitive | 8ac53ff356bcb545774369822fce1e0e4a592f4d | d385e5e240779a9afd8fb06f6bf1168c79621a5e | refs/heads/master | 2020-05-18T15:53:21.175363 | 2019-09-21T15:00:02 | 2019-09-21T15:00:02 | 184,511,325 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,160 | cpp | #include<bits/stdc++.h>
using namespace std;
int i,j,k;
int V,E,u,v,w;
long long int wsum;
vector <int> root;
typedef pair<int, int> pii;
//priority_queue < pair<long long, pii> > edgespq; //usaually increasing
priority_queue < pair<long long, pii>, vector <pair<long long, pii> >, greater <> > edgespq; //greater => decreasing
int findroot(int x){
while(root[x] != x){
root[x] = root[root[x]];
x = root[x];
}
return x;
}
void union1(int u, int v){
int p = findroot(u);
int q = findroot(v);
root[p] = root[q];
}
void kruskal(){
wsum = 0;
while(!edgespq.empty()){
auto it = edgespq.top();
u = it.second.first;
v = it.second.second;
w = it.first;
edgespq.pop();
if(findroot(u) != findroot(v))//i.e disjoint
{
wsum += w;
union1(u,v);
cout<<u<<" "<<v<<endl;
}
}
}
int main(){
cin>>V>>E;
root.resize(V);
for(i=0;i<V;i++) root[i]=i; //self root
while(E--){
cin>>u>>v>>w;
edgespq.push({w, {u, v}});
}
kruskal();
cout << wsum << endl;
return 0;
} | [
"singh.raj1997@gmail.com"
] | singh.raj1997@gmail.com |
15ac82826b5a63d86792809f172ba0476df830ef | 1165a7e419ef77b9c21ff419b5ef11b03ea03467 | /src/RakNet/DS_ByteQueue.cpp | dc49026b827c3779a87a1a12dec88334ae962f41 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | Stral9315/xsngine | 19c171cb729c0126c8c7f845c17b2db8f261a34b | 4a4afe21f12483dbe266113b17a4b51ea850ee56 | refs/heads/master | 2020-03-07T18:11:46.674231 | 2018-04-01T13:20:42 | 2018-04-01T13:20:42 | 127,630,592 | 0 | 0 | MIT | 2018-04-01T13:12:40 | 2018-04-01T13:12:39 | null | UTF-8 | C++ | false | false | 3,723 | cpp | /*
* Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#include "DS_ByteQueue.h"
#include <string.h> // Memmove
#include <stdlib.h> // realloc
#include <stdio.h>
using namespace DataStructures;
ByteQueue::ByteQueue()
{
readOffset=writeOffset=lengthAllocated=0;
data=0;
}
ByteQueue::~ByteQueue()
{
Clear(_FILE_AND_LINE_);
}
void ByteQueue::WriteBytes(const char *in, unsigned length, const char *file, unsigned int line)
{
unsigned bytesWritten;
bytesWritten=GetBytesWritten();
if (lengthAllocated==0 || length > lengthAllocated-bytesWritten-1)
{
unsigned oldLengthAllocated=lengthAllocated;
// Always need to waste 1 byte for the math to work, else writeoffset==readoffset
unsigned newAmountToAllocate=length+oldLengthAllocated+1;
if (newAmountToAllocate<256)
newAmountToAllocate=256;
lengthAllocated=lengthAllocated + newAmountToAllocate;
data=(char*)rakRealloc_Ex(data, lengthAllocated, file, line);
if (writeOffset < readOffset)
{
if (writeOffset <= newAmountToAllocate)
{
memcpy(data + oldLengthAllocated, data, writeOffset);
writeOffset=readOffset+bytesWritten;
}
else
{
memcpy(data + oldLengthAllocated, data, newAmountToAllocate);
memmove(data, data+newAmountToAllocate, writeOffset-newAmountToAllocate);
writeOffset-=newAmountToAllocate;
}
}
}
if (length <= lengthAllocated-writeOffset)
memcpy(data+writeOffset, in, length);
else
{
// Wrap
memcpy(data+writeOffset, in, lengthAllocated-writeOffset);
memcpy(data, in+(lengthAllocated-writeOffset), length-(lengthAllocated-writeOffset));
}
writeOffset=(writeOffset+length) % lengthAllocated;
}
bool ByteQueue::ReadBytes(char *out, unsigned maxLengthToRead, bool peek)
{
unsigned bytesWritten = GetBytesWritten();
unsigned bytesToRead = bytesWritten < maxLengthToRead ? bytesWritten : maxLengthToRead;
if (bytesToRead==0)
return false;
if (writeOffset>=readOffset)
{
memcpy(out, data+readOffset, bytesToRead);
}
else
{
unsigned availableUntilWrap = lengthAllocated-readOffset;
if (bytesToRead <= availableUntilWrap)
{
memcpy(out, data+readOffset, bytesToRead);
}
else
{
memcpy(out, data+readOffset, availableUntilWrap);
memcpy(out+availableUntilWrap, data, bytesToRead-availableUntilWrap);
}
}
if (peek==false)
IncrementReadOffset(bytesToRead);
return true;
}
char* ByteQueue::PeekContiguousBytes(unsigned int *outLength) const
{
if (writeOffset>=readOffset)
*outLength=writeOffset-readOffset;
else
*outLength=lengthAllocated-readOffset;
return data+readOffset;
}
void ByteQueue::Clear(const char *file, unsigned int line)
{
if (lengthAllocated)
rakFree_Ex(data, file, line );
readOffset=writeOffset=lengthAllocated=0;
data=0;
}
unsigned ByteQueue::GetBytesWritten(void) const
{
if (writeOffset>=readOffset)
return writeOffset-readOffset;
else
return writeOffset+(lengthAllocated-readOffset);
}
void ByteQueue::IncrementReadOffset(unsigned length)
{
readOffset=(readOffset+length) % lengthAllocated;
}
void ByteQueue::DecrementReadOffset(unsigned length)
{
if (length>readOffset)
readOffset=lengthAllocated-(length-readOffset);
else
readOffset-=length;
}
void ByteQueue::Print(void)
{
unsigned i;
for (i=readOffset; i!=writeOffset; i++)
RAKNET_DEBUG_PRINTF("%i ", data[i]);
RAKNET_DEBUG_PRINTF("\n");
}
| [
"mrrazish@gmail.com"
] | mrrazish@gmail.com |
4fc7f75290482b3d8a0f1b4d9ca8901bde7f119c | b33a9177edaaf6bf185ef20bf87d36eada719d4f | /qtmultimedia/config.tests/directshow/main.cpp | 15ff3b9fc9b469413df0e55b07be9e4524e21d21 | [
"Qt-LGPL-exception-1.1",
"LGPL-2.1-only",
"LGPL-2.0-or-later",
"LGPL-3.0-only",
"GPL-3.0-only",
"LGPL-2.1-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GFDL-1.3-only",
"LicenseRef-scancode-digia-qt-preview",
"LicenseRef-scancode-warranty-discl... | permissive | wgnet/wds_qt | ab8c093b8c6eead9adf4057d843e00f04915d987 | 8db722fd367d2d0744decf99ac7bafaba8b8a3d3 | refs/heads/master | 2021-04-02T11:07:10.181067 | 2020-06-02T10:29:03 | 2020-06-02T10:34:19 | 248,267,925 | 1 | 0 | Apache-2.0 | 2020-04-30T12:16:53 | 2020-03-18T15:20:38 | null | UTF-8 | C++ | false | false | 1,694 | cpp | /****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <dshow.h>
#ifndef _WIN32_WCE
#include <d3d9.h>
#include <vmr9.h>
#endif
int main(int, char**)
{
return 0;
}
| [
"p_pavlov@wargaming.net"
] | p_pavlov@wargaming.net |
55f823bb2a25b7014f7499a9c4af1c5aacaffdd6 | d27a6d7874ced442b868e23a3df847d133fb7ac7 | /Project II/budgetStuff.h | 1b9b1b90fad4050aa5b6bce5c91c0903dfc725d5 | [] | no_license | Apacher122/Budget_Program | a453de8144779372828908ac50cb762a2c666bfb | 80bda1df51efed3e3a0c25d5f095811f6c7625f5 | refs/heads/master | 2020-12-14T15:53:30.068162 | 2020-01-18T21:10:40 | 2020-01-18T21:10:40 | 234,797,892 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,565 | h | #ifndef BUDGETSTUFF_H_
#define BUDGETSTUFF_H_
#include <iostream>
#include <vector>
class SpentItemType {
private:
double SpentItemTypeAmount;
public:
std::string SpentItemTypeID;
std::string SpentItemTypeName;
//constructor
SpentItemType(std::string, std::string, double);
//member functions
void SetSpentItemInformation(std::string, std::string, double);
std::string GetSpentItemTypeID();
std::string GetSpentItemTypeName();
double GetSpentItemTypeAmount();
};
class BudgetItems {
protected:
double BudgetItemAmount;
public:
std::string BudgetItemID;
std::string BudgetItemName;
//constructor
BudgetItems(std::string, std::string, double);
//member functions
void SetBudgetItemInformation(std::string, std::string, double);
std::string GetBudgetItemID();
std::string GetBudgetItemName();
double GetBudgetItemAmount();
virtual void PrintInformation() = 0;
virtual void SaveInformation() = 0;
};
class Housing : public BudgetItems {
private:
std::string itemID;
int Numberofitem;
std::vector<SpentItemType> itemName;
public:
//constructor
Housing(std::string, int num, std::string, double);
//member functions
void SetInformation(std::string, int, SpentItemType, std::string, std::string, double);
void AddNewSpentItem(std::string id);
int GetNumberOfItem();
double GetTotalSpentAmount();
double GetAmountLeftInBudget(double);
virtual void PrintInformation();
virtual void SaveInformation();
};
class Food : public BudgetItems {
private:
std::string itemID;
int Numberofitem;
std::vector<SpentItemType> itemName;
public:
//constructor
Food(std::string, int num, std::string, double);
//member functions
void SetInformation(std::string, int, SpentItemType, std::string, std::string, double);
void AddNewSpentItem(std::string);
int GetNumberOfItem();
double GetTotalSpentAmount();
double GetAmountLeftInBudget(double);
virtual void PrintInformation();
virtual void SaveInformation();
};
class Utilities : public BudgetItems {
private:
std::string itemID;
int Numberofitem;
std::vector<SpentItemType> itemName;
public:
//constructor
Utilities(std::string, int num, std::string, double);
//member functions
void SetInformation(std::string, int, SpentItemType, std::string, std::string, double);
void AddNewSpentItem(std::string);
int GetNumberOfItem();
double GetTotalSpentAmount();
double GetAmountLeftInBudget(double);
virtual void PrintInformation();
virtual void SaveInformation();
};
#endif // !BUDGETSTUFF_H_
| [
"ApareceR12@gmail.com"
] | ApareceR12@gmail.com |
ed279d1957a9d40caf243cddcd7eca171bd594d5 | fc9509b72acc753eaae129a1fcb27cd9f8ee56b0 | /zhengtu/libscenesserver/ScenesServer.cpp | aa9a3c6c9b09a4724f4160483a11897c9acfef1e | [] | no_license | edolphin-ydf/hydzhengtu | 25df5567226c5b7533e24631ae3d641ee0182aa9 | 724601751c00702438ffb93c1411226ae21f46a0 | refs/heads/master | 2020-12-31T03:25:48.625000 | 2012-10-24T10:58:00 | 2012-10-24T10:58:00 | 49,243,199 | 2 | 1 | null | null | null | null | GB18030 | C++ | false | false | 25,534 | cpp | /**
* \brief zebra项目场景服务器,游戏绝大部分内容都在本实现
*/
//#include <zebra/ScenesServer.h>
#include "duplicateManager.h"
#include "scriptTickTask.h"
#include "meterialsManager.h"
#include <zebra/csBox.h>
#include "giftBox.h"
#include "boxCircle.h"
ScenesService *ScenesService::instance = NULL;
bool ScenesService::reload=false;
zLogger * ScenesService::gmlogger = NULL;
zLogger * ScenesService::objlogger = NULL;
zLogger * ScenesService::wglogger = NULL;
std::set<DWORD> dupMapList;
WORD max_level = 0;
QWORD max_exp = 0;
WORD trun_point_rate = 0;
WORD trun_skill_rate = 0;
//sky 装备掉落极品几率
WORD g_blue_changce = 0;
WORD g_green_changce = 0;
WORD g_purple_changce = 0;
WORD g_orange_changce = 0;
//sky 有益技能列表
std::vector<DWORD> UseableMagicList;
//sky 冷却时间配置表
std::vector<stXmlItemCoolTime> vXmlItemCoolTime;
//[Shx Add 套装配置表]
std::vector<stxml_SuitAttribute> vXmlSuitAttribute;
std::vector<BYTE> CoolTimeSendData;
//sky 打坐恢复系数(默认是4%)
WORD recoverRate = 4;
Cmd::stChannelChatUserCmd * ScenesService::pStampData = 0;
/// 判国所需经费
DWORD cancel_country_need_money = 50000; //默认五锭
DWORD is_cancel_country = 0; // 是否允许叛国
NFilterModuleArray g_nFMA;
//[shx Add 给套装物品一个标志,使其可以被快速定位]
void InitObjBase_SuitData()
{
for(int i = 0; i < vXmlSuitAttribute.size(); i ++)
{
LPDWORD pParts = vXmlSuitAttribute[i].MemberList;
for(int j = 0; j < vXmlSuitAttribute[i].count; j ++)
{
zObjectB* pBase = objectbm.get(pParts[j]);
if(pBase )
{
if( pBase->nSuitData >= 0)
printf("\n错误: 物品 %u 在套装配置文件中被重复使用\n", pParts[j]);
pBase->nSuitData = i;
}
}
}
}
/**
* \brief 初始化网络服务器程序
*
* 实现了虚函数<code>zService::init</code>
*
* \return 是否成功
*/
bool ScenesService::init()
{
using namespace Cmd;
NFilterModuleArray::const_iterator pIterator;
Zebra::logger->info("ScenesService::init()");
for(int i=0; i<13; i++) countryPower[i]=1;
//初始化连接线程池
int state = state_none;
to_lower(Zebra::global["threadPoolState"]);
if ("repair" == Zebra::global["threadPoolState"]
|| "maintain" == Zebra::global["threadPoolState"])
state = state_maintain;
taskPool = new zTCPTaskPool(atoi(Zebra::global["threadPoolServer"].c_str()),state,5000);
max_level = atoi(Zebra::global["maxlevel"].c_str());
max_exp = atoi(Zebra::global["maxExp"].c_str());
char *duplist = const_cast<char*>(Zebra::global["duplicate"].c_str());
char *token = strtok( duplist,";" );
while( token != NULL )
{
dupMapList.insert(atoi(token));
token = strtok( NULL,";");
}
trun_point_rate = atoi(Zebra::global["trun_point_rate"].c_str());
trun_skill_rate = atoi(Zebra::global["trun_skill_rate"].c_str());
//sky 从配置文件中读取极品掉落基本配置
g_blue_changce = atoi(Zebra::global["g_blue_changce"].c_str()); //蓝色
g_green_changce = atoi(Zebra::global["g_green_changce"].c_str()); //绿色
g_purple_changce = atoi(Zebra::global["g_purple_changce"].c_str()); //紫色
g_orange_changce = atoi(Zebra::global["g_orange_changce"].c_str()); //橙色
//sky 从配置文件中读取打坐恢复系数
recoverRate = atoi(Zebra::global["recoverRate"].c_str());
fprintf(stderr,"maxlevel %ld\n",atoi(Zebra::global["maxlevel"].c_str()));
fprintf(stderr,"maxlexp %ld\n",atoi(Zebra::global["maxExp"].c_str()));
fprintf(stderr, "基本蓝色装备掉落率: %ld\n",g_blue_changce);
fprintf(stderr, "基本绿色装备掉落率: %ld\n",g_green_changce);
fprintf(stderr, "基本紫色装备掉落率: %ld\n",g_purple_changce);
fprintf(stderr, "基本橙色装备掉落率: %ld\n",g_orange_changce);
fprintf(stderr, "打坐恢复系数: %u%%\n", recoverRate);
if (NULL == taskPool
|| !taskPool->init())
return false;
strncpy(pstrIP,zSocket::getIPByIfName(Zebra::global["ifname"].c_str()),MAX_IP_LENGTH - 1);
//Zebra::logger->debug("%s",pstrIP);
if (!zSubNetService::init())
{
return false;
}
const Cmd::Super::ServerEntry *serverEntry = NULL;
//连接档案服务器
serverEntry = getServerEntryByType(RECORDSERVER);
if (NULL == serverEntry)
{
Zebra::logger->error("不能找到档案服务器相关信息,不能连接档案服务器");
return false;
}
recordClient = new RecordClient("档案服务器客户端",serverEntry->pstrIP,serverEntry->wdPort);
if (NULL == recordClient)
{
Zebra::logger->error("没有足够内存,不能建立档案服务器客户端实例");
return false;
}
if (!recordClient->connectToRecordServer())
{
Zebra::logger->error("ScenesService::init 连接档案服务器失败");
return false;
}
if (recordClient->start())
{
}
//Zebra::logger->info("初始化档案服务器模块(%s:%d)成功",serverEntry->pstrIP,serverEntry->wdPort);
//连接会话服务器
serverEntry = getServerEntryByType(SESSIONSERVER);
if (NULL == serverEntry)
{
Zebra::logger->error("不能找到会话服务器相关信息,不能连接会话服务器");
return false;
}
sessionClient = new SessionClient("会话服务器客户端",serverEntry->pstrIP,serverEntry->wdPort);
if (NULL == sessionClient)
{
Zebra::logger->error("没有足够内存,不能建立会话服务器客户端实例");
return false;
}
if (!sessionClient->connectToSessionServer())
{
Zebra::logger->error("ScenesService::init 连接会话服务器失败");
return false;
}
if (sessionClient->start())
Zebra::logger->info("初始化会话服务器模块(%s:%d)成功",serverEntry->pstrIP,serverEntry->wdPort);
//连接小游戏服务器
serverEntry = getServerEntryByType(MINISERVER);
if (NULL == serverEntry)
{
Zebra::logger->error("不能找到小游戏服务器相关信息,不能连接小游戏服务器");
return false;
}
miniClient = new MiniClient("小游戏服务器客户端",serverEntry->pstrIP,serverEntry->wdPort,serverEntry->wdServerID);
if (NULL == miniClient)
{
Zebra::logger->error("没有足够内存,不能建立小游戏服务器客户端实例");
return false;
}
if (!miniClient->connectToMiniServer())
{
Zebra::logger->error("ScenesService::init 连接小游戏服务器失败");
return false;
}
if (!miniClient->start())
{
Zebra::logger->warn("初始化Mini服务器模块失败");
}
else{
Zebra::logger->info("初始化Mini服务器模块(%s:%d)成功",serverEntry->pstrIP,serverEntry->wdPort);
}
if (!SceneNpcManager::getMe().init())
{
Zebra::logger->warn("初始化NPC管理器失败");
}
else{
Zebra::logger->info("初始化NPC管理器成功");
}
if (!SceneTimeTick::getInstance().start())
{
Zebra::logger->warn("初始化TimeTick模块失败");
}
else{
Zebra::logger->info("初始化TimeTick模块成功");
}
//加载基本数据
if (!loadAllBM())
{
Zebra::logger->error("初始化基本数据模块失败");
return false;
}
Zebra::logger->info("初始化基本数据模块成功");
char srv[256];
bzero(srv,sizeof(srv));
sprintf(srv,"WS[%d]",getServerID());
objlogger = new zLogger(srv);
objlogger->setLevel(Zebra::global["log"]);
//设置写本地日志文件
if ("" != Zebra::global["objlogfilename"])
{
bzero(srv,sizeof(srv));
char sub[256];
bzero(sub,sizeof(sub));
_snprintf(srv,sizeof(srv),"%s",Zebra::global["objlogfilename"].c_str());
char *tok = strstr(srv,".");
if (tok != NULL)
{
strncpy(sub,tok,sizeof(sub));
bzero(tok,strlen(tok));
sprintf(srv + strlen(srv),"%d",getServerID());
strncat(srv,sub,sizeof(srv) - strlen(srv));
}
else
{
_snprintf(srv + strlen(srv),sizeof(srv) - strlen(srv),"%d",getServerID());
}
objlogger->addLocalFileLog(srv);
objlogger->removeConsoleLog();
}
gmlogger = new zLogger("gmlog");
gmlogger->setLevel(Zebra::global["log"]);
if ("" != Zebra::global["gmlogfilename"]){
gmlogger->addLocalFileLog(Zebra::global["gmlogfilename"]);
gmlogger->removeConsoleLog();
}
wglogger = new zLogger("wglog");
wglogger->setLevel(Zebra::global["log"]);
if ("" != Zebra::global["wglogfilename"]){
wglogger->addLocalFileLog(Zebra::global["wglogfilename"]);
wglogger->removeConsoleLog();
}
Zebra::logger->info("加载特征码文件,大小%u",updateStampData());
if (!SceneManager::getInstance().init())
{
Zebra::logger->error("初始化场景管理器失败");
return false;
}
Zebra::logger->info("初始化场景管理器成功");
if (!NpcTrade::getInstance().init())
{
Zebra::logger->error("初始化NPC交易配置模块失败");
return false;
}
Zebra::logger->info("初始化NPC交易配置模块成功");
ALLVARS1(server_id,getServerID());
ALLVARS(load);
if (!QuestTable::instance().init())
{
Zebra::logger->error("初始化任务模块失败");
return false;
}
Zebra::logger->info("初始化任务模块成功");
LuaVM* vm = ScriptingSystemLua::instance().createVM();
LuaScript* script = ScriptingSystemLua::instance().createScriptFromFile("newquest/quest.lua");
Binder bind;
bind.bind(vm);
vm->execute(script);
SAFE_DELETE(script);
//sppeed up
ScriptQuest::get_instance().sort();
if (!MagicRangeInit::getInstance().init())
{
Zebra::logger->error("初始化攻击范围定义模块失败");
return false;
}
Zebra::logger->info("初始化攻击范围定义模块成功");
CountryDareM::getMe().init();
CountryTechM::getMe().init();
CountryAllyM::getMe().init();
loadFilter(g_nFMA,"ScenesServer_*.dll");
//init
for(pIterator=g_nFMA.begin(); pIterator != g_nFMA.end();pIterator++)
{
if (NULL != pIterator->filter_init)
{
pIterator->filter_init();
}
}
Zebra::logger->info("ScenesService::init() OK");
globalBox::newInstance();
globalBox::getInstance().init();
boxCircle::newInstance();
scriptMessageFilter::initFilter();
//Shx 读取套装配置列表
LoadSuitInfo();
InitObjBase_SuitData();
//sky 读取物品冷却列表
LoadItmeCoolTime();
//sky 把读到的冷却数据风装成发给客户端的数据包
StlToSendData();
//duplicateManager::newInstance();
return true;
}
/**
* \brief 新建立一个连接任务
*
* 实现纯虚函数<code>zNetService::newTCPTask</code>
*
* \param sock TCP/IP连接
* \param addr 地址
*/
void ScenesService::newTCPTask(const SOCKET sock,const struct sockaddr_in *addr)
{
#ifdef ZEBRA_RELEASE
char szLimit[256];
//limit
EPE_GetRegisterInfo(EPEGRI_REGINFO,szLimit,sizeof(szLimit));
if (taskPool->getSize() >= atoi(szLimit))
{
::closesocket(sock);
return;
}
#endif //ZEBRA_RELEASE
SceneTask *tcpTask = new SceneTask(taskPool,sock,addr);
zTCPTask* pTask = (zTCPTask*)tcpTask;
if (NULL == tcpTask)
{
//内存不足,直接关闭连接
::closesocket(sock);
}
else if (!taskPool->addVerify(tcpTask))
{
//得到了一个正确连接,添加到验证队列中
SAFE_DELETE(tcpTask);
}
}
/**
* \brief 解析来自管理服务器的指令
*
* 这些指令是网关和管理服务器交互的指令<br>
* 实现了虚函数<code>zSubNetService::msgParse_SuperService</code>
*
* \param pNullCmd 待解析的指令
* \param nCmdLen 待解析的指令长度
* \return 解析是否成功
*/
bool ScenesService::msgParse_SuperService(const Cmd::t_NullCmd *pNullCmd,const DWORD nCmdLen)
{
switch(pNullCmd->cmd)
{
case Cmd::GmTool::CMD_GMTOOL:
{
using namespace Cmd::GmTool;
switch(pNullCmd->para)
{
case PARA_PUNISH_GMTOOL:
{
t_Punish_GmTool * rev = (t_Punish_GmTool *)pNullCmd;
SceneUser *pUser = SceneUserManager::getMe().getUserByName(rev->userName);
if (!pUser) break;
switch (rev->operation)
{
case 1://禁言
{
pUser->delayForbidTalk(rev->delay);
if (rev->delay>0)
{
Channel::sendSys(pUser,Cmd::INFO_TYPE_FAIL,"你被GM禁言 %d 秒",rev->delay);
ScenesService::gmlogger->info("玩家 %s 被禁言 %d 秒",pUser->name,rev->delay);
}
else
{
Channel::sendSys(pUser,Cmd::INFO_TYPE_FAIL,"你被GM解除禁言,现在可以说话了");
ScenesService::gmlogger->info("玩家 %s 被解除禁言",pUser->name);
}
}
break;
case 2://关禁闭
break;
case 3://踢下线
{
OnQuit event(1);
EventTable::instance().execute(*pUser,event);
execute_script_event(pUser,"quit");
pUser->save(Cmd::Record::LOGOUT_WRITEBACK);
Cmd::Session::t_unregUser_SceneSession ret;
ret.dwUserID=pUser->id;
ret.dwSceneTempID=pUser->scene->tempid;
ret.retcode=Cmd::Session::UNREGUSER_RET_ERROR;
sessionClient->sendCmd(&ret,sizeof(ret));
Cmd::Scene::t_Unreg_LoginScene retgate;
retgate.dwUserID = pUser->id;
retgate.dwSceneTempID = pUser->scene->tempid;
retgate.retcode = Cmd::Scene::UNREGUSER_RET_ERROR;
pUser->gatetask->sendCmd(&retgate,sizeof(retgate));
pUser->unreg();
}
break;
case 4://警告
{
Channel::sendSys(pUser,Cmd::INFO_TYPE_FAIL,rev->reason);
}
break;
default:
return true;
}
rev->level = pUser->charbase.level;
rev->accid = pUser->charbase.accid;
zRTime ct;
rev->startTime = ct.sec();
strncpy(rev->country,SceneManager::getInstance().getCountryNameByCountryID(pUser->charbase.country),MAX_NAMESIZE);
ScenesService::getInstance().sendCmdToSuperServer(rev,sizeof(t_Punish_GmTool));
}
break;
}
}
break;
}
Zebra::logger->error("ScenesService::msgParse_SuperService(%u,%u,%u)",pNullCmd->cmd,pNullCmd->para,nCmdLen);
return false;
}
/**
* \brief 结束网络服务器
*
* 实现了纯虚函数<code>zService::final</code>
*
*/
void ScenesService::final()
{
NFilterModuleArray::const_iterator pIterator;
//term
for(pIterator=g_nFMA.begin(); pIterator != g_nFMA.end();pIterator++)
{
if (NULL != pIterator->filter_term)
{
pIterator->filter_term();
}
}
SceneTimeTick::getInstance().final();
SceneTimeTick::getInstance().join();
SceneTimeTick::delInstance();
SceneUserManager::getMe().removeAllUser();
if (taskPool)
{
taskPool->final();
SAFE_DELETE(taskPool);
}
if (sessionClient)
{
sessionClient->final();
sessionClient->join();
SAFE_DELETE(sessionClient);
}
if (recordClient)
{
recordClient->final();
recordClient->join();
SAFE_DELETE(recordClient);
}
SceneTaskManager::delInstance();
SceneManager::delInstance();
GlobalObjectIndex::delInstance();
NpcTrade::delInstance();
unloadAllBM();
zSubNetService::final();
Zebra::logger->debug("ScenesService::final");
SAFE_DELETE(gmlogger);
}
/**
* \brief 读取配置文件
*
*/
class SceneConfile:public zConfile
{
bool parseYour(const xmlNodePtr node)
{
if (node)
{
xmlNodePtr child=parser.getChildNode(node,NULL);
while(child)
{
parseNormal(child);
child=parser.getNextNode(child,NULL);
}
return true;
}
else
return false;
}
};
/**
* \brief 重新读取配置文件,为HUP信号的处理函数
*
*/
void ScenesService::reloadConfig()
{
reload=true;
Zebra::logger->debug("ScenesService::reloadConfig");
}
void ScenesService::checkAndReloadConfig()
{
if (reload)
{
reload=false;
Zebra::logger->debug("ScenesService::checkAndReloadConfig");
SceneConfile sc;
sc.parse("ScenesServer");
loadAllBM();
NpcTrade::getInstance().init();
//MessageSystem::getInstance().init();
//定时存档配置
if (atoi(Zebra::global["writebacktimer"].c_str()))
{
ScenesService::getInstance().writeBackTimer = atoi(Zebra::global["writebacktimer"].c_str());
}
else
{
ScenesService::getInstance().writeBackTimer = 600;
}
ScenesService::getInstance().ExpRate = atoi(Zebra::global["ExpRate"].c_str());
ScenesService::getInstance().DropRate = atoi(Zebra::global["DropRate"].c_str());
ScenesService::getInstance().DropRateLevel = atoi(Zebra::global["DropRateLevel"].c_str());
//指令检测开关
if (Zebra::global["cmdswitch"] == "true")
{
zTCPTask::analysis._switch = true;
zTCPClient::analysis._switch=true;
}
else
{
zTCPTask::analysis._switch = false;
zTCPClient::analysis._switch=false;
}
}
}
/**
* \brief 重新读取特征码文件
*
*/
DWORD ScenesService::updateStampData()
{
std::string process_file;
if (pStampData)
{
free(pStampData);
pStampData = 0;
}
int f=0;
process_file = Zebra::global["confdir"] + "process.dat";
// f = open(process_file.c_str(),O_RDONLY);
/* if (f != -1)
{
pStampData = (Cmd::stChannelChatUserCmd *)malloc(zSocket::MAX_DATASIZE);
bzero(pStampData,zSocket::MAX_DATASIZE);
constructInPlace(pStampData);
pStampData->dwType = Cmd::CHAT_TYPE_SYSTEM;
pStampData->dwSysInfoType = Cmd::INFO_TYPE_GAME;
strncpy(pStampData->pstrChat,"欢迎来到HydTest",MAX_CHATINFO-1);
pStampData->dwFromID = read(f,(void *)(pStampData->tobject_array),zSocket::MAX_DATASIZE-sizeof(Cmd::stChannelChatUserCmd));
close(f);
pStampData->dwChannelID = atoi(Zebra::global["service_flag"].c_str()) & Cmd::Session::SERVICE_PROCESS;
return pStampData->dwFromID;
}*/
return 1;
//return 0;
}
/**
* \brief 主程序入口
*
* \param argc 参数个数
* \param argv 参数列表
* \return 运行结果
*/
int service_main(int argc,char *argv[])
{
Zebra::logger=new zLogger("ScenesServer");
//设置缺省参数
Zebra::global["datadir"] = "data/";
Zebra::global["confdir"] = "conf/";
Zebra::global["questdir"] = "quest/";
Zebra::global["cmdswitch"] = "true";
Zebra::global["writebacktimer"] = "600";
Zebra::global["ExpRate"] = "1";
Zebra::global["DropRate"] = "1";
Zebra::global["DropRateLevel"] = "0";
Zebra::global["mail_service"] = "on";
//解析配置文件参数
SceneConfile sc;
if (!sc.parse("ScenesServer"))
return -1;
//设置日志级别
Zebra::logger->setLevel(Zebra::global["log"]);
//设置写本地日志文件
if ("" != Zebra::global["logfilename"]){
Zebra::logger->addLocalFileLog(Zebra::global["logfilename"]);
Zebra::logger->removeConsoleLog();
}
if (atoi(Zebra::global["writebacktimer"].c_str()))
{
ScenesService::getInstance().writeBackTimer = atoi(Zebra::global["writebacktimer"].c_str());
}
else
{
ScenesService::getInstance().writeBackTimer = 600;
}
ScenesService::getInstance().ExpRate = atoi(Zebra::global["ExpRate"].c_str());
ScenesService::getInstance().DropRate = atoi(Zebra::global["DropRate"].c_str());
ScenesService::getInstance().DropRateLevel = atoi(Zebra::global["DropRateLevel"].c_str());
//指令检测开关
if (Zebra::global["cmdswitch"] == "true")
{
zTCPTask::analysis._switch = true;
zTCPClient::analysis._switch=true;
}
else
{
zTCPTask::analysis._switch = false;
zTCPClient::analysis._switch=false;
}
scriptTaskManagement::newInstance();
meterialsManager::newInstance();
duplicateManager::newInstance();
Zebra_Startup();
ScenesService::getInstance().main();
ScenesService::delInstance();
SceneUserManager::destroyMe();
return 0;
}
//[Shx Add 读取套装配置信息]
bool ScenesService::LoadSuitInfo()
{
char sFileName[MAX_PATH];
strcpy( sFileName, "data/SuitInfo.xml" );
zXMLParser xml;
if (!xml.initFile(sFileName))
{
Zebra::logger->error("加载套装配置文件 %s 失败",sFileName);
return false;
}
xmlNodePtr _root;
xmlNodePtr _suits;
_root = xml.getRootNode("HREO");
_suits = xml.getChildNode(_root, "SUITS");
if(_root && _suits)
{
xmlNodePtr _node = xml.getChildNode(_suits,"suit");
while (_node)
{
stxml_SuitAttribute stData;
xml.getNodePropNum(_node, "id", &stData.id, 2);
std::string str="";
xml.getNodePropStr(_node, "name", str);
strncpy(stData.Name, str.c_str(), 30);
xmlNodePtr _part = xml.getChildNode(_node, "part");
int n_p = 0;
while (_part && n_p < MAX_SUIT_NUM)
{
xml.getNodePropNum(_part,"itemid", &stData.MemberList[n_p], 4);
n_p ++;
_part = xml.getNextNode(_part,"part");
}
stData.count = n_p;
int n_e = 0;
xmlNodePtr _Effect = xml.getChildNode(_node, "effect");
while (_Effect && n_e < MAX_SUIT_NUM)
{
st_SuitEffect stEffect;
xml.getNodePropNum(_Effect, "itemcount",&stEffect.eRequire, 1);
xml.getNodePropNum(_Effect, "ekey", &stEffect.eKey, 1);
xml.getNodePropNum(_Effect, "evalue", &stEffect.eValue, 2);
stData.EffectList.push_back(stEffect);
n_e ++;
_Effect = xml.getNextNode(_Effect,"effect");
}
stData.eCount = n_e;
vXmlSuitAttribute.push_back(stData);
_node = xml.getNextNode(_node, "suit");
printf("加载套装 %s,部件: %d, 属性: %d\n", stData.Name, n_p, n_e);
}
printf("读取套装配置记录: %d\n", vXmlSuitAttribute.size());
return true;
}
Zebra::logger->error("读取套装配置文件 %s 失败",sFileName);
return false;
}
//End Shx
bool ScenesService::LoadItmeCoolTime()
{
char CoolFileName[MAX_PATH];
strcpy( CoolFileName, "data/ItemCoolTime.xml" );
zXMLParser xml;
if (!xml.initFile(CoolFileName))
{
Zebra::logger->error("加载物品冷却文件 %s 失败",CoolFileName);
return false;
}
xmlNodePtr root;
root = xml.getRootNode("CoolTime");
if (root)
{
xmlNodePtr node = xml.getChildNode(root,"cooldown");
while (node)
{
stXmlItemCoolTime CoolTiem;
stItemTypeCoolTiem TypeCool;
stItemIdCoolTime IdCool;
if(!xml.getNodePropNum(node, "CoolID", &(CoolTiem.CoolTimeType),sizeof(WORD)))
{
return false;
}
if(!xml.getNodePropNum(node, "times", &(CoolTiem.nCoolTime), sizeof(DWORD)))
{
return false;
}
xmlNodePtr phaseNode = xml.getChildNode(node,"objclass");
while(phaseNode)
{
if(!xml.getNodePropNum(phaseNode, "type", &(TypeCool.ItemType), sizeof(WORD)))
{
return false;
}
if(!xml.getNodePropNum(phaseNode, "time", &(TypeCool.CoolTime), sizeof(DWORD)))
{
TypeCool.CoolTime = 0;
}
CoolTiem.TypeCoolTime.push_back(TypeCool);
phaseNode = xml.getNextNode(phaseNode, "objclass");
}
xmlNodePtr IdNode = xml.getChildNode(node, "objid");
while(IdNode)
{
if(!xml.getNodePropNum(IdNode, "id", &(IdCool.ItemID), sizeof(DWORD)))
{
return false;
}
if(!xml.getNodePropNum(IdNode, "time", &(IdCool.CoolTime), sizeof(DWORD)))
{
IdCool.CoolTime = 0;
}
CoolTiem.IdCoolTime.push_back(IdCool);
IdNode = xml.getNextNode(IdNode, "objid");
}
vXmlItemCoolTime.push_back(CoolTiem);
node = xml.getNextNode(node,"cooldown");
}
int count = vXmlItemCoolTime.size();
printf("读取物品冷却类型数量:%d", count);
return true;
}
return false;
}
bool ScenesService::StlToSendData()
{
int nLen = 0;
int index = 0;
std::vector<stXmlItemCoolTime>::iterator iter;
std::vector<stItemTypeCoolTiem>::iterator iter1;
std::vector<stItemIdCoolTime>::iterator iter2;
for(iter=vXmlItemCoolTime.begin(); iter!=vXmlItemCoolTime.end(); iter++)
{
nLen += iter->TypeCoolTime.size() * sizeof(stItemTypeCoolTiem); // TypeCoolTime
nLen += iter->IdCoolTime.size() * sizeof(stItemIdCoolTime); // IdCoolTime
}
nLen += vXmlItemCoolTime.size() * sizeof(WORD); // TypeCoolTime
nLen += vXmlItemCoolTime.size() * sizeof(DWORD);// nCoolTime
CoolTimeSendData.resize(nLen + sizeof(Cmd::stItemCoolTimesUserCmd) + sizeof(WORD) * vXmlItemCoolTime.size() * 2);
Cmd::stItemCoolTimesUserCmd cmd(vXmlItemCoolTime.size());
memccpy(&CoolTimeSendData[index], &cmd, sizeof(Cmd::stItemCoolTimesUserCmd), sizeof(Cmd::stItemCoolTimesUserCmd));
index += sizeof(Cmd::stItemCoolTimesUserCmd);
for(iter=vXmlItemCoolTime.begin(); iter!=vXmlItemCoolTime.end(); iter++)
{
memccpy(&CoolTimeSendData[index],&(*iter).CoolTimeType, sizeof(WORD), sizeof(WORD));
index += sizeof(WORD);
memccpy(&CoolTimeSendData[index],&(*iter).nCoolTime, sizeof(DWORD), sizeof(DWORD));
index += sizeof(DWORD);
WORD Count = iter->TypeCoolTime.size();
memccpy(&CoolTimeSendData[index],&Count, sizeof(WORD), sizeof(WORD));
index += sizeof(WORD);
for(iter1=iter->TypeCoolTime.begin(); iter1!=iter->TypeCoolTime.end(); iter1++)
{
memccpy(&CoolTimeSendData[index], &(*iter1), sizeof(stItemTypeCoolTiem), sizeof(stItemTypeCoolTiem));
index += sizeof(stItemTypeCoolTiem);
}
Count = iter->IdCoolTime.size();
memccpy(&CoolTimeSendData[index],&Count, sizeof(WORD), sizeof(WORD));
index += sizeof(WORD);
for(iter2=iter->IdCoolTime.begin(); iter2!=iter->IdCoolTime.end(); iter2++)
{
memccpy(&CoolTimeSendData[index], &(*iter2), sizeof(stItemIdCoolTime), sizeof(stItemIdCoolTime));
index += sizeof(stItemIdCoolTime);
}
}
return true;
} | [
"hyd998877@gmail.com"
] | hyd998877@gmail.com |
15c2275b38b01448a0e16290283bfdb1a57b42b1 | a0ae1750c31ce81fba097c8a9f241d75c72a9890 | /C++_2006/mcxor/mcxor.cpp | 2bf3134c78e717c1464e8dcb8ab3bedd2dc746e3 | [] | no_license | pmkenned/early_coding | 7de3992f874948a393cf76fc7df5439cf54bddd5 | b9439adf010b44cb3320ef8a27d927d3c5d5aa0c | refs/heads/main | 2023-01-13T02:59:40.114574 | 2020-11-15T08:13:16 | 2020-11-15T08:13:16 | 312,982,334 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,105 | cpp | /*
XOR.cpp
Matthew Costuros
snoborder420@yahoo.com
AIM: Rpi Matty
Proper usage is XOR.exe filename Key
Encrypt the file with a key 324
XOR.exe plain.txt 324
Decrypt that file
XOR.exe plain.enc 324
Encrypt a top secret file
XOR.exe keepsafe.txt 56765
Decrypt that secret file
XOR.exe keepsafe.end 56765
*/
#include <iostream.h>
#include <string.h>
#include <stdio.h>
int XOR(char * filename, unsigned long key);
int main(int argv, char ** argc)
{
unsigned long key;
char filename[100];
//if they used command line arguments pass the filename and key to xor function
if( argv == 3)
{
if( XOR(argc[1],(unsigned int)atol(argc[2]) ) )
{
cout << "There was an error trying to encrypt/decrypt the file " << argc[1] << endl;
}
}
//other wise prompt for the key and filename
else
{
cout << "What is the filename?" << endl;
cin.getline(filename,99,'\n');
cout << "What is the key?" << endl;
cin >> key;
//tell the user about command line then call xor function
cout << "Next time you can use the command line, the format is " << argc[0] << " filename key" << endl;
if( XOR(filename,key) )
{
cout << "There was an error trying encrypt/decrpyt the file " << filename << endl;
}
}
return 0;
}
int XOR(char * filename, unsigned long key)
{
FILE * input = NULL , *output = NULL;
char * outfilename = NULL;
int len = strlen(filename);
unsigned char buffer;
if( (filename[len-4] == '.') && (filename[len-3] == 'e') && (filename[len-2] == 'n') && (filename[len-1] == 'c') )
{
// our input file is encoded then we will create a file without the .end extension
outfilename = new char[len+1]; //make room for the name+\0
strcpy(outfilename,filename); //copy the string name
outfilename[len-4] = '\0'; //put the \0 before the .enc extension to cut it off
}
else
{
outfilename = new char[len+5]; //make room for the name + .enc + \0
strcpy(outfilename,filename); //copy the file name
strncat(outfilename,".enc",4); //add the .enc extension
}
input = fopen(filename,"rb");
if( input == NULL)
{
cout << "Error opening file " << filename << endl;
delete [] outfilename; //free the memory before leaving
outfilename = NULL;
return 1;
}
output = fopen(outfilename,"wb");
if( output == NULL )
{
cout << "Error creating output file " << outfilename << endl;
delete [] outfilename; //free the mem before leaving
outfilename = NULL;
return 1;
}
while( ! feof(input) )
{
//get some data
if( fread(&buffer,sizeof(unsigned char),1,input) != 1 )
{
//if we didnt get any data, but we are not at the eof, then an error has occured
if( ! feof(input) )
{
delete [] outfilename;
outfilename = NULL;
fclose(input);
fclose(output);
return 1;
}
}
else
{
//xor that data
buffer ^= key;
//write some data
fwrite(&buffer,sizeof(unsigned char),1,output);
}
}
//close the files and free that memory
fclose(input);
fclose(output);
delete [] outfilename;
return 0;
}
| [
"paul.kennedy124@gmail.com"
] | paul.kennedy124@gmail.com |
4a2b691572ea099eee4a7c63c5b5dd28641a4b8b | c03b90224403e792b340c256d8a8ae486e556841 | /util/Smooth.h | 5eb4ad2d88f4cb216d74afaa33b069f18701d4be | [] | no_license | aegolden/libSPRITE | 6f1793258d7b0d07dd38476981a7b0c90d10c256 | 4a6250529c0284f76dc44dc6538f84ea26961a31 | refs/heads/master | 2021-01-13T16:30:57.182114 | 2016-09-25T20:20:03 | 2016-09-25T20:20:03 | 69,188,128 | 0 | 0 | null | 2016-09-25T20:14:57 | 2016-09-25T20:14:57 | null | UTF-8 | C++ | false | false | 1,110 | h | #ifndef __UTIL_SMOOTH_H__
#define __UTIL_SMOOTH_H__
#include "util/Sample_set.h"
namespace util {
/**
* Compute a Savitzky-Golay smoothed value of the set of data points
* provided. The points represent a window and the SV is a form of average
* that makes a least-squares fit to the data. In this case we use a cubic
* polynomial fit.
* @param points Set of points to be smoothed.
* @return Estimated value at the center of the window.
* @satisfies{util-3.1}
*/
template <typename T> T savgol_cubic(Sample_set<T> &points);
/**
* Compute a Savitzky-Golay first derivative of the set of data points
* provided. The points represent a window and the SV is a form of average
* that makes a least-squares fit to the data. In this case we use a cubic
* polynomial fit.
* @param points Set of points to be smoothed.
* @return Estimated derivative at the center of the window.
* @satisfies{util-4.1}
*/
template <typename T> double savgol_cubic_dx(Sample_set<T> &points);
} // namespace
#endif // __UTIL_SMOOTH_H__
| [
"daniel@heatertech.com"
] | daniel@heatertech.com |
dec301b0bed447b234ce4f0bd33d48fccd116af2 | e872d90abeac8ac54d0792631afbdb14b716645f | /source/common/http/conn_manager_impl.h | 49702004c725fe773bb00f42cffb177a8b5da9ff | [] | no_license | vincentlao/EnvoyStudy | 4a0c46bced39f18cbdba5611c927a6492afa446f | 4ea8e687d738d36c05742b89d58bde0931676c15 | refs/heads/master | 2020-04-15T05:56:50.538344 | 2018-07-24T11:25:36 | 2018-07-24T11:25:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 19,681 | h | #pragma once
#include <chrono>
#include <cstdint>
#include <functional>
#include <list>
#include <memory>
#include <string>
#include <vector>
#include "envoy/access_log/access_log.h"
#include "envoy/event/deferred_deletable.h"
#include "envoy/http/codec.h"
#include "envoy/http/filter.h"
#include "envoy/http/websocket.h"
#include "envoy/network/connection.h"
#include "envoy/network/drain_decision.h"
#include "envoy/network/filter.h"
#include "envoy/router/rds.h"
#include "envoy/runtime/runtime.h"
#include "envoy/ssl/connection.h"
#include "envoy/stats/stats_macros.h"
#include "envoy/tracing/http_tracer.h"
#include "envoy/upstream/upstream.h"
#include "common/buffer/watermark_buffer.h"
#include "common/common/linked_object.h"
#include "common/grpc/common.h"
#include "common/http/conn_manager_config.h"
#include "common/http/user_agent.h"
#include "common/http/utility.h"
#include "common/request_info/request_info_impl.h"
#include "common/tracing/http_tracer_impl.h"
namespace Envoy {
namespace Http {
/**
* Implementation of both ConnectionManager and ServerConnectionCallbacks. This is a
* Network::Filter that can be installed on a connection that will perform HTTP protocol agnostic
* handling of a connection and all requests/pushes that occur on a connection.
*/
class ConnectionManagerImpl : Logger::Loggable<Logger::Id::http>,
public Network::ReadFilter,
public ServerConnectionCallbacks,
public Network::ConnectionCallbacks {
public:
ConnectionManagerImpl(ConnectionManagerConfig& config, const Network::DrainDecision& drain_close,
Runtime::RandomGenerator& random_generator, Tracing::HttpTracer& tracer,
Runtime::Loader& runtime, const LocalInfo::LocalInfo& local_info,
Upstream::ClusterManager& cluster_manager);
~ConnectionManagerImpl();
static ConnectionManagerStats generateStats(const std::string& prefix, Stats::Scope& scope);
static ConnectionManagerTracingStats generateTracingStats(const std::string& prefix,
Stats::Scope& scope);
static void chargeTracingStats(const Tracing::Reason& tracing_reason,
ConnectionManagerTracingStats& tracing_stats);
static ConnectionManagerListenerStats generateListenerStats(const std::string& prefix,
Stats::Scope& scope);
static const HeaderMapImpl& continueHeader();
// Network::ReadFilter
Network::FilterStatus onData(Buffer::Instance& data, bool end_stream) override;
Network::FilterStatus onNewConnection() override { return Network::FilterStatus::Continue; }
void initializeReadFilterCallbacks(Network::ReadFilterCallbacks& callbacks) override;
// Http::ConnectionCallbacks
void onGoAway() override;
// Http::ServerConnectionCallbacks
StreamDecoder& newStream(StreamEncoder& response_encoder) override;
// Network::ConnectionCallbacks
void onEvent(Network::ConnectionEvent event) override;
// Pass connection watermark events on to all the streams associated with that connection.
void onAboveWriteBufferHighWatermark() override {
codec_->onUnderlyingConnectionAboveWriteBufferHighWatermark();
}
void onBelowWriteBufferLowWatermark() override {
codec_->onUnderlyingConnectionBelowWriteBufferLowWatermark();
}
private:
struct ActiveStream;
/**
* Base class wrapper for both stream encoder and decoder filters.
*/
struct ActiveStreamFilterBase : public virtual StreamFilterCallbacks {
ActiveStreamFilterBase(ActiveStream& parent, bool dual_filter)
: parent_(parent), headers_continued_(false), continue_headers_continued_(false),
stopped_(false), dual_filter_(dual_filter) {}
bool commonHandleAfter100ContinueHeadersCallback(FilterHeadersStatus status);
bool commonHandleAfterHeadersCallback(FilterHeadersStatus status);
void commonHandleBufferData(Buffer::Instance& provided_data);
bool commonHandleAfterDataCallback(FilterDataStatus status, Buffer::Instance& provided_data,
bool& buffer_was_streaming);
bool commonHandleAfterTrailersCallback(FilterTrailersStatus status);
void commonContinue();
virtual bool canContinue() PURE;
virtual Buffer::WatermarkBufferPtr createBuffer() PURE;
virtual Buffer::WatermarkBufferPtr& bufferedData() PURE;
virtual bool complete() PURE;
virtual void do100ContinueHeaders() PURE;
virtual void doHeaders(bool end_stream) PURE;
virtual void doData(bool end_stream) PURE;
virtual void doTrailers() PURE;
virtual const HeaderMapPtr& trailers() PURE;
// Http::StreamFilterCallbacks
const Network::Connection* connection() override;
Event::Dispatcher& dispatcher() override;
void resetStream() override;
Router::RouteConstSharedPtr route() override;
void clearRouteCache() override;
uint64_t streamId() override;
RequestInfo::RequestInfo& requestInfo() override;
Tracing::Span& activeSpan() override;
Tracing::Config& tracingConfig() override;
ActiveStream& parent_;
bool headers_continued_ : 1;
bool continue_headers_continued_ : 1;
bool stopped_ : 1;
const bool dual_filter_ : 1;
};
/**
* Wrapper for a stream decoder filter.
*/
struct ActiveStreamDecoderFilter : public ActiveStreamFilterBase,
public StreamDecoderFilterCallbacks,
LinkedObject<ActiveStreamDecoderFilter> {
ActiveStreamDecoderFilter(ActiveStream& parent, StreamDecoderFilterSharedPtr filter,
bool dual_filter)
: ActiveStreamFilterBase(parent, dual_filter), handle_(filter) {}
// ActiveStreamFilterBase
bool canContinue() override {
// It is possible for the connection manager to respond directly to a request even while
// a filter is trying to continue. If a response has already happened, we should not
// continue to further filters. A concrete example of this is a filter buffering data, the
// last data frame comes in and the filter continues, but the final buffering takes the stream
// over the high watermark such that a 413 is returned.
return !parent_.state_.local_complete_;
}
Buffer::WatermarkBufferPtr createBuffer() override;
Buffer::WatermarkBufferPtr& bufferedData() override { return parent_.buffered_request_data_; }
bool complete() override { return parent_.state_.remote_complete_; }
void do100ContinueHeaders() override { NOT_REACHED; }
void doHeaders(bool end_stream) override {
parent_.decodeHeaders(this, *parent_.request_headers_, end_stream);
}
void doData(bool end_stream) override {
parent_.decodeData(this, *parent_.buffered_request_data_, end_stream);
}
void doTrailers() override { parent_.decodeTrailers(this, *parent_.request_trailers_); }
const HeaderMapPtr& trailers() override { return parent_.request_trailers_; }
// Http::StreamDecoderFilterCallbacks
void addDecodedData(Buffer::Instance& data, bool streaming) override;
void continueDecoding() override;
const Buffer::Instance* decodingBuffer() override {
return parent_.buffered_request_data_.get();
}
void sendLocalReply(Code code, const std::string& body,
std::function<void(HeaderMap& headers)> modify_headers) override {
parent_.sendLocalReply(is_grpc_request_, code, body, modify_headers);
}
void encode100ContinueHeaders(HeaderMapPtr&& headers) override;
void encodeHeaders(HeaderMapPtr&& headers, bool end_stream) override;
void encodeData(Buffer::Instance& data, bool end_stream) override;
void encodeTrailers(HeaderMapPtr&& trailers) override;
void onDecoderFilterAboveWriteBufferHighWatermark() override;
void onDecoderFilterBelowWriteBufferLowWatermark() override;
void
addDownstreamWatermarkCallbacks(DownstreamWatermarkCallbacks& watermark_callbacks) override;
void
removeDownstreamWatermarkCallbacks(DownstreamWatermarkCallbacks& watermark_callbacks) override;
void setDecoderBufferLimit(uint32_t limit) override { parent_.setBufferLimit(limit); }
uint32_t decoderBufferLimit() override { return parent_.buffer_limit_; }
// Each decoder filter instance checks if the request passed to the filter is gRPC
// so that we can issue gRPC local responses to gRPC requests. Filter's decodeHeaders()
// called here may change the content type, so we must check it before the call.
FilterHeadersStatus decodeHeaders(HeaderMap& headers, bool end_stream) {
is_grpc_request_ = Grpc::Common::hasGrpcContentType(headers);
return handle_->decodeHeaders(headers, end_stream);
}
void requestDataTooLarge();
void requestDataDrained();
StreamDecoderFilterSharedPtr handle_;
bool is_grpc_request_{};
};
typedef std::unique_ptr<ActiveStreamDecoderFilter> ActiveStreamDecoderFilterPtr;
/**
* Wrapper for a stream encoder filter.
*/
struct ActiveStreamEncoderFilter : public ActiveStreamFilterBase,
public StreamEncoderFilterCallbacks,
LinkedObject<ActiveStreamEncoderFilter> {
ActiveStreamEncoderFilter(ActiveStream& parent, StreamEncoderFilterSharedPtr filter,
bool dual_filter)
: ActiveStreamFilterBase(parent, dual_filter), handle_(filter) {}
// ActiveStreamFilterBase
bool canContinue() override { return true; }
Buffer::WatermarkBufferPtr createBuffer() override;
Buffer::WatermarkBufferPtr& bufferedData() override { return parent_.buffered_response_data_; }
bool complete() override { return parent_.state_.local_complete_; }
void do100ContinueHeaders() override {
parent_.encode100ContinueHeaders(this, *parent_.continue_headers_);
}
void doHeaders(bool end_stream) override {
parent_.encodeHeaders(this, *parent_.response_headers_, end_stream);
}
void doData(bool end_stream) override {
parent_.encodeData(this, *parent_.buffered_response_data_, end_stream);
}
void doTrailers() override { parent_.encodeTrailers(this, *parent_.response_trailers_); }
const HeaderMapPtr& trailers() override { return parent_.response_trailers_; }
// Http::StreamEncoderFilterCallbacks
void addEncodedData(Buffer::Instance& data, bool streaming) override;
void onEncoderFilterAboveWriteBufferHighWatermark() override;
void onEncoderFilterBelowWriteBufferLowWatermark() override;
void setEncoderBufferLimit(uint32_t limit) override { parent_.setBufferLimit(limit); }
uint32_t encoderBufferLimit() override { return parent_.buffer_limit_; }
void continueEncoding() override;
const Buffer::Instance* encodingBuffer() override {
return parent_.buffered_response_data_.get();
}
void responseDataTooLarge();
void responseDataDrained();
StreamEncoderFilterSharedPtr handle_;
};
typedef std::unique_ptr<ActiveStreamEncoderFilter> ActiveStreamEncoderFilterPtr;
/**
* Wraps a single active stream on the connection. These are either full request/response pairs
* or pushes.
*/
struct ActiveStream : LinkedObject<ActiveStream>,
public Event::DeferredDeletable,
public StreamCallbacks,
public StreamDecoder,
public FilterChainFactoryCallbacks,
public WebSocketProxyCallbacks,
public Tracing::Config {
ActiveStream(ConnectionManagerImpl& connection_manager);
~ActiveStream();
void addStreamDecoderFilterWorker(StreamDecoderFilterSharedPtr filter, bool dual_filter);
void addStreamEncoderFilterWorker(StreamEncoderFilterSharedPtr filter, bool dual_filter);
void chargeStats(const HeaderMap& headers);
std::list<ActiveStreamEncoderFilterPtr>::iterator
commonEncodePrefix(ActiveStreamEncoderFilter* filter, bool end_stream);
const Network::Connection* connection();
void addDecodedData(ActiveStreamDecoderFilter& filter, Buffer::Instance& data, bool streaming);
void decodeHeaders(ActiveStreamDecoderFilter* filter, HeaderMap& headers, bool end_stream);
void decodeData(ActiveStreamDecoderFilter* filter, Buffer::Instance& data, bool end_stream);
void decodeTrailers(ActiveStreamDecoderFilter* filter, HeaderMap& trailers);
void maybeEndDecode(bool end_stream);
void addEncodedData(ActiveStreamEncoderFilter& filter, Buffer::Instance& data, bool streaming);
void sendLocalReply(bool is_grpc_request, Code code, const std::string& body,
std::function<void(HeaderMap& headers)> modify_headers);
void encode100ContinueHeaders(ActiveStreamEncoderFilter* filter, HeaderMap& headers);
void encodeHeaders(ActiveStreamEncoderFilter* filter, HeaderMap& headers, bool end_stream);
void encodeData(ActiveStreamEncoderFilter* filter, Buffer::Instance& data, bool end_stream);
void encodeTrailers(ActiveStreamEncoderFilter* filter, HeaderMap& trailers);
void maybeEndEncode(bool end_stream);
uint64_t streamId() { return stream_id_; }
// Http::StreamCallbacks
void onResetStream(StreamResetReason reason) override;
void onAboveWriteBufferHighWatermark() override;
void onBelowWriteBufferLowWatermark() override;
// Http::StreamDecoder
void decode100ContinueHeaders(HeaderMapPtr&&) override { NOT_REACHED; }
void decodeHeaders(HeaderMapPtr&& headers, bool end_stream) override;
void decodeData(Buffer::Instance& data, bool end_stream) override;
void decodeTrailers(HeaderMapPtr&& trailers) override;
// Http::FilterChainFactoryCallbacks
void addStreamDecoderFilter(StreamDecoderFilterSharedPtr filter) override {
addStreamDecoderFilterWorker(filter, false);
}
void addStreamEncoderFilter(StreamEncoderFilterSharedPtr filter) override {
addStreamEncoderFilterWorker(filter, false);
}
void addStreamFilter(StreamFilterSharedPtr filter) override {
addStreamDecoderFilterWorker(filter, true);
addStreamEncoderFilterWorker(filter, true);
}
void addAccessLogHandler(AccessLog::InstanceSharedPtr handler) override;
// Http::WebSocketProxyCallbacks
void sendHeadersOnlyResponse(HeaderMap& headers) override {
encodeHeaders(nullptr, headers, true);
}
// Tracing::TracingConfig
virtual Tracing::OperationName operationName() const override;
virtual const std::vector<Http::LowerCaseString>& requestHeadersForTags() const override;
void traceRequest();
void refreshCachedRoute();
// Pass on watermark callbacks to watermark subscribers. This boils down to passing watermark
// events for this stream and the downstream connection to the router filter.
void callHighWatermarkCallbacks();
void callLowWatermarkCallbacks();
/**
* Flags that keep track of which filter calls are currently in progress.
*/
// clang-format off
struct FilterCallState {
static constexpr uint32_t DecodeHeaders = 0x01;
static constexpr uint32_t DecodeData = 0x02;
static constexpr uint32_t DecodeTrailers = 0x04;
static constexpr uint32_t EncodeHeaders = 0x08;
static constexpr uint32_t EncodeData = 0x10;
static constexpr uint32_t EncodeTrailers = 0x20;
// Encode100ContinueHeaders is a bit of a special state as 100 continue
// headers may be sent during request processing. This state is only used
// to verify we do not encode100Continue headers more than once per
// filter.
static constexpr uint32_t Encode100ContinueHeaders = 0x40;
};
// clang-format on
// All state for the stream. Put here for readability.
struct State {
State() : remote_complete_(false), local_complete_(false), saw_connection_close_(false) {}
uint32_t filter_call_state_{0};
// The following 3 members are booleans rather than part of the space-saving bitfield as they
// are passed as arguments to functions expecting bools. Extend State using the bitfield
// where possible.
bool encoder_filters_streaming_{true};
bool decoder_filters_streaming_{true};
bool destroyed_{false};
bool remote_complete_ : 1;
bool local_complete_ : 1;
bool saw_connection_close_ : 1;
};
// Possibly increases buffer_limit_ to the value of limit.
void setBufferLimit(uint32_t limit);
// Set up the Encoder/Decoder filter chain.
bool createFilterChain();
ConnectionManagerImpl& connection_manager_;
Router::ConfigConstSharedPtr snapped_route_config_;
Tracing::SpanPtr active_span_;
const uint64_t stream_id_;
StreamEncoder* response_encoder_{};
HeaderMapPtr continue_headers_;
HeaderMapPtr response_headers_;
Buffer::WatermarkBufferPtr buffered_response_data_;
HeaderMapPtr response_trailers_{};
HeaderMapPtr request_headers_;
Buffer::WatermarkBufferPtr buffered_request_data_;
HeaderMapPtr request_trailers_;
std::list<ActiveStreamDecoderFilterPtr> decoder_filters_;
std::list<ActiveStreamEncoderFilterPtr> encoder_filters_;
std::list<AccessLog::InstanceSharedPtr> access_log_handlers_;
Stats::TimespanPtr request_timer_;
State state_;
RequestInfo::RequestInfoImpl request_info_;
absl::optional<Router::RouteConstSharedPtr> cached_route_;
DownstreamWatermarkCallbacks* watermark_callbacks_{nullptr};
uint32_t buffer_limit_{0};
uint32_t high_watermark_count_{0};
const std::string* decorated_operation_{nullptr};
// By default, we will assume there are no 100-Continue headers. If encode100ContinueHeaders
// is ever called, this is set to true so commonContinue resumes processing the 100-Continue.
bool has_continue_headers_{};
};
typedef std::unique_ptr<ActiveStream> ActiveStreamPtr;
/**
* Check to see if the connection can be closed after gracefully waiting to send pending codec
* data.
*/
void checkForDeferredClose();
/**
* Do a delayed destruction of a stream to allow for stack unwind. Also calls onDestroy() for
* each filter.
*/
void doDeferredStreamDestroy(ActiveStream& stream);
/**
* Process a stream that is ending due to upstream response or reset.
*/
void doEndStream(ActiveStream& stream);
void resetAllStreams();
void onIdleTimeout();
void onDrainTimeout();
void startDrainSequence();
bool isOldStyleWebSocketConnection() const { return ws_connection_ != nullptr; }
enum class DrainState { NotDraining, Draining, Closing };
ConnectionManagerConfig& config_;
ConnectionManagerStats& stats_; // We store a reference here to avoid an extra stats() call on the
// config in the hot path.
ServerConnectionPtr codec_;
std::list<ActiveStreamPtr> streams_;
Stats::TimespanPtr conn_length_;
const Network::DrainDecision& drain_close_;
DrainState drain_state_{DrainState::NotDraining};
UserAgent user_agent_;
Event::TimerPtr idle_timer_;
Event::TimerPtr drain_timer_;
Runtime::RandomGenerator& random_generator_;
Tracing::HttpTracer& tracer_;
Runtime::Loader& runtime_;
const LocalInfo::LocalInfo& local_info_;
Upstream::ClusterManager& cluster_manager_;
WebSocketProxyPtr ws_connection_;
Network::ReadFilterCallbacks* read_callbacks_{};
ConnectionManagerListenerStats& listener_stats_;
};
} // namespace Http
} // namespace Envoy
| [
"15303606867@163.com"
] | 15303606867@163.com |
cdff44722817de73d0c8a616a05a7c8d068f4b7e | 441e98927ef96772f497a09ab6a9aaf8831654de | /Cuphead/Static/StaticCollisionList.h | 946a1fede8730aadf03a788cb6cf165edce11808 | [] | no_license | Seoui/Cuphead-imitation | de6ee8afca7e9dc03ddabde36e752f487c1f2e5c | a512b5f5e8f01018151ca077c9f0a0787d7ac3dc | refs/heads/master | 2023-01-13T05:44:31.531484 | 2020-11-21T09:34:24 | 2020-11-21T09:34:24 | 308,234,518 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 974 | h | #pragma once
#include "Character/Attackable.h"
#include "Objects/EnemyObject.h"
class StaticCollisionList
{
//friend unique_ptr<StaticCollisionList> std::make_unique<StaticCollisionList>();
//friend unique_ptr<StaticCollisionList>::deleter_type;
public:
static StaticCollisionList* Instance();
static void Create();
static void Delete();
static void InsertAttackable(Attackable* attackable);
static void InsertEnemyObject(EnemyObject* object);
static void EraseAttackable(Attackable* attackable);
static void EraseEnemyObject(EnemyObject* object);
static void TakeDamage(int idx);
static size_t AttackablesSize();
static size_t EnemyObjectsSize();
static Matrix& AttackableCollisionWorld(int idx);
static Matrix& EnemyObjectCollisionWorld(int idx);
private:
StaticCollisionList() = default;
~StaticCollisionList() = default;
private:
static StaticCollisionList* instance;
static list<Attackable*> attackables;
static list<EnemyObject*> enemy_objects;
}; | [
"dusto@naver.com"
] | dusto@naver.com |
a54d1014d533b652a692800ad2daad66c9ed4aac | ce9046039502146ffc454248be1d47d5b01d3894 | /11722/11722.cpp | c4ef008d8e1f659f8ed44889c55f0a48deb835de | [] | no_license | yjm6560/BOJ | 476ac9fcdb14e320547d570fe9589542fd13314e | 5532d1e31bc0384148eab09b726dcfcb1c0a96d0 | refs/heads/master | 2021-07-19T08:39:33.144380 | 2021-01-01T12:52:33 | 2021-01-01T12:52:33 | 230,388,040 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 508 | cpp | /*
가장 긴 감소하는 부분 수열
DP
난이도
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int N, answer = 1;
cin >> N;
vector<int> nums(N);
vector<int> dp(N, 1);
for(int i=0;i<N;i++)
cin >> nums[i];
for(int i=1;i<N;i++){
for(int j=0;j<i;j++){
if(nums[i] < nums[j]){
dp[i] = max(dp[i], dp[j] + 1);
}
}
answer = max(answer, dp[i]);
}
cout << answer << endl;
}
| [
"yjm6560@gmail.com"
] | yjm6560@gmail.com |
d6f3708ac6b4d35452b5a627919f391d74f95228 | 3c9fa62938a4f09f894f945e00313bc928417e17 | /aux_info.h | b9dc56a8ef6ac5b2b4b576dbbba311bb3938d01f | [
"Apache-2.0"
] | permissive | matsbror/MockExchange | 08d5aa041bad837771302312cb9938328af5250e | 1c7323a6e19f77d30217c5592bb9e602fe3d4a90 | refs/heads/master | 2021-01-18T23:45:12.162569 | 2016-07-12T11:48:08 | 2016-07-12T11:48:08 | 53,665,699 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 895 | h | // Copyright 2016 Mats Brorsson, OLA Mobile S.a.r.l
//
// 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 <map>
#include <string>
using namespace std;
extern map<int, string> city_map;
extern map<int, string> region_map;
extern map<int, string> user_profile_tags_map;
int read_vals(string f, map<int, string>& m);
| [
"mats.brorsson@olamobile.com"
] | mats.brorsson@olamobile.com |
86409bafd4b7fc45a7b1aaaa23f299591263f660 | 1af49694004c6fbc31deada5618dae37255ce978 | /chromeos/components/cdm_factory_daemon/output_protection_impl.cc | d186ae795a320e12b9299fd24e0b13c7747250d0 | [
"BSD-3-Clause"
] | permissive | sadrulhc/chromium | 59682b173a00269ed036eee5ebfa317ba3a770cc | a4b950c23db47a0fdd63549cccf9ac8acd8e2c41 | refs/heads/master | 2023-02-02T07:59:20.295144 | 2020-12-01T21:32:32 | 2020-12-01T21:32:32 | 317,678,056 | 3 | 0 | BSD-3-Clause | 2020-12-01T21:56:26 | 2020-12-01T21:56:25 | null | UTF-8 | C++ | false | false | 12,387 | cc | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/cdm_factory_daemon/output_protection_impl.h"
#include <utility>
#include "ash/shell.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "ui/display/manager/display_configurator.h"
#include "ui/display/manager/display_manager.h"
#include "ui/display/screen.h"
#include "ui/display/types/display_constants.h"
namespace chromeos {
namespace {
// Make sure the mapping between the Mojo enums and the Chrome enums do not
// fall out of sync.
#define VALIDATE_ENUM(mojo_type, chrome_type, name) \
static_assert( \
static_cast<uint32_t>(cdm::mojom::OutputProtection::mojo_type::name) == \
display::chrome_type##_##name, \
#chrome_type "_" #name "value doesn't match")
VALIDATE_ENUM(ProtectionType, CONTENT_PROTECTION_METHOD, NONE);
VALIDATE_ENUM(ProtectionType, CONTENT_PROTECTION_METHOD, HDCP_TYPE_0);
VALIDATE_ENUM(ProtectionType, CONTENT_PROTECTION_METHOD, HDCP_TYPE_1);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, NONE);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, UNKNOWN);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, INTERNAL);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, VGA);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, HDMI);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, DVI);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, DISPLAYPORT);
VALIDATE_ENUM(LinkType, DISPLAY_CONNECTION_TYPE, NETWORK);
static_assert(display::DISPLAY_CONNECTION_TYPE_LAST ==
display::DISPLAY_CONNECTION_TYPE_NETWORK,
"DISPLAY_CONNECTION_TYPE_LAST value doesn't match");
constexpr uint32_t kUnprotectableConnectionTypes =
display::DISPLAY_CONNECTION_TYPE_UNKNOWN |
display::DISPLAY_CONNECTION_TYPE_VGA |
display::DISPLAY_CONNECTION_TYPE_NETWORK;
constexpr uint32_t kProtectableConnectionTypes =
display::DISPLAY_CONNECTION_TYPE_HDMI |
display::DISPLAY_CONNECTION_TYPE_DVI |
display::DISPLAY_CONNECTION_TYPE_DISPLAYPORT;
std::vector<int64_t> GetDisplayIdsFromSnapshots(
const std::vector<display::DisplaySnapshot*>& snapshots) {
std::vector<int64_t> display_ids;
for (display::DisplaySnapshot* ds : snapshots) {
display_ids.push_back(ds->display_id());
}
return display_ids;
}
cdm::mojom::OutputProtection::ProtectionType ConvertProtection(
uint32_t protection_mask) {
// Only return Type 1 if that is the only type active since we want to reflect
// the overall output security.
if ((protection_mask & display::kContentProtectionMethodHdcpAll) ==
display::CONTENT_PROTECTION_METHOD_HDCP_TYPE_1) {
return cdm::mojom::OutputProtection::ProtectionType::HDCP_TYPE_1;
} else if (protection_mask & display::CONTENT_PROTECTION_METHOD_HDCP_TYPE_0) {
return cdm::mojom::OutputProtection::ProtectionType::HDCP_TYPE_0;
} else {
return cdm::mojom::OutputProtection::ProtectionType::NONE;
}
}
class DisplaySystemDelegateImpl
: public OutputProtectionImpl::DisplaySystemDelegate {
public:
DisplaySystemDelegateImpl() {
display_configurator_ =
ash::Shell::Get()->display_manager()->configurator();
DCHECK(display_configurator_);
content_protection_manager_ =
display_configurator_->content_protection_manager();
DCHECK(content_protection_manager_);
}
~DisplaySystemDelegateImpl() override = default;
void ApplyContentProtection(
display::ContentProtectionManager::ClientId client_id,
int64_t display_id,
uint32_t protection_mask,
display::ContentProtectionManager::ApplyContentProtectionCallback
callback) override {
content_protection_manager_->ApplyContentProtection(
client_id, display_id, protection_mask, std::move(callback));
}
void QueryContentProtection(
display::ContentProtectionManager::ClientId client_id,
int64_t display_id,
display::ContentProtectionManager::QueryContentProtectionCallback
callback) override {
content_protection_manager_->QueryContentProtection(client_id, display_id,
std::move(callback));
}
display::ContentProtectionManager::ClientId RegisterClient() override {
return content_protection_manager_->RegisterClient();
}
void UnregisterClient(
display::ContentProtectionManager::ClientId client_id) override {
content_protection_manager_->UnregisterClient(client_id);
}
void AddObserver(display::DisplayObserver* observer) override {
display::Screen::GetScreen()->AddObserver(observer);
}
void RemoveObserver(display::DisplayObserver* observer) override {
display::Screen::GetScreen()->RemoveObserver(observer);
}
const std::vector<display::DisplaySnapshot*>& cached_displays()
const override {
return display_configurator_->cached_displays();
}
private:
display::ContentProtectionManager* content_protection_manager_; // Not owned.
display::DisplayConfigurator* display_configurator_; // Not owned.
};
} // namespace
// static
void OutputProtectionImpl::Create(
mojo::PendingReceiver<cdm::mojom::OutputProtection> receiver,
std::unique_ptr<DisplaySystemDelegate> delegate) {
// This needs to run on the UI thread for its interactions with the display
// system.
if (!content::GetUIThreadTaskRunner({})->RunsTasksInCurrentSequence()) {
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE, base::BindOnce(&OutputProtectionImpl::Create,
std::move(receiver), std::move(delegate)));
return;
}
if (!delegate)
delegate = std::make_unique<DisplaySystemDelegateImpl>();
// This object should destruct when the mojo connection is lost.
mojo::MakeSelfOwnedReceiver(
std::make_unique<OutputProtectionImpl>(std::move(delegate)),
std::move(receiver));
}
OutputProtectionImpl::OutputProtectionImpl(
std::unique_ptr<DisplaySystemDelegate> delegate)
: delegate_(std::move(delegate)) {
DCHECK(delegate_);
}
OutputProtectionImpl::~OutputProtectionImpl() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (client_id_) {
delegate_->RemoveObserver(this);
delegate_->UnregisterClient(client_id_);
}
}
void OutputProtectionImpl::QueryStatus(QueryStatusCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!client_id_)
Initialize();
if (display_id_list_.empty()) {
std::move(callback).Run(true, display::DISPLAY_CONNECTION_TYPE_NONE,
ProtectionType::NONE);
return;
}
// We want to copy this since we will manipulate it.
std::vector<int64_t> remaining_displays = display_id_list_;
int64_t curr_display_id = remaining_displays.back();
remaining_displays.pop_back();
delegate_->QueryContentProtection(
client_id_, curr_display_id,
base::BindOnce(&OutputProtectionImpl::QueryStatusCallbackAggregator,
weak_factory_.GetWeakPtr(), std::move(remaining_displays),
std::move(callback), true,
display::DISPLAY_CONNECTION_TYPE_NONE,
display::CONTENT_PROTECTION_METHOD_NONE,
display::CONTENT_PROTECTION_METHOD_NONE));
}
void OutputProtectionImpl::EnableProtection(ProtectionType desired_protection,
EnableProtectionCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!client_id_)
Initialize();
if (display_id_list_.empty()) {
std::move(callback).Run(true);
return;
}
// We just pass through what the client requests.
switch (desired_protection) {
case ProtectionType::HDCP_TYPE_0:
desired_protection_mask_ = display::CONTENT_PROTECTION_METHOD_HDCP_TYPE_0;
break;
case ProtectionType::HDCP_TYPE_1:
desired_protection_mask_ = display::CONTENT_PROTECTION_METHOD_HDCP_TYPE_1;
break;
case ProtectionType::NONE:
desired_protection_mask_ = display::CONTENT_PROTECTION_METHOD_NONE;
break;
}
// We want to copy this since we will manipulate it.
std::vector<int64_t> remaining_displays = display_id_list_;
int64_t curr_display_id = remaining_displays.back();
remaining_displays.pop_back();
delegate_->ApplyContentProtection(
client_id_, curr_display_id, desired_protection_mask_,
base::BindOnce(&OutputProtectionImpl::EnableProtectionCallbackAggregator,
weak_factory_.GetWeakPtr(), std::move(remaining_displays),
std::move(callback), true));
}
void OutputProtectionImpl::Initialize() {
DCHECK(!client_id_);
// This needs to be setup on the browser thread, so wait to do it until we
// are on that thread (i.e. don't do it in the constructor).
client_id_ = delegate_->RegisterClient();
DCHECK(client_id_);
delegate_->AddObserver(this);
display_id_list_ = GetDisplayIdsFromSnapshots(delegate_->cached_displays());
}
void OutputProtectionImpl::EnableProtectionCallbackAggregator(
std::vector<int64_t> remaining_displays,
EnableProtectionCallback callback,
bool aggregate_success,
bool success) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
aggregate_success &= success;
if (remaining_displays.empty()) {
std::move(callback).Run(aggregate_success);
return;
}
int64_t curr_display_id = remaining_displays.back();
remaining_displays.pop_back();
delegate_->ApplyContentProtection(
client_id_, curr_display_id, desired_protection_mask_,
base::BindOnce(&OutputProtectionImpl::EnableProtectionCallbackAggregator,
weak_factory_.GetWeakPtr(), std::move(remaining_displays),
std::move(callback), aggregate_success));
}
void OutputProtectionImpl::QueryStatusCallbackAggregator(
std::vector<int64_t> remaining_displays,
QueryStatusCallback callback,
bool aggregate_success,
uint32_t aggregate_link_mask,
uint32_t aggregate_protection_mask,
uint32_t aggregate_no_protection_mask,
bool success,
uint32_t link_mask,
uint32_t protection_mask) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
aggregate_success &= success;
aggregate_link_mask |= link_mask;
if (link_mask & kUnprotectableConnectionTypes) {
aggregate_no_protection_mask |= display::kContentProtectionMethodHdcpAll;
}
if (link_mask & kProtectableConnectionTypes) {
aggregate_protection_mask |= protection_mask;
}
if (!remaining_displays.empty()) {
int64_t curr_display_id = remaining_displays.back();
remaining_displays.pop_back();
delegate_->QueryContentProtection(
client_id_, curr_display_id,
base::BindOnce(
&OutputProtectionImpl::QueryStatusCallbackAggregator,
weak_factory_.GetWeakPtr(), std::move(remaining_displays),
std::move(callback), aggregate_success, aggregate_link_mask,
aggregate_protection_mask, aggregate_no_protection_mask));
return;
}
aggregate_protection_mask &= ~aggregate_no_protection_mask;
std::move(callback).Run(aggregate_success, aggregate_link_mask,
ConvertProtection(aggregate_protection_mask));
}
void OutputProtectionImpl::HandleDisplayChange() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
display_id_list_ = GetDisplayIdsFromSnapshots(delegate_->cached_displays());
if (desired_protection_mask_) {
// We always reapply content protection on display changes since we affect
// all displays.
EnableProtection(ConvertProtection(desired_protection_mask_),
base::DoNothing());
}
}
void OutputProtectionImpl::OnDisplayAdded(const display::Display& display) {
HandleDisplayChange();
}
void OutputProtectionImpl::OnDisplayMetricsChanged(
const display::Display& display,
uint32_t changed_metrics) {
HandleDisplayChange();
}
void OutputProtectionImpl::OnDisplayRemoved(const display::Display& display) {
HandleDisplayChange();
}
} // namespace chromeos
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
6446ac546929ed7997071a14f9573f1b2548d151 | ece01a11883ca3fc215cb57d451190fe5ce11e33 | /DataStructures/Graph/20130407/adjacency_list.hpp | d5ea631842da18ecec7240920f56e8b9d44263c1 | [] | no_license | adamcavendish/HomeworkGitShare | 24fffb2376fa7da42a0fa7798aafc8283de96a99 | ef8d1543a5cc04d192088ea2a91a8db730f37d35 | refs/heads/master | 2021-01-18T21:23:53.414669 | 2016-04-30T21:35:24 | 2016-04-30T21:35:24 | 12,865,845 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 2,310 | hpp | #pragma once
// STL
#include <iostream>
//include
#include "globals.hpp"
#include "detail/detailed_globals.hpp"
#include "detail/adjacency_list_impl.hpp"
namespace adamcavendish {
namespace graph {
#if __cplusplus >= 201103L
#endif
template <
typename Directed = directed,
typename VertexProperties = DefaultVertex,
typename EdgeProperties = DefaultEdge,
VertexEdgeContainerEnum VertexContainerEnum = vector,
VertexEdgeContainerEnum EdgeContainerEnum = vector>
class adjacency_list : private adjacency_list_impl
{
public: //types
// vertex / edge container generator
typedef detail::VertexEdgeContainerGen<
EdgeContainerEnum,
EdgeProperties
>::type edge_container;
typedef detail::VertexEdgeContainerGen<
VertexContainerEnum,
std::pair<VertexProperties, edge_container>
>::type vertex_container;
// descriptor(s) are used to traverse through vertexes / edges.
typedef detail::VertexIterator<
vertex_container,
edge_container,
VertexProperties,
EdgeProperties> vertex_iterator;
typedef detail::EdgeIterator<
vertex_container,
edge_container,
VertexProperties,
EdgeProperties> edge_iterator;
typedef detail::ConstVertexIterator<
vertex_container,
edge_container,
VertexProperties,
EdgeProperties> const_vertex_iterator;
typedef detail::ConstEdgeIterator<
vertex_container,
edge_container,
VertexProperties,
EdgeProperties> const_edge_iterator;
typedef std::size_t size_type;
private: //members
vertex_container _M_graph_data;
size_type _M_vertex_num;
size_type _M_edge_num;
public: //functions
size_type
num_vertexes() const;
size_type
num_edges() const;
bool
empty() const;
vertex_iterator
find(const VertexProperties & __v);
const_vertex_iterator
find(const VertexProperties & __v) const;
edge_iterator
find(const EdgeProperties & __e);
const_edge_iterator
find(const EdgeProperties & __e) const;
vertex_iterator
add_vertex(const VertexProperties & __v);
edge_iterator
add_edge(const vertex_iterator & __v1,
const vertex_iterator & __v2,
const EdgeProperties & __e);
bool
delete_vertex(const vertex_iterator & __v);
bool
delete_edge(const edge_iterator & __v);
};//class adjacency_list
}//namespace graph
}//namespace adamcavendish
| [
"GetbetterABC@yeah.net"
] | GetbetterABC@yeah.net |
7cedeecb3df62a2f9fcd6c0792a69470ecf3df42 | 2ba47f305c1dc0cbe9c22723bbe8852d9fd1cf48 | /src/example/example_12.cpp | f52ecb1dac2da06bb9a91a9de9fff37c0f9a2b8e | [] | no_license | j8xixo12/QuantFinance | 029eb7e367f38caf2a6cb458efdb3d71883cd3e9 | 6a2cbc38f425d7c26cfeaf036a3f3789d34d2887 | refs/heads/master | 2021-04-17T19:47:05.352745 | 2020-06-01T05:28:37 | 2020-06-01T05:28:37 | 249,470,758 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,292 | cpp | #include <iostream>
#include <fstream>
#include "IBvp.hpp"
#include "Option.hpp"
#include "BlackScholes.hpp"
#include "Range.hpp"
#include "utility.hpp"
#include "OptionCommand.hpp"
#include "CubicSpline.hpp"
int main(int argc, char* argv[]) {
std::ofstream output("out.csv", std::ios::out);
Option myOption;
myOption.sig_ = 0.3;
myOption.K_ = 65.0;
myOption.T_ = 0.25;
myOption.r_ = 0.08;
myOption.b_ = 0.08;
myOption.beta_ = 1.0;
myOption.SMax_ = 325.0;
myOption.type = OptionType::Call;
BlackScholesPde myImp(myOption);
Range<double> rangeX(0.0, myOption.SMax_);
Range<double> rangeT(0.0, myOption.T_);
IBvp currentImp(myImp, rangeX, rangeT);
long J = 500;
long N = 500;
std::cout << "Number of space divisions: ";
std::cout << J << std::endl;
std::cout << "Number of time divisions: ";
std::cout << N << std::endl;
CNIBVP fdmCN(currentImp, N, J);
auto vCN = OptionPrice(fdmCN);
auto sol = fdmCN.result();
auto xarr = fdmCN.XValues();
double h = rangeX.spread() / static_cast<double> (J);
std::vector<double> zarr(xarr.size() - 2);
for (std::size_t j = 0; j < zarr.size(); ++j) {
zarr[j] = xarr[j + 1];
}
// Delta array: eq. (22.14) but centred difference variant
std::vector<double> delta(zarr.size());
for (std::size_t j = 0; j < zarr.size(); ++j) {
delta[j] = (sol[j + 2] - sol[j]) / (2. * h);
}
// Exact solution
// OptionCommand(double strike, double expiration,
// double riskFree, double costOfCarry, double volatility)
CallDelta cDelta (myOption.K_, myOption.T_, myOption.r_, myOption.b_, myOption.sig_);
// PutDelta cDelta(myOption.K, myOption.T, myOption.r,
// myOption.b, myOption.sig);
std::vector<double> cDeltaPrices(zarr.size());
for (std::size_t j = 0; j < zarr.size(); ++j) {
cDeltaPrices[j] = cDelta.execute(zarr[j]);
}
// Compute delta from cubic splines
CubicSplineInterpolator csi2(xarr, sol, SecondDeriv);
std::vector<double> splineDelta(zarr.size());
for (std::size_t j = 0; j < zarr.size(); ++j)
{
splineDelta[j] = csi2.Derivative(zarr[j]);
}
std::vector<double> splineGamma(zarr.size());
for (std::size_t j = 0; j < zarr.size(); ++j) {
splineGamma[j] = std::get<2>(csi2.ExtendedSolve(zarr[j]));
}
// CallGamma cGamma(myOption.K, myOption.T, myOption.r,
// myOption.b, myOption.sig);
CallGamma cGamma(myOption.K_, myOption.T_, myOption.r_, myOption.b_, myOption.sig_);
std::vector<double> cGammaPrices(zarr.size());
for (std::size_t j = 0; j < zarr.size(); ++j) {
cGammaPrices[j] = cGamma.execute(zarr[j]);
}
// Gamma array: eq. (22.16)
std::vector<double> gamma(zarr.size());
for (std::size_t j = 0; j < zarr.size(); ++j) {
gamma[j] = (sol[j + 2] - 2 * sol[j + 1] + sol[j]) / (h * h);
}
for (size_t j = 0; j < zarr.size(); ++j) {
output << j << '\t' << cDeltaPrices[j] << '\t' << delta[j] << '\t' << splineDelta[j]
<< '\t' << cGammaPrices[j] << '\t' << gamma[j] << '\t' << splineGamma[j]
<< '\t' << sol[j]
<< std::endl;
}
output.close();
return 0;
}
| [
"as2266317@gmail.com"
] | as2266317@gmail.com |
269a5c5bc56f17a344e9646e390ca3ecd74c9409 | e686784ba9fb024b376c10ff2b63fd36e9fc8f3c | /include/Node.h | c90a89e57468199ff28dc0a63bcfb8219002bbeb | [] | no_license | joerunde/compiler | 74d9ea6c4b439bc003530bc017a12e2043b478fe | f762a669aba8874ce0d9675dc6fad78f32b7d6ef | refs/heads/master | 2021-05-27T11:37:20.835877 | 2014-03-15T04:15:11 | 2014-03-15T04:15:11 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,244 | h | #pragma once
#include <string>
#include <vector>
#include <map>
#include <string>
class Token;
class Node
{
public:
Node(void);
Node(Node* parent, Token* term);
Node(Node* parent, std::string nonterm);
Node* addChild(Token* term);
Node* addChild(std::string nonterm);
Node* insertFrontChild(Token* term);
std::vector<Node*> getKids();
Node* getParent();
void processTree();
bool hasToken();
enum eVarType{
TYPE_INT,
TYPE_FLOAT,
TYPE_STRING,
TYPE_BOOL,
TYPE_NONE
};
private:
std::string mNonterm;
Token* mTerm;
std::vector<Node*> mKids;
Node* mParent;
void quickPost(bool noRef = false);
//sets and returns the type of the branch at this node
//adds conversion nodes where necessary
eVarType recursiveProcess();
//declare an identifier
void declareID(eVarType type);
//type check for a binary operator
eVarType checkType(eVarType left, eVarType right);
Node* addParentConversion(bool itof);
void printType(eVarType type);
//What variable type is this branch of the parse tree dealing with?
eVarType mType;
//is this an int to float conversion node?
bool mitof;
//is this a float to int conversion node?
bool mftoi;
void init(){mitof = false; mftoi = false; mType = TYPE_NONE;}
};
| [
"filbertrunde@gmail.com"
] | filbertrunde@gmail.com |
8ec16aaf9fbc02efe2ca0c2c2f17c67c6c85a8b6 | 5b6e0e5bbf643ac19c2f10d5cb2e1b0c0016dada | /src/pow.cpp | b5115e02bbf2fa976284adf0274f21391cc55373 | [
"MIT"
] | permissive | MotoAcidic/snode-coin | 94bcc3f9a9387e909dcd9423da56cffcea747c40 | e2149f66efeed0a71753b964ea720d2b2f6a5a55 | refs/heads/master | 2020-04-19T21:58:03.823394 | 2019-01-26T21:53:05 | 2019-01-26T21:53:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,147 | cpp | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The Snodecoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "pow.h"
#include "chain.h"
#include "chainparams.h"
#include "main.h"
#include "primitives/block.h"
#include "uint256.h"
#include "util.h"
#include "spork.h"
#include <math.h>
unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader* pblock)
{
/* current difficulty formula, snodecoin - DarkGravity v3, written by Evan Duffield - evan@dashpay.io */
const CBlockIndex* BlockLastSolved = pindexLast;
const CBlockIndex* BlockReading = pindexLast;
int64_t nActualTimespan = 0;
int64_t LastBlockTime = 0;
int64_t PastBlocksMin = 24;
int64_t PastBlocksMax = 24;
int64_t CountBlocks = 0;
uint256 PastDifficultyAverage;
uint256 PastDifficultyAveragePrev;
if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || BlockLastSolved->nHeight < PastBlocksMin) {
return Params().ProofOfWorkLimit().GetCompact();
}
if (pindexLast->nHeight > Params().LAST_POW_BLOCK()) {
uint256 bnTargetLimit = (~uint256(0) >> 24);
int64_t nTargetSpacing = Params().TargetSpacing(); // Snodecoin 90 seconds
int64_t nTargetTimespan = Params().TargetTimespan(); // Snodecoin 1 hour
int64_t nActualSpacing = 0;
if (pindexLast->nHeight != 0)
nActualSpacing = pindexLast->GetBlockTime() - pindexLast->pprev->GetBlockTime();
if (nActualSpacing < 0)
nActualSpacing = 1;
// ppcoin: target change every block
// ppcoin: retarget with exponential moving toward target spacing
uint256 bnNew;
bnNew.SetCompact(pindexLast->nBits);
int64_t nInterval = nTargetTimespan / nTargetSpacing;
bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing);
bnNew /= ((nInterval + 1) * nTargetSpacing);
if (bnNew <= 0 || bnNew > bnTargetLimit)
bnNew = bnTargetLimit;
return bnNew.GetCompact();
}
for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
if (PastBlocksMax > 0 && i > PastBlocksMax) {
break;
}
CountBlocks++;
if (CountBlocks <= PastBlocksMin) {
if (CountBlocks == 1) {
PastDifficultyAverage.SetCompact(BlockReading->nBits);
} else {
PastDifficultyAverage = ((PastDifficultyAveragePrev * CountBlocks) + (uint256().SetCompact(BlockReading->nBits))) / (CountBlocks + 1);
}
PastDifficultyAveragePrev = PastDifficultyAverage;
}
if (LastBlockTime > 0) {
int64_t Diff = (LastBlockTime - BlockReading->GetBlockTime());
nActualTimespan += Diff;
}
LastBlockTime = BlockReading->GetBlockTime();
if (BlockReading->pprev == NULL) {
assert(BlockReading);
break;
}
BlockReading = BlockReading->pprev;
}
uint256 bnNew(PastDifficultyAverage);
int64_t _nTargetTimespan = CountBlocks * Params().TargetSpacing();
if (nActualTimespan < _nTargetTimespan / 3)
nActualTimespan = _nTargetTimespan / 3;
if (nActualTimespan > _nTargetTimespan * 3)
nActualTimespan = _nTargetTimespan * 3;
// Retarget
bnNew *= nActualTimespan;
bnNew /= _nTargetTimespan;
if (bnNew > Params().ProofOfWorkLimit()) {
bnNew = Params().ProofOfWorkLimit();
}
//printf("Before: %08x %s\n", BlockLastSolved->nBits, CBigNum().SetCompact(BlockLastSolved->nBits).ToString().c_str());
//printf("After: %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
return bnNew.GetCompact();
}
bool CheckProofOfWork(uint256 hash, unsigned int nBits)
{
bool fNegative;
bool fOverflow;
uint256 bnTarget;
// skip for PoS only
if (Params().SkipProofOfWorkCheck())
return true;
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
// Check range
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > Params().ProofOfWorkLimit())
return error("CheckProofOfWork() : nBits below minimum work");
// Check proof of work matches claimed amount
if (hash > bnTarget){
return error("CheckProofOfWork() : hash doesn't match nBits");
}
return true;
}
uint256 GetBlockProof(const CBlockIndex& block)
{
uint256 bnTarget;
bool fNegative;
bool fOverflow;
bnTarget.SetCompact(block.nBits, &fNegative, &fOverflow);
if (fNegative || fOverflow || bnTarget == 0)
return 0;
// We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256
// as it's too large for a uint256. However, as 2**256 is at least as large
// as bnTarget+1, it is equal to ((2**256 - bnTarget - 1) / (bnTarget+1)) + 1,
// or ~bnTarget / (nTarget+1) + 1.
return (~bnTarget / (bnTarget + 1)) + 1;
}
| [
"dev@snode.co"
] | dev@snode.co |
79e5a44d9c63287fcc6705430744285ad3e72370 | 4ed8a261dc1d7a053557c9c0bcec759978559dbd | /cnd/cnd.completion/test/unit/data/org/netbeans/modules/cnd/completion/cplusplus/hyperlink/Cpp11TestCase/bug250270.cpp | bebc79b89f2312f9a4b22b3acaf2bbc13a4b61fe | [
"Apache-2.0"
] | permissive | kaveman-/netbeans | 0197762d834aa497ad17dccd08a65c69576aceb4 | 814ad30e2d0a094f4aa3813bcbb5323a95a0b1d6 | refs/heads/master | 2021-01-04T06:49:41.139015 | 2020-02-06T15:13:37 | 2020-02-06T15:13:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,291 | cpp | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Contributor(s):
*
* The Original Software is NetBeans. The Initial Developer of the Original
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
* Microsystems, Inc. All Rights Reserved.
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*/
namespace bug250270 {
struct AAA250270 {
int foo();
};
int main250270() {
using BBB250270 = AAA250270;
BBB250270 var;
var.foo();
return 0;
}
} | [
"geertjan@apache.org"
] | geertjan@apache.org |
8bb1cac613782debc7a8f9e605ffe996994cc19e | 493ac26ce835200f4844e78d8319156eae5b21f4 | /flow_simulation/ideal_flow/processor1/0.65/nut | c85795d6bc18db8c7deee6e4c72a814f2a5ce8ce | [] | no_license | mohan-padmanabha/worm_project | 46f65090b06a2659a49b77cbde3844410c978954 | 7a39f9384034e381d5f71191122457a740de3ff0 | refs/heads/master | 2022-12-14T14:41:21.237400 | 2020-08-21T13:33:10 | 2020-08-21T13:33:10 | 289,277,792 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 21,647 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0.65";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField nonuniform List<scalar>
1466
(
0.000943425
0.00204391
0.00135792
0.00364976
0.00132759
0.00235572
0.00283182
0.00175113
0.00074626
0.00231046
0.00299526
0.00229826
0.000737389
0.00160594
0.00555855
0.00615099
0.00164674
0.00100573
0.00496684
0.00327432
0.00540973
0.00811762
0.00391511
0.00305164
0.00076424
0.00409799
0.00512709
0.00401059
0.000845225
0.00382311
0.00351855
0.00386286
0.00169624
0.0100156
0.00304276
0.00187111
0.0114494
0.00151469
0.00214563
0.000993225
0.000994621
0.00195887
0.00189854
0.000912293
0.000820912
0.000952138
0.00187925
0.000728572
0.00151163
0.000750678
0.00108919
0.00167388
0.00167502
0.000990955
0.000820323
0.00101442
0.00075621
0.00209914
0.000916105
0.00200974
0.00573704
0.00313684
0.0024134
0.00349456
0.00550357
0.00191287
0.00825934
0.00351067
0.00220952
0.000920305
0.00752581
0.0011233
0.000909596
0.000919089
0.00383286
0.00267209
0.00298495
0.00228388
0.00130677
0.0038313
0.00288186
0.00515002
0.00125346
0.0032052
0.00516289
0.00525557
0.00753676
0.00320812
0.00250335
0.00273772
0.00503544
0.0045985
0.0039547
0.00344759
0.00174601
0.00107284
0.0018772
0.00178856
0.000824953
0.000897886
0.0014657
0.000893033
0.000652232
0.00168196
0.00222125
0.00181825
0.00145303
0.00081272
0.00190152
0.000808094
0.00571464
0.00308385
0.00207246
0.00175324
0.00155358
0.00642546
0.00302084
0.00166235
0.00223453
0.00190152
0.00592735
0.00286972
0.00191365
0.00103906
0.000832917
0.00153776
0.00278876
0.00402361
0.00321941
0.00449512
0.00175173
0.00194649
0.00344579
0.00281801
0.00521336
0.000906697
0.000913418
0.00102095
0.0014126
0.00132596
0.000952491
0.00458233
0.00471772
0.00447535
0.0082318
0.00713582
0.00390374
0.00530734
0.0045545
0.00305835
0.00533129
0.00342282
0.00255221
0.00163901
0.00495971
0.00811058
0.0036544
0.00575667
0.00448642
0.0021296
0.00389856
0.00352688
0.00145646
0.00469167
0.007725
0.00333692
0.00423262
0.00479818
0.00521954
0.00321856
0.00550264
0.00281461
0.000770595
0.0023495
0.00103032
0.00087509
0.00351561
0.00428323
0.00549593
0.00607379
0.00086787
0.00390926
0.00532307
0.000592414
0.00313359
0.0055498
0.00538703
0.00274624
0.00218915
0.00155624
0.00579971
0.00506326
0.00359704
0.00813802
0.00193082
0.00620117
0.000655005
0.00329938
0.00685464
0.0076857
0.00277788
0.00450817
0.00329361
0.00519146
0.00756535
0.0079837
0.00638799
0.00240371
0.00447321
0.00325223
0.00455939
0.00471997
0.00455349
0.00508536
0.00590991
0.00472756
0.00581278
0.00579448
0.00343303
0.00387033
0.00452949
0.00633331
0.00489013
0.00660207
0.00508549
0.005692
0.00680627
0.00110682
0.00551716
0.00628252
0.0055675
0.00319082
0.00872436
0.00962427
0.00296901
0.00802196
0.0045591
0.00471667
0.00461991
0.00572487
0.00236355
0.00370445
0.00316009
0.00749526
0.00395858
0.00327429
0.00379965
0.000911124
0.00405071
0.00290182
0.00588758
0.00597733
0.00224802
0.00344173
0.00301849
0.00555928
0.00316643
0.00109704
0.00133429
0.00193996
0.00124139
0.00318439
0.00270435
0.00608631
0.00343994
0.000530733
0.000936357
0.00484075
0.00531591
0.00128416
0.00166145
0.00141431
0.00106881
0.00426365
0.00507171
0.00683218
0.00606827
0.00408455
0.00537354
0.0044254
0.00593645
0.00624267
0.00483956
0.00328359
0.00873246
0.00127609
0.00484676
0.00494415
0.000978764
0.00184624
0.00185806
0.000666481
0.000801662
0.000854285
0.00322978
0.00102469
0.00158003
0.00138529
0.00458077
0.00597173
0.00146818
0.00647517
0.000479169
0.000888947
0.00564647
0.0116855
0.00846649
0.00123319
0.00298069
0.00802532
0.00239305
0.00549388
0.0037975
0.00469776
0.00446685
0.00373497
0.00922321
0.00300091
0.00127804
0.00569482
0.00094135
0.00149352
0.00150126
0.00570073
0.00578793
0.00162689
0.00133158
0.00298613
0.00540223
0.0051308
0.00388126
0.0017257
0.00172313
0.00292075
0.00525359
0.000856809
0.00546059
0.00482143
0.00942023
0.00427217
0.00292382
0.00254051
0.00149973
0.00383696
0.00348805
0.000433589
0.00312256
0.00304781
0.00225279
0.00485728
0.00172577
0.000925226
0.00336921
0.00715747
0.00987673
0.00702713
0.00292744
0.000639397
0.00106455
0.00302915
0.00919271
0.00630712
0.00485312
0.00728685
0.00124688
0.00934306
0.00226685
0.00217967
0.0011809
0.00320466
0.00293936
0.0076844
0.0014789
0.00279969
0.00163557
0.0130267
0.00380173
0.0014757
0.00343555
0.00349237
0.0108078
0.0121012
0.0112244
0.0117274
0.0134217
0.0127193
0.00151479
0.00148674
0.00122217
0.00123377
0.00831232
0.0151611
0.00810213
0.0149729
0.00834479
0.00359995
0.00131515
0.00151592
0.00730657
0.000786043
0.001381
0.0012259
0.00281635
0.00172758
0.00296396
0.0113803
0.00275999
0.00299077
0.00952248
0.00952641
0.00475496
0.00306113
0.00316638
0.0106718
0.00332887
0.00172084
0.00156431
0.003027
0.00558168
0.00375429
0.00959919
0.0104534
0.00422849
0.0029282
0.00437507
0.00321501
0.00783492
0.00151549
0.00400901
0.0032098
0.00652004
0.00553508
0.0016515
0.00172105
0.00481932
0.000642819
0.00146804
0.00081956
0.00137814
0.00680626
0.00172554
0.00104144
0.00643905
0.00157109
0.00553777
0.0027593
0.00137536
0.0051657
0.00213008
0.00525714
0.00538977
0.00197954
0.0011481
0.000901483
0.0126663
0.00108816
0.00151541
0.00142925
0.00109326
0.00577023
0.00141667
0.00812926
0.00133261
0.00193475
0.00519307
0.00291486
0.0140019
0.0078539
0.00778069
0.0132877
0.00756857
0.00146665
0.00630929
0.00151207
0.00617136
0.00387328
0.00317127
0.00723459
0.0107209
0.00591848
0.00314094
0.00346211
0.00459021
0.010213
0.00874109
0.00213064
0.00526733
0.00579847
0.00861821
0.00523281
0.00965944
0.0038177
0.00164329
0.0146873
0.00457831
0.015918
0.0146712
0.0142036
0.00393795
0.00872131
0.0122576
0.0111392
0.00208299
0.00751135
0.00140794
0.00857547
0.00353693
0.00610311
0.00537376
0.0158349
0.00578969
0.00790033
0.00618039
0.00165736
0.0150673
0.00806019
0.0118439
0.000888315
0.00140676
0.00171115
0.01314
0.00916297
0.0103565
0.00245254
0.00735522
0.0129542
0.0107368
0.0045877
0.0136171
0.00980206
0.00146989
0.00171901
0.00882523
0.0156741
0.0153574
0.0113076
0.00245486
0.0037349
0.0123154
0.00394399
0.00200219
0.00799936
0.00131299
0.00704103
0.0141962
0.00252575
0.0146638
0.00185737
0.00871974
0.00647391
0.00827881
0.00711872
0.00921364
0.0148713
0.00170124
0.0157096
0.0159817
0.00891097
0.00196916
0.00158611
0.00959844
0.0102558
0.00587194
0.00301275
0.00124192
0.00789445
0.0152628
0.0103155
0.00385961
0.0113292
0.00603043
0.0102752
0.00462499
0.00434118
0.00268052
0.00584958
0.000950034
0.0128614
0.0156599
0.00405125
0.0049682
0.0112561
0.0146053
0.00800455
0.00976834
0.00449233
0.00589984
0.00108216
0.0160675
0.00872031
0.00744964
0.00218638
0.00898028
0.0143218
0.00655986
0.00477708
0.00456108
0.00302452
0.00301067
0.00549128
0.00372837
0.00136008
0.00119382
0.00264435
0.00946649
0.00921835
0.00590304
0.00161537
0.00595224
0.0107829
0.00300004
0.00358442
0.0019862
0.00229374
0.00351168
0.00285533
0.00414796
0.00237175
0.00198382
0.00585759
0.00250619
0.00127251
0.00593701
0.00147404
0.00197902
0.0138323
0.00177623
0.00949584
0.0101338
0.0129197
0.00732731
0.00201919
0.00207308
0.00126244
0.0124741
0.00131888
0.00586115
0.00595317
0.00493982
0.00365328
0.00897618
0.0033621
0.00310961
0.00663363
0.0100997
0.00133396
0.00933076
0.00974526
0.00301186
0.00240979
0.0119384
0.00102414
0.00414046
0.00147833
0.0110328
0.0100405
0.00806894
0.00157639
0.00549071
0.000929347
0.0103788
0.00333608
0.00138061
0.00142333
0.0101812
0.0039777
0.00268625
0.0049586
0.00392451
0.00608633
0.00120709
0.00502308
0.00603101
0.00116921
0.00564839
0.00141598
0.00666267
0.00247109
0.00181946
0.00175834
0.00376638
0.00159195
0.0029823
0.00936404
0.00062692
0.00782526
0.00071338
0.000458655
0.00386769
0.000486229
0.0104528
0.00171049
0.00158487
0.00257248
0.000682461
0.000461009
0.00276592
0.00833313
0.000710799
0.00749293
0.00905186
0.000720608
0.000465351
0.00536459
0.0104025
0.00918677
0.00496666
0.00300187
0.000473897
0.0100487
0.00415087
0.0070708
0.0011794
0.00316759
0.00908536
0.00400305
0.00185902
0.00892244
0.00998206
0.00413459
0.00241911
0.0079673
0.0092013
0.00296923
0.00163692
0.00975561
0.00360528
0.0121592
0.0103182
0.000450566
0.00806751
0.0026401
0.00917089
0.00157914
0.00804271
0.00709851
0.00109234
0.00636438
0.00140354
0.00837079
0.0121855
0.00515646
0.0110511
0.000919556
0.00344169
0.00416447
0.000754535
0.000507572
0.00567397
0.00303001
0.00368587
0.00468733
0.00367989
0.00116938
0.0032055
0.00623772
0.00548428
0.00379932
0.0013614
0.00387977
0.00493569
0.00233012
0.0069854
0.00462147
0.0100981
0.00337205
0.00409879
0.00376143
0.00598616
0.0055011
0.00549216
0.00427739
0.00175613
0.00304941
0.00846122
0.00552528
0.00409777
0.000572776
0.012566
0.00257038
0.0129604
0.0068722
0.00439204
0.00170814
0.0105538
0.00157942
0.00624613
0.0137451
0.00912921
0.00327624
0.0115473
0.0103535
0.00556399
0.00372249
0.00431107
0.00151028
0.00782587
0.00308612
0.00163219
0.0107797
0.00787554
0.0070374
0.00938227
0.00159599
0.00170856
0.00107228
0.000401862
0.00123462
0.00850641
0.0039946
0.00112926
0.00501736
0.00408791
0.0030929
0.00727308
0.00180725
0.00525484
0.00419992
0.005095
0.00671043
0.00311784
0.00897656
0.00281684
0.00435392
0.00254111
0.00394431
0.00508314
0.0012982
0.00157758
0.00392233
0.00395032
0.00506619
0.00554103
0.0105787
0.00122194
0.00334255
0.00325316
0.000524805
0.00514554
0.00618359
0.00681642
0.00917264
0.00960461
0.00201942
0.00976226
0.00197228
0.000767901
0.00875938
0.00284325
0.00450533
0.00792164
0.00295267
0.00347987
0.0155701
0.00973055
0.00533628
0.00317838
0.00268767
0.00367814
0.00369118
0.00915416
0.0108108
0.000949201
0.0107291
0.00440269
0.00118371
0.00333412
0.00191261
0.00478149
0.016172
0.00931645
0.00239433
0.0077665
0.00459767
0.0111104
0.0109828
0.00966958
0.00104705
0.00100176
0.00103144
0.00086794
0.000889301
0.000986113
0.00080907
0.00128758
0.00129051
0.00131599
0.00129304
0.0012228
0.00116034
0.00119766
0.0012317
0.00130624
0.000918184
0.00103641
0.00125908
0.0011715
0.00129823
0.00111052
0.0011094
0.00111647
0.00114967
0.000990469
0.00317932
0.000736603
0.000517343
0.00881557
0.00198682
0.0020844
0.00722191
0.00169051
0.00521147
0.00826147
0.00389348
0.00983629
0.00363094
0.000733833
0.00131463
0.00567843
0.00895126
0.00870112
0.00596692
0.00316154
0.00443276
0.00264429
0.0101757
0.00759371
0.00115777
0.00295652
0.00213442
0.00093658
0.000477776
0.000890605
0.00247387
0.00434654
0.00840203
0.00745492
0.00122457
0.00346808
0.00440989
0.0018284
0.00405637
0.0015112
0.00800856
0.00344077
0.00259911
0.00492423
0.00111382
0.00225261
0.00151446
0.00740715
0.00378082
0.00412037
0.00811374
0.00262337
0.00788533
0.00387798
0.00559624
0.00750309
0.00371714
0.00994941
0.00161394
0.00104637
0.000774246
0.00373191
0.00607784
0.00106558
0.00384524
0.0117811
0.00899779
0.00125746
0.00593445
0.00824836
0.00576922
0.00446025
0.0019353
0.00678252
0.0044734
0.00177436
0.00470547
0.00132348
0.00424859
0.00530995
0.0112071
0.00130906
0.00110385
0.00926059
0.0035685
0.00747874
0.00322152
0.00255046
0.00159182
0.00618149
0.0033214
0.0067289
0.00964837
0.00413893
0.00837764
0.00105923
0.00208675
0.0104689
0.00477503
0.00988465
0.00125115
0.00104695
0.00379941
0.00291726
0.00162763
0.0053634
0.000744791
0.00138797
0.00722269
0.00134686
0.000381779
0.0022376
0.000915733
0.0075727
0.00600983
0.00202725
0.00797517
0.000904408
0.00144862
0.010261
0.00331685
0.00636248
0.00119698
0.00101526
0.00428194
0.00320433
0.00205129
0.0034531
0.00621035
0.00647805
0.00279415
0.00223616
0.00691392
0.00494495
0.00448376
0.006724
0.00082651
0.00616139
0.000842546
0.00331263
0.00229893
0.000758193
0.00159994
0.00264729
0.000598005
0.00201206
0.00928483
0.0035936
0.00223198
0.00352046
0.00423592
0.000945926
0.00415485
0.00525538
0.00760841
0.0054191
0.0014424
0.00164893
0.000941848
0.000724392
0.000764874
0.00289801
0.00684009
0.00101904
0.00262157
0.00165761
0.000248973
0.00564831
0.0109887
0.000550541
0.00210584
0.000575195
0.00192346
0.000971939
0.000559152
0.000580539
0.0048769
0.00439421
0.000731368
0.0010867
0.000460188
0.000502747
0.000483906
0.000460482
0.0010087
0.00103075
0.000533133
0.00059286
0.000611301
0.000595085
0.000923194
0.0103685
0.00686759
0.00507498
0.00611052
0.00522607
0.00913768
0.00469434
0.00116397
0.000983563
0.0101499
0.00404866
0.00274921
0.00154966
0.00594134
0.00376428
0.0090975
0.00953225
0.000477887
0.00710602
0.00249651
0.00409254
0.000653523
0.00306502
0.00291963
0.00633513
0.00201726
0.0053619
0.00675346
0.00338938
0.000834073
0.00101972
0.00091668
0.00172953
0.00544939
0.00322522
0.00422405
0.00287924
0.00319112
0.00463812
0.00161496
0.0139779
0.00965605
0.00405065
0.00539524
0.00691275
0.0096574
0.00996911
0.00166761
0.0016885
0.00507262
0.00424354
0.00405262
0.00402855
0.00939807
0.00537881
0.00306455
0.011026
0.00105731
0.00106381
0.00779203
0.00292731
0.00123074
0.0023563
0.00326604
0.0041734
0.00857967
0.00129361
0.00347538
0.00103999
0.000868385
0.00533666
0.0111654
0.002728
0.00987105
0.00668556
0.00244702
0.00373518
0.00913346
0.0153448
0.00362775
0.00260712
0.00978123
0.00342918
0.00840754
0.00813949
0.0106168
0.0112184
0.00173049
0.00447294
0.00413519
0.00380002
0.00243339
0.00821671
0.00707968
0.0100537
0.00405191
0.00567084
0.00210951
0.0102921
0.00689018
0.00348163
0.00320579
0.00312296
0.00137636
0.00292772
0.00485426
0.00380563
0.00304923
0.00369663
0.0028718
0.00279248
0.00624215
0.00926135
0.000960336
0.00180595
0.00393931
0.00279075
0.00334157
0.00460183
0.00350415
0.00224857
0.00092738
0.00386255
0.000909641
0.00286634
0.00965031
0.00985449
0.00148793
0.00297506
0.000925759
0.00802721
0.00250139
0.00157104
0.00642502
0.00311131
0.00964401
0.00829532
0.00415271
0.00363022
0.00150538
0.00523268
0.00614416
0.00762391
0.00173101
0.00151221
0.0063691
0.00146695
0.0103584
0.00266599
0.00217978
0.00298675
0.00632548
0.00557904
0.00103072
0.00795921
0.00189043
0.00089603
0.0092962
0.00547304
0.00335146
0.00280073
0.00213357
0.0105614
0.00237817
0.00560254
0.00307871
0.00294843
0.00512051
0.0049529
0.0070208
0.0109312
0.0103375
0.00237422
0.0020638
0.00175945
0.00387353
0.000789638
0.00309391
0.00340488
0.000489275
0.00962294
0.00578
0.00356466
0.00917539
0.00322812
0.00631862
0.0034912
0.000947338
0.00345149
0.00457108
0.00205559
0.00185007
0.00162338
0.0132308
0.00808855
0.00992783
0.0092183
0.00462907
0.00195341
0.00402636
0.00270853
0.000853499
0.0014333
0.00561062
0.000993071
0.00433543
0.00478976
0.00679085
0.0059878
0.00385375
0.00848279
0.000920563
0.00364645
0.00646819
0.00561772
0.00164726
0.00668983
0.00808879
0.00289477
0.00214184
0.00309185
0.00610598
0.0095409
0.0010612
0.000401266
0.00368351
0.00417147
0.00318949
0.00906552
0.00673669
0.000674605
0.00335786
0.000506363
0.000904371
0.00137897
0.00167315
0.0032151
0.00909712
0.000404105
0.00940698
0.0135804
0.00893878
0.00154483
0.00138612
0.00734804
0.00102152
0.00383506
0.00242465
0.00385567
0.00758701
0.00132259
0.00358763
0.00334248
0.00321296
0.00200976
0.0030115
0.00113308
0.00546286
0.00309552
0.00596838
0.0010667
0.00382158
0.00308814
0.00375045
0.00318815
0.00333726
0.00787817
0.00273534
0.00323126
0.00262952
0.0033873
0.00791602
0.00266895
0.00150577
0.000244758
0.000382569
0.00284439
0.00494668
0.00305708
0.00591565
0.00454054
0.00111773
0.00207369
0.0100856
0.0061867
0.00452001
0.00350179
0.00392315
0.00562745
0.0111431
0.00164814
0.00284163
0.00461018
0.0024322
0.00611147
0.00265743
0.00277267
0.00553469
0.00322389
0.00496893
0.00468405
0.00328223
0.00516882
0.00580859
0.00577984
0.00304866
0.00174367
0.00503415
0.00338141
0.00523691
0.00431742
0.00349164
0.00302478
0.00673404
0.00388419
0.00612541
0.00319833
0.00783923
0.0106859
0.00289409
0.00109004
0.00682941
0.00257521
0.00281814
0.0023368
0.0031878
0.00325798
0.00413022
0.00489844
0.00309041
0.00325638
0.000745061
0.00396902
0.00401929
0.00312511
0.0050927
0.0017231
0.00214583
0.00091687
0.00164861
0.000892039
0.000853913
0.00163995
0.00226005
0.000821275
0.00104123
0.0011999
0.000759805
0.00153486
0.00172761
0.00108359
0.000758315
0.00167805
0.0023978
0.00153978
0.00132298
0.000973969
0.00178829
0.000730499
0.000844963
0.000973359
0.000902253
0.000709811
0.000874326
0.0020361
0.000624192
0.000582432
0.0018304
0.00074541
0.00132807
0.00117045
0.00231106
)
;
boundaryField
{
frontAndBack
{
type empty;
}
wallOuter
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar>
108
(
0.000119161
0.000132232
0.00010807
5.8121e-05
5.25267e-05
7.56757e-05
8.58206e-05
5.54569e-05
5.88211e-05
8.22006e-05
5.57494e-05
8.55281e-05
8.66525e-05
5.62746e-05
5.73289e-05
5.46135e-05
0.000128616
9.06226e-05
6.15477e-05
6.92473e-05
4.85763e-05
0.000132709
6.34924e-05
9.21738e-05
0.000123496
0.00011846
0.000121747
0.000103431
0.000105825
0.000116772
9.67052e-05
0.000150155
0.000150585
0.000153362
0.000150761
0.000143076
0.000136212
0.000140353
0.00014416
0.000152307
0.000109289
0.000122542
0.000147174
0.000137581
0.000151487
0.000130862
0.000130584
0.000131356
0.000135011
0.000117165
6.27363e-05
8.82181e-05
0.000135897
5.7814e-05
0.00013119
0.000123549
9.29134e-05
0.000129938
0.000123823
4.60682e-05
0.000107755
0.000140356
0.000119942
0.000100746
9.10697e-05
7.23671e-05
0.000112476
8.71153e-05
9.18323e-05
0.000120757
2.9012e-05
2.9012e-05
6.67056e-05
6.95928e-05
6.76929e-05
7.02177e-05
0.000128012
5.57507e-05
6.09181e-05
5.86447e-05
5.57798e-05
0.000119536
0.000122013
6.45241e-05
7.16649e-05
7.38535e-05
7.19383e-05
0.000109904
0.000136724
0.000116401
5.78214e-05
7.89374e-05
9.9499e-05
0.000120717
0.00012497
0.000125696
0.000122981
0.000103411
0.000108381
5.92183e-05
0.000101965
0.000117801
4.84925e-05
6.13926e-05
4.88406e-05
2.84513e-05
4.61464e-05
0.000131668
)
;
}
inlet
{
type calculated;
value nonuniform 0();
}
outlet
{
type calculated;
value nonuniform 0();
}
wallInner
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar>
126
(
0.000174613
0.000241018
0.000119059
0.000119735
0.000221379
0.000214863
0.000110141
9.91009e-05
0.000114254
0.000213496
8.72845e-05
0.000174134
9.01804e-05
0.000128309
0.000191703
0.000191545
0.000118251
9.87755e-05
0.000120191
9.21727e-05
0.00023625
0.000108931
0.000226875
0.000152655
0.000127539
0.000213111
0.000203928
9.87553e-05
0.000107848
0.000169303
0.000106384
7.83416e-05
0.000192259
0.000248143
0.000206395
0.000167858
9.77371e-05
0.000215502
9.83878e-05
0.000199739
0.000178797
0.000124374
0.00010051
0.00019989
0.000220197
0.000109858
0.00011035
0.000120834
0.000113284
0.000168392
0.000121893
7.96549e-05
0.00015511
0.000219538
0.000145185
6.42209e-05
0.00011133
0.000190242
0.00016377
0.000126183
8.17308e-05
0.000102212
0.000121263
0.000181565
0.000111925
0.000172297
0.000173231
7.71178e-05
0.000138124
0.000170953
0.0001706
0.000174905
9.47442e-05
0.000174885
0.000188654
0.000196672
7.79895e-05
9.81194e-05
0.000123261
0.000135731
0.00012872
0.000129462
0.000189891
0.000196449
0.000194557
0.000202031
0.000180935
0.00018733
0.000138215
0.00021631
0.000166924
0.000153861
0.000133176
0.000196923
0.000109126
0.000188316
0.000106413
0.000102408
0.000187647
9.76418e-05
0.000124117
0.000140691
9.08616e-05
0.000177163
0.000196625
0.000127858
9.11819e-05
0.000191919
0.000266946
0.000177437
0.000153922
0.000115603
0.00020382
8.78676e-05
0.00010106
0.000115602
0.000109077
8.66108e-05
0.000105295
0.000228937
7.60989e-05
7.10065e-05
0.000208212
9.02319e-05
0.000154635
0.00013741
)
;
}
procBoundary1to0
{
type processor;
value nonuniform List<scalar>
29
(
0.00235972
0.00235972
0.00125493
0.00333681
0.00602237
0.00249158
0.0029232
0.000829555
0.00229095
0.00341418
0.00190325
0.00249158
0.00125493
0.00116326
0.0022183
0.00116675
0.00602237
0.00511598
0.00333681
0.00273585
0.000850898
0.000744855
0.00293522
0.000710234
0.000710234
0.00293522
0.000726271
0.000913807
0.000726271
)
;
}
procBoundary1to2
{
type processor;
value uniform 0.00316498;
}
procBoundary1to3
{
type processor;
value nonuniform List<scalar>
48
(
0.0121391
0.00563848
0.00757803
0.00757803
0.0035554
0.00405208
0.00405208
0.0109584
0.0156735
0.00199731
0.0017445
0.00199731
0.0016098
0.00247846
0.00308671
0.0016098
0.00133248
0.00133248
0.00139393
0.00139393
0.00146323
0.00141332
0.00174525
0.00148985
0.00148985
0.00175099
0.00243317
0.00243317
0.00658434
0.00279076
0.00185554
0.00658434
0.0109584
0.0161694
0.001693
0.00279076
0.0145859
0.0017445
0.0142567
0.00280403
0.00177864
0.0158385
0.0161694
0.001693
0.00324464
0.000945493
0.0033695
0.00177864
)
;
}
}
// ************************************************************************* //
| [
"mohan.2611@gmail.com"
] | mohan.2611@gmail.com | |
66f9b6e818e3a70dd7d70f17d83e100dcd440630 | 55220d061f8097d85a815b5743a6c0b1dcc1df1d | /list.h | e4c461a369e9fd7fc21127ff05197e86dce7828a | [] | no_license | sakky016/ListClass | 20411dffeef148606a4d9e53d375799387895e01 | 8f5b8b6626cc0f4df2774209c876f72ec942d461 | refs/heads/master | 2020-04-19T05:23:22.361141 | 2019-01-28T15:38:28 | 2019-01-28T15:38:28 | 167,986,738 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 674 | h | #ifndef _LIST_H_
#define _LIST_H_
#include "header.h"
typedef struct Node_tag
{
int data;
Node_tag *next;
}Node_t;
/* Regular Linked list class */
class List
{
protected:
Node_t *m_pHead;
bool m_bFreed;
unsigned int m_size;
public:
List();
~List();
virtual int insert(int val);
virtual int deleteNodeWithValue(int val);
virtual int deleteAllNodesWithValue(int val);
virtual bool swapNodes(int val1, int val2);
void display();
bool isEmpty();
void reverse();
Node_t* reverseInGroupsInList(Node_t *, int);
void reverseInGroups(int);
};
#endif
| [
"ssharad@SHARAD.PC"
] | ssharad@SHARAD.PC |
c036834310a6521358113d883b66916e81982648 | e133e2e6d8051a59ebe38d4d585546f69b70eadb | /source/tower/TowerManager.cpp | c1b264c56d2f230aa218c5c339c9eb7b6901d128 | [] | no_license | langest/terminal_defense | ad64ed580fe2dcb0065eed1213d9dede68feac8d | b77ed205907835656b3ed312ab92e33fb326c824 | refs/heads/master | 2021-08-16T02:23:35.842533 | 2021-08-14T19:09:12 | 2021-08-14T19:09:12 | 27,225,439 | 4 | 0 | null | 2021-01-27T19:08:20 | 2014-11-27T12:57:55 | C++ | UTF-8 | C++ | false | false | 1,680 | cpp | #include <tower/TowerManager.h>
namespace termd {
CTowerManager::CTowerManager(std::function<bool(const CCoordinate& position)> isPositionValid)
: mTowers()
, mProjectileManager(isPositionValid)
, mLogger(__FILE__) {}
void CTowerManager::update(std::map<CCoordinate, std::vector<CVirusHandle>>& virusMap) {
mLogger.log("Update");
for (auto it = mTowers.begin(); it != mTowers.end();) {
auto spawnProjectile = [this](std::unique_ptr<IProjectile>&& projectile) {
this->mProjectileManager.addProjectile(std::move(projectile));
};
bool keep = it->second->update(spawnProjectile, virusMap);
if (!keep) { // If tower is flagging removal, remove it
it = mTowers.erase(it);
} else {
++it;
}
}
mProjectileManager.update(virusMap);
}
void CTowerManager::initInvasion() {
for (auto it = mTowers.begin(); it != mTowers.end(); ++it) {
it->second->updateStartOfWave();
}
}
void CTowerManager::finishInvasion() {
for (auto it = mTowers.begin(); it != mTowers.end(); ++it) {
it->second->updateEndOfWave();
}
}
bool CTowerManager::isTowerAt(const CCoordinate& coordinate) const {
return mTowers.find(coordinate) != mTowers.end();
}
const std::map<CCoordinate, std::unique_ptr<ITower>>& CTowerManager::getTowers() const {
return mTowers;
}
bool CTowerManager::placeTower(const CCoordinate& position, std::unique_ptr<ITower>&& tower) {
if (this->isTowerAt(position)) {
return false;
}
mTowers.insert(std::make_pair<CCoordinate, std::unique_ptr<ITower>>(CCoordinate(position), std::move(tower)));
return true;
}
}
| [
"daniel.langest@gmail.com"
] | daniel.langest@gmail.com |
cd40564c9fe56985ff6ba14318c208a3054ce2e5 | 27a39d0b50ad81d00ba8e191470a6450b4e95b1a | /Data Structures/BST and Heaps/Haepsort1.cpp | d46464220c191f6b24f5d86f49e2d600a8fa5f56 | [
"MIT"
] | permissive | dragonman164/My-Journey-of-Data-Structures-and-Algorithms | 57a40a49b044c78b001b14171a4acc4c543465b9 | 50eb817fd346f8a29d190108807347d16670b76e | refs/heads/master | 2023-08-14T16:08:45.829746 | 2021-10-04T14:07:19 | 2021-10-04T14:07:19 | 367,568,387 | 1 | 7 | MIT | 2021-10-04T14:07:20 | 2021-05-15T07:31:19 | C++ | UTF-8 | C++ | false | false | 1,075 | cpp | #include<iostream>
#include<vector>
using namespace std;
void minheapify(vector<int> &x,int index,int heapsize)
{
int n = x.size()-1;
int leftchild = x[2*index],rightchild = x[2*index + 1],largest = index;
if (2*index <= heapsize and leftchild < x[largest])
largest = 2*index;
if((2*index + 1)<= heapsize and rightchild < x[largest] )
largest = 2*index + 1;
if (largest != index)
{
swap(x[index],x[largest]);
minheapify(x,largest,heapsize);
}
}
void buildminheap (vector<int> &x)
{
int n = (x.size()-1)/2 ;
for(int i = n; i >=1 ; i--)
minheapify(x,i,x.size()-1);
}
void heapsort(vector<int> &x)
{
buildminheap(x);
int heapsize = x.size()-1;
while (heapsize> 1)
{
swap(x[1],x[heapsize--]);
minheapify(x,1,heapsize);
}
}
int main()
{
int n;
cout<<"Enter size of array ";
cin>>n;
vector<int> x(n+1);
cout<<"Enter elements of array: ";
for(int i = 1;i<=n;i++)
cin>>x[i];
heapsort(x);
cout<<"Sorted array is: ";
for(int i = 1 ;i<=n;i++)
cout<<x[i]<<" ";
}
| [
"sanidhiyafirefox123@gmail.com"
] | sanidhiyafirefox123@gmail.com |
252b4c53d34373dad26d208c7bc4c684e027ad47 | 8a4a69e5b39212b955eb52cc005311a440189c9b | /src/mame/includes/blockade.h | e0609af2673757aa98fd5a5f1b33ebcf973fcb38 | [] | no_license | Ced2911/mame-lx | 7d503b63eb5ae52f1e49763fc156dffa18517ec9 | e58a80fefc46bdb879790c6bcfe882a9aff6f3ae | refs/heads/master | 2021-01-01T17:37:22.723553 | 2012-02-04T10:05:52 | 2012-02-04T10:05:52 | 3,058,666 | 1 | 7 | null | null | null | null | UTF-8 | C++ | false | false | 829 | h | #include "sound/discrete.h"
#include "sound/samples.h"
class blockade_state : public driver_device
{
public:
blockade_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) { }
UINT8 * m_videoram;
/* video-related */
tilemap_t *m_bg_tilemap;
/* input-related */
UINT8 m_coin_latch; /* Active Low */
UINT8 m_just_been_reset;
};
/*----------- defined in video/blockade.c -----------*/
WRITE8_HANDLER( blockade_videoram_w );
VIDEO_START( blockade );
SCREEN_UPDATE_IND16( blockade );
/*----------- defined in audio/blockade.c -----------*/
extern const samples_interface blockade_samples_interface;
DISCRETE_SOUND_EXTERN( blockade );
WRITE8_DEVICE_HANDLER( blockade_sound_freq_w );
WRITE8_HANDLER( blockade_env_on_w );
WRITE8_HANDLER( blockade_env_off_w );
| [
"cc2911@facebook.com"
] | cc2911@facebook.com |
673c80e0a218f71b56df3896a3681adf9689d0c5 | cc596ed1a5ee12f523b4e759d5e889b2cbddeda3 | /Source/republic_commando/AI/BTServicePlayerLocation.cpp | 8ab3508f2009c4afe0859eb8fc3b759ce8049e87 | [] | no_license | Jaden51/ParagonShooter | 2f41ed0b8642bed5d67d821431d80c80236ba0f9 | ccb424b239b9144b549e0e5d7bfdab7508d58cfd | refs/heads/main | 2023-06-18T07:41:30.848663 | 2021-07-09T18:49:37 | 2021-07-09T18:49:37 | 368,984,788 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 646 | cpp | #include "BTServicePlayerLocation.h"
#include "BehaviorTree/BlackboardComponent.h"
#include "Kismet/GameplayStatics.h"
UBTServicePlayerLocation::UBTServicePlayerLocation()
{
NodeName = "Update Player Location";
}
void UBTServicePlayerLocation::TickNode(UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory, float DeltaSeconds)
{
Super::TickNode(OwnerComp, NodeMemory, DeltaSeconds);
APawn *PlayerPawn = UGameplayStatics::GetPlayerPawn(GetWorld(), 0);
if (PlayerPawn == nullptr)
{
return;
}
OwnerComp.GetBlackboardComponent()->SetValueAsVector(GetSelectedBlackboardKey(), PlayerPawn->GetActorLocation());
} | [
"jadenhums51@gmail.com"
] | jadenhums51@gmail.com |
d5d88e95539015d2f0934bd8d715e6f6912dde2c | 6c73caf25e414375d2833126af26ac04390edfb2 | /Foundation/Stream.cpp | e7730b9fae30a66f33715dea88926a8c95b07c64 | [] | no_license | qimmer/Plaza | 1acadc8c7cf1b98a4b7c14558610e9775a623887 | 3ed06d4d157e3d464f06bcf5fb251424c2b27a21 | refs/heads/master | 2023-03-20T08:46:10.343094 | 2018-09-18T16:20:27 | 2018-09-18T16:20:27 | 122,452,093 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,410 | cpp | //
// Created by Kim Johannsen on 13/01/2018.
//
#ifdef WIN32
#include <direct.h>
#include <shlwapi.h>
#undef GetHandle
#undef CreateService
#undef CreateEvent
#endif
#include <File/Folder.h>
#include <Core/Debug.h>
#include "Stream.h"
#include "VirtualPath.h"
#include "NativeUtils.h"
#include <EASTL/unordered_map.h>
#include <EASTL/vector.h>
#include <EASTL/string.h>
#include <EASTL/algorithm.h>
#include <Core/Identification.h>
#include <Core/Math.h>
#include <unistd.h>
using namespace eastl;
struct StreamExtensionModule {
Vector(ModuleStreamProtocols, Entity, 8)
Vector(ModuleStreamCompressors, Entity, 8)
Vector(ModuleFileTypes, Entity, 8)
Vector(ModuleSerializers, Entity, 8)
};
struct Stream {
StringRef StreamPath;
StringRef StreamResolvedPath;
Entity StreamProtocol, StreamCompressor, StreamFileType;
int StreamMode;
bool InvalidationPending;
};
struct FileType {
Entity FileTypeComponent;
StringRef FileTypeExtension;
StringRef FileTypeMimeType;
};
API_EXPORT bool StreamSeek(Entity entity, s32 offset){
auto streamData = GetStreamData(entity);
if(!streamData) return false;
auto protocolData = GetStreamProtocolData(streamData->StreamProtocol);
if(!protocolData) return false;
if(!protocolData->StreamSeekHandler) {
return false;
}
return protocolData->StreamSeekHandler(entity, offset);
}
API_EXPORT s32 StreamTell(Entity entity){
auto streamData = GetStreamData(entity);
if(!streamData) return false;
auto protocolData = GetStreamProtocolData(streamData->StreamProtocol);
if(!protocolData) return false;
if(!protocolData->StreamTellHandler) {
return false;
}
return protocolData->StreamTellHandler(entity);
}
API_EXPORT u64 StreamRead(Entity entity, u64 size, void *data){
auto streamData = GetStreamData(entity);
if(!streamData) return false;
auto protocolData = GetStreamProtocolData(streamData->StreamProtocol);
if(!protocolData) return false;
if(!protocolData->StreamReadHandler || !(streamData->StreamMode & StreamMode_Read)) {
return 0;
}
return protocolData->StreamReadHandler(entity, size, data);
}
API_EXPORT u64 StreamWrite(Entity entity, u64 size, const void *data){
auto streamData = GetStreamData(entity);
if(!streamData) return 0;
auto protocolData = GetStreamProtocolData(streamData->StreamProtocol);
if(!protocolData) return 0;
if(!protocolData->StreamWriteHandler || !(streamData->StreamMode & StreamMode_Write)) {
return 0;
}
streamData->InvalidationPending = true;
return protocolData->StreamWriteHandler(entity, size, data);
}
API_EXPORT bool IsStreamOpen(Entity entity) {
auto streamData = GetStreamData(entity);
if(!streamData) return false;
auto protocolData = GetStreamProtocolData(streamData->StreamProtocol);
if(!protocolData) return false;
if(!protocolData->StreamIsOpenHandler) {
return false;
}
return protocolData->StreamIsOpenHandler(entity);
}
API_EXPORT bool StreamOpen(Entity entity, int mode) {
if(!IsEntityValid(entity)) {
return false;
}
auto data = GetStreamData(entity);
if(!data) return false;
auto protocolData = GetStreamProtocolData(data->StreamProtocol);
if(!protocolData) return false;
if(!protocolData->StreamOpenHandler) {
return false;
}
data->StreamMode = mode;
if(protocolData->StreamOpenHandler(entity, mode)) {
data->StreamMode = mode;
return true;
} else {
data->StreamMode = 0;
//Log(entity, LogSeverity_Error, "Stream '%s' could not be opened.", data->StreamPath);
}
return false;
}
API_EXPORT bool StreamDelete(Entity entity) {
auto data = GetStreamData(entity);
if (!data) return false;
auto protocolData = GetStreamProtocolData(data->StreamProtocol);
if (!protocolData) return false;
if (protocolData->StreamDeleteHandler) {
return protocolData->StreamDeleteHandler(entity);
}
return false;
}
API_EXPORT bool StreamClose(Entity entity) {
auto data = GetStreamData(entity);
if(!data) return false;
auto protocolData = GetStreamProtocolData(data->StreamProtocol);
if(!protocolData) return false;
if(protocolData->StreamCloseHandler) {
protocolData->StreamCloseHandler(entity);
if(data->InvalidationPending) {
data->InvalidationPending = false;
data->StreamMode = 0;
Type types[] = { TypeOf_Entity };
const void* values[] = { &entity };
FireEventFast(EventOf_StreamContentChanged(), 1, types, values);
}
return true;
}
return false;
}
API_EXPORT void StreamReadAsync(Entity entity, u64 size, StreamReadAsyncHandler readFinishedHandler){
char *buffer = (char*)malloc(size);
StreamRead(entity, size, buffer);
readFinishedHandler(entity, size, buffer);
free(buffer);
}
API_EXPORT void StreamWriteAsync(Entity entity, u64 size, const void *data, StreamWriteAsyncHandler writeFinishedHandler){
char *buffer = (char*)malloc(size);
Assert(entity, buffer);
memcpy(buffer, data, size);
StreamWrite(entity, size, buffer);
writeFinishedHandler(entity, size);
free(buffer);
}
API_EXPORT StringRef GetStreamResolvedPath(Entity entity) {
Assert(entity, IsEntityValid(entity));
return GetStreamData(entity)->StreamResolvedPath;
}
API_EXPORT int GetStreamMode(Entity entity) {
return GetStreamData(entity)->StreamMode;
}
API_EXPORT u64 StreamDecompress(Entity entity, u64 uncompressedOffset, u64 uncompressedSize, void *uncompressedData) {
auto data = GetStreamData(entity);
auto compressorData = GetStreamCompressorData(data->StreamCompressor);
if(!compressorData) return false;
if(compressorData->DecompressHandler) {
if(!compressorData->DecompressHandler(entity, uncompressedOffset, uncompressedSize, uncompressedData)) {
return 0;
}
return uncompressedSize;
}
// no decompressor, just use raw data
StreamSeek(entity, uncompressedOffset);
return StreamRead(entity, uncompressedSize, uncompressedData);
}
API_EXPORT u64 StreamCompress(Entity entity, u64 uncompressedOffset, u64 uncompressedSize, const void *uncompressedData) {
auto data = GetStreamData(entity);
auto compressorData = GetStreamCompressorData(data->StreamCompressor);
if(!compressorData) return false;
if(compressorData->CompressHandler) {
if(!compressorData->CompressHandler(entity, uncompressedOffset, uncompressedSize, uncompressedData)) {
return 0;
}
return uncompressedSize;
}
// no decompressor, just use raw data
StreamSeek(entity, uncompressedOffset);
return StreamWrite(entity, uncompressedSize, uncompressedData);
}
API_EXPORT StringRef GetFileName(StringRef absolutePath) {
auto fileName = strrchr(absolutePath, '/');
if(!fileName) return absolutePath;
return Intern(fileName + 1);
}
API_EXPORT StringRef GetFileExtension(StringRef absolutePath) {
auto lastSlash = strrchr(absolutePath, '/');
if(lastSlash) absolutePath = lastSlash + 1;
auto extension = strrchr(absolutePath, '.');
if(!extension) return "";
return Intern(extension);
}
API_EXPORT void GetParentFolder(StringRef absolutePath, char *parentFolder, size_t bufMax) {
strncpy(parentFolder, absolutePath, bufMax);
auto ptr = strrchr(parentFolder, '/');
if(!ptr) {
*parentFolder = 0;
return;
}
parentFolder[ptr - parentFolder] = '\0';
}
API_EXPORT StringRef GetCurrentWorkingDirectory() {
static char path[PathMax];
getcwd(path, PathMax);
return Intern(path);
}
API_EXPORT void CleanupPath(char* messyPath) {
char *dest = messyPath;
auto protocolLocation = strstr(messyPath, "://");
if(protocolLocation) {
messyPath = protocolLocation + 3;
}
#ifdef WIN32
auto isRelative = ::PathIsRelativeA(messyPath) || messyPath[0] == '/';
#else
auto isRelative = messyPath[0] != '/';
#endif
string absolutePath = messyPath;
if(isRelative) {
absolutePath = GetCurrentWorkingDirectory();
absolutePath += "/";
absolutePath += messyPath;
}
replace(absolutePath.begin(), absolutePath.end(), '\\', '/');
vector<string> pathElements;
pathElements.clear();
string element;
size_t start = 0;
while(start < absolutePath.length()) {
auto nextSep = absolutePath.find('/', start);
if(nextSep == string::npos) nextSep = absolutePath.length();
auto element = absolutePath.substr(start, nextSep - start);
start = nextSep + 1;
if(element.length() == 0) {
// nothing in this element
continue;
} else if(element.length() > 1 && element.compare(element.length() - 2, 2, "..") == 0) {
// parent directory identifier
pathElements.pop_back();
} else if(element.compare(element.length() - 1, 1, ".") == 0) {
// current directory identifier
continue;
} else {
pathElements.push_back(element);
}
}
string combined = "file://";
for(auto i = 0; i < pathElements.size(); ++i) {
combined.append(pathElements[i]);
if(i < pathElements.size() - 1) {
combined.append("/");
}
}
strcpy(dest, combined.c_str());
}
API_EXPORT bool SetStreamData(Entity stream, u32 offset, u32 numBytes, const char *data) {
if(!StreamOpen(stream, StreamMode_Write)) {
return false;
}
StreamSeek(stream, offset);
StreamWrite(stream, numBytes, data);
StreamClose(stream);
return true;
}
API_EXPORT bool StreamCopy(Entity source, Entity destination) {
bool sourceWasOpen = IsStreamOpen(source);
bool destinationWasOpen = IsStreamOpen(destination);
if(!sourceWasOpen && !StreamOpen(source, StreamMode_Read)) return false;
if(!destinationWasOpen && !StreamOpen(destination, StreamMode_Write)) return false;
StreamSeek(source, StreamSeek_End);
auto size = StreamTell(source);
StreamSeek(source, 0);
char buffer[4096];
u32 numWrittenTotal = 0;
while(numWrittenTotal < size) {
auto numRead = StreamRead(source, Min(4096, size - numWrittenTotal), buffer);
auto numWritten = StreamWrite(destination, numRead, buffer);
if(numWritten < numRead || numWritten == 0) {
if(!sourceWasOpen) StreamClose(source);
if(!destinationWasOpen) StreamClose(destination);
return false;
}
}
if(!sourceWasOpen) StreamClose(source);
if(!destinationWasOpen) StreamClose(destination);
return true;
}
LocalFunction(OnStreamFileTypeChanged, void, Entity stream, Entity oldFileType, Entity newFileType) {
if(IsEntityValid(oldFileType)) {
auto fileTypeComponent = GetFileTypeComponent(oldFileType);
if(IsEntityValid(fileTypeComponent)) {
RemoveComponent(stream, fileTypeComponent);
}
}
if(IsEntityValid(newFileType)) {
auto fileTypeComponent = GetFileTypeComponent(newFileType);
if(IsEntityValid(fileTypeComponent)) {
AddComponent(stream, fileTypeComponent);
}
}
}
LocalFunction(OnStreamPathChanged, void, Entity entity, StringRef oldValue, StringRef newValue) {
auto data = GetStreamData(entity);
if(IsStreamOpen(entity)) {
StreamClose(entity);
}
SetStreamFileType(entity, 0);
SetStreamCompressor(entity, 0);
SetStreamProtocol(entity, 0);
// Resolve protocol, compressor and filetype first
char resolvedPath[PathMax];
ResolveVirtualPath(newValue, PathMax, resolvedPath);
data->StreamResolvedPath = Intern(resolvedPath);
char protocolIdentifier[32];
auto colonLocation = strstr(resolvedPath, "://");
if(!colonLocation) {
//Log(entity, LogSeverity_Error, "Malformed URI: %s (resolved from %s)", resolvedPath, data->StreamPath);
return;
}
u32 len = colonLocation - resolvedPath;
strncpy(protocolIdentifier, resolvedPath, len);
protocolIdentifier[len] = 0;
auto protocolIdentifierInterned = Intern(protocolIdentifier);
auto path = GetStreamResolvedPath(entity);
auto extension = GetFileExtension(path);
StringRef mimeType = Intern("application/octet-stream");
auto oldProtocol = data->StreamProtocol;
// Find protocol
for_entity(protocolEntity, protocolData, StreamProtocol) {
if(protocolIdentifierInterned == protocolData->StreamProtocolIdentifier) {
SetStreamProtocol(entity, protocolEntity);
break;
}
}
if(!IsEntityValid(data->StreamProtocol)) {
Log(entity, LogSeverity_Error, "Unknown stream protocol: %s (%s)", protocolIdentifier, resolvedPath);
return;
}
if(strlen(extension) > 0) {
// Find Filetype (optional)
for_entity(fileTypeEntity, fileTypeData, FileType) {
if(extension == fileTypeData->FileTypeExtension) {
SetStreamFileType(entity, fileTypeEntity);
if(fileTypeData->FileTypeMimeType) {
mimeType = fileTypeData->FileTypeMimeType;
break;
}
}
}
if(!IsEntityValid(GetStreamFileType(entity))) {
Log(entity, LogSeverity_Warning, "Unknown file type: %s", extension);
}
}
// Find compressor (optional)
for_entity(compressorEntity, compressorData, StreamCompressor) {
if(mimeType == compressorData->StreamCompressorMimeType) {
SetStreamCompressor(entity, compressorEntity);
}
}
// Update stream with new protocol, compressor and filetype
if(IsEntityValid(oldProtocol)) {
auto protocolComponent = GetStreamProtocolData(oldProtocol)->StreamProtocolComponent;
if(IsEntityValid(protocolComponent)) {
RemoveComponent(entity, protocolComponent);
}
}
if(IsEntityValid(data->StreamProtocol)) {
auto protocolComponent = GetStreamProtocolData(data->StreamProtocol)->StreamProtocolComponent;
if(IsEntityValid(protocolComponent)) {
AddComponent(entity, protocolComponent);
}
}
// Find serializer (optional)
for_entity(serializerEntity, serializerData, Serializer) {
if(mimeType == serializerData->SerializerMimeType) {
AddComponent(entity, ComponentOf_PersistancePoint());
break;
}
}
Type types[] = { TypeOf_Entity };
const void* values[] = { &entity };
FireEventFast(EventOf_StreamContentChanged(), 1, types, values);
}
LocalFunction(OnProtocolChanged, void, Entity protocol) {
for_entity(stream, streamData, Stream) {
if(streamData->StreamProtocol == protocol) {
OnStreamPathChanged(stream, streamData->StreamPath, streamData->StreamPath);
}
}
}
LocalFunction(OnFileTypeChanged, void, Entity fileType) {
for_entity(stream, streamData, Stream) {
if(streamData->StreamFileType == fileType) {
OnStreamPathChanged(stream, streamData->StreamPath, streamData->StreamPath);
}
}
}
LocalFunction(OnCompressorChanged, void, Entity compressor) {
for_entity(stream, streamData, Stream) {
if(streamData->StreamCompressor == compressor) {
OnStreamPathChanged(stream, streamData->StreamPath, streamData->StreamPath);
}
}
}
BeginUnit(Stream)
BeginComponent(Stream)
RegisterProperty(StringRef, StreamPath)
RegisterReferencePropertyReadOnly(StreamProtocol, StreamProtocol)
RegisterReferencePropertyReadOnly(StreamCompressor, StreamCompressor)
RegisterReferencePropertyReadOnly(FileType, StreamFileType)
EndComponent()
BeginComponent(StreamProtocol)
RegisterProperty(StringRef, StreamProtocolIdentifier)
RegisterProperty(Entity, StreamProtocolComponent)
EndComponent()
BeginComponent(StreamCompressor)
RegisterProperty(StringRef, StreamCompressorMimeType)
EndComponent()
BeginComponent(FileType)
RegisterProperty(StringRef, FileTypeExtension)
RegisterProperty(StringRef, FileTypeMimeType)
RegisterProperty(Entity, FileTypeComponent)
EndComponent()
BeginComponent(Serializer)
RegisterProperty(StringRef, SerializerMimeType)
EndComponent()
BeginComponent(StreamExtensionModule)
RegisterBase(Module)
RegisterArrayProperty(StreamProtocol, ModuleStreamProtocols)
RegisterArrayProperty(StreamCompressor, ModuleStreamCompressors)
RegisterArrayProperty(FileType, ModuleFileTypes)
RegisterArrayProperty(Serializer, ModuleSerializers)
EndComponent()
RegisterEvent(StreamContentChanged)
RegisterSubscription(StreamPathChanged, OnStreamPathChanged, 0)
RegisterSubscription(StreamProtocolIdentifierChanged, OnProtocolChanged, 0)
RegisterSubscription(StreamProtocolComponentChanged, OnProtocolChanged, 0)
RegisterSubscription(FileTypeExtensionChanged, OnFileTypeChanged, 0)
RegisterSubscription(FileTypeMimeTypeChanged, OnFileTypeChanged, 0)
RegisterSubscription(StreamCompressorMimeTypeChanged, OnCompressorChanged, 0)
RegisterSubscription(StreamFileTypeChanged, OnStreamFileTypeChanged, 0)
EndUnit()
| [
"twicfall@gmail.com"
] | twicfall@gmail.com |
a670853325e6cdc1f77eb10b9bcc8c593df21c99 | 3170e69527e7426ad2930de5d16ff31f6ad08914 | /external/libcocos3dx/Shadows/CC3ShadowVolumes.h | b42acc91970df7ffcf74048665442688ccdd2436 | [
"MIT"
] | permissive | isoundy000/cocosclient | e3818df70abfe81d25d53f80572ddd8ab7219cf8 | 477cde3ecd6c91d610e0d02fddf82e048fb604bd | refs/heads/master | 2021-01-25T14:22:35.694874 | 2016-05-30T09:39:45 | 2016-05-30T09:39:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,268 | h | /*
* Cocos3D-X 1.0.0
* Author: Bill Hollings
* Copyright (c) 2010-2014 The Brenwill Workshop Ltd. All rights reserved.
* http://www.brenwill.com
*
* Copyright (c) 2014-2015 Jason Wong
* http://www.cocos3dx.org/
*
* 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.
*
* http://en.wikipedia.org/wiki/MIT_License
*/
#ifndef _CC3_SHADOWVOLUMES_H_
#define _CC3_SHADOWVOLUMES_H_
/** The suggested default shadow volume vertex offset factor. */
static const GLfloat kCC3DefaultShadowVolumeVertexOffsetFactor = 0.001f;
NS_COCOS3D_BEGIN
/**
* The mesh node used to build a shadow volume. A single CC3ShadowVolumeMeshNode
* instance represents the shadow from a single light for a single shadow-casting node.
*
* As a mesh node, the CC3ShadowVolumeMeshNode instance is added as a child to the node
* whose shadow is to be represented. To automatically create a CC3ShadowVolumeMeshNode
* and add it to the shadow-casting node, use the addShadowVolumesForLight: method on
* the shadow-casting node (or any structural ancestor of that node).
*
* CC3ShadowVolumeMeshNode implements the CC3ShadowProtocol. The implementation of the
* updateShadow method populates a shadow volume mesh that encompasses the volume of
* space shadowed by the shadow-casting node. Any other object with this shadow volume
* will be shadowed by that node.
*
* The shadow volume mesh of this node is invisible in itself, but by depth-testing
* against other drawn nodes, a stencil is created indicating which view pixels will
* be in shadow. Those view pixels are then darkened accordingly.
*
* Of all shadowing techniques, shadow volumes result in the most accurate shadows,
* but are also the most computationally intensive.
*
* Shadow volumes use a stencil buffer to determine the areas that require shading. The stencil
* buffer must be allocated within the EAGLView when the view is created and initialized. Under
* iOS, the sencil buffer is combined with the depth buffer, and you create a stencil buffer by
* passing the value GL_DEPTH24_STENCIL8 as the depth format argument in the CCGLView method
* viewWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:.
*/
/// <CC3ShadowProtocol>
class CC3ShadowVolumeMeshNode : public CC3MeshNode, public CC3ShadowProtocol
{
DECLARE_SUPER( CC3MeshNode );
public:
CC3ShadowVolumeMeshNode();
virtual ~CC3ShadowVolumeMeshNode();
/**
* Indicates that this should display the terminator line of the shadow-casting node.
*
* The terminator line is the line that separates the illuminated side of the
* shadow-casting object from the dark side. It defines the start of the shadow
* volume mesh that is attached to the shadow-casting node.
*
* This property can be useful for diagnostics during development. This property
* only has effect if the visible property is set to YES for this shadow-volume node.
*/
bool shouldDrawTerminator();
void setShouldDrawTerminator( bool shouldDraw );
// TODO: will change when polymorphism has been figured out
/**
* Draws this node to a stencil. The stencil is marked wherever another node
* intersects the mesh volume of this node, and is therefore in shadow.
*
* The application should not use this method. The method signature, and use of
* this method will change as additional shadow-casting techniques are introduced.
*/
void drawToStencilWithVisitor( CC3NodeDrawingVisitor* visitor );
/**
* Returns the default value to which the visible property will be set when an instance is
* created and initialized.
*
* The initial value of this property is NO. Normally, shadow volumes affect the contents of
* the stencil buffer, but are not directly visible themselves. However, during development
* debugging, you can set this property to YES to make the shadow volumes visible within the
* scene, to help visualize how the shadow volumes are interacting with the scene.
*/
static bool defaultVisible();
/**
* Sets the default value to which the visible property will be set when an instance is
* created and initialized.
*
* The initial value of this property is NO. Normally, shadow volumes affect the contents of
* the stencil buffer, but are not directly visible themselves. However, during development
* debugging, you can set this property to YES to make the shadow volumes visible within the
* scene, to help visualize how the shadow volumes are interacting with the scene.
*/
static void setDefaultVisible( bool _defaultVisible );
/** Create the shadow volume mesh once the parent is attached. */
void setParent( CC3Node* aNode );
bool isShadowVolume();
/**
* If shadow volume should be visible, add a material
* to display the volume, otherwise get rid of it.
*/
void setVisible( bool _isVisible );
void createShadowMesh();
/** A shadow volume only uses a material when it is to be visible during development. */
void checkShadowMaterial();
GLushort getShadowLagFactor();
void setShadowLagFactor( GLushort lagFactor );
GLushort getShadowLagCount();
void setShadowLagCount( GLushort lagCount );
bool shouldShadowFrontFaces();
void setShouldShadowFrontFaces( bool shouldShadow );
bool shouldShadowBackFaces();
void setShouldShadowBackFaces( bool shouldShadow );
GLfloat getShadowOffsetFactor();
void setShadowOffsetFactor( GLfloat factor );
GLfloat shadowOffsetUnits();
void setShadowOffsetUnits( GLfloat units );
GLfloat getShadowVolumeVertexOffsetFactor();
void setShadowVolumeVertexOffsetFactor( GLfloat factor );
GLfloat getShadowExpansionLimitFactor();
void setShadowExpansionLimitFactor( GLfloat factor );
bool shouldAddShadowVolumeEndCapsOnlyWhenNeeded();
void setShouldAddShadowVolumeEndCapsOnlyWhenNeeded( bool onlyWhenNeeded );
bool hasShadowVolumesForLight( CC3Light* aLight );
bool hasShadowVolumes();
void initWithTag( GLuint aTag, const std::string& aName );
static CC3ShadowVolumeMeshNode* nodeWithName( const std::string& aName );
void populateFrom( CC3ShadowVolumeMeshNode* another );
virtual CCObject* copyWithZone( CCZone* zone );
bool isShadowDirty();
bool useDepthFailAlgorithm();
virtual void setLight(CC3Light *light);
/**
* Overridden to return nil so that the shadow volume
* will always be drawn when made visible during development.
*/
CC3NodeBoundingVolume* defaultBoundingVolume();
/** Returns this node's parent, cast as a mesh node. */
CC3MeshNode* getShadowCaster();
/**
* Returns a 4D directional vector which can be added to each vertex when creating
* the shadow volume vertices from the corresponding shadow caster vertices.
*
* The returned vector is in the local coordinate system of the shadow caster.
*
* The returned directional vector is a small offset vector in the direction away
* from the light. A unit vector in that direction is scaled by both the distance
* from the center of the shadow casting node to the camera and the
* shadowVolumeVertexOffsetFactor property. Hence, if the shadow caster is farther
* away from the camera, the returned value will be larger, to reduce the chance
* of Z-fighting between the faces of the shadow volume and the shadow caster.
*/
CC3Vector4 getShadowVolumeVertexOffsetForLightAt( const CC3Vector4& localLightPos );
/**
* Populates the shadow volume mesh by iterating through all the faces in the mesh of
* the shadow casting node, looking for all pairs of neighbouring faces where one face
* is in illuminated (facing towards the light) and the other is dark (facing away from
* the light). The set of edges between these pairs forms the terminator of the mesh,
* where the mesh on one side of the terminator is illuminated and the other is dark.
*
* The shadow volume is then constructed by extruding each edge line segment in the
* terminator out to infinity in the direction away from the light source, forming a
* tube of infinite length.
*
* Uses the 4D homogeneous location of the light in the global coordinate system.
* When using the light location this method transforms this location to the local
* coordinates system of the shadow caster.
*/
void populateShadowMesh();
/**
* Adds a face to the cap at the near end of the shadow volume.
*
* The winding order of the end-cap faces is determined from the winding order of
* the model face, taking into consideration whether the face is lit or not.
*/
bool addShadowVolumeCapFor( bool isFaceLit, CC3Vector4* vertices, const CC3Vector4& lightPosition, GLuint* shdwVtxIdx );
/**
* When drawing the terminator line of the mesh, just add the two line
* endpoints, and don't make use of infinitely extruded endpoints.
*/
bool addTerminatorLineFrom( const CC3Vector4& edgeStartLoc, const CC3Vector4& edgeEndLoc, GLuint* shdwVtxIdx );
/**
* Adds a side to the shadow volume, by extruding the specified terminator edge of
* the specified shadow caster mesh to infinity. The light source is directional
* at the specified position. The shadow volume vertices are added starting at the
* specified vertex index.
*
* For a directional light, the shadow volume sides are parallel and can therefore
* be described as meeting at a single point at infinity. We therefore only need to
* add a single triangle, whose far point is in the opposite direction of the light.
*/
bool addShadowVolumeSideFrom( const CC3Vector4& edgeStartLoc, const CC3Vector4& edgeEndLoc, const CC3Vector4& lightPosition, GLuint* shdwVtxIdx );
/**
* Adds a side to the shadow volume, by extruding the specified terminator edge of
* the specified shadow caster mesh to infinity. The light source is positional at
* the specified position. The shadow volume vertices are added starting at the
* specified vertex index.
*
* For a locational light, the shadow volume sides are not parallel and expand as
* they extend away from the shadow casting object. If the shadow volume does not
* need to be capped off at the far end, the shadow expands to infinity.
*
* However, if the shadow volume needs to be capped off at the far end, the shadow
* is allowed to expand behind the shadow-caster to a distance equivalent to the
* distance from the light to the shadow-caster, multiplied by the value of the
* shadowExpansionLimitFactor property. At that point, the shadow volume will
* extend out to infinity at that same size.
*
* For the shadow volume segment that expands in size, each side is a trapezoid
* formed by projecting a vector from the light, through each terminator edge
* vertex, out to either infinity of the distance determined by the value of the
* shadowExpansionLimitFactor property. Then, from that distance to infinity,
* the shadow volume side behaves as if it originated from a directional light,
* and is constructed from a single triangle, extending out to infinity in the
* opposite direction of the light.
*/
bool addShadowVolumeSideFrom( const CC3Vector4& edgeStartLoc, const CC3Vector4& edgeEndLoc, bool doesRequireCapping, const CC3Vector4& lightPosition, GLuint* shdwVtxIdx );
/**
* Expands the location of an terminator edge vertex in the direction away from the locational
* light at the specified location. The vertex is moved away from the light along the vector
* from the light to the vertex, a distance equal to the distance between the light and the
* vertex, multiplied by the value of the shadowExpansionLimitFactor property.
*/
CC3Vector4 expand( const CC3Vector4& edgeLoc, const CC3Vector4& lightLoc );
/** Overridden to decrement the shadow lag count on each update. */
void processUpdateBeforeTransform( CC3NodeUpdatingVisitor* visitor );
/** Returns whether the shadow cast by this shadow volume will be visible. */
bool isShadowVisible();
/**
* Returns whether this shadow volume is ready to be updated.
* It is if the lag count has been decremented to zero.
*/
bool isReadyToUpdate();
/**
* If the shadow is ready to be updated, check if the shadow is both
* visible and dirty, and re-populate the shadow mesh if needed.
*
* To keep the shadow lag count synchronized across all shadow-casting nodes,
* the shadow lag count will be reset to the value of the shadow lag factor
* if the shadow is ready to be updated, even if it is not actually updated
* due to it being invisible, or not dirty.
*/
void updateShadow();
/**
* Selects whether to use the depth-fail or depth-pass algorithm,
* based on whether this shadow falls across the camera.
*
* The depth-fail algorithm requires end caps on this shadow volume.
* The depth-pass algorithm does not. Rendering end-caps when not needed
* creates a performance penalty, so the depth-pass algorithm can be used
* by setting the shouldAddEndCapsOnlyWhenNeeded property to YES.
*
* If the selected stencil algorithm changes, this shadow volume is marked
* as dirty so that the end caps will be added or removed appropriately.
*/
void updateStencilAlgorithm();
/** Overridden to remove this shadow node from the light. */
void wasRemoved();
void markTransformDirty();
/** A node that affects this shadow (generally the light) was transformed. Mark the shadow as dirty. */
virtual void nodeWasTransformed( CC3Node* aNode );
virtual void nodeWasDestroyed( CC3Node* node );
/** Overridden to set the line properties in addition to other configuration. */
void configureDrawingParameters( CC3NodeDrawingVisitor* visitor );
void drawToStencilIncrementing( bool isIncrementing, CC3NodeDrawingVisitor* visitor );
// Shadows are not copied, because each shadow connects
// one-and-only-one shadow casting node to one-and-only-one light.
bool shouldIncludeInDeepCopy();
void addShadowVolumesForLight( CC3Light* aLight );
bool shouldDrawDescriptor();
void setShouldDrawDescriptor( bool shouldDraw );
bool shouldDrawWireframeBox();
void setShouldDrawWireframeBox( bool shouldDraw );
bool shouldDrawLocalContentWireframeBox();
void setShouldDrawLocalContentWireframeBox( bool shouldDraw );
bool shouldContributeToParentBoundingBox();
bool shouldDrawBoundingVolume();
void setShouldDrawBoundingVolume( bool shouldDraw );
// Overridden so that not touchable unless specifically set as such
bool isTouchable();
protected:
CC3Light* _light;
GLushort _shadowLagFactor;
GLushort _shadowLagCount;
GLfloat _shadowVolumeVertexOffsetFactor;
GLfloat _shadowExpansionLimitFactor;
bool _isShadowDirty : 1;
bool _shouldDrawTerminator : 1;
bool _shouldShadowFrontFaces : 1;
bool _shouldShadowBackFaces : 1;
bool _useDepthFailAlgorithm : 1;
bool _shouldAddEndCapsOnlyWhenNeeded : 1;
};
/**
* The mesh node used to paint the shadows cast by shadow volumes.
*
* Shadow volumes are used to define a stencil that is then used to draw dark areas onto the
* viewport in clip-space, where scene mesh nodes are casting shadows. This painter is used
* to draw those dark areas where the stencil indicates.
*/
/// <CC3ShadowProtocol>
class CC3StencilledShadowPainterNode : public CC3ClipSpaceNode, public CC3ShadowProtocol
{
public:
/** The shadow painter is always drawn. */
bool isShadowVisible();
void updateShadow();
CC3Light* getLight();
void setLight( CC3Light* light );
virtual void nodeWasTransformed( CC3Node* aNode );
virtual void nodeWasDestroyed( CC3Node* aNode );
static CC3StencilledShadowPainterNode* nodeWithName( const std::string& name, const ccColor4F& color );
};
/**
* CC3ShadowDrawingVisitor is a CC3NodeDrawingVisitor that is passed
* to a shadow node for drawing shadows.
*/
class CC3ShadowDrawingVisitor : public CC3NodeDrawingVisitor
{
DECLARE_SUPER( CC3NodeDrawingVisitor );
public:
void init();
bool shouldDrawNode( CC3Node* aNode );
static CC3ShadowDrawingVisitor* visitor();
};
NS_COCOS3D_END
#endif | [
"hoanghdtv@gmail.com"
] | hoanghdtv@gmail.com |
43f8b27d221c3cface28f122ece680f76b546ab5 | dbae955c822c79241d88b6288bccda6e1cfc8ef7 | /src/le/math/Rotation2D.h | 8078af3ab6a8490d8033077ce82a84af2cc1daa8 | [
"MIT"
] | permissive | SailCPU/Le | fe69ef1e59e1e713f1af89a5657eb0b72a7fa908 | 1752113267ff666a997accbad39e1c62beb91daf | refs/heads/master | 2021-03-28T15:58:02.288211 | 2020-03-21T01:58:38 | 2020-03-21T01:58:38 | 247,874,382 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,988 | h | //
// Created by sail on 19-9-7.
//
#ifndef LE_ROTATION2D_H
#define LE_ROTATION2D_H
/**
* @file Rotation2D
*/
#include "Vector2D.h"
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_expression.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <Eigen/Eigen>
namespace le { namespace math {
template<class T> class Rotation2DVector;
/** @addtogroup math */
/* @{*/
/**
* @brief A 2x2 rotation matrix \f$ \mathbf{R}\in SO(2) \f$
*
* @f$
* \mathbf{R}=
* \left[
* \begin{array}{cc}
* {}^A\hat{X}_B & {}^A\hat{Y}_B
* \end{array}
* \right]
* =
* \left[
* \begin{array}{cc}
* r_{11} & r_{12} \\
* r_{21} & r_{22}
* \end{array}
* \right]
* @f$
*/
template<class T = double>
class Rotation2D
{
public:
//! Value type.
typedef T value_type;
//! The type of the internal Boost matrix implementation.
typedef Eigen::Matrix<T, 2, 2> EigenMatrix2x2;
/**
@brief A rotation matrix with uninitialized storage.
*/
Rotation2D()
{}
/**
* @brief Constructs an initialized 2x2 rotation matrix
*
* @param r11 \f$ r_{11} \f$
* @param r12 \f$ r_{12} \f$
* @param r21 \f$ r_{21} \f$
* @param r22 \f$ r_{22} \f$
*
* @f$
* \mathbf{R} =
* \left[
* \begin{array}{cc}
* r_{11} & r_{12} \\
* r_{21} & r_{22}
* \end{array}
* \right]
* @f$
*/
Rotation2D(T r11, T r12, T r21, T r22)
{
_m[0][0] = r11;
_m[0][1] = r12;
_m[1][0] = r21;
_m[1][1] = r22;
}
/**
* @brief Constructs an initialized 2x2 rotation matrix
* @f$ \robabx{a}{b}{\mathbf{R}} =
* \left[
* \begin{array}{cc}
* \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}}
* \end{array}
* \right]
* @f$
*
* @param i @f$ \robabx{a}{b}{\mathbf{i}} @f$
* @param j @f$ \robabx{a}{b}{\mathbf{j}} @f$
*/
Rotation2D(const Vector2D<T>& i, const Vector2D<T>& j)
{
_m[0][0] = i[0];
_m[0][1] = j[0];
_m[1][0] = i[1];
_m[1][1] = j[1];
}
/**
* @brief Constructs an initialized 2x2 rotation matrix
* @f$ \robabx{a}{b}{\mathbf{R}} =
* \left[
* \begin{array}{cc}
* \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}}
* \end{array}
* \right]
* @f$
*
* @param theta
*/
Rotation2D(const T theta)
{
_m[0][0] = cos(theta);
_m[0][1] = -sin(theta);
_m[1][0] = sin(theta);
_m[1][1] = cos(theta);
}
/**
@brief Construct an initialized 2x2 rotation matrix.
The second of column of the matrix is deduced from the first column.
@param i [in] The first column of the rotation matrix.
*/
Rotation2D(const Vector2D<T>& i)
{
_m[0][0] = i[0];
_m[0][1] = -i[1];
_m[1][0] = i[1];
_m[1][1] = i[0];
}
/**
@brief Construct a rotation matrix from an Eigen matrix.
*/
template <class R>
explicit Rotation2D(const EigenMatrix2x2& m)
{
_m[0][0] = m(0,0);
_m[0][1] = m(0,1);
_m[1][0] = m(1,0);
_m[1][1] = m(1,1);
}
/**
* @brief Constructs a 2x2 rotation matrix set to identity
* @return a 2x2 identity rotation matrix
*
* @f$
* \mathbf{R} =
* \left[
* \begin{array}{cc}
* 1 & 0\\
* 0 & 1
* \end{array}
* \right]
* @f$
*/
static const Rotation2D& identity()
{
static Rotation2D id(1,0,0,1);
return id;
}
/**
* @brief Returns reference to matrix element
* @param row [in] row
* @param column [in] column
* @return reference to the element
*/
T& operator()(size_t row, size_t column)
{
return _m[row][column];
}
/**
* @brief Returns reference to matrix element
* @param row [in] row
* @param column [in] column
* @return reference to the element
*/
const T& operator()(size_t row, size_t column) const
{
return _m[row][column];
}
/**
* @brief Comparison operator.
*
* The comparison operator makes a element wise comparison.
* Returns true only if all elements are equal.
*
* @param rhs [in] Rotation2D to compare with
* @return True if equal.
*/
bool operator==(const Rotation2D<T> &rhs) const {
for (int i = 0; i<2; ++i) {
for (int j = 0; j<2; ++j) {
if (!(_m[i][j] == rhs(i,j))) {
return false;
}
}
}
return true;
}
/**
* @brief Comparison operator.
*
* The comparison operator makes a element wise comparison.
* Returns true if any of the elements are different.
*
* @param rhs [in] Rotation2D to compare with
* @return True if not equal.
*/
bool operator!=(const Rotation2D<T> &rhs) const {
return !(*this == rhs);
}
/**
* @brief Returns a boost 2x2 matrix @f$ \mathbf{M}\in SO(2)
* @f$ that represents this rotation
*
* @return @f$ \mathbf{M}\in SO(2) @f$
*/
EigenMatrix2x2 e()
{
EigenMatrix2x2 matrix;
matrix(0,0) = _m[0][0];
matrix(0,1) = _m[0][1];
matrix(1,0) = _m[1][0];
matrix(1,1) = _m[1][1];
return matrix;
}
/**
* @brief Calculates \f$ \robabx{a}{c}{\mathbf{R}} =
* \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}} \f$
*
* @param aRb [in] \f$ \robabx{a}{b}{\mathbf{R}} \f$
*
* @param bRc [in] \f$ \robabx{b}{c}{\mathbf{R}} \f$
*
* @return \f$ \robabx{a}{c}{\mathbf{R}} \f$
*/
friend const Rotation2D operator*(const Rotation2D& aRb, const Rotation2D& bRc)
{
return Rotation2D(
aRb(0,0)*bRc(0,0) + aRb(0,1)*bRc(1,0),
aRb(0,0)*bRc(0,1) + aRb(0,1)*bRc(1,1),
aRb(1,0)*bRc(0,0) + aRb(1,1)*bRc(1,0),
aRb(1,0)*bRc(0,1) + aRb(1,1)*bRc(1,1)
);
}
/**
* @brief Calculates \f$ \robabx{a}{c}{\mathbf{v}} =
* \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}} \f$
*
* @param aRb [in] \f$ \robabx{a}{b}{\mathbf{R}} \f$
* @param bVc [in] \f$ \robabx{b}{c}{\mathbf{v}} \f$
* @return \f$ \robabx{a}{c}{\mathbf{v}} \f$
*/
friend const Vector2D<T> operator*(const Rotation2D& aRb, const Vector2D<T>& bVc)
{
return Vector2D<T>(
aRb(0,0)*bVc(0) + aRb(0,1)*bVc(1),
aRb(1,0)*bVc(0) + aRb(1,1)*bVc(1)
);
}
/**
* @brief Writes rotation matrix to stream
* @param os [in/out] output stream to use
* @param r [in] rotation matrix to print
* @return the updated output stream
*/
friend std::ostream& operator<<(std::ostream &os, const Rotation2D& r)
{
return os
<< "Rotation2D {"
<< r(0, 0) << ", " << r(0, 1) << ", "
<< r(1, 0) << ", " << r(1, 1)
<< "}";
}
private:
T _m[2][2];
};
/**
* @brief Casts Rotation2D<T> to Rotation2D<Q>
* @param rot [in] Rotation2D with type T
* @return Rotation2D with type R
*/
template<class R, class T>
const Rotation2D<R> cast(const Rotation2D<T>& rot)
{
Rotation2D<R> res(Rotation2D<R>::identity());
for (size_t i = 0; i < 2; i++)
for (size_t j = 0; j < 2; j++)
res(i, j) = static_cast<R>(rot(i, j));
return res;
}
/**
* @brief The inverse @f$ \robabx{b}{a}{\mathbf{R}} =
* \robabx{a}{b}{\mathbf{R}}^{-1} @f$ of a rotation matrix
*
* @relates Rotation2D
*
* @param aRb [in] the rotation matrix @f$ \robabx{a}{b}{\mathbf{R}} @f$
*
* @return the matrix inverse @f$ \robabx{b}{a}{\mathbf{R}} =
* \robabx{a}{b}{\mathbf{R}}^{-1} @f$
*
* @f$ \robabx{b}{a}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}}^{-1} =
* \robabx{a}{b}{\mathbf{R}}^T @f$
*/
template <class T>
const Rotation2D<T> inverse(const Rotation2D<T>& aRb)
{
return Rotation2D<T>(aRb(0,0), aRb(1,0), aRb(0,1), aRb(1,1));
}
/**
* @brief Find the transpose of \b aRb.
*
* The transpose of a rotation matrix is the same as the inverse.
*/
template <class T>
const Rotation2D<T> transpose(const Rotation2D<T>& aRb)
{
return Rotation2D<T>(aRb(0,0), aRb(1,0), aRb(0,1), aRb(1,1));
}
extern template class rw::math::Rotation2D<double>;
extern template class rw::math::Rotation2D<float>;
/**@}*/
}} // end namespaces
#endif //LE_ROTATION2D_H
| [
"SailCPU@gmail.com"
] | SailCPU@gmail.com |
54a78874b555e6ece2d2f5cca70c25a8e953a385 | 41d0aee2205d1d1d244faf6b72bae5b48d3839af | /testsuites/unittest/process/process/smp/process_test_smp_008.cpp | bf590220181a7c09422c001eac1c06020240730a | [
"BSD-3-Clause"
] | permissive | SunnyLy/kernel_liteos_a_note | 75d2df014abce78e85722406331343832f74cec4 | 9c54aa38d2330b365e55e5feff1f808c3b6dba25 | refs/heads/master | 2023-08-19T13:15:21.905929 | 2021-10-22T09:26:15 | 2021-10-22T09:26:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,025 | cpp | /*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "it_test_process.h"
static void *PthreadTest01(VOID *arg)
{
int ret;
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
CPU_SET(0, &cpuset); /* cpu0 */
ret = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1);
CPU_ZERO(&cpuset);
ret = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1);
ret = (CPU_ISSET(0, &cpuset)) > 0 ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT1);
ret = (CPU_ISSET(1, &cpuset)) > 0 ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1);
CPU_ZERO(&cpuset);
CPU_SET(0, &cpuset); /* cpu0 */
CPU_SET(1, &cpuset); /* cpu1 */
ret = sched_setaffinity(getpid(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1);
CPU_ZERO(&cpuset);
ret = sched_getaffinity(getpid(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1);
ret = (CPU_ISSET(0, &cpuset)) > 0 ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT1);
ret = (CPU_ISSET(1, &cpuset)) > 0 ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT1);
CPU_ZERO(&cpuset);
ret = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1);
ret = (CPU_ISSET(0, &cpuset)) > 0 ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT1);
ret = (CPU_ISSET(1, &cpuset)) > 0 ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT1);
return NULL;
ERROR_OUT1:
return NULL;
}
static int Testcase(void)
{
int ret;
int status;
int pid;
ret = fork();
if (ret == 0) {
int ret;
cpu_set_t cpuset;
pthread_t threadA;
CPU_ZERO(&cpuset);
CPU_SET(1, &cpuset); /* cpu1 */
ret = sched_setaffinity(getpid(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT);
CPU_ZERO(&cpuset);
ret = sched_getaffinity(getpid(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT);
ret = (CPU_ISSET(0, &cpuset) > 0) ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT);
ret = (CPU_ISSET(1, &cpuset) > 0) ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT);
ret = pthread_create(&threadA, NULL, PthreadTest01, 0);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT);
ret = pthread_join(threadA, NULL);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT);
CPU_ZERO(&cpuset);
ret = sched_getaffinity(getpid(), sizeof(cpu_set_t), &cpuset);
ICUNIT_GOTO_EQUAL(ret, 0, ret, ERROR_OUT);
ret = (CPU_ISSET(0, &cpuset) > 0) ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT);
ret = (CPU_ISSET(1, &cpuset) > 0) ? 1 : 0;
ICUNIT_GOTO_EQUAL(ret, 1, ret, ERROR_OUT);
exit(11); // 11, exit args
ERROR_OUT:
exit(11); // 11, exit args
} else if (ret > 0) {
pid = ret;
ret = waitpid(ret, &status, 0);
status = WEXITSTATUS(status);
ICUNIT_ASSERT_EQUAL(ret, pid, ret);
ICUNIT_ASSERT_EQUAL(status, 11, status); // 11, assert that function Result is equal to this.
}
return 0;
}
void ItTestProcessSmp008(void)
{
TEST_ADD_CASE("IT_POSIX_PROCESS_SMP_008", Testcase, TEST_POSIX, TEST_MEM, TEST_LEVEL0, TEST_FUNCTION);
}
| [
"kuangyufei@126.com"
] | kuangyufei@126.com |
7fbf4a0dab575896ab7189c9b2ba89b72730bc90 | cad3e552d7bc587000ca299db5009e4f2cf5ae74 | /Classes/GameScene.cpp | 025fe63a270d0856ae26516e1217dab426f3beb3 | [] | no_license | TheRainstorm/AircraftWar | 2704d6d956de2003231fef94260fe11bf302de4b | bec70ebfa413a3347e6882357076f97321e7adcd | refs/heads/master | 2020-03-23T20:15:57.949883 | 2018-07-22T23:38:26 | 2018-07-22T23:38:26 | 142,031,463 | 0 | 0 | null | 2018-07-23T15:12:53 | 2018-07-23T15:12:53 | null | GB18030 | C++ | false | false | 17,320 | cpp | #include "GameScene.h"
#include "Constants.h"
#include "time.h"
#include "AudioEngine.h"
#include "SimpleAudioEngine.h"
#include "OverScene.h"
using namespace experimental;
auto cnt = 0;
Scene* GameScene::CreateScene() {
return GameScene::create();
}
bool GameScene::init() {
//1.先调用父类的init()
if (!Scene::init()) {
return false;
}
srand((unsigned int)time(NULL));
SpriteFrameCache::getInstance()->addSpriteFramesWithFile("shoot_background.plist");
auto bg = Sprite::createWithSpriteFrameName("background.png");
//添加声音文件
AudioEngine::play2d("game_music.mp3");
SpriteFrameCache::getInstance()->addSpriteFramesWithFile("shoot.plist");
// 添加飞机
auto plane = Sprite::createWithSpriteFrameName("hero1.png");
plane->setPosition(VISIBLE_ORIGIN + VISIBLE_SIZE / 2);
this->addChild(plane, FOREROUND_ZORDER, PLANE_TAG);
planeHitNum = 0;
dir = 0; // 初始不移动
// 创建飞机动画
auto ani = AnimationCache::getInstance()->getAnimation(HERO_FLY_ANIMATION);
auto animator = Animate::create(ani);
plane->runAction(animator);
// 触摸事件监听
auto listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [=](Touch* t, Event* e) {
Vec2 touchPos = t->getLocation();
this->m_offset = plane->getPosition() - touchPos;
bool isContains = plane->getBoundingBox().containsPoint(touchPos);
return isContains && !Director::getInstance()->isPaused() && !this->IsGameOver;
};
listener->onTouchMoved = [=](Touch* t, Event* e) {
Vec2 touchPos = t->getLocation();
if (this->IsGameOver) return;
plane->setPosition(touchPos + this->m_offset);
Vec2 deltaPos = t->getDelta();
auto minX = plane->getContentSize().width / 2;
auto minY = plane->getContentSize().height / 2;
auto maxX = VISIBLE_SIZE.width - minX;
auto maxY = VISIBLE_SIZE.height / 1.5 + minY;
auto x = MAX(minX, MIN(maxX, plane->getPositionX()));
auto y = MIN(maxY, plane->getPositionY());
y = MAX(minY, y);
plane->setPosition(x, y);
//}
};
listener->onTouchEnded = [](Touch* t, Event* e) {
};
getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, plane);
// 键盘事件监听
auto listener2 = EventListenerKeyboard::create();
listener2->onKeyPressed = [&](EventKeyboard::KeyCode k, Event * e) {
switch (k)
{
case EventKeyboard::KeyCode::KEY_LEFT_ARROW:
dir = 1;
break;
case EventKeyboard::KeyCode::KEY_RIGHT_ARROW:
dir = 2;
break;
case EventKeyboard::KeyCode::KEY_UP_ARROW:
dir = 3;
break;
case EventKeyboard::KeyCode::KEY_DOWN_ARROW:
dir = 4;
break;
default:
dir = 0;
break;
}
};
listener2->onKeyReleased = [&](EventKeyboard::KeyCode k, Event * e) {
dir = 0;
};
Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener2, this);
//开启抗锯齿
bg->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
bg->getTexture()->setAliasTexParameters();
this->addChild(bg, BACKGROUND_ZORDER, BACKGROUND_TAG_1);
auto bg2 = Sprite::createWithSpriteFrameName("background.png");
bg2->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
bg2->setPositionY(bg->getContentSize().height);
bg2->getTexture()->setAliasTexParameters();
this->addChild(bg2, BACKGROUND_ZORDER, BACKGROUND_TAG_2);
// UI
// 计分标签
auto lblScore = Label::createWithBMFont("font.fnt", StringUtils::format("%d", this->m_totalScore));
lblScore->setPosition(20, VISIBLE_SIZE.height - lblScore->getContentSize().height - 10);
this->addChild(lblScore, UI_ZORDER, LBL_SCORE_TAG);
lblScore->setColor(Color3B(200, 2, 100));
lblScore->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
// 炸弹菜单
auto normalBomb = Sprite::createWithSpriteFrameName("bomb.png");
auto itemBomb = MenuItemSprite::create(normalBomb, normalBomb, [=](Ref *) {
if (Director::getInstance()->isPaused()) return;
if (this->m_totalBombCount <= 0) return;
AudioEngine::play2d("use_bomb.mp3", 1, 4);
if (this->IsGameOver) return;
for (auto enemy : this->m_enemys) {
enemy->down();
m_totalScore += enemy->getScore();
}
auto nodeScore = this->getChildByTag(LBL_SCORE_TAG);
auto lblScore = dynamic_cast<Label *>(nodeScore);
std::string strScore = StringUtils::format("%d", m_totalScore);
lblScore->setString(strScore);
m_totalBombCount--;
this->updateBomb();
this->m_enemys.clear();
});
auto lblCount = Label::createWithBMFont("font.fnt", StringUtils::format("X%d", m_totalBombCount));
lblCount->setPosition(35 + lblCount->getContentSize().width / 2, 32);
this->addChild(lblCount, UI_ZORDER, BOMBCOUNT_TAG);
lblCount->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
// 暂停菜单
auto SpPauseNormal = Sprite::createWithSpriteFrameName("game_pause_nor.png");
auto SpPauseSelected = Sprite::createWithSpriteFrameName("game_pause_pressed.png");
auto SpResumeNormal = Sprite::createWithSpriteFrameName("game_resume_nor.png");
auto SpResumeSelected = Sprite::createWithSpriteFrameName("game_resume_pressed.png");
auto itemPause = MenuItemSprite::create(SpPauseNormal, SpPauseSelected);
auto itemResume = MenuItemSprite::create(SpResumeNormal, SpResumeSelected);
auto toggle = MenuItemToggle::createWithCallback([this](Ref *sender) {
AudioEngine::play2d("button.mp3");
AudioEngine::pauseAll();
int index = dynamic_cast<MenuItemToggle *>(sender)->getSelectedIndex();
if (index) {
Director::getInstance()->pause();
this->IsPause = 1;
}
else {
Director::getInstance()->resume();
this->IsPause = 0;
}
}, itemPause, itemResume, nullptr);
toggle->setPosition(VISIBLE_SIZE - toggle->getContentSize()*1.5);
auto menu = Menu::create();
menu->addChild(itemBomb, UI_ZORDER, ITEMBOMB_TAG);
menu->addChild(toggle);
menu->setPosition(itemBomb->getContentSize() / 2);
this->addChild(menu, UI_ZORDER, MENU_TAG);
// 生命
for (int i = 0; i < 3; i++)
{
auto heart = Sprite::create("heart.png");
heart->setPosition(Point(VISIBLE_SIZE.width * 3 / 5 + i * 36, VISIBLE_SIZE.height * 15 / 16));
heart->setTag(HEART_TAG + i + 1);
addChild(heart, 1);
}
//每帧调用update函数
scheduleUpdate();
//定时创建子弹
schedule(schedule_selector(GameScene::createBullet), TIME_BREAK_1);
// RedMode:定时创建敌机子弹
// schedule(schedule_selector(GameScene::createEnemyBullet), TIME_BREAK_2);
//定时创建敌机
schedule(schedule_selector(GameScene::createSmallEnemy), TIME_BREAK_2, CC_REPEAT_FOREVER, CREATE_SMALL_DELAY);
schedule(schedule_selector(GameScene::createMiddleEnemy), TIME_BREAK_4, CC_REPEAT_FOREVER, CREATE_MIDDLE_DELAY);
schedule(schedule_selector(GameScene::createBigEnemy), TIME_BREAK_5, CC_REPEAT_FOREVER, CREATE_BIG_DELAY);
schedule(schedule_selector(GameScene::createUFO), TIME_BREAK_4, CC_REPEAT_FOREVER, CREATE_UFO_DELAY);
// 定时通过键盘移动飞机
this->schedule(schedule_selector(GameScene::movePlane), 0.02f);
// BlueMode: 定时移动敌机
// this->schedule(schedule_selector(GameScene::moveEnemy), 0.5f, CC_REPEAT_FOREVER, 0);
return true;
}
void GameScene::update(float delta) {
auto bg = this->getChildByTag(1);
auto bg2 = this->getChildByTag(2);
auto plane = this->getChildByTag(4);
// 背景滚动
bg->setPositionY(bg->getPositionY() - BACKGROUND_SPEED);
bg2->setPositionY(bg->getPositionY() + bg->getContentSize().height);
bg2->setPositionY(bg->getPositionY() + bg->getContentSize().height);
if (bg2->getPositionY() <= 0)
bg->setPositionY(0);
Vector<Sprite *> removableBullets;
Vector<Enemy *> removableEnemys;
Vector<Sprite *> removableEnemysBullets;
Vector<Sprite *> removableUfos;
// 检查子弹是否出屏幕顶部
for (auto bullet : m_bullets)
{
bullet->setPositionY(bullet->getPositionY() + BULLET_SPEED);
if (bullet->getPositionY() >= VISIBLE_SIZE.height + bullet->getContentSize().height / 2) {
this->removeChild(bullet);
removableBullets.pushBack(bullet);
}
}
// 检查敌机子弹是否出边界
for (auto bullet : m_enBullets)
{
bullet->setPositionY(bullet->getPositionY() - BULLET_SPEED);
if (plane->getBoundingBox().intersectsRect(bullet->getBoundingBox()))
{
// 飞机被击中次数+1
this->planeHitNum++;
// 子弹消失
removableEnemysBullets.pushBack(bullet);
this->removeChild(bullet);
if (planeHitNum >= 3)
{
AudioEngine::pauseAll();
this->gameOver();
this->IsGameOver = true;
}
// 减一条命
auto heart = this->getChildByTag(HEART_TAG + this->planeHitNum);
heart->removeFromParent();
}
if (bullet->getPositionY() <= bullet->getContentSize().height / 2) {
this->removeChild(bullet);
removableEnemysBullets.pushBack(bullet);
}
}
// 检测敌机是否出屏幕底界
for (auto enemy : m_enemys) {
enemy->move();
if (enemy->getPositionY() <= 0 - enemy->getContentSize().height / 2) {
this->removeChild(enemy);
removableEnemys.pushBack(enemy);
}
}
// 检查道具是否出屏幕顶部或者接触到飞机
for (auto Ufo : m_UFO)
{
if (Ufo->getPositionY() >= 600) {
Ufo->setPositionY(Ufo->getPositionY() - 1);
}
else {
Ufo->setPositionY(Ufo->getPositionY() - UFO_SPEED);
}
if (Ufo->getPositionY() <= 0 - Ufo->getContentSize().height / 2) {
this->removeChild(Ufo);
removableUfos.pushBack(Ufo);
}
if (this->m_ufoType == UFO4) {
for (auto bullet : m_bullets) {
if (bullet->getBoundingBox().intersectsRect(Ufo->getBoundingBox())) {
schedule(schedule_selector(GameScene::createEnemyBullet), TIME_BREAK_2, 10, 0);
auto ps = ParticleSystemQuad::create("bomb.plist"); // 粒子特效
ps->setPosition(Point(Ufo->getPositionX(), Ufo->getPositionY()));
this->addChild(ps);
removableUfos.pushBack(Ufo);
this->removeChild(Ufo);
}
}
}
if (this->m_ufoType == UFO5) {
for (auto bullet : m_bullets) {
if (bullet->getBoundingBox().intersectsRect(Ufo->getBoundingBox())) {
this->schedule(schedule_selector(GameScene::moveEnemy), 0.5f, 20, 0);
auto ps = ParticleSystemQuad::create("bomb.plist"); // 粒子特效
ps->setPosition(Point(Ufo->getPositionX(), Ufo->getPositionY()));
this->addChild(ps);
removableUfos.pushBack(Ufo);
this->removeChild(Ufo);
}
}
}
// 道具碰撞检测
if (plane->getBoundingBox().intersectsRect(Ufo->getBoundingBox())) {
this->removeChild(Ufo);
if (this->m_ufoType == UFO1) { // 双子弹道具
m_doubleBulletCount = DOUBLE_BULLET_COUNT;
}
if ((this->m_ufoType == UFO2) && (m_totalBombCount < 3)) { // 炸弹道具
m_totalBombCount++;
this->updateBomb();
}
if (this->m_ufoType == UFO3 && this->planeHitNum > 0) // 生命道具
{
auto heart = Sprite::create("heart.png");
heart->setTag(HEART_TAG + planeHitNum);
planeHitNum--;
heart->setPosition(Point(VISIBLE_SIZE.width * 3 / 5 + planeHitNum * 36, VISIBLE_SIZE.height * 15 / 16));
this->addChild(heart);
}
/*if (this->m_ufoType == UFO4)
schedule(schedule_selector(GameScene::createEnemyBullet), TIME_BREAK_2, 10, 0);
if (this->m_ufoType == UFO5)
this->schedule(schedule_selector(GameScene::moveEnemy), 0.5f, 20, 0);*/
removableUfos.pushBack(Ufo);
}
}
// 敌机、子弹的碰撞检测
for (auto enemy : m_enemys) {
for (auto bullet : m_bullets) {
if (enemy->getBoundingBox().intersectsRect(bullet->getBoundingBox())) {
enemy->hit();
if (enemy->hit()) {
// 粒子特效
/*auto ps = ParticleSystemQuad::create("bomb.plist");
ps->setPosition(Point(enemy->getPositionX(), enemy->getPositionY()));
this->addChild(ps);*/
removableEnemys.pushBack(enemy);
// 更新得分
m_totalScore += enemy->getScore();
auto nodeScore = this->getChildByTag(LBL_SCORE_TAG);
auto lblScore = dynamic_cast<Label *>(nodeScore);
std::string strScore = StringUtils::format("%d", m_totalScore);
lblScore->setString(strScore);
}
// 子弹消失
removableBullets.pushBack(bullet);
this->removeChild(bullet);
}
}
// 飞机与敌机的碰撞
if (enemy->getBoundingBox().intersectsRect(plane->getBoundingBox())) {
removableEnemys.pushBack(enemy);
enemy->down();
this->planeHitNum++;
if (planeHitNum >= 3)
{
// 爆炸动画
AudioEngine::pauseAll();
// 游戏结束
this->gameOver();
this->IsGameOver = true;
}
// 减一条命
auto heart = this->getChildByTag(HEART_TAG + this->planeHitNum);
heart->removeFromParent();
}
}
// 移除子弹
for (auto bullet : removableBullets) {
m_bullets.eraseObject(bullet);
}
removableBullets.clear();
for (auto bullet : removableEnemysBullets) {
m_enBullets.eraseObject(bullet);
}
removableEnemysBullets.clear();
// 移除敌机
for (auto enemy : removableEnemys) {
m_enemys.eraseObject(enemy);
}
removableEnemys.clear();
// 移除道具
for (auto Ufo : removableUfos) {
m_UFO.eraseObject(Ufo);
}
removableUfos.clear();
}
void GameScene::createBullet(float) {
AudioEngine::play2d("bullet.mp3");
auto plane = this->getChildByTag(PLANE_TAG);
if (m_doubleBulletCount > 0) {
//创建双发子弹
auto bullet1 = Sprite::createWithSpriteFrameName("bullet2.png");
auto bullet2 = Sprite::createWithSpriteFrameName("bullet2.png");
bullet1->setPosition(plane->getPositionX() - 32, plane->getPositionY() + 22);
bullet2->setPosition(plane->getPositionX() + 32, plane->getPositionY() + 22);
this->addChild(bullet1, FOREROUND_ZORDER);
this->addChild(bullet2, FOREROUND_ZORDER);
//新建的子弹加入集合
m_bullets.pushBack(bullet1);
m_bullets.pushBack(bullet2);
//消耗掉双子弹的数目
this->m_doubleBulletCount--;
}
else {
auto bullet = Sprite::createWithSpriteFrameName("bullet1.png");
bullet->setPosition(plane->getPositionX() + 2, plane->getPositionY() + plane->getContentSize().height / 2 + 10);
this->addChild(bullet, FOREROUND_ZORDER);
//新建的子弹加入集合
m_bullets.pushBack(bullet);
}
}
void GameScene::createEnemy(const EnemyType& type) {
auto enemy = Enemy::create(type);
auto minX = enemy->getContentSize().width / 2;
auto maxX = VISIBLE_SIZE.width - minX;
auto x = rand() % (int)(maxX - minX + 1) + minX;
auto y = VISIBLE_SIZE.height + enemy->getContentSize().height / 2;
enemy->setPosition(x, y);
this->addChild(enemy, FOREROUND_ZORDER, ENEMY_TAG);
m_enemys.pushBack(enemy);
}
void GameScene::createEnemyBullet(float)
{
for (auto enemy : m_enemys)
{
auto bullet = Sprite::createWithSpriteFrameName("bullet1.png");
bullet->setPosition(enemy->getPositionX() + 2, enemy->getPositionY() - enemy->getContentSize().height / 2 - 10);
this->addChild(bullet, FOREROUND_ZORDER);
// 新建的子弹加入集合
m_enBullets.pushBack(bullet);
}
}
void GameScene::createSmallEnemy(float) {
this->createEnemy(EnemyType::SMALL_ENEMY);
}
void GameScene::createMiddleEnemy(float) {
this->createEnemy(EnemyType::MIDDLE_ENEMY);
}
void GameScene::createBigEnemy(float) {
this->createEnemy(EnemyType::BIG_ENEMY);
}
void GameScene::createUFO(float) {
int r = rand() % 10;
Sprite* Ufo;
if (r >= 7)
{
Ufo = Sprite::createWithSpriteFrameName("ufo1.png");
this->m_ufoType = UFO1;
}
else if (r >= 5)
{
Ufo = Sprite::createWithSpriteFrameName("ufo2.png");
this->m_ufoType = UFO2;
}
else if (r >= 2)
{
Ufo = Sprite::create("heart.png");
this->m_ufoType = UFO3;
}
else if (r >= 1)
{
Ufo = Sprite::create("enemy1_red.png");
this->m_ufoType = UFO4;
}
else
{
Ufo = Sprite::create("enemy1_blue.png");
this->m_ufoType = UFO5;
}
auto minX = Ufo->getContentSize().width / 2;
auto maxX = VISIBLE_SIZE.width - minX;
auto x = rand() % (int)(maxX - minX + 1) + minX;
auto y = VISIBLE_SIZE.height + Ufo->getContentSize().height / 2;
Ufo->setPosition(x, y);
this->addChild(Ufo, FOREROUND_ZORDER);
//新建的道具加入集合
m_UFO.pushBack(Ufo);
}
void GameScene::moveEnemy(float)
{
for (auto enemy : m_enemys)
{
enemy->avoidMove();
}
}
void GameScene::movePlane(float t)
{
auto p = this->getChildByTag(PLANE_TAG);
switch (dir)
{
case 1:
p->runAction(MoveBy::create(0, Point(-5, 0)));
break;
case 2:
p->runAction(MoveBy::create(0, Point(5, 0)));
break;
case 3:
p->runAction(MoveBy::create(0, Point(0, 5)));
break;
case 4:
p->runAction(MoveBy::create(0, Point(0, -5)));
break;
}
}
void GameScene::updateBomb() {
auto menu = this->getChildByTag(MENU_TAG);
auto itemBomb = menu->getChildByTag(ITEMBOMB_TAG);//注意这里是menu获取itemBomb
auto lblCount = this->getChildByTag(BOMBCOUNT_TAG);
if (this->m_totalBombCount <= 0) {
itemBomb->setVisible(false);
lblCount->setVisible(false);
}
else if (this->m_totalBombCount == 1) {
itemBomb->setVisible(true);
lblCount->setVisible(false);
}
else {
itemBomb->setVisible(true);
lblCount->setVisible(true);
//子类强转成父类对象
dynamic_cast<Label *>(lblCount)->setString(StringUtils::format("X%d", this->m_totalBombCount));
}
}
void GameScene::gameOver() {
auto plane = this->getChildByTag(PLANE_TAG);
for (auto node : this->getChildren()) {
node->stopAllActions();
}
auto ani = AnimationCache::getInstance()->getAnimation(PLANE_DOWN);
auto seq = Sequence::create(Animate::create(ani), CallFunc::create([=]() {
auto scene = OverScene::createScene(this->m_totalScore);
Director::getInstance()->replaceScene(scene);
}), nullptr);
plane->runAction(seq);
this->unscheduleAllCallbacks();
} | [
"jing1downey@gmail.com"
] | jing1downey@gmail.com |
8c6e2bb1a8782d7d7838945a60ff1f9bfe6e1a9a | 4eb606bc2c42ea64264bd8b160db4d81919b7850 | /Lesson02/NameArranger.cpp | c25b59f17aa027161c037d17e5b0595e8e5d1ece | [] | no_license | mjohnson9/cist2362 | 23ac3ea43c253c8a7e9539d348d6a6da1068c482 | 294ac0cbbbd6d7007088c1fcf33a33fcc8ba54e1 | refs/heads/master | 2022-01-16T16:34:14.194118 | 2019-07-07T14:43:07 | 2019-07-07T14:43:07 | 166,576,352 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,462 | cpp | // Copyright 2019 Michael Johnson
#include <cstring>
#include <iostream>
#include "../common.h"
namespace mjohnson {
namespace namearranger {
void RequestName(const std::string& prompt, char* buffer, size_t buffer_size);
void Run() {
do {
static const size_t max_name_size = 0xFF;
char* first_name = new char[max_name_size];
first_name[max_name_size - 1] = '\0';
char* middle_name = new char[max_name_size];
middle_name[max_name_size - 1] = '\0';
char* last_name = new char[max_name_size];
last_name[max_name_size - 1] = '\0';
RequestName("What is your first name? ", first_name, max_name_size);
const size_t first_name_len = strlen(first_name);
RequestName("What is your middle name? ", middle_name, max_name_size);
const size_t middle_name_len = strlen(middle_name);
RequestName("What is your last name? ", last_name, max_name_size);
const size_t last_name_len = strlen(last_name);
mjohnson::common::ClearScreen();
std::cout << std::endl;
const size_t assembled_name_len = last_name_len + 2 /* comma space */ +
first_name_len + 1 /* space */ +
middle_name_len + 1 /* null terminator */;
char* assembled_name = new char[assembled_name_len];
assembled_name[assembled_name_len - 1] = '\0'; // Terminate with null
{ // New scope to reduce clutter
for (size_t i = 0; i < last_name_len; i++) {
assembled_name[i] = last_name[i];
}
assembled_name[last_name_len] = ',';
assembled_name[last_name_len + 1] = ' ';
}
{
const size_t offset = last_name_len + 2;
for (size_t i = 0; i < first_name_len; i++) {
assembled_name[offset + i] = first_name[i];
}
assembled_name[offset + first_name_len] = ' ';
}
{
const size_t offset = last_name_len + 2 + first_name_len + 1;
for (size_t i = 0; i < middle_name_len; i++) {
assembled_name[offset + i] = middle_name[i];
}
}
std::cout << assembled_name << std::endl << std::endl;
delete[] first_name;
delete[] middle_name;
delete[] last_name;
delete[] assembled_name;
} while (mjohnson::common::RequestContinue());
}
void TrimSpaces(char* buffer, size_t buffer_size);
void RequestName(const std::string& prompt, char* buffer, size_t buffer_size) {
bool valid = false;
do {
mjohnson::common::ClearScreen();
std::cout << prompt;
std::cin.getline(buffer, static_cast<std::streamsize>(buffer_size));
TrimSpaces(buffer, buffer_size);
valid = (strlen(buffer) > 0);
} while (!valid);
}
void TrimSpaces(char* buffer, size_t buffer_size) {
bool last_was_space = true;
size_t last_space_at = 0;
for (size_t i = 0; buffer[i] != '\0' && i < buffer_size; i++) {
bool is_space = (buffer[i] == ' ');
if (is_space && last_was_space) {
for (size_t j = i; buffer[j] != '\0' && j < buffer_size; j++) {
buffer[j] = buffer[j + 1]; // Shift everything left one
}
i -= 1; // We've just removed a character from the array; step backwards
}
last_was_space = is_space;
if (last_was_space) {
last_space_at = i;
}
}
if (last_was_space) { // The character array ended with a space
buffer[last_space_at] = '\0';
}
}
// TestCase represents a unit test case. It contains a string to be tested and
// the expected output of the CountWords function.
struct TestCase {
// The string to be tested
std::string original;
// The expected output of CountWords
std::string expected;
};
bool RunUnitTests() {
static const TestCase trim_cases[] = {
{"", ""},
{" ", ""},
{" ", ""},
{" A", "A"},
{"A ", "A"},
{" A ", "A"},
{"First", "First"},
{"F i r s t", "F i r s t"},
{" F i r s t ", "F i r s t"},
{"F i r s t ", "F i r s t"},
{" F i r s t", "F i r s t"},
};
for (auto const& test_case : trim_cases) {
const size_t result_size =
std::max(test_case.original.length(), test_case.expected.length()) + 1;
char* result = new char[result_size];
result[result_size - 1] = '\0';
strncpy(result, test_case.original.c_str(), result_size);
TrimSpaces(result, result_size);
if (strcmp(result, test_case.expected.c_str()) != 0) {
std::cout << "Unit test failed: Expected \"" << test_case.expected
<< "\", got \"" << result << "\"." << std::endl;
delete[] result;
return false;
}
delete[] result;
}
return true;
} // namespace namearranger
} // namespace namearranger
} // namespace mjohnson
int main(int argc, char* argv[]) {
bool run_unit_tests;
if (!mjohnson::common::ParseArgs(argc, argv, &run_unit_tests)) {
return 1;
}
if (run_unit_tests) {
const bool result = mjohnson::namearranger::RunUnitTests();
if (!result) {
std::cout << "Unit tests failed." << std::endl;
return 1;
}
std::cout << "Unit tests passed." << std::endl;
return 0;
}
mjohnson::namearranger::Run();
return 0;
}
// Grade: 100
// Reason: It satisfies the specification document fully. It validates its own
// functionality through unit tests, which means that the only place that bugs
// could exist are in the input processing section. It has also been statically
// analyzed to detect most potential bugs from programming mistakes.
| [
"michael@johnson.computer"
] | michael@johnson.computer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.