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 986
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145
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 122
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c4047e4544e8b131665d9ff5bfa1ee9bb07e63a | 9f81d77e028503dcbb6d7d4c0c302391b8fdd50c | /google/cloud/bigquery/storage/v1/bigquery_read_options.h | 4e104cf190b63712bb077311957377431891e2db | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | googleapis/google-cloud-cpp | b96a6ee50c972371daa8b8067ddd803de95f54ba | 178d6581b499242c52f9150817d91e6c95b773a5 | refs/heads/main | 2023-08-31T09:30:11.624568 | 2023-08-31T03:29:11 | 2023-08-31T03:29:11 | 111,860,063 | 450 | 351 | Apache-2.0 | 2023-09-14T21:52:02 | 2017-11-24T00:19:31 | C++ | UTF-8 | C++ | false | false | 2,488 | h | // Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Generated by the Codegen C++ plugin.
// If you make any local changes, they will be lost.
// source: google/cloud/bigquery/storage/v1/storage.proto
#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_BIGQUERY_READ_OPTIONS_H
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_BIGQUERY_READ_OPTIONS_H
#include "google/cloud/bigquery/storage/v1/bigquery_read_connection.h"
#include "google/cloud/bigquery/storage/v1/bigquery_read_connection_idempotency_policy.h"
#include "google/cloud/backoff_policy.h"
#include "google/cloud/options.h"
#include "google/cloud/version.h"
#include <memory>
namespace google {
namespace cloud {
namespace bigquery_storage_v1 {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
/**
* Use with `google::cloud::Options` to configure the retry policy.
*
* @ingroup google-cloud-bigquery-options
*/
struct BigQueryReadRetryPolicyOption {
using Type = std::shared_ptr<BigQueryReadRetryPolicy>;
};
/**
* Use with `google::cloud::Options` to configure the backoff policy.
*
* @ingroup google-cloud-bigquery-options
*/
struct BigQueryReadBackoffPolicyOption {
using Type = std::shared_ptr<BackoffPolicy>;
};
/**
* Use with `google::cloud::Options` to configure which operations are retried.
*
* @ingroup google-cloud-bigquery-options
*/
struct BigQueryReadConnectionIdempotencyPolicyOption {
using Type = std::shared_ptr<BigQueryReadConnectionIdempotencyPolicy>;
};
/**
* The options applicable to BigQueryRead.
*
* @ingroup google-cloud-bigquery-options
*/
using BigQueryReadPolicyOptionList =
OptionList<BigQueryReadRetryPolicyOption, BigQueryReadBackoffPolicyOption,
BigQueryReadConnectionIdempotencyPolicyOption>;
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
} // namespace bigquery_storage_v1
} // namespace cloud
} // namespace google
#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_BIGQUERY_READ_OPTIONS_H
| [
"noreply@github.com"
] | googleapis.noreply@github.com |
19136515ec06a0f5377695103548a2b02832822c | 36466c39d3ae94c2f936d4fdfe0fd4b034bbfa80 | /3rdparty/mkldnn/src/common/mkldnn_debug.cpp | 7fbef3f04b551ae813b5b8c9bab5a14118c35a18 | [
"Apache-2.0",
"Intel",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSL-1.0",
"MIT",
"BSD-2-Clause",
"Zlib",
"NCSA",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause-Views"
] | permissive | zhouhuaman/dgt | ccc674dc6abb055eeb5b88eaa0177de3a051b362 | a1df50efa3b635c20ddaa6bc5068e5f7bb863b5e | refs/heads/master | 2022-11-27T21:53:05.980980 | 2020-01-13T09:33:14 | 2020-01-13T09:33:14 | 233,558,790 | 1 | 2 | Apache-2.0 | 2022-11-23T15:05:17 | 2020-01-13T09:29:56 | C++ | UTF-8 | C++ | false | false | 11,090 | cpp | /*******************************************************************************
* Copyright 2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
/* DO NOT EDIT, AUTO-GENERATED */
#include <assert.h>
#include "mkldnn_debug.h"
#include "mkldnn_types.h"
const char *mkldnn_status2str(mkldnn_status_t v) {
if (v == mkldnn_success) return "success";
if (v == mkldnn_out_of_memory) return "out_of_memory";
if (v == mkldnn_try_again) return "try_again";
if (v == mkldnn_invalid_arguments) return "invalid_arguments";
if (v == mkldnn_not_ready) return "not_ready";
if (v == mkldnn_unimplemented) return "unimplemented";
if (v == mkldnn_iterator_ends) return "iterator_ends";
if (v == mkldnn_runtime_error) return "runtime_error";
if (v == mkldnn_not_required) return "not_required";
assert(!"unknown status");
return "unknown status";
}
const char *mkldnn_dt2str(mkldnn_data_type_t v) {
if (v == mkldnn_data_type_undef) return "undef";
if (v == mkldnn_f32) return "f32";
if (v == mkldnn_s32) return "s32";
if (v == mkldnn_s16) return "s16";
if (v == mkldnn_s8) return "s8";
if (v == mkldnn_u8) return "u8";
assert(!"unknown dt");
return "unknown dt";
}
const char *mkldnn_rmode2str(mkldnn_round_mode_t v) {
if (v == mkldnn_round_nearest) return "round_nearest";
if (v == mkldnn_round_down) return "round_down";
assert(!"unknown rmode");
return "unknown rmode";
}
const char *mkldnn_fmt2str(mkldnn_memory_format_t v) {
if (v == mkldnn_format_undef) return "undef";
if (v == mkldnn_any) return "any";
if (v == mkldnn_blocked) return "blocked";
if (v == mkldnn_x) return "x";
if (v == mkldnn_nc) return "nc";
if (v == mkldnn_ncw) return "ncw";
if (v == mkldnn_nwc) return "nwc";
if (v == mkldnn_nchw) return "nchw";
if (v == mkldnn_nhwc) return "nhwc";
if (v == mkldnn_chwn) return "chwn";
if (v == mkldnn_ncdhw) return "ncdhw";
if (v == mkldnn_ndhwc) return "ndhwc";
if (v == mkldnn_oi) return "oi";
if (v == mkldnn_io) return "io";
if (v == mkldnn_oiw) return "oiw";
if (v == mkldnn_wio) return "wio";
if (v == mkldnn_oihw) return "oihw";
if (v == mkldnn_hwio) return "hwio";
if (v == mkldnn_hwio_s8s8) return "hwio_s8s8";
if (v == mkldnn_ihwo) return "ihwo";
if (v == mkldnn_oidhw) return "oidhw";
if (v == mkldnn_dhwio) return "dhwio";
if (v == mkldnn_goiw) return "goiw";
if (v == mkldnn_goihw) return "goihw";
if (v == mkldnn_hwigo) return "hwigo";
if (v == mkldnn_hwigo_s8s8) return "hwigo_s8s8";
if (v == mkldnn_goidhw) return "goidhw";
if (v == mkldnn_ntc) return "ntc";
if (v == mkldnn_tnc) return "tnc";
if (v == mkldnn_ldsnc) return "ldsnc";
if (v == mkldnn_ldigo) return "ldigo";
if (v == mkldnn_ldgoi) return "ldgoi";
if (v == mkldnn_ldgo) return "ldgo";
if (v == mkldnn_nCw8c) return "nCw8c";
if (v == mkldnn_nCw16c) return "nCw16c";
if (v == mkldnn_nChw8c) return "nChw8c";
if (v == mkldnn_nChw16c) return "nChw16c";
if (v == mkldnn_nCdhw8c) return "nCdhw8c";
if (v == mkldnn_nCdhw16c) return "nCdhw16c";
if (v == mkldnn_Owi8o) return "Owi8o";
if (v == mkldnn_OIw8i8o) return "OIw8i8o";
if (v == mkldnn_OIw8o8i) return "OIw8o8i";
if (v == mkldnn_OIw16i16o) return "OIw16i16o";
if (v == mkldnn_OIw16o16i) return "OIw16o16i";
if (v == mkldnn_Oiw16o) return "Oiw16o";
if (v == mkldnn_Owi16o) return "Owi16o";
if (v == mkldnn_OIw8i16o2i) return "OIw8i16o2i";
if (v == mkldnn_OIw8o16i2o) return "OIw8o16i2o";
if (v == mkldnn_IOw16o16i) return "IOw16o16i";
if (v == mkldnn_oIhw8i) return "oIhw8i";
if (v == mkldnn_oIhw16i) return "oIhw16i";
if (v == mkldnn_OIhw8i8o) return "OIhw8i8o";
if (v == mkldnn_OIhw16i16o) return "OIhw16i16o";
if (v == mkldnn_OIhw4i16o4i) return "OIhw4i16o4i";
if (v == mkldnn_OIhw4i16o4i_s8s8) return "OIhw4i16o4i_s8s8";
if (v == mkldnn_OIhw8i16o2i) return "OIhw8i16o2i";
if (v == mkldnn_OIhw8o16i2o) return "OIhw8o16i2o";
if (v == mkldnn_OIhw8o8i) return "OIhw8o8i";
if (v == mkldnn_OIhw16o16i) return "OIhw16o16i";
if (v == mkldnn_IOhw16o16i) return "IOhw16o16i";
if (v == mkldnn_Oihw8o) return "Oihw8o";
if (v == mkldnn_Oihw16o) return "Oihw16o";
if (v == mkldnn_Ohwi8o) return "Ohwi8o";
if (v == mkldnn_Ohwi16o) return "Ohwi16o";
if (v == mkldnn_OhIw16o4i) return "OhIw16o4i";
if (v == mkldnn_oIdhw8i) return "oIdhw8i";
if (v == mkldnn_oIdhw16i) return "oIdhw16i";
if (v == mkldnn_OIdhw8i8o) return "OIdhw8i8o";
if (v == mkldnn_OIdhw8o8i) return "OIdhw8o8i";
if (v == mkldnn_Odhwi8o) return "Odhwi8o";
if (v == mkldnn_OIdhw16i16o) return "OIdhw16i16o";
if (v == mkldnn_OIdhw16o16i) return "OIdhw16o16i";
if (v == mkldnn_Oidhw16o) return "Oidhw16o";
if (v == mkldnn_Odhwi16o) return "Odhwi16o";
if (v == mkldnn_OIdhw8i16o2i) return "OIdhw8i16o2i";
if (v == mkldnn_gOwi8o) return "gOwi8o";
if (v == mkldnn_gOIw8o8i) return "gOIw8o8i";
if (v == mkldnn_gOIw8i8o) return "gOIw8i8o";
if (v == mkldnn_gOIw16i16o) return "gOIw16i16o";
if (v == mkldnn_gOIw16o16i) return "gOIw16o16i";
if (v == mkldnn_gOiw16o) return "gOiw16o";
if (v == mkldnn_gOwi16o) return "gOwi16o";
if (v == mkldnn_gOIw8i16o2i) return "gOIw8i16o2i";
if (v == mkldnn_gOIw8o16i2o) return "gOIw8o16i2o";
if (v == mkldnn_gIOw16o16i) return "gIOw16o16i";
if (v == mkldnn_gOIhw8i8o) return "gOIhw8i8o";
if (v == mkldnn_gOIhw16i16o) return "gOIhw16i16o";
if (v == mkldnn_gOIhw4i16o4i) return "gOIhw4i16o4i";
if (v == mkldnn_gOIhw4i16o4i_s8s8) return "gOIhw4i16o4i_s8s8";
if (v == mkldnn_gOIhw8i16o2i) return "gOIhw8i16o2i";
if (v == mkldnn_gOIhw8o16i2o) return "gOIhw8o16i2o";
if (v == mkldnn_gOIhw8o8i) return "gOIhw8o8i";
if (v == mkldnn_gOIhw16o16i) return "gOIhw16o16i";
if (v == mkldnn_gIOhw16o16i) return "gIOhw16o16i";
if (v == mkldnn_gOihw8o) return "gOihw8o";
if (v == mkldnn_gOihw16o) return "gOihw16o";
if (v == mkldnn_gOhwi8o) return "gOhwi8o";
if (v == mkldnn_gOhwi16o) return "gOhwi16o";
if (v == mkldnn_Goihw8g) return "Goihw8g";
if (v == mkldnn_Goihw16g) return "Goihw16g";
if (v == mkldnn_gOhIw16o4i) return "gOhIw16o4i";
if (v == mkldnn_gOIdhw8i8o) return "gOIdhw8i8o";
if (v == mkldnn_gOIdhw8o8i) return "gOIdhw8o8i";
if (v == mkldnn_gOdhwi8o) return "gOdhwi8o";
if (v == mkldnn_gOIdhw8i16o2i) return "gOIdhw8i16o2i";
if (v == mkldnn_gOIdhw16i16o) return "gOIdhw16i16o";
if (v == mkldnn_gOIdhw16o16i) return "gOIdhw16o16i";
if (v == mkldnn_gOidhw16o) return "gOidhw16o";
if (v == mkldnn_gOdhwi16o) return "gOdhwi16o";
if (v == mkldnn_wino_fmt) return "wino_fmt";
if (v == mkldnn_ldigo_p) return "ldigo_p";
if (v == mkldnn_ldgoi_p) return "ldgoi_p";
if (v == mkldnn_format_last) return "format_last";
assert(!"unknown fmt");
return "unknown fmt";
}
const char *mkldnn_prop_kind2str(mkldnn_prop_kind_t v) {
if (v == mkldnn_prop_kind_undef) return "undef";
if (v == mkldnn_forward_training) return "forward_training";
if (v == mkldnn_forward_inference) return "forward_inference";
if (v == mkldnn_forward_scoring) return "forward_scoring";
if (v == mkldnn_forward) return "forward";
if (v == mkldnn_backward) return "backward";
if (v == mkldnn_backward_data) return "backward_data";
if (v == mkldnn_backward_weights) return "backward_weights";
if (v == mkldnn_backward_bias) return "backward_bias";
assert(!"unknown prop_kind");
return "unknown prop_kind";
}
const char *mkldnn_prim_kind2str(mkldnn_primitive_kind_t v) {
if (v == mkldnn_undefined_primitive) return "undef";
if (v == mkldnn_memory) return "memory";
if (v == mkldnn_view) return "view";
if (v == mkldnn_reorder) return "reorder";
if (v == mkldnn_shuffle) return "shuffle";
if (v == mkldnn_concat) return "concat";
if (v == mkldnn_concat_inplace) return "concat_inplace";
if (v == mkldnn_sum) return "sum";
if (v == mkldnn_convolution) return "convolution";
if (v == mkldnn_deconvolution) return "deconvolution";
if (v == mkldnn_eltwise) return "eltwise";
if (v == mkldnn_relu) return "relu";
if (v == mkldnn_softmax) return "softmax";
if (v == mkldnn_pooling) return "pooling";
if (v == mkldnn_lrn) return "lrn";
if (v == mkldnn_batch_normalization) return "batch_normalization";
if (v == mkldnn_inner_product) return "inner_product";
if (v == mkldnn_convolution_relu) return "convolution_relu";
if (v == mkldnn_rnn) return "rnn";
assert(!"unknown prim_kind");
return "unknown prim_kind";
}
const char *mkldnn_alg_kind2str(mkldnn_alg_kind_t v) {
if (v == mkldnn_alg_kind_undef) return "undef";
if (v == mkldnn_convolution_direct) return "convolution_direct";
if (v == mkldnn_convolution_winograd) return "convolution_winograd";
if (v == mkldnn_eltwise_relu) return "eltwise_relu";
if (v == mkldnn_eltwise_tanh) return "eltwise_tanh";
if (v == mkldnn_eltwise_elu) return "eltwise_elu";
if (v == mkldnn_eltwise_square) return "eltwise_square";
if (v == mkldnn_eltwise_abs) return "eltwise_abs";
if (v == mkldnn_eltwise_sqrt) return "eltwise_sqrt";
if (v == mkldnn_eltwise_linear) return "eltwise_linear";
if (v == mkldnn_eltwise_bounded_relu) return "eltwise_bounded_relu";
if (v == mkldnn_eltwise_soft_relu) return "eltwise_soft_relu";
if (v == mkldnn_eltwise_logistic) return "eltwise_logistic";
if (v == mkldnn_pooling_max) return "pooling_max";
if (v == mkldnn_pooling_avg_include_padding) return "pooling_avg_include_padding";
if (v == mkldnn_pooling_avg_exclude_padding) return "pooling_avg_exclude_padding";
if (v == mkldnn_pooling_avg) return "pooling_avg";
if (v == mkldnn_lrn_across_channels) return "lrn_across_channels";
if (v == mkldnn_lrn_within_channel) return "lrn_within_channel";
if (v == mkldnn_deconvolution_direct) return "deconvolution_direct";
if (v == mkldnn_deconvolution_winograd) return "deconvolution_winograd";
if (v == mkldnn_vanilla_rnn) return "vanilla_rnn";
if (v == mkldnn_vanilla_lstm) return "vanilla_lstm";
if (v == mkldnn_vanilla_gru) return "vanilla_gru";
if (v == mkldnn_gru_linear_before_reset) return "gru_linear_before_reset";
assert(!"unknown alg_kind");
return "unknown alg_kind";
}
| [
"zhouhuman@163.com"
] | zhouhuman@163.com |
580ead725676fe4a04d637ee87fcb3575a0a6e2c | b4c88ea247bbe0892cca93f77b7172c3e48b0c42 | /system/portable/devices/misc/include/DeviceMCP2510SPI.h | 9bc6796daaf269b8745171bdf2a5270d0d82300f | [] | no_license | micro-os-plus/micro-os-plus-i | 09c420c846ad4cf6f8b91144001b5fc2880c7d7b | d17eb4471b754eeb868bba80f2b1d5f9021443b1 | refs/heads/master | 2023-05-27T06:00:27.536050 | 2023-05-20T07:43:50 | 2023-05-20T07:43:50 | 62,032,946 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 497 | h | /*
* Copyright (C) 2011 Liviu Ionescu.
*
* This file is part of the uOS++ distribution.
*/
#ifndef DEVICEMCP2510SPI_H_
#define DEVICEMCP2510SPI_H_
#include "portable/kernel/include/OS_Defines.h"
#if defined(OS_CONFIG_BOARD_AVI_A07527)
#include "portable/devices/misc/include/DeviceSPIUsart.h"
class DeviceMCP2510SPI : public DeviceSPIUsart
{
public:
};
#else
#error "Missing OS_CONFIG_BOARD_* definition"
#endif
#endif /* DEVICEMCP2510SPI_H_ */
| [
"ilg@livius.net"
] | ilg@livius.net |
cc1d7bc242aeb257ad594fb4295d7921f9e424a2 | 5df1a677af9379c9a82f1b29359a65ad8cbc385e | /CodeForces/PastContest/777/B.cpp | 1c6561d5a968d659f4fd5f5d44f7b9b42841d956 | [] | no_license | heyshb/Competitive-Programming | 92741a4e7234e1ebce685c1b870f1287bee18f1a | 363ef78d950afb53f0e5f1d2329f27dd7b9a44c2 | refs/heads/master | 2021-12-15T03:12:37.676111 | 2021-12-01T14:32:25 | 2021-12-01T14:32:25 | 122,315,094 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 939 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int N;
char s[1010];
int sum[2][10];
int v[2][1010];
int len[2];
int main()
{
scanf("%d",&N);
scanf("%s",s);
for (int i=0;i<N;i++)sum[0][s[i]-'0']++;
scanf("%s",s);
for (int i=0;i<N;i++)sum[1][s[i]-'0']++;
for (int i=0;i<2;i++)
{
len[i] = 0;
for (int j=0;j<10;j++)
for (int k=0;k<sum[i][j];k++)
v[i][++len[i]] = j;
}
v[1][N+1] = -1;
v[0][N+1] = -1;
/*
for (int i=0;i<2;i++)
{
for (int j=1;j<=N;j++)printf("%d",v[i][j]);
puts("");
}
*/
for (int i=1;i<=N;i++)printf("%d",v[0][i]);puts("");
for (int i=1;i<=N;i++)printf("%d",v[0][i]);puts("");
int now=1, ans=N;
for (int i=1;i<=N;i++)
{
while(now<=N && v[1][now]<v[0][i])now++;
if (v[1][now]>=v[0][i]) ans--;
}
printf("%d\n",ans);
now=1;
ans=0;
for (int i=1;i<=N;i++)
{
while(now<=N && v[1][now]<=v[0][i])now++;
if (v[1][now]>v[0][i]) ans++;
}
printf("%d\n",ans);
}
| [
"heyshb@vip.qq.com"
] | heyshb@vip.qq.com |
bee2cd261b6b3c57df3c85e950b9601357c47688 | c7ebab4f0bb325fddd99e2e6952241e6d5177faf | /EventLoopThread.h | fad3725c33023384341417f46d25065e6aa98a7a | [] | no_license | zhuqiweigit/mymuduo | d1cd19a4a10ad7c2d2d327dafa3a6c9379d8c76a | 31701d4b72cf29051bf721ea1d720535b048b39c | refs/heads/main | 2023-03-08T03:49:18.547494 | 2021-02-26T12:51:39 | 2021-02-26T12:51:39 | 342,574,386 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 621 | h | #pragma once
#include <functional>
#include <mutex>
#include <condition_variable>
#include <string>
#include "noncopyable.h"
#include "Thread.h"
class EventLoop;
class EventLoopThread{
public:
using ThreadInitCallBack = std::function<void(EventLoop*)>;
EventLoopThread(const ThreadInitCallBack& cb = ThreadInitCallBack(), const std::string &name = std::string());
~EventLoopThread();
EventLoop* startLoop();
private:
void threadFunc();
EventLoop* loop_;
bool exiting_;
Thread thread_;
std::mutex mutex_;
std::condition_variable cond_;
ThreadInitCallBack callback_;
}; | [
"XXX@xx.com"
] | XXX@xx.com |
292ae258db5a43c5064a4dae991337c97fcd9943 | 06f93fbd24e9bb5592e1bfc56d5a5969414c042f | /7. Reverse Integer.cpp | 4fccd5ee675fc19717a7c5560210b8e838804332 | [] | no_license | bigdaddyyjm/LeetCode | 1c78cd087bf2043e296cb4090333d1c35d20aa89 | b016bc003427c6808f350d076d4d99c51f603d12 | refs/heads/master | 2021-03-27T19:30:48.945711 | 2017-12-25T15:03:45 | 2017-12-25T15:03:45 | 115,010,146 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 840 | cpp | class Solution {
public:
int reverse(int x) {
int flag;
unsigned long long ans=0;
int ele;
vector<int> list_x;
if(x>=0){flag=1;}
else {flag=0;}
int a = abs(x);
//if(unsigned(x)>INT_MAX)return 0;
while(a!=0){
ele = a%10;
list_x.push_back(ele);
a = a/10;
}
//int last_ans = 0;
for(int i=0;i<list_x.size();i++){
//if(ans > ans + pow(10,(list_x.size()-i-1))*list_x[i])return 0;
ans = ans + pow(10,(list_x.size()-i-1))*list_x[i];
//if (last_ans > ans)return 0;
}
if(ans > INT_MAX)return 0;
if(flag == 1)return ans;
else return 0-ans;
//{
// if(flag == 1) return ans;
// else return 0-ans;
//}
}
}; | [
"yangjingmin@Pilgrim"
] | yangjingmin@Pilgrim |
d34889fc4438908fe6f6e64b937836410926c198 | 71a6536c475747a261ed168df6f9de1307cb0e2a | /wnt_ASTNode.h | a591051b4949a2def58e5606d7c6b8543183f04f | [] | no_license | glaretechnologies/winter | f33737d5de8aa5c47af83cf483b77effe614b948 | 78eb7a531ee4b41b5893f9e4ed368e4b3f3ce2b9 | refs/heads/master | 2023-07-09T12:14:52.305663 | 2023-07-05T14:46:31 | 2023-07-05T14:46:31 | 175,217,041 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 37,237 | h | /*=====================================================================
ASTNode.h
---------
Copyright Glare Technologies Limited 2019 -
File created by ClassTemplate on Wed Jun 11 03:55:25 2008
=====================================================================*/
#pragma once
#include "wnt_Type.h"
#include "wnt_FunctionSignature.h"
#include "wnt_ExternalFunction.h"
#include "BaseException.h"
#include "TokenBase.h"
#include "Value.h"
#include <utils/Reference.h>
#include <utils/RefCounted.h>
#include <utils/Platform.h>
#include <utils/PlatformUtils.h>
#include <utils/SmallVector.h>
#include <string>
#include <vector>
#include <set>
#include <unordered_set>
namespace llvm { class Function; };
namespace llvm { class Value; };
namespace llvm { class Module; };
namespace llvm { class LLVMContext; };
namespace llvm { class TargetData; };
namespace llvm { class Instruction; };
namespace llvm { class ConstantFolder; };
namespace llvm { class DataLayout; };
namespace llvm { class IRBuilderDefaultInserter; };
namespace llvm { template<typename T, typename Inserter > class IRBuilder; };
namespace Winter
{
class VMState;
class Linker;
class LetASTNode;
class AnonFunction;
class Value;
class BuiltInFunctionImpl;
class FunctionDefinition;
class LetBlock;
class ASTNode;
class SourceBuffer;
class ComparisonExpression;
class TraversalPayload;
class LetBlock;
class NamedConstant;
struct ProgramStats;
class SrcLocation;
struct WinterCPUInfo;
typedef std::map<ASTNode*, ASTNode*> CloneMapType;
class ASTNodeVisitor : public RefCounted
{
public:
virtual ~ASTNodeVisitor(){}
virtual void visit(ASTNode& node, TraversalPayload& payload) = 0;
};
class TraversalPayload
{
public:
enum Operation
{
//LinkFunctions,
BindVariables,
TypeCoercion,
TypeCheck,
ComputeCanConstantFold,
ConstantFolding,
//SubstituteType, // for making concrete types out of generic types.
//OperatorOverloadConversion, // Converting '+' to op_add etc..
//GetCleanupNodes,
CheckInDomain, // Check that calls to elem() etc.. are in bounds.
InlineFunctionCalls, // inline function calls
SubstituteVariables, // Used in InlineFunctionCalls passes: replace all variables in the function body with the argument values.
CustomVisit, // Calls supplied ASTNodeVisitor on each node visited.
UpdateUpRefs, // When cloning a subtree of nodes, update upwards pointers to point into the new subtree.
DeadFunctionElimination, // Removes all function definitions that are not reachable (through direct or indirect function calls) from the set of entry functions.
DeadCodeElimination_ComputeAlive, // Works out which let variables are referenced.
DeadCodeElimination_RemoveDead, // Removes let variables that are not referenced.
CountFunctionCalls, // Compute calls_to_func_count. calls_to_func_count is used in inlining decision.
CountArgumentRefs, // Count the number of references to each function argument in the body of each function. Used for inlining decision.
AddAnonFuncsToLinker, // Adds anonymous functions to linker, to codegen.
GetAllNamesInScope, // A pass over a function to get the set of names used, so that we can avoid them when generating new names for inlined let vars.
UnbindVariables, // Unbind certain variables. Used after cloning an expression during inlining.
SimplifyIfExpression // Replace "if(true, a, b)" with "a" etc..
};
TraversalPayload(Operation e) :
operation(e), tree_changed(false), current_named_constant(NULL), check_bindings(false)
{}
Linker* linker;
Operation operation;
std::vector<TypeRef> type_mappings; // for substitute type operation.
bool tree_changed;
//bool capture_variables; // If true, variables and function expressions will capture variable and add to captured_vars
//vector<CapturedVar> captured_vars; // For when parsing anon functions
//vector<LetBlock*> let_block_stack;
std::vector<FunctionDefinition*> func_def_stack;
//std::vector<NamedConstant*> named_constant_stack;
NamedConstant* current_named_constant;
//bool all_variables_bound; // Are all variables in a given function body bound? Used in BindVariables pass.
// Used in SubstituteVariables pass:
FunctionDefinition* func_args_to_sub; // This is the function whose body is getting inlined into the call site.
std::vector<Reference<ASTNode> > variable_substitutes; // Used in SubstituteVariables pass
std::map<std::pair<ASTNode*, int>, std::string> new_let_var_name_map;
int new_order_num;
Reference<ASTNodeVisitor> custom_visitor;
bool check_bindings; // If this is true, this is the final binding pass. Any unbound functions or variables should throw an exception.
// Types that are captured by a function closure (lambda expression).
std::set<TypeRef> captured_types;
// Used in UpdateUpRefs:
CloneMapType clone_map;
// Used in DeadFunctionElimination and DeadCodeElimination:
std::unordered_set<ASTNode*> reachable_nodes;
std::vector<ASTNode*> nodes_to_process;
std::unordered_set<ASTNode*> processed_nodes;
std::map<FunctionDefinition*, int> calls_to_func_count;
// GetAllNamesInScope, InlineFunctionCalls:
std::unordered_set<std::string>* used_names;
SmallVector<Reference<ASTNode>, 4> garbage; // For Storing a ref to a node so it won't get deleted (due to ref count going to zero) while a function on it is still being executed.
};
void printMargin(int depth, std::ostream& s);
bool isIntExactlyRepresentableAsFloat(int64 x);
bool isIntExactlyRepresentableAsDouble(int64 x);
bool checkFoldExpression(Reference<ASTNode>& e, TraversalPayload& payload, std::vector<ASTNode*>& stack); // Returns true if folding took place or e is already a literal.
void doImplicitIntToFloatTypeCoercionForFloatReturn(Reference<ASTNode>& expr, TraversalPayload& payload);
void doImplicitIntToDoubleTypeCoercionForDoubleReturn(Reference<ASTNode>& expr, TraversalPayload& payload);
BufferPosition errorContext(const ASTNode* n);
std::string errorContextString(const ASTNode* n);
BufferPosition errorContext(const ASTNode& n);
std::string errorContextString(const ASTNode& n);
BufferPosition errorContext(const SrcLocation& src_location);
std::string errorContextString(const SrcLocation& src_location);
BufferPosition errorContext(const ASTNode& n, TraversalPayload& payload);
bool isTargetDefinedBeforeAllInStack(const std::vector<FunctionDefinition*>& func_def_stack, int target_function_order_num);
bool expressionIsWellTyped(ASTNode& e, TraversalPayload& payload_);
bool shouldRefCount(EmitLLVMCodeParams& params, const Reference<ASTNode>& expr);
bool shouldRefCount(EmitLLVMCodeParams& params, const ASTNode& expr);
void addMetaDataCommentToInstruction(EmitLLVMCodeParams& params, llvm::Instruction* instr, const std::string& s);
void emitDestructorOrDecrCall(EmitLLVMCodeParams& params, const ASTNode& e, llvm::Value* value, const std::string& comment);
bool mayEscapeCurrentlyBuildingFunction(EmitLLVMCodeParams& params, const TypeRef& type);
void replaceAllUsesWith(Reference<ASTNode>& old_node, Reference<ASTNode>& new_node);
const std::string mapOpenCLCVarName(const std::unordered_set<std::string>& opencl_c_keywords, const std::string& s); // Rename to something that isn't a keyword if is one.
// Clones sub-tree, and updates up-refs to point into new subtree where possible.
Reference<ASTNode> cloneASTNodeSubtree(Reference<ASTNode>& n);
class CleanUpInfo
{
public:
CleanUpInfo(){}
CleanUpInfo(const ASTNode* node_, llvm::Value* value_) : node(node_), value(value_) {}
const ASTNode* node;
llvm::Value* value;
};
class CommonFunctions
{
public:
FunctionDefinition* allocateStringFunc;
FunctionDefinition* freeStringFunc;
FunctionDefinition* allocateVArrayFunc;
FunctionDefinition* freeVArrayFunc;
FunctionDefinition* allocateClosureFunc;
FunctionDefinition* freeClosureFunc;
llvm::Function* incrStringRefCountLLVMFunc;
llvm::Function* incrVArrayRefCountLLVMFunc;
llvm::Function* incrClosureRefCountLLVMFunc;
};
class EmitLLVMCodeParams
{
public:
FunctionDefinition* currently_building_func_def;
const WinterCPUInfo* cpu_info;
// These template arguments are the defaults from IRBuilder.h. Written explicitly here so we can forwards declare this type.
llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter >* builder;
llvm::Module* module;
llvm::Function* currently_building_func;
llvm::LLVMContext* context;
const llvm::DataLayout/*TargetData*/* target_data;
std::vector<LetBlock*> let_block_stack; // Pointers to all the let blocks that are parents of the current node
std::map<const LetASTNode*, llvm::Value* > let_values;
std::vector<CleanUpInfo> cleanup_values; // A list of ASTNodes that need to emit cleanup code (Ref decrement code) at the end of the function
CommonFunctions common_functions;
std::vector<llvm::Value*> argument_values; // Use for function specialisation in Array fold().
std::set<VRef<const Type>, ConstTypeVRefLessThan>* destructors_called_types;
bool emit_refcounting_code;
bool emit_trace_code;
ProgramStats* stats;
};
class EmitOpenCLCodeParams
{
public:
EmitOpenCLCodeParams() : emit_in_bound_asserts(false) {}
std::string file_scope_code;
std::string file_scope_func_defs;
/*
An expression in Winter, when transformed to OpenCL C, may not be expressible as just as an expression.
Rather, it may require one or more additional statements. Such statements will be writted to blocks.back().
For example, let blocks are not easily (efficiently) expressible in C: (we don't want to duplicate sin call)
let
x = sin(x)
in
x + x
In this case the directly returned OpenCL C code will be "x + x", but the code "x = sin(x)" will be put in blocks.back().
*/
std::vector<std::string> blocks;
std::set<TupleTypeRef, TypeRefLessThan> tuple_types_used;
std::unordered_set<std::string> opencl_c_keywords;
int uid; // A counter for generating unique names
bool emit_comments;
bool emit_in_bound_asserts;
};
struct GetTimeBoundParams
{
GetTimeBoundParams() : max_bound_computation_steps(1 << 22), steps(0) {}
// Maximum number of 'steps' (function call expressions encountered currently) to allow when computing the bound,
// before the computation is terminated and an exception thrown.
size_t max_bound_computation_steps;
size_t steps;
};
struct GetSpaceBoundParams
{
GetSpaceBoundParams() : max_bound_computation_steps(1 << 22), steps(0), is_root_function(true) {}
// Maximum number of 'steps' (function call expressions encountered currently) to allow when computing the bound,
// before the computation is terminated and an exception thrown.
size_t max_bound_computation_steps;
size_t steps;
bool is_root_function; // Is this the first function for which getSpaceBound() is called on?
// (or has getSpaceBound() been called on a function def via a function expression)
};
struct GetSpaceBoundResults
{
GetSpaceBoundResults(size_t stack_space_, size_t heap_space_) : stack_space(stack_space_), heap_space(heap_space_) {}
size_t stack_space;
size_t heap_space;
void operator += (const GetSpaceBoundResults& b) { stack_space += b.stack_space; heap_space += b.heap_space; }
};
inline GetSpaceBoundResults operator + (const GetSpaceBoundResults& a, const GetSpaceBoundResults& b)
{
return GetSpaceBoundResults(a.stack_space + b.stack_space, a.heap_space + b.heap_space);
}
struct WinterCPUInfo
{
enum Arch
{
Arch_x64,
Arch_ARM64
};
bool isX64() const { return arch == Arch_x64; }
Arch arch;
PlatformUtils::CPUInfo cpu_info; // set if arch == Arch_x64
};
/*=====================================================================
ASTNode
-------
Abstract syntax tree node.
=====================================================================*/
class ASTNode : public RefCounted
{
public:
enum ASTNodeType
{
BufferRootType,
FunctionDefinitionType,
FunctionExpressionType,
VariableASTNodeType,
FloatLiteralType,
DoubleLiteralType,
IntLiteralType,
BoolLiteralType,
StringLiteralType,
CharLiteralType,
MapLiteralType,
ArrayLiteralType,
VArrayLiteralType,
VectorLiteralType,
TupleLiteralType,
AdditionExpressionType,
SubtractionExpressionType,
MulExpressionType,
DivExpressionType,
BinaryBitwiseExpressionType,
BinaryBooleanType,
UnaryMinusExpressionType,
LetType,
ComparisonExpressionType,
AnonFunctionType,
LetBlockType,
ArraySubscriptType,
IfExpressionType,
NamedConstantType,
LogicalNegationExprType
};
ASTNode(ASTNodeType node_type_, const SrcLocation& loc_) : node_type(node_type_), location(loc_), can_maybe_constant_fold(false) {}
virtual ~ASTNode() {}
virtual ValueRef exec(VMState& vmstate) = 0;
inline ASTNodeType nodeType() const { return node_type; }
virtual TypeRef type() const = 0;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack) {}
// Replace the given child node reference.
virtual void updateChild(const ASTNode* old_val, Reference<ASTNode>& new_val) { assert(0); }
// Emit LLVM code to compute the value for this AST node.
// If the value type is pass-by-pointer, and return_space_pointer is non-null, then code MAY be emitted
// to store the value at the memory pointed to by return_space_pointer.
// However, since the value could be stored in a constant global, return_space_pointer doesn't have to be used.
// Returns a pointer to the mem location where the value is stored.
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* return_space_pointer = NULL) const = 0;
// Emit cleanup (ref count decrement and delete) code at the end of the function
//virtual void emitCleanupLLVMCode(EmitLLVMCodeParams& params, llvm::Value* val) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map) = 0; // clone_map will map from old node to new node.
virtual void print(int depth, std::ostream& s) const = 0;
virtual std::string sourceString(int depth) const = 0;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const = 0;
// True iff the expression does not depend on any variables
virtual bool isConstant() const = 0;
// For constant folding.
// We can't evaluate an expression for constant folding unless we know the expression is defined.
// For example, elem(a, i) may not be proven defined yet.
virtual bool provenDefined() const { return true; }
virtual size_t getTimeBound(GetTimeBoundParams& params) const = 0;
// Only FunctionDefinitions need return stack size information, other nodes can return 0.
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const = 0;
// e.g. number of AST nodes in subtree.
// For deciding whether to inline a function.
virtual size_t getSubtreeCodeComplexity() const = 0;
const SrcLocation& srcLocation() const { return location; }
// Can this AST node potentially be replaced with a literal node?
bool can_maybe_constant_fold;
// std::vector<UpRefBase*> uprefs; // UpRefs that refer to this node.
protected:
static llvm::Value* emitExternalLinkageCall(const std::string& target_name, EmitLLVMCodeParams& params);
private:
// GLARE_DISABLE_COPY(ASTNode)
ASTNodeType node_type;
SrcLocation location;
};
typedef Reference<ASTNode> ASTNodeRef;
//void updateIndexBounds(TraversalPayload& payload, const ComparisonExpression& comp_expr, const ASTNodeRef& index, int& i_lower, int& i_upper);
bool expressionsHaveSameValue(const ASTNodeRef& a, const ASTNodeRef& b);
class BufferRoot : public ASTNode
{
public:
BufferRoot(const SrcLocation& loc) : ASTNode(BufferRootType, loc)
{}
std::vector<ASTNodeRef> top_level_defs; // Either function definitions or named constants.
virtual ValueRef exec(VMState& vmstate){ return ValueRef(); }
virtual TypeRef type() const { throw BaseException("root has no type."); }
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
};
class FloatLiteral : public ASTNode
{
public:
FloatLiteral(float v, const SrcLocation& loc) : ASTNode(FloatLiteralType, loc), value(v) { this->can_maybe_constant_fold = true; }
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return TypeRef(new Float()); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const { return true; }
virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; }
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(4, 0); }
virtual size_t getSubtreeCodeComplexity() const { return 1; }
float value;
};
class DoubleLiteral : public ASTNode
{
public:
DoubleLiteral(double v, const SrcLocation& loc) : ASTNode(DoubleLiteralType, loc), value(v) { this->can_maybe_constant_fold = true; }
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return TypeRef(new Double()); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const { return true; }
virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; }
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(8, 0); }
virtual size_t getSubtreeCodeComplexity() const { return 1; }
double value;
};
class IntLiteral : public ASTNode
{
public:
IntLiteral(int64 v, int num_bits_, bool is_signed_, const SrcLocation& loc) : ASTNode(IntLiteralType, loc), value(v), num_bits(num_bits_), is_signed(is_signed_) { assert(num_bits == 16 || num_bits == 32 || num_bits == 64); this->can_maybe_constant_fold = true; }
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return TypeRef(new Int(num_bits, is_signed)); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const { return true; }
virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; }
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const { return 1; }
int64 value;
int num_bits;
bool is_signed;
};
class StringLiteral : public ASTNode
{
public:
StringLiteral(const std::string& v, const SrcLocation& loc);
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return TypeRef(new String()); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
//virtual void emitCleanupLLVMCode(EmitLLVMCodeParams& params, llvm::Value* val) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const { return true; }
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
std::string value;
mutable bool llvm_allocated_on_heap;
};
class CharLiteral : public ASTNode
{
public:
CharLiteral(const std::string& v, const SrcLocation& loc);
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return new CharType(); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
//virtual void emitCleanupLLVMCode(EmitLLVMCodeParams& params, llvm::Value* val) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const { return true; }
virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; }
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(1, 0); }
virtual size_t getSubtreeCodeComplexity() const { return 1; }
std::string value; // utf-8 encoded char.
};
class BoolLiteral : public ASTNode
{
public:
BoolLiteral(bool v, const SrcLocation& loc) : ASTNode(BoolLiteralType, loc), value(v) { can_maybe_constant_fold = true; }
bool value;
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return TypeRef(new Bool()); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const { return true; }
virtual size_t getTimeBound(GetTimeBoundParams& params) const { return 1; }
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const { return GetSpaceBoundResults(1, 0); }
virtual size_t getSubtreeCodeComplexity() const { return 1; }
};
class MapLiteral : public ASTNode
{
public:
MapLiteral(const SrcLocation& loc) : ASTNode(MapLiteralType, loc) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return maptype; }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
TypeRef maptype;
std::vector<std::pair<ASTNodeRef, ASTNodeRef> > items;
};
class AdditionExpression : public ASTNode
{
public:
AdditionExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(AdditionExpressionType, loc), a(a_), b(b_) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const;
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
ASTNodeRef a;
ASTNodeRef b;
mutable TypeRef expr_type; // cached;
};
class SubtractionExpression : public ASTNode
{
public:
SubtractionExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(SubtractionExpressionType, loc), a(a_), b(b_) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const;
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
ASTNodeRef a;
ASTNodeRef b;
mutable TypeRef expr_type; // cached;
};
class MulExpression : public ASTNode
{
public:
MulExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(MulExpressionType, loc), a(a_), b(b_) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const;
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
ASTNodeRef a;
ASTNodeRef b;
mutable TypeRef expr_type; // cached;
};
class DivExpression : public ASTNode
{
public:
DivExpression(const SrcLocation& loc, const ASTNodeRef& a_, const ASTNodeRef& b_) : ASTNode(DivExpressionType, loc), a(a_), b(b_), proven_defined(false) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const;
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual bool provenDefined() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
private:
void checkNoOverflow(TraversalPayload& payload, std::vector<ASTNode*>& stack);
void checkNoZeroDivide(TraversalPayload& payload, std::vector<ASTNode*>& stack);
public:
ASTNodeRef a;
ASTNodeRef b;
bool proven_defined;
mutable TypeRef expr_type; // cached;
};
class BinaryBitwiseExpression : public ASTNode
{
public:
enum BitwiseType
{
BITWISE_AND,
BITWISE_OR,
BITWISE_XOR,
BITWISE_LEFT_SHIFT,
BITWISE_RIGHT_SHIFT
};
BinaryBitwiseExpression(BitwiseType t, const ASTNodeRef& a, const ASTNodeRef& b, const SrcLocation& loc);
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const;
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
private:
const std::string opToken() const;
BitwiseType t;
ASTNodeRef a;
ASTNodeRef b;
};
class BinaryBooleanExpr : public ASTNode
{
public:
enum Type
{
AND,
OR
};
BinaryBooleanExpr(Type t, const ASTNodeRef& a, const ASTNodeRef& b, const SrcLocation& loc);
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return a->type(); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
Type t;
ASTNodeRef a;
ASTNodeRef b;
};
class UnaryMinusExpression : public ASTNode
{
public:
UnaryMinusExpression(const SrcLocation& loc, const ASTNodeRef& expr_) : ASTNode(UnaryMinusExpressionType, loc), expr(expr_) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return expr->type(); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
ASTNodeRef expr;
};
// e.g. !x
class LogicalNegationExpr : public ASTNode
{
public:
LogicalNegationExpr(const SrcLocation& loc, const ASTNodeRef& expr_) : ASTNode(LogicalNegationExprType, loc), expr(expr_) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return expr->type(); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
ASTNodeRef expr;
};
class ComparisonExpression : public ASTNode
{
public:
ComparisonExpression(const Reference<TokenBase>& token_, const ASTNodeRef a_, const ASTNodeRef b_, const SrcLocation& loc) :
ASTNode(ComparisonExpressionType, loc), token(token_), a(a_), b(b_) {}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return new Bool(); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
const std::string getOverloadedFuncName() const; // returns e.g. op_lt, op_gt etc..
Reference<TokenBase> token;
ASTNodeRef a;
ASTNodeRef b;
};
// Not used currently.
class ArraySubscript : public ASTNode
{
public:
ArraySubscript(const ASTNodeRef& subscript_expr_, const SrcLocation& loc) :
ASTNode(ArraySubscriptType, loc), subscript_expr(subscript_expr_)
{}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const { return subscript_expr->type(); }
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
ASTNodeRef subscript_expr;
};
class NamedConstant : public ASTNode
{
public:
NamedConstant(const TypeRef& declared_type_, const std::string& name_, const ASTNodeRef& value_expr_, const SrcLocation& loc, int order_num_) :
ASTNode(NamedConstantType, loc), declared_type(declared_type_), name(name_), value_expr(value_expr_), order_num(order_num_), llvm_value(NULL)
{}
virtual ValueRef exec(VMState& vmstate);
virtual TypeRef type() const;
virtual void print(int depth, std::ostream& s) const;
virtual std::string sourceString(int depth) const;
virtual std::string emitOpenCLC(EmitOpenCLCodeParams& params) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual void updateChild(const ASTNode* old_val, ASTNodeRef& new_val);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params, llvm::Value* ret_space_ptr) const;
virtual Reference<ASTNode> clone(CloneMapType& clone_map);
virtual bool isConstant() const;
virtual size_t getTimeBound(GetTimeBoundParams& params) const;
virtual GetSpaceBoundResults getSpaceBound(GetSpaceBoundParams& params) const;
virtual size_t getSubtreeCodeComplexity() const;
TypeRef declared_type; // May be NULL if no type was declared.
std::string name;
ASTNodeRef value_expr;
int order_num;
mutable llvm::Value* llvm_value;
};
typedef Reference<NamedConstant> NamedConstantRef;
/*class AnonFunction : public ASTNode
{
public:
AnonFunction() {}
virtual Value* exec(VMState& vmstate);
virtual ASTNodeType nodeType() const { return AnonFunctionType; }
virtual TypeRef type() const { return thetype; }
virtual void print(int depth, std::ostream& s) const;
virtual void traverse(TraversalPayload& payload, std::vector<ASTNode*>& stack);
virtual llvm::Value* emitLLVMCode(EmitLLVMCodeParams& params) const;
vector<FunctionDefinition::FunctionArg> args;
ASTNodeRef body;
TypeRef thetype;
};*/
} //end namespace Lang
| [
"nick@indigorenderer.com"
] | nick@indigorenderer.com |
d42d936f294ae67a619571ea82cdb1bd0846be21 | 509b32cf65d208b8f6284b139999b59a29556d1b | /alvere/alvere_application/src/systems/s_direction_from_movement.hpp | 5136aa5b759a1c9b820e9367c83c6fff219e981e | [] | no_license | geoorgeous/alvere_engine | 1725b57aea848635cc667a0d64d66be54d8079ed | 71176a6690ffd46c0b1953450afaa6fb4b990647 | refs/heads/master | 2021-08-04T06:05:12.879753 | 2020-05-18T21:43:08 | 2020-05-18T21:43:08 | 172,511,977 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 537 | hpp | #pragma once
#include <alvere/world/system/query_updated_system.hpp>
#include "components/c_direction.hpp"
#include "components/physics/c_movement.hpp"
class S_DirectionFromMovement : public alvere::QueryUpdatedSystem<C_Direction, const C_Movement>
{
public:
void Update(float deltaTime, C_Direction & direction, const C_Movement & movement)
{
if (movement.m_Horizontal < 0.0f)
{
direction.m_Direction = Direction::Left;
}
else if (movement.m_Horizontal > 0.0f)
{
direction.m_Direction = Direction::Right;
}
}
}; | [
"jameskime100@googlemail.com"
] | jameskime100@googlemail.com |
231361dd8fd2f10d46b47cbaf174d3691cb73f60 | 7bdce218461971fb5804059038de061fde3c1187 | /MarkdownParserCore/Regexpression.cpp | 01897d74134c2da4ecbd6ea14e68ddf01e51ac61 | [] | no_license | jh-isw/MarkdownParser | 691d023b62ae4ddf26faf42fd9e10d9b7c22365f | 0af83e1013f9dfe53be537df1efb66fcf906ebfa | refs/heads/master | 2021-07-10T05:46:47.470307 | 2017-10-09T08:01:06 | 2017-10-09T08:01:06 | 106,251,967 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,228 | cpp | //
// Created by blacknote on 08.04.17.
//
#include "stdafx.h"
#include <stdio.h>
#include <stdarg.h>
#include <iostream>
#include "Regexpression.h"
Regexpression::Regexpression() {
}
void Regexpression::regexh1(std::stringstream* instrstream) {
std::string line;
std::stringstream retstrstream;
std::regex regh1search("^#{1}[^#]");
std::regex regh1op("^#{1}[\\s\\t]+|^#{1}");
while (getline(*instrstream, line)) {
if (!isEof(instrstream)) {
if (std::regex_search(line, regh1search)) {
line = regex_replace(line, regh1op, "<h1>");
std::regex regh1clcond1("[\\s\\t]+$");
std::regex regh1clcond2("$");
if (std::regex_search(line, regh1clcond1))
line = regex_replace(line, regh1clcond1, "</h1>");
else if (std::regex_search(line, regh1clcond2))
line = regex_replace(line, regh1clcond2, "</h1>");
retstrstream << line << std::endl;
}
else {
retstrstream << line << std::endl;
}
}
else {
std::cout << "failed to read line" << std::endl;
}
}
instrstream->swap(retstrstream);
}
void Regexpression::regexh2(std::stringstream* instrstream) {
std::string line;
std::stringstream retstrstream;
std::regex regh2search("^#{2}[^#]");
std::regex regh2op("^#{2}[\\s\\t]+|^#{2}");
while (getline(*instrstream, line)) {
if (!isEof(instrstream)) {
if (std::regex_search(line, regh2search)) {
line = regex_replace(line, regh2op, "<h2>");
std::regex regh2clcond1("[\\s\\t]+$");
std::regex regh2clcond2("$");
if (std::regex_search(line, regh2clcond1))
line = regex_replace(line, regh2clcond1, "</h2>");
else if (std::regex_search(line, regh2clcond2))
line = regex_replace(line, regh2clcond2, "</h2>");
retstrstream << line << std::endl;
}
else {
retstrstream << line << std::endl;
}
}
else {
std::cout << "failed to read line" << std::endl;
}
}
instrstream->swap(retstrstream);
}
/*
std::string Regexpression::regexlist(std::string) {
return std::__cxx11::string();
}
*/
void Regexpression::regexbold(std::stringstream* instrstream) {
std::string line;
std::stringstream retstrstream;
std::regex regboldsearch("(\\*\\*)(\\w)*(\\*\\*)");
std::regex regh2op("(?<=(\\*\\*){1})");
while (getline(*instrstream, line)) {
if (!isEof(instrstream)) {
if (std::regex_search(line, regboldsearch)) {
line = regex_replace(line, regh2op, "<b>");
//std::regex regh2clcond1( "[\\s\\t]+$" );
//std::regex regh2clcond2( "$" );
//if( std::regex_search( line, regh2clcond1 ) )
line = regex_replace(line, regh2op, "</b>");
//else if( std::regex_search( line, regh2clcond2 ) )
//line = regex_replace( line, regh2clcond2, "</h2>" );
retstrstream << line << std::endl;
}
else {
retstrstream << line << std::endl;
}
}
else {
std::cout << "failed to read line" << std::endl;
}
}
instrstream->swap(retstrstream);
}
/*
std::string Regexpression::regexitalic(std::string) {
return std::__cxx11::string();
}
std::string Regexpression::regexquote(std::string) {
return std::__cxx11::string();
}*/
bool Regexpression::isEof( std::stringstream* instrstream ) {
if (instrstream->eof())
return true;
return false;
} | [
"jan.hecht@jh-isw.de"
] | jan.hecht@jh-isw.de |
2f2bc632db55ee262dce90ec7ec088fc6a2eb29d | 924de80dab7907fdb03ab1cafeea6e399d9759c6 | /LIBRARY/WINDOWS/INCLUDES/GTEngine/Include/Graphics/GteBlendTransformController.h | aef587f478353ba5dd6bb6d9239e5878ad042c73 | [] | no_license | x-tox-man/xengine | 866fd44d79207c71c6ad2709a66496d392ec0f6d | 81b9445795422969848acfffde59136e1eb66fbe | refs/heads/master | 2021-04-29T10:39:43.257184 | 2020-10-25T10:48:54 | 2020-10-25T10:48:54 | 77,837,329 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,877 | h | // David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2016
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// File Version: 2.1.0 (2016/01/25)
#pragma once
#include <Graphics/GteTransformController.h>
#include <memory>
namespace gte
{
class GTE_IMPEXP BlendTransformController : public TransformController
{
public:
// The transformations consist of translation, rotation, and uniform
// scale. The rotation and scale blending is either geometric or
// arithmetic, as specified in the other constructor inputs. Translation
// blending is always arithmetic. Let {R0,S0,T0} and {R1,S1,T1} be the
// transformation channels, and let weight w be in [0,1]. Let {R,S,T} be
// the blended result. Let q0, q1, and q be quaternions corresponding to
// R0, R1, and R with Dot(q0,q1) >= 0 and A = angle(q0,q1) =
// acos(Dot(q0,q1)).
//
// Translation: T = (1-w)*T0 + w*T1
//
// Arithmetic rotation: q = Normalize((1-w)*q0 + w*q1)
// Geometric rotation:
// q = Slerp(w,q0,q1)
// = (sin((1-w)*A)*q0 + sin(w*A)*q1)/sin(A)
//
// Arithmetic scale: s = (1-w)*s0 + w*s1 for each channel s0, s1, s
// Geometric scale: s = sign(s0)*sign(s1)*pow(|s0|,1-w)*pow(|s1|,w)
// If either of s0 or s1 is zero, then s is zero.
BlendTransformController(
std::shared_ptr<TransformController> const& controller0,
std::shared_ptr<TransformController> const& controller1,
bool geometricRotation, bool geometricScale);
// Member access. The weight w is a number for which 0 <= w <= 1.
inline std::shared_ptr<TransformController> const& GetController0() const;
inline std::shared_ptr<TransformController> const& GetController1() const;
inline void SetWeight(float weight);
inline float GetWeight() const;
// The animation update. The application time is in milliseconds.
virtual bool Update(double applicationTime);
protected:
// Set the object for 'this' and for the managed controllers.
virtual void SetObject(ControlledObject* object);
std::shared_ptr<TransformController> mController0, mController1;
float mWeight;
bool mRSMatrices, mGeometricRotation, mGeometricScale;
};
inline std::shared_ptr<TransformController> const&
BlendTransformController::GetController0() const
{
return mController0;
}
inline std::shared_ptr<TransformController> const&
BlendTransformController::GetController1() const
{
return mController1;
}
inline void BlendTransformController::SetWeight(float weight)
{
mWeight = weight;
}
inline float BlendTransformController::GetWeight() const
{
return mWeight;
}
}
| [
"x_tox_man@hotmail.com"
] | x_tox_man@hotmail.com |
6877ce8b88cee81dc5d4c0c4e92b3df63c062472 | 170dd8b4d93da1f3431054a97cad2e7fabfffd09 | /libredex/ControlFlow.cpp | ece4f112f9069d8218cafafc6e396a1d2b7e2964 | [
"MIT"
] | permissive | urantialife/redex | 37959427c167df8d92622e3ad67c4ba8ae4e32d5 | 7c970695c7bb1ca3720c6843de7abcb0175faa8f | refs/heads/master | 2020-06-01T14:18:23.771227 | 2019-06-07T00:09:34 | 2019-06-07T00:22:25 | 190,811,580 | 1 | 0 | null | 2019-06-07T21:36:30 | 2019-06-07T21:36:29 | null | UTF-8 | C++ | false | false | 78,112 | cpp | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "ControlFlow.h"
#include <boost/dynamic_bitset.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <iterator>
#include <stack>
#include <utility>
#include "DexUtil.h"
#include "Transform.h"
#include "WeakTopologicalOrdering.h"
namespace {
// return true if `it` should be the last instruction of this block
bool end_of_block(const IRList* ir, IRList::iterator it, bool in_try) {
auto next = std::next(it);
if (next == ir->end()) {
return true;
}
// End the block before the first target in a contiguous sequence of targets.
if (next->type == MFLOW_TARGET && it->type != MFLOW_TARGET) {
return true;
}
// End the block before the first catch marker in a contiguous sequence of
// catch markers.
if (next->type == MFLOW_CATCH && it->type != MFLOW_CATCH) {
return true;
}
// End the block before a TRY_START
// and after a TRY_END
if ((next->type == MFLOW_TRY && next->tentry->type == TRY_START) ||
(it->type == MFLOW_TRY && it->tentry->type == TRY_END)) {
return true;
}
if (in_try && it->type == MFLOW_OPCODE &&
opcode::may_throw(it->insn->opcode())) {
return true;
}
if (it->type != MFLOW_OPCODE) {
return false;
}
if (is_branch(it->insn->opcode()) || is_return(it->insn->opcode()) ||
it->insn->opcode() == OPCODE_THROW) {
return true;
}
return false;
}
bool ends_with_may_throw(cfg::Block* p) {
for (auto last = p->rbegin(); last != p->rend(); ++last) {
if (last->type != MFLOW_OPCODE) {
continue;
}
return opcode::can_throw(last->insn->opcode());
}
return false;
}
bool cannot_throw(cfg::Block* b) {
for (const auto& mie : InstructionIterable(b)) {
auto op = mie.insn->opcode();
if (opcode::can_throw(op)) {
return false;
}
}
return true;
}
/*
* Return true if the block does not contain any instruction.
*/
bool is_effectively_empty(cfg::Block* b) {
return b->get_first_insn() == b->end();
}
/*
* Return an iterator to the first instruction (except move-result* and goto) if
* it occurs before the first position. Otherwise return end.
*/
IRList::iterator insn_before_position(cfg::Block* b) {
for (auto it = b->begin(); it != b->end(); ++it) {
if (it->type == MFLOW_OPCODE) {
auto op = it->insn->opcode();
if (!is_move_result(op) && !opcode::is_move_result_pseudo(op) &&
!is_goto(op)) {
return it;
}
} else if (it->type == MFLOW_POSITION) {
return b->end();
}
}
return b->end();
}
/*
* Given an output ordering, Find adjacent positions that are exact duplicates
* and delete the extras. Make sure not to delete any positions that are
* referenced by a parent pointer.
*/
void remove_duplicate_positions(IRList* ir) {
std::unordered_set<DexPosition*> keep;
for (auto& mie : *ir) {
if (mie.type == MFLOW_POSITION && mie.pos->parent != nullptr) {
keep.insert(mie.pos->parent);
}
}
DexPosition* prev = nullptr;
for (auto it = ir->begin(); it != ir->end();) {
if (it->type == MFLOW_POSITION) {
DexPosition* curr = it->pos.get();
if (prev != nullptr && *curr == *prev && keep.count(curr) == 0) {
it = ir->erase_and_dispose(it);
continue;
} else {
prev = curr;
}
}
++it;
}
}
} // namespace
namespace cfg {
IRList::iterator Block::begin() {
if (m_parent->editable()) {
return m_entries.begin();
} else {
return m_begin;
}
}
IRList::iterator Block::end() {
if (m_parent->editable()) {
return m_entries.end();
} else {
return m_end;
}
}
IRList::const_iterator Block::begin() const {
if (m_parent->editable()) {
return m_entries.begin();
} else {
return m_begin;
}
}
IRList::const_iterator Block::end() const {
if (m_parent->editable()) {
return m_entries.end();
} else {
return m_end;
}
}
bool Block::is_catch() const {
return m_parent->get_pred_edge_of_type(this, EDGE_THROW) != nullptr;
}
bool Block::same_try(const Block* other) const {
always_assert(other->m_parent == this->m_parent);
return m_parent->blocks_are_in_same_try(this, other);
}
void Block::remove_insn(const InstructionIterator& it) {
always_assert(m_parent->editable());
m_parent->remove_insn(it);
}
void Block::remove_insn(const ir_list::InstructionIterator& it) {
always_assert(m_parent->editable());
remove_insn(to_cfg_instruction_iterator(it));
}
void Block::remove_insn(const IRList::iterator& it) {
always_assert(m_parent->editable());
remove_insn(to_cfg_instruction_iterator(it));
}
opcode::Branchingness Block::branchingness() {
// TODO (cnli): put back 'always_assert(m_parent->editable());'
// once ModelMethodMerger::sink_common_ctor_to_return_block update
// to editable CFG.
const auto& last = get_last_insn();
if (succs().empty() ||
(succs().size() == 1 &&
m_parent->get_succ_edge_of_type(this, EDGE_GHOST) != nullptr)) {
if (last != end()) {
auto op = last->insn->opcode();
if (is_return(op)) {
return opcode::BRANCH_RETURN;
} else if (op == OPCODE_THROW) {
return opcode::BRANCH_THROW;
}
}
return opcode::BRANCH_NONE;
}
if (m_parent->get_succ_edge_of_type(this, EDGE_THROW) != nullptr) {
return opcode::BRANCH_THROW;
}
if (m_parent->get_succ_edge_of_type(this, EDGE_BRANCH) != nullptr) {
always_assert(last != end());
auto br = opcode::branchingness(last->insn->opcode());
always_assert(br == opcode::BRANCH_IF || br == opcode::BRANCH_SWITCH);
return br;
}
if (m_parent->get_succ_edge_of_type(this, EDGE_GOTO) != nullptr) {
return opcode::BRANCH_GOTO;
}
return opcode::BRANCH_NONE;
}
uint32_t Block::num_opcodes() const {
always_assert(m_parent->editable());
return m_entries.count_opcodes();
}
uint32_t Block::sum_opcode_sizes() const {
always_assert(m_parent->editable());
return m_entries.sum_opcode_sizes();
}
// shallowly copy pointers (edges and parent cfg)
// but deeply copy MethodItemEntries
Block::Block(const Block& b, MethodItemEntryCloner* cloner)
: m_id(b.m_id),
m_preds(b.m_preds),
m_succs(b.m_succs),
m_parent(b.m_parent) {
// only for editable, don't worry about m_begin and m_end
always_assert(m_parent->editable());
for (const auto& mie : b.m_entries) {
m_entries.push_back(*cloner->clone(&mie));
}
}
bool Block::has_pred(Block* b, EdgeType t) const {
const auto& edges = preds();
return std::find_if(edges.begin(), edges.end(), [b, t](const Edge* edge) {
return edge->src() == b &&
(t == EDGE_TYPE_SIZE || edge->type() == t);
}) != edges.end();
}
bool Block::has_succ(Block* b, EdgeType t) const {
const auto& edges = succs();
return std::find_if(edges.begin(), edges.end(), [b, t](const Edge* edge) {
return edge->target() == b &&
(t == EDGE_TYPE_SIZE || edge->type() == t);
}) != edges.end();
}
IRList::iterator Block::get_conditional_branch() {
for (auto it = rbegin(); it != rend(); ++it) {
if (it->type == MFLOW_OPCODE) {
auto op = it->insn->opcode();
if (is_conditional_branch(op) || is_switch(op)) {
return std::prev(it.base());
}
}
}
return end();
}
IRList::iterator Block::get_last_insn() {
for (auto it = rbegin(); it != rend(); ++it) {
if (it->type == MFLOW_OPCODE) {
// Reverse iterators have a member base() which returns a corresponding
// forward iterator. Beware that this isn't an iterator that refers to the
// same object - it actually refers to the next object in the sequence.
// This is so that rbegin() corresponds with end() and rend() corresponds
// with begin(). Copied from https://stackoverflow.com/a/2037917
return std::prev(it.base());
}
}
return end();
}
IRList::iterator Block::get_first_insn() {
for (auto it = begin(); it != end(); ++it) {
if (it->type == MFLOW_OPCODE) {
return it;
}
}
return end();
}
bool Block::starts_with_move_result() {
auto first_it = get_first_insn();
if (first_it != end()) {
auto first_op = first_it->insn->opcode();
if (is_move_result(first_op) || opcode::is_move_result_pseudo(first_op)) {
return true;
}
}
return false;
}
Block* Block::goes_to() const {
const Edge* e = m_parent->get_succ_edge_of_type(this, EDGE_GOTO);
if (e != nullptr) {
return e->target();
}
return nullptr;
}
Block* Block::goes_to_only_edge() const {
const auto& s = succs();
if (s.size() == 1) {
const auto& e = s[0];
if (e->type() == EDGE_GOTO) {
return e->target();
}
}
return nullptr;
}
std::vector<Edge*> Block::get_outgoing_throws_in_order() const {
std::vector<Edge*> result =
m_parent->get_succ_edges_of_type(this, EDGE_THROW);
std::sort(result.begin(), result.end(), [](const Edge* e1, const Edge* e2) {
return e1->m_throw_info->index < e2->m_throw_info->index;
});
return result;
}
// We remove the first matching target because multiple switch cases can point
// to the same block. We use this function to move information from the target
// entries to the CFG edges. The two edges are identical, save the case key, so
// it doesn't matter which target is taken. We arbitrarily choose to process the
// targets in forward order.
boost::optional<Edge::CaseKey> Block::remove_first_matching_target(
MethodItemEntry* branch) {
for (auto it = m_entries.begin(); it != m_entries.end(); ++it) {
auto& mie = *it;
if (mie.type == MFLOW_TARGET && mie.target->src == branch) {
boost::optional<Edge::CaseKey> result;
if (mie.target->type == BRANCH_MULTI) {
always_assert_log(is_switch(branch->insn->opcode()), "block %d in %s\n",
id(), SHOW(*m_parent));
result = mie.target->case_key;
}
m_entries.erase_and_dispose(it);
return result;
}
}
always_assert_log(false,
"block %d has no targets matching %s:\n%s",
id(),
SHOW(branch->insn),
SHOW(&m_entries));
not_reached();
}
// These assume that the iterator is inside this block
cfg::InstructionIterator Block::to_cfg_instruction_iterator(
const ir_list::InstructionIterator& list_it) {
if (ControlFlowGraph::DEBUG && list_it.unwrap() != end()) {
bool inside = false;
auto needle = list_it.unwrap();
for (auto it = begin(); it != end(); ++it) {
if (it == needle) {
inside = true;
}
}
always_assert(inside);
}
return cfg::InstructionIterator(*m_parent, this, list_it);
}
cfg::InstructionIterator Block::to_cfg_instruction_iterator(
const IRList::iterator& list_it) {
always_assert(list_it == this->end() || list_it->type == MFLOW_OPCODE);
return to_cfg_instruction_iterator(
ir_list::InstructionIterator(list_it, this->end()));
}
cfg::InstructionIterator Block::to_cfg_instruction_iterator(
MethodItemEntry& mie) {
always_assert(m_parent->editable());
return to_cfg_instruction_iterator(m_entries.iterator_to(mie));
}
// Forward the insertion methods to the parent CFG.
bool Block::insert_before(const InstructionIterator& position,
const std::vector<IRInstruction*>& insns) {
always_assert(position.block() == this);
return m_parent->insert_before(position, insns);
}
bool Block::insert_before(const InstructionIterator& position,
IRInstruction* insn) {
always_assert(position.block() == this);
return m_parent->insert_before(position, insn);
}
bool Block::insert_after(const InstructionIterator& position,
const std::vector<IRInstruction*>& insns) {
always_assert(position.block() == this);
return m_parent->insert_after(position, insns);
}
bool Block::insert_after(const InstructionIterator& position,
IRInstruction* insn) {
always_assert(position.block() == this);
return m_parent->insert_after(position, insn);
}
bool Block::push_front(const std::vector<IRInstruction*>& insns) {
return m_parent->push_front(this, insns);
}
bool Block::push_front(IRInstruction* insn) {
return m_parent->push_front(this, insn);
}
bool Block::push_back(const std::vector<IRInstruction*>& insns) {
return m_parent->push_back(this, insns);
}
bool Block::push_back(IRInstruction* insn) {
return m_parent->push_back(this, insn);
}
std::ostream& operator<<(std::ostream& os, const Edge& e) {
switch (e.type()) {
case EDGE_GOTO: {
os << "goto";
break;
}
case EDGE_BRANCH: {
os << "branch";
const auto& key = e.case_key();
if (key) {
os << " " << *key;
}
break;
}
case EDGE_THROW: {
os << "throw";
break;
}
default: {
break;
}
}
return os;
}
ControlFlowGraph::ControlFlowGraph(IRList* ir,
uint16_t registers_size,
bool editable)
: m_registers_size(registers_size), m_editable(editable) {
always_assert_log(ir->size() > 0, "IRList contains no instructions");
BranchToTargets branch_to_targets;
TryEnds try_ends;
TryCatches try_catches;
find_block_boundaries(ir, branch_to_targets, try_ends, try_catches);
connect_blocks(branch_to_targets);
add_catch_edges(try_ends, try_catches);
if (m_editable) {
remove_try_catch_markers();
// Often, the `registers_size` parameter passed into this constructor is
// incorrect. We recompute here to safeguard against this.
// TODO: fix the optimizations that don't track registers size correctly.
recompute_registers_size();
TRACE(CFG, 5, "before simplify:\n%s", SHOW(*this));
simplify();
TRACE(CFG, 5, "after simplify:\n%s", SHOW(*this));
} else {
remove_unreachable_succ_edges();
}
TRACE(CFG, 5, "editable %d, %s", m_editable, SHOW(*this));
}
void ControlFlowGraph::find_block_boundaries(IRList* ir,
BranchToTargets& branch_to_targets,
TryEnds& try_ends,
TryCatches& try_catches) {
// create the entry block
auto* block = create_block();
IRList::iterator block_begin;
if (m_editable) {
block_begin = ir->begin();
} else {
block->m_begin = ir->begin();
}
set_entry_block(block);
bool in_try = false;
IRList::iterator next;
DexPosition* current_position = nullptr;
DexPosition* last_pos_before_this_block = nullptr;
for (auto it = ir->begin(); it != ir->end(); it = next) {
next = std::next(it);
if (it->type == MFLOW_TRY) {
if (it->tentry->type == TRY_START) {
// Assumption: TRY_STARTs are only at the beginning of blocks
always_assert(!m_editable || it == block_begin);
always_assert(m_editable || it == block->m_begin);
in_try = true;
} else if (it->tentry->type == TRY_END) {
try_ends.emplace_back(it->tentry, block);
in_try = false;
}
} else if (it->type == MFLOW_CATCH) {
try_catches[it->centry] = block;
} else if (it->type == MFLOW_TARGET) {
branch_to_targets[it->target->src].push_back(block);
} else if (it->type == MFLOW_POSITION) {
current_position = it->pos.get();
}
if (!end_of_block(ir, it, in_try)) {
continue;
}
// End the current block.
if (m_editable) {
// Steal the code from the ir and put it into the block.
// This is safe to do while iterating in ir because iterators in ir now
// point to elements of block->m_entries (and we already computed next).
block->m_entries.splice_selection(block->m_entries.end(), *ir,
block_begin, next);
if (last_pos_before_this_block != nullptr) {
auto first_insn = insn_before_position(block);
if (first_insn != block->end()) {
// DexPositions apply to every instruction in the linear stream until
// the next DexPosition. Because we're breaking up the linear stream
// into many small blocks, we need to make sure that instructions stay
// associated with the same DexPosition as they were in the input
// IRList.
//
// This creates duplicate positions, but we will remove any extras at
// linearize time.
block->m_entries.insert_before(
first_insn,
std::make_unique<DexPosition>(*last_pos_before_this_block));
}
}
} else {
block->m_end = next;
}
if (next == ir->end()) {
break;
}
// Start a new block at the next MethodItem.
block = create_block();
if (m_editable) {
last_pos_before_this_block = current_position;
block_begin = next;
} else {
block->m_begin = next;
}
}
TRACE(CFG, 5, " build: boundaries found");
}
// Link the blocks together with edges. If the CFG is editable, also insert
// fallthrough goto instructions and delete MFLOW_TARGETs.
void ControlFlowGraph::connect_blocks(BranchToTargets& branch_to_targets) {
for (auto it = m_blocks.begin(); it != m_blocks.end(); ++it) {
// Set outgoing edge if last MIE falls through
Block* b = it->second;
auto& last_mie = *b->rbegin();
bool fallthrough = true;
if (last_mie.type == MFLOW_OPCODE) {
auto last_op = last_mie.insn->opcode();
if (is_branch(last_op)) {
fallthrough = !is_goto(last_op);
auto const& target_blocks = branch_to_targets[&last_mie];
for (auto target_block : target_blocks) {
if (m_editable) {
// The the branch information is stored in the edges, we don't need
// the targets inside the blocks anymore
auto case_key =
target_block->remove_first_matching_target(&last_mie);
if (case_key != boost::none) {
add_edge(b, target_block, *case_key);
continue;
}
}
auto edge_type = is_goto(last_op) ? EDGE_GOTO : EDGE_BRANCH;
add_edge(b, target_block, edge_type);
}
if (m_editable && is_goto(last_op)) {
// We don't need the gotos in editable mode because the edges
// fully encode that information
b->m_entries.erase_and_dispose(b->m_entries.iterator_to(last_mie));
}
} else if (is_return(last_op) || last_op == OPCODE_THROW) {
fallthrough = false;
}
}
auto next = std::next(it);
Block* next_b = next->second;
if (fallthrough && next != m_blocks.end()) {
TRACE(CFG, 6, "adding fallthrough goto %d -> %d", b->id(),
next_b->id());
add_edge(b, next_b, EDGE_GOTO);
}
}
TRACE(CFG, 5, " build: edges added");
}
void ControlFlowGraph::add_catch_edges(TryEnds& try_ends,
TryCatches& try_catches) {
/*
* Every block inside a try-start/try-end region
* gets an edge to every catch block. This simplifies dataflow analysis
* since you can always get the exception state by looking at successors,
* without any additional analysis.
*
* NB: This algorithm assumes that a try-start/try-end region will consist of
* sequentially-numbered blocks, which is guaranteed because catch regions
* are contiguous in the bytecode, and we generate blocks in bytecode order.
*/
for (auto tep : try_ends) {
auto try_end = tep.first;
auto tryendblock = tep.second;
size_t bid = tryendblock->id();
while (true) {
Block* block = m_blocks.at(bid);
if (ends_with_may_throw(block)) {
uint32_t i = 0;
for (auto mie = try_end->catch_start; mie != nullptr;
mie = mie->centry->next) {
auto catchblock = try_catches.at(mie->centry);
// Create a throw edge with the information from this catch entry
add_edge(block, catchblock, mie->centry->catch_type, i);
++i;
}
}
auto block_begin = block->begin();
if (block_begin != block->end() && block_begin->type == MFLOW_TRY) {
auto tentry = block_begin->tentry;
if (tentry->type == TRY_START) {
always_assert_log(tentry->catch_start == try_end->catch_start, "%s",
SHOW(*this));
break;
}
}
always_assert_log(bid > 0, "No beginning of try region found");
--bid;
}
}
TRACE(CFG, 5, " build: catch edges added");
}
BlockId ControlFlowGraph::next_block_id() const {
// Choose the next largest id. Note that we can't use m_block.size() because
// we may have deleted some blocks from the cfg.
const auto& rbegin = m_blocks.rbegin();
return (rbegin == m_blocks.rend()) ? 0 : (rbegin->first + 1);
}
void ControlFlowGraph::remove_unreachable_succ_edges() {
// Remove edges between unreachable blocks and their succ blocks.
if (m_blocks.empty()) {
return;
}
const auto& visited = visit();
if (visited.all()) {
// All blocks are visited. No blocks need to have their succ edges removed.
return;
}
for (auto it = m_blocks.begin(); it != m_blocks.end(); ++it) {
Block* b = it->second;
if (visited.test(b->id())) {
continue;
}
TRACE(CFG, 5, " build: removing succ edges from block %d", b->id());
delete_succ_edges(b);
}
TRACE(CFG, 5, " build: unreachables removed");
}
/*
* Traverse the graph, starting from the entry node. Return a bitset with IDs of
* reachable blocks having 1 and IDs of unreachable blocks (or unused IDs)
* having 0.
*/
boost::dynamic_bitset<> ControlFlowGraph::visit() const {
std::stack<const cfg::Block*> to_visit;
boost::dynamic_bitset<> visited{next_block_id()};
to_visit.push(entry_block());
while (!to_visit.empty()) {
const cfg::Block* b = to_visit.top();
to_visit.pop();
if (visited.test_set(b->id())) {
continue;
}
for (Edge* e : b->succs()) {
to_visit.push(e->target());
}
}
return visited;
}
void ControlFlowGraph::simplify() {
remove_unreachable_blocks();
remove_empty_blocks();
}
// remove blocks with no predecessors
uint32_t ControlFlowGraph::remove_unreachable_blocks() {
uint32_t num_insns_removed = 0;
remove_unreachable_succ_edges();
std::unordered_set<DexPosition*> deleted_positions;
bool need_register_size_fix = false;
for (auto it = m_blocks.begin(); it != m_blocks.end();) {
Block* b = it->second;
const auto& preds = b->preds();
if (preds.empty() && b != entry_block()) {
for (const auto& mie : *b) {
if (mie.type == MFLOW_POSITION) {
deleted_positions.insert(mie.pos.get());
} else if (mie.type == MFLOW_OPCODE) {
auto insn = mie.insn;
if (insn->dests_size()) {
// +1 because registers start at zero
auto size_required = insn->dest() + insn->dest_is_wide() + 1;
if (size_required >= m_registers_size) {
// We're deleting an instruction that may have been the max
// register of the entire function.
need_register_size_fix = true;
}
}
}
}
num_insns_removed += b->num_opcodes();
always_assert(b->succs().empty());
always_assert(b->preds().empty());
delete b;
it = m_blocks.erase(it);
} else {
++it;
}
}
if (need_register_size_fix) {
recompute_registers_size();
}
remove_dangling_parents(deleted_positions);
return num_insns_removed;
}
void ControlFlowGraph::remove_dangling_parents(
const std::unordered_set<DexPosition*>& deleted_positions) {
// We don't want to leave any dangling dex parent pointers behind
if (!deleted_positions.empty()) {
for (const auto& entry : m_blocks) {
for (const auto& mie : *entry.second) {
if (mie.type == MFLOW_POSITION && mie.pos->parent != nullptr &&
deleted_positions.count(mie.pos->parent)) {
mie.pos->parent = nullptr;
}
}
}
}
}
void ControlFlowGraph::remove_empty_blocks() {
always_assert(editable());
std::unordered_set<DexPosition*> deleted_positions;
for (auto it = m_blocks.begin(); it != m_blocks.end();) {
Block* b = it->second;
if (!is_effectively_empty(b) || b == exit_block()) {
++it;
continue;
}
const auto& succs = get_succ_edges_if(
b, [](const Edge* e) { return e->type() != EDGE_GHOST; });
if (succs.size() > 0) {
always_assert_log(succs.size() == 1,
"too many successors for empty block %d:\n%s",
it->first, SHOW(*this));
const auto& succ_edge = succs[0];
Block* succ = succ_edge->target();
if (b == succ) { // `b` follows itself: an infinite loop
++it;
continue;
}
// b is empty. Reorganize the edges so we can remove it
// Remove the one goto edge from b to succ
delete_edges_between(b, succ);
// If b was a predecessor of the exit block (for example, part of an
// infinite loop) we need to transfer that info to `succ` because `b` will
// be made unreachable and deleted by simplify
auto ghost = get_succ_edge_of_type(b, EDGE_GHOST);
if (ghost != nullptr) {
set_edge_source(ghost, succ);
}
// Redirect from b's predecessors to b's successor (skipping b). We
// can't move edges around while we iterate through the edge list
// though.
std::vector<Edge*> need_redirect(b->m_preds.begin(), b->m_preds.end());
for (Edge* pred_edge : need_redirect) {
set_edge_target(pred_edge, succ);
}
if (b == entry_block()) {
m_entry_block = succ;
}
}
for (const auto& mie : *b) {
if (mie.type == MFLOW_POSITION) {
deleted_positions.insert(mie.pos.get());
}
}
delete b;
it = m_blocks.erase(it);
}
remove_dangling_parents(deleted_positions);
}
void ControlFlowGraph::no_unreferenced_edges() const {
EdgeSet referenced;
for (const auto& entry : m_blocks) {
Block* b = entry.second;
for (Edge* e : b->preds()) {
referenced.insert(e);
}
for (Edge* e : b->succs()) {
referenced.insert(e);
}
}
always_assert(referenced == m_edges);
}
// Verify that
// * MFLOW_TARGETs are gone
// * OPCODE_GOTOs are gone
// * Correct number of outgoing edges
void ControlFlowGraph::sanity_check() const {
if (m_editable) {
for (const auto& entry : m_blocks) {
Block* b = entry.second;
if (DEBUG) {
// No targets or gotos
for (const auto& mie : *b) {
always_assert_log(mie.type != MFLOW_TARGET,
"failed to remove all targets. block %d in\n%s",
b->id(), SHOW(*this));
if (mie.type == MFLOW_OPCODE) {
always_assert_log(!is_goto(mie.insn->opcode()),
"failed to remove all gotos. block %d in\n%s",
b->id(), SHOW(*this));
}
}
}
// Last instruction matches outgoing edges
auto num_goto_succs = get_succ_edges_of_type(b, EDGE_GOTO).size();
auto last_it = b->get_last_insn();
auto num_preds = b->preds().size();
auto num_succs =
get_succ_edges_if(
b, [](const Edge* e) { return e->type() != EDGE_GHOST; })
.size();
if (last_it != b->end()) {
auto op = last_it->insn->opcode();
if (is_conditional_branch(op)) {
always_assert_log(num_succs == 2, "block %d, %s", b->id(),
SHOW(*this));
} else if (is_switch(op)) {
always_assert_log(num_succs > 1, "block %d, %s", b->id(),
SHOW(*this));
} else if (is_return(op)) {
// Make sure we don't have any outgoing edges (except EDGE_GHOST)
always_assert_log(num_succs == 0, "block %d, %s", b->id(),
SHOW(*this));
} else if (is_throw(op)) {
// A throw could end the method or go to a catch handler.
// Make sure this block has no outgoing non-throwing edges
auto non_throw_edge = get_succ_edge_if(b, [](const Edge* e) {
return e->type() != EDGE_THROW && e->type() != EDGE_GHOST;
});
always_assert_log(non_throw_edge == nullptr, "block %d, %s", b->id(),
SHOW(*this));
}
if (num_preds > 0 && !(is_return(op) || is_throw(op))) {
// Control Flow shouldn't just fall off the end of a block, unless
// it's an orphan block that's unreachable anyway
always_assert_log(num_succs > 0, "block %d, %s", b->id(),
SHOW(*this));
always_assert_log(num_goto_succs == 1, "block %d, %s", b->id(),
SHOW(*this));
}
} else if (num_preds > 0 && b != exit_block()) {
// no instructions in this block. Control Flow shouldn't just fall off
// the end
always_assert_log(num_succs > 0, "block %d, %s", b->id(), SHOW(*this));
always_assert_log(num_goto_succs == 1, "block %d, %s", b->id(),
SHOW(*this));
}
always_assert_log(num_goto_succs < 2, "block %d, %s", b->id(),
SHOW(*this));
}
}
for (const auto& entry : m_blocks) {
Block* b = entry.second;
// make sure the edge list in both blocks agree
for (const auto e : b->succs()) {
const auto& reverse_edges = e->target()->preds();
always_assert_log(std::find(reverse_edges.begin(), reverse_edges.end(),
e) != reverse_edges.end(),
"block %d -> %d, %s", b->id(), e->target()->id(),
SHOW(*this));
}
for (const auto e : b->preds()) {
const auto& forward_edges = e->src()->succs();
always_assert_log(std::find(forward_edges.begin(), forward_edges.end(),
e) != forward_edges.end(),
"block %d -> %d, %s", e->src()->id(), b->id(),
SHOW(*this));
}
const auto& throws = b->get_outgoing_throws_in_order();
bool last = true;
// Only the last throw edge can have a null catch type.
for (auto it = throws.rbegin(); it != throws.rend(); ++it) {
Edge* e = *it;
if (!last) {
always_assert_log(
e->m_throw_info->catch_type != nullptr,
"Can't have a catchall (%d -> %d) that isn't last. %s",
e->src()->id(), e->target()->id(), SHOW(*this));
}
last = false;
}
}
if (m_editable) {
auto used_regs = compute_registers_size();
always_assert_log(used_regs <= m_registers_size,
"used regs %d > registers size %d. %s", used_regs,
m_registers_size, SHOW(*this));
}
no_dangling_dex_positions();
if (DEBUG) {
no_unreferenced_edges();
}
}
uint16_t ControlFlowGraph::compute_registers_size() const {
uint16_t num_regs = 0;
for (const auto& mie : cfg::ConstInstructionIterable(*this)) {
auto insn = mie.insn;
if (insn->dests_size()) {
// +1 because registers start at v0
uint16_t size_required = insn->dest() + insn->dest_is_wide() + 1;
num_regs = std::max(size_required, num_regs);
}
}
// We don't check the source registers because we shouldn't ever be using an
// undefined register. If the input code is well-formed, there shouldn't be a
// source register without an equivalent dest register. This is true for our
// IR because of the load-param opcodes.
return num_regs;
}
void ControlFlowGraph::recompute_registers_size() {
m_registers_size = compute_registers_size();
}
void ControlFlowGraph::no_dangling_dex_positions() const {
std::unordered_map<DexPosition*, bool> parents;
for (const auto& entry : m_blocks) {
Block* b = entry.second;
for (const auto& mie : *b) {
if (mie.type == MFLOW_POSITION && mie.pos->parent != nullptr) {
parents.emplace(mie.pos->parent, false);
}
}
}
for (const auto& entry : m_blocks) {
Block* b = entry.second;
for (const auto& mie : *b) {
if (mie.type == MFLOW_POSITION) {
auto search = parents.find(mie.pos.get());
if (search != parents.end()) {
search->second = true;
}
}
}
}
for (const auto& entry : parents) {
always_assert_log(entry.second, "%lu is a dangling parent pointer in %s",
entry.first, SHOW(*this));
}
}
uint32_t ControlFlowGraph::num_opcodes() const {
uint32_t result = 0;
for (const auto& entry : m_blocks) {
result += entry.second->num_opcodes();
}
return result;
}
uint32_t ControlFlowGraph::sum_opcode_sizes() const {
uint32_t result = 0;
for (const auto& entry : m_blocks) {
result += entry.second->sum_opcode_sizes();
}
return result;
}
boost::sub_range<IRList> ControlFlowGraph::get_param_instructions() {
// Find the first block that has instructions
Block* block = entry_block();
while (block->get_first_insn() == block->end()) {
const auto& succs = block->succs();
always_assert(succs.size() == 1);
const auto& out = succs[0];
always_assert(out->type() == EDGE_GOTO);
block = out->target();
}
return block->m_entries.get_param_instructions();
}
void ControlFlowGraph::gather_catch_types(std::vector<DexType*>& types) const {
always_assert(editable());
std::unordered_set<DexType*> seen;
// get the catch types of all the incoming edges to all the catch blocks
for (const auto& entry : m_blocks) {
const Block* b = entry.second;
if (b->is_catch()) {
for (const cfg::Edge* e : b->preds()) {
if (e->type() == cfg::EDGE_THROW) {
DexType* t = e->throw_info()->catch_type;
const auto pair = seen.insert(t);
bool insertion_occured = pair.second;
if (insertion_occured) {
types.push_back(t);
}
}
}
}
}
}
void ControlFlowGraph::gather_strings(std::vector<DexString*>& strings) const {
always_assert(editable());
for (const auto& entry : m_blocks) {
entry.second->m_entries.gather_strings(strings);
}
}
void ControlFlowGraph::gather_types(std::vector<DexType*>& types) const {
always_assert(editable());
gather_catch_types(types);
for (const auto& entry : m_blocks) {
entry.second->m_entries.gather_types(types);
}
}
void ControlFlowGraph::gather_fields(std::vector<DexFieldRef*>& fields) const {
always_assert(editable());
for (const auto& entry : m_blocks) {
entry.second->m_entries.gather_fields(fields);
}
}
void ControlFlowGraph::gather_methods(
std::vector<DexMethodRef*>& methods) const {
always_assert(editable());
for (const auto& entry : m_blocks) {
entry.second->m_entries.gather_methods(methods);
}
}
cfg::InstructionIterator ControlFlowGraph::primary_instruction_of_move_result(
const cfg::InstructionIterator& it) {
auto move_result_insn = it->insn;
always_assert(
opcode::is_move_result_or_move_result_pseudo(move_result_insn->opcode()));
auto block = const_cast<Block*>(it.block());
if (block->get_first_insn()->insn == move_result_insn) {
auto& preds = block->preds();
always_assert(preds.size() == 1);
auto previous_block = preds.front()->src();
auto res = previous_block->to_cfg_instruction_iterator(
previous_block->get_last_insn());
auto insn = res->insn;
always_assert(insn->has_move_result() || insn->has_move_result_pseudo());
return res;
} else {
auto res = std::prev(it.unwrap());
auto insn = res->insn;
always_assert(insn->has_move_result() || insn->has_move_result_pseudo());
return block->to_cfg_instruction_iterator(res);
}
}
cfg::InstructionIterator ControlFlowGraph::move_result_of(
const cfg::InstructionIterator& it) {
auto next_insn = std::next(it);
auto end = cfg::InstructionIterable(*this).end();
if (next_insn != end && it.block() == next_insn.block()) {
// The easy case where the move result is in the same block
auto op = next_insn->insn->opcode();
if (opcode::is_move_result_pseudo(op) || is_move_result(op)) {
always_assert(primary_instruction_of_move_result(next_insn) == it);
return next_insn;
}
} else {
auto next_block = it.block()->goes_to();
if (next_block != nullptr && next_block->starts_with_move_result()) {
next_insn =
next_block->to_cfg_instruction_iterator(next_block->get_first_insn());
always_assert(primary_instruction_of_move_result(next_insn) == it);
return next_insn;
}
}
return end;
}
/*
* fill `new_cfg` with a copy of `this`
*/
void ControlFlowGraph::deep_copy(ControlFlowGraph* new_cfg) const {
always_assert(editable());
new_cfg->m_editable = true;
new_cfg->set_registers_size(this->get_registers_size());
std::unordered_map<const Edge*, Edge*> old_edge_to_new;
size_t num_edges = this->m_edges.size();
new_cfg->m_edges.reserve(num_edges);
old_edge_to_new.reserve(num_edges);
for (const Edge* old_edge : this->m_edges) {
// this shallowly copies block pointers inside, then we patch them later
Edge* new_edge = new Edge(*old_edge);
new_cfg->m_edges.insert(new_edge);
old_edge_to_new.emplace(old_edge, new_edge);
}
// copy the code itself
MethodItemEntryCloner cloner;
for (const auto& entry : this->m_blocks) {
const Block* block = entry.second;
// this shallowly copies edge pointers inside, then we patch them later
Block* new_block = new Block(*block, &cloner);
new_block->m_parent = new_cfg;
new_cfg->m_blocks.emplace(new_block->id(), new_block);
}
// We need a second pass because parent position pointers may refer to
// positions in a block that would be processed later.
cloner.fix_parent_positions();
// patch the edge pointers in the blocks to their new cfg counterparts
for (auto& entry : new_cfg->m_blocks) {
Block* b = entry.second;
for (Edge*& e : b->m_preds) {
e = old_edge_to_new.at(e);
}
for (Edge*& e : b->m_succs) {
e = old_edge_to_new.at(e);
}
}
// patch the block pointers in the edges to their new cfg counterparts
for (Edge* e : new_cfg->m_edges) {
e->m_src = new_cfg->m_blocks.at(e->m_src->id());
e->m_target = new_cfg->m_blocks.at(e->m_target->id());
}
// update the entry and exit block pointers to their new cfg counterparts
new_cfg->m_entry_block = new_cfg->m_blocks.at(this->m_entry_block->id());
if (this->m_exit_block != nullptr) {
new_cfg->m_exit_block = new_cfg->m_blocks.at(this->m_exit_block->id());
}
}
InstructionIterator ControlFlowGraph::find_insn(IRInstruction* needle,
Block* hint) {
if (hint != nullptr) {
auto ii = ir_list::InstructionIterable(hint);
for (auto it = ii.begin(); it != ii.end(); ++it) {
if (it->insn == needle) {
return hint->to_cfg_instruction_iterator(it);
}
}
}
auto iterable = InstructionIterable(*this);
for (auto it = iterable.begin(); it != iterable.end(); ++it) {
if (it->insn == needle) {
return it;
}
}
return iterable.end();
}
std::vector<Block*> ControlFlowGraph::order() {
// We must simplify first to remove any unreachable blocks
simplify();
// This is a modified Weak Topological Ordering (WTO). We create "chains" of
// blocks that will be kept together, then feed these chains to WTO for it to
// choose the ordering of the chains. Then, we deconstruct the chains to get
// an ordering of the blocks.
// hold the chains of blocks here, though they mostly will be accessed via the
// map
std::vector<std::unique_ptr<Chain>> chains;
// keep track of which blocks are in each chain, for quick lookup.
std::unordered_map<Block*, Chain*> block_to_chain;
block_to_chain.reserve(m_blocks.size());
build_chains(&chains, &block_to_chain);
const auto& result = wto_chains(block_to_chain);
always_assert_log(result.size() == m_blocks.size(),
"result has %lu blocks, m_blocks has %lu", result.size(),
m_blocks.size());
return result;
}
void ControlFlowGraph::build_chains(
std::vector<std::unique_ptr<Chain>>* chains,
std::unordered_map<Block*, Chain*>* block_to_chain) {
for (const auto& entry : m_blocks) {
Block* b = entry.second;
if (block_to_chain->count(b) != 0) {
continue;
}
always_assert_log(!DEBUG || !b->starts_with_move_result(), "%d is wrong %s",
b->id(), SHOW(*this));
auto unique = std::make_unique<Chain>();
Chain* chain = unique.get();
chains->push_back(std::move(unique));
chain->push_back(b);
block_to_chain->emplace(b, chain);
auto goto_edge = get_succ_edge_of_type(b, EDGE_GOTO);
while (goto_edge != nullptr) {
// make sure we handle a chain of blocks that all start with move-results
auto goto_block = goto_edge->target();
always_assert_log(!DEBUG || m_blocks.count(goto_block->id()) > 0,
"bogus block reference %d -> %d in %s",
goto_edge->src()->id(), goto_block->id(), SHOW(*this));
if (goto_block->starts_with_move_result() || goto_block->same_try(b)) {
// If the goto edge leads to a block with a move-result(-pseudo), then
// that block must be placed immediately after this one because we can't
// insert anything between an instruction and its move-result(-pseudo).
//
// We also add gotos that are in the same try because we can minimize
// instructions (by using fallthroughs) without adding another try
// region. This is not required, but empirical evidence shows that it
// generates smaller dex files.
const auto& pair = block_to_chain->emplace(goto_block, chain);
bool was_already_there = !pair.second;
if (was_already_there) {
break;
}
chain->push_back(goto_block);
goto_edge = get_succ_edge_of_type(goto_block, EDGE_GOTO);
} else {
break;
}
}
}
}
std::vector<Block*> ControlFlowGraph::wto_chains(
const std::unordered_map<Block*, Chain*>& block_to_chain) {
sparta::WeakTopologicalOrdering<Chain*> wto(
block_to_chain.at(entry_block()), [&block_to_chain](Chain* const& chain) {
// The chain successor function returns all the outgoing edges' target
// chains. Where outgoing means that the edge does not go to this chain.
//
// FIXME: this algorithm ignores real infinite loops in the block graph
std::vector<Chain*> result;
result.reserve(chain->size());
// TODO: Sort the outputs by edge type, case key, and throw index
// * We may be able to use fewer debug positions if we emit case blocks
// in the original order.
// * Right now, it seems the switches are being output in reverse
// order, which is annoying for writing tests.
const auto& end = chain->end();
for (auto it = chain->begin(); it != end;) {
Block* b = *it;
const auto& next_it = std::next(it);
Block* next = (next_it == end) ? nullptr : *next_it;
for (Edge* e : b->succs()) {
if (e->target() == next) {
// The most common intra-chain edge is a GOTO to the very next
// block. Let's cheaply detect this case and filter it early,
// before we have to do an expensive map lookup.
continue;
}
const auto& succ_chain = block_to_chain.at(e->target());
// Filter out any edges within this chain. We don't want to
// erroneously create infinite loops in the chain graph that don't
// exist in the block graph.
if (succ_chain != chain) {
result.push_back(succ_chain);
}
}
it = next_it;
}
return result;
});
// recursively iterate through the wto order and collect the blocks here
// This is a depth first traversal. TODO: would breadth first be better?
std::vector<Block*> wto_order;
std::function<void(const sparta::WtoComponent<Chain*>&)> get_order;
get_order = [&get_order, &wto_order](const sparta::WtoComponent<Chain*>& v) {
for (Block* b : *v.head_node()) {
wto_order.push_back(b);
}
if (v.is_scc()) {
for (const auto& inner : v) {
get_order(inner);
}
}
};
for (const auto& v : wto) {
get_order(v);
}
return wto_order;
}
// Add an MFLOW_TARGET at the end of each edge.
// Insert GOTOs where necessary.
void ControlFlowGraph::insert_branches_and_targets(
const std::vector<Block*>& ordering) {
for (auto it = ordering.begin(); it != ordering.end(); ++it) {
Block* b = *it;
for (const Edge* edge : b->succs()) {
if (edge->type() == EDGE_BRANCH) {
auto branch_it = b->get_conditional_branch();
always_assert_log(branch_it != b->end(), "block %d %s", b->id(),
SHOW(*this));
auto& branch_mie = *branch_it;
BranchTarget* bt =
edge->m_case_key != boost::none
? new BranchTarget(&branch_mie, *edge->m_case_key)
: new BranchTarget(&branch_mie);
auto target_mie = new MethodItemEntry(bt);
edge->target()->m_entries.push_front(*target_mie);
} else if (edge->type() == EDGE_GOTO) {
auto next_it = std::next(it);
if (next_it != ordering.end()) {
Block* next = *next_it;
if (edge->target() == next) {
// Don't need a goto because this will fall through to `next`
continue;
}
}
auto branch_mie = new MethodItemEntry(new IRInstruction(OPCODE_GOTO));
auto target_mie = new MethodItemEntry(new BranchTarget(branch_mie));
edge->src()->m_entries.push_back(*branch_mie);
edge->target()->m_entries.push_front(*target_mie);
}
}
}
}
// remove all try and catch markers because we may reorder the blocks
void ControlFlowGraph::remove_try_catch_markers() {
always_assert(m_editable);
for (const auto& entry : m_blocks) {
Block* b = entry.second;
b->m_entries.remove_and_dispose_if([](const MethodItemEntry& mie) {
return mie.type == MFLOW_TRY || mie.type == MFLOW_CATCH;
});
}
}
IRList* ControlFlowGraph::linearize() {
always_assert(m_editable);
sanity_check();
IRList* result = new IRList;
TRACE(CFG, 5, "before linearize:\n%s", SHOW(*this));
const std::vector<Block*>& ordering = order();
insert_branches_and_targets(ordering);
insert_try_catch_markers(ordering);
for (Block* b : ordering) {
result->splice(result->end(), b->m_entries);
}
remove_duplicate_positions(result);
return result;
}
void ControlFlowGraph::insert_try_catch_markers(
const std::vector<Block*>& ordering) {
// add back the TRY START, TRY_ENDS, and, MFLOW_CATCHes
const auto& insert_try_marker_between =
[this](Block* prev, MethodItemEntry* new_try_marker, Block* b) {
auto first_it = b->get_first_insn();
if (first_it != b->end() &&
opcode::is_move_result_pseudo(first_it->insn->opcode())) {
// Make sure we don't split up a move-result-pseudo and its primary
// instruction by placing the marker after the move-result-pseudo
//
// TODO: relax the constraint that move-result-pseudo must be
// immediately after its partner, allowing non-opcode
// MethodItemEntries between
b->m_entries.insert_after(first_it, *new_try_marker);
} else if (new_try_marker->tentry->type == TRY_START) {
if (prev == nullptr && b == entry_block()) {
// Parameter loading instructions come before a TRY_START
auto params = b->m_entries.get_param_instructions();
b->m_entries.insert_before(params.end(), *new_try_marker);
} else {
// TRY_START belongs at the front of a block
b->m_entries.push_front(*new_try_marker);
}
} else {
// TRY_END belongs at the end of a block
prev->m_entries.push_back(*new_try_marker);
}
};
std::unordered_map<MethodItemEntry*, Block*> catch_to_containing_block;
Block* prev = nullptr;
MethodItemEntry* active_catch = nullptr;
for (auto it = ordering.begin(); it != ordering.end(); prev = *(it++)) {
Block* b = *it;
MethodItemEntry* new_catch = create_catch(b, &catch_to_containing_block);
if (new_catch == nullptr && cannot_throw(b) && !b->is_catch()) {
// Generate fewer try regions by merging blocks that cannot throw into the
// previous try region.
//
// But, we have to be careful to not include the catch block of this try
// region, which would create invalid Dex Try entries. For any given try
// region, none of its catches may be inside that region.
continue;
}
if (active_catch != new_catch) {
// If we're switching try regions between these blocks, the TRY_END must
// come first then the TRY_START. We insert the TRY_START earlier because
// we're using `insert_after` which inserts things in reverse order
if (new_catch != nullptr) {
// Start a new try region before b
auto new_start = new MethodItemEntry(TRY_START, new_catch);
insert_try_marker_between(prev, new_start, b);
}
if (active_catch != nullptr) {
// End the current try region before b
auto new_end = new MethodItemEntry(TRY_END, active_catch);
insert_try_marker_between(prev, new_end, b);
}
active_catch = new_catch;
}
}
if (active_catch != nullptr) {
always_assert_log(active_catch->centry->next != active_catch,
"Invalid cycle: %s", SHOW(active_catch));
ordering.back()->m_entries.push_back(
*new MethodItemEntry(TRY_END, active_catch));
}
}
MethodItemEntry* ControlFlowGraph::create_catch(
Block* block,
std::unordered_map<MethodItemEntry*, Block*>* catch_to_containing_block) {
always_assert(m_editable);
using EdgeVector = std::vector<Edge*>;
EdgeVector throws = get_succ_edges_of_type(block, EDGE_THROW);
if (throws.empty()) {
// No need to create a catch if there are no throws
return nullptr;
}
std::sort(throws.begin(), throws.end(), [](const Edge* e1, const Edge* e2) {
return e1->m_throw_info->index < e2->m_throw_info->index;
});
const auto& throws_end = throws.end();
// recurse through `throws` adding catch entries to blocks at the ends of
// throw edges and connecting the catch entry `next` pointers according to the
// throw edge indices.
//
// We stop early if we find find an equivalent linked list of catch entries
std::function<MethodItemEntry*(const EdgeVector::iterator&)> add_catch;
add_catch = [this, &add_catch, &throws_end, catch_to_containing_block](
const EdgeVector::iterator& it) -> MethodItemEntry* {
if (it == throws_end) {
return nullptr;
}
auto edge = *it;
auto catch_block = edge->target();
for (auto& mie : *catch_block) {
// Is there already a catch here that's equivalent to the catch we would
// create?
if (mie.type == MFLOW_CATCH &&
catch_entries_equivalent_to_throw_edges(&mie, it, throws_end,
*catch_to_containing_block)) {
// The linked list of catch entries starting at `mie` is equivalent to
// the rest of `throws` from `it` to `end`. So we don't need to create
// another one, use the existing list.
return &mie;
}
}
// We recurse and find the next catch before creating this catch because
// otherwise, we could create a cycle of the catch entries.
MethodItemEntry* next = add_catch(std::next(it));
// create a new catch entry and insert it into the bytecode
auto new_catch = new MethodItemEntry(edge->m_throw_info->catch_type);
new_catch->centry->next = next;
catch_block->m_entries.push_front(*new_catch);
catch_to_containing_block->emplace(new_catch, catch_block);
return new_catch;
};
return add_catch(throws.begin());
}
// Follow the catch entry linked list starting at `first_mie` and check if the
// throw edges (pointed to by `it`) are equivalent to the linked list. The throw
// edges should be sorted by their indices.
//
// This function is useful in avoiding generating multiple identical catch
// entries
bool ControlFlowGraph::catch_entries_equivalent_to_throw_edges(
MethodItemEntry* first_mie,
std::vector<Edge*>::iterator it,
std::vector<Edge*>::iterator end,
const std::unordered_map<MethodItemEntry*, Block*>&
catch_to_containing_block) {
for (auto mie = first_mie; mie != nullptr; mie = mie->centry->next) {
always_assert(mie->type == MFLOW_CATCH);
if (it == end) {
return false;
}
auto edge = *it;
if (mie->centry->catch_type != edge->m_throw_info->catch_type) {
return false;
}
const auto& search = catch_to_containing_block.find(mie);
always_assert_log(search != catch_to_containing_block.end(),
"%s not found in %s", SHOW(*mie), SHOW(*this));
if (search->second != edge->target()) {
return false;
}
++it;
}
return it == end;
}
std::vector<Block*> ControlFlowGraph::blocks() const {
std::vector<Block*> result;
result.reserve(m_blocks.size());
for (const auto& entry : m_blocks) {
Block* b = entry.second;
result.emplace_back(b);
}
return result;
}
// Uses a standard depth-first search ith a side table of already-visited nodes.
std::vector<Block*> ControlFlowGraph::blocks_post_helper(bool reverse) const {
std::stack<Block*> stack;
for (const auto& entry : m_blocks) {
// include unreachable blocks too
Block* b = entry.second;
if (b != entry_block() && b->preds().empty()) {
stack.push(b);
}
}
stack.push(entry_block());
std::vector<Block*> postorder;
postorder.reserve(m_blocks.size());
std::unordered_set<Block*> visited;
visited.reserve(m_blocks.size());
while (!stack.empty()) {
const auto& curr = stack.top();
visited.insert(curr);
bool all_succs_visited = [&] {
for (auto const& s : curr->succs()) {
if (!visited.count(s->target())) {
stack.push(s->target());
return false;
}
}
return true;
}();
if (all_succs_visited) {
redex_assert(curr == stack.top());
postorder.push_back(curr);
stack.pop();
}
}
if (reverse) {
std::reverse(postorder.begin(), postorder.end());
}
return postorder;
}
std::vector<Block*> ControlFlowGraph::blocks_reverse_post() const {
return blocks_post_helper(true);
}
std::vector<Block*> ControlFlowGraph::blocks_post() const {
return blocks_post_helper(false);
}
ControlFlowGraph::~ControlFlowGraph() {
for (const auto& entry : m_blocks) {
Block* b = entry.second;
delete b;
}
for (Edge* e : m_edges) {
delete e;
}
}
Block* ControlFlowGraph::create_block() {
size_t id = next_block_id();
Block* b = new Block(this, id);
m_blocks.emplace(id, b);
return b;
}
Block* ControlFlowGraph::duplicate_block(Block* original) {
Block* copy = create_block();
MethodItemEntryCloner cloner;
for (const auto& mie : *original) {
copy->m_entries.push_back(*cloner.clone(&mie));
}
return copy;
}
// We create a small class here (instead of a recursive lambda) so we can
// label visit with NO_SANITIZE_ADDRESS
class ExitBlocks {
private:
uint32_t next_dfn{0};
std::stack<const Block*> stack;
// Depth-first number. Special values:
// 0 - unvisited
// UINT32_MAX - visited and determined to be in a separate SCC
std::unordered_map<const Block*, uint32_t> dfns;
static constexpr uint32_t VISITED = std::numeric_limits<uint32_t>::max();
// This is basically Tarjan's algorithm for finding SCCs. I pass around an
// extra has_exit value to determine if a given SCC has any successors.
using t = std::pair<uint32_t, bool>;
public:
std::vector<Block*> exit_blocks;
NO_SANITIZE_ADDRESS // because of deep recursion. ASAN uses too much memory.
t
visit(const Block* b) {
stack.push(b);
uint32_t head = dfns[b] = ++next_dfn;
// whether any vertex in the current SCC has a successor edge that points
// outside itself
bool has_exit{false};
for (auto& succ : b->succs()) {
uint32_t succ_dfn = dfns[succ->target()];
uint32_t min;
if (succ_dfn == 0) {
bool succ_has_exit;
std::tie(min, succ_has_exit) = visit(succ->target());
has_exit |= succ_has_exit;
} else {
has_exit |= succ_dfn == VISITED;
min = succ_dfn;
}
head = std::min(min, head);
}
if (head == dfns[b]) {
const Block* top{nullptr};
if (!has_exit) {
exit_blocks.push_back(const_cast<Block*>(b));
has_exit = true;
}
do {
top = stack.top();
stack.pop();
dfns[top] = VISITED;
} while (top != b);
}
return t(head, has_exit);
}
};
std::vector<Block*> ControlFlowGraph::real_exit_blocks(
bool include_infinite_loops) {
std::vector<Block*> result;
if (m_exit_block != nullptr && include_infinite_loops) {
auto ghosts = get_pred_edges_of_type(m_exit_block, EDGE_GHOST);
if (!ghosts.empty()) {
// The exit block is a ghost block, ignore it and get the real exit
// points.
for (auto e : ghosts) {
result.push_back(e->src());
}
} else {
// Empty ghosts means the method has a single exit point and
// calculate_exit_block didn't add a ghost block.
result.push_back(m_exit_block);
}
} else {
always_assert_log(!include_infinite_loops,
"call calculate_exit_block first");
for (const auto& entry : m_blocks) {
Block* block = entry.second;
const auto& b = block->branchingness();
if (b == opcode::BRANCH_RETURN || b == opcode::BRANCH_THROW) {
result.push_back(block);
}
}
}
return result;
}
std::vector<Block*> ControlFlowGraph::return_blocks() const {
std::vector<Block*> result;
for (const auto& entry : m_blocks) {
Block* block = entry.second;
const auto& b = block->branchingness();
if (b == opcode::BRANCH_RETURN) {
result.push_back(block);
}
}
return result;
}
/*
* Find all exit blocks. Note that it's not as simple as looking for Blocks with
* return or throw opcodes; infinite loops are a valid way of terminating dex
* bytecode too. As such, we need to find all strongly connected components
* (SCCs) and vertices that lack successors. For SCCs that lack successors, any
* one of its vertices can be treated as an exit block; this implementation
* picks the head of the SCC.
*/
void ControlFlowGraph::calculate_exit_block() {
if (m_exit_block != nullptr) {
if (!m_editable) {
return;
}
if (get_pred_edge_of_type(m_exit_block, EDGE_GHOST) != nullptr) {
// Need to clear old exit block before recomputing the exit of a CFG
// with multiple exit points
remove_block(m_exit_block);
m_exit_block = nullptr;
}
}
ExitBlocks eb;
eb.visit(entry_block());
if (eb.exit_blocks.size() == 1) {
m_exit_block = eb.exit_blocks[0];
} else {
m_exit_block = create_block();
for (Block* b : eb.exit_blocks) {
add_edge(b, m_exit_block, EDGE_GHOST);
}
}
}
// public API edge removal functions
void ControlFlowGraph::delete_edge(Edge* edge) {
remove_edge(edge);
free_edge(edge);
}
void ControlFlowGraph::delete_succ_edges(Block* b) {
free_edges(remove_succ_edges(b));
}
void ControlFlowGraph::delete_pred_edges(Block* b) {
free_edges(remove_pred_edges(b));
}
// private edge removal functions
// These are raw removal, they don't free the edge.
ControlFlowGraph::EdgeSet ControlFlowGraph::remove_edges_between(Block* p,
Block* s,
bool cleanup) {
return remove_edge_if(p, s, [](const Edge*) { return true; }, cleanup);
}
void ControlFlowGraph::delete_edges_between(Block* p, Block* s) {
free_edges(remove_edges_between(p, s));
}
void ControlFlowGraph::remove_edge(Edge* edge, bool cleanup) {
remove_edge_if(edge->src(), edge->target(),
[edge](const Edge* e) { return edge == e; }, cleanup);
}
// After `edges` have been removed from the graph,
// * Turn BRANCHes/SWITCHes with one outgoing edge into GOTOs
void ControlFlowGraph::cleanup_deleted_edges(const EdgeSet& edges) {
for (Edge* e : edges) {
auto pred_block = e->src();
auto last_it = pred_block->get_last_insn();
if (last_it != pred_block->end()) {
auto last_insn = last_it->insn;
auto op = last_insn->opcode();
auto remaining_forward_edges = pred_block->succs();
if ((is_conditional_branch(op) || is_switch(op)) &&
remaining_forward_edges.size() == 1) {
pred_block->m_entries.erase_and_dispose(last_it);
remaining_forward_edges.at(0)->m_type = EDGE_GOTO;
}
}
}
}
void ControlFlowGraph::free_edge(Edge* edge) {
m_edges.erase(edge);
delete edge;
}
void ControlFlowGraph::free_edges(const EdgeSet& edges) {
for (Edge* e : edges) {
free_edge(e);
}
}
Edge* ControlFlowGraph::get_pred_edge_of_type(const Block* block,
EdgeType type) const {
return get_pred_edge_if(block,
[type](const Edge* e) { return e->type() == type; });
}
Edge* ControlFlowGraph::get_succ_edge_of_type(const Block* block,
EdgeType type) const {
return get_succ_edge_if(block,
[type](const Edge* e) { return e->type() == type; });
}
std::vector<Edge*> ControlFlowGraph::get_pred_edges_of_type(
const Block* block, EdgeType type) const {
return get_pred_edges_if(block,
[type](const Edge* e) { return e->type() == type; });
}
std::vector<Edge*> ControlFlowGraph::get_succ_edges_of_type(
const Block* block, EdgeType type) const {
return get_succ_edges_if(block,
[type](const Edge* e) { return e->type() == type; });
}
Block* ControlFlowGraph::split_block(const cfg::InstructionIterator& it) {
always_assert(editable());
always_assert(!it.is_end());
// old_block will be the predecessor
Block* old_block = it.block();
// new_block will be the successor
Block* new_block = create_block();
const IRList::iterator& raw_it = it.unwrap();
// move the rest of the instructions after the split point into the new block
new_block->m_entries.splice_selection(new_block->begin(),
old_block->m_entries, std::next(raw_it),
old_block->end());
// make the outgoing edges come from the new block...
std::vector<Edge*> to_move(old_block->succs().begin(),
old_block->succs().end());
for (auto e : to_move) {
// ... except if we didn't move the branching/throwing instruction; in that
// case, just rewire the goto, as we are going to create a new one
if (new_block->empty() && e->type() != EDGE_GOTO) {
continue;
}
set_edge_source(e, new_block);
}
// connect the halves of the block we just split up
add_edge(old_block, new_block, EDGE_GOTO);
return new_block;
}
void ControlFlowGraph::merge_blocks(Block* pred, Block* succ) {
const auto& not_throws = [](const Edge* e) {
return e->type() != EDGE_THROW;
};
{
const auto& forwards = get_succ_edges_if(pred, not_throws);
always_assert(forwards.size() == 1);
auto forward_edge = forwards[0];
always_assert(forward_edge->target() == succ);
always_assert(forward_edge->type() == EDGE_GOTO);
const auto& reverses = succ->preds();
always_assert(reverses.size() == 1);
auto reverse_edge = reverses[0];
always_assert(forward_edge == reverse_edge);
}
delete_edges_between(pred, succ);
// move succ's code into pred
pred->m_entries.splice(pred->m_entries.end(), succ->m_entries);
// move succ's outgoing edges to pred.
// Intentionally copy the vector of edges because set_edge_source edits the
// edge vectors
auto succs = get_succ_edges_if(succ, not_throws);
for (auto succ_edge : succs) {
set_edge_source(succ_edge, pred);
}
// remove the succ block
delete_pred_edges(succ);
delete_succ_edges(succ);
m_blocks.erase(succ->id());
delete succ;
}
void ControlFlowGraph::set_edge_target(Edge* edge, Block* new_target) {
move_edge(edge, nullptr, new_target);
}
void ControlFlowGraph::set_edge_source(Edge* edge, Block* new_source) {
move_edge(edge, new_source, nullptr);
}
// Move this edge out of the vectors between its old blocks
// and into the vectors between the new blocks
void ControlFlowGraph::move_edge(Edge* edge,
Block* new_source,
Block* new_target) {
// remove this edge from the graph temporarily but do not delete it because
// we're going to move it elsewhere
remove_edge(edge, /* cleanup */ false);
if (new_source != nullptr) {
edge->m_src = new_source;
}
if (new_target != nullptr) {
edge->m_target = new_target;
}
edge->src()->m_succs.push_back(edge);
edge->target()->m_preds.push_back(edge);
}
bool ControlFlowGraph::blocks_are_in_same_try(const Block* b1,
const Block* b2) const {
const auto& throws1 = b1->get_outgoing_throws_in_order();
const auto& throws2 = b2->get_outgoing_throws_in_order();
if (throws1.size() != throws2.size()) {
return false;
}
auto it1 = throws1.begin();
auto it2 = throws2.begin();
for (; it1 != throws1.end(); ++it1, ++it2) {
auto e1 = *it1;
auto e2 = *it2;
if (e1->target() != e2->target() ||
e1->m_throw_info->catch_type != e2->m_throw_info->catch_type) {
return false;
}
}
return true;
}
bool ControlFlowGraph::replace_insns(const InstructionIterator& it,
const std::vector<IRInstruction*>& insns) {
return replace_insns(it, insns.begin(), insns.end());
}
bool ControlFlowGraph::replace_insn(const InstructionIterator& it,
IRInstruction* insn) {
return replace_insns(it, {insn});
}
void ControlFlowGraph::remove_insn(const InstructionIterator& it) {
always_assert(m_editable);
MethodItemEntry& mie = *it;
auto insn = mie.insn;
auto op = insn->opcode();
always_assert_log(op != OPCODE_GOTO,
"There are no GOTO instructions in the CFG");
Block* block = it.block();
auto last_it = block->get_last_insn();
always_assert_log(last_it != block->end(), "cannot remove from empty block");
if (is_conditional_branch(op) || is_switch(op)) {
// Remove all outgoing EDGE_BRANCHes
// leaving behind only an EDGE_GOTO (and maybe an EDGE_THROW?)
//
// Don't cleanup because we're deleting the instruction at the end of this
// function
free_edges(remove_succ_edge_if(
block, [](const Edge* e) { return e->type() == EDGE_BRANCH; },
/* cleanup */ false));
} else if (insn->has_move_result_pseudo()) {
// delete the move-result-pseudo too
if (insn == last_it->insn) {
// The move-result-pseudo is in the next (runtime) block.
// We follow the goto edge to the block that should have the
// move-result-pseudo.
//
// We can't use std::next because that goes to the next block in ID order,
// which may not be the next runtime block.
auto move_result_block = block->goes_to();
always_assert_log(move_result_block != nullptr,
"Cannot follow goto of B%u in %s", block->id(),
SHOW(*this));
auto first_it = move_result_block->get_first_insn();
always_assert(first_it != move_result_block->end());
always_assert_log(opcode::is_move_result_pseudo(first_it->insn->opcode()),
"%d -> %d in %s", block->id(), move_result_block->id(),
SHOW(*this));
// We can safely delete this move-result-pseudo because it cannot be the
// move-result-pseudo of more than one primary instruction. A CFG with
// multiple edges to a block beginning with a move-result-pseudo is a
// malformed CFG.
always_assert_log(move_result_block->preds().size() == 1,
"Multiple edges to a move-result-pseudo in %d. %s",
move_result_block->id(), SHOW(*this));
move_result_block->m_entries.erase_and_dispose(first_it);
} else {
// The move-result-pseudo is in the same block as this one.
// This occurs when we're not in a try region.
auto mrp_it = std::next(it);
always_assert(mrp_it.block() == block);
block->m_entries.erase_and_dispose(mrp_it.unwrap());
}
}
if (insn == last_it->insn && (opcode::may_throw(op) || op == OPCODE_THROW)) {
// We're deleting the last instruction that may throw, this block no longer
// throws. We should remove the throw edges
delete_succ_edge_if(block,
[](const Edge* e) { return e->type() == EDGE_THROW; });
}
// delete the requested instruction
block->m_entries.erase_and_dispose(it.unwrap());
}
void ControlFlowGraph::create_branch(Block* b,
IRInstruction* insn,
Block* fls,
Block* tru) {
create_branch(b, insn, fls, {{1, tru}});
}
void ControlFlowGraph::create_branch(
Block* b,
IRInstruction* insn,
Block* goto_block,
const std::vector<std::pair<int32_t, Block*>>& case_to_block) {
auto op = insn->opcode();
always_assert(m_editable);
always_assert_log(is_branch(op), "%s is not a branch instruction", SHOW(op));
always_assert_log(!is_goto(op),
"There are no gotos in the editable CFG. Use add_edge()");
auto existing_last = b->get_last_insn();
if (existing_last != b->end()) {
auto last_op = existing_last->insn->opcode();
always_assert_log(
!(is_branch(last_op) || is_throw(last_op) || is_return(last_op)),
"Can't add branch after %s in Block %d in %s",
SHOW(existing_last->insn), b->id(), SHOW(*this));
}
auto existing_goto_edge = get_succ_edge_of_type(b, EDGE_GOTO);
if (goto_block != nullptr) {
if (existing_goto_edge != nullptr) {
// redirect it
set_edge_target(existing_goto_edge, goto_block);
} else {
add_edge(b, goto_block, EDGE_GOTO);
}
} else {
always_assert_log(existing_goto_edge != nullptr,
"%s must have a false case", SHOW(insn));
}
b->m_entries.push_back(*new MethodItemEntry(insn));
if (is_switch(op)) {
for (const auto& entry : case_to_block) {
add_edge(b, entry.second, entry.first);
}
} else {
always_assert(is_conditional_branch(op));
always_assert_log(case_to_block.size() == 1,
"Wrong number of non-goto cases (%d) for %s",
case_to_block.size(), SHOW(op));
const auto& entry = case_to_block[0];
always_assert_log(entry.first == 1, "%s only has boolean case key values",
SHOW(op));
add_edge(b, entry.second, EDGE_BRANCH);
}
}
void ControlFlowGraph::copy_succ_edges(Block* from, Block* to, EdgeType type) {
const auto& edges = get_succ_edges_of_type(from, type);
for (const Edge* e : edges) {
Edge* copy = new Edge(*e);
copy->m_src = to;
add_edge(copy);
}
}
bool ControlFlowGraph::insert_before(const InstructionIterator& position,
const std::vector<IRInstruction*>& insns) {
return insert_before(position, insns.begin(), insns.end());
}
bool ControlFlowGraph::insert_after(const InstructionIterator& position,
const std::vector<IRInstruction*>& insns) {
return insert_after(position, insns.begin(), insns.end());
}
bool ControlFlowGraph::push_front(Block* b,
const std::vector<IRInstruction*>& insns) {
return push_front(b, insns.begin(), insns.end());
}
bool ControlFlowGraph::push_back(Block* b,
const std::vector<IRInstruction*>& insns) {
return push_back(b, insns.begin(), insns.end());
}
bool ControlFlowGraph::insert_before(const InstructionIterator& position,
IRInstruction* insn) {
return insert_before(position, std::vector<IRInstruction*>{insn});
}
bool ControlFlowGraph::insert_after(const InstructionIterator& position,
IRInstruction* insn) {
return insert_after(position, std::vector<IRInstruction*>{insn});
}
bool ControlFlowGraph::push_front(Block* b, IRInstruction* insn) {
return push_front(b, std::vector<IRInstruction*>{insn});
}
bool ControlFlowGraph::push_back(Block* b, IRInstruction* insn) {
return push_back(b, std::vector<IRInstruction*>{insn});
}
void ControlFlowGraph::remove_block(Block* block) {
if (block == entry_block()) {
always_assert(block->succs().size() == 1);
set_entry_block(block->succs()[0]->target());
}
delete_pred_edges(block);
delete_succ_edges(block);
std::unordered_set<DexPosition*> deleted_positions;
for (const auto& mie : *block) {
if (mie.type == MFLOW_POSITION) {
deleted_positions.insert(mie.pos.get());
}
}
remove_dangling_parents(deleted_positions);
auto id = block->id();
auto num_removed = m_blocks.erase(id);
always_assert_log(num_removed == 1,
"Block %d wasn't in CFG. Attempted double delete?", id);
block->m_entries.clear_and_dispose();
delete block;
}
// delete old_block and reroute its predecessors to new_block
void ControlFlowGraph::replace_block(Block* old_block, Block* new_block) {
std::vector<Edge*> to_redirect = old_block->preds();
for (auto e : to_redirect) {
set_edge_target(e, new_block);
}
remove_block(old_block);
}
std::ostream& ControlFlowGraph::write_dot_format(std::ostream& o) const {
o << "digraph {\n";
for (auto* block : blocks()) {
for (auto& succ : block->succs()) {
o << block->id() << " -> " << succ->target()->id() << "\n";
}
}
o << "}\n";
return o;
}
Block* ControlFlowGraph::idom_intersect(
const std::unordered_map<Block*, DominatorInfo>& postorder_dominator,
Block* block1,
Block* block2) const {
auto finger1 = block1;
auto finger2 = block2;
while (finger1 != finger2) {
while (postorder_dominator.at(finger1).postorder <
postorder_dominator.at(finger2).postorder) {
finger1 = postorder_dominator.at(finger1).dom;
}
while (postorder_dominator.at(finger2).postorder <
postorder_dominator.at(finger1).postorder) {
finger2 = postorder_dominator.at(finger2).dom;
}
}
return finger1;
}
// Finding immediate dominator for each blocks in ControlFlowGraph.
// Theory from:
// K. D. Cooper et.al. A Simple, Fast Dominance Algorithm.
std::unordered_map<Block*, DominatorInfo>
ControlFlowGraph::immediate_dominators() const {
// Get postorder of blocks and create map of block to postorder number.
std::unordered_map<Block*, DominatorInfo> postorder_dominator;
const auto& postorder_blocks = blocks_post();
for (size_t i = 0; i < postorder_blocks.size(); ++i) {
postorder_dominator[postorder_blocks[i]].postorder = i;
}
// Initialize immediate dominators. Having value as nullptr means it has
// not been processed yet.
for (Block* block : blocks()) {
if (block->preds().empty()) {
// Entry block's immediate dominator is itself.
postorder_dominator[block].dom = block;
} else {
postorder_dominator[block].dom = nullptr;
}
}
bool changed = true;
while (changed) {
changed = false;
// Traverse block in reverse postorder.
for (auto rit = postorder_blocks.rbegin(); rit != postorder_blocks.rend();
++rit) {
Block* ordered_block = *rit;
if (ordered_block->preds().empty()) {
continue;
}
Block* new_idom = nullptr;
// Pick one random processed block as starting point.
for (auto& pred : ordered_block->preds()) {
if (postorder_dominator[pred->src()].dom != nullptr) {
new_idom = pred->src();
break;
}
}
always_assert(new_idom != nullptr);
for (auto& pred : ordered_block->preds()) {
if (pred->src() != new_idom &&
postorder_dominator[pred->src()].dom != nullptr) {
new_idom = idom_intersect(postorder_dominator, new_idom, pred->src());
}
}
if (postorder_dominator[ordered_block].dom != new_idom) {
postorder_dominator[ordered_block].dom = new_idom;
changed = true;
}
}
}
return postorder_dominator;
}
ControlFlowGraph::EdgeSet ControlFlowGraph::remove_succ_edges(Block* b,
bool cleanup) {
return remove_succ_edge_if(b, [](const Edge*) { return true; }, cleanup);
}
ControlFlowGraph::EdgeSet ControlFlowGraph::remove_pred_edges(Block* b,
bool cleanup) {
return remove_pred_edge_if(b, [](const Edge*) { return true; }, cleanup);
}
} // namespace cfg
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
9917ce3a6173ba3d6a8000092d906268e6b57701 | 065f9c32f1921bd8221122968f5d8a07e57cf956 | /devel/include/snake_control/GetJointTrajectoryResponse.h | 83000a5ec5e7a7dd8705aceef6c70fe5f9a10e92 | [] | no_license | atkpwn/snake_ws | f789da9bb81d1d36528d5b017cee24f298ebeabb | 32cf95cd44c0db43d909b77e6836df6dbebcb8eb | refs/heads/master | 2020-03-19T09:33:04.177899 | 2018-06-15T23:08:45 | 2018-06-15T23:08:45 | 136,298,110 | 0 | 2 | null | 2018-06-08T12:21:11 | 2018-06-06T08:32:57 | C++ | UTF-8 | C++ | false | false | 8,401 | h | // Generated by gencpp from file snake_control/GetJointTrajectoryResponse.msg
// DO NOT EDIT!
#ifndef SNAKE_CONTROL_MESSAGE_GETJOINTTRAJECTORYRESPONSE_H
#define SNAKE_CONTROL_MESSAGE_GETJOINTTRAJECTORYRESPONSE_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
#include <std_msgs/Header.h>
#include <trajectory_msgs/JointTrajectoryPoint.h>
namespace snake_control
{
template <class ContainerAllocator>
struct GetJointTrajectoryResponse_
{
typedef GetJointTrajectoryResponse_<ContainerAllocator> Type;
GetJointTrajectoryResponse_()
: header()
, joint_names()
, points() {
}
GetJointTrajectoryResponse_(const ContainerAllocator& _alloc)
: header(_alloc)
, joint_names(_alloc)
, points(_alloc) {
(void)_alloc;
}
typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _joint_names_type;
_joint_names_type joint_names;
typedef std::vector< ::trajectory_msgs::JointTrajectoryPoint_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::trajectory_msgs::JointTrajectoryPoint_<ContainerAllocator> >::other > _points_type;
_points_type points;
typedef boost::shared_ptr< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> const> ConstPtr;
}; // struct GetJointTrajectoryResponse_
typedef ::snake_control::GetJointTrajectoryResponse_<std::allocator<void> > GetJointTrajectoryResponse;
typedef boost::shared_ptr< ::snake_control::GetJointTrajectoryResponse > GetJointTrajectoryResponsePtr;
typedef boost::shared_ptr< ::snake_control::GetJointTrajectoryResponse const> GetJointTrajectoryResponseConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >::stream(s, "", v);
return s;
}
} // namespace snake_control
namespace ros
{
namespace message_traits
{
// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True}
// {'geometry_msgs': ['/opt/ros/kinetic/share/geometry_msgs/cmake/../msg'], 'trajectory_msgs': ['/opt/ros/kinetic/share/trajectory_msgs/cmake/../msg'], 'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg']}
// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
template <class ContainerAllocator>
struct IsFixedSize< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> const>
: FalseType
{ };
template <class ContainerAllocator>
struct IsMessage< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> const>
: TrueType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
{
static const char* value()
{
return "65b4f94a94d1ed67169da35a02f33d3f";
}
static const char* value(const ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0x65b4f94a94d1ed67ULL;
static const uint64_t static_value2 = 0x169da35a02f33d3fULL;
};
template<class ContainerAllocator>
struct DataType< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
{
static const char* value()
{
return "snake_control/GetJointTrajectoryResponse";
}
static const char* value(const ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
{
static const char* value()
{
return "Header header\n\
string[] joint_names\n\
trajectory_msgs/JointTrajectoryPoint[] points\n\
\n\
================================================================================\n\
MSG: std_msgs/Header\n\
# Standard metadata for higher-level stamped data types.\n\
# This is generally used to communicate timestamped data \n\
# in a particular coordinate frame.\n\
# \n\
# sequence ID: consecutively increasing ID \n\
uint32 seq\n\
#Two-integer timestamp that is expressed as:\n\
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
# time-handling sugar is provided by the client library\n\
time stamp\n\
#Frame this data is associated with\n\
# 0: no frame\n\
# 1: global frame\n\
string frame_id\n\
\n\
================================================================================\n\
MSG: trajectory_msgs/JointTrajectoryPoint\n\
# Each trajectory point specifies either positions[, velocities[, accelerations]]\n\
# or positions[, effort] for the trajectory to be executed.\n\
# All specified values are in the same order as the joint names in JointTrajectory.msg\n\
\n\
float64[] positions\n\
float64[] velocities\n\
float64[] accelerations\n\
float64[] effort\n\
duration time_from_start\n\
";
}
static const char* value(const ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.header);
stream.next(m.joint_names);
stream.next(m.points);
}
ROS_DECLARE_ALLINONE_SERIALIZER
}; // struct GetJointTrajectoryResponse_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::snake_control::GetJointTrajectoryResponse_<ContainerAllocator>& v)
{
s << indent << "header: ";
s << std::endl;
Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
s << indent << "joint_names[]" << std::endl;
for (size_t i = 0; i < v.joint_names.size(); ++i)
{
s << indent << " joint_names[" << i << "]: ";
Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.joint_names[i]);
}
s << indent << "points[]" << std::endl;
for (size_t i = 0; i < v.points.size(); ++i)
{
s << indent << " points[" << i << "]: ";
s << std::endl;
s << indent;
Printer< ::trajectory_msgs::JointTrajectoryPoint_<ContainerAllocator> >::stream(s, indent + " ", v.points[i]);
}
}
};
} // namespace message_operations
} // namespace ros
#endif // SNAKE_CONTROL_MESSAGE_GETJOINTTRAJECTORYRESPONSE_H
| [
"noreply@github.com"
] | atkpwn.noreply@github.com |
2f21af0814056322fdb3c8a7ce82ba46d38fd994 | 208524c136c96caf0aa2cd1799c8ff6eb84f466f | /study/12_3197.cpp | a8026be6935eb76374abeaccebf02298df534151 | [] | no_license | jisun-16/beakjoon-online-judge-with-c- | 96d04198a5de67f04183464cf08cff0ad5cb087c | f229466cb025b186a5fbc369a9b36ca2282627b1 | refs/heads/master | 2021-11-25T14:20:19.502289 | 2021-11-06T05:59:06 | 2021-11-06T05:59:06 | 205,304,301 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 1,606 | cpp | #include<iostream>
#include<queue>
#include<cstring>
using namespace std;
const int dx[]={-1,0,1,0},dy[]={0,-1,0,1};
int r,c;
int area_num[1501][1501];
char lake[1501][1501];
bool visited[1501][1501];
pair<int,int> swan;
queue<pair<int,int> > water_q,water_nq,swan_q,swan_nq;
bool avail(int x,int y){
return x>=0&&x<r&&y>=0&&y<c;
}
int main(){
ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
cin>>r>>c;
for(int i=0;i<r;i++)
for(int j=0;j<c;j++){
cin>>lake[i][j];
if(lake[i][j]=='L')
swan={i,j};
if(lake[i][j]!='X') water_q.push({i,j});
}
int ans=0,fin=false;
swan_q.push({swan});
visited[swan.first][swan.second]=true;
while(true){
while(!swan_q.empty()&&!fin){
int x=swan_q.front().first,y=swan_q.front().second;
swan_q.pop();
for(int i=0;i<4;i++){
int nx=x+dx[i],ny=y+dy[i];
if(!avail(nx,ny)||visited[nx][ny]) continue;
visited[nx][ny]=true;
if(lake[nx][ny]=='.')
swan_q.push({nx,ny});
else if(lake[nx][ny]=='X')
swan_nq.push({nx,ny});
else if(lake[nx][ny]=='L'){
fin=true;
break;
}
}
}//만날 수 있는지 체크
if(fin){
cout<<ans<<'\n';
return 0;
}
while(!water_q.empty()){
int x=water_q.front().first,y=water_q.front().second;
water_q.pop();
for(int i=0;i<4;i++){
int nx=x+dx[i],ny=y+dy[i];
if(!avail(nx,ny)) continue;
if(lake[nx][ny]=='X'){
lake[nx][ny]='.';
water_nq.push({nx,ny});
}
}
}//얼음->물
water_q=water_nq;
swan_q=swan_nq;
water_nq=queue<pair<int,int> >();
swan_nq=queue<pair<int,int> >();
ans++;
}
}
| [
"limjisun97@naver.com"
] | limjisun97@naver.com |
91e919d50706a0c708834d37fa0ddb6b2ce4a48e | f3397365f6d031ea0ed1b9d6993eaad389073624 | /src/turtlebot3_server.cpp | 111658c427c5d4b5559dfc584dc122060459411d | [] | no_license | mtt5/turtlebot3_example_cpp | c29757273c07cd68f847deea20fa189fc7dde283 | ca63dcd432199fbfd60110cac6e644ab1b950a88 | refs/heads/master | 2020-05-31T18:50:39.732749 | 2019-06-05T18:25:22 | 2019-06-05T18:25:22 | 190,442,837 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,847 | cpp | #include <ros/ros.h>
#include <actionlib/server/simple_action_server.h>
#include <math.h>
#include <geometry_msgs/Twist.h>
#include <geometry_msgs/Point.h>
#include <geometry_msgs/Quaternion.h>
#include <nav_msgs/Odometry.h>
#include <sensor_msgs/JointState.h>
#include <turtlebot3_msgs/SensorState.h>
#include "turtlebot3_example/Turtlebot3Action.h"
#include <vector>
class Turtlebot3_Action{
public:
Turtlebot3_Action(std::string name):action_name_(name),
action_server_(nh_,name,boost::bind(&Turtlebot3_Action::executeCB,this,_1),false){
//stats_sub_ = nh_.subscribe("joint_states",1,&Turtlebot3_Action::stats_CB,this);
//odom_sub_ = nh_.subscribe("odom",1,&Turtlebot3_Action::odom_CB,this);
//init_state_ = true;
action_server_.start();
ROS_INFO("server on");
}
void executeCB(const turtlebot3_example::Turtlebot3GoalConstPtr &goal){
int mode = goal->goal.x;
float length = goal->goal.y;
int count = goal->goal.z;
bool success = true;
bool circle_mode = true;
bool half_patrol = false;
int circle_count = 0;
//ROS_INFO("%d,%f,%d",mode,length,count);
//position_ = geometry_msgs::Point();
//r_ = 15;
//r1_ = 1;
stats_sub_ = nh_.subscribe("joint_states",1000,&Turtlebot3_Action::stats_CB,this);
odom_sub_ = nh_.subscribe("odom",1000,&Turtlebot3_Action::odom_CB,this);
cmd_vel_pub_ = nh_.advertise<geometry_msgs::Twist>("cmd_vel",5);
for(int i = 0;i<count;++i){
if(mode == 1){
std::vector<float> area(4,0);
area[0] = area[1] = length;
for(int j = 0;j<=3;++j){
go_front(area[j],j);
r1_.sleep();
turn(-90);
}
}
else if(mode == 2){
std::vector<float> area(3,0);
area[0] = area[1] = length;
for(int j =0;j<=2;++j){
go_front(area[j],j);
r1_.sleep();
turn(-120);
}
}
else if(mode == 3){
//later
}
}
if(success){
result_.result.result = "";
ROS_INFO("%s:Succeeded", action_name_.c_str());
action_server_.setSucceeded(result_.result);
}
}
void stats_CB(const sensor_msgs::JointState::ConstPtr &msg){
float TICK2RAD = 0.001533981;
float last_pos = 0.0;
float diff_pos = 0.0;
float cur_pos = 0.0;
int encoder = 0;
cur_pos = msg->position[0];
diff_pos = cur_pos - last_pos;
encoder = encoder + int(diff_pos / TICK2RAD);
right_encoder_ = encoder;
}
void odom_CB(const nav_msgs::Odometry::ConstPtr &msg){
position_.x = msg->pose.pose.position.x;
position_.y = msg->pose.pose.position.y;
position_.z = msg->pose.pose.position.z;
//ROS_INFO("received position");
};
void go_front(const float length,const int count){
if(count == 0){
while(position_.x<length){
//ROS_INFO("%f",position_.x);
command_.linear.x = 0.1;
command_.angular.z = 0.0;
cmd_vel_pub_.publish(command_);
r_.sleep();
}
}
else if(count == 1){
while(position_.y<length){
command_.linear.x = 0.1;
command_.angular.z = 0.0;
cmd_vel_pub_.publish(command_);
r_.sleep();
}
}
else if(count == 2){
while(position_.x>length){
command_.linear.x = 0.1;
command_.angular.z = 0.0;
cmd_vel_pub_.publish(command_);
r_.sleep();
}
}
else{
while(position_.y>length){
command_.linear.x = 0.1;
command_.angular.z = 0.0;
cmd_vel_pub_.publish(command_);
r_.sleep();
}
}
command_.linear.x = 0.0;
cmd_vel_pub_.publish(command_);
r_.sleep();
}
void turn(const int degree){
if(init_state_){
init_right_encoder_ = right_encoder_;
init_state_ = false;
}
float diff_encoder = ((M_PI/180)*degree*0.080)/(0.207/4096);
//ROS_INFO("%f",diff_encoder);
while(abs(init_right_encoder_ - right_encoder_)<abs(diff_encoder)){
if(diff_encoder >= 0 )
command_.angular.z = -0.5;
else
command_.angular.z = 0.5;
cmd_vel_pub_.publish(command_);
r_.sleep();
}
init_state_ = true;
command_.angular.z = 0.0;
cmd_vel_pub_.publish(command_);
r_.sleep();
}
private:
ros::NodeHandle nh_;
actionlib::SimpleActionServer<turtlebot3_example::Turtlebot3Action> action_server_;
std::string action_name_;
ros::Subscriber stats_sub_;
ros::Subscriber odom_sub_;
ros::Publisher cmd_vel_pub_;
turtlebot3_example::Turtlebot3ActionFeedback feedback_;
turtlebot3_example::Turtlebot3ActionResult result_;
//geometry_msgs::Point init_Position_;
geometry_msgs::Point position_;
geometry_msgs::Twist command_;
bool init_state_ = true;
//float TICK2RAD = 0.001533981;
//float last_pos = 0.0;
//float diff_pos = 0.0;
//float cur_pos = 0.0;
//int encoder = 0;
int right_encoder_ = 0;
int init_right_encoder_ = 0;
ros::Rate r_ = 15;
ros::Rate r1_ = 1 ;
};
int main(int argc, char** argv){
ros::init(argc,argv,"turtlebot3");
Turtlebot3_Action server(ros::this_node::getName());
ros::spin();
return 0;
} | [
"ma.tiant@husky.neu.edu"
] | ma.tiant@husky.neu.edu |
4951508cf547ab3e47a3faac02971cfeb7230c2c | 37f241dab8c4356d0549eac15878d73c84334af0 | /src/rpcrawtransaction.cpp | 7cbbd04b46d006f491735391019ad8e47b1672b8 | [
"MIT"
] | permissive | onyxcoin/Onyxcoin | caeffa61b0b1f6d23de2ed520af7a1f6c690d897 | f171305cc6f61b9b375e471f65c6bc6d19d4e700 | refs/heads/master | 2020-05-27T08:13:50.371668 | 2014-07-30T16:34:28 | 2014-07-30T16:34:28 | 22,436,059 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 20,286 | cpp | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include "base58.h"
#include "bitcoinrpc.h"
#include "txdb.h"
#include "init.h"
#include "main.h"
#include "net.h"
#include "wallet.h"
using namespace std;
using namespace boost;
using namespace boost::assign;
using namespace json_spirit;
void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeHex)
{
txnouttype type;
vector<CTxDestination> addresses;
int nRequired;
out.push_back(Pair("asm", scriptPubKey.ToString()));
if (fIncludeHex)
out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end())));
if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired))
{
out.push_back(Pair("type", GetTxnOutputType(TX_NONSTANDARD)));
return;
}
out.push_back(Pair("reqSigs", nRequired));
out.push_back(Pair("type", GetTxnOutputType(type)));
Array a;
BOOST_FOREACH(const CTxDestination& addr, addresses)
a.push_back(CBitcoinAddress(addr).ToString());
out.push_back(Pair("addresses", a));
}
void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
{
entry.push_back(Pair("txid", tx.GetHash().GetHex()));
entry.push_back(Pair("version", tx.nVersion));
entry.push_back(Pair("time", (boost::int64_t)tx.nTime));
entry.push_back(Pair("locktime", (boost::int64_t)tx.nLockTime));
Array vin;
BOOST_FOREACH(const CTxIn& txin, tx.vin)
{
Object in;
if (tx.IsCoinBase())
in.push_back(Pair("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
else
{
in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
in.push_back(Pair("vout", (boost::int64_t)txin.prevout.n));
Object o;
o.push_back(Pair("asm", txin.scriptSig.ToString()));
o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
in.push_back(Pair("scriptSig", o));
}
in.push_back(Pair("sequence", (boost::int64_t)txin.nSequence));
vin.push_back(in);
}
entry.push_back(Pair("vin", vin));
Array vout;
for (unsigned int i = 0; i < tx.vout.size(); i++)
{
const CTxOut& txout = tx.vout[i];
Object out;
out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
out.push_back(Pair("n", (boost::int64_t)i));
Object o;
ScriptPubKeyToJSON(txout.scriptPubKey, o, false);
out.push_back(Pair("scriptPubKey", o));
vout.push_back(out);
}
entry.push_back(Pair("vout", vout));
if (hashBlock != 0)
{
entry.push_back(Pair("blockhash", hashBlock.GetHex()));
map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
if (mi != mapBlockIndex.end() && (*mi).second)
{
CBlockIndex* pindex = (*mi).second;
if (pindex->IsInMainChain())
{
entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight));
entry.push_back(Pair("time", (boost::int64_t)pindex->nTime));
entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime));
}
else
entry.push_back(Pair("confirmations", 0));
}
}
}
Value getrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"getrawtransaction <txid> [verbose=0]\n"
"If verbose=0, returns a string that is\n"
"serialized, hex-encoded data for <txid>.\n"
"If verbose is non-zero, returns an Object\n"
"with information about <txid>.");
uint256 hash;
hash.SetHex(params[0].get_str());
bool fVerbose = false;
if (params.size() > 1)
fVerbose = (params[1].get_int() != 0);
CTransaction tx;
uint256 hashBlock = 0;
if (!GetTransaction(hash, tx, hashBlock))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction");
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
ssTx << tx;
string strHex = HexStr(ssTx.begin(), ssTx.end());
if (!fVerbose)
return strHex;
Object result;
result.push_back(Pair("hex", strHex));
TxToJSON(tx, hashBlock, result);
return result;
}
Value listunspent(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 3)
throw runtime_error(
"listunspent [minconf=1] [maxconf=9999999] [\"address\",...]\n"
"Returns array of unspent transaction outputs\n"
"with between minconf and maxconf (inclusive) confirmations.\n"
"Optionally filtered to only include txouts paid to specified addresses.\n"
"Results are an array of Objects, each of which has:\n"
"{txid, vout, scriptPubKey, amount, confirmations}");
RPCTypeCheck(params, list_of(int_type)(int_type)(array_type));
int nMinDepth = 1;
if (params.size() > 0)
nMinDepth = params[0].get_int();
int nMaxDepth = 9999999;
if (params.size() > 1)
nMaxDepth = params[1].get_int();
set<CBitcoinAddress> setAddress;
if (params.size() > 2)
{
Array inputs = params[2].get_array();
BOOST_FOREACH(Value& input, inputs)
{
CBitcoinAddress address(input.get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Onyxcoin address: ")+input.get_str());
if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str());
setAddress.insert(address);
}
}
Array results;
vector<COutput> vecOutputs;
pwalletMain->AvailableCoins(vecOutputs, false);
BOOST_FOREACH(const COutput& out, vecOutputs)
{
if (out.nDepth < nMinDepth || out.nDepth > nMaxDepth)
continue;
if(setAddress.size())
{
CTxDestination address;
if(!ExtractDestination(out.tx->vout[out.i].scriptPubKey, address))
continue;
if (!setAddress.count(address))
continue;
}
int64_t nValue = out.tx->vout[out.i].nValue;
const CScript& pk = out.tx->vout[out.i].scriptPubKey;
Object entry;
entry.push_back(Pair("txid", out.tx->GetHash().GetHex()));
entry.push_back(Pair("vout", out.i));
CTxDestination address;
if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address))
{
entry.push_back(Pair("address", CBitcoinAddress(address).ToString()));
if (pwalletMain->mapAddressBook.count(address))
entry.push_back(Pair("account", pwalletMain->mapAddressBook[address]));
}
entry.push_back(Pair("scriptPubKey", HexStr(pk.begin(), pk.end())));
entry.push_back(Pair("amount",ValueFromAmount(nValue)));
entry.push_back(Pair("confirmations",out.nDepth));
results.push_back(entry);
}
return results;
}
Value createrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 2)
throw runtime_error(
"createrawtransaction [{\"txid\":txid,\"vout\":n},...] {address:amount,...}\n"
"Create a transaction spending given inputs\n"
"(array of objects containing transaction id and output number),\n"
"sending to given address(es).\n"
"Returns hex-encoded raw transaction.\n"
"Note that the transaction's inputs are not signed, and\n"
"it is not stored in the wallet or transmitted to the network.");
RPCTypeCheck(params, list_of(array_type)(obj_type));
Array inputs = params[0].get_array();
Object sendTo = params[1].get_obj();
CTransaction rawTx;
BOOST_FOREACH(Value& input, inputs)
{
const Object& o = input.get_obj();
const Value& txid_v = find_value(o, "txid");
if (txid_v.type() != str_type)
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing txid key");
string txid = txid_v.get_str();
if (!IsHex(txid))
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected hex txid");
const Value& vout_v = find_value(o, "vout");
if (vout_v.type() != int_type)
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing vout key");
int nOutput = vout_v.get_int();
if (nOutput < 0)
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, vout must be positive");
CTxIn in(COutPoint(uint256(txid), nOutput));
rawTx.vin.push_back(in);
}
set<CBitcoinAddress> setAddress;
BOOST_FOREACH(const Pair& s, sendTo)
{
CBitcoinAddress address(s.name_);
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Onyxcoin address: ")+s.name_);
if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
setAddress.insert(address);
CScript scriptPubKey;
scriptPubKey.SetDestination(address.Get());
int64_t nAmount = AmountFromValue(s.value_);
CTxOut out(nAmount, scriptPubKey);
rawTx.vout.push_back(out);
}
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
ss << rawTx;
return HexStr(ss.begin(), ss.end());
}
Value decoderawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"decoderawtransaction <hex string>\n"
"Return a JSON object representing the serialized, hex-encoded transaction.");
RPCTypeCheck(params, list_of(str_type));
vector<unsigned char> txData(ParseHex(params[0].get_str()));
CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
CTransaction tx;
try {
ssData >> tx;
}
catch (std::exception &e) {
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
}
Object result;
TxToJSON(tx, 0, result);
return result;
}
Value decodescript(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"decodescript <hex string>\n"
"Decode a hex-encoded script.");
RPCTypeCheck(params, list_of(str_type));
Object r;
CScript script;
if (params[0].get_str().size() > 0){
vector<unsigned char> scriptData(ParseHexV(params[0], "argument"));
script = CScript(scriptData.begin(), scriptData.end());
} else {
// Empty scripts are valid
}
ScriptPubKeyToJSON(script, r, false);
r.push_back(Pair("p2sh", CBitcoinAddress(script.GetID()).ToString()));
return r;
}
Value signrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 4)
throw runtime_error(
"signrawtransaction <hex string> [{\"txid\":txid,\"vout\":n,\"scriptPubKey\":hex},...] [<privatekey1>,...] [sighashtype=\"ALL\"]\n"
"Sign inputs for raw transaction (serialized, hex-encoded).\n"
"Second optional argument (may be null) is an array of previous transaction outputs that\n"
"this transaction depends on but may not yet be in the blockchain.\n"
"Third optional argument (may be null) is an array of base58-encoded private\n"
"keys that, if given, will be the only keys used to sign the transaction.\n"
"Fourth optional argument is a string that is one of six values; ALL, NONE, SINGLE or\n"
"ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY.\n"
"Returns json object with keys:\n"
" hex : raw transaction with signature(s) (hex-encoded string)\n"
" complete : 1 if transaction has a complete set of signature (0 if not)"
+ HelpRequiringPassphrase());
RPCTypeCheck(params, list_of(str_type)(array_type)(array_type)(str_type), true);
vector<unsigned char> txData(ParseHex(params[0].get_str()));
CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
vector<CTransaction> txVariants;
while (!ssData.empty())
{
try {
CTransaction tx;
ssData >> tx;
txVariants.push_back(tx);
}
catch (std::exception &e) {
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
}
}
if (txVariants.empty())
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Missing transaction");
// mergedTx will end up with all the signatures; it
// starts as a clone of the rawtx:
CTransaction mergedTx(txVariants[0]);
bool fComplete = true;
// Fetch previous transactions (inputs):
map<COutPoint, CScript> mapPrevOut;
for (unsigned int i = 0; i < mergedTx.vin.size(); i++)
{
CTransaction tempTx;
MapPrevTx mapPrevTx;
CTxDB txdb("r");
map<uint256, CTxIndex> unused;
bool fInvalid;
// FetchInputs aborts on failure, so we go one at a time.
tempTx.vin.push_back(mergedTx.vin[i]);
tempTx.FetchInputs(txdb, unused, false, false, mapPrevTx, fInvalid);
// Copy results into mapPrevOut:
BOOST_FOREACH(const CTxIn& txin, tempTx.vin)
{
const uint256& prevHash = txin.prevout.hash;
if (mapPrevTx.count(prevHash) && mapPrevTx[prevHash].second.vout.size()>txin.prevout.n)
mapPrevOut[txin.prevout] = mapPrevTx[prevHash].second.vout[txin.prevout.n].scriptPubKey;
}
}
// Add previous txouts given in the RPC call:
if (params.size() > 1 && params[1].type() != null_type)
{
Array prevTxs = params[1].get_array();
BOOST_FOREACH(Value& p, prevTxs)
{
if (p.type() != obj_type)
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "expected object with {\"txid'\",\"vout\",\"scriptPubKey\"}");
Object prevOut = p.get_obj();
RPCTypeCheck(prevOut, map_list_of("txid", str_type)("vout", int_type)("scriptPubKey", str_type));
string txidHex = find_value(prevOut, "txid").get_str();
if (!IsHex(txidHex))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "txid must be hexadecimal");
uint256 txid;
txid.SetHex(txidHex);
int nOut = find_value(prevOut, "vout").get_int();
if (nOut < 0)
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "vout must be positive");
string pkHex = find_value(prevOut, "scriptPubKey").get_str();
if (!IsHex(pkHex))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "scriptPubKey must be hexadecimal");
vector<unsigned char> pkData(ParseHex(pkHex));
CScript scriptPubKey(pkData.begin(), pkData.end());
COutPoint outpoint(txid, nOut);
if (mapPrevOut.count(outpoint))
{
// Complain if scriptPubKey doesn't match
if (mapPrevOut[outpoint] != scriptPubKey)
{
string err("Previous output scriptPubKey mismatch:\n");
err = err + mapPrevOut[outpoint].ToString() + "\nvs:\n"+
scriptPubKey.ToString();
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, err);
}
}
else
mapPrevOut[outpoint] = scriptPubKey;
}
}
bool fGivenKeys = false;
CBasicKeyStore tempKeystore;
if (params.size() > 2 && params[2].type() != null_type)
{
fGivenKeys = true;
Array keys = params[2].get_array();
BOOST_FOREACH(Value k, keys)
{
CBitcoinSecret vchSecret;
bool fGood = vchSecret.SetString(k.get_str());
if (!fGood)
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY,"Invalid private key");
CKey key;
bool fCompressed;
CSecret secret = vchSecret.GetSecret(fCompressed);
key.SetSecret(secret, fCompressed);
tempKeystore.AddKey(key);
}
}
else
EnsureWalletIsUnlocked();
const CKeyStore& keystore = (fGivenKeys ? tempKeystore : *pwalletMain);
int nHashType = SIGHASH_ALL;
if (params.size() > 3 && params[3].type() != null_type)
{
static map<string, int> mapSigHashValues =
boost::assign::map_list_of
(string("ALL"), int(SIGHASH_ALL))
(string("ALL|ANYONECANPAY"), int(SIGHASH_ALL|SIGHASH_ANYONECANPAY))
(string("NONE"), int(SIGHASH_NONE))
(string("NONE|ANYONECANPAY"), int(SIGHASH_NONE|SIGHASH_ANYONECANPAY))
(string("SINGLE"), int(SIGHASH_SINGLE))
(string("SINGLE|ANYONECANPAY"), int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY))
;
string strHashType = params[3].get_str();
if (mapSigHashValues.count(strHashType))
nHashType = mapSigHashValues[strHashType];
else
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid sighash param");
}
bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE);
// Sign what we can:
for (unsigned int i = 0; i < mergedTx.vin.size(); i++)
{
CTxIn& txin = mergedTx.vin[i];
if (mapPrevOut.count(txin.prevout) == 0)
{
fComplete = false;
continue;
}
const CScript& prevPubKey = mapPrevOut[txin.prevout];
txin.scriptSig.clear();
// Only sign SIGHASH_SINGLE if there's a corresponding output:
if (!fHashSingle || (i < mergedTx.vout.size()))
SignSignature(keystore, prevPubKey, mergedTx, i, nHashType);
// ... and merge in other signatures:
BOOST_FOREACH(const CTransaction& txv, txVariants)
{
txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
}
if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, 0))
fComplete = false;
}
Object result;
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
ssTx << mergedTx;
result.push_back(Pair("hex", HexStr(ssTx.begin(), ssTx.end())));
result.push_back(Pair("complete", fComplete));
return result;
}
Value sendrawtransaction(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 1)
throw runtime_error(
"sendrawtransaction <hex string>\n"
"Submits raw transaction (serialized, hex-encoded) to local node and network.");
RPCTypeCheck(params, list_of(str_type));
// parse hex string from parameter
vector<unsigned char> txData(ParseHex(params[0].get_str()));
CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
CTransaction tx;
// deserialize binary data stream
try {
ssData >> tx;
}
catch (std::exception &e) {
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
}
uint256 hashTx = tx.GetHash();
// See if the transaction is already in a block
// or in the memory pool:
CTransaction existingTx;
uint256 hashBlock = 0;
if (GetTransaction(hashTx, existingTx, hashBlock))
{
if (hashBlock != 0)
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("transaction already in block ")+hashBlock.GetHex());
// Not in block, but already in the memory pool; will drop
// through to re-relay it.
}
else
{
// push to local node
CTxDB txdb("r");
if (!tx.AcceptToMemoryPool(txdb))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX rejected");
SyncWithWallets(tx, NULL, true);
}
RelayTransaction(tx, hashTx);
return hashTx.GetHex();
}
| [
"onyx@carsencustoms.com"
] | onyx@carsencustoms.com |
01e70b02579d5d10bcc9e44bfa6494d128d3ef41 | 29b81bdc013d76b057a2ba12e912d6d4c5b033ef | /boost/include/boost/gil/extension/io/io_error.hpp | ceb4a15214b31c3f6fe60072456bb1c74175c035 | [] | 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:0e399cae8f216763b202d3b38a9fb2db1ca68a7fdc97e9416fcee04912b22592
size 1566
| [
"you@example.com"
] | you@example.com |
db4536a17a1e4418159037e208a3c27f25a9b14b | 0e007b1afb6ce6d5522a7471fef740439f56011d | /base-usage/cplusplus/client-server/test_client2.cpp | 4e7feb9da7d4f681192e5b05b242c2983948ee61 | [
"Unlicense"
] | permissive | sczzq/symmetrical-spoon | 9ab7813c5238bb43a1c4e60244781f05bc422470 | aa0c27bb40a482789c7c6a7088307320a007b49b | refs/heads/master | 2021-06-03T21:00:45.448102 | 2020-09-01T07:12:55 | 2020-09-01T07:12:55 | 90,471,406 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,791 | cpp | /*************************************************************************
> File Name: test_client2.cpp
> Author: ziqiang
> Mail: ziqiang_free@163.com
> Created Time: Mon 08 May 2017 09:54:35 PM CST
************************************************************************/
#include <iostream>
using namespace std;
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/shm.h>
#define MYPORT 7000
#define BUFFER_SIZE 1024
int main()
{
int sock_cli;
fd_set rfds;
struct timeval tv;
int retval, maxfd;
///定义sockfd
sock_cli = socket(AF_INET,SOCK_STREAM, 0);
///定义sockaddr_in
struct sockaddr_in servaddr;
memset(&servaddr, 0, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(MYPORT); ///服务器端口
servaddr.sin_addr.s_addr = inet_addr("127.0.0.1"); ///服务器ip
//连接服务器,成功返回0,错误返回-1
if (connect(sock_cli, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0)
{
perror("connect");
exit(1);
}
while(1){
/*把可读文件描述符的集合清空*/
FD_ZERO(&rfds);
/*把标准输入的文件描述符加入到集合中*/
FD_SET(0, &rfds);
maxfd = 0;
/*把当前连接的文件描述符加入到集合中*/
FD_SET(sock_cli, &rfds);
/*找出文件描述符集合中最大的文件描述符*/
if(maxfd < sock_cli)
maxfd = sock_cli;
/*设置超时时间*/
tv.tv_sec = 5;
tv.tv_usec = 0;
/*等待聊天*/
retval = select(maxfd+1, &rfds, NULL, NULL, &tv);
if(retval == -1){
printf("select出错,客户端程序退出\n");
break;
}else if(retval == 0){
printf("客户端没有任何输入信息,并且服务器也没有信息到来,waiting...\n");
continue;
}else{
/*服务器发来了消息*/
if(FD_ISSET(sock_cli,&rfds)){
char recvbuf[BUFFER_SIZE];
int len;
len = recv(sock_cli, recvbuf, sizeof(recvbuf),0);
printf("%s", recvbuf);
memset(recvbuf, 0, sizeof(recvbuf));
}
/*用户输入信息了,开始处理信息并发送*/
if(FD_ISSET(0, &rfds)){
char sendbuf[BUFFER_SIZE];
fgets(sendbuf, sizeof(sendbuf), stdin);
send(sock_cli, sendbuf, strlen(sendbuf),0); //发送
memset(sendbuf, 0, sizeof(sendbuf));
}
}
}
close(sock_cli);
return 0;
}
| [
"ziqiang_free@163.com"
] | ziqiang_free@163.com |
c19d4792102ca2b1594e9282fac7fcb821280a6c | 8a7f7233a07c758242dc9f864fad6e52d33f3e10 | /src/blockchain_utilities/cn_deserialize.cpp | 939d84421bea062cfb115fd1aa33474f7626328a | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | uniblockchain/ultrapoint-core | cbf3304cdd8d21fb3e0c55ebb01d7b3ff9e4482d | bd88de3b0aa45a666b19a3f79d50b0d4728417ce | refs/heads/master | 2021-08-31T06:05:44.452980 | 2017-12-16T11:13:04 | 2017-12-16T11:24:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,172 | cpp | // Copyright (c) 2014-2017, The Monero Project
//
// 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 "cryptonote_basic/cryptonote_basic.h"
#include "cryptonote_basic/tx_extra.h"
#include "cryptonote_core/blockchain.h"
#include "blockchain_utilities.h"
#include "common/command_line.h"
#include "version.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
using namespace epee;
using namespace cryptonote;
int main(int argc, char* argv[])
{
uint32_t log_level = 0;
std::string input;
tools::sanitize_locale();
boost::filesystem::path output_file_path;
po::options_description desc_cmd_only("Command line options");
po::options_description desc_cmd_sett("Command line options and settings options");
const command_line::arg_descriptor<std::string> arg_output_file = {"output-file", "Specify output file", "", true};
const command_line::arg_descriptor<uint32_t> arg_log_level = {"log-level", "", log_level};
const command_line::arg_descriptor<std::string> arg_input = {"input", "Specify input has a hexadecimal string", ""};
command_line::add_arg(desc_cmd_sett, arg_output_file);
command_line::add_arg(desc_cmd_sett, arg_log_level);
command_line::add_arg(desc_cmd_sett, arg_input);
command_line::add_arg(desc_cmd_only, command_line::arg_help);
po::options_description desc_options("Allowed options");
desc_options.add(desc_cmd_only).add(desc_cmd_sett);
po::variables_map vm;
bool r = command_line::handle_error_helper(desc_options, [&]()
{
po::store(po::parse_command_line(argc, argv, desc_options), vm);
po::notify(vm);
return true;
});
if (! r)
return 1;
if (command_line::get_arg(vm, command_line::arg_help))
{
std::cout << "Ultrapoint '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
log_level = command_line::get_arg(vm, arg_log_level);
input = command_line::get_arg(vm, arg_input);
if (input.empty())
{
std::cerr << "--input is mandatory" << std::endl;
return 1;
}
mlog_configure("", true);
std::string m_config_folder;
std::ostream *output;
std::ofstream *raw_data_file = NULL;
if (command_line::has_arg(vm, arg_output_file))
{
output_file_path = boost::filesystem::path(command_line::get_arg(vm, arg_output_file));
const boost::filesystem::path dir_path = output_file_path.parent_path();
if (!dir_path.empty())
{
if (boost::filesystem::exists(dir_path))
{
if (!boost::filesystem::is_directory(dir_path))
{
std::cerr << "output directory path is a file: " << dir_path << std::endl;
return 1;
}
}
else
{
if (!boost::filesystem::create_directory(dir_path))
{
std::cerr << "Failed to create directory " << dir_path << std::endl;
return 1;
}
}
}
raw_data_file = new std::ofstream();
raw_data_file->open(output_file_path.string(), std::ios_base::out | std::ios::trunc);
if (raw_data_file->fail())
return 1;
output = raw_data_file;
}
else
{
output_file_path = "";
output = &std::cout;
}
cryptonote::blobdata blob;
if (!epee::string_tools::parse_hexstr_to_binbuff(input, blob))
{
std::cerr << "Invalid hex input" << std::endl;
std::cerr << "Invalid hex input: " << input << std::endl;
return 1;
}
cryptonote::block block;
cryptonote::transaction tx;
std::vector<cryptonote::tx_extra_field> fields;
if (cryptonote::parse_and_validate_block_from_blob(blob, block))
{
std::cout << "Parsed block:" << std::endl;
std::cout << cryptonote::obj_to_json_str(block) << std::endl;
}
else if (cryptonote::parse_and_validate_tx_from_blob(blob, tx))
{
std::cout << "Parsed transaction:" << std::endl;
std::cout << cryptonote::obj_to_json_str(tx) << std::endl;
if (cryptonote::parse_tx_extra(tx.extra, fields))
{
std::cout << "tx_extra has " << fields.size() << " field(s)" << std::endl;
for (size_t n = 0; n < fields.size(); ++n)
{
std::cout << "field " << n << ": ";
if (typeid(cryptonote::tx_extra_padding) == fields[n].type()) std::cout << "extra padding: " << boost::get<cryptonote::tx_extra_padding>(fields[n]).size << " bytes";
else if (typeid(cryptonote::tx_extra_pub_key) == fields[n].type()) std::cout << "extra pub key: " << boost::get<cryptonote::tx_extra_pub_key>(fields[n]).pub_key;
else if (typeid(cryptonote::tx_extra_nonce) == fields[n].type()) std::cout << "extra nonce: " << epee::string_tools::buff_to_hex_nodelimer(boost::get<cryptonote::tx_extra_nonce>(fields[n]).nonce);
else if (typeid(cryptonote::tx_extra_merge_mining_tag) == fields[n].type()) std::cout << "extra merge mining tag: depth " << boost::get<cryptonote::tx_extra_merge_mining_tag>(fields[n]).depth << ", merkle root " << boost::get<cryptonote::tx_extra_merge_mining_tag>(fields[n]).merkle_root;
else if (typeid(cryptonote::tx_extra_mysterious_minergate) == fields[n].type()) std::cout << "extra minergate custom: " << epee::string_tools::buff_to_hex_nodelimer(boost::get<cryptonote::tx_extra_mysterious_minergate>(fields[n]).data);
else std::cout << "unknown";
std::cout << std::endl;
}
}
else
{
std::cout << "Failed to parse tx_extra" << std::endl;
}
}
else
{
std::cerr << "Not a recognized CN type" << std::endl;
return 1;
}
if (output->fail())
return 1;
output->flush();
if (raw_data_file)
delete raw_data_file;
return 0;
}
| [
"devtnga@gmail.com"
] | devtnga@gmail.com |
89a0da2b7641816defe5d1e0f88bc284de366f75 | 579f6399b3f8238eee552b8a70b5940db894a3eb | /koryakin.afanasy/A1/circle.hpp | 555dd8773eab5a4434f7a3cdad6f284427bf1557 | [] | no_license | a-kashirin-official/spbspu-labs-2018 | 9ac7b7abaa626d07497104f20f7ed7feb6359ecf | aac2bb38fe61c12114975f034b498a116e7075c3 | refs/heads/master | 2020-03-19T04:18:15.774227 | 2018-12-02T22:21:38 | 2018-12-02T22:21:38 | 135,814,536 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 408 | hpp | #ifndef CIRCLE_H
#define CIRCLE_H
#include "shape.hpp"
#include "base-types.hpp"
class Circle : public Shape
{
public:
Circle(const point_t ¢er, const double radius);
double getArea() const override;
rectangle_t getFrameRect() const override;
void move(const double dx, const double dy) override;
void move(const point_t &p) override;
private:
point_t center_;
double radius_;
};
#endif
| [
"a.kashirin.official@gmail.com"
] | a.kashirin.official@gmail.com |
c36bb2366deea47d0fad8d374f0a67bc337b0b0e | 063e25de1aebb2b22f8f79416377a5a7de991df4 | /StepTest.cpp | 3b92302a71222b247f777e3c38f48ab94002af71 | [] | no_license | samsaradog/tttcpp | f1f0dae8b74cf26338ac04d6a7e9f44acb0797dd | a6aa12d25501d4a754c2b5a134f779448237c644 | refs/heads/master | 2020-06-06T16:49:54.153975 | 2012-08-09T20:40:28 | 2012-08-09T20:40:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,696 | cpp | // file StepTest.cpp
#include <iostream>
#include <cppunit/config/SourcePrefix.h>
#include "StepTest.h"
#include "StepFactory.h"
CPPUNIT_TEST_SUITE_REGISTRATION( StepTest );
//---------------------------------------------------------------
void StepTest::setUp()
{
StepFactory the_factory;
step_m_p = the_factory.getSteps();
}
//---------------------------------------------------------------
void StepTest::tearDown()
{
if ( NULL != step_m_p )
{
delete step_m_p;
step_m_p = NULL;
}
}
//---------------------------------------------------------------
// This step checks for a valid user move
void StepTest::testStep1()
{
game_m.addMove(1, &human_m);
string message("");
bool keep_playing =
step_m_p->makeMove(1, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message ==
"Square 2 not available. Please choose another.\n" );
CPPUNIT_ASSERT( keep_playing );
}
//---------------------------------------------------------------
// This step says that if adding the human move means the
// human wins, announce the win and end the game.
void StepTest::testStep2()
{
game_m.addMove(2, &human_m);
game_m.addMove(3, &human_m);
string message("");
bool keep_playing =
step_m_p->makeMove(4, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message == "The Human has won. Congratulations!\n");
CPPUNIT_ASSERT( !keep_playing );
}
//---------------------------------------------------------------
// This step says that if there is no move left after the human
// moves, declare a draw and end the game.
void StepTest::testStep3()
{
for ( int i = 1; i < 9; i++ )
game_m.addMove(i, &computer_m);
string message("");
bool keep_playing =
step_m_p->makeMove(0, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message == "Draw Game.\n");
CPPUNIT_ASSERT( !keep_playing );
}
//---------------------------------------------------------------
// This step checks whether the computer can make a winning move.
// If so, make the move and announce the win.
void StepTest::testStep4()
{
game_m.addMove(3, &computer_m);
game_m.addMove(8, &computer_m);
string message("");
bool keep_playing =
step_m_p->makeMove(1, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message == "Computer Wins!\n" );
CPPUNIT_ASSERT( !keep_playing );
}
//---------------------------------------------------------------
// This step is for the computer making a blocking move. This first
// version is when the blocking move is the last available, creating
// a draw
void StepTest::testStep5a()
{
game_m.addMove(0, &computer_m);
game_m.addMove(1, &computer_m);
game_m.addMove(3, &computer_m);
game_m.addMove(8, &computer_m);
game_m.addMove(2, &human_m);
game_m.addMove(4, &human_m);
game_m.addMove(7, &human_m);
string message("");
bool keep_playing =
step_m_p->makeMove(5, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message == "Draw Game.\n" );
CPPUNIT_ASSERT( !keep_playing );
}
//---------------------------------------------------------------
// This next case is as above, but the game can continue
void StepTest::testStep5b()
{
game_m.addMove(3, &computer_m);
game_m.addMove(8, &computer_m);
game_m.addMove(2, &human_m);
game_m.addMove(7, &human_m);
string message("");
bool keep_playing =
step_m_p->makeMove(6, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message == "" );
CPPUNIT_ASSERT( keep_playing );
}
//---------------------------------------------------------------
// This step is the last in the chain. It has the computer pick
// a square based on its rules. The first case creates a draw.
void StepTest::testLastStepA()
{
game_m.addMove(1, &computer_m);
game_m.addMove(4, &computer_m);
game_m.addMove(6, &computer_m);
game_m.addMove(8, &computer_m);
game_m.addMove(2, &human_m);
game_m.addMove(3, &human_m);
game_m.addMove(5, &human_m);
string message("");
bool keep_playing =
step_m_p->makeMove(0, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message == "Draw Game.\n" );
CPPUNIT_ASSERT( !keep_playing );
}
//---------------------------------------------------------------
// This case does not create a draw
void StepTest::testLastStepB()
{
game_m.addMove(1, &computer_m);
game_m.addMove(3, &human_m);
string message("");
bool keep_playing =
step_m_p->makeMove(6, message, &human_m, &computer_m, &game_m);
CPPUNIT_ASSERT( message == "" );
CPPUNIT_ASSERT( keep_playing );
}
//---------------------------------------------------------------
| [
"shinkyo@iglou.com"
] | shinkyo@iglou.com |
da643a5bfdda54a804f507a3a76825f405432a6e | 381d916e2203ec6c770432ea05326ddf1c2f9c2a | /te0711_prj.srcs/sources_1/bd/design_1/ip/design_1_axi_smc_0/sim/design_1_axi_smc_0_sc.h | e08958568520dfccca58e03d7813789d5b29ed23 | [] | no_license | wknitter/te0711_prj | a9effa207176cecfee450ce149269df18de201aa | d9cf337a411de0fd2f58487c8ca9213d170ceeda | refs/heads/main | 2023-04-25T00:06:32.129719 | 2021-05-18T17:57:16 | 2021-05-18T17:57:16 | 357,305,325 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,452 | h | #ifndef IP_DESIGN_1_AXI_SMC_0_SC_H_
#define IP_DESIGN_1_AXI_SMC_0_SC_H_
// (c) Copyright 1995-2021 Xilinx, Inc. All rights reserved.
//
// This file contains confidential and proprietary information
// of Xilinx, Inc. and is protected under U.S. and
// international copyright and other intellectual property
// laws.
//
// DISCLAIMER
// This disclaimer is not a license and does not grant any
// rights to the materials distributed herewith. Except as
// otherwise provided in a valid license issued to you by
// Xilinx, and to the maximum extent permitted by applicable
// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
// (2) Xilinx shall not be liable (whether in contract or tort,
// including negligence, or under any other theory of
// liability) for any loss or damage of any kind or nature
// related to, arising under or in connection with these
// materials, including for any direct, or any indirect,
// special, incidental, or consequential loss or damage
// (including loss of data, profits, goodwill, or any type of
// loss or damage suffered as a result of any action brought
// by a third party) even if such damage or loss was
// reasonably foreseeable or Xilinx had been advised of the
// possibility of the same.
//
// CRITICAL APPLICATIONS
// Xilinx products are not designed or intended to be fail-
// safe, or for use in any application requiring fail-safe
// performance, such as life-support or safety devices or
// systems, Class III medical devices, nuclear facilities,
// applications related to the deployment of airbags, or any
// other applications that could lead to death, personal
// injury, or severe property or environmental damage
// (individually and collectively, "Critical
// Applications"). Customer assumes the sole risk and
// liability of any use of Xilinx products in Critical
// Applications, subject only to applicable laws and
// regulations governing limitations on product liability.
//
// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
// PART OF THIS FILE AT ALL TIMES.
//
// DO NOT MODIFY THIS FILE.
#ifndef XTLM
#include "xtlm.h"
#endif
#ifndef SYSTEMC_INCLUDED
#include <systemc>
#endif
#if defined(_MSC_VER)
#define DllExport __declspec(dllexport)
#elif defined(__GNUC__)
#define DllExport __attribute__ ((visibility("default")))
#else
#define DllExport
#endif
class smartconnect;
class DllExport design_1_axi_smc_0_sc : public sc_core::sc_module
{
public:
design_1_axi_smc_0_sc(const sc_core::sc_module_name& nm);
virtual ~design_1_axi_smc_0_sc();
public: // module socket-to-socket TLM interface
xtlm::xtlm_aximm_target_socket* S00_AXI_tlm_aximm_read_socket;
xtlm::xtlm_aximm_target_socket* S00_AXI_tlm_aximm_write_socket;
xtlm::xtlm_aximm_target_socket* S01_AXI_tlm_aximm_read_socket;
xtlm::xtlm_aximm_target_socket* S01_AXI_tlm_aximm_write_socket;
xtlm::xtlm_aximm_initiator_socket* M00_AXI_tlm_aximm_read_socket;
xtlm::xtlm_aximm_initiator_socket* M00_AXI_tlm_aximm_write_socket;
protected:
smartconnect* mp_impl;
private:
design_1_axi_smc_0_sc(const design_1_axi_smc_0_sc&);
const design_1_axi_smc_0_sc& operator=(const design_1_axi_smc_0_sc&);
};
#endif // IP_DESIGN_1_AXI_SMC_0_SC_H_
| [
"whitney@knitronics.com"
] | whitney@knitronics.com |
42b1f608891e0735fa399b2fb7a20715581000ac | e593f2d1c721abe179fe9c89ab4f1aa6081a00b8 | /rand_test.hpp | 8c4cccda66a193fb9186bcda4ede2df33737f94e | [] | no_license | jquac015/CS100-lab4 | 5207bde57ae37287aadbd45ddd1be592491dd201 | 3b508bfb4d53c6370cf42088da4b869c196f5d17 | refs/heads/master | 2023-02-03T09:38:39.291038 | 2020-11-05T19:40:08 | 2020-11-05T19:40:08 | 322,056,187 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 233 | hpp | #ifndef __RAND_TEST_HPP__
#define __RAND_TEST_HPP__
#include "gtest/gtest.h"
#include "rand.hpp"
TEST(RandTest, RandEvaluate) {
Rand* test = new Rand();
EXPECT_NEAR(1, test->evaluate(), 100);
}
#endif //__RAND_TEST_HPP__
| [
"jquac015@ucr.edu"
] | jquac015@ucr.edu |
1f750285c7d8ff23d3154faf133df719b5afcf0f | 4352b5c9e6719d762e6a80e7a7799630d819bca3 | /tutorials/eulerVortex.twitch/eulerVortex.cyclic.twitch/4.83/p | fd80026168f20e562a72877bc8b54a1b33695528 | [] | no_license | dashqua/epicProject | d6214b57c545110d08ad053e68bc095f1d4dc725 | 54afca50a61c20c541ef43e3d96408ef72f0bcbc | refs/heads/master | 2022-02-28T17:20:20.291864 | 2019-10-28T13:33:16 | 2019-10-28T13:33:16 | 184,294,390 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 69,356 | /*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "4.83";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField nonuniform List<scalar>
10000
(
0.999985
0.999988
0.999991
0.999993
0.999995
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00002
1.00003
1.00004
1.00004
1.00005
1.00005
1.00006
1.00007
1.0001
1.00018
1.00031
1.00055
1.00092
1.00146
1.0022
1.00315
1.00432
1.00567
1.00717
1.00876
1.01039
1.01198
1.01349
1.01486
1.01605
1.01704
1.0178
1.01834
1.01864
1.01871
1.01855
1.01817
1.01756
1.01673
1.01569
1.01445
1.01306
1.01156
1.01
1.00845
1.00697
1.00561
1.00441
1.00338
1.00252
1.00184
1.0013
1.00089
1.00059
1.00037
1.00022
1.00012
1.00006
1.00002
0.999995
0.999985
0.999982
0.999982
0.999979
0.999983
0.999987
0.999991
0.999993
0.999996
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00002
1.00003
1.00004
1.00005
1.00006
1.00007
1.00008
1.00009
1.00013
1.0002
1.00033
1.00057
1.00096
1.00155
1.00238
1.00348
1.00485
1.00648
1.00832
1.0103
1.01234
1.01436
1.01628
1.01804
1.01959
1.02089
1.02194
1.02273
1.02326
1.02356
1.02361
1.02344
1.02304
1.0224
1.02152
1.02039
1.01901
1.0174
1.0156
1.01367
1.0117
1.00976
1.00793
1.00628
1.00485
1.00364
1.00266
1.00189
1.0013
1.00086
1.00055
1.00033
1.00018
1.00009
1.00003
0.999998
0.999982
0.999976
0.999977
0.999973
0.999977
0.999983
0.999987
0.999991
0.999994
0.999996
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00004
1.00005
1.00007
1.00008
1.00009
1.00011
1.00015
1.00021
1.00034
1.00057
1.00096
1.00158
1.00248
1.00371
1.00528
1.00719
1.00937
1.01176
1.01424
1.01671
1.01905
1.0212
1.02307
1.02465
1.02591
1.02688
1.02757
1.02801
1.02823
1.02825
1.02808
1.02773
1.02716
1.02636
1.0253
1.02394
1.02227
1.0203
1.01808
1.01571
1.0133
1.01095
1.00877
1.00684
1.00518
1.00382
1.00273
1.00189
1.00126
1.00081
1.00049
1.00028
1.00014
1.00005
1
0.99998
0.999971
0.999969
0.999965
0.999971
0.999977
0.999983
0.999988
0.999992
0.999994
0.999997
0.999998
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00004
1.00005
1.00007
1.00009
1.00011
1.00013
1.00016
1.00022
1.00034
1.00056
1.00094
1.00156
1.0025
1.00382
1.00557
1.00773
1.01026
1.01306
1.01599
1.01891
1.02167
1.02416
1.02631
1.02806
1.02942
1.03042
1.0311
1.03153
1.03175
1.03183
1.03178
1.03164
1.03139
1.03102
1.03048
1.0297
1.02861
1.02714
1.02526
1.02297
1.02037
1.01756
1.01471
1.01196
1.00945
1.00724
1.00539
1.00389
1.00272
1.00183
1.00119
1.00073
1.00042
1.00022
1.00009
1.00002
0.999982
0.999966
0.999962
0.999956
0.999962
0.99997
0.999977
0.999984
0.999989
0.999992
0.999995
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00005
1.00007
1.00009
1.00012
1.00014
1.00018
1.00023
1.00034
1.00053
1.00089
1.00148
1.00242
1.0038
1.00568
1.00807
1.01093
1.01413
1.01751
1.02087
1.02403
1.02682
1.02914
1.03094
1.03223
1.03307
1.03353
1.03369
1.03367
1.03355
1.03339
1.03324
1.03313
1.03307
1.03301
1.03291
1.03267
1.03216
1.03126
1.02984
1.02785
1.02532
1.02235
1.01912
1.01585
1.01273
1.0099
1.00746
1.00545
1.00385
1.00263
1.00173
1.00108
1.00064
1.00034
1.00016
1.00005
0.999991
0.999963
0.999955
0.999947
0.999953
0.999962
0.999971
0.999979
0.999985
0.99999
0.999993
0.999996
0.999998
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00005
1.00007
1.00009
1.00012
1.00015
1.00019
1.00024
1.00033
1.00051
1.00082
1.00137
1.00227
1.00365
1.0056
1.00816
1.01131
1.0149
1.01872
1.02252
1.02604
1.02908
1.03148
1.0332
1.03424
1.0347
1.03469
1.03433
1.03378
1.03315
1.03257
1.03211
1.03183
1.03176
1.03192
1.03226
1.03273
1.03323
1.03361
1.03365
1.03316
1.03195
1.02996
1.02723
1.02393
1.02032
1.01666
1.0132
1.01011
1.00749
1.00536
1.00371
1.00247
1.00157
1.00095
1.00053
1.00026
1.0001
1.00001
0.999966
0.999949
0.999939
0.999944
0.999953
0.999964
0.999973
0.999981
0.999987
0.999991
0.999994
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00002
1.00003
1.00004
1.00006
1.00008
1.00011
1.00015
1.00019
1.00024
1.00033
1.00047
1.00074
1.00123
1.00206
1.00338
1.00533
1.008
1.01137
1.01531
1.01955
1.02378
1.02766
1.0309
1.03331
1.03482
1.03546
1.03534
1.03463
1.03352
1.03218
1.03079
1.02949
1.0284
1.0276
1.02718
1.02714
1.02751
1.02826
1.02936
1.0307
1.03213
1.03341
1.03426
1.03436
1.03348
1.03155
1.02866
1.02506
1.02109
1.01709
1.01335
1.01006
1.00732
1.00513
1.00347
1.00225
1.00138
1.0008
1.00042
1.00018
1.00005
0.999977
0.999947
0.999934
0.999935
0.999944
0.999955
0.999966
0.999976
0.999983
0.999989
0.999993
0.999996
0.999997
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00005
1.00008
1.00011
1.00014
1.00019
1.00024
1.00032
1.00044
1.00067
1.00108
1.00181
1.00302
1.0049
1.00758
1.01109
1.01531
1.01996
1.02462
1.02885
1.03228
1.03465
1.03587
1.03599
1.03516
1.03359
1.03154
1.02925
1.02691
1.0247
1.02276
1.0212
1.0201
1.01953
1.01951
1.02005
1.02114
1.02277
1.02488
1.02736
1.02997
1.03239
1.03419
1.03499
1.0345
1.03264
1.02959
1.0257
1.0214
1.01711
1.01316
1.00975
1.00695
1.00478
1.00315
1.00198
1.00117
1.00064
1.00031
1.00011
1
0.999951
0.999933
0.999927
0.999934
0.999946
0.999959
0.99997
0.999979
0.999986
0.999991
0.999994
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00002
1.00003
1.00004
1.00007
1.0001
1.00013
1.00018
1.00023
1.00031
1.00041
1.0006
1.00094
1.00155
1.00262
1.00434
1.00692
1.01047
1.0149
1.0199
1.02498
1.0296
1.03324
1.03558
1.03649
1.03603
1.0344
1.0319
1.02883
1.02549
1.02212
1.01893
1.01606
1.01364
1.01174
1.01041
1.00972
1.00969
1.01032
1.01163
1.01362
1.01628
1.01958
1.02335
1.02729
1.03095
1.03377
1.03526
1.0351
1.03326
1.03001
1.02582
1.02124
1.01673
1.01265
1.0092
1.00643
1.00431
1.00277
1.00168
1.00095
1.00049
1.0002
1.00005
0.999965
0.999939
0.999922
0.999925
0.999937
0.999951
0.999964
0.999974
0.999983
0.999989
0.999993
0.999996
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00005
1.00008
1.00012
1.00016
1.00022
1.00029
1.00038
1.00054
1.00081
1.00131
1.0022
1.00371
1.0061
1.00954
1.01405
1.01934
1.02484
1.02988
1.03381
1.03618
1.03682
1.03579
1.03337
1.02993
1.02584
1.02146
1.01707
1.01292
1.00917
1.00592
1.00324
1.00116
0.999728
0.998964
0.998893
0.999531
1.0009
1.00301
1.00593
1.00968
1.01421
1.01933
1.02464
1.02952
1.03329
1.03535
1.03538
1.03344
1.02993
1.02545
1.02062
1.01598
1.01186
1.00845
1.00578
1.00378
1.00235
1.00138
1.00074
1.00034
1.00012
0.999994
0.999955
0.999922
0.999918
0.999928
0.999942
0.999957
0.999969
0.999979
0.999986
0.999991
0.999995
0.999996
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00003
1.00004
1.00007
1.0001
1.00014
1.0002
1.00027
1.00035
1.00048
1.0007
1.00109
1.00181
1.00308
1.00517
1.00838
1.01281
1.01827
1.02416
1.02968
1.034
1.03652
1.03699
1.03549
1.03235
1.02802
1.02296
1.01761
1.0123
1.00729
1.00276
0.998805
0.99548
0.992796
0.990745
0.989324
0.988541
0.988416
0.988971
0.990235
0.992253
0.995103
0.998889
1.00369
1.00945
1.01591
1.02251
1.02848
1.03299
1.03538
1.03539
1.0332
1.02936
1.02459
1.01959
1.0149
1.01084
1.00756
1.00504
1.00321
1.00193
1.00108
1.00054
1.00022
1.00004
0.999986
0.99993
0.999915
0.99992
0.999934
0.999949
0.999963
0.999975
0.999983
0.999989
0.999993
0.999996
0.999998
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00005
1.00008
1.00012
1.00017
1.00024
1.00032
1.00043
1.0006
1.00091
1.00146
1.00248
1.00424
1.00707
1.01124
1.0167
1.02291
1.02895
1.03379
1.03663
1.03712
1.0353
1.03157
1.02647
1.02055
1.01432
1.00819
1.00245
0.997276
0.992779
0.988994
0.985904
0.983462
0.981615
0.98032
0.979564
0.979362
0.979748
0.980766
0.98248
0.984992
0.988452
0.993035
0.998846
1.0058
1.01351
1.02125
1.02806
1.03299
1.0354
1.03513
1.03253
1.0283
1.02327
1.01818
1.01355
1.00965
1.00657
1.00427
1.00263
1.00152
1.0008
1.00037
1.00012
1.00004
0.999948
0.999916
0.999915
0.999926
0.999942
0.999957
0.99997
0.99998
0.999987
0.999992
0.999995
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00004
1.00006
1.0001
1.00015
1.00021
1.00028
1.00038
1.00052
1.00075
1.00118
1.00196
1.00336
1.00574
1.00947
1.0147
1.02107
1.02761
1.03311
1.0365
1.03724
1.03533
1.0312
1.02547
1.01882
1.01183
1.00498
0.998611
0.99293
0.988045
0.983978
0.980692
0.978106
0.976116
0.974618
0.973537
0.972838
0.97253
0.972658
0.973293
0.974524
0.976475
0.979326
0.983308
0.988654
0.995464
1.00357
1.01239
1.02102
1.02832
1.0333
1.03538
1.03456
1.03141
1.02678
1.02157
1.01649
1.01201
1.00835
1.00554
1.0035
1.00208
1.00115
1.00056
1.00022
1.00011
0.999979
0.999925
0.999913
0.99992
0.999935
0.999951
0.999965
0.999976
0.999984
0.99999
0.999994
0.999996
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00002
1.00003
1.00005
1.00008
1.00012
1.00017
1.00024
1.00033
1.00045
1.00063
1.00095
1.00153
1.0026
1.0045
1.00765
1.0124
1.01867
1.02563
1.03187
1.03604
1.03732
1.03561
1.03131
1.02516
1.01792
1.01029
1.00281
0.995879
0.989763
0.984592
0.980386
0.977087
0.974579
0.972716
0.971336
0.970293
0.96948
0.968846
0.968393
0.968176
0.968293
0.968871
0.970067
0.972087
0.975197
0.979703
0.985854
0.993691
1.00288
1.01264
1.02183
1.02921
1.03379
1.03518
1.03361
1.02984
1.02485
1.01954
1.01458
1.01037
1.00703
1.00453
1.00277
1.00158
1.00082
1.00036
1.00021
1.00003
0.999943
0.999915
0.999916
0.999929
0.999945
0.99996
0.999972
0.999982
0.999988
0.999993
0.999995
0.999998
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00006
1.00009
1.00014
1.0002
1.00028
1.00038
1.00053
1.00077
1.00119
1.00198
1.00343
1.00594
1.01
1.01585
1.02296
1.02995
1.03511
1.03727
1.03608
1.03193
1.02559
1.01793
1.00975
1.00171
0.994259
0.987732
0.982305
0.978027
0.974835
0.972581
0.971072
0.97009
0.969424
0.968892
0.96837
0.967794
0.96716
0.966523
0.965998
0.965754
0.966003
0.966994
0.969023
0.972437
0.977577
0.984653
0.993563
1.00375
1.01418
1.02353
1.0305
1.03426
1.03465
1.03219
1.02781
1.02255
1.01728
1.01257
1.0087
1.00574
1.00359
1.00211
1.00115
1.00055
1.00034
1.00009
0.999972
0.999924
0.999915
0.999925
0.99994
0.999956
0.999969
0.999979
0.999986
0.999992
0.999995
0.999997
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1.00001
1.00001
1.00002
1.00004
1.00007
1.0001
1.00016
1.00023
1.00032
1.00044
1.00062
1.00093
1.00149
1.00255
1.00446
1.00772
1.01282
1.01969
1.02723
1.03353
1.03689
1.03662
1.03297
1.02672
1.01885
1.01025
1.00168
0.993717
0.986753
0.981034
0.976666
0.973611
0.971708
0.970716
0.970354
0.970342
0.970427
0.970412
0.970171
0.969644
0.968819
0.967733
0.966491
0.965288
0.964399
0.964147
0.96489
0.967011
0.970902
0.976881
0.985035
0.99504
1.00606
1.0168
1.02582
1.0319
1.03446
1.03365
1.03026
1.02536
1.01998
1.01489
1.01054
1.00709
1.00453
1.00274
1.00154
1.00079
1.0005
1.00018
1.00001
0.999941
0.999919
0.999922
0.999935
0.999951
0.999965
0.999976
0.999984
0.99999
0.999994
0.999996
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1.00001
1.00002
1.00003
1.00005
1.00008
1.00012
1.00018
1.00026
1.00036
1.0005
1.00073
1.00113
1.00187
1.00326
1.00574
1.00988
1.01605
1.02372
1.03107
1.03593
1.037
1.03425
1.02845
1.02061
1.01174
1.00272
0.994215
0.986746
0.980646
0.976093
0.973109
0.971554
0.971154
0.971554
0.972392
0.973336
0.97412
0.974559
0.974555
0.974075
0.973106
0.971641
0.969726
0.967528
0.965361
0.963651
0.962865
0.963466
0.965899
0.970545
0.977615
0.986979
0.998014
1.00957
1.02017
1.02833
1.03307
1.03414
1.03206
1.02783
1.02258
1.01725
1.01249
1.00858
1.0056
1.00346
1.00201
1.00107
1.0007
1.00029
1.00007
0.999967
0.999927
0.999923
0.999933
0.999947
0.999962
0.999974
0.999983
0.999989
0.999993
0.999996
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1.00001
1.00002
1.00003
1.00005
1.00009
1.00013
1.0002
1.00029
1.00041
1.00057
1.00086
1.00138
1.00234
1.00413
1.00728
1.0124
1.01959
1.02761
1.03406
1.0369
1.03553
1.03057
1.02309
1.01417
1.00478
0.995738
0.987674
0.981052
0.976156
0.97309
0.971771
0.971927
0.97314
0.974935
0.976876
0.978615
0.979913
0.980643
0.980779
0.980349
0.979354
0.977728
0.975388
0.972374
0.968963
0.965664
0.963104
0.961907
0.962624
0.965703
0.971432
0.97982
0.990431
1.00229
1.01396
1.02385
1.03064
1.03367
1.03313
1.02984
1.02496
1.01958
1.01449
1.01017
1.00678
1.00428
1.00255
1.00141
1.00094
1.00043
1.00014
1
0.999942
0.999927
0.999932
0.999945
0.999959
0.999971
0.999981
0.999988
0.999992
0.999995
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
0.999999
1
1
0.999998
1
1
0.999999
1.00001
1
1.00001
1.00002
1.00003
1.00006
1.0001
1.00015
1.00022
1.00032
1.00046
1.00065
1.00101
1.00167
1.00291
1.00517
1.00911
1.01526
1.02323
1.03101
1.03591
1.03646
1.03284
1.02608
1.01739
1.00781
0.998278
0.98955
0.982244
0.97679
0.973413
0.972117
0.972674
0.974637
0.977413
0.980404
0.983132
0.985288
0.986723
0.987431
0.987513
0.987103
0.986253
0.984837
0.982585
0.979282
0.975008
0.970254
0.96581
0.962548
0.961234
0.962451
0.966572
0.973699
0.983534
0.995265
1.00756
1.01878
1.02737
1.03233
1.03345
1.03133
1.02705
1.02178
1.0165
1.01182
1.00803
1.00518
1.00316
1.0018
1.00121
1.00059
1.00023
1.00005
0.999963
0.999934
0.999933
0.999943
0.999957
0.999969
0.999979
0.999986
0.999991
0.999995
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
0.999997
1
1
0.999998
1.00001
1.00001
1.00001
1.00003
1.00004
1.00006
1.00011
1.00017
1.00023
1.00035
1.00051
1.00074
1.00118
1.00203
1.00359
1.0064
1.0112
1.01834
1.02671
1.03361
1.03655
1.03487
1.02933
1.02121
1.0117
1.0018
0.992411
0.984289
0.978037
0.974052
0.972475
0.973165
0.975688
0.979367
0.983411
0.987116
0.99002
0.991932
0.992879
0.993052
0.992738
0.992235
0.991691
0.990954
0.989549
0.986883
0.982632
0.977048
0.970978
0.965576
0.961956
0.960974
0.963166
0.96873
0.977475
0.988715
1.00123
1.01339
1.0235
1.03024
1.03306
1.03225
1.02877
1.0238
1.01845
1.0135
1.00935
1.00614
1.00382
1.00224
1.00152
1.00077
1.00034
1.0001
0.999991
0.999947
0.999937
0.999944
0.999956
0.999968
0.999978
0.999985
0.999991
0.999994
0.999997
0.999998
0.999999
0.999999
1
1
1
0.999999
1
1
0.999998
1
0.999997
1
1
0.999996
1.00001
1.00001
1.00001
1.00003
1.00005
1.00006
1.00012
1.00019
1.00025
1.00038
1.00058
1.00085
1.00137
1.00244
1.00438
1.00781
1.01352
1.02151
1.02977
1.03526
1.03612
1.03245
1.0254
1.01626
1.00621
0.996268
0.987289
0.980039
0.975121
0.972876
0.973318
0.976087
0.98047
0.985503
0.990192
0.993779
0.995909
0.996616
0.996205
0.995137
0.993949
0.99314
0.992995
0.993388
0.993681
0.992868
0.990026
0.984873
0.97804
0.970872
0.964915
0.961472
0.961394
0.965061
0.972393
0.982806
0.995179
1.00792
1.01924
1.02758
1.03205
1.03264
1.03009
1.02559
1.0203
1.01515
1.01069
1.00715
1.00454
1.00272
1.00185
1.00098
1.00046
1.00017
1.00003
0.999963
0.999944
0.999946
0.999956
0.999967
0.999977
0.999984
0.99999
0.999994
0.999997
0.999998
0.999999
0.999999
1
1
1
0.999999
1
1
0.999998
1
0.999997
0.999999
1.00001
0.999995
1
1.00002
1
1.00003
1.00006
1.00006
1.00012
1.00021
1.00027
1.00039
1.00064
1.00097
1.0016
1.00292
1.0053
1.0094
1.01601
1.02455
1.03222
1.03598
1.03486
1.02955
1.0213
1.0114
1.00107
0.991309
0.982981
0.976853
0.973517
0.973228
0.975796
0.980553
0.986417
0.992098
0.996438
0.998726
0.998845
0.997182
0.994414
0.991334
0.988757
0.987397
0.987682
0.989545
0.992264
0.994499
0.99468
0.991719
0.985656
0.977736
0.969883
0.963979
0.961394
0.962843
0.968431
0.977689
0.98958
1.00256
1.01477
1.02449
1.03051
1.03251
1.03101
1.0271
1.022
1.01675
1.01203
1.00819
1.00529
1.00323
1.00221
1.00121
1.0006
1.00025
1.00007
0.999985
0.999954
0.99995
0.999957
0.999967
0.999977
0.999984
0.99999
0.999994
0.999996
0.999998
0.999999
1
0.999999
1
1
1
1
1
0.999997
1
1
0.999995
1.00001
0.999996
0.999999
1.00002
1
1.00002
1.00007
1.00007
1.00011
1.00024
1.0003
1.0004
1.0007
1.00112
1.00185
1.00344
1.00634
1.01115
1.01854
1.02729
1.03397
1.03593
1.03303
1.02638
1.0172
1.00676
0.996338
0.986985
0.97953
0.97474
0.973187
0.974977
0.979619
0.986019
0.992651
0.997918
1.0006
1.00019
0.996966
0.99178
0.985742
0.979996
0.975628
0.973555
0.974325
0.977902
0.983528
0.989673
0.994254
0.99531
0.991949
0.984886
0.976155
0.968219
0.963133
0.962151
0.965701
0.97349
0.984578
0.997466
1.01028
1.02112
1.02855
1.03194
1.03154
1.02832
1.02352
1.01825
1.01335
1.00924
1.00606
1.00377
1.00258
1.00145
1.00075
1.00034
1.00012
1.00001
0.999968
0.999956
0.999959
0.999968
0.999976
0.999984
0.999989
0.999993
0.999996
0.999998
0.999999
0.999999
1
1
1
1
0.999999
1
0.999996
1
1
0.999991
1.00001
1
0.99999
1.00003
1.00001
1.00001
1.00009
1.00009
1.0001
1.00025
1.00033
1.00041
1.00076
1.0013
1.00214
1.00401
1.00748
1.01303
1.02101
1.02959
1.03509
1.03532
1.03085
1.02311
1.01323
1.00242
0.992079
0.98333
0.976944
0.973664
0.974014
0.97788
0.984334
0.991738
0.998102
1.00164
1.00124
0.996781
0.989039
0.979395
0.969393
0.960502
0.954069
0.951228
0.952639
0.958237
0.967148
0.977708
0.987541
0.994003
0.995161
0.990813
0.982677
0.973587
0.966341
0.962914
0.964234
0.970289
0.980285
0.992786
1.0059
1.01763
1.0263
1.03099
1.03171
1.02926
1.02484
1.01965
1.01461
1.01026
1.00684
1.00432
1.00297
1.0017
1.0009
1.00043
1.00017
1.00004
0.999984
0.999964
0.999963
0.999969
0.999977
0.999984
0.999989
0.999993
0.999996
0.999998
0.999999
0.999999
1
1
1
1
0.999998
1
0.999997
0.999999
1.00001
0.999987
1.00001
1.00001
0.99998
1.00003
1.00003
0.99999
1.00009
1.00011
1.00008
1.00024
1.00038
1.00042
1.00079
1.0015
1.00248
1.00461
1.00869
1.01499
1.0233
1.0314
1.03567
1.03432
1.02845
1.01983
1.00947
0.998446
0.988325
0.980344
0.975193
0.973531
0.975806
0.981587
0.989356
0.996843
1.0017
1.00216
0.99745
0.987879
0.97474
0.959896
0.945293
0.932721
0.923843
0.920123
0.922432
0.930618
0.943474
0.959006
0.974624
0.987306
0.994296
0.994323
0.988381
0.979319
0.970565
0.96491
0.963952
0.968095
0.976763
0.988615
1.00177
1.01414
1.02386
1.02975
1.03156
1.02992
1.02595
1.0209
1.01579
1.01126
1.00761
1.00488
1.00335
1.00196
1.00107
1.00054
1.00023
1.00008
1
0.999974
0.999968
0.999972
0.999978
0.999984
0.99999
0.999993
0.999996
0.999998
0.999998
0.999999
1
1
1
1
0.999997
1
0.999999
0.999995
1.00001
0.999987
1
1.00002
0.999975
1.00002
1.00005
0.999978
1.00007
1.00015
1.00007
1.00021
1.00044
1.00045
1.0008
1.0017
1.00288
1.00522
1.00992
1.01695
1.02535
1.03273
1.03582
1.03311
1.02596
1.01659
1.00599
0.994914
0.985083
0.97799
0.974207
0.974198
0.978292
0.985658
0.99403
1.00051
1.00264
0.998973
0.98911
0.973703
0.954381
0.933409
0.913172
0.895914
0.88379
0.878823
0.882312
0.894048
0.912168
0.93386
0.956061
0.975563
0.989199
0.994818
0.992492
0.984716
0.975298
0.967829
0.964693
0.966846
0.974018
0.98501
0.997976
1.01076
1.02134
1.0283
1.03116
1.03032
1.02686
1.02201
1.01688
1.0122
1.00836
1.00543
1.00373
1.00222
1.00124
1.00064
1.0003
1.00011
1.00002
0.999987
0.999974
0.999975
0.99998
0.999985
0.99999
0.999993
0.999996
0.999998
0.999998
0.999999
1
1
0.999999
1
0.999997
1
1
0.99999
1.00001
0.999993
0.999989
1.00003
0.999978
0.999997
1.00008
0.99998
1.00003
1.00019
1.00007
1.00015
1.00048
1.00051
1.00079
1.00189
1.00334
1.00588
1.01111
1.01885
1.02717
1.03362
1.03563
1.03179
1.02351
1.01347
1.00281
0.991864
0.982343
0.976195
0.973881
0.975482
0.981151
0.989615
0.997757
1.00218
1.00066
0.992266
0.976802
0.954873
0.928191
0.89947
0.871826
0.848273
0.831695
0.824883
0.829838
0.846425
0.871836
0.901764
0.932068
0.959261
0.980162
0.992192
0.994593
0.989257
0.980085
0.971343
0.966252
0.966431
0.97201
0.981985
0.994569
1.00757
1.01883
1.02673
1.03055
1.03051
1.02757
1.02297
1.01786
1.01308
1.00907
1.00597
1.0041
1.00247
1.00141
1.00075
1.00037
1.00016
1.00005
1
0.999982
0.999979
0.999982
0.999986
0.999991
0.999994
0.999996
0.999998
0.999999
0.999999
1
1
0.999999
1
0.999998
1
1.00001
0.999988
1.00001
1
0.999976
1.00004
0.999993
0.999969
1.00009
1
0.999984
1.00021
1.00011
1.00008
1.00049
1.00062
1.00078
1.00202
1.00385
1.00658
1.01221
1.02059
1.02878
1.03418
1.03512
1.03047
1.02122
1.01048
0.999938
0.989324
0.980091
0.974851
0.974077
0.977177
0.984039
0.993015
1.00014
1.0017
0.996055
0.98275
0.961338
0.931817
0.895831
0.856951
0.819655
0.788118
0.765991
0.756831
0.763555
0.786342
0.821314
0.862073
0.902632
0.938816
0.967635
0.986614
0.99452
0.992589
0.984546
0.975142
0.968411
0.966714
0.970669
0.979523
0.99158
1.00463
1.0164
1.0251
1.02979
1.03051
1.02809
1.02377
1.01874
1.01388
1.00973
1.00648
1.00445
1.00271
1.00157
1.00086
1.00043
1.0002
1.00007
1.00002
0.999992
0.999985
0.999985
0.999988
0.999992
0.999994
0.999996
0.999998
0.999999
0.999999
1
0.999999
1
1
1
0.999997
1.00001
0.999989
1
1.00002
0.999968
1.00003
1.00002
0.999945
1.00008
1.00005
0.999937
1.00019
1.00018
1.00002
1.00045
1.00075
1.00081
1.00208
1.00435
1.00735
1.01319
1.02209
1.03023
1.03452
1.03435
1.02917
1.01922
1.00771
0.997287
0.987285
0.978335
0.973835
0.97462
0.979087
0.986644
0.995537
1.0011
0.999384
0.989474
0.971253
0.943363
0.90463
0.856803
0.805195
0.756461
0.716066
0.688035
0.676446
0.685267
0.715221
0.761455
0.815269
0.86823
0.914871
0.952285
0.978518
0.992347
0.994506
0.988366
0.97893
0.970945
0.967543
0.969906
0.977588
0.989014
1.00197
1.01411
1.02348
1.02894
1.03036
1.02846
1.02443
1.01949
1.01459
1.01033
1.00695
1.00477
1.00294
1.00172
1.00096
1.0005
1.00024
1.0001
1.00003
1
0.99999
0.999989
0.99999
0.999993
0.999995
0.999997
0.999998
0.999999
0.999999
1
0.999999
1
1
1
0.999996
1.00001
0.999994
0.999995
1.00002
0.999971
1.00001
1.00004
0.999937
1.00005
1.0001
0.999915
1.00013
1.00026
0.999996
1.00034
1.00086
1.00092
1.00208
1.00478
1.00818
1.01409
1.02329
1.0315
1.03478
1.0334
1.02785
1.01762
1.00526
0.994775
0.985674
0.977103
0.973027
0.975302
0.981044
0.988748
0.997033
1.00085
0.995798
0.98163
0.958425
0.923339
0.873607
0.811642
0.745629
0.68499
0.636098
0.602684
0.589138
0.600458
0.63785
0.695759
0.763556
0.830247
0.888498
0.935064
0.968632
0.988436
0.995009
0.991333
0.982438
0.97362
0.968751
0.969615
0.976125
0.986859
0.999628
1.01201
1.02192
1.02805
1.0301
1.02869
1.02495
1.02012
1.01521
1.01087
1.00737
1.00505
1.00314
1.00187
1.00106
1.00056
1.00028
1.00013
1.00005
1.00001
0.999997
0.999992
0.999993
0.999994
0.999996
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
0.999996
1.00001
1
0.999988
1.00002
0.999983
0.999988
1.00006
0.999952
1
1.00013
0.999932
1.00004
1.0003
1.00003
1.00021
1.00092
1.00111
1.00208
1.00507
1.00902
1.01496
1.02416
1.03251
1.03509
1.03241
1.02644
1.01639
1.00331
0.992354
0.984319
0.976439
0.972373
0.975875
0.982918
0.990296
0.997524
0.999753
0.991593
0.973107
0.944732
0.901906
0.840068
0.762915
0.682377
0.610694
0.554461
0.516775
0.502368
0.516761
0.56109
0.629556
0.710541
0.790907
0.861125
0.917055
0.957824
0.983362
0.994326
0.993391
0.985471
0.976222
0.970161
0.969675
0.975064
0.98509
0.997603
1.01013
1.02047
1.02717
1.02977
1.0288
1.02534
1.02063
1.01574
1.01133
1.00775
1.0053
1.00333
1.002
1.00115
1.00063
1.00032
1.00015
1.00007
1.00002
1
0.999997
0.999996
0.999995
0.999997
0.999998
0.999998
0.999999
0.999999
1
1
1
1
1
0.999998
1
1
0.999987
1.00002
0.999999
0.999974
1.00005
0.999983
0.999963
1.00012
0.999983
0.999963
1.00028
1.00012
1.0001
1.00087
1.00132
1.00215
1.0052
1.00977
1.01585
1.02478
1.03319
1.03549
1.0316
1.02491
1.01537
1.00206
0.990123
0.982954
0.976316
0.971943
0.976088
0.984579
0.991415
0.997139
0.998139
0.987365
0.964429
0.930636
0.880177
0.806645
0.715125
0.621413
0.540162
0.47788
0.437492
0.423993
0.442029
0.491967
0.568552
0.660406
0.752979
0.834484
0.8994
0.946936
0.977733
0.992794
0.994619
0.98793
0.978581
0.97161
0.96996
0.974327
0.98367
0.995894
1.00849
1.01916
1.02632
1.0294
1.02882
1.02561
1.02104
1.01616
1.01172
1.00807
1.0055
1.00348
1.00211
1.00123
1.00068
1.00036
1.00018
1.00008
1.00003
1.00001
1
0.999999
0.999997
0.999998
0.999999
0.999999
1
0.999999
1
0.999999
1
1
1
1
1
1
0.999993
1.00001
1.00001
0.999975
1.00003
1.00001
0.999949
1.00009
1.00004
0.999925
1.0002
1.00021
1.00007
1.00073
1.00149
1.00232
1.00523
1.0103
1.01675
1.02528
1.03349
1.03588
1.03119
1.0234
1.0143
1.00152
0.988378
0.981336
0.976522
0.971946
0.975788
0.985809
0.992382
0.996112
0.996138
0.983624
0.956267
0.916767
0.859558
0.776609
0.673554
0.569138
0.479901
0.4129
0.371932
0.361334
0.382995
0.436344
0.517687
0.61706
0.719295
0.810479
0.883344
0.936805
0.972122
0.990761
0.995152
0.98979
0.980585
0.972963
0.970358
0.973836
0.982559
0.994491
1.00711
1.01802
1.02555
1.02902
1.02877
1.02579
1.02133
1.01649
1.01202
1.00832
1.00566
1.0036
1.0022
1.00129
1.00073
1.0004
1.0002
1.0001
1.00005
1.00002
1.00001
1
1
0.999999
0.999999
0.999999
1
0.999999
1
1
0.999999
1
0.999999
1
1
1
0.999998
1
1.00001
0.999987
1.00001
1.00002
0.999965
1.00003
1.00006
0.999944
1.0001
1.00023
1.00012
1.00058
1.00153
1.00256
1.00525
1.01055
1.01753
1.0258
1.0335
1.03607
1.03121
1.02223
1.013
1.00142
0.98752
0.979474
0.976586
0.972595
0.975095
0.986241
0.993438
0.99487
0.993688
0.980662
0.949581
0.904075
0.841209
0.75248
0.642574
0.531068
0.435798
0.365709
0.326291
0.319681
0.344021
0.398164
0.480622
0.583653
0.692279
0.790824
0.870073
0.928265
0.967105
0.98858
0.995149
0.991059
0.982154
0.974116
0.970771
0.973521
0.981714
0.993381
1.00598
1.01707
1.02488
1.02866
1.02866
1.02587
1.02151
1.01671
1.01224
1.00852
1.00577
1.00369
1.00227
1.00135
1.00077
1.00043
1.00023
1.00012
1.00006
1.00003
1.00001
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
0.999999
1
0.999998
1
1
0.999999
1
1
1.00001
0.999992
1
1.00004
0.999989
1.00003
1.00018
1.00019
1.00049
1.00144
1.00276
1.00536
1.01057
1.01803
1.02636
1.03345
1.03595
1.03149
1.02173
1.01158
1.00126
0.987732
0.977821
0.97595
0.973795
0.974527
0.985524
0.994486
0.9941
0.990783
0.978296
0.945413
0.894096
0.825961
0.734838
0.623666
0.50996
0.411626
0.340372
0.303425
0.30022
0.325773
0.378593
0.459216
0.562333
0.673822
0.77688
0.860493
0.921961
0.963171
0.986596
0.994792
0.99178
0.983246
0.974989
0.971123
0.973323
0.981102
0.992553
1.00512
1.01632
1.02433
1.02833
1.02852
1.02587
1.0216
1.01684
1.01238
1.00865
1.00583
1.00375
1.00232
1.00139
1.00081
1.00045
1.00025
1.00013
1.00007
1.00003
1.00002
1.00001
1
1
1
1
1
1
1
1
0.999999
1
1
0.999998
1
0.999998
0.999998
1.00001
0.999993
1
1.00001
0.99999
1.00001
1
0.999998
1.00002
1.00002
1.00009
1.00022
1.00049
1.00129
1.00283
1.00553
1.01051
1.01816
1.02683
1.03353
1.03563
1.03169
1.02197
1.01055
1.00061
0.988637
0.977135
0.974455
0.974866
0.97477
0.983758
0.994844
0.994452
0.988004
0.975858
0.94409
0.888904
0.81529
0.722857
0.614423
0.503586
0.40636
0.336291
0.301554
0.300046
0.325368
0.375772
0.453029
0.553797
0.665096
0.769697
0.855302
0.918325
0.960641
0.985066
0.994256
0.992025
0.98385
0.97553
0.971356
0.973198
0.980699
0.991996
1.00453
1.0158
1.02392
1.02804
1.02836
1.0258
1.0216
1.01688
1.01244
1.00871
1.00584
1.00377
1.00235
1.00142
1.00083
1.00047
1.00026
1.00014
1.00008
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
0.999999
1
1
0.999998
1
1
0.999994
1.00001
0.999994
0.999993
1.00002
0.99998
0.999995
1.00002
0.999967
0.999995
1.00004
1.00002
1.00017
1.00053
1.00118
1.00273
1.00563
1.01048
1.018
1.02701
1.03377
1.03541
1.03163
1.02261
1.01044
0.999667
0.98937
0.977824
0.972795
0.974823
0.975957
0.981913
0.993639
0.995726
0.98673
0.97308
0.9444
0.889739
0.812114
0.717348
0.61171
0.506364
0.414462
0.348695
0.316309
0.31504
0.339052
0.386778
0.460365
0.557519
0.666334
0.769788
0.854956
0.917653
0.959701
0.984139
0.993663
0.991867
0.983983
0.975722
0.971441
0.973121
0.980486
0.991705
1.00422
1.01549
1.02365
1.02782
1.02819
1.02567
1.02151
1.01682
1.01241
1.00871
1.00581
1.00376
1.00235
1.00143
1.00084
1.00049
1.00028
1.00015
1.00008
1.00005
1.00003
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
0.999998
1
1
0.999993
1.00001
1
0.999984
1.00002
0.999989
0.999974
1.00003
0.99997
0.999948
1.00004
1
1.00008
1.00052
1.00116
1.00256
1.00555
1.01045
1.01772
1.02681
1.03398
1.03552
1.03148
1.02313
1.01126
0.999209
0.989336
0.979304
0.972187
0.97338
0.977051
0.981275
0.990988
0.996407
0.987987
0.971395
0.94461
0.89491
0.818478
0.722235
0.617457
0.517017
0.432761
0.373868
0.344428
0.342653
0.364763
0.409954
0.480039
0.572793
0.677189
0.777019
0.859435
0.919979
0.960409
0.983884
0.99308
0.99136
0.983674
0.975571
0.971371
0.973085
0.980463
0.991683
1.00418
1.01543
1.02354
1.02766
1.028
1.02548
1.02133
1.01668
1.01231
1.00864
1.00573
1.00371
1.00233
1.00143
1.00085
1.0005
1.00029
1.00016
1.00009
1.00005
1.00003
1.00002
1.00001
1
1
1
1
1
1
1
0.999999
1
1
0.999999
0.999999
1
0.999996
1
1.00001
0.999986
1.00001
1
0.999965
1.00001
0.999991
0.999919
1
1.00002
1.00001
1.00042
1.00115
1.00242
1.00529
1.01028
1.01742
1.02634
1.0339
1.03589
1.03167
1.02339
1.0124
0.999903
0.98897
0.98033
0.973118
0.971704
0.976593
0.981879
0.988616
0.995045
0.990513
0.973093
0.94544
0.900969
0.831625
0.739494
0.637396
0.542131
0.465902
0.413337
0.385532
0.38214
0.401914
0.444657
0.511195
0.598722
0.696927
0.790825
0.868299
0.924997
0.96261
0.98426
0.992528
0.99054
0.982957
0.975101
0.971165
0.973103
0.98064
0.991939
1.00443
1.01559
1.02358
1.02757
1.02781
1.02523
1.02108
1.01645
1.01212
1.00851
1.0056
1.00364
1.00229
1.00141
1.00085
1.0005
1.00029
1.00017
1.0001
1.00006
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
1
0.999995
0.999995
1
0.999977
0.999979
0.999994
0.999929
0.999938
1.00001
1.00001
1.00029
1.00106
1.00233
1.00496
1.00987
1.01705
1.0258
1.0335
1.03621
1.03237
1.0238
1.01327
1.00148
0.989429
0.980412
0.974512
0.971414
0.97462
0.981877
0.988031
0.992638
0.991477
0.977692
0.94999
0.907863
0.846404
0.764334
0.671951
0.586605
0.518189
0.468423
0.439307
0.433127
0.450263
0.490248
0.552541
0.633669
0.724078
0.810162
0.880854
0.932233
0.965996
0.985116
0.99197
0.989431
0.981876
0.974358
0.970862
0.973207
0.98104
0.992485
1.00497
1.016
1.02377
1.02754
1.0276
1.02492
1.02073
1.01613
1.01186
1.00832
1.00543
1.00353
1.00223
1.00138
1.00084
1.0005
1.0003
1.00017
1.0001
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
0.999998
1
0.999998
1
0.999995
0.999994
0.99999
0.999968
0.999971
0.99995
0.999904
0.999958
1.00002
1.0002
1.00089
1.00222
1.00466
1.00927
1.01644
1.02522
1.03298
1.03627
1.03328
1.02482
1.01402
1.00303
0.991156
0.980603
0.974983
0.972415
0.973083
0.979872
0.988
0.991665
0.990641
0.981463
0.95828
0.918911
0.863031
0.792207
0.715335
0.643928
0.582013
0.532755
0.502188
0.49418
0.509089
0.545786
0.602659
0.67587
0.756846
0.833546
0.896088
0.94107
0.970205
0.986252
0.991325
0.988036
0.980479
0.973405
0.970522
0.973446
0.981697
0.993341
1.0058
1.01663
1.0241
1.02757
1.02737
1.02455
1.02031
1.01573
1.01154
1.00807
1.00522
1.0034
1.00215
1.00134
1.00082
1.00049
1.0003
1.00018
1.0001
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
0.999998
1
0.999996
0.999997
1
0.999985
0.999989
0.999977
0.999946
0.999946
0.99991
0.999896
0.999987
1.00017
1.00071
1.00199
1.00437
1.00862
1.01554
1.02445
1.03245
1.03617
1.03405
1.02632
1.01529
1.00424
0.993265
0.982109
0.974908
0.972957
0.973077
0.977334
0.986123
0.991907
0.990798
0.983355
0.966091
0.9335
0.885295
0.826375
0.764449
0.70339
0.645598
0.598831
0.570531
0.563097
0.576339
0.609184
0.65954
0.723461
0.793532
0.859484
0.912818
0.950702
0.974763
0.987424
0.990497
0.986353
0.978822
0.972321
0.970225
0.973882
0.982652
0.994526
1.00693
1.01748
1.02456
1.02763
1.02712
1.0241
1.0198
1.01526
1.01114
1.00777
1.00498
1.00324
1.00206
1.00128
1.00079
1.00048
1.00029
1.00018
1.00011
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
1
1
0.999992
1
0.999989
0.999977
0.999983
0.999946
0.99992
0.999915
0.999877
0.999913
1.00013
1.00059
1.0017
1.00398
1.00799
1.01448
1.02334
1.03181
1.03612
1.03466
1.02782
1.01732
1.00577
0.994924
0.984478
0.975926
0.97252
0.973135
0.976187
0.983092
0.990669
0.992263
0.986328
0.972461
0.947724
0.911701
0.867154
0.816288
0.76068
0.707709
0.667419
0.643969
0.637553
0.648688
0.676995
0.719987
0.773708
0.832012
0.88645
0.929967
0.960368
0.979165
0.988345
0.989367
0.984383
0.976973
0.971201
0.97006
0.974587
0.983949
0.996061
1.00836
1.01854
1.02512
1.0277
1.02681
1.02358
1.01921
1.0147
1.01068
1.00742
1.0047
1.00306
1.00195
1.00122
1.00075
1.00046
1.00028
1.00017
1.00011
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999998
1
1
0.999992
0.999997
0.999997
0.999972
0.999973
0.99996
0.999902
0.999892
0.999886
0.999858
1.00004
1.00051
1.00143
1.00349
1.0073
1.01339
1.02196
1.03083
1.03607
1.03533
1.02916
1.01956
1.00818
0.996632
0.986518
0.978187
0.972776
0.972127
0.975443
0.981231
0.988073
0.992312
0.990364
0.980125
0.96184
0.936809
0.903925
0.861644
0.813904
0.770728
0.739017
0.719486
0.712901
0.721453
0.744911
0.780114
0.823297
0.869713
0.912675
0.946455
0.96944
0.983032
0.988794
0.987846
0.982142
0.975018
0.970159
0.970133
0.97564
0.985636
0.997958
1.01007
1.01978
1.02576
1.02776
1.02645
1.02297
1.01853
1.01407
1.01016
1.00703
1.00441
1.00286
1.00183
1.00115
1.00072
1.00044
1.00027
1.00017
1.0001
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
1
0.999997
0.999992
0.999996
0.99998
0.999959
0.999962
0.99991
0.999861
0.999879
0.999846
0.999934
1.00038
1.00121
1.00298
1.00649
1.01224
1.02043
1.02948
1.03574
1.03611
1.0306
1.02166
1.011
0.999237
0.988423
0.980336
0.97447
0.971549
0.973699
0.979842
0.986257
0.991003
0.992477
0.987514
0.975446
0.956783
0.930649
0.897365
0.861713
0.830308
0.805917
0.789243
0.782937
0.78969
0.808543
0.836016
0.869078
0.904304
0.936491
0.961159
0.977249
0.98601
0.988607
0.985899
0.979691
0.973072
0.969322
0.970557
0.977117
0.987752
1.00022
1.01204
1.02115
1.02642
1.02777
1.02599
1.02226
1.01776
1.01337
1.00959
1.00661
1.00409
1.00266
1.0017
1.00107
1.00067
1.00042
1.00026
1.00016
1.0001
1.00006
1.00004
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
0.999998
0.999994
0.99999
0.999986
0.99996
0.999948
0.999923
0.999853
0.999848
0.999841
0.999877
1.00022
1.00099
1.00253
1.00562
1.01096
1.01879
1.02789
1.035
1.0367
1.03229
1.02388
1.01368
1.00246
0.991206
0.982257
0.976337
0.972432
0.972301
0.977401
0.984338
0.989929
0.992765
0.991155
0.984032
0.971255
0.953188
0.93038
0.905348
0.882008
0.862903
0.849668
0.844938
0.850502
0.86472
0.884681
0.90862
0.93407
0.956737
0.973249
0.983202
0.987736
0.987629
0.983526
0.977126
0.971278
0.968834
0.971446
0.979096
0.990328
1.00285
1.01424
1.02262
1.02707
1.02771
1.02543
1.02145
1.01691
1.0126
1.00897
1.00615
1.00376
1.00244
1.00156
1.00099
1.00063
1.0004
1.00025
1.00016
1.0001
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999997
1
0.999999
0.999996
0.999998
0.999989
0.999981
0.99997
0.999943
0.999915
0.999868
0.999827
0.999807
0.999853
1.0001
1.00073
1.00211
1.0048
1.00958
1.01696
1.02609
1.03391
1.0369
1.03393
1.02641
1.01647
1.00563
0.9947
0.985076
0.978059
0.973584
0.972347
0.975161
0.981123
0.987862
0.992277
0.992647
0.989374
0.983547
0.974338
0.959772
0.941534
0.924375
0.910763
0.901236
0.897777
0.901672
0.911137
0.924271
0.940524
0.957918
0.972639
0.982244
0.987007
0.988041
0.985807
0.980787
0.974587
0.9698
0.968843
0.97291
0.981636
0.993378
1.00581
1.01662
1.02413
1.02765
1.02752
1.02473
1.02053
1.01597
1.01178
1.00832
1.00567
1.00343
1.00222
1.00143
1.00091
1.00058
1.00037
1.00023
1.00015
1.00009
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
1
1
0.999995
0.999997
0.999994
0.999979
0.999969
0.999955
0.999902
0.999873
0.999837
0.999769
0.999815
1.00002
1.00049
1.00166
1.00404
1.00822
1.01496
1.02399
1.03249
1.03674
1.03526
1.02898
1.0197
1.00893
0.998192
0.988772
0.980648
0.974782
0.972768
0.974123
0.978191
0.984469
0.990646
0.994177
0.994951
0.993726
0.988683
0.978446
0.966451
0.956464
0.948148
0.941339
0.938603
0.940887
0.946362
0.954184
0.964517
0.975452
0.983689
0.987767
0.988517
0.986945
0.983262
0.977861
0.972273
0.968826
0.9695
0.975047
0.98478
0.996894
1.00906
1.01911
1.0256
1.0281
1.02717
1.02389
1.01949
1.01495
1.01091
1.00764
1.00518
1.00309
1.002
1.00129
1.00083
1.00053
1.00034
1.00022
1.00014
1.00009
1.00006
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999996
0.999994
0.999997
0.999981
0.999964
0.999964
0.999907
0.999861
0.99985
0.999761
0.999762
0.999951
1.00031
1.00123
1.00328
1.00692
1.01292
1.02158
1.03061
1.03624
1.03626
1.03132
1.02312
1.01267
1.00191
0.992539
0.984067
0.977111
0.973565
0.973525
0.976255
0.981595
0.988136
0.993385
0.996653
0.997819
0.995366
0.989778
0.984191
0.979406
0.973993
0.969137
0.967468
0.968683
0.971188
0.975293
0.98128
0.987026
0.989992
0.989853
0.987823
0.984633
0.980238
0.975006
0.970425
0.968552
0.970943
0.977934
0.988546
1.00084
1.01253
1.02162
1.02694
1.02836
1.02662
1.02288
1.01833
1.01386
1.01
1.00695
1.00468
1.00275
1.00179
1.00115
1.00074
1.00048
1.00031
1.0002
1.00013
1.00008
1.00005
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
1
0.999998
0.999999
0.999995
0.999994
0.999985
0.999967
0.999959
0.999919
0.999866
0.999843
0.999772
0.999735
0.99987
1.00016
1.00088
1.00256
1.00566
1.01096
1.01895
1.02822
1.03521
1.03688
1.03347
1.02637
1.01662
1.00624
0.996554
0.987663
0.980399
0.975678
0.973608
0.974683
0.979017
0.984598
0.989622
0.994362
0.998255
0.999421
0.998241
0.996565
0.994177
0.990624
0.98781
0.987019
0.987018
0.987223
0.988773
0.99149
0.993094
0.992051
0.989059
0.985443
0.981544
0.977109
0.972542
0.969296
0.96916
0.973283
0.981615
0.992915
1.00515
1.01611
1.02404
1.02807
1.02837
1.02584
1.0217
1.01706
1.01271
1.00907
1.00624
1.00419
1.00243
1.00158
1.00102
1.00066
1.00043
1.00028
1.00018
1.00012
1.00008
1.00005
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999997
0.999998
0.999994
0.999985
0.999975
0.999959
0.999922
0.999883
0.999841
0.999765
0.999743
0.999807
0.999999
1.00062
1.00192
1.00447
1.00907
1.01623
1.02544
1.03348
1.03694
1.03537
1.02941
1.02052
1.01088
1.00115
0.991731
0.984066
0.9786
0.97498
0.974132
0.976502
0.980728
0.986095
0.992435
0.997659
0.999992
1.00081
1.00151
1.00116
0.999608
0.998466
0.997884
0.99677
0.995617
0.99556
0.995732
0.994181
0.990543
0.986151
0.982083
0.978253
0.974322
0.970806
0.969126
0.970805
0.976597
0.986095
0.99783
1.00972
1.01968
1.02625
1.02889
1.02806
1.02481
1.02035
1.0157
1.01152
1.00812
1.00555
1.0037
1.00212
1.00138
1.0009
1.00059
1.00038
1.00025
1.00016
1.00011
1.00007
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999996
0.999998
0.999998
0.999981
0.999979
0.999969
0.999915
0.999898
0.999858
0.999752
0.999755
0.999772
0.999872
1.00039
1.00139
1.00344
1.00724
1.01353
1.02236
1.03102
1.0363
1.03674
1.03221
1.02444
1.01551
1.00601
0.996545
0.988352
0.981904
0.977376
0.975308
0.975622
0.978085
0.982909
0.988758
0.993131
0.995982
0.999014
1.00171
1.00249
1.00214
1.002
1.0014
0.99974
0.998075
0.996988
0.995201
0.991559
0.986733
0.982201
0.978541
0.975328
0.972284
0.970085
0.97011
0.973595
0.980914
0.991329
1.00318
1.0144
1.02309
1.02812
1.02932
1.0274
1.02351
1.01883
1.01425
1.01031
1.00718
1.00487
1.00323
1.00183
1.0012
1.00078
1.00051
1.00034
1.00022
1.00015
1.0001
1.00006
1.00004
1.00002
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
0.999998
0.999997
0.999998
0.999984
0.99998
0.999975
0.999921
0.999908
0.999868
0.999763
0.99976
0.999742
0.999804
1.00017
1.00095
1.00257
1.00558
1.01096
1.01903
1.02795
1.03486
1.03729
1.03455
1.02827
1.02015
1.01097
1.00173
0.993311
0.986164
0.980837
0.977517
0.975934
0.976541
0.979572
0.983574
0.987413
0.991699
0.996183
0.999017
0.99995
1.00056
1.00104
1.00021
0.998259
0.996412
0.994549
0.991437
0.986873
0.982116
0.978347
0.975597
0.973287
0.97134
0.970605
0.972376
0.977576
0.986202
0.997216
1.00882
1.01901
1.02616
1.02951
1.02927
1.02635
1.02195
1.01717
1.01276
1.00909
1.00627
1.00422
1.00279
1.00156
1.00103
1.00068
1.00045
1.0003
1.0002
1.00013
1.00008
1.00006
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
1
1
0.999997
0.999999
0.999997
0.999986
0.999986
0.999971
0.999935
0.999924
0.999864
0.999794
0.999772
0.999716
0.999761
1.00001
1.00061
1.00182
1.00417
1.00859
1.01559
1.0244
1.03256
1.03689
1.03621
1.03171
1.0247
1.01612
1.00712
0.998698
0.99133
0.985153
0.980238
0.977229
0.976847
0.978418
0.980653
0.983599
0.987527
0.991145
0.993323
0.994825
0.996307
0.996784
0.995619
0.993787
0.992061
0.98975
0.986094
0.981699
0.977919
0.975401
0.973761
0.97247
0.971728
0.972522
0.975996
0.982735
0.992369
1.00359
1.01453
1.02332
1.0287
1.0303
1.02867
1.0249
1.02016
1.01541
1.01124
1.0079
1.00539
1.0036
1.00238
1.00132
1.00087
1.00058
1.00038
1.00026
1.00017
1.00011
1.00007
1.00005
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
0.999997
1
0.999994
0.999987
0.999994
0.999968
0.999943
0.999942
0.999864
0.999819
0.999789
0.999715
0.999724
0.999898
1.00035
1.00122
1.00303
1.00651
1.01226
1.02052
1.0294
1.03545
1.03697
1.03448
1.02892
1.02124
1.01274
1.00449
0.996868
0.98996
0.984311
0.980781
0.979214
0.978548
0.978688
0.980425
0.983284
0.98574
0.987506
0.989273
0.990671
0.990701
0.989573
0.98826
0.98679
0.984369
0.98092
0.977488
0.975123
0.973932
0.97335
0.973069
0.973572
0.975895
0.980961
0.988987
0.999247
1.01022
1.02004
1.02709
1.03052
1.03038
1.02752
1.02308
1.01818
1.01359
1.00974
1.00675
1.00457
1.00304
1.002
1.0011
1.00073
1.00049
1.00033
1.00022
1.00015
1.0001
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999997
1
0.999996
0.999989
0.999996
0.99997
0.999955
0.999945
0.999881
0.999843
0.999798
0.999733
0.999712
0.999817
1.00013
1.00076
1.00216
1.00475
1.00925
1.01653
1.02547
1.03289
1.03665
1.03636
1.03247
1.02602
1.01843
1.0106
1.00282
0.9956
0.989759
0.985439
0.981954
0.979298
0.978497
0.979637
0.981219
0.982296
0.983417
0.984828
0.985625
0.985279
0.984414
0.983541
0.982215
0.979958
0.977259
0.975171
0.974249
0.974203
0.974515
0.97519
0.976933
0.980727
0.987195
0.996164
1.00658
1.01679
1.02503
1.03006
1.03146
1.0297
1.02581
1.02094
1.01606
1.01175
1.00829
1.00568
1.00381
1.00253
1.00167
1.00091
1.00061
1.00041
1.00028
1.00019
1.00013
1.00008
1.00006
1.00004
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
0.999999
1
0.999997
1
1
0.999995
0.999994
0.999994
0.999974
0.999969
0.999946
0.999898
0.999869
0.999812
0.999745
0.999727
0.999775
0.999954
1.00044
1.0015
1.00336
1.00672
1.01271
1.02099
1.02928
1.03511
1.03707
1.03509
1.03027
1.02393
1.01672
1.0091
1.0019
0.995732
0.990434
0.985893
0.98281
0.981541
0.981131
0.980647
0.980463
0.981116
0.981976
0.982101
0.981566
0.981001
0.980399
0.979225
0.977443
0.975801
0.975072
0.975344
0.976166
0.977226
0.978832
0.981803
0.986951
0.99454
1.00401
1.01403
1.02292
1.02917
1.03198
1.03141
1.02824
1.0236
1.01856
1.01388
1.00996
1.00692
1.00469
1.00313
1.00207
1.00137
1.00074
1.0005
1.00034
1.00023
1.00016
1.00011
1.00007
1.00005
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
0.999996
1
1
0.999993
0.999999
0.999993
0.999976
0.999978
0.999952
0.999912
0.999889
0.999835
0.999763
0.999746
0.999759
0.999838
1.00019
1.00097
1.00231
1.00478
1.00931
1.01635
1.02479
1.0322
1.03635
1.03661
1.03378
1.02883
1.02241
1.01535
1.00858
1.00236
0.996583
0.991631
0.988035
0.985509
0.983383
0.981745
0.981115
0.981236
0.981206
0.980683
0.980119
0.979794
0.979345
0.978422
0.977334
0.976791
0.977173
0.978271
0.979687
0.9814
0.983942
0.988101
0.99441
1.00273
1.01213
1.02114
1.02817
1.03212
1.03267
1.03032
1.02607
1.02101
1.01605
1.01172
1.00826
1.00566
1.0038
1.00253
1.00167
1.00111
1.0006
1.00041
1.00028
1.00019
1.00013
1.00009
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999995
1
0.999994
0.999981
0.999983
0.999959
0.999928
0.999906
0.999855
0.999792
0.999767
0.999751
0.999785
1.00002
1.00056
1.00154
1.00336
1.0066
1.01205
1.01976
1.02793
1.03404
1.03676
1.03613
1.03276
1.02755
1.02158
1.01546
1.00925
1.0032
0.99799
0.993874
0.990467
0.987572
0.985525
0.984413
0.983662
0.982758
0.981867
0.981357
0.981106
0.980691
0.980056
0.97967
0.980024
0.981164
0.982771
0.984631
0.986985
0.990466
0.995696
1.00284
1.01135
1.02002
1.02737
1.03209
1.03359
1.03203
1.02825
1.02331
1.01818
1.01352
1.00967
1.0067
1.00454
1.00303
1.00201
1.00134
1.00089
1.00048
1.00033
1.00023
1.00016
1.00011
1.00007
1.00005
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
0.999999
1
0.999998
0.999998
1
0.999992
0.999989
0.999985
0.999962
0.999948
0.99992
0.999871
0.999828
0.999792
0.99975
0.999769
0.999924
1.00026
1.00096
1.0023
1.00459
1.00854
1.01481
1.02268
1.0301
1.03511
1.03685
1.03555
1.03211
1.02738
1.02178
1.01576
1.01006
1.00515
1.00084
0.996863
0.993457
0.990987
0.989244
0.987721
0.986321
0.98534
0.984855
0.984542
0.984141
0.983837
0.984068
0.985057
0.986647
0.988577
0.990859
0.993903
0.998285
1.00434
1.01181
1.01982
1.02703
1.03213
1.03429
1.03342
1.03012
1.02537
1.02017
1.01526
1.01107
1.00777
1.00531
1.00357
1.00237
1.00158
1.00105
1.00071
1.00038
1.00027
1.00018
1.00013
1.00009
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
0.999999
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
0.999998
0.999999
1
0.999993
0.999994
0.999988
0.999968
0.999961
0.999933
0.999891
0.999857
0.999818
0.999771
0.999771
0.999856
1.00007
1.00055
1.00151
1.00313
1.00591
1.01056
1.01724
1.02484
1.03147
1.03559
1.03677
1.03539
1.03205
1.02744
1.02236
1.01741
1.01265
1.00799
1.00368
1.00017
0.997499
0.995265
0.993255
0.991656
0.990658
0.990097
0.989669
0.989338
0.989392
0.990112
0.9915
0.993347
0.99554
0.998283
1.00202
1.00711
1.01353
1.02065
1.02736
1.03242
1.0349
1.03451
1.03164
1.02713
1.02193
1.01686
1.01242
1.00882
1.00609
1.00412
1.00275
1.00183
1.00122
1.00082
1.00056
1.0003
1.00021
1.00015
1.0001
1.00007
1.00005
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
1
0.999999
1
0.999999
1
1
1
0.999999
0.999999
0.999995
0.999996
0.999988
0.999977
0.999968
0.999944
0.999913
0.999885
0.999839
0.999798
0.99979
0.999822
0.999946
1.00027
1.00093
1.00208
1.00402
1.00731
1.01241
1.01911
1.02622
1.03213
1.03571
1.03667
1.03535
1.03243
1.02858
1.02423
1.01962
1.01511
1.01112
1.00778
1.00489
1.00229
1.00008
0.998466
0.997429
0.996726
0.996211
0.99602
0.996404
0.997464
0.999078
1.0011
1.00357
1.00677
1.01103
1.01641
1.0225
1.02842
1.03308
1.03553
1.03536
1.03279
1.0285
1.02339
1.01824
1.01362
1.00979
1.00683
1.00466
1.00312
1.00208
1.00138
1.00093
1.00063
1.00043
1.00023
1.00017
1.00012
1.00008
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999998
1
1
0.999998
1
0.999997
0.999998
0.999996
0.99999
0.999984
0.999975
0.999954
0.999932
0.999905
0.999865
0.99983
0.999812
0.999816
0.999884
1.0001
1.00053
1.00132
1.00268
1.00495
1.0086
1.01386
1.02031
1.02686
1.03223
1.03553
1.03657
1.03564
1.0333
1.03003
1.0263
1.02252
1.01895
1.01567
1.01264
1.00996
1.00781
1.00625
1.00514
1.00433
1.00385
1.00387
1.00452
1.00578
1.0075
1.00966
1.01237
1.01587
1.02024
1.02523
1.03015
1.03408
1.03618
1.03597
1.03354
1.02944
1.02444
1.01931
1.0146
1.01062
1.00749
1.00515
1.00347
1.00231
1.00154
1.00103
1.00069
1.00048
1.00033
1.00018
1.00013
1.00009
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
1
0.999998
1
0.999997
0.999999
0.999997
0.999992
0.999987
0.999981
0.999964
0.999948
0.999924
0.99989
0.999859
0.999836
0.999826
0.999863
0.999991
1.00027
1.0008
1.00174
1.0033
1.00581
1.00962
1.01481
1.02089
1.02689
1.03178
1.03494
1.03627
1.036
1.03443
1.032
1.02913
1.02614
1.02319
1.02042
1.01799
1.01604
1.01455
1.01341
1.01262
1.01227
1.01249
1.01331
1.01463
1.01637
1.01855
1.0213
1.02468
1.02851
1.03229
1.03528
1.03675
1.03627
1.03384
1.02987
1.02502
1.01998
1.01528
1.01125
1.00801
1.00555
1.00377
1.00252
1.00168
1.00112
1.00075
1.00051
1.00036
1.00025
1.00014
1.0001
1.00007
1.00005
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
0.999998
1
0.999999
0.999998
0.999994
0.999992
0.999984
0.999974
0.999959
0.99994
0.999914
0.999887
0.99986
0.999845
0.999862
0.999936
1.00011
1.00046
1.00109
1.00215
1.00385
1.00649
1.01033
1.01525
1.02079
1.02621
1.03081
1.0341
1.03584
1.03615
1.03536
1.03387
1.03195
1.0298
1.02766
1.02571
1.02407
1.02274
1.02171
1.02105
1.02088
1.02123
1.02206
1.02328
1.02486
1.02684
1.02922
1.03188
1.03445
1.03636
1.03705
1.03614
1.03359
1.02972
1.02505
1.02018
1.0156
1.01161
1.00836
1.00585
1.004
1.00268
1.00179
1.00119
1.0008
1.00054
1.00038
1.00027
1.00019
1.0001
1.00007
1.00005
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
0.999997
0.999996
0.999994
0.999987
0.99998
0.99997
0.999954
0.999931
0.999912
0.999887
0.99987
0.999872
0.999911
1.00002
1.00024
1.00066
1.00137
1.00251
1.0043
1.00696
1.01061
1.01514
1.02016
1.02509
1.02937
1.03261
1.03472
1.03577
1.03593
1.03538
1.03436
1.03313
1.03189
1.03075
1.02977
1.02902
1.02859
1.02856
1.02891
1.02959
1.03054
1.03174
1.03316
1.0347
1.03609
1.03693
1.03679
1.0354
1.0327
1.02892
1.02448
1.01987
1.0155
1.01166
1.00848
1.00599
1.00413
1.00279
1.00186
1.00123
1.00082
1.00056
1.00038
1.00027
1.00019
1.00014
1.00008
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
0.999999
1
0.999998
0.999998
0.999995
0.999992
0.999986
0.999976
0.999965
0.999949
0.99993
0.999912
0.999894
0.999889
0.99991
0.999973
1.00011
1.00038
1.00085
1.0016
1.0028
1.0046
1.00716
1.01053
1.01457
1.01898
1.02337
1.02736
1.03065
1.03309
1.03466
1.03549
1.03576
1.03565
1.03531
1.03486
1.0344
1.03405
1.03389
1.03394
1.0342
1.0346
1.03511
1.03569
1.03626
1.03663
1.03653
1.03567
1.03386
1.03106
1.02743
1.0233
1.01904
1.01498
1.01138
1.00837
1.00597
1.00415
1.00282
1.00188
1.00125
1.00083
1.00056
1.00038
1.00027
1.00019
1.00014
1.0001
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
0.999998
1
0.999999
0.999998
0.999998
0.999997
0.999993
0.999991
0.999983
0.999973
0.999962
0.999948
0.999931
0.999917
0.999911
0.999918
0.999953
1.00004
1.00021
1.00051
1.00101
1.0018
1.00299
1.00471
1.00706
1.01006
1.01361
1.01746
1.0213
1.02488
1.02799
1.03052
1.03245
1.03383
1.03475
1.0353
1.03558
1.03571
1.03579
1.03586
1.03595
1.03604
1.03609
1.03609
1.03596
1.03559
1.03482
1.03347
1.03142
1.02864
1.02527
1.02153
1.0177
1.01405
1.01078
1.00801
1.00577
1.00404
1.00276
1.00185
1.00123
1.00081
1.00054
1.00037
1.00026
1.00018
1.00013
1.0001
1.00007
1.00004
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
1
0.999998
0.999998
0.999995
0.999992
0.999988
0.999982
0.999971
0.999961
0.999948
0.999936
0.999928
0.999932
0.999955
1.00001
1.00012
1.00031
1.00063
1.00114
1.00191
1.00305
1.00465
1.00675
1.00934
1.01232
1.01554
1.01883
1.02197
1.02482
1.02727
1.02929
1.03087
1.03208
1.03295
1.03357
1.03398
1.03423
1.03433
1.03425
1.034
1.03354
1.0328
1.03171
1.03016
1.0281
1.02552
1.02251
1.01925
1.01593
1.01275
1.00988
1.00742
1.0054
1.00382
1.00263
1.00177
1.00117
1.00077
1.00051
1.00034
1.00023
1.00017
1.00012
1.00009
1.00007
1.00005
1.00003
1.00002
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
0.999998
1
0.999998
1
1
0.999999
0.999999
1
0.999997
0.999997
0.999996
0.99999
0.999986
0.999981
0.999971
0.999962
0.999954
0.999946
0.999945
0.999958
0.999995
1.00006
1.00019
1.00039
1.00072
1.00122
1.00197
1.00301
1.00441
1.0062
1.00836
1.01084
1.0135
1.0162
1.01881
1.02123
1.02339
1.02523
1.02674
1.02793
1.02882
1.02944
1.02978
1.02986
1.02968
1.02922
1.02847
1.02738
1.02593
1.02408
1.02186
1.01933
1.01661
1.01384
1.01119
1.00876
1.00665
1.00489
1.00349
1.00242
1.00163
1.00108
1.0007
1.00046
1.0003
1.0002
1.00014
1.0001
1.00008
1.00006
1.00005
1.00004
1.00002
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
1
1
1
0.999999
1
0.999998
1
1
0.999999
0.999999
1
0.999997
0.999997
0.999994
0.999991
0.999986
0.999981
0.999973
0.999964
0.999962
0.999961
0.999967
0.999989
1.00004
1.00012
1.00025
1.00046
1.00079
1.00126
1.00192
1.00285
1.00405
1.00554
1.00728
1.00924
1.01132
1.01345
1.01553
1.01747
1.01921
1.0207
1.02193
1.02287
1.02352
1.02388
1.02395
1.02371
1.02318
1.02233
1.02117
1.0197
1.01793
1.01594
1.01379
1.01159
1.00946
1.00749
1.00574
1.00427
1.00307
1.00215
1.00145
1.00096
1.00062
1.00039
1.00025
1.00017
1.00011
1.00008
1.00006
1.00005
1.00004
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
1
1
1
1
1
1
0.999999
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
1
0.999998
0.999999
1
0.999997
0.999996
0.999995
0.999989
0.999985
0.999981
0.999977
0.999972
0.99997
0.999978
0.999991
1.00002
1.00008
1.00017
1.0003
1.00051
1.00081
1.00125
1.00183
1.00261
1.00358
1.00476
1.00612
1.00763
1.00922
1.01082
1.01236
1.01379
1.01506
1.01613
1.01696
1.01755
1.01786
1.01791
1.01767
1.01716
1.01638
1.01534
1.01406
1.01259
1.01099
1.00933
1.0077
1.00616
1.00478
1.00359
1.00261
1.00183
1.00124
1.00082
1.00052
1.00032
1.0002
1.00012
1.00008
1.00006
1.00004
1.00004
1.00003
1.00003
1.00002
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
0.999999
1
1
1
1
0.999999
1
0.999999
1
0.999999
1
1
0.999999
1
1
0.999999
0.999999
0.999999
0.999997
0.999995
0.999995
0.99999
0.999986
0.999984
0.999981
0.99998
0.999984
0.999996
1.00002
1.00005
1.00011
1.00021
1.00034
1.00054
1.00081
1.00118
1.00167
1.0023
1.00308
1.00399
1.005
1.0061
1.00724
1.00837
1.00944
1.01042
1.01125
1.01191
1.01237
1.01261
1.01263
1.01242
1.01199
1.01135
1.01051
1.00951
1.00839
1.0072
1.00601
1.00487
1.00382
1.0029
1.00212
1.0015
1.00101
1.00066
1.00041
1.00024
1.00014
1.00008
1.00005
1.00003
1.00002
1.00002
1.00002
1.00002
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
0.999999
1
1
0.999999
1
1
0.999998
0.999999
0.999999
0.999997
0.999994
0.999995
0.999992
0.999987
0.999988
0.999988
0.999989
0.999999
1.00001
1.00004
1.00008
1.00015
1.00024
1.00036
1.00053
1.00077
1.00109
1.00148
1.00197
1.00255
1.00321
1.00394
1.00471
1.00549
1.00624
1.00692
1.00752
1.00799
1.00832
1.00848
1.00848
1.00831
1.00797
1.00748
1.00685
1.00612
1.00532
1.0045
1.00368
1.00292
1.00224
1.00165
1.00116
1.00078
1.0005
1.0003
1.00017
1.00008
1.00003
1.00001
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
1
1
0.999999
1
1
0.999999
0.999999
1
0.999998
0.999998
0.999999
0.999997
0.999995
0.999994
0.999994
0.99999
0.999992
0.999996
0.999999
1.00001
1.00003
1.00006
1.0001
1.00017
1.00025
1.00037
1.00052
1.00071
1.00096
1.00127
1.00163
1.00205
1.00252
1.00301
1.00351
1.00401
1.00446
1.00485
1.00516
1.00538
1.00548
1.00546
1.00532
1.00507
1.00471
1.00427
1.00376
1.00321
1.00266
1.00213
1.00165
1.00122
1.00086
1.00057
1.00035
1.0002
1.00009
1.00003
0.999993
0.999978
0.999976
0.99998
0.999987
0.999993
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
1
0.999999
1
0.999999
1
1
0.999999
0.999999
1
0.999999
0.999998
0.999999
0.999997
0.999996
0.999996
0.999997
0.999994
0.999995
1
1.00001
1.00002
1.00005
1.00008
1.00013
1.00018
1.00026
1.00035
1.00048
1.00064
1.00083
1.00105
1.00131
1.00159
1.0019
1.00221
1.00252
1.0028
1.00305
1.00324
1.00336
1.00341
1.00338
1.00327
1.00309
1.00284
1.00253
1.0022
1.00184
1.00148
1.00115
1.00085
1.00059
1.00038
1.00022
1.00011
1.00003
0.999981
0.999958
0.999951
0.999954
0.999962
0.999971
0.99998
0.999988
0.999994
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
0.999999
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
0.999999
1
0.999999
0.999998
1
1
0.999998
0.999999
0.999998
0.999996
0.999996
0.999998
1
1
1.00001
1.00002
1.00004
1.00006
1.00009
1.00013
1.00019
1.00025
1.00033
1.00043
1.00055
1.00069
1.00084
1.00102
1.0012
1.00139
1.00157
1.00174
1.00188
1.00198
1.00205
1.00206
1.00203
1.00194
1.00181
1.00163
1.00143
1.00121
1.00098
1.00076
1.00056
1.00038
1.00023
1.00012
1.00003
0.999976
0.999944
0.99993
0.999929
0.999935
0.999946
0.999959
0.99997
0.99998
0.999988
0.999993
0.999997
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
1
1
0.999999
1
1
0.999998
1
1
0.999998
1
1
0.999997
0.999998
1
0.999999
0.999998
1
1
1.00001
1.00002
1.00003
1.00005
1.00007
1.0001
1.00014
1.00018
1.00024
1.0003
1.00038
1.00046
1.00055
1.00066
1.00076
1.00087
1.00097
1.00106
1.00114
1.00119
1.00122
1.00121
1.00117
1.00111
1.00101
1.00089
1.00075
1.00061
1.00047
1.00034
1.00022
1.00012
1.00004
0.999979
0.999941
0.99992
0.999912
0.999915
0.999924
0.999936
0.999949
0.999962
0.999972
0.999981
0.999988
0.999993
0.999996
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
0.999999
1
1
0.999999
0.999999
1
1
0.999998
1
1
0.999999
1
1.00001
1.00001
1.00002
1.00003
1.00005
1.00007
1.0001
1.00013
1.00017
1.00021
1.00026
1.00031
1.00037
1.00043
1.00049
1.00055
1.00061
1.00065
1.00069
1.00071
1.00071
1.00069
1.00066
1.0006
1.00053
1.00045
1.00037
1.00027
1.00019
1.00011
1.00004
0.999985
0.999945
0.99992
0.999906
0.999903
0.999907
0.999917
0.99993
0.999943
0.999956
0.999968
0.999977
0.999985
0.99999
0.999994
0.999997
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
0.999999
1
1
1
1
1.00001
1.00002
1.00003
1.00004
1.00006
1.00007
1.0001
1.00012
1.00015
1.00018
1.00022
1.00025
1.00029
1.00032
1.00035
1.00038
1.0004
1.00041
1.00042
1.00041
1.00039
1.00036
1.00031
1.00026
1.00021
1.00015
1.00009
1.00004
0.999996
0.999958
0.99993
0.999912
0.999903
0.999903
0.999908
0.999917
0.999929
0.999942
0.999954
0.999964
0.999974
0.999981
0.999987
0.999992
0.999995
0.999997
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
1
1
0.999999
1
1
1
1.00001
1.00001
1.00002
1.00003
1.00004
1.00005
1.00007
1.00009
1.00011
1.00013
1.00015
1.00017
1.0002
1.00022
1.00023
1.00024
1.00025
1.00025
1.00025
1.00023
1.00021
1.00019
1.00016
1.00012
1.00008
1.00004
1.00001
0.999974
0.999948
0.999929
0.999917
0.999911
0.99991
0.999914
0.999922
0.999932
0.999943
0.999954
0.999964
0.999973
0.99998
0.999986
0.999991
0.999994
0.999996
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
1
1
1
1
0.999999
0.999999
1
1
0.999998
1
1
1
1
1
1.00001
1.00001
1.00001
1.00002
1.00003
1.00004
1.00005
1.00006
1.00008
1.00009
1.00011
1.00012
1.00013
1.00014
1.00015
1.00016
1.00016
1.00015
1.00015
1.00013
1.00012
1.0001
1.00007
1.00004
1.00002
0.999996
0.999974
0.999955
0.99994
0.999929
0.999923
0.999923
0.999926
0.999933
0.999941
0.999949
0.999958
0.999966
0.999974
0.99998
0.999985
0.99999
0.999993
0.999995
0.999997
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
0.999999
1
1
0.999998
1
1
1
1
1
1.00001
1.00001
1.00001
1.00002
1.00002
1.00003
1.00004
1.00005
1.00006
1.00007
1.00008
1.00009
1.00009
1.0001
1.0001
1.0001
1.00009
1.00009
1.00008
1.00006
1.00005
1.00003
1.00001
0.999997
0.99998
0.999965
0.999954
0.999947
0.999943
0.999942
0.999943
0.999946
0.99995
0.999956
0.999963
0.99997
0.999976
0.999982
0.999987
0.999991
0.999994
0.999996
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00002
1.00003
1.00003
1.00004
1.00004
1.00005
1.00005
1.00006
1.00006
1.00006
1.00006
1.00006
1.00005
1.00004
1.00004
1.00003
1.00001
1
0.999993
0.999984
0.999976
0.999969
0.999964
0.999961
0.999961
0.999963
0.999966
0.99997
0.999974
0.999978
0.999982
0.999986
0.999989
0.999991
0.999994
0.999995
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00002
1.00002
1.00002
1.00002
1.00003
1.00003
1.00003
1.00003
1.00003
1.00003
1.00003
1.00003
1.00002
1.00002
1.00001
1.00001
1
0.999994
0.99999
0.999987
0.999985
0.999984
0.999983
0.999983
0.999984
0.999985
0.999987
0.99999
0.999992
0.999994
0.999995
0.999997
0.999998
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
0.999999
1
1
0.999999
1
1
1
1
0.999999
1
1
0.999999
1
1
1
0.999999
0.999999
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00002
1.00002
1.00002
1.00002
1.00002
1.00002
1.00002
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
0.999999
1
1
0.999999
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
0.999999
1
1
1
1
1
1
0.999999
0.999999
0.999999
0.999997
0.999997
0.999996
0.999995
0.999993
0.99999
0.999989
0.999987
0.999986
0.999985
0.999986
0.999987
0.999989
0.999992
0.999997
1
1.00001
1.00001
1.00002
1.00002
1.00003
1.00003
1.00003
1.00004
1.00004
1.00004
1.00004
1.00003
1.00003
1.00003
1.00003
1.00002
1.00002
1.00002
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
1
1
1
0.999999
1
1
0.999999
1
1
1
0.999999
0.999997
0.999997
0.999995
0.999992
0.999988
0.999985
0.999982
0.999978
0.999974
0.999971
0.999969
0.99997
0.999972
0.999976
0.999982
0.999989
0.999998
1.00001
1.00002
1.00003
1.00004
1.00005
1.00006
1.00006
1.00007
1.00007
1.00007
1.00007
1.00007
1.00006
1.00006
1.00005
1.00004
1.00004
1.00003
1.00003
1.00002
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
0.999999
0.999999
0.999998
0.999997
0.999994
0.99999
0.999987
0.999983
0.999978
0.999971
0.999966
0.999961
0.999957
0.999956
0.999958
0.999961
0.999969
0.99998
0.999993
1.00001
1.00002
1.00004
1.00006
1.00008
1.00009
1.0001
1.00011
1.00012
1.00012
1.00012
1.00011
1.00011
1.0001
1.00009
1.00008
1.00007
1.00006
1.00005
1.00004
1.00003
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
0.999999
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999998
0.999995
0.999992
0.999988
0.999982
0.999975
0.999967
0.99996
0.999954
0.999948
0.999946
0.999946
0.999951
0.99996
0.999974
0.999991
1.00001
1.00004
1.00007
1.00009
1.00012
1.00014
1.00016
1.00017
1.00018
1.00019
1.00019
1.00019
1.00018
1.00017
1.00016
1.00014
1.00012
1.00011
1.00009
1.00008
1.00006
1.00005
1.00004
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
0.999999
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
0.999996
0.999994
0.999989
0.999983
0.999975
0.999967
0.999958
0.99995
0.999943
0.999938
0.999939
0.999944
0.999956
0.999975
1
1.00003
1.00007
1.00011
1.00015
1.00018
1.00022
1.00025
1.00028
1.00029
1.0003
1.00031
1.0003
1.00029
1.00028
1.00026
1.00023
1.00021
1.00018
1.00016
1.00013
1.00011
1.00009
1.00007
1.00005
1.00004
1.00003
1.00002
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999995
0.999991
0.999985
0.999978
0.999969
0.999959
0.999949
0.99994
0.999935
0.999935
0.999943
0.999959
0.999985
1.00002
1.00006
1.00012
1.00017
1.00023
1.00029
1.00035
1.0004
1.00044
1.00047
1.00049
1.0005
1.00049
1.00048
1.00046
1.00043
1.00039
1.00035
1.00031
1.00027
1.00023
1.00019
1.00016
1.00013
1.0001
1.00008
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999994
0.999989
0.999982
0.999973
0.999962
0.99995
0.999941
0.999936
0.999937
0.999947
0.999969
1
1.00005
1.00012
1.00019
1.00028
1.00037
1.00046
1.00055
1.00063
1.0007
1.00075
1.00079
1.00081
1.00081
1.00079
1.00076
1.00071
1.00065
1.00059
1.00053
1.00046
1.00039
1.00033
1.00028
1.00022
1.00018
1.00014
1.00011
1.00008
1.00006
1.00004
1.00003
1.00002
1.00001
1.00001
1
1
1
1
1
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999994
0.999987
0.999978
0.999967
0.999956
0.999947
0.999941
0.999943
0.999956
0.999985
1.00003
1.0001
1.00019
1.0003
1.00042
1.00056
1.0007
1.00084
1.00097
1.00109
1.00118
1.00125
1.0013
1.00131
1.00129
1.00125
1.00119
1.0011
1.00101
1.0009
1.00079
1.00068
1.00058
1.00048
1.0004
1.00032
1.00025
1.00019
1.00015
1.00011
1.00008
1.00005
1.00004
1.00002
1.00001
1.00001
1
1
1
1
0.999999
0.999999
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999994
0.999986
0.999976
0.999965
0.999955
0.999949
0.999953
0.99997
1.00001
1.00007
1.00016
1.00028
1.00043
1.00061
1.00081
1.00102
1.00123
1.00144
1.00163
1.0018
1.00193
1.00202
1.00207
1.00208
1.00204
1.00196
1.00184
1.0017
1.00154
1.00137
1.00119
1.00102
1.00086
1.00071
1.00058
1.00046
1.00036
1.00027
1.00021
1.00015
1.00011
1.00007
1.00005
1.00003
1.00002
1.00001
1
1
0.999999
0.999999
0.999999
0.999998
0.999998
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1
1
0.999995
0.999986
0.999976
0.999967
0.999962
0.999967
0.999989
1.00004
1.00011
1.00023
1.00039
1.00059
1.00084
1.00112
1.00142
1.00174
1.00206
1.00237
1.00264
1.00288
1.00306
1.00317
1.00323
1.00322
1.00314
1.00301
1.00282
1.00259
1.00234
1.00207
1.0018
1.00153
1.00128
1.00105
1.00084
1.00067
1.00052
1.00039
1.00029
1.00021
1.00015
1.0001
1.00006
1.00004
1.00002
1.00001
1
1
0.999999
0.999998
0.999998
0.999997
0.999997
0.999998
0.999999
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1
0.999998
0.999989
0.999981
0.999977
0.999984
1.00001
1.00007
1.00016
1.00031
1.00051
1.00078
1.0011
1.00149
1.00192
1.00237
1.00284
1.00331
1.00374
1.00412
1.00444
1.00468
1.00484
1.0049
1.00486
1.00474
1.00453
1.00424
1.0039
1.00351
1.0031
1.00269
1.00228
1.0019
1.00155
1.00124
1.00097
1.00075
1.00056
1.00041
1.0003
1.00021
1.00014
1.00009
1.00005
1.00003
1.00001
1.00001
1
0.999997
0.999996
0.999996
0.999995
0.999996
0.999997
0.999998
0.999999
0.999999
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00002
1.00001
1.00001
1
0.999998
0.999995
1
1.00003
1.0001
1.00021
1.00038
1.00063
1.00097
1.00139
1.0019
1.00248
1.00311
1.00378
1.00445
1.00509
1.00569
1.00621
1.00664
1.00695
1.00715
1.00721
1.00715
1.00696
1.00666
1.00625
1.00575
1.00519
1.00459
1.00398
1.00338
1.00281
1.00229
1.00182
1.00143
1.00109
1.00081
1.00059
1.00042
1.00029
1.00019
1.00012
1.00007
1.00004
1.00002
1.00001
0.999998
0.999995
0.999994
0.999994
0.999992
0.999994
0.999995
0.999997
0.999998
0.999999
0.999999
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00002
1.00002
1.00002
1.00002
1.00002
1.00002
1.00002
1.00003
1.00006
1.00013
1.00025
1.00045
1.00075
1.00116
1.00169
1.00233
1.00309
1.00393
1.00484
1.00577
1.00669
1.00756
1.00835
1.00903
1.00958
1.00998
1.01022
1.01029
1.01019
1.00993
1.00952
1.00896
1.00828
1.00751
1.00667
1.00581
1.00495
1.00412
1.00336
1.00268
1.00209
1.00159
1.00119
1.00086
1.00061
1.00042
1.00028
1.00018
1.0001
1.00006
1.00003
1.00001
0.999997
0.999992
0.999991
0.999991
0.999989
0.999991
0.999993
0.999995
0.999997
0.999998
0.999999
0.999999
1
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00002
1.00003
1.00003
1.00003
1.00003
1.00003
1.00004
1.00005
1.00008
1.00015
1.00029
1.00051
1.00085
1.00133
1.00196
1.00276
1.00372
1.0048
1.00599
1.00723
1.00847
1.00968
1.01081
1.01181
1.01265
1.01333
1.01381
1.01408
1.01416
1.01403
1.0137
1.01317
1.01246
1.01159
1.01058
1.00947
1.0083
1.00711
1.00596
1.00488
1.0039
1.00305
1.00233
1.00174
1.00126
1.00089
1.00061
1.0004
1.00025
1.00015
1.00008
1.00004
1.00001
0.999996
0.999989
0.999987
0.999987
)
;
boundaryField
{
emptyPatches_empt
{
type empty;
}
top_cyc
{
type cyclic;
}
bottom_cyc
{
type cyclic;
}
inlet_cyc
{
type cyclic;
}
outlet_cyc
{
type cyclic;
}
}
// ************************************************************************* //
| [
"tdg@debian"
] | tdg@debian | |
348e280c0618bc784af3e092bea7d76caef281df | ad0797c84ffd8354fd5b0baaf242128bd5bfb43f | /fwdmodel_flobs.cc | 74900152745178e2e09421195f7cd58c5a9a6738 | [] | no_license | mosszhaodphil/FABBER_UAT | 1a053700e881b8865148d0a3899e0c04c4080f56 | 5ec706f8fc93a00aac9b6d830a6b0f8117994abc | refs/heads/master | 2020-04-06T12:08:15.710689 | 2015-03-25T08:09:57 | 2015-03-25T08:09:57 | 31,378,979 | 0 | 0 | null | 2016-09-20T18:44:40 | 2015-02-26T17:23:11 | C++ | UTF-8 | C++ | false | false | 8,001 | cc | /* fwdmodel_flobs.cc - Does FLOBS
Adrian Groves, FMRIB Image Analysis Group
Copyright (C) 2007 University of Oxford */
/* Part of FSL - FMRIB's Software Library
http://www.fmrib.ox.ac.uk/fsl
fsl@fmrib.ox.ac.uk
Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
Imaging of the Brain), Department of Clinical Neurology, Oxford
University, Oxford, UK
LICENCE
FMRIB Software Library, Release 5.0 (c) 2012, The University of
Oxford (the "Software")
The Software remains the property of the University of Oxford ("the
University").
The Software is distributed "AS IS" under this Licence solely for
non-commercial use in the hope that it will be useful, but in order
that the University as a charitable foundation protects its assets for
the benefit of its educational and research purposes, the University
makes clear that no condition is made or to be implied, nor is any
warranty given or to be implied, as to the accuracy of the Software,
or that it will be suitable for any particular purpose or for use
under any specific conditions. Furthermore, the University disclaims
all responsibility for the use which is made of the Software. It
further disclaims any liability for the outcomes arising from using
the Software.
The Licensee agrees to indemnify the University and hold the
University harmless from and against any and all claims, damages and
liabilities asserted by third parties (including claims for
negligence) which arise directly or indirectly from the use of the
Software or the sale of any products based on the Software.
No part of the Software may be reproduced, modified, transmitted or
transferred in any form or by any means, electronic or mechanical,
without the express permission of the University. The permission of
the University is not required if the said reproduction, modification,
transmission or transference is done without financial return, the
conditions of this Licence are imposed upon the receiver of the
product, and all original and amended source code is included in any
transmitted product. You may be held legally responsible for any
copyright infringement that is caused or encouraged by your failure to
abide by these terms and conditions.
You are not permitted under this Licence to use this Software
commercially. Use for which any financial return is received shall be
defined as commercial use, and includes (1) integration of all or part
of the source code or the Software into a product for sale or license
by or on behalf of Licensee to third parties or (2) use of the
Software or any derivative of it for research with the final aim of
developing software products for sale or license to a third party or
(3) use of the Software or any derivative of it for research with the
final aim of developing non-software products for sale or license to a
third party, or (4) use of the Software to provide any service to an
external organisation for which payment is received. If you are
interested in using the Software commercially, please contact Isis
Innovation Limited ("Isis"), the technology transfer company of the
University, to negotiate a licence. Contact details are:
innovation@isis.ox.ac.uk quoting reference DE/9564. */
#include "fwdmodel_flobs.h"
#include <iostream>
#include <newmatio.h>
#include <stdexcept>
#include "newimage/newimageall.h"
using namespace NEWIMAGE;
#include "easylog.h"
string FlobsFwdModel::ModelVersion() const
{
return "$Id: fwdmodel_flobs.cc,v 1.4 2008/04/03 13:22:39 adriang Exp $";
}
void FlobsFwdModel::HardcodedInitialDists(MVNDist& prior,
MVNDist& posterior) const
{
Tracer_Plus tr("FlobsFwdModel::HardcodedInitialDists");
assert(prior.means.Nrows() == NumParams());
// Set priors
prior.means = 0;
SymmetricMatrix precisions = IdentityMatrix(NumParams()) * 1e-12;
prior.SetPrecisions(precisions);
posterior = prior;
// if (useSeparateScale)
// {
// // Set informative initial posterior
// // Shape = first basis function, magnitude 1.
// posterior.means(1) = 1;
// posterior.means(NumParams()) = 1;
// }
}
void FlobsFwdModel::Evaluate(const ColumnVector& params, ColumnVector& result) const
{
Tracer_Plus tr("FlobsFwdModel::Evaluate");
assert(params.Nrows() == NumParams());
// if (useSeparateScale)
// {
// ColumnVector beta = params.Rows(1,basis.Ncols());
// //double betaBar = params(NumParams());
// result = basis * beta; // * betaBar; Now it's purely linear and ignore betaBar!
// assert(false); // TODO: update for nuisance parameters
// }
if (usePolarCoordinates)
{
assert(basis.Ncols() == 2);
ColumnVector beta = params.Rows(1,basis.Ncols());
double betaBar = params(1);
beta(1) = cos(beta(2));
beta(2) = sin(beta(2));
result = basis * beta * betaBar;
// No nuisance stuff yet.
assert(params.Nrows() == 2);
}
else
{
ColumnVector beta = params.Rows(1,basis.Ncols());
double betaBar = params(1);
beta(1) = 1.0; // fixed shape=1, scale=betaBar
result = basis * beta * betaBar;
beta = params.Rows(basis.Ncols()+1,params.Nrows());
result += nuisanceBasis * beta;
}
return; // answer is in the "result" vector
}
void FlobsFwdModel::ModelUsage()
{
// if (useSeparateScale)
{
cout << "Usage for --model=flobs6:\n"
<< " --basis=<basis_functions>\n"
<< " A scale parameter will automatically be added.\n"
<< " Always use with the --flobs-prior-adjust option!!! \n"
<< " (Future work: specify several scaling factors, for multi-event stimuli)\n\n";
}
// else
{
cout << "Usage for --model=flobs5:\n"
<< " --basis=<basis_functions>\n"
<< " The first basis function will serve as the scaling factor (fixed shape==1)\n";
}
// TODO: add --nuisance= option
}
FlobsFwdModel::FlobsFwdModel(ArgsType& args, bool polar)
// : useSeparateScale(sepScale)
: usePolarCoordinates(polar)
{
string basisFile = args.Read("basis");
LOG_ERR( " Reading basis functions: " << basisFile << endl );
basis = read_vest(basisFile);
LOG_ERR( " Read " << basis.Ncols() << " basis functions of length "
<< basis.Nrows() << endl);
basisFile = args.ReadWithDefault("nuisance","null");
if (basisFile == "null")
{
nuisanceBasis.ReSize(basis.Nrows(), 0);
}
else if (basisFile == "offset")
{
nuisanceBasis.ReSize(basis.Nrows(), 1);
nuisanceBasis = 1;
}
else
{
LOG_ERR( " Reading nuisance basis functions: "
<< basisFile << endl );
nuisanceBasis = read_vest(basisFile);
LOG_ERR( " Read " << nuisanceBasis.Ncols()
<< " nuisance basis functions of length "
<< nuisanceBasis.Nrows() << endl);
}
if (nuisanceBasis.Nrows() != basis.Nrows())
throw Invalid_option("Basis length mismatch!\n");
}
void FlobsFwdModel::DumpParameters(const ColumnVector& vec,
const string& indent) const
{
// if (useSeparateScale)
// LOG << indent << "Scale = " << vec(NumParams()) << ", shape:\n"
// << vec.Rows(1, NumParams()-1);
// else
LOG << indent << "Scale = " << vec(1) << ", shape:\n1 (fixed)\n"
<< vec.Rows(2, NumParams());
// TODO: should dump nuisanceBasis too
}
void FlobsFwdModel::NameParams(vector<string>& names) const
{
names.clear();
for (int i = 1; i <= basis.Ncols(); i++)
names.push_back("basis_" + stringify(i));
// if (useSeparateScale)
// names.push_back("scale");
for (int i = 1; i <= nuisanceBasis.Ncols(); i++)
names.push_back("nuisance_"+stringify(i));
assert(names.size() == (unsigned)NumParams());
}
| [
"mosszhao@Mosss-MacBook-Pro.local"
] | mosszhao@Mosss-MacBook-Pro.local |
e7820c344e997399de0e161fa13f2b383210532f | d4faf438bd3f8e94178acdd31157d03d955c582b | /src/Utils/FBX_Importer.h | 759a910069e1b49bb741af0d9bd49e06d6f142b9 | [] | no_license | luoxz-ai/cpp_game_engine | 19684a3c235fb7738b2988ed73dbaab08e2e5c2d | f25c950c9c312cc239e27acaeda85b5f852e8a01 | refs/heads/master | 2023-04-12T13:55:31.426366 | 2021-05-05T20:11:40 | 2021-05-05T20:11:40 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,223 | h | #pragma once
#include <Windows.h>
#include <stdio.h>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include "Structs.h"
#include "Entity/Mesh/Mesh.h"
#include "Entity/Mesh/MeshDeformer/Animation/Animation.h"
// Utils
#include "fbxsdk.h"
struct FBX_LoadResult {
bool success = false;
bool binormaltangent_Loaded = false;
};
class FBX_Importer {
public:
static FBX_LoadResult Load(
Mesh* pMesh,
const char* fileName, const char* mainMeshName,
Vertex*& _vertices, unsigned int*& _indices,
unsigned int& _vertices_count, unsigned int& _indices_count,
Joint**& _joints, unsigned int& _jointCount,
Animation**& _animations, unsigned int& _animationCount,
std::map<int, int>& _indexed_vertices,
std::map<int, std::map<int, float>>& _indexed_joint_weights
);
static void printNode(FbxNode* node, unsigned int level = 0);
static Joint* getJointByName(const char* jointName, Joint** joints, unsigned int jointCount);
static void Triangulate(FbxNode* node, FbxGeometryConverter& geometryConverter);
static FbxNode* getMainMeshNode(FbxNode* node, const char* mainMeshName);
// FBX to DX matrix/vector conversions
static dx::XMFLOAT4X4* MatrixFBXtoDX(FbxAMatrix fbxMatrix);
}; | [
"fmehmetun3@gmail.com"
] | fmehmetun3@gmail.com |
0a9981ca96dbd52af16f11ab04f14f72ef7aab16 | 72f92da77af907d49db9a6e1d82b78ec683e60ce | /practices/cpp/level1/√ p05_Canvas/Circ.cpp | 102bbb7b9195cb9e827986f55fa3338c4ddce5df | [] | no_license | ldzhangyx/CCpp2016 | f0f9f52e15c7b871719ddb7ad9502bf92641aa16 | 42ea8150ced35100fc2bf65afb420b1167002e66 | refs/heads/master | 2021-01-15T21:15:05.952470 | 2016-06-24T09:17:45 | 2016-06-24T09:17:45 | 52,485,652 | 0 | 0 | null | 2016-02-25T00:53:20 | 2016-02-25T00:53:20 | null | UTF-8 | C++ | false | false | 67 | cpp | //
// Created by Administrator on 2016/6/13.
//
#include "Circ.h"
| [
"ldzhangyx@outlook.com"
] | ldzhangyx@outlook.com |
896146af3ac9501934e94468e143324cc76b6f87 | 6fddb9789cdcae612766266ee05d1ad850b9f0ab | /CppFizzBuzz04b/include/range/v3/iterator/diffmax_t.hpp | 57a280cd7e8d5e6c180633c3d3c3d9f20f7d331a | [] | no_license | melston/cppFizzBuzz | a8488b35981fc1ab69f4100df0082a2e2cfba8e7 | adc2cdeb8b187288857a23b01908a6f1727641c1 | refs/heads/master | 2020-05-27T17:19:51.376255 | 2019-06-06T04:32:12 | 2019-06-06T04:32:12 | 188,717,867 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,514 | hpp | /// \file
// Range v3 library
//
// Copyright Eric Niebler 2019-present
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Project home: https://github.com/ericniebler/range-v3
//
#ifndef RANGES_V3_ITERATOR_DIFFMAX_T_HPP
#define RANGES_V3_ITERATOR_DIFFMAX_T_HPP
#include <cstdint>
#include <iosfwd>
#include <limits>
#include <concepts/concepts.hpp>
#include <range/v3/range_fwd.hpp>
#include <range/v3/iterator/concepts.hpp>
namespace ranges
{
/// \cond
namespace detail
{
struct diffmax_t
{
private:
bool neg_;
std::uintmax_t val_;
struct tag {};
constexpr diffmax_t(tag, bool neg, std::uintmax_t val)
: neg_(val && neg)
, val_(val)
{}
/// \cond
constexpr /*c++14*/ void _check()
{
RANGES_ENSURE(!neg_ || val_);
}
static constexpr diffmax_t _normalize(bool neg, std::uintmax_t val)
{
return diffmax_t{tag{}, val && neg, val};
}
/// \endcond
public:
diffmax_t() = default;
template<typename T>
constexpr CPP_ctor(diffmax_t)(T val)(noexcept(true) requires Integral<T>)
: neg_(0 > val)
, val_(0 > val ? static_cast<std::uintmax_t>(-val) : static_cast<std::uintmax_t>(val))
{}
constexpr friend bool operator<(diffmax_t a, diffmax_t b) noexcept
{
a._check(); b._check();
return a.neg_
? (b.neg_ ? a.val_ > b.val_ : true)
: (b.neg_ ? false : a.val_ < b.val_);
}
constexpr friend bool operator>(diffmax_t a, diffmax_t b) noexcept
{
return b < a;
}
constexpr friend bool operator<=(diffmax_t a, diffmax_t b) noexcept
{
return !(b < a);
}
constexpr friend bool operator>=(diffmax_t a, diffmax_t b) noexcept
{
return !(a < b);
}
constexpr friend bool operator==(diffmax_t a, diffmax_t b) noexcept
{
a._check(); b._check();
return a.val_ == b.val_ && a.neg_ == b.neg_;
}
constexpr friend bool operator!=(diffmax_t a, diffmax_t b) noexcept
{
return !(a == b);
}
constexpr friend diffmax_t operator+(diffmax_t a) noexcept
{
return a;
}
constexpr friend diffmax_t operator-(diffmax_t a) noexcept
{
return _normalize(!a.neg_, a.val_);
}
constexpr friend diffmax_t operator+(diffmax_t a, diffmax_t b) noexcept
{
return a.neg_ == b.neg_
? diffmax_t{tag{}, a.neg_, a.val_ + b.val_}
: (a.neg_
? (a.val_ > b.val_
? diffmax_t{tag{}, true, a.val_ - b.val_}
: diffmax_t{tag{}, false, b.val_ - a.val_})
: (b.val_ > a.val_
? diffmax_t{tag{}, true, b.val_ - a.val_}
: diffmax_t{tag{}, false, a.val_ - b.val_}));
}
constexpr friend diffmax_t operator-(diffmax_t a, diffmax_t b) noexcept
{
return a + -b;
}
constexpr friend diffmax_t operator*(diffmax_t a, diffmax_t b) noexcept
{
return _normalize(a.neg_ ^ b.neg_, a.val_ * b.val_);
}
constexpr friend diffmax_t operator/(diffmax_t a, diffmax_t b) noexcept
{
return _normalize(a.neg_ ^ b.neg_, a.val_ / b.val_);
}
constexpr friend diffmax_t operator%(diffmax_t a, diffmax_t b) noexcept
{
return _normalize(a.neg_, a.val_ % b.val_);
}
static constexpr std::uintmax_t compl_if(bool neg, std::uintmax_t val) noexcept
{
return neg ? ~val + 1 : val;
}
constexpr friend diffmax_t operator&(diffmax_t a, diffmax_t b) noexcept
{
return _normalize(
a.neg_ && b.neg_,
compl_if(
a.neg_ && b.neg_,
compl_if(a.neg_, a.val_) & compl_if(b.neg_, b.val_)));
}
constexpr friend diffmax_t operator|(diffmax_t a, diffmax_t b) noexcept
{
return _normalize(
a.neg_ || b.neg_,
compl_if(
a.neg_ || b.neg_,
compl_if(a.neg_, a.val_) | compl_if(b.neg_, b.val_)));
}
constexpr friend diffmax_t operator^(diffmax_t a, diffmax_t b) noexcept
{
return _normalize(
bool(a.neg_ ^ b.neg_),
compl_if(
bool(a.neg_ ^ b.neg_),
compl_if(a.neg_, a.val_) ^ compl_if(b.neg_, b.val_)));
}
constexpr friend diffmax_t operator<<(diffmax_t a, diffmax_t b) noexcept
{
RANGES_ENSURE(!a.neg_);
return b.neg_
? diffmax_t{tag{}, false, a.val_ >> b.val_}
: diffmax_t{tag{}, false, a.val_ << b.val_};
}
constexpr friend diffmax_t operator>>(diffmax_t a, diffmax_t b) noexcept
{
return b.neg_
? diffmax_t{tag{}, a.neg_, a.val_ << b.val_}
: diffmax_t{tag{}, a.neg_, a.val_ >> b.val_};
}
constexpr /*c++14*/ friend diffmax_t& operator+=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a + b);
}
constexpr /*c++14*/ friend diffmax_t& operator-=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a - b);
}
constexpr /*c++14*/ friend diffmax_t& operator*=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a * b);
}
constexpr /*c++14*/ friend diffmax_t& operator/=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a / b);
}
constexpr /*c++14*/ friend diffmax_t& operator%=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a % b);
}
constexpr /*c++14*/ friend diffmax_t& operator&=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a & b);
}
constexpr /*c++14*/ friend diffmax_t& operator|=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a | b);
}
constexpr /*c++14*/ friend diffmax_t& operator^=(diffmax_t& a, diffmax_t b) noexcept
{
return (a = a ^ b);
}
constexpr /*c++14*/ friend diffmax_t& operator<<=(diffmax_t& a, diffmax_t b) noexcept
{
a = (a << b);
return a;
}
constexpr /*c++14*/ friend diffmax_t& operator>>=(diffmax_t& a, diffmax_t b) noexcept
{
a = (a >> b);
return a;
}
template<typename T>
constexpr /*c++14*/ friend auto operator+=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} + b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator-=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} - b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator*=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} * b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator/=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} / b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator%=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} % b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator&=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} & b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator|=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} | b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator^=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
return (a = static_cast<T>(diffmax_t{a} ^ b));
}
template<typename T>
constexpr /*c++14*/ friend auto operator<<=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
a = static_cast<T>(diffmax_t{a} << b);
return a;
}
template<typename T>
constexpr /*c++14*/ friend auto operator>>=(T& a, diffmax_t b) noexcept ->
CPP_broken_friend_ret(T&)(
requires Integral<T>)
{
a = static_cast<T>(diffmax_t{a} >> b);
return a;
}
constexpr /*c++14*/ friend diffmax_t& operator++(diffmax_t& a) noexcept
{
a.neg_ = (a.neg_ ? --a.val_ : ++a.val_) && a.neg_;
return a;
}
constexpr /*c++14*/ friend diffmax_t& operator--(diffmax_t& a) noexcept
{
a.neg_ = (a.neg_ ? ++a.val_ : --a.val_) && a.neg_;
return a;
}
constexpr /*c++14*/ friend diffmax_t operator++(diffmax_t& a, int) noexcept
{
auto tmp = a;
++a;
return tmp;
}
constexpr /*c++14*/ friend diffmax_t operator--(diffmax_t& a, int) noexcept
{
auto tmp = a;
--a;
return tmp;
}
CPP_template(typename T)(
requires Integral<T>)
explicit constexpr operator T() const noexcept
{
return neg_ ? -static_cast<T>(val_) : static_cast<T>(val_);
}
explicit constexpr operator bool() const noexcept
{
return val_ != 0;
}
constexpr bool operator!() const noexcept
{
return val_ == 0;
}
template<typename Ostream>
friend auto operator<<(Ostream& sout, diffmax_t a) ->
CPP_broken_friend_ret(std::ostream&)(
requires DerivedFrom<
Ostream,
std::basic_ostream<
typename Ostream::char_type,
typename Ostream::traits_type>>)
{
return sout << (&"-"[!a.neg_]) << a.val_;
}
};
template<>
RANGES_INLINE_VAR constexpr bool _is_integer_like_<diffmax_t> = true;
}
/// \endcond
}
/// \cond
RANGES_DIAGNOSTIC_PUSH
RANGES_DIAGNOSTIC_IGNORE_MISMATCHED_TAGS
namespace std
{
template <>
struct numeric_limits< ::ranges::detail::diffmax_t >
{
static constexpr bool is_specialized = true;
static constexpr bool is_signed = true;
static constexpr bool is_integer = true;
static constexpr bool is_exact = true;
static constexpr bool has_infinity = false;
static constexpr bool has_quiet_NaN = false;
static constexpr bool has_signaling_NaN = false;
static constexpr bool has_denorm = false;
static constexpr bool has_denorm_loss = false;
static constexpr std::float_round_style round_style = std::round_toward_zero;
static constexpr bool is_iec559 = false;
static constexpr bool is_bounded = true;
static constexpr bool is_modulo = false;
static constexpr int digits = CHAR_BIT * sizeof(std::uintmax_t) + 1;
static constexpr int digits10 = static_cast<int>(digits * 0.301029996); // digits * std::log10(2)
static constexpr int max_digits10 = 0;
static constexpr int radix = 2;
static constexpr int min_exponent = 0;
static constexpr int min_exponent10 = 0;
static constexpr int max_exponent = 0;
static constexpr int max_exponent10 = 0;
static constexpr bool traps = true;
static constexpr bool tinyness_before = false;
static constexpr ::ranges::detail::diffmax_t max() noexcept
{
return std::uintmax_t(-1);
}
static constexpr ::ranges::detail::diffmax_t min() noexcept
{
return -max();
}
static constexpr ::ranges::detail::diffmax_t lowest() noexcept
{
return min();
}
static constexpr ::ranges::detail::diffmax_t epsilon() noexcept
{
return 0;
}
static constexpr ::ranges::detail::diffmax_t round_error() noexcept
{
return 0;
}
static constexpr ::ranges::detail::diffmax_t infinity() noexcept
{
return 0;
}
static constexpr ::ranges::detail::diffmax_t quiet_NaN() noexcept
{
return 0;
}
static constexpr ::ranges::detail::diffmax_t signaling_NaN() noexcept
{
return 0;
}
static constexpr ::ranges::detail::diffmax_t denorm_min() noexcept
{
return 0;
}
};
template <>
struct numeric_limits< ::ranges::detail::diffmax_t const >
: numeric_limits< ::ranges::detail::diffmax_t >
{};
template <>
struct numeric_limits< ::ranges::detail::diffmax_t volatile >
: numeric_limits< ::ranges::detail::diffmax_t >
{};
template <>
struct numeric_limits< ::ranges::detail::diffmax_t const volatile >
: numeric_limits< ::ranges::detail::diffmax_t >
{};
#if RANGES_CXX_INLINE_VARIABLES >= RANGES_CXX_INLINE_VARIABLES_17
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_specialized;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_signed;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_integer;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_exact;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_infinity;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_quiet_NaN;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_signaling_NaN;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_denorm;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::has_denorm_loss;
inline constexpr std::float_round_style numeric_limits< ::ranges::detail::diffmax_t >::round_style;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_iec559;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_bounded;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::is_modulo;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::digits;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::digits10;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::max_digits10;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::radix;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::min_exponent;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::min_exponent10;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::max_exponent;
inline constexpr int numeric_limits< ::ranges::detail::diffmax_t >::max_exponent10;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::traps;
inline constexpr bool numeric_limits< ::ranges::detail::diffmax_t >::tinyness_before;
#endif
} // namespace std
RANGES_DIAGNOSTIC_POP
/// \endcond
#endif
| [
"melston1777@gmail.com"
] | melston1777@gmail.com |
15cf0b87bfc035b27021c2a3dfb125420b23527d | 1f013e822124dfe9b4611f1fe08675a23871566e | /home/akielczewska/z1/tro.cpp | 96a7d0afb9c43832fc3df50ae45c2c0fbce2429e | [] | no_license | dtraczewski/zpk2014 | a1d9a26d25ff174561e3b20c8660901178d827a5 | 548970bc5a9a02215687cb143d2f3f44307ff252 | refs/heads/master | 2021-01-21T06:06:32.044028 | 2015-09-06T12:17:07 | 2015-09-06T12:17:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 188 | cpp | #include <iostream>
using namespace std;
main() {
int a,b,c;
cin >> a >> b >> c;
if (a+b>c && a+c>b && b+c>a)
cout << "TAK" << endl;
else cout << "NIE" << endl;
}
| [
"aneta.kielczewska@student.uw.edu.pl"
] | aneta.kielczewska@student.uw.edu.pl |
f8417f64cdc4d8fe7b31c5fe1bf7e04498e17f40 | e08bcb770a05655d1bd803b8fca9defc6698188a | /examples/postfix/composite_operation.hh | c7640bd3f90f81081e11fca2c7a943b2485ab200 | [] | no_license | elsys/oop-2016-2017 | f006c9e717d83b6efa152d89b7f61be8ec4a4740 | cadc4f2b55adb68655f0fb568ccc0e9b156c426c | refs/heads/master | 2021-01-11T03:10:12.609194 | 2018-05-31T05:53:57 | 2018-05-31T05:53:57 | 70,146,655 | 13 | 21 | null | 2017-04-04T11:47:17 | 2016-10-06T11:12:08 | PostScript | UTF-8 | C++ | false | false | 373 | hh | #ifndef COMPOSITE_OPERATION_HH__
#define COMPOSITE_OPERATION_HH__
#include <list>
#include "operation.hh"
class CompositeOperation: public Operation {
std::list<Operation*> operations_;
public:
CompositeOperation(const std::string& name);
~CompositeOperation();
void add_operation(Operation* op);
void execute(Context& context) const;
};
#endif
| [
"lubomir.chorbadjiev@gmail.com"
] | lubomir.chorbadjiev@gmail.com |
86030c8f0df20f20e1d8ca226f91355ca1127a7c | fb6e1b288e76b34903b5d79262e5942148f1b188 | /TestCapi/Test_CDHashAVLTree.cpp | 2fc661c8a9363b230c039b37d788fe802a564257 | [] | no_license | zhangnju/capi | 2fee06bb32b4871ca79dc062115a8dacf6b3febf | bc64605c18e47b90dd2f69ff9d1d622e3a89d6a1 | refs/heads/master | 2020-03-18T01:31:13.212222 | 2018-05-20T11:52:06 | 2018-05-20T11:52:06 | 134,145,645 | 0 | 0 | null | null | null | null | ISO-8859-13 | C++ | false | false | 2,844 | cpp | /*
* Copyright (c) 2006-2008
* Author: Weiming Zhou
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
*/
#include <windows.h>
#include <process.h>
#include <stdio.h>
#include <time.h>
#include <omp.h>
#include "TestApi.h"
#include "CDHashAVLTree.h"
void TestCase_CDHashAVLTree_TestCase1(void);
void TestCase_CDHashAVLTree_TestCase2(void);
void Test_CDHashAVLTree()
{
TestCase_Add(TestCase_CDHashAVLTree_TestCase1);
TestCase_Add(TestCase_CDHashAVLTree_TestCase2);
}
REGISTER_TESTFUNC(Test_CDHashAVLTree)
extern void *IntCopy(void *p); //¼ūTest_DHashAVLTree.cpp
void TestCase_CDHashAVLTree_TestCase1(void)
{
CDHashAVLTree dtree(2, HashInt, IntCompare, NULL, IntCopy);
int i;
for ( i = 400; i > 0 ; i-- )
{
if ( i == 32 )
{
printf( "i = %ld\n", i);
}
dtree.Insert((void *)i);
}
int a = 3;
int ret = -1;
ret = (int)dtree.Find((void *)a);
assertTrue( ret == a);
for ( i = 1; i <= 400; i++ )
{
ret = (int)dtree.Find((void *)i);
if ( ret != i )
{
printf("ret = %ld, i = %ld\n", ret, i);
}
}
dtree.Delete((void *)a);
ret = (int)dtree.Find((void *)a);
assertTrue(ret == 0);
dtree.Insert((void *)a);
for ( i = 1; i <= 400; i++ )
{
ret = (int)dtree.Find((void *)i);
if ( ret != i )
{
printf("ret = %ld, i = %ld\n", ret, i);
}
}
printf("TestCase1 Finished.\n");
}
void CDHashAVLTree_Find_Thread(LPVOID args)
{
CDHashAVLTree *p = (CDHashAVLTree *)args;
int Key;
int i;
int data = 1001;
for(i = 0; i < 100000; i++)
{
Key = (int)p->Find((void *)data);
assertTrue(Key == data || Key == 0);
}
}
void TestCase_CDHashAVLTree_TestCase2(void)
{
CDHashAVLTree dtree(32768, HashInt, IntCompare, NULL, IntCopy);
int i;
clock_t t1, t2;
t1 = clock();
//#pragma omp parallel for num_threads(4) schedule(static, 16)
for ( i = 1; i <= 1000000; i++ )
{
dtree.Insert((void *)i);
}
t2 = clock();
printf("CDHashAVLTree::Insert, time = %ld\n", t2-t1);
int data = 1001;
_beginthread(CDHashAVLTree_Find_Thread, 0, (void *)&dtree);
for ( i = 0; i < 100000; i++ )
{
dtree.Delete((void *)data);
dtree.Insert((void *)data);
}
t1 = clock();
#pragma omp parallel for //schedule(static, 4096)
for ( i = 1; i <= 1000000; i++ )
{
int Key;
Key = (int)dtree.Find((void *)i);
}
t2 = clock();
printf("CDHashAVLTree::Find 1000000, time = %ld\n", t2-t1);
t1 = clock();
#pragma omp parallel for //schedule(static, 4096)
for ( i = 1; i <= 1000000; i++ )
{
int Key;
Key = (int)dtree.Find((void *)i);
}
t2 = clock();
printf("CDHashAVLTree::Find 1000000, time = %ld\n", t2-t1);
Sleep(100);
}
| [
"nzhangnju@gmail.com"
] | nzhangnju@gmail.com |
a68d4cf6a617f0de643a9cf6559ba876ca66babe | 078544d216185416a840399172f07ccd1caad07f | /friendtrackerUI/src/RegistrationHandler.cpp | 0185281918ebc320e713d3ce501b766956091ad4 | [] | no_license | sukwon0709/friendtrackerUI | 23bec4ee5e885e5a6829c26dc02155ae1707ff41 | 14d64d60288b53584b968e018e2e979f6732a2a8 | refs/heads/master | 2021-01-10T19:45:06.595769 | 2013-04-03T00:41:29 | 2013-04-03T00:41:29 | 8,827,293 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,803 | cpp | /**
* Connect to BBM
*
* by Sukwon Oh
*/
#include "RegistrationHandler.hpp"
#include <bb/cascades/AbstractPane>
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/system/SystemDialog>
#include <bb/platform/bbm/Context>
#include <bb/platform/bbm/RegistrationState>
#include "LoginMessage.h"
#include "ServerInterface.h"
#include <QList>
#include <iostream>
using namespace std;
using namespace bb::cascades;
using namespace bb::platform::bbm;
using namespace bb::system;
RegistrationHandler::RegistrationHandler(const QUuid &uuid, QObject *parent)
: QObject(parent)
, m_context(uuid)
, m_isAllowed(false)
, m_progress(BbmRegistrationProgress::NotStarted)
, m_temporaryError(false)
, m_statusMessage(tr("Please wait while the application connects to BBM."))
{
QmlDocument* qml = QmlDocument::create("asset:///registration.qml")
.parent(this);
qml->setContextProperty("_registrationHandler", this);
AbstractPane *root = qml->createRootObject<AbstractPane>();
Application::instance()->setScene(root);
if (uuid.isNull()) {
SystemDialog *uuidDialog = new SystemDialog("OK");
uuidDialog->setTitle("UUID Error");
uuidDialog->setBody("Invalid/Empty UUID, please set correctly in main.cpp");
connect(uuidDialog, SIGNAL(finished(bb::system::SystemUiResult::Type)),
this, SLOT(dialogFinished(bb::system::SystemUiResult::Type)));
uuidDialog->show();
return;
}
connect(&m_context,
SIGNAL(registrationStateUpdated(
bb::platform::bbm::RegistrationState::Type)),
this,
SLOT(processRegistrationStatus(
bb::platform::bbm::RegistrationState::Type)));
}
void RegistrationHandler::registerApplication()
{
m_progress = BbmRegistrationProgress::Started;
processRegistrationStatus(m_context.registrationState());
}
void RegistrationHandler::processRegistrationStatus(const RegistrationState::Type state)
{
// Based on the state, decide whether we need to register. If we already
// registered successfully once (i.e. on a previous application run), then
// we will not call requestRegisterApplication() again.
qDebug() << "Received a BBM Social Platform registration access state="
<< state;
switch(m_progress)
{
case BbmRegistrationProgress::Pending:
if (state != RegistrationState::Pending) {
registrationFinished();
return;
}
// Otherwise, ignore since registration is still in progress.
break;
case BbmRegistrationProgress::Started:
if (m_context.isAccessAllowed()) {
// Access is allowed, the application is registered.
registrationFinished();
return;
}
if (m_context.registrationState() == RegistrationState::Unknown) {
// Status is not yet known. Wait for an event that will deliver the
// status.
qDebug() << "BBM Social Platform access state is UNKNOWN; waiting "
"for the initial status";
return;
}
// Start registration.
if (m_context.requestRegisterApplication()) {
// Registration started. The user will see a dialog informing them
// that your application is connecting to BBM.
m_progress = BbmRegistrationProgress::Pending;
qDebug() << "BBM Social Platform registration started";
qDebug() << "Verify you are using a valid UUID";
return;
}
// Could not start registration. No dialogs were shown.
qDebug() << "BBM Social Platform registration could not be started";
registrationFinished();
break;
case BbmRegistrationProgress::Finished:
if (m_context.isAccessAllowed() != m_isAllowed) {
// Access to the BBM Social Platform has changed.
registrationFinished();
}
break;
default:
qDebug() << "Ignoring BBM Social Platform access state=" << state
<< "when progress=" << m_progress;
break;
}
}
void RegistrationHandler::registrationFinished()
{
// Finish registration and use the state to decide which message to show
// the user.
m_progress = BbmRegistrationProgress::Finished;
switch (m_context.registrationState()) {
case RegistrationState::Allowed:
m_statusMessage = tr("Application connected to BBM. Press Continue.");
m_temporaryError = false;
finishRegistration();
break;
// This error code is not yet available in the NDK.
// case RegistrationState::BbmDisabled:
// m_statusMessage = tr("Cannot connect to BBM. BBM is not setup. "
// "Open BBM to set it up and try again.");
// m_temporaryError = false;
// break;
case RegistrationState::BlockedByRIM:
m_statusMessage = tr("Disconnected by RIM. RIM is preventing this "
"application from connecting to BBM.");
m_temporaryError = false;
break;
case RegistrationState::BlockedByUser:
m_statusMessage = tr("Disconnected. Go to Settings -> Security and "
"Privacy -> Application Permissions and "
"connect this application to BBM.");
m_temporaryError = false;
break;
case RegistrationState::InvalidUuid:
// You should be resolving this error at development time.
m_statusMessage = tr("Invalid UUID. Report this error to the "
"vendor.");
m_temporaryError = true;
break;
case RegistrationState::MaxAppsReached:
m_statusMessage = tr("Too many applications are connected to BBM. "
"Uninstall one or more applications and try "
"again.");
m_temporaryError = false;
break;
case RegistrationState::Expired:
case RegistrationState::MaxDownloadsReached:
m_statusMessage = tr("Cannot connect to BBM. Download this "
"application from AppWorld to keep using it.");
m_temporaryError = false;
break;
case RegistrationState::NoDataConnection:
m_statusMessage = tr("Check your Internet connection and try again.");
m_temporaryError = true;
break;
case RegistrationState::Pending:
// The user will never see this. The BBM Social Platform already
// displays a "Connecting" dialog.
m_statusMessage = tr("Connecting to BBM. Please wait.");
m_temporaryError = false;
break;
case RegistrationState::Unknown:
m_statusMessage = tr("Determining the status. Please wait.");
m_temporaryError = false;
break;
case RegistrationState::Unregistered:
case RegistrationState::UnexpectedError:
case RegistrationState::TemporaryError:
case RegistrationState::CancelledByUser:
default:
// If new error codes are added, treat them as temporary errors.
m_statusMessage = tr("Would you like to connect the application to "
"BBM?");
m_temporaryError = true;
break;
}
if (m_context.isAccessAllowed()) {
m_isAllowed = true;
} else {
m_isAllowed = false;
}
qDebug() << "Finished BBM Social Platform registration, success="
<< m_isAllowed << "temporaryError=" << m_temporaryError;
emit stateChanged();
}
void RegistrationHandler::dialogFinished(bb::system::SystemUiResult::Type value) {
Q_UNUSED(value);
Application::exit(-1);
}
void RegistrationHandler::finishRegistration() {
emit registered();
}
| [
"s3oh@uwaterloo.ca"
] | s3oh@uwaterloo.ca |
1e29e7513257305cc5edabf872713b5ee9582778 | e9a8fffb05b32e8332f15d4dea96761261c0353c | /image-compression/compression.cpp | cbe935ab6ee868186775c93baea6b355ca2b5f5a | [] | no_license | brightnesss/image-processing | 7590933547519ba551d2b6df630a92437a329f7a | 450914d04d33020e1868d800f2fe2e7896397da2 | refs/heads/master | 2020-05-23T08:10:40.040189 | 2017-01-13T12:02:09 | 2017-01-13T12:02:09 | 70,224,402 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 3,928 | cpp | //8*8矩阵的zigzag行程压缩编码示意
#include <iostream>
#include <opencv2\opencv.hpp>
#include <math.h>
#include <vector>
#include <algorithm>
#define PLUS 1
#define MINUS 0
using namespace std;
using namespace cv;
void InitMat(Mat &img, float(*pf)[8])
{
for (unsigned short i = 0;i < img.rows;++i)
for (unsigned short j = 0;j < img.cols;++j)
img.at<float>(i, j) = *(*(pf + i) + j);
}
void MoveImg(Mat &src, Mat &dst, bool flag)
{
for (unsigned short i = 0;i < src.rows;++i)
for (unsigned short j = 0;j < src.cols;++j)
dst.at<float>(i, j) = flag ? src.at<float>(i, j) + 128 : src.at<float>(i, j) - 128;
}
void WriteImg(Mat &img)
{
for (unsigned short i = 0;i < img.rows;++i)
{
for (unsigned short j = 0;j < img.cols;++j)
{
cout << img.at<float>(i, j) << " ";
}
cout << endl;
}
}
void round(Mat &src,Mat &dst)
{
for (unsigned short i = 0;i < src.rows;++i)
for (unsigned short j = 0;j < src.cols;++j)
dst.at<float>(i, j) = round(src.at<float>(i, j));
}
void quantification(Mat &src, Mat &dst, Mat &model)
{
if ((src.rows != model.rows) || (src.cols != model.cols)) { return; }
for (unsigned short i = 0;i < src.rows;++i)
for (unsigned short j = 0;j < src.cols;++j)
dst.at<float>(i, j) = src.at<float>(i, j) / model.at<float>(i, j);
round(dst, dst);
}
void dequantification(Mat &src, Mat &dst, Mat &model) {
if ((src.rows != model.rows) || (src.cols != model.cols)) { return; }
for (unsigned short i = 0;i < src.rows;++i)
for (unsigned short j = 0;j < src.cols;++j)
dst.at<float>(i, j) = src.at<float>(i, j) * model.at<float>(i, j);
}
vector<int> zigzag(Mat &img)
{
//8*8矩阵的zigzag系数排列矩阵
vector<int> ans;
int count = 0;
int i = 0; //行标号
int j = 0; //列标号
int count_j = 1;
int count_i = 2;
ans.push_back(img.at<float>(i, j));
++count;
++j;
while (count != 64)
{
while ((j != -1) && (i != 8))
{
ans.push_back(img.at<float>(i++, j--));
++count;
}
if (i == 8)
{
i = 7;
j = count_j;
count_j += 2;
}
else j = 0;
while ((i != -1) && (j != 8))
{
ans.push_back(img.at<float>(i--, j++));
++count;
}
if (j == 8)
{
j = 7;
i = count_i;
count_i += 2;
}
else i = 0;
}
while (*ans.rbegin() == 0) ans.pop_back();
return ans;
}
float calculateError(Mat &img1, Mat &img2)
{
float error = 0;
for (unsigned short i = 0;i != img1.rows;++i)
for (unsigned short j = 0;j != img1.cols;++j)
error = error + pow((img1.at<float>(i, j) - img2.at<float>(i, j)), 2);
error = error / (img1.rows*img1.cols);
return sqrt(error);
}
int main()
{
float f_img[][8] = {
52,55,61,66,70,61,64,73,
63,59,66,90,109,85,69,72,
62,59,68,113,144,104,66,73,
63,58,71,122,154,106,70,69,
67,61,68,104,126,88,68,70,
79,65,60,70,77,68,58,75,
85,71,64,59,55,61,65,83,
87,79,69,68,65,76,78,94
};
Mat img(8, 8, CV_32FC1);
InitMat(img, f_img);
Mat moveImg(8, 8, CV_32FC1);
MoveImg(img, moveImg, MINUS);
Mat dctImg(8, 8, CV_32FC1);
dct(moveImg, dctImg);
round(dctImg, dctImg);
float f_model[][8] = {
16,11,10,16,24,40,51,61,
12,12,14,19,26,58,60,55,
14,13,16,24,40,57,69,56,
14,17,22,29,51,87,80,62,
18,22,37,56,68,109,103,77,
24,35,55,64,81,104,113,92,
49,64,78,87,103,121,120,101,
72,92,95,98,112,100,103,99
};
Mat model(8, 8, CV_32FC1);
InitMat(model, f_model);
Mat compressImg(8, 8, CV_32FC1);
quantification(dctImg, compressImg, model);
vector<int> zigzagVec;
zigzagVec = zigzag(compressImg);
for (vector<int>::const_iterator iter = zigzagVec.begin();iter != zigzagVec.end();++iter)
{
cout << *iter << " ";
}
cout << "EOB" << endl << endl;
Mat decode(8, 8, CV_32FC1);
dequantification(compressImg, decode, model);
Mat idctImg(8, 8, CV_32FC1);
idct(decode, idctImg);
round(idctImg, idctImg);
Mat removeImg(8, 8, CV_32FC1);
MoveImg(idctImg, removeImg, PLUS);
float error = calculateError(img, removeImg);
cout << error << endl;
} | [
"brightness_j@hotmail.com"
] | brightness_j@hotmail.com |
eb3f5ff7f0e0fea98a39a59d1d32977cb6f54988 | 257592e3ab692064e4545d30c58bed7cda59e8ad | /FunctionGenerator/pci.cpp | 7d81263aab3d08b456da218dc0c74e6a507d8a37 | [] | no_license | CheMingLee/PMC6_DLL_FunctionGenerator | 8e5ac8ae6220ca8dbd7d574711aa570f5b846eb6 | 66c725f2e73cd85b8324e3908c9a865746ae86e6 | refs/heads/master | 2023-02-24T21:43:50.027263 | 2021-01-28T10:54:36 | 2021-01-28T10:54:36 | 329,289,703 | 0 | 0 | null | null | null | null | BIG5 | C++ | false | false | 14,155 | cpp | // pci.cpp : 定義 PCI通訊功能
#include "stdafx.h"
#include <stdio.h>
#include "pci.h"
#include "Dev_PMC6.h"
#include <setupapi.h>
#include <winioctl.h>
#include "ctrlcard.h"
//#define _MEGSHOW
#define KER_RW
//Bill_20100202 reply status
#define PCI_NO_DATA 0
#define PCI_READ_END 1
#define PCI_RETRY 2
#define _NOCARD
#define PCI_READ_OFFSET 128
#define PCI_WRITE_OFFSET 0
extern CDev_PMC6 g_DevPMC6;
unsigned long g_lErr;
HDC hDC;
extern long g_PMC6_Auth[MAX_ID];
void PCI_ShowErrCode(BYTE byErrCode,BYTE bReturnCode)
{
char szT[256];
#ifndef _DEBUG
return;
#endif
g_lErr++;
hDC = ::GetDC(NULL);
if (byErrCode == 0)
{
sprintf_s(szT, "<<%ld >>" , g_lErr);
}
else
{
sprintf_s(szT, "<<Retry = %ld, %ld>>" , byErrCode,bReturnCode);
}
::TextOut(hDC, 0,0, szT, (int)strlen(szT));
::ReleaseDC(NULL, hDC);
//MessageBox(NULL,szT,0,0);
}
// PCI control base function
//============================================================
//Bill_20100709
BOOL PCI_TransmitBlock(BYTE *WBuf,ULONG WSize,BYTE *RBuf,ULONG RBSize,ULONG *RSize,ULONG BackData)
{
BYTE TBuf[256];
DWORD IoctlCode = IOCTL_GPD_TRANSMITBLOCK;
#ifndef PMC6_WIN64
DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard];
#else
UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard];
#endif
#ifdef _NOCARD
if(g_DevPMC6.m_hHandle[g_DevPMC6.m_dwSelectCard] == NULL)
{
return FALSE;
}
#endif
if(WSize > (248))
return FALSE;
#ifndef PMC6_WIN64
*(PULONG)TBuf = addr;
*(PULONG)(TBuf + 4) = BackData;
*(PULONG)(TBuf + 8) = WSize;
memcpy(TBuf + 12,WBuf,WSize);
return g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
TBuf, // Buffer to driver.
WSize + 12, // Length of buffer in bytes.
RBuf, // Buffer from driver.
RBSize, // Length of buffer in bytes.
RSize, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
#else
*(PUINT64)TBuf = addr;
*(PULONG)(TBuf + 8) = BackData;
*(PULONG)(TBuf + 12) = WSize;
memcpy(TBuf + 16,WBuf,WSize);
return g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
TBuf, // Buffer to driver.
WSize + 16, // Length of buffer in bytes.
RBuf, // Buffer from driver.
RBSize, // Length of buffer in bytes.
RSize, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
#endif
}
DWORD PCI_GetStReg()
{
BYTE buf[4];
DWORD Databuf;
DWORD DataLength;
DWORD ReturnedLength;
DWORD IoctlCode = IOCTL_GPD_READ_MEMORY_ULONG;
#ifndef PMC6_WIN64
DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard];
#else
UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard];
#endif
DataLength = 4;
g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
&addr, // Buffer to driver.
sizeof(addr), // Length of buffer in bytes.
buf, // Buffer from driver.
DataLength, // Length of buffer in bytes.
&ReturnedLength, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
//emission_20100109_改善效能問題
BYTE* pbyData = (BYTE*)(&Databuf);
pbyData[0] = buf[0];
pbyData[1] = buf[1];
pbyData[2] = buf[2];
pbyData[3] = buf[3];
/*
memcpy(((BYTE *)&sDatabuf) ,&buf[1],1);
memcpy(((BYTE *)&sDatabuf + 1),&buf[0],1);
*/
//emission_20100109_改善效能問題
return Databuf;
}
BOOL PCI_SetStReg(WORD bit,WORD On)
{
BYTE *buf;
BYTE data_buf[12];
DWORD StReg;
DWORD mask = 1 << bit;
DWORD DataLength;
DWORD ReturnedLength;
DWORD IoctlCode = IOCTL_GPD_WRITE_MEMORY_ULONG;
#ifndef PMC6_WIN64
DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard];
//emission_20100109_改善效能問題
BYTE* pbyData = (BYTE*)(&addr);
data_buf[0] = pbyData[0];
data_buf[1] = pbyData[1];
data_buf[2] = pbyData[2];
data_buf[3] = pbyData[3];
#else
UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard];
//emission_20100109_改善效能問題
BYTE* pbyData = (BYTE*)(&addr);
data_buf[0] = pbyData[0];
data_buf[1] = pbyData[1];
data_buf[2] = pbyData[2];
data_buf[3] = pbyData[3];
data_buf[4] = pbyData[4];
data_buf[5] = pbyData[5];
data_buf[6] = pbyData[6];
data_buf[7] = pbyData[7];
#endif
StReg = PCI_GetStReg();
if(On)
StReg = StReg | mask;
else
{
mask = ~mask;
StReg = StReg & mask;
}
buf = (BYTE *)&StReg;
#ifndef PMC6_WIN64
data_buf[4] = buf[0];
data_buf[5] = buf[1];
data_buf[6] = buf[2];
data_buf[7] = buf[3];
DataLength = 8;
#else
data_buf[8] = buf[0];
data_buf[9] = buf[1];
data_buf[10] = buf[2];
data_buf[11] = buf[3];
DataLength = 12;
#endif
/*
memcpy(data_buf,&addr,4);
sStReg = PCI_GetStReg();
if(On)
sStReg = sStReg | mask;
else
{
mask = !mask;
sStReg = sStReg & mask;
}
memcpy(&data_buf[4],&buf[1],1);
memcpy(&data_buf[5],&buf[0],1);
*/
//emission_20100109_改善效能問題
return g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
data_buf, // Buffer to driver.
DataLength, // Length of buffer in bytes.
NULL, // Buffer from driver.
0, // Length of buffer in bytes.
&ReturnedLength, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
}
BOOL PCI_SetDataSize(WORD sDSize)
{
BYTE *buf;
BYTE data_buf[6];
DWORD DataLength;
DWORD ReturnedLength;
DWORD IoctlCode = IOCTL_GPD_WRITE_MEMORY_USHORT;
#ifndef PMC6_WIN64
DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 2;
memcpy(data_buf,&addr,4);
buf = (BYTE *)&sDSize;
//emission_20100109_改善效能問題
data_buf[4] = buf[1];
data_buf[5] = buf[0];
// memcpy(&data_buf[4],&buf[1],1);
// memcpy(&data_buf[5],&buf[0],1);
//emission_20100109_改善效能問題
DataLength = 6;
#else
UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 2;
memcpy(data_buf,&addr,8);
buf = (BYTE *)&sDSize;
data_buf[8] = buf[1];
data_buf[9] = buf[0];
DataLength = 10;
#endif
return g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
data_buf, // Buffer to driver.
DataLength, // Length of buffer in bytes.
NULL, // Buffer from driver.
0, // Length of buffer in bytes.
&ReturnedLength, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
}
WORD PCI_GetDataSize()
{
BYTE buf[2];
WORD sDatabuf;
DWORD DataLength;
DWORD ReturnedLength;
DWORD IoctlCode = IOCTL_GPD_READ_MEMORY_USHORT;
#ifndef PMC6_WIN64
DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 2;
#else
UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 2;
#endif
DataLength = 2;
g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
&addr, // Buffer to driver.
sizeof(addr), // Length of buffer in bytes.
buf, // Buffer from driver.
DataLength, // Length of buffer in bytes.
&ReturnedLength, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
//emission_20100109_改善效能問題
BYTE* pbyData = (BYTE*)(&sDatabuf);
*pbyData = buf[1];
pbyData = (BYTE*)(&sDatabuf)+1;
*pbyData = buf[0];
//memcpy(((BYTE *)&sDatabuf) ,&buf[1],1);
//memcpy(((BYTE *)&sDatabuf + 1),&buf[0],1);
//emission_20100109_改善效能問題
return sDatabuf;
}
BOOL PCI_Write(BYTE* data_buf,WORD data_count)
{
BYTE copy_buf[8];
DWORD DataLength;
DWORD ReturnedLength;
BOOL IoctlResult;
DWORD IoctlCode;
#ifndef PMC6_WIN64
DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 4;
#else
UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_WRITE_OFFSET + 4;
#endif
WORD PCI_StReg;
WORD data_count4; //data 4 倍數
WORD data_remain; // 非4倍數的剩餘資料
//wait write tag low
#ifdef _NOCARD
if(g_DevPMC6.m_hHandle[g_DevPMC6.m_dwSelectCard] == NULL)
{
return 0;
}
#endif
while((PCI_GetStReg() & 0x0001) == 0x0001)
{
}
if(data_count > 4096)
return 0;
PCI_SetDataSize(data_count);
data_count4 = data_count / 4;
data_remain = data_count % 4;
IoctlCode = IOCTL_GPD_WRITE_MEMORY_ULONG;
//4
for(int i = 0 ; i< data_count4 ; i++)
{
#ifndef PMC6_WIN64
memcpy(copy_buf,&addr,4);
memcpy(copy_buf + 4,data_buf + (i * 4),4);
DataLength =8;
addr+= 4;
IoctlResult = g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
copy_buf, // Buffer to driver.
DataLength, // Length of buffer in bytes.
NULL, // Buffer from driver.
0, // Length of buffer in bytes.
&ReturnedLength, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
#else
memcpy(copy_buf,&addr,8);
memcpy(copy_buf + 8,data_buf + (i * 4),4);
DataLength =12;
addr+= 4;
IoctlResult = g_DevPMC6.Dev_DeviceIo(
IoctlCode, // IO Control code for Read
copy_buf, // Buffer to driver.
DataLength, // Length of buffer in bytes.
NULL, // Buffer from driver.
0, // Length of buffer in bytes.
&ReturnedLength, // Bytes placed in DataBuffer.
NULL // NULL means wait till op. completes.
);
#endif
if(!IoctlResult)
return IoctlResult;
}
if(data_remain > 0)
{
IoctlCode = IOCTL_GPD_WRITE_MEMORY_UCHAR;
//1
for(int i = 0 ; i< data_remain ; i++)
{
#ifndef PMC6_WIN64
memcpy(copy_buf,&addr,4);
memcpy(copy_buf + 4,data_buf + (i + data_count4 * 4),1);
DataLength =5;
addr++;
IoctlResult = g_DevPMC6.Dev_DeviceIo(IoctlCode,copy_buf,DataLength,NULL,0,&ReturnedLength,NULL);
#else
memcpy(copy_buf,&addr,8);
memcpy(copy_buf + 8,data_buf + (i + data_count4 * 4),1);
DataLength =9;
addr++;
IoctlResult = g_DevPMC6.Dev_DeviceIo(IoctlCode,copy_buf,DataLength,NULL,0,&ReturnedLength,NULL);
#endif
if(!IoctlResult)
return IoctlResult;
}
}
PCI_StReg = 0x0001;
PCI_SetStReg(0,1);
return 1;
}
WORD PCI_Read(BYTE* data_buf,DWORD data_count)
{
//Bill_20201216 多卡上限調整修改
static int iVarInit = 0;
static WORD index[MAX_ID] = {0,0,0,0};
WORD dsize,i;
BYTE bybuf[4];
DWORD ReturnedLength;
DWORD IoctlCode;
//Bill_20201216 多卡上限調整修改
if(!iVarInit)
{
iVarInit = 1;
for(i = 0;i < MAX_ID;i++)
index[i] = 0;
}
#ifndef PMC6_WIN64
DWORD addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 4 + index[g_DevPMC6.m_dwSelectCard];
#else
UINT64 addr = g_DevPMC6.m_dwMemBases[g_DevPMC6.m_dwSelectCard] + PCI_READ_OFFSET + 4 + index[g_DevPMC6.m_dwSelectCard];
#endif
WORD data_count4;
WORD data_remain;
#ifdef _NOCARD
if(g_DevPMC6.m_hHandle[g_DevPMC6.m_dwSelectCard] == NULL)
{
return 1;
}
#endif
//wait write tag low
if((PCI_GetStReg() & 0x0002) == 0x0002)
{
dsize = PCI_GetDataSize();
if((index[g_DevPMC6.m_dwSelectCard] + data_count) > dsize)
data_count = dsize - index[g_DevPMC6.m_dwSelectCard];
index[g_DevPMC6.m_dwSelectCard] += (WORD)data_count;
data_count4 = (WORD)data_count / 4;
data_remain = (WORD)data_count % 4;
i = 0;
while(i < data_count)
{
if(addr % 4 != 0)
{
IoctlCode = IOCTL_GPD_READ_MEMORY_UCHAR;
g_DevPMC6.Dev_DeviceIo(IoctlCode,&addr,sizeof(addr),bybuf,1,&ReturnedLength,NULL);
*(data_buf + i) = bybuf[0];
addr ++;
i++;
}
else
{
if((DWORD)(i + 4) <= data_count)
{
IoctlCode = IOCTL_GPD_READ_MEMORY_ULONG;
g_DevPMC6.Dev_DeviceIo(IoctlCode,&addr,sizeof(addr),bybuf,4,&ReturnedLength,NULL);
memcpy(data_buf + i,bybuf,4);
addr += 4;
i += 4;
}
else
{
IoctlCode = IOCTL_GPD_READ_MEMORY_UCHAR;
g_DevPMC6.Dev_DeviceIo(IoctlCode,&addr,sizeof(addr),bybuf,1,&ReturnedLength,NULL);
*(data_buf + i) = bybuf[0];
addr ++;
i++;
}
}
}
if(index[g_DevPMC6.m_dwSelectCard] >= dsize)
{
index[g_DevPMC6.m_dwSelectCard] = 0;
PCI_SetStReg(1,0);
}
}
else
return 0;
return 1;
}
//============================================================
//判斷是否需要回應
BOOL PCI_CheckReplay(unsigned short usCmd)
{
BOOL bReBack;
bReBack = FALSE;
if (usCmd == CMD_SETLED || usCmd == CMD_GETLED || usCmd == CMD_GETDIGITAL || usCmd == CMD_GETANALOG || usCmd == CMD_GETRUNTIME)
{
bReBack = TRUE;
}
return bReBack;
}
BOOL PCI_Write_Datas(unsigned short usCmd, char *pData, unsigned short usSize)
{
BOOL bRet = TRUE;
BYTE szExt[256];
BYTE ReadBuf[256];
ULONG ReturnLen;
ULONG ReBack = PCI_CheckReplay(usCmd);
BOOL Ret = PCI_READ_END;
memcpy(szExt, &usCmd, 2);
memcpy(szExt + 2, &usSize, 2);
if(usSize > 0 && usSize <= 252)
{
memcpy(szExt + 4, pData, usSize);
}
do
{
if(!PCI_TransmitBlock(szExt, 4 + usSize, ReadBuf, sizeof(ReadBuf), &ReturnLen, ReBack))
{
bRet = FALSE;
break;
}
if(ReBack)
{
if(ReturnLen < 4)
Ret = PCI_RETRY;
else
{
unsigned short FbCmd;
memcpy(&FbCmd, ReadBuf, 2);
if(FbCmd != usCmd)
Ret = PCI_RETRY;
else
{
unsigned short FbSize;
memcpy(&FbSize, ReadBuf + 2, 2);
memset(&g_DevPMC6.m_ReadBuffer[g_DevPMC6.m_dwSelectCard][0], 0, 256);
memcpy(&g_DevPMC6.m_ReadBuffer[g_DevPMC6.m_dwSelectCard][0], ReadBuf + 4, FbSize);
Ret = PCI_READ_END;
}
}
}
}while(Ret == PCI_RETRY);
return bRet;
}
| [
"jmli1993@gmail.com"
] | jmli1993@gmail.com |
6ec8d304fd26a61d2effef62a2239c1f6c11884e | 7619f1f54f8a1f7b11dc1dbb840fd15677a10855 | /playertwo/cmake-build-debug/playertwo_autogen/EWIEGA46WW/moc_Player.cpp | a3bc45f8640e6634c9e9c8e0e4524d496c17869b | [] | no_license | kbyun03/4122FinalProject | b52ffd6f3f09161c2523f48dd6e061e130ea2554 | 83a414c3ebe49d03b0e90a8b515c81fa1666891c | refs/heads/master | 2020-03-10T15:13:30.964122 | 2018-05-03T18:22:36 | 2018-05-03T18:22:36 | 129,444,228 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,541 | cpp | /****************************************************************************
** Meta object code from reading C++ file 'Player.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../../../Player.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'Player.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.10.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Player_t {
QByteArrayData data[5];
char stringdata0[18];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Player_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Player_t qt_meta_stringdata_Player = {
{
QT_MOC_LITERAL(0, 0, 6), // "Player"
QT_MOC_LITERAL(1, 7, 5), // "spawn"
QT_MOC_LITERAL(2, 13, 0), // ""
QT_MOC_LITERAL(3, 14, 1), // "x"
QT_MOC_LITERAL(4, 16, 1) // "y"
},
"Player\0spawn\0\0x\0y"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Player[] = {
// content:
7, // revision
0, // classname
0, 0, // classinfo
1, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 2, 19, 2, 0x0a /* Public */,
// slots: parameters
QMetaType::Void, QMetaType::Int, QMetaType::Int, 3, 4,
0 // eod
};
void Player::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Player *_t = static_cast<Player *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->spawn((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
default: ;
}
}
}
QT_INIT_METAOBJECT const QMetaObject Player::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_Player.data,
qt_meta_data_Player, qt_static_metacall, nullptr, nullptr}
};
const QMetaObject *Player::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Player::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Player.stringdata0))
return static_cast<void*>(this);
if (!strcmp(_clname, "QGraphicsPixmapItem"))
return static_cast< QGraphicsPixmapItem*>(this);
return QObject::qt_metacast(_clname);
}
int Player::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 1)
qt_static_metacall(this, _c, _id, _a);
_id -= 1;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 1)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 1;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
| [
"tzeng.a@gmail.com"
] | tzeng.a@gmail.com |
bbbc20eed67ded3fb4d1ae1cda5ffd5e002e824f | d6b4bdf418ae6ab89b721a79f198de812311c783 | /intlpartnersmgt/src/v20220928/model/DescribeCustomerInfoResponse.cpp | a572e0dadae77d3da879c2e8e53c5b9b0cb018e4 | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-cpp-intl-en | d0781d461e84eb81775c2145bacae13084561c15 | d403a6b1cf3456322bbdfb462b63e77b1e71f3dc | refs/heads/master | 2023-08-21T12:29:54.125071 | 2023-08-21T01:12:39 | 2023-08-21T01:12:39 | 277,769,407 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,570 | 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/intlpartnersmgt/v20220928/model/DescribeCustomerInfoResponse.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::Intlpartnersmgt::V20220928::Model;
using namespace std;
DescribeCustomerInfoResponse::DescribeCustomerInfoResponse() :
m_dataHasBeenSet(false)
{
}
CoreInternalOutcome DescribeCustomerInfoResponse::Deserialize(const string &payload)
{
rapidjson::Document d;
d.Parse(payload.c_str());
if (d.HasParseError() || !d.IsObject())
{
return CoreInternalOutcome(Core::Error("response not json format"));
}
if (!d.HasMember("Response") || !d["Response"].IsObject())
{
return CoreInternalOutcome(Core::Error("response `Response` is null or not object"));
}
rapidjson::Value &rsp = d["Response"];
if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString())
{
return CoreInternalOutcome(Core::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(Core::Error("response `Response.Error` format error").SetRequestId(requestId));
}
string errorCode(rsp["Error"]["Code"].GetString());
string errorMsg(rsp["Error"]["Message"].GetString());
return CoreInternalOutcome(Core::Error(errorCode, errorMsg).SetRequestId(requestId));
}
if (rsp.HasMember("Data") && !rsp["Data"].IsNull())
{
if (!rsp["Data"].IsArray())
return CoreInternalOutcome(Core::Error("response `Data` is not array type"));
const rapidjson::Value &tmpValue = rsp["Data"];
for (rapidjson::Value::ConstValueIterator itr = tmpValue.Begin(); itr != tmpValue.End(); ++itr)
{
DescribeCustomerInfoData item;
CoreInternalOutcome outcome = item.Deserialize(*itr);
if (!outcome.IsSuccess())
{
outcome.GetError().SetRequestId(requestId);
return outcome;
}
m_data.push_back(item);
}
m_dataHasBeenSet = true;
}
return CoreInternalOutcome(true);
}
string DescribeCustomerInfoResponse::ToJsonString() const
{
rapidjson::Document value;
value.SetObject();
rapidjson::Document::AllocatorType& allocator = value.GetAllocator();
if (m_dataHasBeenSet)
{
rapidjson::Value iKey(rapidjson::kStringType);
string key = "Data";
iKey.SetString(key.c_str(), allocator);
value.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator);
int i=0;
for (auto itr = m_data.begin(); itr != m_data.end(); ++itr, ++i)
{
value[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator);
(*itr).ToJsonObject(value[key.c_str()][i], allocator);
}
}
rapidjson::Value iKey(rapidjson::kStringType);
string key = "RequestId";
iKey.SetString(key.c_str(), allocator);
value.AddMember(iKey, rapidjson::Value().SetString(GetRequestId().c_str(), allocator), allocator);
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
value.Accept(writer);
return buffer.GetString();
}
vector<DescribeCustomerInfoData> DescribeCustomerInfoResponse::GetData() const
{
return m_data;
}
bool DescribeCustomerInfoResponse::DataHasBeenSet() const
{
return m_dataHasBeenSet;
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
6137213523d3ddd397365b81fe30a82fce77eccb | 095b7832c29a9225b83f9f4ff8355ef6a6543b0d | /Miscellaneous/BinaryTreeZigZagTraversal.cpp | 191fc1ca50e3913bcc670415f192f6b1997872b8 | [] | no_license | I-Venkatesh/Data-structures-and-algorithms | a459b2a45fe0b5d2399e4f287bb83ea5d1742fac | 0d05ee80d0e6dd5f376b843975f3c70abac1457f | refs/heads/master | 2023-08-13T20:19:52.214023 | 2021-09-11T14:36:30 | 2021-09-11T14:36:30 | 323,447,201 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,503 | cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
* };
*/
class Solution {
public:
vector<vector<int>> zigzagLevelOrder(TreeNode* root) {
queue<TreeNode* > q;
vector<vector<int>> ans;
if(root==NULL)
{
return ans;
}
int level=0;
q.push(root);
while(!q.empty())
{
vector<int> temp;
int n=q.size();
for(int i=0;i<n;i++)
{
if(q.front()->left!=NULL)
{
q.push(q.front()->left);
}
if(q.front()->right!=NULL)
{
q.push(q.front()->right);
}
if(q.front()!=NULL)
{
temp.push_back(q.front()->val);
}
if(!q.empty())
{
q.pop();
}
}
if(level&1)
{
reverse(temp.begin(),temp.end());
ans.push_back(temp);
}
else{
ans.push_back(temp);
}
level++;
}
return ans;
}
}; | [
"venkatesh.i18@iiits.in"
] | venkatesh.i18@iiits.in |
35e5a5651241d6561f29a640d3b3b2f6bf154417 | d09945668f19bb4bc17087c0cb8ccbab2b2dd688 | /atcoder/abc251-300/abc282/h.cpp | ff41ae325bad8c630c66d30fb5858e4ead9e7f67 | [] | no_license | kmjp/procon | 27270f605f3ae5d80fbdb28708318a6557273a57 | 8083028ece4be1460150aa3f0e69bdb57e510b53 | refs/heads/master | 2023-09-04T11:01:09.452170 | 2023-09-03T15:25:21 | 2023-09-03T15:25:21 | 30,825,508 | 23 | 2 | null | 2023-08-18T14:02:07 | 2015-02-15T11:25:23 | C++ | UTF-8 | C++ | false | false | 1,757 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
template<class T> bool chmax(T &a, const T &b) { if(a<b){a=b;return 1;}return 0;}
template<class T> bool chmin(T &a, const T &b) { if(a>b){a=b;return 1;}return 0;}
//-------------------------------------------------------
int N;
ll S;
ll A[252525],B[252525];
ll BS[252525];
void solve() {
int i,j,k,l,r,x,y; string s;
cin>>N>>S;
set<int> did={0,N+1};
vector<pair<ll,int>> V;
FOR(i,N) {
cin>>A[i+1];
V.push_back({A[i+1],i+1});
}
FOR(i,N) {
cin>>B[i+1];
BS[i+1]=BS[i]+B[i+1];
}
ll ret=0;
sort(ALL(V));
FORR2(v,i,V) {
auto it=did.lower_bound(i);
int R=*it;
int L=*--it;
did.insert(i);
if(R-i<=i-L) {
ll a=A[i];
for(x=i;x<R;x++) {
a+=B[x];
if(a>S) break;
int TL=i;
for(y=20;y>=0;y--) {
if(TL-(1<<y)<=L) continue;
if(BS[x]-BS[TL-(1<<y)-1]+A[i]<=S) TL-=1<<y;
}
ret+=i-TL+1;
}
}
else {
ll a=A[i];
for(x=i;x>L;x--) {
a+=B[x];
if(a>S) break;
int TR=i;
for(y=20;y>=0;y--) {
if(TR+(1<<y)>=R) continue;
if(a+BS[TR+(1<<y)]-BS[i]<=S) TR+=1<<y;
}
ret+=TR-i+1;
}
}
}
cout<<ret<<endl;
}
int main(int argc,char** argv){
string s;int i;
if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
cout.tie(0); solve(); return 0;
}
| [
"kmjp@users.noreply.github.com"
] | kmjp@users.noreply.github.com |
00554c1b359ed4d05a729f6915fdca3655b76a48 | 019b1b4fc4a0c8bf0f65f5bec2431599e5de5300 | /content/browser/tracing/tracing_controller_impl_data_sinks.cc | 1ee6327893aad4cbbf028b0de0034db24642d901 | [
"BSD-3-Clause"
] | permissive | wyrover/downloader | bd61b858d82ad437df36fbbaaf58d293f2f77445 | a2239a4de6b8b545d6d88f6beccaad2b0c831e07 | refs/heads/master | 2020-12-30T14:45:13.193034 | 2017-04-23T07:39:04 | 2017-04-23T07:39:04 | 91,083,169 | 1 | 2 | null | 2017-05-12T11:06:42 | 2017-05-12T11:06:42 | null | UTF-8 | C++ | false | false | 12,000 | cc | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <utility>
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/json/json_writer.h"
#include "base/macros.h"
#include "base/strings/pattern.h"
#include "content/browser/tracing/tracing_controller_impl.h"
#include "content/public/browser/browser_thread.h"
#include "third_party/zlib/zlib.h"
namespace content {
namespace {
const char kChromeTraceLabel[] = "traceEvents";
const char kMetadataTraceLabel[] = "metadata";
class StringTraceDataEndpoint : public TracingController::TraceDataEndpoint {
public:
typedef base::Callback<void(scoped_ptr<const base::DictionaryValue>,
base::RefCountedString*)> CompletionCallback;
explicit StringTraceDataEndpoint(CompletionCallback callback)
: completion_callback_(callback) {}
void ReceiveTraceFinalContents(
scoped_ptr<const base::DictionaryValue> metadata,
const std::string& contents) override {
std::string tmp = contents;
scoped_refptr<base::RefCountedString> str =
base::RefCountedString::TakeString(&tmp);
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(completion_callback_, base::Passed(std::move(metadata)),
base::RetainedRef(str)));
}
private:
~StringTraceDataEndpoint() override {}
CompletionCallback completion_callback_;
DISALLOW_COPY_AND_ASSIGN(StringTraceDataEndpoint);
};
class FileTraceDataEndpoint : public TracingController::TraceDataEndpoint {
public:
explicit FileTraceDataEndpoint(const base::FilePath& trace_file_path,
const base::Closure& callback)
: file_path_(trace_file_path),
completion_callback_(callback),
file_(NULL) {}
void ReceiveTraceChunk(const std::string& chunk) override {
std::string tmp = chunk;
scoped_refptr<base::RefCountedString> chunk_ptr =
base::RefCountedString::TakeString(&tmp);
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&FileTraceDataEndpoint::ReceiveTraceChunkOnFileThread, this,
chunk_ptr));
}
void ReceiveTraceFinalContents(
scoped_ptr<const base::DictionaryValue> ,
const std::string& contents) override {
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&FileTraceDataEndpoint::CloseOnFileThread, this));
}
private:
~FileTraceDataEndpoint() override { DCHECK(file_ == NULL); }
void ReceiveTraceChunkOnFileThread(
const scoped_refptr<base::RefCountedString> chunk) {
if (!OpenFileIfNeededOnFileThread())
return;
ignore_result(
fwrite(chunk->data().c_str(), chunk->data().size(), 1, file_));
}
bool OpenFileIfNeededOnFileThread() {
if (file_ != NULL)
return true;
file_ = base::OpenFile(file_path_, "w");
if (file_ == NULL) {
LOG(ERROR) << "Failed to open " << file_path_.value();
return false;
}
return true;
}
void CloseOnFileThread() {
if (OpenFileIfNeededOnFileThread()) {
base::CloseFile(file_);
file_ = NULL;
}
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&FileTraceDataEndpoint::FinalizeOnUIThread, this));
}
void FinalizeOnUIThread() { completion_callback_.Run(); }
base::FilePath file_path_;
base::Closure completion_callback_;
FILE* file_;
DISALLOW_COPY_AND_ASSIGN(FileTraceDataEndpoint);
};
class StringTraceDataSink : public TracingController::TraceDataSink {
public:
explicit StringTraceDataSink(
scoped_refptr<TracingController::TraceDataEndpoint> endpoint)
: endpoint_(endpoint) {}
void AddTraceChunk(const std::string& chunk) override {
std::string trace_string;
if (trace_.empty())
trace_string = "{\"" + std::string(kChromeTraceLabel) + "\":[";
else
trace_string = ",";
trace_string += chunk;
AddTraceChunkAndPassToEndpoint(trace_string);
}
void AddTraceChunkAndPassToEndpoint(const std::string& chunk) {
trace_ += chunk;
endpoint_->ReceiveTraceChunk(chunk);
}
void Close() override {
AddTraceChunkAndPassToEndpoint("]");
for (auto const &it : GetAgentTrace())
AddTraceChunkAndPassToEndpoint(",\"" + it.first + "\": " + it.second);
std::string metadataJSON;
if (base::JSONWriter::Write(*GetMetadataCopy(), &metadataJSON) &&
!metadataJSON.empty()) {
AddTraceChunkAndPassToEndpoint(
",\"" + std::string(kMetadataTraceLabel) + "\": " + metadataJSON);
}
AddTraceChunkAndPassToEndpoint("}");
endpoint_->ReceiveTraceFinalContents(GetMetadataCopy(), trace_);
}
private:
~StringTraceDataSink() override {}
scoped_refptr<TracingController::TraceDataEndpoint> endpoint_;
std::string trace_;
DISALLOW_COPY_AND_ASSIGN(StringTraceDataSink);
};
class CompressedStringTraceDataSink : public TracingController::TraceDataSink {
public:
explicit CompressedStringTraceDataSink(
scoped_refptr<TracingController::TraceDataEndpoint> endpoint)
: endpoint_(endpoint), already_tried_open_(false) {}
void AddTraceChunk(const std::string& chunk) override {
std::string tmp = chunk;
scoped_refptr<base::RefCountedString> chunk_ptr =
base::RefCountedString::TakeString(&tmp);
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&CompressedStringTraceDataSink::AddTraceChunkOnFileThread,
this, chunk_ptr));
}
void Close() override {
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&CompressedStringTraceDataSink::CloseOnFileThread, this));
}
private:
~CompressedStringTraceDataSink() override {}
bool OpenZStreamOnFileThread() {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
if (stream_)
return true;
if (already_tried_open_)
return false;
already_tried_open_ = true;
stream_.reset(new z_stream);
*stream_ = {0};
stream_->zalloc = Z_NULL;
stream_->zfree = Z_NULL;
stream_->opaque = Z_NULL;
int result = deflateInit2(stream_.get(), Z_DEFAULT_COMPRESSION, Z_DEFLATED,
// 16 is added to produce a gzip header + trailer.
MAX_WBITS + 16,
8, // memLevel = 8 is default.
Z_DEFAULT_STRATEGY);
return result == 0;
}
void AddTraceChunkOnFileThread(
const scoped_refptr<base::RefCountedString> chunk_ptr) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
std::string trace;
if (compressed_trace_data_.empty())
trace = "{\"" + std::string(kChromeTraceLabel) + "\":[";
else
trace = ",";
trace += chunk_ptr->data();
AddTraceChunkAndCompressOnFileThread(trace, false);
}
void AddTraceChunkAndCompressOnFileThread(const std::string& chunk,
bool finished) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
if (!OpenZStreamOnFileThread())
return;
const int kChunkSize = 0x4000;
char buffer[kChunkSize];
int err;
stream_->avail_in = chunk.size();
stream_->next_in = (unsigned char*)chunk.data();
do {
stream_->avail_out = kChunkSize;
stream_->next_out = (unsigned char*)buffer;
err = deflate(stream_.get(), finished ? Z_FINISH : Z_NO_FLUSH);
if (err != Z_OK && (err != Z_STREAM_END && finished)) {
stream_.reset();
return;
}
int bytes = kChunkSize - stream_->avail_out;
if (bytes) {
std::string compressed_chunk = std::string(buffer, bytes);
compressed_trace_data_ += compressed_chunk;
endpoint_->ReceiveTraceChunk(compressed_chunk);
}
} while (stream_->avail_out == 0);
}
void CloseOnFileThread() {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
if (!OpenZStreamOnFileThread())
return;
if (compressed_trace_data_.empty()) {
AddTraceChunkAndCompressOnFileThread(
"{\"" + std::string(kChromeTraceLabel) + "\":[", false);
}
AddTraceChunkAndCompressOnFileThread("]", false);
for (auto const &it : GetAgentTrace()) {
AddTraceChunkAndCompressOnFileThread(
",\"" + it.first + "\": " + it.second, false);
}
std::string metadataJSON;
if (base::JSONWriter::Write(*GetMetadataCopy(), &metadataJSON) &&
!metadataJSON.empty()) {
AddTraceChunkAndCompressOnFileThread(
",\"" + std::string(kMetadataTraceLabel) + "\": " + metadataJSON,
false);
}
AddTraceChunkAndCompressOnFileThread("}", true);
deflateEnd(stream_.get());
stream_.reset();
endpoint_->ReceiveTraceFinalContents(GetMetadataCopy(),
compressed_trace_data_);
}
scoped_refptr<TracingController::TraceDataEndpoint> endpoint_;
scoped_ptr<z_stream> stream_;
bool already_tried_open_;
std::string compressed_trace_data_;
DISALLOW_COPY_AND_ASSIGN(CompressedStringTraceDataSink);
};
} // namespace
TracingController::TraceDataSink::TraceDataSink() {}
TracingController::TraceDataSink::~TraceDataSink() {}
void TracingController::TraceDataSink::AddAgentTrace(
const std::string& trace_label,
const std::string& trace_data) {
DCHECK(additional_tracing_agent_trace_.find(trace_label) ==
additional_tracing_agent_trace_.end());
additional_tracing_agent_trace_[trace_label] = trace_data;
}
const std::map<std::string, std::string>&
TracingController::TraceDataSink::GetAgentTrace() const {
return additional_tracing_agent_trace_;
}
void TracingController::TraceDataSink::AddMetadata(
const base::DictionaryValue& data) {
metadata_.MergeDictionary(&data);
}
void TracingController::TraceDataSink::SetMetadataFilterPredicate(
const MetadataFilterPredicate& metadata_filter_predicate) {
metadata_filter_predicate_ = metadata_filter_predicate;
}
scoped_ptr<const base::DictionaryValue>
TracingController::TraceDataSink::GetMetadataCopy() const {
if (metadata_filter_predicate_.is_null())
return scoped_ptr<const base::DictionaryValue>(metadata_.DeepCopy());
scoped_ptr<base::DictionaryValue> metadata_copy(new base::DictionaryValue);
for (base::DictionaryValue::Iterator it(metadata_); !it.IsAtEnd();
it.Advance()) {
if (metadata_filter_predicate_.Run(it.key()))
metadata_copy->Set(it.key(), it.value().DeepCopy());
else
metadata_copy->SetString(it.key(), "__stripped__");
}
return std::move(metadata_copy);
}
scoped_refptr<TracingController::TraceDataSink>
TracingController::CreateStringSink(
const base::Callback<void(scoped_ptr<const base::DictionaryValue>,
base::RefCountedString*)>& callback) {
return new StringTraceDataSink(new StringTraceDataEndpoint(callback));
}
scoped_refptr<TracingController::TraceDataSink>
TracingController::CreateCompressedStringSink(
scoped_refptr<TracingController::TraceDataEndpoint> endpoint) {
return new CompressedStringTraceDataSink(endpoint);
}
scoped_refptr<TracingController::TraceDataSink>
TracingController::CreateFileSink(const base::FilePath& file_path,
const base::Closure& callback) {
return new StringTraceDataSink(
CreateFileEndpoint(file_path, callback));
}
scoped_refptr<TracingController::TraceDataEndpoint>
TracingController::CreateCallbackEndpoint(const base::Callback<
void(scoped_ptr<const base::DictionaryValue>,
base::RefCountedString*)>& callback) {
return new StringTraceDataEndpoint(callback);
}
scoped_refptr<TracingController::TraceDataEndpoint>
TracingController::CreateFileEndpoint(const base::FilePath& file_path,
const base::Closure& callback) {
return new FileTraceDataEndpoint(file_path, callback);
}
} // namespace content
| [
"wangpp_os@sari.ac.cn"
] | wangpp_os@sari.ac.cn |
e9ae623dc7570ac6dee58c45760afa2438624337 | 9808c0970f80c3260d1b91a226580aba3e52e2d5 | /valdes-engineering/src/investigations/bulkDiffusivityMeasurements2015/beamExpander/adiabatic_rear/aluminum_target/sept24/fit_models.h | 9a0e0155ccc7e3d1c83d634a693089187992951e | [] | no_license | raymondvaldes/tat | 5d519732efb5ed379be1ac2579a6dbf7ac67e52f | 0fa3a1902cf81682d741fe0063435c6b61bac148 | refs/heads/master | 2021-01-18T15:42:09.009818 | 2015-10-30T16:55:23 | 2015-10-30T16:55:23 | 13,633,268 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 972 | h | //
// asdf.h
// tat
//
// Created by Raymond Valdes on 9/24/15.
// Copyright © 2015 Raymond Valdes. All rights reserved.
//
#ifndef fit_models_asdf_h
#define fit_models_asdf_h
#include "run1_rear_70degC.h"
#include "fit_a_b1_b2_RC.h"
namespace investigations{
namespace bulkDiffusivityMeasurements2015{
namespace beamExpander{
namespace adiabatic_rear{
namespace aluminum_target{
namespace sept24{
inline auto fit_models( void ) noexcept -> void
{
using namespace units;
using std::vector;
using thermal::experimental::observations::Slab;
auto const specimens = vector< Slab >( {
run1_rear_70degC(),
} ) ;
auto const detector_radius = quantity< length >( .25 * millimeters ) ;
fit_a_b1_b2_RC( specimens, detector_radius );
}
} // namespace sept24
} // namespace aluminum_target
} // namesapce adiabatic_rear
} // namespace beamExpander
} // namespace bulkDiffusivityMeasurements2015
} // namespace investigations
#endif /* asdf_h */
| [
"raymondvaldes@gmail.com"
] | raymondvaldes@gmail.com |
c9803d81d66a47a65e50f09e83e4d1d4d8e3f022 | 4b8886c64703f9025c91f7d38c356cf1b001b2a1 | /Library/Il2cppBuildCache/WebGL/il2cppOutput/UnityEngine.AnimationModule.cpp | a7afcd9017579913a9b51d670e4948a898617822 | [] | no_license | MikoCode/CaveRide | cdb5394d9e81afd18d99f6d97a19e640620b904e | 330cb9f8879163a630fb11950e1d4fa52c36fcfd | refs/heads/main | 2023-08-27T21:01:19.421432 | 2021-11-13T10:05:57 | 2021-11-13T10:05:57 | 355,978,043 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 242,487 | cpp | #include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <limits>
#include <stdint.h>
template <typename R, typename T1>
struct VirtualFuncInvoker1
{
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);
}
};
// System.Char[]
struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34;
// System.Delegate[]
struct DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8;
// System.IntPtr[]
struct IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6;
// System.Diagnostics.StackTrace[]
struct StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971;
// UnityEngine.AnimationEvent
struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF;
// UnityEngine.AnimationState
struct AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD;
// UnityEngine.Animator
struct Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149;
// UnityEngine.AnimatorOverrideController
struct AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA;
// System.Delegate
struct Delegate_t;
// System.DelegateData
struct DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288;
// System.Collections.IDictionary
struct IDictionary_t99871C56B8EC2452AC5C4CF3831695E617B89D3A;
// System.InvalidCastException
struct InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463;
// System.InvalidOperationException
struct InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB;
// System.Reflection.MethodInfo
struct MethodInfo_t;
// UnityEngine.Object
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A;
// System.Runtime.Serialization.SafeSerializationManager
struct SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F;
// UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A;
// UnityEngine.StateMachineBehaviour
struct StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F;
// System.String
struct String_t;
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5;
// UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback
struct OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C;
IL2CPP_EXTERN_C RuntimeClass* AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C String_t* _stringLiteral4DEE968069F34C26613ADFCD69C41EFC29314286;
IL2CPP_EXTERN_C String_t* _stringLiteral860B9EA7CDAB02A8A4B38336805EAE2FBA31F09C;
IL2CPP_EXTERN_C String_t* _stringLiteral8DC2252638D84FAF2C30B95D54EC83F52FA6C630;
IL2CPP_EXTERN_C String_t* _stringLiteral98C704D69BD1A288ED31DEE4ED4E50097A2D7018;
IL2CPP_EXTERN_C String_t* _stringLiteralA3C8FF345EC45846B2EE6801F84DD49340F0A9E1;
IL2CPP_EXTERN_C String_t* _stringLiteralBF563F6FCC25CE41FFE0BF7590AF9F4475916665;
IL2CPP_EXTERN_C String_t* _stringLiteralD2435BFAEB0372E848D9BE812E3B06AB862CC3D1;
IL2CPP_EXTERN_C String_t* _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709;
IL2CPP_EXTERN_C String_t* _stringLiteralE066D08B565F88D413FDACA14C42BFF008FF4EB9;
IL2CPP_EXTERN_C String_t* _stringLiteralF5510C45DDAD777CCB4893578D995C9739F990F2;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_RuntimeMethod_var;
struct Delegate_t_marshaled_com;
struct Delegate_t_marshaled_pinvoke;
struct Exception_t_marshaled_com;
struct Exception_t_marshaled_pinvoke;
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A;;
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com;
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com;;
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke;
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke;;
struct DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8;
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_t3C417EDD55E853BAA084114A5B12880739B4473C
{
public:
public:
};
// System.Object
struct Il2CppArrayBounds;
// System.Array
// System.Attribute
struct Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71 : 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_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 : public RuntimeObject
{
public:
public:
};
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_com
{
};
// UnityEngine.AnimatorClipInfo
struct AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610
{
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_t758011D6F2B4C04893FCD364DAA936C801FBC610, ___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_t758011D6F2B4C04893FCD364DAA936C801FBC610, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA
{
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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t052E146D2DB1EC155950ECA45734BF57134258AA, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0
{
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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0, ___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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_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;
};
// System.Boolean
struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37
{
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_t07D1E3F34E4813023D64F584DFF7B34C9D922F37, ___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_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_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_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_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_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_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);
}
};
// UnityEngine.Animations.DiscreteEvaluationAttribute
struct DiscreteEvaluationAttribute_tF3D5E95A11BF8B0C9B7A458849A893C62AB8807B : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA : public ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52
{
public:
public:
};
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields
{
public:
// System.Char[] System.Enum::enumSeperatorCharArray
CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* ___enumSeperatorCharArray_0;
public:
inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields, ___enumSeperatorCharArray_0)); }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; }
inline void set_enumSeperatorCharArray_0(CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* value)
{
___enumSeperatorCharArray_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___enumSeperatorCharArray_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_com
{
};
// System.Int32
struct Int32_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046
{
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_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046, ___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;
}
};
// UnityEngine.Animations.NotKeyableAttribute
struct NotKeyableAttribute_tE0C94B5FF990C6B4BB118486BCA35CCDA91AA905 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// UnityEngine.Quaternion
struct Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4
{
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_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___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_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___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_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___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_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___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_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_StaticFields
{
public:
// UnityEngine.Quaternion UnityEngine.Quaternion::identityQuaternion
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___identityQuaternion_4;
public:
inline static int32_t get_offset_of_identityQuaternion_4() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_StaticFields, ___identityQuaternion_4)); }
inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 get_identityQuaternion_4() const { return ___identityQuaternion_4; }
inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 * get_address_of_identityQuaternion_4() { return &___identityQuaternion_4; }
inline void set_identityQuaternion_4(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 value)
{
___identityQuaternion_4 = value;
}
};
// UnityEngine.SharedBetweenAnimatorsAttribute
struct SharedBetweenAnimatorsAttribute_t1F94A6AF21AC0F90F38FFEDE964054F34A117279 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.Single
struct Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E
{
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_tE07797BA3C98D4CA9B5A19413C19A76688AB899E, ___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;
}
};
// UnityEngine.Vector3
struct Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E
{
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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields
{
public:
// UnityEngine.Vector3 UnityEngine.Vector3::zeroVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___zeroVector_5;
// UnityEngine.Vector3 UnityEngine.Vector3::oneVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___oneVector_6;
// UnityEngine.Vector3 UnityEngine.Vector3::upVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___upVector_7;
// UnityEngine.Vector3 UnityEngine.Vector3::downVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___downVector_8;
// UnityEngine.Vector3 UnityEngine.Vector3::leftVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___leftVector_9;
// UnityEngine.Vector3 UnityEngine.Vector3::rightVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___rightVector_10;
// UnityEngine.Vector3 UnityEngine.Vector3::forwardVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___forwardVector_11;
// UnityEngine.Vector3 UnityEngine.Vector3::backVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___backVector_12;
// UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___positiveInfinityVector_13;
// UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___negativeInfinityVector_14;
public:
inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___zeroVector_5)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_zeroVector_5() const { return ___zeroVector_5; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_zeroVector_5() { return &___zeroVector_5; }
inline void set_zeroVector_5(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___zeroVector_5 = value;
}
inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___oneVector_6)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_oneVector_6() const { return ___oneVector_6; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_oneVector_6() { return &___oneVector_6; }
inline void set_oneVector_6(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___oneVector_6 = value;
}
inline static int32_t get_offset_of_upVector_7() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___upVector_7)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_upVector_7() const { return ___upVector_7; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_upVector_7() { return &___upVector_7; }
inline void set_upVector_7(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___upVector_7 = value;
}
inline static int32_t get_offset_of_downVector_8() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___downVector_8)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_downVector_8() const { return ___downVector_8; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_downVector_8() { return &___downVector_8; }
inline void set_downVector_8(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___downVector_8 = value;
}
inline static int32_t get_offset_of_leftVector_9() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___leftVector_9)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_leftVector_9() const { return ___leftVector_9; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_leftVector_9() { return &___leftVector_9; }
inline void set_leftVector_9(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___leftVector_9 = value;
}
inline static int32_t get_offset_of_rightVector_10() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___rightVector_10)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_rightVector_10() const { return ___rightVector_10; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_rightVector_10() { return &___rightVector_10; }
inline void set_rightVector_10(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___rightVector_10 = value;
}
inline static int32_t get_offset_of_forwardVector_11() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___forwardVector_11)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_forwardVector_11() const { return ___forwardVector_11; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_forwardVector_11() { return &___forwardVector_11; }
inline void set_forwardVector_11(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___forwardVector_11 = value;
}
inline static int32_t get_offset_of_backVector_12() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___backVector_12)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_backVector_12() const { return ___backVector_12; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_backVector_12() { return &___backVector_12; }
inline void set_backVector_12(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___backVector_12 = value;
}
inline static int32_t get_offset_of_positiveInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___positiveInfinityVector_13)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_positiveInfinityVector_13() const { return ___positiveInfinityVector_13; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_positiveInfinityVector_13() { return &___positiveInfinityVector_13; }
inline void set_positiveInfinityVector_13(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___positiveInfinityVector_13 = value;
}
inline static int32_t get_offset_of_negativeInfinityVector_14() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___negativeInfinityVector_14)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_negativeInfinityVector_14() const { return ___negativeInfinityVector_14; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_negativeInfinityVector_14() { return &___negativeInfinityVector_14; }
inline void set_negativeInfinityVector_14(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___negativeInfinityVector_14 = value;
}
};
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5
{
public:
union
{
struct
{
};
uint8_t Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5__padding[1];
};
public:
};
// UnityEngine.AnimationEventSource
struct AnimationEventSource_t1B170B0043F7F21E0AA3577B3220584CA3797630
{
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_t1B170B0043F7F21E0AA3577B3220584CA3797630, ___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_t98A25119C1A24795BA152F54CF9F0673EEDF1C3F
{
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_t98A25119C1A24795BA152F54CF9F0673EEDF1C3F, ___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_t32D9239CBAA66CE867094B820035B2121D7E2714
{
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_t32D9239CBAA66CE867094B820035B2121D7E2714, ___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_t32D9239CBAA66CE867094B820035B2121D7E2714, ___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_t32D9239CBAA66CE867094B820035B2121D7E2714, ___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_t32D9239CBAA66CE867094B820035B2121D7E2714, ___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_t32D9239CBAA66CE867094B820035B2121D7E2714, ___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_t32D9239CBAA66CE867094B820035B2121D7E2714, ___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_t32D9239CBAA66CE867094B820035B2121D7E2714, ___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;
}
};
// 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_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___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_t17DD30660E330C49381DAA99F934BE75CB11F288 * get_data_9() const { return ___data_9; }
inline DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 ** get_address_of_data_9() { return &___data_9; }
inline void set_data_9(DelegateData_t17DD30660E330C49381DAA99F934BE75CB11F288 * 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_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___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_t17DD30660E330C49381DAA99F934BE75CB11F288 * ___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_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
// System.Diagnostics.StackTrace[] System.Exception::captured_traces
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
// System.IntPtr[] System.Exception::native_trace_ips
IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* ___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_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * get__safeSerializationManager_13() const { return ____safeSerializationManager_13; }
inline SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F ** get_address_of__safeSerializationManager_13() { return &____safeSerializationManager_13; }
inline void set__safeSerializationManager_13(SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * 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_t4AD999C288CB6D1F38A299D12B1598D606588971* get_captured_traces_14() const { return ___captured_traces_14; }
inline StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971** get_address_of_captured_traces_14() { return &___captured_traces_14; }
inline void set_captured_traces_14(StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* 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_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* get_native_trace_ips_15() const { return ___native_trace_ips_15; }
inline IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6** get_address_of_native_trace_ips_15() { return &___native_trace_ips_15; }
inline void set_native_trace_ips_15(IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* 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_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___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_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
Il2CppSafeArray/*NONE*/* ___native_trace_ips_15;
};
// UnityEngine.HumanLimit
struct HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8
{
public:
// UnityEngine.Vector3 UnityEngine.HumanLimit::m_Min
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___m_Min_0;
// UnityEngine.Vector3 UnityEngine.HumanLimit::m_Max
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___m_Max_1;
// UnityEngine.Vector3 UnityEngine.HumanLimit::m_Center
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___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_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_Min_0)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_m_Min_0() const { return ___m_Min_0; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_m_Min_0() { return &___m_Min_0; }
inline void set_m_Min_0(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___m_Min_0 = value;
}
inline static int32_t get_offset_of_m_Max_1() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_Max_1)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_m_Max_1() const { return ___m_Max_1; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_m_Max_1() { return &___m_Max_1; }
inline void set_m_Max_1(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___m_Max_1 = value;
}
inline static int32_t get_offset_of_m_Center_2() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___m_Center_2)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_m_Center_2() const { return ___m_Center_2; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_m_Center_2() { return &___m_Center_2; }
inline void set_m_Center_2(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___m_Center_2 = value;
}
inline static int32_t get_offset_of_m_AxisLength_3() { return static_cast<int32_t>(offsetof(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___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_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8, ___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_tF2F3778131EFF286AF62B7B013A170F95A91571A : 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_tF2F3778131EFF286AF62B7B013A170F95A91571A, ___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_tF2F3778131EFF286AF62B7B013A170F95A91571A_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_tF2F3778131EFF286AF62B7B013A170F95A91571A_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_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke
{
intptr_t ___m_CachedPtr_0;
};
// Native definition for COM marshalling of UnityEngine.Object
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com
{
intptr_t ___m_CachedPtr_0;
};
// UnityEngine.Playables.PlayableHandle
struct PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A
{
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_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A, ___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_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A, ___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_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_StaticFields
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Playables.PlayableHandle::m_Null
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Null_2;
public:
inline static int32_t get_offset_of_m_Null_2() { return static_cast<int32_t>(offsetof(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_StaticFields, ___m_Null_2)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Null_2() const { return ___m_Null_2; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Null_2() { return &___m_Null_2; }
inline void set_m_Null_2(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Null_2 = value;
}
};
// UnityEngine.Playables.PlayableOutputHandle
struct PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1
{
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_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1, ___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_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1, ___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_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1_StaticFields
{
public:
// UnityEngine.Playables.PlayableOutputHandle UnityEngine.Playables.PlayableOutputHandle::m_Null
PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 ___m_Null_2;
public:
inline static int32_t get_offset_of_m_Null_2() { return static_cast<int32_t>(offsetof(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1_StaticFields, ___m_Null_2)); }
inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 get_m_Null_2() const { return ___m_Null_2; }
inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 * get_address_of_m_Null_2() { return &___m_Null_2; }
inline void set_m_Null_2(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 value)
{
___m_Null_2 = value;
}
};
// UnityEngine.SkeletonBone
struct SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E
{
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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position_2;
// UnityEngine.Quaternion UnityEngine.SkeletonBone::rotation
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation_3;
// UnityEngine.Vector3 UnityEngine.SkeletonBone::scale
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___scale_4;
public:
inline static int32_t get_offset_of_name_0() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___position_2)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_position_2() const { return ___position_2; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_position_2() { return &___position_2; }
inline void set_position_2(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___position_2 = value;
}
inline static int32_t get_offset_of_rotation_3() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___rotation_3)); }
inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 get_rotation_3() const { return ___rotation_3; }
inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 * get_address_of_rotation_3() { return &___rotation_3; }
inline void set_rotation_3(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 value)
{
___rotation_3 = value;
}
inline static int32_t get_offset_of_scale_4() { return static_cast<int32_t>(offsetof(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E, ___scale_4)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_scale_4() const { return ___scale_4; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_scale_4() { return &___scale_4; }
inline void set_scale_4(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___scale_4 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.SkeletonBone
struct SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_pinvoke
{
char* ___name_0;
char* ___parentName_1;
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position_2;
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation_3;
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___scale_4;
};
// Native definition for COM marshalling of UnityEngine.SkeletonBone
struct SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_com
{
Il2CppChar* ___name_0;
Il2CppChar* ___parentName_1;
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position_2;
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation_3;
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___scale_4;
};
// UnityEngine.TrackedReference
struct TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514 : 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_t17AA313389C655DCF279F96A2D85332B29596514, ___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_t17AA313389C655DCF279F96A2D85332B29596514_marshaled_pinvoke
{
intptr_t ___m_Ptr_0;
};
// Native definition for COM marshalling of UnityEngine.TrackedReference
struct TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshaled_com
{
intptr_t ___m_Ptr_0;
};
// UnityEngine.Animations.AnimationClipPlayable
struct AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
// UnityEngine.AnimationEvent
struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF : 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_tF2F3778131EFF286AF62B7B013A170F95A91571A * ___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_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * ___m_StateSender_8;
// UnityEngine.AnimatorStateInfo UnityEngine.AnimationEvent::m_AnimatorStateInfo
AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___m_AnimatorStateInfo_9;
// UnityEngine.AnimatorClipInfo UnityEngine.AnimationEvent::m_AnimatorClipInfo
AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 ___m_AnimatorClipInfo_10;
public:
inline static int32_t get_offset_of_m_Time_0() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_ObjectReferenceParameter_3)); }
inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * get_m_ObjectReferenceParameter_3() const { return ___m_ObjectReferenceParameter_3; }
inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A ** get_address_of_m_ObjectReferenceParameter_3() { return &___m_ObjectReferenceParameter_3; }
inline void set_m_ObjectReferenceParameter_3(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * 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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_StateSender_8)); }
inline AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * get_m_StateSender_8() const { return ___m_StateSender_8; }
inline AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD ** get_address_of_m_StateSender_8() { return &___m_StateSender_8; }
inline void set_m_StateSender_8(AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * 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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_AnimatorStateInfo_9)); }
inline AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA get_m_AnimatorStateInfo_9() const { return ___m_AnimatorStateInfo_9; }
inline AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA * get_address_of_m_AnimatorStateInfo_9() { return &___m_AnimatorStateInfo_9; }
inline void set_m_AnimatorStateInfo_9(AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA value)
{
___m_AnimatorStateInfo_9 = value;
}
inline static int32_t get_offset_of_m_AnimatorClipInfo_10() { return static_cast<int32_t>(offsetof(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF, ___m_AnimatorClipInfo_10)); }
inline AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 get_m_AnimatorClipInfo_10() const { return ___m_AnimatorClipInfo_10; }
inline AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 * get_address_of_m_AnimatorClipInfo_10() { return &___m_AnimatorClipInfo_10; }
inline void set_m_AnimatorClipInfo_10(AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 value)
{
___m_AnimatorClipInfo_10 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.AnimationEvent
struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_pinvoke
{
float ___m_Time_0;
char* ___m_FunctionName_1;
char* ___m_StringParameter_2;
Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_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_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * ___m_StateSender_8;
AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___m_AnimatorStateInfo_9;
AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 ___m_AnimatorClipInfo_10;
};
// Native definition for COM marshalling of UnityEngine.AnimationEvent
struct AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_com
{
float ___m_Time_0;
Il2CppChar* ___m_FunctionName_1;
Il2CppChar* ___m_StringParameter_2;
Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_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_tDB7088046A65ABCEC66B45147693CA0AD803A3AD * ___m_StateSender_8;
AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___m_AnimatorStateInfo_9;
AnimatorClipInfo_t758011D6F2B4C04893FCD364DAA936C801FBC610 ___m_AnimatorClipInfo_10;
};
// UnityEngine.Animations.AnimationLayerMixerPlayable
struct AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_StaticFields
{
public:
// UnityEngine.Animations.AnimationLayerMixerPlayable UnityEngine.Animations.AnimationLayerMixerPlayable::m_NullPlayable
AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_StaticFields, ___m_NullPlayable_1)); }
inline AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationMixerPlayable
struct AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_StaticFields
{
public:
// UnityEngine.Animations.AnimationMixerPlayable UnityEngine.Animations.AnimationMixerPlayable::m_NullPlayable
AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_StaticFields, ___m_NullPlayable_1)); }
inline AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationMotionXToDeltaPlayable
struct AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_StaticFields
{
public:
// UnityEngine.Animations.AnimationMotionXToDeltaPlayable UnityEngine.Animations.AnimationMotionXToDeltaPlayable::m_NullPlayable
AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_StaticFields, ___m_NullPlayable_1)); }
inline AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationOffsetPlayable
struct AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_StaticFields
{
public:
// UnityEngine.Animations.AnimationOffsetPlayable UnityEngine.Animations.AnimationOffsetPlayable::m_NullPlayable
AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_StaticFields, ___m_NullPlayable_1)); }
inline AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationPlayableOutput
struct AnimationPlayableOutput_t14570F3E63619E52ABB0B0306D4F4AAA6225DE17
{
public:
// UnityEngine.Playables.PlayableOutputHandle UnityEngine.Animations.AnimationPlayableOutput::m_Handle
PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationPlayableOutput_t14570F3E63619E52ABB0B0306D4F4AAA6225DE17, ___m_Handle_0)); }
inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableOutputHandle_t8C84BCDB2AECFEDBCF0E7CC7CDBADD517D148CD1 value)
{
___m_Handle_0 = value;
}
};
// UnityEngine.Animations.AnimationPosePlayable
struct AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_StaticFields
{
public:
// UnityEngine.Animations.AnimationPosePlayable UnityEngine.Animations.AnimationPosePlayable::m_NullPlayable
AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_StaticFields, ___m_NullPlayable_1)); }
inline AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationRemoveScalePlayable
struct AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_StaticFields
{
public:
// UnityEngine.Animations.AnimationRemoveScalePlayable UnityEngine.Animations.AnimationRemoveScalePlayable::m_NullPlayable
AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_StaticFields, ___m_NullPlayable_1)); }
inline AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Animations.AnimationScriptPlayable
struct AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_StaticFields
{
public:
// UnityEngine.Animations.AnimationScriptPlayable UnityEngine.Animations.AnimationScriptPlayable::m_NullPlayable
AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_StaticFields, ___m_NullPlayable_1)); }
inline AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.AnimationState
struct AnimationState_tDB7088046A65ABCEC66B45147693CA0AD803A3AD : public TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514
{
public:
public:
};
// UnityEngine.Animations.AnimatorControllerPlayable
struct AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4
{
public:
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::m_Handle
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___m_Handle_0;
public:
inline static int32_t get_offset_of_m_Handle_0() { return static_cast<int32_t>(offsetof(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4, ___m_Handle_0)); }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A get_m_Handle_0() const { return ___m_Handle_0; }
inline PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * get_address_of_m_Handle_0() { return &___m_Handle_0; }
inline void set_m_Handle_0(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A value)
{
___m_Handle_0 = value;
}
};
struct AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_StaticFields
{
public:
// UnityEngine.Animations.AnimatorControllerPlayable UnityEngine.Animations.AnimatorControllerPlayable::m_NullPlayable
AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___m_NullPlayable_1;
public:
inline static int32_t get_offset_of_m_NullPlayable_1() { return static_cast<int32_t>(offsetof(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_StaticFields, ___m_NullPlayable_1)); }
inline AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 get_m_NullPlayable_1() const { return ___m_NullPlayable_1; }
inline AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * get_address_of_m_NullPlayable_1() { return &___m_NullPlayable_1; }
inline void set_m_NullPlayable_1(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 value)
{
___m_NullPlayable_1 = value;
}
};
// UnityEngine.Component
struct Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// UnityEngine.HumanBone
struct HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D
{
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_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 ___limit_2;
public:
inline static int32_t get_offset_of_m_BoneName_0() { return static_cast<int32_t>(offsetof(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D, ___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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D, ___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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D, ___limit_2)); }
inline HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 get_limit_2() const { return ___limit_2; }
inline HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 * get_address_of_limit_2() { return &___limit_2; }
inline void set_limit_2(HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 value)
{
___limit_2 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.HumanBone
struct HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_pinvoke
{
char* ___m_BoneName_0;
char* ___m_HumanName_1;
HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 ___limit_2;
};
// Native definition for COM marshalling of UnityEngine.HumanBone
struct HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_com
{
Il2CppChar* ___m_BoneName_0;
Il2CppChar* ___m_HumanName_1;
HumanLimit_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 ___limit_2;
};
// UnityEngine.Motion
struct Motion_t3EAEF01D52B05F10A21CC9B54A35C8F3F6BA3A67 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// System.MulticastDelegate
struct MulticastDelegate_t : public Delegate_t
{
public:
// System.Delegate[] System.MulticastDelegate::delegates
DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* ___delegates_11;
public:
inline static int32_t get_offset_of_delegates_11() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___delegates_11)); }
inline DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* get_delegates_11() const { return ___delegates_11; }
inline DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8** get_address_of_delegates_11() { return &___delegates_11; }
inline void set_delegates_11(DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* 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;
};
// UnityEngine.RuntimeAnimatorController
struct RuntimeAnimatorController_t6F70D5BE51CCBA99132F444EFFA41439DFE71BAB : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// Native definition for P/Invoke marshalling of UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_pinvoke : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke
{
};
// Native definition for COM marshalling of UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_com : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com
{
};
// System.SystemException
struct SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62 : public Exception_t
{
public:
public:
};
// UnityEngine.AnimationClip
struct AnimationClip_tD9BFD73D43793BA608D5C0B46BE29EB59E40D178 : public Motion_t3EAEF01D52B05F10A21CC9B54A35C8F3F6BA3A67
{
public:
public:
};
// UnityEngine.AnimatorOverrideController
struct AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA : public RuntimeAnimatorController_t6F70D5BE51CCBA99132F444EFFA41439DFE71BAB
{
public:
// UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback UnityEngine.AnimatorOverrideController::OnOverrideControllerDirty
OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * ___OnOverrideControllerDirty_4;
public:
inline static int32_t get_offset_of_OnOverrideControllerDirty_4() { return static_cast<int32_t>(offsetof(AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA, ___OnOverrideControllerDirty_4)); }
inline OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * get_OnOverrideControllerDirty_4() const { return ___OnOverrideControllerDirty_4; }
inline OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C ** get_address_of_OnOverrideControllerDirty_4() { return &___OnOverrideControllerDirty_4; }
inline void set_OnOverrideControllerDirty_4(OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * value)
{
___OnOverrideControllerDirty_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___OnOverrideControllerDirty_4), (void*)value);
}
};
// UnityEngine.Behaviour
struct Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9 : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684
{
public:
public:
};
// System.InvalidCastException
struct InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 : public SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62
{
public:
public:
};
// System.InvalidOperationException
struct InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB : public SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62
{
public:
public:
};
// UnityEngine.StateMachineBehaviour
struct StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F : public ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A
{
public:
public:
};
// UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback
struct OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C : public MulticastDelegate_t
{
public:
public:
};
// UnityEngine.Animator
struct Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 : public Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// System.Delegate[]
struct DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8 : 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_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke& marshaled);
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_back(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke& marshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled);
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_cleanup(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke& marshaled);
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_com(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com& marshaled);
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_com_back(const Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com& marshaled, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A& unmarshaled);
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_com_cleanup(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com& marshaled);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationLayerMixerPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMixerPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMotionXToDeltaPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationOffsetPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationPosePlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationRemoveScalePlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationScriptPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimatorControllerPlayable>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_gshared (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __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_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___x0, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___y1, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationClipPlayable::Equals(UnityEngine.Animations.AnimationClipPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationClipPlayable_Equals_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __this, AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 ___other0, const RuntimeMethod* method);
// System.Void System.Object::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405 (RuntimeObject * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsValid()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationLayerMixerPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_gshared)(__this, method);
}
// System.Void System.InvalidCastException::.ctor(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3 (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * __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_m42F8E5BB37A175AF298324D3072932ED9946427B (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439 (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationLayerMixerPlayable::Equals(UnityEngine.Animations.AnimationLayerMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationLayerMixerPlayable_Equals_m018BD27B24B3EDC5101A475A14F13F753F2323AA (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___other0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Playables.PlayableHandle::get_Null()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612 (const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMixerPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationMixerPlayable::Equals(UnityEngine.Animations.AnimationMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMixerPlayable_Equals_m8979D90ED92FF553B5D6AB0BDD616C544352816B (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationMotionXToDeltaPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93 (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationMotionXToDeltaPlayable::Equals(UnityEngine.Animations.AnimationMotionXToDeltaPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMotionXToDeltaPlayable_Equals_mB08A41C628755AF909489716A1D62AECC2BFDD9E (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationOffsetPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationOffsetPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049 (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationOffsetPlayable::Equals(UnityEngine.Animations.AnimationOffsetPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationOffsetPlayable_Equals_m9AFE60B035481569924E20C6953B4B21EF7734AA (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationPosePlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationPosePlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationPosePlayable::Equals(UnityEngine.Animations.AnimationPosePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationPosePlayable_Equals_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationRemoveScalePlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationRemoveScalePlayable::Equals(UnityEngine.Animations.AnimationRemoveScalePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationRemoveScalePlayable_Equals_m7FE9E55B027861A0B91347F18DAC7E11E2740397 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___other0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimationScriptPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_gshared)(__this, method);
}
// System.Void UnityEngine.Animations.AnimationScriptPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, const RuntimeMethod* method);
// System.Boolean UnityEngine.Animations.AnimationScriptPlayable::Equals(UnityEngine.Animations.AnimationScriptPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationScriptPlayable_Equals_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___other0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::SetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method);
// System.Void UnityEngine.Animator::ResetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method);
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::SetHandle(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method);
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, const RuntimeMethod* method);
// System.Void System.InvalidOperationException::.ctor(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void InvalidOperationException__ctor_mC012CE552988309733C896F3FEA8249171E4402E (InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB * __this, String_t* ___message0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Playables.PlayableHandle::IsPlayableOfType<UnityEngine.Animations.AnimatorControllerPlayable>()
inline bool PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8 (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * __this, const RuntimeMethod* method)
{
return (( bool (*) (PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *, const RuntimeMethod*))PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_gshared)(__this, method);
}
// System.Boolean UnityEngine.Animations.AnimatorControllerPlayable::Equals(UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimatorControllerPlayable_Equals_m9D2F918EE07AE657A11C13F285317C05BB257730 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___other0, const RuntimeMethod* method);
// System.Void UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback::Invoke()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void OnOverrideControllerDirtyCallback_Invoke_m21DB79300E852ED93F2521FFC03EC4D858F6B330 (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __this, const RuntimeMethod* method);
// System.Void UnityEngine.ScriptableObject::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063 (ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A * __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
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationClipPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationClipPlayable::Equals(UnityEngine.Animations.AnimationClipPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationClipPlayable_Equals_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814 (AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * __this, AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122((AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *)__this, /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1;
L_1 = AnimationClipPlayable_GetHandle_m93C27911A3C7107750C2A6BE529C58FB2FDB1122((AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
bool L_2;
L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(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_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814_AdjustorThunk (RuntimeObject * __this, AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 ___other0, const RuntimeMethod* method)
{
AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationClipPlayable_t6386488B0C0300A21A352B4C17B9E6D5D38DF953 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationClipPlayable_Equals_m73BDBE0839B6AA4782C37B21DD58D3388B5EC814(_thisAdjusted, ___other0, method);
return _returnValue;
}
#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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& unmarshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_back(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_pinvoke& marshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& 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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_cleanup(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_pinvoke& marshaled)
{
}
// Conversion methods for marshalling of: UnityEngine.AnimationEvent
IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_com(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& unmarshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_com_back(const AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_com& marshaled, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF& 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_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_com_cleanup(AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshaled_com& marshaled)
{
}
// System.Void UnityEngine.AnimationEvent::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationEvent__ctor_mA2780A113EA8DD56C3C2EDD0D60BBA78047BACDE (AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709);
s_Il2CppMethodInitialized = true;
}
{
Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__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_tF2F3778131EFF286AF62B7B013A170F95A91571A *)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_tDB7088046A65ABCEC66B45147693CA0AD803A3AD *)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
// System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0;
L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2;
L_2 = PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_m866298E26CA43C28F7948D46E99D65FAA09722C5_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralD2435BFAEB0372E848D9BE812E3B06AB862CC3D1)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B_RuntimeMethod_var)));
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *>(__this + _offset);
AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationLayerMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439 (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationLayerMixerPlayable::Equals(UnityEngine.Animations.AnimationLayerMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationLayerMixerPlayable_Equals_m018BD27B24B3EDC5101A475A14F13F753F2323AA (AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * __this, AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439((AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *)__this, /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1;
L_1 = AnimationLayerMixerPlayable_GetHandle_mBFA950F140D76E10983B9AB946397F4C12ABC439((AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
bool L_2;
L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(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_m018BD27B24B3EDC5101A475A14F13F753F2323AA_AdjustorThunk (RuntimeObject * __this, AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 ___other0, const RuntimeMethod* method)
{
AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationLayerMixerPlayable_Equals_m018BD27B24B3EDC5101A475A14F13F753F2323AA(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimationLayerMixerPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationLayerMixerPlayable__cctor_mBE9F47E968D356F7BB549E705A4E91E1AEAEE807 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationLayerMixerPlayable__ctor_m42F8E5BB37A175AF298324D3072932ED9946427B((&L_1), L_0, /*hidden argument*/NULL);
((AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_StaticFields*)il2cpp_codegen_static_fields_for(AnimationLayerMixerPlayable_tF647DD9BCA6E0F49367A5F13AAE0D5B093A91880_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_mA03CF37709B7854227E25F91BE4F7559981058B0 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0;
L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2;
L_2 = PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_m30062CF184CC05FFAA026881BEFE337C13B7E70E_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral4DEE968069F34C26613ADFCD69C41EFC29314286)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0_RuntimeMethod_var)));
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *>(__this + _offset);
AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMixerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3 (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationMixerPlayable::Equals(UnityEngine.Animations.AnimationMixerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMixerPlayable_Equals_m8979D90ED92FF553B5D6AB0BDD616C544352816B (AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * __this, AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3((AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *)__this, /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1;
L_1 = AnimationMixerPlayable_GetHandle_mE8F7D1A18F1BD1C00BA1EC6AA8036044E8907FC3((AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
bool L_2;
L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(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_m8979D90ED92FF553B5D6AB0BDD616C544352816B_AdjustorThunk (RuntimeObject * __this, AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 ___other0, const RuntimeMethod* method)
{
AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationMixerPlayable_Equals_m8979D90ED92FF553B5D6AB0BDD616C544352816B(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimationMixerPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMixerPlayable__cctor_m8DB71DF60AD75D3274E24FDB9DAC8F4D8FDD5C1D (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationMixerPlayable__ctor_mA03CF37709B7854227E25F91BE4F7559981058B0((&L_1), L_0, /*hidden argument*/NULL);
((AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_StaticFields*)il2cpp_codegen_static_fields_for(AnimationMixerPlayable_t7C6D407FE0D55712B07081F8114CFA347F124741_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_m11668860161B62484EA095BD6360AFD26A86DE93 (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0;
L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2;
L_2 = PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_m19943D18384297A3129F799C12E91B0D8162A02F_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral8DC2252638D84FAF2C30B95D54EC83F52FA6C630)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93_RuntimeMethod_var)));
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *>(__this + _offset);
AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationMotionXToDeltaPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationMotionXToDeltaPlayable::Equals(UnityEngine.Animations.AnimationMotionXToDeltaPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationMotionXToDeltaPlayable_Equals_mB08A41C628755AF909489716A1D62AECC2BFDD9E (AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * __this, AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA((AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *)__this, /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1;
L_1 = AnimationMotionXToDeltaPlayable_GetHandle_m840D19A4E2DFB4BF2397061B833E63AD786587BA((AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
bool L_2;
L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(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_mB08A41C628755AF909489716A1D62AECC2BFDD9E_AdjustorThunk (RuntimeObject * __this, AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 ___other0, const RuntimeMethod* method)
{
AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationMotionXToDeltaPlayable_Equals_mB08A41C628755AF909489716A1D62AECC2BFDD9E(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimationMotionXToDeltaPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationMotionXToDeltaPlayable__cctor_m0C46BAE776A8D7FAB7CEE08C4D6EBC63B08708FD (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationMotionXToDeltaPlayable__ctor_m11668860161B62484EA095BD6360AFD26A86DE93((&L_1), L_0, /*hidden argument*/NULL);
((AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_StaticFields*)il2cpp_codegen_static_fields_for(AnimationMotionXToDeltaPlayable_t6E21B629D4689F5E3CFCFACA0B31411082773076_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_m9527E52AEA325EAE188AB9843497F2AB33CB742E (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0;
L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2;
L_2 = PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_m1B2FA89CE8F4A1EBD1AE3FF4E7154CFE120EDF85_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralA3C8FF345EC45846B2EE6801F84DD49340F0A9E1)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E_RuntimeMethod_var)));
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *>(__this + _offset);
AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationOffsetPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049 (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationOffsetPlayable::Equals(UnityEngine.Animations.AnimationOffsetPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationOffsetPlayable_Equals_m9AFE60B035481569924E20C6953B4B21EF7734AA (AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * __this, AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationOffsetPlayable_GetHandle_m8C3C08EC531127B002D3AFAB5AF259D8030B0049((AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *)(&___other0), /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = L_0;
RuntimeObject * L_2 = Box(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var, &L_1);
RuntimeObject * L_3 = Box(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var, __this);
bool L_4;
L_4 = VirtualFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2);
*__this = *(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *)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_m9AFE60B035481569924E20C6953B4B21EF7734AA_AdjustorThunk (RuntimeObject * __this, AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 ___other0, const RuntimeMethod* method)
{
AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationOffsetPlayable_Equals_m9AFE60B035481569924E20C6953B4B21EF7734AA(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimationOffsetPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationOffsetPlayable__cctor_m00251ED10BD7F52F20BC9D0A36B9C8AC52F15FA6 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationOffsetPlayable__ctor_m9527E52AEA325EAE188AB9843497F2AB33CB742E((&L_1), L_0, /*hidden argument*/NULL);
((AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_StaticFields*)il2cpp_codegen_static_fields_for(AnimationOffsetPlayable_tBB8333A8E35A23D8FAA2D34E35FF02BD53FF9941_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_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0;
L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2;
L_2 = PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_m171336A5BD550FD80BFD4B2BDF5903DF72C0E1C2_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralE066D08B565F88D413FDACA14C42BFF008FF4EB9)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57_RuntimeMethod_var)));
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *>(__this + _offset);
AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationPosePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationPosePlayable::Equals(UnityEngine.Animations.AnimationPosePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationPosePlayable_Equals_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1 (AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * __this, AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationPosePlayable_GetHandle_m0354C54EB680FC70D4B48D95F7FC4BA4700A0DCE((AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *)(&___other0), /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = L_0;
RuntimeObject * L_2 = Box(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var, &L_1);
RuntimeObject * L_3 = Box(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var, __this);
bool L_4;
L_4 = VirtualFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2);
*__this = *(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *)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_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1_AdjustorThunk (RuntimeObject * __this, AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 ___other0, const RuntimeMethod* method)
{
AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationPosePlayable_Equals_mECC5FA256AAA5334C38DBB6D00EE8AC1BDC015A1(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimationPosePlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationPosePlayable__cctor_m61B5F097B084BBB3CD21AE5E565AB35450C85B1C (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationPosePlayable__ctor_m318607F120F21EDE3D7C1ED07C8B2ED13A23BF57((&L_1), L_0, /*hidden argument*/NULL);
((AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_StaticFields*)il2cpp_codegen_static_fields_for(AnimationPosePlayable_t455DFF8AB153FC8930BD1B79342EC791033662B9_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_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0;
L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2;
L_2 = PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_mEF5219AC94275FE2811CEDC16FE0B850DBA7E9BE_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral98C704D69BD1A288ED31DEE4ED4E50097A2D7018)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F_RuntimeMethod_var)));
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *>(__this + _offset);
AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationRemoveScalePlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationRemoveScalePlayable::Equals(UnityEngine.Animations.AnimationRemoveScalePlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationRemoveScalePlayable_Equals_m7FE9E55B027861A0B91347F18DAC7E11E2740397 (AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * __this, AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationRemoveScalePlayable_GetHandle_m1949202B58BDF17726A1ADC934EB5232E835CCA8((AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *)(&___other0), /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = L_0;
RuntimeObject * L_2 = Box(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var, &L_1);
RuntimeObject * L_3 = Box(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var, __this);
bool L_4;
L_4 = VirtualFuncInvoker1< bool, RuntimeObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_3, L_2);
*__this = *(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *)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_m7FE9E55B027861A0B91347F18DAC7E11E2740397_AdjustorThunk (RuntimeObject * __this, AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 ___other0, const RuntimeMethod* method)
{
AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationRemoveScalePlayable_Equals_m7FE9E55B027861A0B91347F18DAC7E11E2740397(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimationRemoveScalePlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationRemoveScalePlayable__cctor_mA35B93BA4FDEDAA98ACE6A314BF0ED50839B8A98 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationRemoveScalePlayable__ctor_m08810C8ECE9A3A100087DD84B13204EC3AF73A8F((&L_1), L_0, /*hidden argument*/NULL);
((AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_StaticFields*)il2cpp_codegen_static_fields_for(AnimationRemoveScalePlayable_t774D428669D5CF715E9A7E80E52A619AECC80429_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_m0B751F7A7D28F59AADACE7C13704D653E0879C56 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
{
bool L_0;
L_0 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = V_0;
if (!L_1)
{
goto IL_0027;
}
}
{
bool L_2;
L_2 = PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_m529F82044C8D4F4B60EA35E96D1C0592644AD76B_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_4 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_4, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral860B9EA7CDAB02A8A4B38336805EAE2FBA31F09C)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56_RuntimeMethod_var)));
}
IL_0026:
{
}
IL_0027:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_5 = ___handle0;
__this->set_m_Handle_0(L_5);
return;
}
}
IL2CPP_EXTERN_C void AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *>(__this + _offset);
AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimationScriptPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18(_thisAdjusted, method);
return _returnValue;
}
// System.Boolean UnityEngine.Animations.AnimationScriptPlayable::Equals(UnityEngine.Animations.AnimationScriptPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimationScriptPlayable_Equals_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8 (AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * __this, AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18((AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *)__this, /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1;
L_1 = AnimationScriptPlayable_GetHandle_mCEA7899E7E43FC2C73B3331AE27C289327F03B18((AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
bool L_2;
L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(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_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8_AdjustorThunk (RuntimeObject * __this, AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B ___other0, const RuntimeMethod* method)
{
AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B *>(__this + _offset);
bool _returnValue;
_returnValue = AnimationScriptPlayable_Equals_m1705DCC80312E3D34E17B32BDBAF4BBB78D435D8(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimationScriptPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimationScriptPlayable__cctor_m2E7AD0269606C2EB23E1A6A1407E53ACAE1C6F31 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B L_1;
memset((&L_1), 0, sizeof(L_1));
AnimationScriptPlayable__ctor_m0B751F7A7D28F59AADACE7C13704D653E0879C56((&L_1), L_0, /*hidden argument*/NULL);
((AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_StaticFields*)il2cpp_codegen_static_fields_for(AnimationScriptPlayable_tC1413FB51680271522811045B1BAA555B8F01C6B_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
#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.Animator::SetTrigger(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTrigger_m2D79D155CABD81B1CC75EFC35D90508B58D7211C (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method)
{
{
String_t* L_0 = ___name0;
Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Void UnityEngine.Animator::ResetTrigger(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTrigger_m02F8CF7EABE466CC3D008A8538171E14BFB907FA (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method)
{
{
String_t* L_0 = ___name0;
Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Boolean UnityEngine.Animator::get_hasBoundPlayables()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, const RuntimeMethod* method)
{
typedef bool (*Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A_ftn) (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 *);
static Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_get_hasBoundPlayables_m1ADEF28BC77A4C8DBC707DA02A1B72E00AC0C88A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::get_hasBoundPlayables()");
bool icallRetVal = _il2cpp_icall_func(__this);
return icallRetVal;
}
// System.Void UnityEngine.Animator::SetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method)
{
typedef void (*Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0_ftn) (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 *, String_t*);
static Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_SetTriggerString_m38F66A49276BCED56B89BB6AF8A36183BE4285F0_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Animator::SetTriggerString(System.String)");
_il2cpp_icall_func(__this, ___name0);
}
// System.Void UnityEngine.Animator::ResetTriggerString(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2 (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * __this, String_t* ___name0, const RuntimeMethod* method)
{
typedef void (*Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2_ftn) (Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 *, String_t*);
static Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2_ftn _il2cpp_icall_func;
if (!_il2cpp_icall_func)
_il2cpp_icall_func = (Animator_ResetTriggerString_m6FC21A6B7732A31338EE22E78F3D6220903EDBB2_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
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::.ctor(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
__this->set_m_Handle_0(L_0);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = ___handle0;
AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *)__this, L_1, /*hidden argument*/NULL);
return;
}
}
IL2CPP_EXTERN_C void AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset);
AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8(_thisAdjusted, ___handle0, method);
}
// UnityEngine.Playables.PlayableHandle UnityEngine.Animations.AnimatorControllerPlayable::GetHandle()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, const RuntimeMethod* method)
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A V_0;
memset((&V_0), 0, sizeof(V_0));
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0 = __this->get_m_Handle_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1 = V_0;
return L_1;
}
}
IL2CPP_EXTERN_C PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method)
{
AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A _returnValue;
_returnValue = AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C(_thisAdjusted, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::SetHandle(UnityEngine.Playables.PlayableHandle)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
bool V_2 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A * L_0 = __this->get_address_of_m_Handle_0();
bool L_1;
L_1 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)L_0, /*hidden argument*/NULL);
V_0 = L_1;
bool L_2 = V_0;
if (!L_2)
{
goto IL_001b;
}
}
{
InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB * L_3 = (InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB_il2cpp_TypeInfo_var)));
InvalidOperationException__ctor_mC012CE552988309733C896F3FEA8249171E4402E(L_3, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralBF563F6FCC25CE41FFE0BF7590AF9F4475916665)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_RuntimeMethod_var)));
}
IL_001b:
{
bool L_4;
L_4 = PlayableHandle_IsValid_m237A5E7818768641BAC928BD08EC0AB439E3DAF6((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/NULL);
V_1 = L_4;
bool L_5 = V_1;
if (!L_5)
{
goto IL_0041;
}
}
{
bool L_6;
L_6 = PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8((PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A *)(&___handle0), /*hidden argument*/PlayableHandle_IsPlayableOfType_TisAnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_mFB1F4B388070EC30EC8DA09EB2869306EE60F2B8_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_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 * L_8 = (InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463 *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&InvalidCastException_tD99F9FF94C3859C78E90F68C2F77A1558BCAF463_il2cpp_TypeInfo_var)));
InvalidCastException__ctor_m50103CBF0C211B93BF46697875413A10B5A5C5A3(L_8, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteralF5510C45DDAD777CCB4893578D995C9739F990F2)), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_8, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_RuntimeMethod_var)));
}
IL_0040:
{
}
IL_0041:
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_9 = ___handle0;
__this->set_m_Handle_0(L_9);
return;
}
}
IL2CPP_EXTERN_C void AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38_AdjustorThunk (RuntimeObject * __this, PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A ___handle0, const RuntimeMethod* method)
{
AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset);
AnimatorControllerPlayable_SetHandle_m19111E2A65EDAB3382AC9BE815503459A495FF38(_thisAdjusted, ___handle0, method);
}
// System.Boolean UnityEngine.Animations.AnimatorControllerPlayable::Equals(UnityEngine.Animations.AnimatorControllerPlayable)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool AnimatorControllerPlayable_Equals_m9D2F918EE07AE657A11C13F285317C05BB257730 (AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * __this, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___other0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *)__this, /*hidden argument*/NULL);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_1;
L_1 = AnimatorControllerPlayable_GetHandle_mBB2911E1B1867ED9C9080BEF16838119A51E0C0C((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *)(&___other0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
bool L_2;
L_2 = PlayableHandle_op_Equality_mFD26CFA8ECF2B622B1A3D4117066CAE965C9F704(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_m9D2F918EE07AE657A11C13F285317C05BB257730_AdjustorThunk (RuntimeObject * __this, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___other0, const RuntimeMethod* method)
{
AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 * _thisAdjusted;
int32_t _offset = 1;
_thisAdjusted = reinterpret_cast<AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 *>(__this + _offset);
bool _returnValue;
_returnValue = AnimatorControllerPlayable_Equals_m9D2F918EE07AE657A11C13F285317C05BB257730(_thisAdjusted, ___other0, method);
return _returnValue;
}
// System.Void UnityEngine.Animations.AnimatorControllerPlayable::.cctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorControllerPlayable__cctor_m82C2FF3AEAD5D042648E50B513269EF367C51EB4 (const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_il2cpp_TypeInfo_var);
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A_il2cpp_TypeInfo_var);
PlayableHandle_t50DCD240B0400DDAD0822C13E5DBC7AD64DC027A L_0;
L_0 = PlayableHandle_get_Null_mD1C6FC2D7F6A7A23955ACDD87BE934B75463E612(/*hidden argument*/NULL);
AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 L_1;
memset((&L_1), 0, sizeof(L_1));
AnimatorControllerPlayable__ctor_mBD4E1368EB671F6349C5740B1BF131F97BD12CC8((&L_1), L_0, /*hidden argument*/NULL);
((AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_StaticFields*)il2cpp_codegen_static_fields_for(AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4_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.AnimatorOverrideController::OnInvalidateOverrideController(UnityEngine.AnimatorOverrideController)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AnimatorOverrideController_OnInvalidateOverrideController_m579571520B7C607B6983D4973EBAE982EAC9AA40 (AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA * ___controller0, const RuntimeMethod* method)
{
bool V_0 = false;
{
AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA * L_0 = ___controller0;
OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * L_1 = L_0->get_OnOverrideControllerDirty_4();
V_0 = (bool)((!(((RuntimeObject*)(OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C *)L_1) <= ((RuntimeObject*)(RuntimeObject *)NULL)))? 1 : 0);
bool L_2 = V_0;
if (!L_2)
{
goto IL_001a;
}
}
{
AnimatorOverrideController_t4630AA9761965F735AEB26B9A92D210D6338B2DA * L_3 = ___controller0;
OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * L_4 = L_3->get_OnOverrideControllerDirty_4();
OnOverrideControllerDirtyCallback_Invoke_m21DB79300E852ED93F2521FFC03EC4D858F6B330(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
#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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& unmarshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_back(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_pinvoke& marshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& 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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_cleanup(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_pinvoke& marshaled)
{
}
// Conversion methods for marshalling of: UnityEngine.AnimatorTransitionInfo
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_com(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& unmarshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_com_back(const AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_com& marshaled, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0& 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_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_com_cleanup(AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshaled_com& marshaled)
{
}
#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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& unmarshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_back(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_pinvoke& marshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& 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_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_cleanup(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_com(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& unmarshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_com_back(const HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshaled_com& marshaled, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D& 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_t8F488DD21062BE1259B0F4C77E4EB24FB931E8D8 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_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_com_cleanup(HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_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
#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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& unmarshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_back(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_pinvoke& marshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& 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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E 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_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E 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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_cleanup(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_com(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& unmarshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_com_back(const SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshaled_com& marshaled, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E& 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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E 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_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E 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_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_com_cleanup(SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_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
// System.Void UnityEngine.StateMachineBehaviour::OnStateEnter(UnityEngine.Animator,UnityEngine.AnimatorStateInfo,System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour_OnStateEnter_m0B5055A01EEF9070E7611D3C3165AAA118D22953 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___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_m2FF9D5AD07DF99860C7B0033791FE08F2EF919F1 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___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_mE8EADFCEA482A101BF13AFB773A06C3C2C8B3208 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___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_mB51A6EA16DA5038BF7C4E46863C8ECA1338EFBDD (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___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_m2BB5A0CD4B083CCDFAC7EE2F8233D2B11825197F (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___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_m8696CC6EE9DC7577A07023F84DCF6E4F80E75ACC (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___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_m7FD170C30229751A93F64C26AFFF9C9BA057BF3D (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___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_m0027D5548D58C0E2777A4CF9420F015FD56CEC18 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___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_mF81F7D0AB02EB31012A7C50E75295C40301A5055 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___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_m795DAE1099CF045D5E61ABBBAD017455F48B0707 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___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_m29F850CE0258906408520515E4E157D43AFEB181 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___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_m96E18AE1A75046F85EB7FEB5C05CEC7377F72C1F (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, AnimatorStateInfo_t052E146D2DB1EC155950ECA45734BF57134258AA ___stateInfo1, int32_t ___layerIndex2, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___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_mF2DF6E7A25D30F05E99984F3E8D4083D695F23CA (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, int32_t ___stateMachinePathHash1, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___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_m8AC70A1160FE329D0E1EC31F08B1E85B59DB516D (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, Animator_t9DD1D43680A61D65A3C98C6EFF559709DC9CE149 * ___animator0, int32_t ___stateMachinePathHash1, AnimatorControllerPlayable_tEABD56FA5A36BD337DA6E049FCB4F1D521DA17A4 ___controller2, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void UnityEngine.StateMachineBehaviour::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void StateMachineBehaviour__ctor_mDB0650FD738799E5880150E656D4A88524D0EBE0 (StateMachineBehaviour_tBEDE439261DEB4C7334646339BC6F1E7958F095F * __this, const RuntimeMethod* method)
{
{
ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063(__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
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __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_mA35F55BEB8A4BD57D109684E857F85C1F0A6C1B5 (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __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_m21DB79300E852ED93F2521FFC03EC4D858F6B330 (OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C * __this, const RuntimeMethod* method)
{
DelegateU5BU5D_t677D8FE08A5F99E8EE49150B73966CD6E9BF7DB8* 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
typedef void (*FunctionPointerType) (void*, const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod);
}
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"79205367+MikoCode@users.noreply.github.com"
] | 79205367+MikoCode@users.noreply.github.com |
8f2195874ab869da11fe15fa5c70102ef01b4a9b | 43a2fbc77f5cea2487c05c7679a30e15db9a3a50 | /Cpp/External (Offsets Only)/SDK/BP_msc_hurdygurdy_pio_01_a_ItemDesc_classes.h | 82fec60f39c50589d4d8837a2324442017ddafd7 | [] | no_license | zH4x/SoT-Insider-SDK | 57e2e05ede34ca1fd90fc5904cf7a79f0259085c | 6bff738a1b701c34656546e333b7e59c98c63ad7 | refs/heads/main | 2023-06-09T23:10:32.929216 | 2021-07-07T01:34:27 | 2021-07-07T01:34:27 | 383,638,719 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 867 | h | #pragma once
// Name: SoT-Insider, Version: 1.102.2382.0
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass BP_msc_hurdygurdy_pio_01_a_ItemDesc.BP_msc_hurdygurdy_pio_01_a_ItemDesc_C
// 0x0000 (FullSize[0x0130] - InheritedSize[0x0130])
class UBP_msc_hurdygurdy_pio_01_a_ItemDesc_C : public UItemDesc
{
public:
static UClass* StaticClass()
{
static auto ptr = UObject::FindClass("BlueprintGeneratedClass BP_msc_hurdygurdy_pio_01_a_ItemDesc.BP_msc_hurdygurdy_pio_01_a_ItemDesc_C");
return ptr;
}
void AfterRead();
void BeforeDelete();
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"Massimo.linker@gmail.com"
] | Massimo.linker@gmail.com |
f0f2cf8c0240b1b4e6f6c889b1434985304cfb63 | 67110b6ee81e0958ae7150687d78a279ddc9a133 | /cl_dll/hud.cpp | 08b76aeeeb3abb7a720e5d100f2942f724ae96eb | [] | no_license | ataceyhun/LeakNet-SDK | c383fb8fa555d33c5d3a9e9283590a3a28244745 | aeedaf894a3f5e749e59e80c39600c5fd3e89779 | refs/heads/master | 2020-06-13T19:38:15.198904 | 2016-11-18T11:25:56 | 2016-11-18T11:25:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,731 | cpp | /***
*
* Copyright (c) 1999, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
//
// hud.cpp
//
// implementation of CHud class
//
#include "cbase.h"
#include "hud_macros.h"
#include "history_resource.h"
#include "parsemsg.h"
#include "iinput.h"
#include "clientmode.h"
#include "in_buttons.h"
#include <vgui_controls/Controls.h>
#include <vgui/ISurface.h>
#include <KeyValues.h>
#include "itextmessage.h"
#include "mempool.h"
#include <KeyValues.h>
#include "filesystem.h"
#include <vgui_controls/AnimationController.h>
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
void __MsgFunc_ClearDecals(const char *pszName, int iSize, void *pbuf);
static CClassMemoryPool< CHudTexture > g_HudTextureMemoryPool( 128 );
ConVar hud_autoreloadscript("hud_autoreloadscript", "0", FCVAR_ARCHIVE, "Automatically reloads the animation script each time one is ran");
#if defined( HL2_CLIENT_DLL )
ConVar hud_enableoldhud("hud_enableoldhud", "1", FCVAR_ARCHIVE, "Enables old HUD seen in early HL2 development screenshots"); // VXP
#endif
//-----------------------------------------------------------------------------
// Purpose: Parses the weapon txt files to get the sprites needed.
//-----------------------------------------------------------------------------
void LoadHudTextures( CUtlDict< CHudTexture *, int >& list, char *psz )
{
KeyValues *pTemp, *pTextureSection;
KeyValues *pKeyValuesData = new KeyValues( "WeaponDatafile" );
if ( pKeyValuesData->LoadFromFile( filesystem, psz ) )
{
pTextureSection = pKeyValuesData->FindKey( "TextureData" );
if ( pTextureSection )
{
// Read the sprite data
pTemp = pTextureSection->GetFirstSubKey();
while ( pTemp )
{
CHudTexture *tex = new CHudTexture();
// Key Name is the sprite name
strcpy( tex->szShortName, pTemp->GetName() );
strcpy( tex->szTextureFile, pTemp->GetString( "file" ) );
tex->rc.left = pTemp->GetInt( "x", 0 );
tex->rc.top = pTemp->GetInt( "y", 0 );
tex->rc.right = pTemp->GetInt( "width", 0 ) + tex->rc.left;
tex->rc.bottom = pTemp->GetInt( "height", 0 ) + tex->rc.top;
list.Insert( tex->szShortName, tex );
pTemp = pTemp->GetNextKey();
}
}
}
// Failed for some reason. Delete the Key data and abort.
pKeyValuesData->deleteThis();
}
//-----------------------------------------------------------------------------
// Purpose:
// Input : * -
// list -
//-----------------------------------------------------------------------------
void FreeHudTextureList( CUtlDict< CHudTexture *, int >& list )
{
int c = list.Count();
for ( int i = 0; i < c; i++ )
{
CHudTexture *tex = list[ i ];
delete tex;
}
list.RemoveAll();
}
// Globally-used fonts
vgui::HFont g_hFontTrebuchet24 = vgui::INVALID_FONT;
vgui::HFont g_hFontTrebuchet40 = vgui::INVALID_FONT;
//=======================================================================================================================
// Hud Element Visibility handling
//=======================================================================================================================
typedef struct hudelement_hidden_s
{
char *sElementName;
int iHiddenBits; // Bits in which this hud element is hidden
} hudelement_hidden_t;
hudelement_hidden_t sHudHiddenArray[] =
{
{ "CHudHealth", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHudWeaponSelection", HIDEHUD_WEAPONS | HIDEHUD_NEEDSUIT | HIDEHUD_PLAYERDEAD },
{ "CHudHistoryResource", HIDEHUD_MISCSTATUS },
{ "CHudTrain", HIDEHUD_MISCSTATUS },
{ "ScorePanel", 0 },
{ "CVProfPanel", 0 },
{ "CBudgetPanel", 0 },
{ "CPDumpPanel", 0 },
{ "CHudMOTD", 0 },
{ "CHudMessage", 0 },
{ "CHudMenu", HIDEHUD_MISCSTATUS },
{ "CHudChat", HIDEHUD_CHAT },
{ "CHudDeathNotice", HIDEHUD_MISCSTATUS },
{ "CHudCloseCaption", 0 }, // Never hidden if needed
{ "CHudAnimationInfo", 0 }, // For debugging, never hidden if visible
{ "CHudDamageIndicator", HIDEHUD_HEALTH },
// HL2 hud elements
{ "CHudBattery", HIDEHUD_HEALTH | HIDEHUD_NEEDSUIT },
{ "CHudSuitPower", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHudFlashlight", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHudGeiger", HIDEHUD_HEALTH },
{ "CHudAmmo", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHudSecondaryAmmo", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHudZoom", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHUDQuickInfo", 0 },
// TF2 hud elements
{ "CHudResources", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
{ "CHudResourcesPickup", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
{ "CTargetID", HIDEHUD_MISCSTATUS },
{ "CHudOrderList", HIDEHUD_MISCSTATUS | HIDEHUD_PLAYERDEAD },
{ "CHudObjectStatuses", HIDEHUD_MISCSTATUS | HIDEHUD_PLAYERDEAD },
{ "CHudEMP", HIDEHUD_HEALTH },
{ "CHudMortar", HIDEHUD_PLAYERDEAD },
{ "CHudWeaponFlashHelper", HIDEHUD_MISCSTATUS | HIDEHUD_PLAYERDEAD },
{ "CVehicleRoleHudElement", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
{ "CHudTimer", HIDEHUD_MISCSTATUS },
{ "CHudVehicleHealth", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
{ "CMinimapPanel", 0 },
{ "CHudAmmoPrimary", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
{ "CHudAmmoPrimaryClip", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
{ "CHudAmmoSecondary", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
{ "CHudVehicle", HIDEHUD_PLAYERDEAD },
{ "CHudCrosshair", HIDEHUD_PLAYERDEAD },
{ "CHudWeapon", HIDEHUD_PLAYERDEAD | HIDEHUD_WEAPONS },
{ "CHudProgressBar", HIDEHUD_PLAYERDEAD | HIDEHUD_WEAPONS },
// Counter-Strike hud elements.
{ "CHudRoundTimer", 0 },
{ "CHudAccount", HIDEHUD_PLAYERDEAD },
{ "CHudShoppingCart", HIDEHUD_PLAYERDEAD },
{ "CHudC4", HIDEHUD_PLAYERDEAD },
{ "CHudArmor", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD },
// Old HL2 HUD elements
{ "CHudHealthOld", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHudBatteryOld", HIDEHUD_HEALTH | HIDEHUD_NEEDSUIT },
{ "CHudAmmoOld", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ "CHudSecondaryAmmoOld", HIDEHUD_HEALTH | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT },
{ NULL, 0 },
};
ConVar hidehud( "hidehud", "0", 0 );
//=======================================================================================================================
// CHudElement
// All hud elements are derived from this class.
//=======================================================================================================================
//-----------------------------------------------------------------------------
// Purpose: Registers the hud element in a global list, in CHud
//-----------------------------------------------------------------------------
CHudElement::CHudElement( const char *pElementName )
{
m_bActive = false;
m_iHiddenBits = 0;
m_pElementName = pElementName;
SetNeedsRemove( false );
}
//-----------------------------------------------------------------------------
// Purpose: Remove this hud element from the global list in CHUD
//-----------------------------------------------------------------------------
CHudElement::~CHudElement()
{
if ( m_bNeedsRemove )
{
gHUD.RemoveHudElement( this );
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CHudElement::SetActive( bool bActive )
{
m_bActive = bActive;
}
//-----------------------------------------------------------------------------
// Purpose:
// Input : needsremove -
//-----------------------------------------------------------------------------
void CHudElement::SetNeedsRemove( bool needsremove )
{
m_bNeedsRemove = needsremove;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CHudElement::SetHiddenBits( int iBits )
{
m_iHiddenBits = iBits;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CHudElement::ShouldDraw( void )
{
return !gHUD.IsHidden( m_iHiddenBits );
}
/*============================================
CHud class definition
============================================*/
CHud gHUD; // global HUD object
DECLARE_MESSAGE(gHUD, ResetHUD);
DECLARE_MESSAGE(gHUD, InitHUD);
DECLARE_MESSAGE(gHUD, GameMode);
DECLARE_MESSAGE(gHUD, TeamChange);
CHud::CHud()
{
}
//-----------------------------------------------------------------------------
// Purpose: This is called every time the DLL is loaded
//-----------------------------------------------------------------------------
void CHud::Init( void )
{
HOOK_MESSAGE( ResetHUD );
HOOK_MESSAGE( GameMode );
HOOK_MESSAGE( InitHUD );
HOOK_MESSAGE( TeamChange );
HOOK_MESSAGE( ClearDecals );
InitFonts();
// Create all the Hud elements and then tell them to initialise
CHudElementHelper::CreateAllElements();
for ( int i = 0; i < m_HudList.Size(); i++ )
{
m_HudList[i]->Init();
}
MsgFunc_ResetHUD( 0, 0, NULL );
m_bHudTexturesLoaded = false;
KeyValues *kv = new KeyValues( "layout" );
if ( kv )
{
if ( kv->LoadFromFile( filesystem, "scripts/HudLayout.res" ) )
{
for ( int i = 0; i < m_HudList.Size(); i++ )
{
vgui::Panel *pPanel = dynamic_cast<vgui::Panel*>(m_HudList[i]);
if ( !pPanel )
{
Msg( "Non-vgui hud element %s\n", m_HudList[i]->GetName() );
continue;
}
KeyValues *key = kv->FindKey( pPanel->GetName(), false );
if ( !key )
{
Msg( "Hud element '%s' doesn't have an entry '%s' in scripts/HudLayout.res\n", m_HudList[i]->GetName(), pPanel->GetName() );
}
if ( !pPanel->GetParent() )
{
Msg( "Hud element '%s'/'%s' doesn't have a parent\n", m_HudList[i]->GetName(), pPanel->GetName() );
}
}
}
kv->deleteThis();
}
if ( m_bHudTexturesLoaded )
return;
m_bHudTexturesLoaded = true;
CUtlDict< CHudTexture *, int > textureList;
// check to see if we have sprites for this res; if not, step down
LoadHudTextures( textureList, VarArgs("scripts/hud_textures.txt" ) );
LoadHudTextures( textureList, VarArgs("scripts/mod_textures.txt" ) );
int c = textureList.Count();
for ( int index = 0; index < c; index++ )
{
CHudTexture* tex = textureList[ index ];
AddSearchableHudIconToList( *tex );
}
FreeHudTextureList( textureList );
}
//-----------------------------------------------------------------------------
// Purpose: Init Hud global colors
// Input : *scheme -
//-----------------------------------------------------------------------------
void CHud::InitColors( vgui::IScheme *scheme )
{
m_clrNormal = scheme->GetColor( "Normal", Color( 255, 208, 64 ,255 ) );
m_clrCaution = scheme->GetColor( "Caution", Color( 255, 48, 0, 255 ) );
m_clrYellowish = scheme->GetColor( "Yellowish", Color( 255, 160, 0, 255 ) );
}
//-----------------------------------------------------------------------------
// Initializes fonts
//-----------------------------------------------------------------------------
void CHud::InitFonts()
{
g_hFontTrebuchet24 = vgui::surface()->CreateFont();
vgui::surface()->AddGlyphSetToFont( g_hFontTrebuchet24, "Trebuchet MS", 24, 900, 0, 0, 0, 0x0, 0x7F );
g_hFontTrebuchet40 = vgui::surface()->CreateFont();
vgui::surface()->AddGlyphSetToFont( g_hFontTrebuchet40, "Trebuchet MS", 40, 900, 0, 0, 0, 0x0, 0x7F );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CHud::Shutdown( void )
{
// Delete all the Hud elements
int iMax = m_HudList.Size();
for ( int i = iMax-1; i >= 0; i-- )
{
delete m_HudList[i];
}
m_HudList.Purge();
m_bHudTexturesLoaded = false;
}
//-----------------------------------------------------------------------------
// Purpose: LevelInit's called whenever a new level's starting
//-----------------------------------------------------------------------------
void CHud::LevelInit( void )
{
// Tell all the registered hud elements to LevelInit
for ( int i = 0; i < m_HudList.Size(); i++ )
{
m_HudList[i]->SetGameRestored( false );
m_HudList[i]->LevelInit();
}
}
//-----------------------------------------------------------------------------
// Purpose: LevelShutdown's called whenever a level's finishing
//-----------------------------------------------------------------------------
void CHud::LevelShutdown( void )
{
// Tell all the registered hud elements to LevelInit
for ( int i = 0; i < m_HudList.Size(); i++ )
{
m_HudList[i]->LevelShutdown();
m_HudList[i]->SetGameRestored( false );
}
}
//-----------------------------------------------------------------------------
// Purpose: cleans up memory allocated for m_rg* arrays
//-----------------------------------------------------------------------------
CHud::~CHud()
{
int c = m_Icons.Count();
for ( int i = c - 1; i >= 0; i-- )
{
CHudTexture *tex = m_Icons[ i ];
g_HudTextureMemoryPool.Free( tex );
}
m_Icons.Purge();
}
void CHudTexture::DrawSelf( int x, int y, Color& clr ) const
{
DrawSelf( x, y, Width(), Height(), clr );
}
void CHudTexture::DrawSelf( int x, int y, int w, int h, Color& clr ) const
{
if ( textureId == -1 )
return;
vgui::surface()->DrawSetTexture( textureId );
vgui::surface()->DrawSetColor( clr );
vgui::surface()->DrawTexturedSubRect( x, y, x + w, y + h,
texCoords[ 0 ], texCoords[ 1 ], texCoords[ 2 ], texCoords[ 3 ] );
}
void CHudTexture::DrawSelfCropped( int x, int y, int cropx, int cropy, int cropw, int croph, Color& clr ) const
{
if ( textureId == -1 )
return;
float fw = (float)Width();
float fh = (float)Height();
float twidth = texCoords[ 2 ] - texCoords[ 0 ];
float theight = texCoords[ 3 ] - texCoords[ 1 ];
// Interpolate coords
float tCoords[ 4 ];
tCoords[ 0 ] = texCoords[ 0 ] + ( (float)cropx / fw ) * twidth;
tCoords[ 1 ] = texCoords[ 1 ] + ( (float)cropy / fh ) * theight;
tCoords[ 2 ] = texCoords[ 0 ] + ( (float)(cropx + cropw ) / fw ) * twidth;
tCoords[ 3 ] = texCoords[ 1 ] + ( (float)(cropy + croph ) / fh ) * theight;
vgui::surface()->DrawSetTexture( textureId );
vgui::surface()->DrawSetColor( clr );
vgui::surface()->DrawTexturedSubRect(
x, y,
x + cropw, y + croph,
tCoords[ 0 ], tCoords[ 1 ],
tCoords[ 2 ], tCoords[ 3 ] );
}
//-----------------------------------------------------------------------------
// Purpose:
// Input : *t -
//-----------------------------------------------------------------------------
void CHud::SetupNewHudTexture( CHudTexture *t )
{
// Set up texture id and texture coordinates
t->textureId = vgui::surface()->CreateNewTextureID();
vgui::surface()->DrawSetTextureFile( t->textureId, t->szTextureFile, false, false );
int wide, tall;
vgui::surface()->DrawGetTextureSize( t->textureId, wide, tall );
t->texCoords[ 0 ] = (float)(t->rc.left + 0.5f) / (float)wide;
t->texCoords[ 1 ] = (float)(t->rc.top + 0.5f) / (float)tall;
t->texCoords[ 2 ] = (float)(t->rc.right - 0.5f) / (float)wide;
t->texCoords[ 3 ] = (float)(t->rc.bottom - 0.5f) / (float)tall;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CHudTexture *CHud::AddUnsearchableHudIconToList( CHudTexture& texture )
{
// These names are composed based on the texture file name
char composedName[ 512 ];
Q_snprintf( composedName, sizeof( composedName ), "%s_%i_%i_%i_%i",
texture.szTextureFile, texture.rc.left, texture.rc.top, texture.rc.right, texture.rc.bottom );
CHudTexture *icon = GetIcon( composedName );
if ( icon )
{
return icon;
}
CHudTexture *newTexture = ( CHudTexture * )g_HudTextureMemoryPool.Alloc();
*newTexture = texture;
SetupNewHudTexture( newTexture );
int idx = m_Icons.Insert( composedName, newTexture );
return m_Icons[ idx ];
}
//-----------------------------------------------------------------------------
// Purpose:
// Input : texture -
// Output : CHudTexture
//-----------------------------------------------------------------------------
CHudTexture *CHud::AddSearchableHudIconToList( CHudTexture& texture )
{
CHudTexture *icon = GetIcon( texture.szShortName );
if ( icon )
{
return icon;
}
CHudTexture *newTexture = ( CHudTexture * )g_HudTextureMemoryPool.Alloc();
*newTexture = texture;
SetupNewHudTexture( newTexture );
int idx = m_Icons.Insert( texture.szShortName, newTexture );
return m_Icons[ idx ];
}
//-----------------------------------------------------------------------------
// Purpose: returns a pointer to an icon in the list
// Input : *szIcon -
// Output : CHudTexture
//-----------------------------------------------------------------------------
CHudTexture *CHud::GetIcon( const char *szIcon )
{
int i = m_Icons.Find( szIcon );
if ( i == m_Icons.InvalidIndex() )
return NULL;
return m_Icons[ i ];
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CHud::RefreshHudTextures()
{
if ( !m_bHudTexturesLoaded )
{
Assert( 0 );
return;
}
CUtlDict< CHudTexture *, int > textureList;
// check to see if we have sprites for this res; if not, step down
LoadHudTextures( textureList, VarArgs("scripts/hud_textures.txt" ) );
LoadHudTextures( textureList, VarArgs("scripts/mod_textures.txt" ) );
int c = textureList.Count();
for ( int index = 0; index < c; index++ )
{
CHudTexture *tex = textureList[ index ];
Assert( tex );
CHudTexture *icon = GetIcon( tex->szShortName );
if ( !icon )
continue;
// Update file
strcpy( icon->szTextureFile, tex->szTextureFile );
// Update subrect
icon->rc = tex->rc;
// Keep existing texture id, but now update texture file and texture coordinates
vgui::surface()->DrawSetTextureFile( icon->textureId, icon->szTextureFile, false, false );
// Get new texture dimensions in case it changed
int wide, tall;
vgui::surface()->DrawGetTextureSize( icon->textureId, wide, tall );
// Assign coords
icon->texCoords[ 0 ] = (float)(icon->rc.left + 0.5f) / (float)wide;
icon->texCoords[ 1 ] = (float)(icon->rc.top + 0.5f) / (float)tall;
icon->texCoords[ 2 ] = (float)(icon->rc.right - 0.5f) / (float)wide;
icon->texCoords[ 3 ] = (float)(icon->rc.bottom - 0.5f) / (float)tall;
}
FreeHudTextureList( textureList );
}
void CHud::OnRestore()
{
for ( int i = 0; i < m_HudList.Size(); i++ )
{
m_HudList[i]->SetGameRestored( true );
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CHud::VidInit( void )
{
for ( int i = 0; i < m_HudList.Size(); i++ )
{
m_HudList[i]->VidInit();
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CHudElement *CHud::FindElement( const char *pName )
{
for ( int i = 0; i < m_HudList.Size(); i++ )
{
if ( stricmp( m_HudList[i]->GetName(), pName ) == 0 )
return m_HudList[i];
}
DevWarning(1, "Could not find Hud Element: %s\n", pName );
assert(0);
return NULL;
}
//-----------------------------------------------------------------------------
// Purpose: Adds a member to the HUD
//-----------------------------------------------------------------------------
void CHud::AddHudElement( CHudElement *pHudElement )
{
// Add the hud element to the end of the array
m_HudList.AddToTail( pHudElement );
pHudElement->SetNeedsRemove( true );
// Set the hud element's visibility
int i = 0;
while ( sHudHiddenArray[i].sElementName )
{
if ( !strcmp( sHudHiddenArray[i].sElementName, pHudElement->GetName() ) )
{
pHudElement->SetHiddenBits( sHudHiddenArray[i].iHiddenBits );
return;
}
i++;
}
// Couldn't find the hud element's entry in the hidden array
// Add an entry for your new hud element to the sHudHiddenArray array at the top of this file.
Assert( 0 );
}
//-----------------------------------------------------------------------------
// Purpose: Remove an element from the HUD
//-----------------------------------------------------------------------------
void CHud::RemoveHudElement( CHudElement *pHudElement )
{
m_HudList.FindAndRemove( pHudElement );
}
//-----------------------------------------------------------------------------
// Purpose: Returns current mouse sensitivity setting
// Output : float - the return value
//-----------------------------------------------------------------------------
float CHud::GetSensitivity( void )
{
return m_flMouseSensitivity;
}
//-----------------------------------------------------------------------------
// Purpose: Return true if the passed in sections of the HUD shouldn't be drawn
//-----------------------------------------------------------------------------
bool CHud::IsHidden( int iHudFlags )
{
// Not in game?
if ( !engine->IsInGame() )
return true;
// No local player yet?
C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer();
if ( !pPlayer )
return true;
// Get current hidden flags
int iHideHud = pPlayer->m_Local.m_iHideHUD;
if ( hidehud.GetInt() )
{
iHideHud = hidehud.GetInt();
}
// Everything hidden?
if ( iHideHud & HIDEHUD_ALL )
return true;
// Local player dead?
if ( ( iHudFlags & HIDEHUD_PLAYERDEAD ) && ( pPlayer->GetHealth() <= 0 ) )
return true;
// Need the HEV suit ( HL2 )
if ( ( iHudFlags & HIDEHUD_NEEDSUIT ) && ( !pPlayer->IsSuitEquipped() ) )
return true;
return ( ( iHudFlags & iHideHud ) != 0);
}
//-----------------------------------------------------------------------------
// Purpose: Allows HUD to modify input data
//-----------------------------------------------------------------------------
void CHud::ProcessInput( bool bActive )
{
if ( bActive )
{
m_iKeyBits = input->GetButtonBits( 0 );
// Weaponbits need to be sent down as a UserMsg now.
gHUD.Think();
if ( !C_BasePlayer::GetLocalPlayer() )
{
extern ConVar default_fov;
engine->SetFieldOfView( default_fov.GetFloat() );
}
}
}
//-----------------------------------------------------------------------------
// Purpose: Allows HUD to Think and modify input data
// Input : *cdata -
// time -
// Output : int - 1 if there were changes, 0 otherwise
//-----------------------------------------------------------------------------
void CHud::UpdateHud( bool bActive )
{
// clear the weapon bits.
gHUD.m_iKeyBits &= (~(IN_WEAPON1|IN_WEAPON2));
g_pClientMode->Update();
}
//-----------------------------------------------------------------------------
// Purpose: Force a Hud UI anim to play
//-----------------------------------------------------------------------------
void TestHudAnim_f( void )
{
if (engine->Cmd_Argc() != 2)
{
Msg("Usage:\n testhudanim <anim name>\n");
return;
}
g_pClientMode->GetViewportAnimationController()->StartAnimationSequence( engine->Cmd_Argv(1) );
}
static ConCommand testhudanim( "testhudanim", TestHudAnim_f, "Test a hud element animation.\n\tArguments: <anim name>\n", FCVAR_CHEAT ); | [
"uavxp29@gmail.com"
] | uavxp29@gmail.com |
cef497f735fbabddfd787d44d52843c202c02f06 | 734431ff4768b4129450523319ba80ea3e2a5898 | /test/flip.cpp | 45faf408155b591c6e984ae2799838d2bcb21b45 | [] | no_license | dopic/Fit | 5b9b8ea8b5505eb585575d3c1c57c34e7b189eb0 | d895d531fb27e9ac642158851d6782553d94b9d3 | refs/heads/master | 2020-12-30T22:09:02.318221 | 2015-03-18T22:34:02 | 2015-03-18T22:34:02 | 33,482,242 | 1 | 0 | null | 2015-04-06T13:04:42 | 2015-04-06T13:04:42 | null | UTF-8 | C++ | false | false | 215 | cpp | #include <fit/flip.h>
#include <fit/placeholders.h>
#include "test.h"
FIT_TEST_CASE()
{
FIT_TEST_CHECK(3 == fit::flip(fit::_ - fit::_)(2, 5));
FIT_STATIC_TEST_CHECK(3 == fit::flip(fit::_ - fit::_)(2, 5));
} | [
"pfultz2@yahoo.com"
] | pfultz2@yahoo.com |
a39da48198dd89cd99930e80b97855e3fd33a20b | c8e3da287e92eb3e24b7f1dbefddde083053754a | /src/SerializableArray.h | f4b035f53eb61f986fb1bc983ceb4e93be75cb94 | [] | no_license | rvishna/flow-shop-scheduler | e55269cdfbcc2a69ad32569cbccbc6fbddbb59b1 | d36d52c0bf56d47be9c8d556f3a7b7229fb86915 | refs/heads/master | 2023-03-25T19:24:33.868554 | 2021-03-23T06:10:22 | 2021-03-23T06:10:22 | 348,830,865 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,054 | h | #ifndef SERIALIZABLE_ARRAY_H
#define SERIALIZABLE_ARRAY_H
#include "DataContext.h"
namespace flow_shop_scheduler {
template<typename T>
class SerializableArray : public JSONSerializable
{
public:
virtual void set(json&) const override;
virtual void get(const json&, std::shared_ptr<DataContext> dataContext = nullptr) override;
std::size_t size() const { return data_.size(); }
bool empty() const { return data_.empty(); }
T& operator[](std::size_t i) { return data_[i]; }
const T& operator[](std::size_t i) const { return data_[i]; }
typedef typename std::vector<T>::iterator iterator;
typedef typename std::vector<T>::const_iterator const_iterator;
iterator begin() noexcept { return data_.begin(); }
iterator end() noexcept { return data_.end(); }
const_iterator begin() const noexcept { return data_.begin(); }
const_iterator end() const noexcept { return data_.end(); }
void push_back(const T& val) { data_.push_back(val); }
private:
std::vector<T> data_;
};
template<typename T>
void SerializableArray<T>::set(json& j) const
{
j = data_;
}
template<typename T>
void SerializableArray<T>::get(const json& j, std::shared_ptr<DataContext> dataContext)
{
if(!j.is_array())
{
std::ostringstream oss;
oss << "Deserializing to " << T::Name(true) << " requires a JSON array.";
throw Exception(oss.str());
}
for(const auto& o : j)
{
try
{
data_.push_back(o.get<T>());
}
catch(const json::type_error& e)
{
if(e.id == 302)
throw InvalidType::Create(T::Name(), o, e.what());
else
throw;
}
catch(const json::out_of_range& e)
{
if(e.id == 403)
throw MandatoryFieldMissing::Create(T::Name(), o, e.what());
else
throw;
}
if(dataContext)
data_.back().setDataContext(dataContext);
}
}
} // namespace flow_shop_scheduler
#endif | [
"rvishnampet@gmail.com"
] | rvishnampet@gmail.com |
aa12e239d41a9ee497b2e97df0453b6729800804 | c980768b06aed339b2d6b47fc0d13507f068537c | /GhCore/ghApp.h | 4fa3402a08aa5c8d87e7bf529bd000dd78e8fb10 | [] | no_license | jiaco/genehuggers | f4a3b99cdfea59cbaf56fc29a26f0230db69dcbb | 30c3ba1f07aa7a9832385b2d2847d051e77cfd28 | refs/heads/master | 2021-01-01T05:51:38.865068 | 2012-04-16T07:57:40 | 2012-04-16T07:57:40 | 32,718,214 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,994 | h | #ifndef GH_APP_H
#define GH_APP_H 1
#include <QtCore>
#include "ghDef.h"
#include "ghVariant.h"
#include "ghParam.h"
#include "ghOfp.h"
#include "ghErrorprone.h"
namespace GH
{
inline QMap<QString,QString> Args( const int argc, char** argv )
{
QMap<QString,QString> rv;
for( int ac = 1; ac < argc; ++ac ) {
QString aname = argv[ ac ];
QString avalue = "true";
if( ac + 1 < argc ) {
avalue = argv[ ac + 1 ];
if( avalue.startsWith( '-' ) ) {
avalue = "true";
} else {
++ac;
}
}
if( aname.startsWith( '-' ) ) {
rv.insert( aname.mid( 1 ), avalue );
}
}
return( rv );
}
class GH_DLL_EXPORT App : public GH::Errorprone
{
public:
App( int argc, char** argv );
void usage();
QString arg0() const;
bool isGui() const;
void showError() const;
const QMap<QString,QString> args() const;
bool hasParam( const QString& name ) const;
bool addParam( Param param );
bool addParam( const QString& name,
const QString& defaultValue = QString(),
const Param::ParamType& type = Param::UndefParam,
const QString& displayName = QString() );
Param param( const QString& name );
Param* pparam( const QString& name );
QVariant paramValue( const QString& name ) const;
QStringList paramNames() const;
bool checkArgs();
// in ObjApp there are 2 signals
// void paramChanged()
// void message()
// in ObjApp these become slots
void setParam( const QString& name, const QVariant& value,
const bool& silent = true );
void guiSetParam( const QString& name, const QVariant& value );
protected:
bool _isGui;
QString _arg0;
QMap<QString,QString> _args;
QMap<QString,Param> _param;
QStringList _paramNames;
QString USAGE;
};
} // GH namespace
#endif // GH_APP_H
| [
"jiacov@gmail.com"
] | jiacov@gmail.com |
d9a2ff812cfdef3b3287f75d7ecc730bb1b54808 | 5e4a548b4531f68eb55af8804b3fe12499195179 | /frameworks/base/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp | d349f3881bf7c47bd1e10854e0dbdbf724559eab | [
"LicenseRef-scancode-unicode",
"Apache-2.0"
] | permissive | ytjojo/Framwork8.1 | 41f9264e0023377646b116d9635fc81440f8cf6a | 564fb59e980c1e41d5b07ecdd29dac7f3ae90e58 | refs/heads/master | 2020-03-23T09:03:04.962984 | 2017-10-28T06:40:48 | 2017-10-28T06:40:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 29,418 | cpp | /*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define LOG_TAG "Legacy-CameraDevice-JNI"
// #define LOG_NDEBUG 0
#include <utils/Log.h>
#include <utils/Errors.h>
#include <utils/Trace.h>
#include <camera/CameraUtils.h>
#include "jni.h"
#include <nativehelper/JNIHelp.h>
#include "core_jni_helpers.h"
#include "android_runtime/android_view_Surface.h"
#include "android_runtime/android_graphics_SurfaceTexture.h"
#include <gui/Surface.h>
#include <gui/IGraphicBufferProducer.h>
#include <gui/IProducerListener.h>
#include <ui/GraphicBuffer.h>
#include <system/window.h>
#include <hardware/camera3.h>
#include <system/camera_metadata.h>
#include <stdint.h>
#include <inttypes.h>
using namespace android;
// fully-qualified class name
#define CAMERA_DEVICE_CLASS_NAME "android/hardware/camera2/legacy/LegacyCameraDevice"
#define CAMERA_DEVICE_BUFFER_SLACK 3
#define DONT_CARE 0
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a)))
#define ALIGN(x, mask) ( ((x) + (mask) - 1) & ~((mask) - 1) )
/**
* Convert from RGB 888 to Y'CbCr using the conversion specified in JFIF v1.02
*/
static void rgbToYuv420(uint8_t* rgbBuf, size_t width, size_t height, uint8_t* yPlane,
uint8_t* crPlane, uint8_t* cbPlane, size_t chromaStep, size_t yStride, size_t chromaStride) {
uint8_t R, G, B;
size_t index = 0;
for (size_t j = 0; j < height; j++) {
uint8_t* cr = crPlane;
uint8_t* cb = cbPlane;
uint8_t* y = yPlane;
bool jEven = (j & 1) == 0;
for (size_t i = 0; i < width; i++) {
R = rgbBuf[index++];
G = rgbBuf[index++];
B = rgbBuf[index++];
*y++ = (77 * R + 150 * G + 29 * B) >> 8;
if (jEven && (i & 1) == 0) {
*cb = (( -43 * R - 85 * G + 128 * B) >> 8) + 128;
*cr = (( 128 * R - 107 * G - 21 * B) >> 8) + 128;
cr += chromaStep;
cb += chromaStep;
}
// Skip alpha
index++;
}
yPlane += yStride;
if (jEven) {
crPlane += chromaStride;
cbPlane += chromaStride;
}
}
}
static void rgbToYuv420(uint8_t* rgbBuf, size_t width, size_t height, android_ycbcr* ycbcr) {
size_t cStep = ycbcr->chroma_step;
size_t cStride = ycbcr->cstride;
size_t yStride = ycbcr->ystride;
ALOGV("%s: yStride is: %zu, cStride is: %zu, cStep is: %zu", __FUNCTION__, yStride, cStride,
cStep);
rgbToYuv420(rgbBuf, width, height, reinterpret_cast<uint8_t*>(ycbcr->y),
reinterpret_cast<uint8_t*>(ycbcr->cr), reinterpret_cast<uint8_t*>(ycbcr->cb),
cStep, yStride, cStride);
}
static status_t connectSurface(const sp<Surface>& surface, int32_t maxBufferSlack) {
status_t err = NO_ERROR;
err = surface->connect(NATIVE_WINDOW_API_CAMERA, /*listener*/NULL);
if (err != OK) {
ALOGE("%s: Unable to connect to surface, error %s (%d).", __FUNCTION__,
strerror(-err), err);
return err;
}
err = native_window_set_usage(surface.get(), GRALLOC_USAGE_SW_WRITE_OFTEN);
if (err != NO_ERROR) {
ALOGE("%s: Failed to set native window usage flag, error %s (%d).", __FUNCTION__,
strerror(-err), err);
return err;
}
int minUndequeuedBuffers;
err = static_cast<ANativeWindow*>(surface.get())->query(surface.get(),
NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBuffers);
if (err != NO_ERROR) {
ALOGE("%s: Failed to get native window min undequeued buffers, error %s (%d).",
__FUNCTION__, strerror(-err), err);
return err;
}
ALOGV("%s: Setting buffer count to %d", __FUNCTION__,
maxBufferSlack + 1 + minUndequeuedBuffers);
err = native_window_set_buffer_count(surface.get(), maxBufferSlack + 1 + minUndequeuedBuffers);
if (err != NO_ERROR) {
ALOGE("%s: Failed to set native window buffer count, error %s (%d).", __FUNCTION__,
strerror(-err), err);
return err;
}
return NO_ERROR;
}
/**
* Produce a frame in the given surface.
*
* Args:
* anw - a surface to produce a frame in.
* pixelBuffer - image buffer to generate a frame from.
* width - width of the pixelBuffer in pixels.
* height - height of the pixelBuffer in pixels.
* pixelFmt - format of the pixelBuffer, one of:
* HAL_PIXEL_FORMAT_YCrCb_420_SP,
* HAL_PIXEL_FORMAT_YCbCr_420_888,
* HAL_PIXEL_FORMAT_BLOB
* bufSize - the size of the pixelBuffer in bytes.
*/
static status_t produceFrame(const sp<ANativeWindow>& anw,
uint8_t* pixelBuffer,
int32_t bufWidth, // Width of the pixelBuffer
int32_t bufHeight, // Height of the pixelBuffer
int32_t pixelFmt, // Format of the pixelBuffer
int32_t bufSize) {
ATRACE_CALL();
status_t err = NO_ERROR;
ANativeWindowBuffer* anb;
ALOGV("%s: Dequeue buffer from %p %dx%d (fmt=%x, size=%x)",
__FUNCTION__, anw.get(), bufWidth, bufHeight, pixelFmt, bufSize);
if (anw == 0) {
ALOGE("%s: anw must not be NULL", __FUNCTION__);
return BAD_VALUE;
} else if (pixelBuffer == NULL) {
ALOGE("%s: pixelBuffer must not be NULL", __FUNCTION__);
return BAD_VALUE;
} else if (bufWidth < 0) {
ALOGE("%s: width must be non-negative", __FUNCTION__);
return BAD_VALUE;
} else if (bufHeight < 0) {
ALOGE("%s: height must be non-negative", __FUNCTION__);
return BAD_VALUE;
} else if (bufSize < 0) {
ALOGE("%s: bufSize must be non-negative", __FUNCTION__);
return BAD_VALUE;
}
size_t width = static_cast<size_t>(bufWidth);
size_t height = static_cast<size_t>(bufHeight);
size_t bufferLength = static_cast<size_t>(bufSize);
// TODO: Switch to using Surface::lock and Surface::unlockAndPost
err = native_window_dequeue_buffer_and_wait(anw.get(), &anb);
if (err != NO_ERROR) return err;
sp<GraphicBuffer> buf(GraphicBuffer::from(anb));
uint32_t grallocBufWidth = buf->getWidth();
uint32_t grallocBufHeight = buf->getHeight();
uint32_t grallocBufStride = buf->getStride();
if (grallocBufWidth != width || grallocBufHeight != height) {
ALOGE("%s: Received gralloc buffer with bad dimensions %" PRIu32 "x%" PRIu32
", expecting dimensions %zu x %zu", __FUNCTION__, grallocBufWidth,
grallocBufHeight, width, height);
return BAD_VALUE;
}
int32_t bufFmt = 0;
err = anw->query(anw.get(), NATIVE_WINDOW_FORMAT, &bufFmt);
if (err != NO_ERROR) {
ALOGE("%s: Error while querying surface pixel format %s (%d).", __FUNCTION__,
strerror(-err), err);
return err;
}
uint64_t tmpSize = (pixelFmt == HAL_PIXEL_FORMAT_BLOB) ? grallocBufWidth :
4 * grallocBufHeight * grallocBufWidth;
if (bufFmt != pixelFmt) {
if (bufFmt == HAL_PIXEL_FORMAT_RGBA_8888 && pixelFmt == HAL_PIXEL_FORMAT_BLOB) {
ALOGV("%s: Using BLOB to RGBA format override.", __FUNCTION__);
tmpSize = 4 * (grallocBufWidth + grallocBufStride * (grallocBufHeight - 1));
} else {
ALOGW("%s: Format mismatch in produceFrame: expecting format %#" PRIx32
", but received buffer with format %#" PRIx32, __FUNCTION__, pixelFmt, bufFmt);
}
}
if (tmpSize > SIZE_MAX) {
ALOGE("%s: Overflow calculating size, buffer with dimens %zu x %zu is absurdly large...",
__FUNCTION__, width, height);
return BAD_VALUE;
}
size_t totalSizeBytes = tmpSize;
ALOGV("%s: Pixel format chosen: %x", __FUNCTION__, pixelFmt);
switch(pixelFmt) {
case HAL_PIXEL_FORMAT_YCrCb_420_SP: {
if (bufferLength < totalSizeBytes) {
ALOGE("%s: PixelBuffer size %zu too small for given dimensions",
__FUNCTION__, bufferLength);
return BAD_VALUE;
}
uint8_t* img = NULL;
ALOGV("%s: Lock buffer from %p for write", __FUNCTION__, anw.get());
err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
if (err != NO_ERROR) return err;
uint8_t* yPlane = img;
uint8_t* uPlane = img + height * width;
uint8_t* vPlane = uPlane + 1;
size_t chromaStep = 2;
size_t yStride = width;
size_t chromaStride = width;
rgbToYuv420(pixelBuffer, width, height, yPlane,
uPlane, vPlane, chromaStep, yStride, chromaStride);
break;
}
case HAL_PIXEL_FORMAT_YV12: {
if (bufferLength < totalSizeBytes) {
ALOGE("%s: PixelBuffer size %zu too small for given dimensions",
__FUNCTION__, bufferLength);
return BAD_VALUE;
}
if ((width & 1) || (height & 1)) {
ALOGE("%s: Dimens %zu x %zu are not divisible by 2.", __FUNCTION__, width, height);
return BAD_VALUE;
}
uint8_t* img = NULL;
//!++
ALOGI("%s: Lock buffer from %p for write", __FUNCTION__, anw.get());
//!--
err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
if (err != NO_ERROR) {
ALOGE("%s: Error %s (%d) while locking gralloc buffer for write.", __FUNCTION__,
strerror(-err), err);
return err;
}
uint32_t stride = buf->getStride();
ALOGV("%s: stride is: %" PRIu32, __FUNCTION__, stride);
LOG_ALWAYS_FATAL_IF(stride % 16, "Stride is not 16 pixel aligned %d", stride);
uint32_t cStride = ALIGN(stride / 2, 16);
size_t chromaStep = 1;
uint8_t* yPlane = img;
uint8_t* crPlane = img + static_cast<uint32_t>(height) * stride;
uint8_t* cbPlane = crPlane + cStride * static_cast<uint32_t>(height) / 2;
rgbToYuv420(pixelBuffer, width, height, yPlane,
crPlane, cbPlane, chromaStep, stride, cStride);
break;
}
case HAL_PIXEL_FORMAT_YCbCr_420_888: {
// Software writes with YCbCr_420_888 format are unsupported
// by the gralloc module for now
if (bufferLength < totalSizeBytes) {
ALOGE("%s: PixelBuffer size %zu too small for given dimensions",
__FUNCTION__, bufferLength);
return BAD_VALUE;
}
android_ycbcr ycbcr = android_ycbcr();
ALOGV("%s: Lock buffer from %p for write", __FUNCTION__, anw.get());
err = buf->lockYCbCr(GRALLOC_USAGE_SW_WRITE_OFTEN, &ycbcr);
if (err != NO_ERROR) {
ALOGE("%s: Failed to lock ycbcr buffer, error %s (%d).", __FUNCTION__,
strerror(-err), err);
return err;
}
rgbToYuv420(pixelBuffer, width, height, &ycbcr);
break;
}
case HAL_PIXEL_FORMAT_BLOB: {
int8_t* img = NULL;
struct camera3_jpeg_blob footer = {
.jpeg_blob_id = CAMERA3_JPEG_BLOB_ID,
.jpeg_size = (uint32_t)bufferLength
};
size_t totalJpegSize = bufferLength + sizeof(footer);
totalJpegSize = (totalJpegSize + 3) & ~0x3; // round up to nearest octonibble
if (totalJpegSize > totalSizeBytes) {
ALOGE("%s: Pixel buffer needs size %zu, cannot fit in gralloc buffer of size %zu",
__FUNCTION__, totalJpegSize, totalSizeBytes);
return BAD_VALUE;
}
err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
if (err != NO_ERROR) {
ALOGE("%s: Failed to lock buffer, error %s (%d).", __FUNCTION__, strerror(-err),
err);
return err;
}
memcpy(img, pixelBuffer, bufferLength);
memcpy(img + totalSizeBytes - sizeof(footer), &footer, sizeof(footer));
break;
}
default: {
ALOGE("%s: Invalid pixel format in produceFrame: %x", __FUNCTION__, pixelFmt);
return BAD_VALUE;
}
}
ALOGV("%s: Unlock buffer from %p", __FUNCTION__, anw.get());
err = buf->unlock();
if (err != NO_ERROR) {
ALOGE("%s: Failed to unlock buffer, error %s (%d).", __FUNCTION__, strerror(-err), err);
return err;
}
//!++
ALOGI("%s: Queue buffer to %p", __FUNCTION__, anw.get());
//!--
err = anw->queueBuffer(anw.get(), buf->getNativeBuffer(), /*fenceFd*/-1);
if (err != NO_ERROR) {
ALOGE("%s: Failed to queue buffer, error %s (%d).", __FUNCTION__, strerror(-err), err);
return err;
}
return NO_ERROR;
}
static sp<ANativeWindow> getNativeWindow(JNIEnv* env, jobject surface) {
sp<ANativeWindow> anw;
if (surface) {
anw = android_view_Surface_getNativeWindow(env, surface);
if (env->ExceptionCheck()) {
return NULL;
}
} else {
jniThrowNullPointerException(env, "surface");
return NULL;
}
if (anw == NULL) {
ALOGE("%s: Surface had no valid native window.", __FUNCTION__);
return NULL;
}
return anw;
}
static sp<ANativeWindow> getNativeWindowFromTexture(JNIEnv* env, jobject surfaceTexture) {
sp<ANativeWindow> anw;
if (surfaceTexture) {
anw = android_SurfaceTexture_getNativeWindow(env, surfaceTexture);
if (env->ExceptionCheck()) {
return NULL;
}
} else {
jniThrowNullPointerException(env, "surfaceTexture");
return NULL;
}
if (anw == NULL) {
jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException",
"SurfaceTexture had no valid native window.");
return NULL;
}
return anw;
}
static sp<Surface> getSurface(JNIEnv* env, jobject surface) {
sp<Surface> s;
if (surface) {
s = android_view_Surface_getSurface(env, surface);
if (env->ExceptionCheck()) {
return NULL;
}
} else {
jniThrowNullPointerException(env, "surface");
return NULL;
}
if (s == NULL) {
jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException",
"Surface had no valid native Surface.");
return NULL;
}
return s;
}
extern "C" {
static jint LegacyCameraDevice_nativeDetectSurfaceType(JNIEnv* env, jobject thiz, jobject surface) {
ALOGV("nativeDetectSurfaceType");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
int32_t fmt = 0;
status_t err = anw->query(anw.get(), NATIVE_WINDOW_FORMAT, &fmt);
if(err != NO_ERROR) {
ALOGE("%s: Error while querying surface pixel format %s (%d).", __FUNCTION__, strerror(-err),
err);
return err;
}
return fmt;
}
static jint LegacyCameraDevice_nativeDetectSurfaceDataspace(JNIEnv* env, jobject thiz, jobject surface) {
ALOGV("nativeDetectSurfaceDataspace");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
int32_t fmt = 0;
status_t err = anw->query(anw.get(), NATIVE_WINDOW_DEFAULT_DATASPACE, &fmt);
if(err != NO_ERROR) {
ALOGE("%s: Error while querying surface dataspace %s (%d).", __FUNCTION__, strerror(-err),
err);
return err;
}
return fmt;
}
static jint LegacyCameraDevice_nativeDetectSurfaceDimens(JNIEnv* env, jobject thiz,
jobject surface, jintArray dimens) {
ALOGV("nativeGetSurfaceDimens");
if (dimens == NULL) {
ALOGE("%s: Null dimens argument passed to nativeDetectSurfaceDimens", __FUNCTION__);
return BAD_VALUE;
}
if (env->GetArrayLength(dimens) < 2) {
ALOGE("%s: Invalid length of dimens argument in nativeDetectSurfaceDimens", __FUNCTION__);
return BAD_VALUE;
}
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
int32_t dimenBuf[2];
status_t err = anw->query(anw.get(), NATIVE_WINDOW_WIDTH, dimenBuf);
if(err != NO_ERROR) {
ALOGE("%s: Error while querying surface width %s (%d).", __FUNCTION__, strerror(-err),
err);
return err;
}
err = anw->query(anw.get(), NATIVE_WINDOW_HEIGHT, dimenBuf + 1);
if(err != NO_ERROR) {
ALOGE("%s: Error while querying surface height %s (%d).", __FUNCTION__, strerror(-err),
err);
return err;
}
env->SetIntArrayRegion(dimens, /*start*/0, /*length*/ARRAY_SIZE(dimenBuf), dimenBuf);
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeDetectSurfaceUsageFlags(JNIEnv* env, jobject thiz,
jobject surface) {
ALOGV("nativeDetectSurfaceUsageFlags");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
jniThrowException(env, "Ljava/lang/UnsupportedOperationException;",
"Could not retrieve native window from surface.");
return BAD_VALUE;
}
int32_t usage = 0;
status_t err = anw->query(anw.get(), NATIVE_WINDOW_CONSUMER_USAGE_BITS, &usage);
if(err != NO_ERROR) {
jniThrowException(env, "Ljava/lang/UnsupportedOperationException;",
"Error while querying surface usage bits");
return err;
}
return usage;
}
static jint LegacyCameraDevice_nativeDisconnectSurface(JNIEnv* env, jobject thiz,
jobject surface) {
ALOGV("nativeDisconnectSurface");
if (surface == nullptr) return NO_ERROR;
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGV("Buffer queue has already been abandoned.");
return NO_ERROR;
}
status_t err = native_window_api_disconnect(anw.get(), NATIVE_WINDOW_API_CAMERA);
if(err != NO_ERROR) {
jniThrowException(env, "Ljava/lang/UnsupportedOperationException;",
"Error while disconnecting surface");
return err;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeDetectTextureDimens(JNIEnv* env, jobject thiz,
jobject surfaceTexture, jintArray dimens) {
ALOGV("nativeDetectTextureDimens");
sp<ANativeWindow> anw;
if ((anw = getNativeWindowFromTexture(env, surfaceTexture)) == NULL) {
ALOGE("%s: Could not retrieve native window from SurfaceTexture.", __FUNCTION__);
return BAD_VALUE;
}
int32_t dimenBuf[2];
status_t err = anw->query(anw.get(), NATIVE_WINDOW_WIDTH, dimenBuf);
if(err != NO_ERROR) {
ALOGE("%s: Error while querying SurfaceTexture width %s (%d)", __FUNCTION__,
strerror(-err), err);
return err;
}
err = anw->query(anw.get(), NATIVE_WINDOW_HEIGHT, dimenBuf + 1);
if(err != NO_ERROR) {
ALOGE("%s: Error while querying SurfaceTexture height %s (%d)", __FUNCTION__,
strerror(-err), err);
return err;
}
env->SetIntArrayRegion(dimens, /*start*/0, /*length*/ARRAY_SIZE(dimenBuf), dimenBuf);
if (env->ExceptionCheck()) {
return BAD_VALUE;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeConnectSurface(JNIEnv* env, jobject thiz, jobject surface) {
ALOGV("nativeConnectSurface");
sp<Surface> s;
if ((s = getSurface(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve surface.", __FUNCTION__);
return BAD_VALUE;
}
status_t err = connectSurface(s, CAMERA_DEVICE_BUFFER_SLACK);
if (err != NO_ERROR) {
ALOGE("%s: Error while configuring surface %s (%d).", __FUNCTION__, strerror(-err), err);
return err;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeProduceFrame(JNIEnv* env, jobject thiz, jobject surface,
jbyteArray pixelBuffer, jint width, jint height, jint pixelFormat) {
ALOGV("nativeProduceFrame");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
if (pixelBuffer == NULL) {
jniThrowNullPointerException(env, "pixelBuffer");
return DONT_CARE;
}
int32_t bufSize = static_cast<int32_t>(env->GetArrayLength(pixelBuffer));
jbyte* pixels = env->GetByteArrayElements(pixelBuffer, /*is_copy*/NULL);
if (pixels == NULL) {
jniThrowNullPointerException(env, "pixels");
return DONT_CARE;
}
status_t err = produceFrame(anw, reinterpret_cast<uint8_t*>(pixels), width, height,
pixelFormat, bufSize);
env->ReleaseByteArrayElements(pixelBuffer, pixels, JNI_ABORT);
if (err != NO_ERROR) {
ALOGE("%s: Error while producing frame %s (%d).", __FUNCTION__, strerror(-err), err);
return err;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeSetSurfaceFormat(JNIEnv* env, jobject thiz, jobject surface,
jint pixelFormat) {
ALOGV("nativeSetSurfaceType");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
status_t err = native_window_set_buffers_format(anw.get(), pixelFormat);
if (err != NO_ERROR) {
ALOGE("%s: Error while setting surface format %s (%d).", __FUNCTION__, strerror(-err), err);
return err;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeSetSurfaceDimens(JNIEnv* env, jobject thiz, jobject surface,
jint width, jint height) {
ALOGV("nativeSetSurfaceDimens");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
// Set user dimensions only
// The producer dimensions are owned by GL
status_t err = native_window_set_buffers_user_dimensions(anw.get(), width, height);
if (err != NO_ERROR) {
ALOGE("%s: Error while setting surface user dimens %s (%d).", __FUNCTION__, strerror(-err),
err);
return err;
}
return NO_ERROR;
}
static jlong LegacyCameraDevice_nativeGetSurfaceId(JNIEnv* env, jobject thiz, jobject surface) {
ALOGV("nativeGetSurfaceId");
sp<Surface> s;
if ((s = getSurface(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native Surface from surface.", __FUNCTION__);
return 0;
}
sp<IGraphicBufferProducer> gbp = s->getIGraphicBufferProducer();
if (gbp == NULL) {
ALOGE("%s: Could not retrieve IGraphicBufferProducer from surface.", __FUNCTION__);
return 0;
}
sp<IBinder> b = IInterface::asBinder(gbp);
if (b == NULL) {
ALOGE("%s: Could not retrieve IBinder from surface.", __FUNCTION__);
return 0;
}
/*
* FIXME: Use better unique ID for surfaces than native IBinder pointer. Fix also in the camera
* service (CameraDeviceClient.h).
*/
return reinterpret_cast<jlong>(b.get());
}
static jint LegacyCameraDevice_nativeSetSurfaceOrientation(JNIEnv* env, jobject thiz,
jobject surface, jint facing, jint orientation) {
ALOGV("nativeSetSurfaceOrientation");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
status_t err = NO_ERROR;
CameraMetadata staticMetadata;
int32_t orientVal = static_cast<int32_t>(orientation);
uint8_t facingVal = static_cast<uint8_t>(facing);
staticMetadata.update(ANDROID_SENSOR_ORIENTATION, &orientVal, 1);
staticMetadata.update(ANDROID_LENS_FACING, &facingVal, 1);
int32_t transform = 0;
if ((err = CameraUtils::getRotationTransform(staticMetadata, /*out*/&transform)) != NO_ERROR) {
ALOGE("%s: Invalid rotation transform %s (%d)", __FUNCTION__, strerror(-err),
err);
return err;
}
ALOGV("%s: Setting buffer sticky transform to %d", __FUNCTION__, transform);
if ((err = native_window_set_buffers_sticky_transform(anw.get(), transform)) != NO_ERROR) {
ALOGE("%s: Unable to configure surface transform, error %s (%d)", __FUNCTION__,
strerror(-err), err);
return err;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeSetNextTimestamp(JNIEnv* env, jobject thiz, jobject surface,
jlong timestamp) {
ALOGV("nativeSetNextTimestamp");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
status_t err = NO_ERROR;
if ((err = native_window_set_buffers_timestamp(anw.get(), static_cast<int64_t>(timestamp))) !=
NO_ERROR) {
ALOGE("%s: Unable to set surface timestamp, error %s (%d)", __FUNCTION__, strerror(-err),
err);
return err;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeSetScalingMode(JNIEnv* env, jobject thiz, jobject surface,
jint mode) {
ALOGV("nativeSetScalingMode");
sp<ANativeWindow> anw;
if ((anw = getNativeWindow(env, surface)) == NULL) {
ALOGE("%s: Could not retrieve native window from surface.", __FUNCTION__);
return BAD_VALUE;
}
status_t err = NO_ERROR;
if ((err = native_window_set_scaling_mode(anw.get(), static_cast<int>(mode))) != NO_ERROR) {
ALOGE("%s: Unable to set surface scaling mode, error %s (%d)", __FUNCTION__,
strerror(-err), err);
return err;
}
return NO_ERROR;
}
static jint LegacyCameraDevice_nativeGetJpegFooterSize(JNIEnv* env, jobject thiz) {
ALOGV("nativeGetJpegFooterSize");
return static_cast<jint>(sizeof(struct camera3_jpeg_blob));
}
} // extern "C"
static const JNINativeMethod gCameraDeviceMethods[] = {
{ "nativeDetectSurfaceType",
"(Landroid/view/Surface;)I",
(void *)LegacyCameraDevice_nativeDetectSurfaceType },
{ "nativeDetectSurfaceDataspace",
"(Landroid/view/Surface;)I",
(void *)LegacyCameraDevice_nativeDetectSurfaceDataspace },
{ "nativeDetectSurfaceDimens",
"(Landroid/view/Surface;[I)I",
(void *)LegacyCameraDevice_nativeDetectSurfaceDimens },
{ "nativeConnectSurface",
"(Landroid/view/Surface;)I",
(void *)LegacyCameraDevice_nativeConnectSurface },
{ "nativeProduceFrame",
"(Landroid/view/Surface;[BIII)I",
(void *)LegacyCameraDevice_nativeProduceFrame },
{ "nativeSetSurfaceFormat",
"(Landroid/view/Surface;I)I",
(void *)LegacyCameraDevice_nativeSetSurfaceFormat },
{ "nativeSetSurfaceDimens",
"(Landroid/view/Surface;II)I",
(void *)LegacyCameraDevice_nativeSetSurfaceDimens },
{ "nativeGetSurfaceId",
"(Landroid/view/Surface;)J",
(void *)LegacyCameraDevice_nativeGetSurfaceId },
{ "nativeDetectTextureDimens",
"(Landroid/graphics/SurfaceTexture;[I)I",
(void *)LegacyCameraDevice_nativeDetectTextureDimens },
{ "nativeSetSurfaceOrientation",
"(Landroid/view/Surface;II)I",
(void *)LegacyCameraDevice_nativeSetSurfaceOrientation },
{ "nativeSetNextTimestamp",
"(Landroid/view/Surface;J)I",
(void *)LegacyCameraDevice_nativeSetNextTimestamp },
{ "nativeGetJpegFooterSize",
"()I",
(void *)LegacyCameraDevice_nativeGetJpegFooterSize },
{ "nativeDetectSurfaceUsageFlags",
"(Landroid/view/Surface;)I",
(void *)LegacyCameraDevice_nativeDetectSurfaceUsageFlags },
{ "nativeSetScalingMode",
"(Landroid/view/Surface;I)I",
(void *)LegacyCameraDevice_nativeSetScalingMode },
{ "nativeDisconnectSurface",
"(Landroid/view/Surface;)I",
(void *)LegacyCameraDevice_nativeDisconnectSurface },
};
// Get all the required offsets in java class and register native functions
int register_android_hardware_camera2_legacy_LegacyCameraDevice(JNIEnv* env)
{
// Register native functions
return RegisterMethodsOrDie(env,
CAMERA_DEVICE_CLASS_NAME,
gCameraDeviceMethods,
NELEM(gCameraDeviceMethods));
}
| [
"xiangchunhua8888@163.com"
] | xiangchunhua8888@163.com |
bc0b5fb2921833ec34fad9ba1af60d8cb87d43b1 | b1d02643a70ce076f167a84eb1ff36bfcdb5b704 | /e/time.h | ff0fd4006f0a49da19279ae4f58926109ea4acdb | [] | no_license | cnangel/libe | b534b90c8710243f37f407b360200bb215572df3 | 9e2c6af24b4ca5b388243af882ea8fdbb8a0583b | refs/heads/master | 2021-01-20T18:43:30.808316 | 2016-05-30T09:36:31 | 2016-05-30T09:36:31 | 59,999,009 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,723 | h | // Copyright (c) 2011, Robert Escriva
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of this project 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 OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef e_time_h_
#define e_time_h_
// C
#include <stdint.h>
namespace e
{
uint64_t
time();
} // namespace e
#endif // e_time_h_
| [
"cnangel@gmail.com"
] | cnangel@gmail.com |
24ad28795c3e5c26021ecba8228850c23bf5321a | e8a7ceb8962d118a5dd816ac14b1e3c94e5c7f8b | /spepcpp/src/spep/ipc/Engine.cpp | bdd8c4dcfd10786c527c57557791e10007049dae | [
"Apache-2.0"
] | permissive | axilotl/esoeproject | dcfa73cb10b3977728fe2a76f24417837614a3b0 | 42348b232559a5013314863dc506948c2353f0e8 | refs/heads/master | 2020-12-25T00:09:23.529134 | 2012-02-13T05:13:04 | 2012-02-13T05:13:04 | 1,539,359 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,306 | cpp | /* Copyright 2006-2007, Queensland University of Technology
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*
* Author: Shaun Mangelsdorf
* Creation Date: 07/03/2007
*
* Purpose: Implements the non-templated methods of spep::ipc::Engine.
*/
#include "spep/ipc/Engine.h"
spep::ipc::MessageHeader spep::ipc::Engine::getRequestHeader()
{
MessageHeader requestHeader;
getObject(requestHeader);
return requestHeader;
}
void spep::ipc::Engine::sendErrorResponseHeader()
{
MessageHeader responseHeader( SPEPIPC_RESPONSE_ERROR, std::string() );
_archive.out() << responseHeader;
}
void spep::ipc::Engine::sendResponseHeader()
{
MessageHeader responseHeader( SPEPIPC_RESPONSE, std::string() );
_archive.out() << responseHeader;
}
| [
"s.mangelsdorf@gmail.com"
] | s.mangelsdorf@gmail.com |
bf9e7bfe7409151ecd76df7a38451d06befb68db | afef6fbfdc966ef99b1a5fe670d7221bbf825639 | /intersections/intersectionkdtreegeometrymedian.cpp | 5f53418c1d5c4088f241e05e433468a2736ba88a | [] | no_license | poechsel/raytracer | 3886a3b3f7cbb088aae78da9b8089eac5b661319 | 31c49f6b0688ae6cf01289602184dd255d92d449 | refs/heads/master | 2021-07-03T00:41:40.323621 | 2017-09-23T21:25:50 | 2017-09-23T21:25:50 | 104,599,919 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,332 | cpp | #include "intersectionkdtreegeometrymedian.h"
IntersectionKdTreeGeometryMedian::IntersectionKdTreeGeometryMedian(Scene *scene,
bool a):
IntersectionKdTree(scene, a)
{
//ctor
}
SplitPlane IntersectionKdTreeGeometryMedian::heuristic(BoundingBox &bb,
std::vector<uint> &T,
uint depth)
{
//std::cout<<T.size()<<"\n";
SplitPlane plane;
if (depth%3 == 0) {
plane.axis = X;
plane.pos = (bb.M.x - bb.m.x) * 0.5 + bb.m.x;
} else if (depth%3 == 1) {
plane.axis = Y;
plane.pos = (bb.M.y - bb.m.y) * 0.5 + bb.m.y;
} else {
plane.axis = Z;
plane.pos = (bb.M.z - bb.m.z) * 0.5 + bb.m.z;
}
std::vector<Real> temp;
for (uint t: T) {
Triangle &tri = _scene->triangles[t];
BoundingBox tri_bb (_scene, &tri);
tri_bb.clip(bb);
temp.push_back(tri_bb.getCenter()[plane.axis]);
}
std::nth_element(temp.begin(), temp.begin()+temp.size() / 2, temp.end());
if (temp.size())
plane.pos = temp[temp.size()/2];
plane.side = BOTH;
return plane;
}
IntersectionKdTreeGeometryMedian::~IntersectionKdTreeGeometryMedian()
{
//dtor
}
| [
"pierre.oechsel@gmail.com"
] | pierre.oechsel@gmail.com |
92eac32f9362139f98ca92273c5b56c18c748f61 | 5031748db8679263b080e625bcd71b8324dc2e45 | /polymorphism_virtual/source/static_local_obj.h | 8052068ed7be2b7b2cfcd91284bece6fd6c78a7d | [] | no_license | MingYueRuYa/cpp_inside_object | d9e40092a6e4f39a2d89ed61287958903a9e2788 | a142c27de275e994333e60434f92c170640ca842 | refs/heads/master | 2021-06-09T16:25:58.594969 | 2021-05-23T04:38:50 | 2021-05-23T04:38:50 | 180,293,312 | 2 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 860 | h | /****************************************************************************
**
** Copyright (C) 2019 635672377@qq.com
** All rights reserved.
**
****************************************************************************/
#ifndef static_local_obj_h
#define static_local_obj_h
#include <Windows.h>
#include <iostream>
#include <thread>
using std::cout;
using std::endl;
using std::thread;
namespace static_local_obj
{
class Obj
{
public:
Obj() { ++number; }
int number = 0;
};
void static_local_obj()
{
static Obj obj;
obj.number = 1;
cout << obj.number << endl;
}
void test_static_local_obj()
{
// for (;;) {
// Sleep(5000);
// for (int i = 0; i < 10; ++i) {
// thread t1(static_local_obj);
// t1.detach();
// }
// }
static_local_obj();
}
}
#endif // virtual_fun_table_h
| [
"liushixiong@flash.cn"
] | liushixiong@flash.cn |
fcb02db4a7cc309e81b6c76bd0b5b5913660dc50 | b1905a6fff073d63ca9a9f93475d35758b5a9c76 | /src/names/mempool.cpp | c27060d4dc725ff53ea1de4cba4eb5a1a36d90d7 | [
"MIT"
] | permissive | transferdeer/namecoin-core | 3800be405bb4ee7536a571040a6b73f92c1a8d91 | d42521bf1364dac0efa6b38b1355dd13a8298207 | refs/heads/master | 2023-05-29T13:10:02.092814 | 2021-06-07T08:23:28 | 2021-06-07T08:23:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,915 | cpp | // Copyright (c) 2014-2021 Daniel Kraft
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <names/mempool.h>
#include <coins.h>
#include <logging.h>
#include <names/encoding.h>
#include <script/names.h>
#include <txmempool.h>
#include <util/strencodings.h>
#include <validation.h>
/* ************************************************************************** */
unsigned
CNameMemPool::pendingChainLength (const valtype& name) const
{
unsigned res = 0;
if (registersName (name))
++res;
const auto mit = updates.find (name);
if (mit != updates.end ())
res += mit->second.size ();
return res;
}
namespace
{
/**
* Returns the outpoint matching the name operation in a given mempool tx, if
* there is any. The txid must be for an entry in the mempool.
*/
COutPoint
getNameOutput (const CTxMemPool& pool, const uint256& txid)
{
AssertLockHeld (pool.cs);
const auto mit = pool.mapTx.find (txid);
assert (mit != pool.mapTx.end ());
const auto& vout = mit->GetTx ().vout;
for (unsigned i = 0; i != vout.size (); ++i)
{
const CNameScript nameOp(vout[i].scriptPubKey);
if (nameOp.isNameOp ())
return COutPoint (txid, i);
}
return COutPoint ();
}
} // anonymous namespace
COutPoint
CNameMemPool::lastNameOutput (const valtype& name) const
{
const auto itUpd = updates.find (name);
if (itUpd != updates.end ())
{
/* From all the pending updates, we have to find the last one. This is
the unique outpoint that is not also spent by some other transaction.
Thus, we keep track of all the transactions spent as well, and then
remove those from the sets of candidates. Doing so by txid (rather
than outpoint) is enough, as those transactions must be in a "chain"
anyway. */
const std::set<uint256>& candidateTxids = itUpd->second;
std::set<uint256> spentTxids;
for (const auto& txid : candidateTxids)
{
const auto mit = pool.mapTx.find (txid);
assert (mit != pool.mapTx.end ());
for (const auto& in : mit->GetTx ().vin)
spentTxids.insert (in.prevout.hash);
}
COutPoint res;
for (const auto& txid : candidateTxids)
{
if (spentTxids.count (txid) > 0)
continue;
assert (res.IsNull ());
res = getNameOutput (pool, txid);
}
assert (!res.IsNull ());
return res;
}
const auto itReg = mapNameRegs.find (name);
if (itReg != mapNameRegs.end ())
return getNameOutput (pool, itReg->second);
return COutPoint ();
}
void
CNameMemPool::addUnchecked (const CTxMemPoolEntry& entry)
{
AssertLockHeld (pool.cs);
const uint256& txHash = entry.GetTx ().GetHash ();
if (entry.isNameNew ())
{
const valtype& newHash = entry.getNameNewHash ();
const auto mit = mapNameNews.find (newHash);
if (mit != mapNameNews.end ())
assert (mit->second == txHash);
else
mapNameNews.insert (std::make_pair (newHash, txHash));
}
if (entry.isNameRegistration ())
{
const valtype& name = entry.getName ();
assert (mapNameRegs.count (name) == 0);
mapNameRegs.insert (std::make_pair (name, txHash));
}
if (entry.isNameUpdate ())
{
const valtype& name = entry.getName ();
const auto mit = updates.find (name);
if (mit == updates.end ())
updates.emplace (name, std::set<uint256> ({txHash}));
else
mit->second.insert (txHash);
}
}
void
CNameMemPool::remove (const CTxMemPoolEntry& entry)
{
AssertLockHeld (pool.cs);
if (entry.isNameRegistration ())
{
const auto mit = mapNameRegs.find (entry.getName ());
assert (mit != mapNameRegs.end ());
mapNameRegs.erase (mit);
}
if (entry.isNameUpdate ())
{
const auto itName = updates.find (entry.getName ());
assert (itName != updates.end ());
auto& txids = itName->second;
const auto itTxid = txids.find (entry.GetTx ().GetHash ());
assert (itTxid != txids.end ());
txids.erase (itTxid);
if (txids.empty ())
updates.erase (itName);
}
}
void
CNameMemPool::removeConflicts (const CTransaction& tx)
{
AssertLockHeld (pool.cs);
if (!tx.IsNamecoin ())
return;
for (const auto& txout : tx.vout)
{
const CNameScript nameOp(txout.scriptPubKey);
if (nameOp.isNameOp () && nameOp.getNameOp () == OP_NAME_FIRSTUPDATE)
{
const valtype& name = nameOp.getOpName ();
const auto mit = mapNameRegs.find (name);
if (mit != mapNameRegs.end ())
{
const auto mit2 = pool.mapTx.find (mit->second);
assert (mit2 != pool.mapTx.end ());
pool.removeRecursive (mit2->GetTx (),
MemPoolRemovalReason::NAME_CONFLICT);
}
}
}
}
void
CNameMemPool::removeUnexpireConflicts (const std::set<valtype>& unexpired)
{
AssertLockHeld (pool.cs);
for (const auto& name : unexpired)
{
LogPrint (BCLog::NAMES, "unexpired: %s, mempool: %u\n",
EncodeNameForMessage (name), mapNameRegs.count (name));
const auto mit = mapNameRegs.find (name);
if (mit != mapNameRegs.end ())
{
const CTxMemPool::txiter mit2 = pool.mapTx.find (mit->second);
assert (mit2 != pool.mapTx.end ());
pool.removeRecursive (mit2->GetTx (),
MemPoolRemovalReason::NAME_CONFLICT);
}
}
}
void
CNameMemPool::removeExpireConflicts (const std::set<valtype>& expired)
{
AssertLockHeld (pool.cs);
for (const auto& name : expired)
{
LogPrint (BCLog::NAMES, "expired: %s\n", EncodeNameForMessage (name));
const auto mit = updates.find (name);
if (mit == updates.end ())
continue;
/* We need to make sure that we keep our copy of txids even when the
transactions are removed one by one. */
const std::set<uint256> txidsCopy = mit->second;
for (const auto& txid : txidsCopy)
{
const CTxMemPool::txiter mit2 = pool.mapTx.find (txid);
assert (mit2 != pool.mapTx.end ());
pool.removeRecursive (mit2->GetTx (),
MemPoolRemovalReason::NAME_CONFLICT);
}
assert (updates.count (name) == 0);
}
}
void
CNameMemPool::check (ChainstateManager& chainman, CChainState& active_chainstate) const
{
AssertLockHeld (pool.cs);
const auto& coins = active_chainstate.CoinsTip ();
const uint256 blockHash = coins.GetBestBlock ();
int nHeight;
if (blockHash.IsNull())
nHeight = 0;
else
nHeight = chainman.BlockIndex ().find (blockHash)->second->nHeight;
std::set<valtype> nameRegs;
std::map<valtype, unsigned> nameUpdates;
for (const auto& entry : pool.mapTx)
{
const uint256 txHash = entry.GetTx ().GetHash ();
if (entry.isNameNew ())
{
const valtype& newHash = entry.getNameNewHash ();
const auto mit = mapNameNews.find (newHash);
assert (mit != mapNameNews.end ());
assert (mit->second == txHash);
}
if (entry.isNameRegistration ())
{
const valtype& name = entry.getName ();
const auto mit = mapNameRegs.find (name);
assert (mit != mapNameRegs.end ());
assert (mit->second == txHash);
assert (nameRegs.count (name) == 0);
nameRegs.insert (name);
/* The old name should be expired already. Note that we use
nHeight+1 for the check, because that's the height at which
the mempool tx will actually be mined. */
CNameData data;
if (coins.GetName (name, data))
assert (data.isExpired (nHeight + 1));
}
if (entry.isNameUpdate ())
{
const valtype& name = entry.getName ();
const auto mit = updates.find (name);
assert (mit != updates.end ());
assert (mit->second.count (txHash) > 0);
++nameUpdates[name];
/* As above, use nHeight+1 for the expiration check. */
CNameData data;
if (coins.GetName (name, data))
assert (!data.isExpired (nHeight + 1));
else
assert (registersName (name));
}
}
assert (nameRegs.size () == mapNameRegs.size ());
assert (nameUpdates.size () == updates.size ());
for (const auto& upd : nameUpdates)
assert (updates.at (upd.first).size () == upd.second);
}
bool
CNameMemPool::checkTx (const CTransaction& tx) const
{
AssertLockHeld (pool.cs);
if (!tx.IsNamecoin ())
return true;
for (const auto& txout : tx.vout)
{
const CNameScript nameOp(txout.scriptPubKey);
if (!nameOp.isNameOp ())
continue;
switch (nameOp.getNameOp ())
{
case OP_NAME_NEW:
{
const valtype& newHash = nameOp.getOpHash ();
std::map<valtype, uint256>::const_iterator mi;
mi = mapNameNews.find (newHash);
if (mi != mapNameNews.end () && mi->second != tx.GetHash ())
return false;
break;
}
case OP_NAME_FIRSTUPDATE:
{
const valtype& name = nameOp.getOpName ();
if (registersName (name))
return false;
break;
}
case OP_NAME_UPDATE:
/* Multiple updates of the same name in a chain are perfectly fine.
The main mempool logic takes care that updates are ordered
properly and really a chain, as this is automatic due to the
coloured-coin nature of names. */
break;
default:
assert (false);
}
}
return true;
}
| [
"d@domob.eu"
] | d@domob.eu |
93bce8db60f0b5c5f6a547f18e5ea477664bb386 | 363ed21924ca293ce9f7a375840eb70a0d1900a4 | /utility/geoip/geoip_deprecated.cpp | 187e09eb07faf603fc070fab1234e9a6b2214c6f | [] | no_license | voseventosixm/porchswingchair | a4577227a93fb941ddb14ff3587772f488249c2e | 6bc4466d8522612cbac069fa28fdc00f33246ce2 | refs/heads/master | 2021-01-23T08:15:22.607557 | 2017-03-28T17:28:26 | 2017-03-28T17:28:26 | 86,490,216 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,538 | cpp |
#include "geoip_internal.h"
char *
GeoIP_org_by_ipnum(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return GeoIP_name_by_ipnum_gl(gi, ipnum, &gl);
}
char *
GeoIP_org_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return GeoIP_name_by_ipnum_v6_gl(gi, ipnum, &gl);
}
char *
GeoIP_org_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_name_by_addr_gl(gi, addr, &gl);
}
char *
GeoIP_org_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_name_by_addr_v6_gl(gi, addr, &gl);
}
char *
GeoIP_org_by_name(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_name_by_name_gl(gi, name, &gl);
}
char *
GeoIP_org_by_name_v6(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_name_by_name_v6_gl(gi, name, &gl);
}
int
GeoIP_last_netmask(GeoIP * gi)
{
return gi->netmask;
}
unsigned int
_GeoIP_seek_record_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return _GeoIP_seek_record_v6_gl(gi, ipnum, &gl);
}
unsigned int
_GeoIP_seek_record(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return _GeoIP_seek_record_gl(gi, ipnum, &gl);
}
const char *
GeoIP_country_code_by_name_v6(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_country_code_by_name_v6_gl(gi, name, &gl);
}
const char *
GeoIP_country_code_by_name(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_country_code_by_name_gl(gi, name, &gl);
}
const char *
GeoIP_country_code3_by_name_v6(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_country_code3_by_name_v6_gl(gi, name, &gl);
}
const char *
GeoIP_country_code3_by_name(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_country_code3_by_name_gl(gi, name, &gl);
}
const char *
GeoIP_country_name_by_name_v6(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_country_name_by_name_v6_gl(gi, name, &gl);
}
const char *
GeoIP_country_name_by_name(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_country_name_by_name_gl(gi, name, &gl);
}
int
GeoIP_id_by_name(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_id_by_name_gl(gi, name, &gl);
}
int
GeoIP_id_by_name_v6(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_id_by_name_v6_gl(gi, name, &gl);
}
const char *
GeoIP_country_code_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_country_code_by_addr_v6_gl(gi, addr, &gl);
}
const char *
GeoIP_country_code_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_country_code_by_addr_gl(gi, addr, &gl);
}
const char *
GeoIP_country_code3_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_country_code3_by_addr_v6_gl(gi, addr, &gl);
}
const char *
GeoIP_country_code3_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_country_code3_by_addr_gl(gi, addr, &gl);
}
const char *
GeoIP_country_name_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_country_name_by_addr_v6_gl(gi, addr, &gl);
}
const char *
GeoIP_country_name_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_country_name_by_addr_gl(gi, addr, &gl);
}
const char *
GeoIP_country_name_by_ipnum(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return GeoIP_country_name_by_ipnum_gl(gi, ipnum, &gl);
}
const char *
GeoIP_country_name_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return GeoIP_country_name_by_ipnum_v6_gl(gi, ipnum, &gl);
}
const char *
GeoIP_country_code_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return GeoIP_country_code_by_ipnum_v6_gl(gi, ipnum, &gl);
}
const char *
GeoIP_country_code_by_ipnum(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return GeoIP_country_code_by_ipnum_gl(gi, ipnum, &gl);
}
const char *
GeoIP_country_code3_by_ipnum(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return GeoIP_country_code3_by_ipnum_gl(gi, ipnum, &gl);
}
const char *
GeoIP_country_code3_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return GeoIP_country_code3_by_ipnum_v6_gl(gi, ipnum, &gl);
}
int
GeoIP_country_id_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_id_by_addr_v6_gl(gi, addr, &gl);
}
int
GeoIP_country_id_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_id_by_addr_gl(gi, addr, &gl);
}
int
GeoIP_country_id_by_name_v6(GeoIP * gi, const char *host)
{
GeoIPLookup gl;
return GeoIP_id_by_name_v6_gl(gi, host, &gl);
}
int
GeoIP_country_id_by_name(GeoIP * gi, const char *host)
{
GeoIPLookup gl;
return GeoIP_id_by_name_gl(gi, host, &gl);
}
int
GeoIP_id_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_id_by_addr_v6_gl(gi, addr, &gl);
}
int
GeoIP_id_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_id_by_addr_gl(gi, addr, &gl);
}
int
GeoIP_id_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return GeoIP_id_by_ipnum_v6_gl(gi, ipnum, &gl);
}
int
GeoIP_id_by_ipnum(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return GeoIP_id_by_ipnum_gl(gi, ipnum, &gl);
}
void
GeoIP_assign_region_by_inetaddr(GeoIP * gi, unsigned long inetaddr,
GeoIPRegion * region)
{
GeoIPLookup gl;
GeoIP_assign_region_by_inetaddr_gl(gi, inetaddr, region, &gl);
}
void
GeoIP_assign_region_by_inetaddr_v6(GeoIP * gi, geoipv6_t inetaddr,
GeoIPRegion * region)
{
GeoIPLookup gl;
GeoIP_assign_region_by_inetaddr_v6_gl(gi, inetaddr, region, &gl);
}
GeoIPRegion *
GeoIP_region_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_region_by_addr_gl(gi, addr, &gl);
}
GeoIPRegion *
GeoIP_region_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_region_by_addr_v6_gl(gi, addr, &gl);
}
GeoIPRegion *
GeoIP_region_by_name(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_region_by_name_gl(gi, name, &gl);
}
GeoIPRegion *
GeoIP_region_by_name_v6(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_region_by_name_v6_gl(gi, name, &gl);
}
GeoIPRegion *
GeoIP_region_by_ipnum(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return GeoIP_region_by_ipnum_gl(gi, ipnum, &gl);
}
GeoIPRegion *
GeoIP_region_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return GeoIP_region_by_ipnum_v6_gl(gi, ipnum, &gl);
}
char **
GeoIP_range_by_ip(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_range_by_ip_gl(gi, addr, &gl);
}
char *
GeoIP_name_by_ipnum(GeoIP * gi, unsigned long ipnum)
{
GeoIPLookup gl;
return GeoIP_name_by_ipnum_gl(gi, ipnum, &gl);
}
char *
GeoIP_name_by_ipnum_v6(GeoIP * gi, geoipv6_t ipnum)
{
GeoIPLookup gl;
return GeoIP_name_by_ipnum_v6_gl(gi, ipnum, &gl);
}
char *
GeoIP_name_by_addr(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_name_by_addr_gl(gi, addr, &gl);
}
char *
GeoIP_name_by_addr_v6(GeoIP * gi, const char *addr)
{
GeoIPLookup gl;
return GeoIP_name_by_addr_v6_gl(gi, addr, &gl);
}
char *
GeoIP_name_by_name(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_name_by_name_gl(gi, name, &gl);
}
char *
GeoIP_name_by_name_v6(GeoIP * gi, const char *name)
{
GeoIPLookup gl;
return GeoIP_name_by_name_v6_gl(gi, name, &gl);
}
| [
"zhouyu2410@gmail.com"
] | zhouyu2410@gmail.com |
94a434f969372b613b73094534ce370f783953bc | 85515970843a39d6ddae0476320c4027aa050e49 | /iptux0.5.3/src/SendFileData.cpp | e1c1843423a141f483d700a4764ebd62485390ed | [] | no_license | zzqhost/iptux | ed0ddea05e0ca7bb683e878d97ab4710c4baba21 | 48a722ea8d76f0df83e69e4e5b5cd2f2b2cc8800 | refs/heads/master | 2020-05-26T21:50:08.358593 | 2013-04-09T07:44:21 | 2013-04-09T07:44:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 16,131 | cpp | //
// C++ Implementation: SendFileData
//
// Description:
//
//
// Author: Jally <jallyx@163.com>, (C) 2009
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "SendFileData.h"
#include "ProgramData.h"
#include "MainWindow.h"
#include "LogSystem.h"
#include "SoundSystem.h"
#include "AnalogFS.h"
#include "wrapper.h"
#include "utils.h"
extern ProgramData progdt;
extern MainWindow mwin;
extern LogSystem lgsys;
extern SoundSystem sndsys;
/**
* 类构造函数.
* @param sk tcp socket
* @param fl 文件信息数据
*/
SendFileData::SendFileData(int sk, FileInfo *fl):sock(sk), file(fl), para(NULL),
terminate(false), sumsize(0)
{
g_datalist_init(¶);
gettimeofday(&tasktime, NULL);
/* gettimeofday(&filetime, NULL);//个人感觉没必要 */
}
/**
* 类析构函数.
*/
SendFileData::~SendFileData()
{
g_datalist_clear(¶);
}
/**
* 发送文件数据入口.
*/
void SendFileData::SendFileDataEntry()
{
/* 创建UI参考数据,并将数据主动加入UI */
gdk_threads_enter();
CreateUIPara();
mwin.UpdateItemToTransTree(¶);
if (FLAG_ISSET(progdt.flags, 5))
mwin.OpenTransWindow();
gdk_threads_leave();
/* 分类处理 */
switch (GET_MODE(file->fileattr)) {
case IPMSG_FILE_REGULAR:
SendRegularFile();
break;
case IPMSG_FILE_DIR:
SendDirFiles();
break;
default:
break;
}
/* 主动更新UI */
gdk_threads_enter();
UpdateUIParaToOver();
mwin.UpdateItemToTransTree(¶);
gdk_threads_leave();
/* 处理成功则播放提示音 */
if (!terminate && FLAG_ISSET(progdt.sndfgs, 2))
sndsys.Playing(progdt.transtip);
}
/**
* 获取UI参考数据.
* @return UI参考数据
*/
GData **SendFileData::GetTransFilePara()
{
return ¶
}
/**
* 终止过程处理.
*/
void SendFileData::TerminateTrans()
{
terminate = true;
}
/**
* 创建UI参考数据.
*/
void SendFileData::CreateUIPara()
{
GtkIconTheme *theme;
GdkPixbuf *pixbuf;
struct in_addr addr;
theme = gtk_icon_theme_get_default();
if ((pixbuf = gtk_icon_theme_load_icon(theme, "tip-send",
MAX_ICONSIZE,
GtkIconLookupFlags(0), NULL)))
g_datalist_set_data_full(¶, "status", pixbuf,
GDestroyNotify(g_object_unref));
g_datalist_set_data(¶, "task", (gpointer)(_("send")));
g_datalist_set_data_full(¶, "peer", g_strdup(file->fileown->name),
GDestroyNotify(g_free));
addr.s_addr = file->fileown->ipv4;
g_datalist_set_data_full(¶, "ip", g_strdup(inet_ntoa(addr)),
GDestroyNotify(g_free));
g_datalist_set_data_full(¶, "filename",
ipmsg_get_filename_me(file->filepath, NULL),
GDestroyNotify(g_free));
g_datalist_set_data_full(¶, "filelength",
numeric_to_size(file->filesize),
GDestroyNotify(g_free));
g_datalist_set_data(¶, "finishlength", (gpointer)("0B"));
g_datalist_set_data(¶, "progress", GINT_TO_POINTER(0));
g_datalist_set_data(¶, "pro-text", (gpointer)("0.0%"));
g_datalist_set_data(¶, "cost", (gpointer)("00:00:00"));
g_datalist_set_data(¶, "remain", (gpointer)(_("unknown")));
g_datalist_set_data(¶, "rate", (gpointer)("0B/s"));
g_datalist_set_data(¶, "data", this);
}
/**
* 发送常规文件.
*/
void SendFileData::SendRegularFile()
{
int64_t finishsize;
int fd;
/* 打开文件 */
if ((fd = open(file->filepath, O_RDONLY | O_LARGEFILE)) == -1) {
terminate = true; //标记处理过程失败
return;
}
/* 发送文件数据 */
gettimeofday(&filetime, NULL);
finishsize = SendData(fd, file->filesize);
close(fd);
sumsize += finishsize;
/* 考察处理结果 */
if (finishsize < file->filesize) {
terminate = true;
lgsys.SystemLog(_("Failed to send the file \"%s\" to %s!"),
file->filepath, file->fileown->name);
} else {
lgsys.SystemLog(_("Send the file \"%s\" to %s successfully!"),
file->filepath, file->fileown->name);
}
}
/**
* 发送目录文件.
*/
void SendFileData::SendDirFiles()
{
AnalogFS afs;
GQueue dirstack = G_QUEUE_INIT;
struct stat64 st;
struct dirent *dirt, vdirt;
DIR *dir;
gchar *dirname, *pathname, *filename;
int64_t finishsize;
uint32_t headsize;
int fd;
bool result;
/* 转到上传目录位置 */
dirname = ipmsg_get_filename_me(file->filepath, &pathname);
afs.chdir(pathname);
g_free(pathname);
strcpy(vdirt.d_name, dirname);
dirt = &vdirt;
g_free(dirname);
result = false; //预设任务处理失败
dir = NULL; //预设当前目录流无效
goto start;
while (!g_queue_is_empty(&dirstack)) {
/* 取出最后一次压入堆栈的目录流 */
dir = (DIR *)g_queue_pop_head(&dirstack);
/* 发送目录流中的下属数据 */
while (dir && (dirt = readdir(dir))) {
if (strcmp(dirt->d_name, ".") == 0
|| strcmp(dirt->d_name, "..") == 0)
continue;
/* 检查文件是否可用 */
start: if (afs.stat(dirt->d_name, &st) == -1
|| !(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode)))
continue;
/* 更新UI参考值 */
g_datalist_set_data_full(¶, "filename",
g_strdup(dirt->d_name),
GDestroyNotify(g_free));
g_datalist_set_data_full(¶, "filelength",
numeric_to_size(st.st_size),
GDestroyNotify(g_free));
g_datalist_set_data(¶, "finishlength", (gpointer)("0B"));
g_datalist_set_data(¶, "progress", GINT_TO_POINTER(0));
g_datalist_set_data(¶, "pro-text", (gpointer)("0.0%"));
g_datalist_set_data(¶, "cost", (gpointer)("00:00:00"));
g_datalist_set_data(¶, "remain", (gpointer)(_("unknown")));
g_datalist_set_data(¶, "rate", (gpointer)("0B/s"));
/* 转码 */
if (strcasecmp(file->fileown->encode, "utf-8") != 0
&& (filename = convert_encode(dirt->d_name,
file->fileown->encode, "utf-8"))) {
dirname = ipmsg_get_filename_pal(filename);
g_free(filename);
} else
dirname = ipmsg_get_filename_pal(dirt->d_name);
/* 构造数据头并发送 */
snprintf(buf, MAX_SOCKLEN, "0000:%s:%.9" PRIx64 ":%lx:%lx=%lx:%lx=%lx:",
dirname, S_ISREG(st.st_mode) ? st.st_size :0,
S_ISREG(st.st_mode) ? IPMSG_FILE_REGULAR : IPMSG_FILE_DIR,
IPMSG_FILE_MTIME,st.st_mtime,IPMSG_FILE_CREATETIME,st.st_ctime);
g_free(dirname);
headsize = strlen(buf);
snprintf(buf, MAX_SOCKLEN, "%.4" PRIx32, headsize);
*(buf + 4) = ':';
if (xwrite(sock, buf, headsize) == -1)
goto end;
/* 选择处理方案 */
gettimeofday(&filetime, NULL);
if (S_ISREG(st.st_mode)) { //常规文件
if ((fd = afs.open(dirt->d_name, O_RDONLY |
O_LARGEFILE)) == -1)
goto end;
finishsize = SendData(fd, st.st_size);
close(fd);
if (finishsize < st.st_size)
goto end;
sumsize += finishsize;
} else if (S_ISDIR(st.st_mode)) { //目录文件
if (dir) //若当前目录流有效则须压入堆栈
g_queue_push_head(&dirstack, dir);
/* 打开下属目录 */
if (!(dir = afs.opendir(dirt->d_name)))
goto end;
/* 本地端也须转至下属目录 */
afs.chdir(dirt->d_name);
}
}
/* 目录流有效才可向上转 */
if (dir) {
/* 关闭当前操作的目录流 */
closedir(dir);
dir = NULL;
/* 构造向上转的数据头并发送 */
snprintf(buf, MAX_SOCKLEN, "0000:.:0:%lx:%lx=%lx:%lx=%lx:", IPMSG_FILE_RETPARENT,
IPMSG_FILE_MTIME,st.st_mtime,IPMSG_FILE_CREATETIME,st.st_ctime);
headsize = strlen(buf);
snprintf(buf, MAX_SOCKLEN, "%.4" PRIx32, headsize);
*(buf + 4) = ':';
if (xwrite(sock, buf, headsize) == -1)
goto end;
/* 本地端也须向上转一层 */
afs.chdir("..");
}
}
result = true;
/* 考察处理结果 */
end: if (!result) {
/* 若当前目录流有效,则必须关闭 */
if (dir)
closedir(dir);
/* 关闭堆栈中所有的目录流,并清空堆栈 */
g_queue_foreach(&dirstack, GFunc(closedir), NULL);
g_queue_clear(&dirstack);
lgsys.SystemLog(_("Failed to send the directory \"%s\" to %s!"),
file->filepath, file->fileown->name);
} else {
lgsys.SystemLog(_("Send the directory \"%s\" to %s successfully!"),
file->filepath, file->fileown->name);
}
}
/**
* 发送文件数据.
* @param fd file descriptor
* @param filesize 文件总长度
* @return 完成数据量
*/
int64_t SendFileData::SendData(int fd, int64_t filesize)
{
int64_t tmpsize, finishsize;
struct timeval val1, val2;
float difftime, progress;
uint32_t rate;
ssize_t size;
/* 如果文件长度为0,则无须再进一步处理 */
if (filesize == 0)
return 0;
tmpsize = finishsize = 0; //初始化已完成数据量
gettimeofday(&val1, NULL); //初始化起始时间
do {
/* 读取文件数据并发送 */
size = MAX_SOCKLEN < filesize - finishsize ? MAX_SOCKLEN :
filesize - finishsize;
if ((size = xread(fd, buf, MAX_SOCKLEN)) == -1)
return finishsize;
if (size > 0 && xwrite(sock, buf, size) == -1)
return finishsize;
finishsize += size;
/* 判断是否需要更新UI参考值 */
gettimeofday(&val2, NULL);
difftime = difftimeval(val2, val1);
if (difftime >= 1) {
/* 更新UI参考值 */
progress = percent(finishsize, filesize);
rate = (uint32_t)((finishsize - tmpsize) / difftime);
g_datalist_set_data_full(¶, "finishlength",
numeric_to_size(finishsize),
GDestroyNotify(g_free));
g_datalist_set_data(¶, "progress",
GINT_TO_POINTER(GINT(progress)));
g_datalist_set_data_full(¶, "pro-text",
g_strdup_printf("%.1f", progress),
GDestroyNotify(g_free));
g_datalist_set_data_full(¶, "cost", numeric_to_time(
(uint32_t)(difftimeval(val2, filetime))),
GDestroyNotify(g_free));
g_datalist_set_data_full(¶, "remain", numeric_to_time(
(uint32_t)((filesize - finishsize) / rate)),
GDestroyNotify(g_free));
g_datalist_set_data_full(¶, "rate",
numeric_to_rate(rate),
GDestroyNotify(g_free));
val1 = val2; //更新时间参考点
tmpsize = finishsize; //更新下载量
}
} while (!terminate && size && finishsize < filesize);
return finishsize;
}
/**
* 更新UI参考数据到任务结束.
*/
void SendFileData::UpdateUIParaToOver()
{
GtkIconTheme *theme;
GdkPixbuf *pixbuf;
struct timeval time;
const char *statusfile;
theme = gtk_icon_theme_get_default();
statusfile = terminate ? "tip-error" : "tip-finish";
if ( (pixbuf = gtk_icon_theme_load_icon(theme, statusfile, MAX_ICONSIZE,
GtkIconLookupFlags(0), NULL)))
g_datalist_set_data_full(¶, "status", pixbuf,
GDestroyNotify(g_object_unref));
if (!terminate && GET_MODE(file->fileattr) == IPMSG_FILE_DIR) {
g_datalist_set_data_full(¶, "filename",
ipmsg_get_filename_me(file->filepath, NULL),
GDestroyNotify(g_free));
g_datalist_set_data_full(¶, "filelength", numeric_to_size(sumsize),
GDestroyNotify(g_free));
}
if (!terminate) {
gettimeofday(&time, NULL);
g_datalist_set_data_full(¶, "finishlength", numeric_to_size(sumsize),
GDestroyNotify(g_free));
g_datalist_set_data(¶, "progress", GINT_TO_POINTER(100));
g_datalist_set_data(¶, "pro-text", (gpointer)("100%"));
g_datalist_set_data_full(¶, "cost", numeric_to_time(
(uint32_t)(difftimeval(time, tasktime))),
GDestroyNotify(g_free));
g_datalist_set_data(¶, "remain", NULL);
g_datalist_set_data(¶, "rate", NULL);
}
g_datalist_set_data(¶, "data", NULL);
}
| [
"b649@borqs.com"
] | b649@borqs.com |
bca7c2163b5e24c1392c716253f18bb4bdef6063 | 5363c29a3631ddf7739e03bce9f8eec7733300bf | /Reme/src/Reme/Events/ApplicationEvent.h | c699b598c22fac99955b147c10980ebe3e3e6f38 | [] | no_license | remtori/Reme | a6b8e3aa9c9785a6e0d11ba3f4b80a38cc7e3251 | ba85a9bf98dfb0ff553b470daf34ed807f30333a | refs/heads/master | 2021-02-17T14:49:12.409353 | 2020-04-27T02:48:38 | 2020-04-27T02:48:38 | 245,104,489 | 2 | 0 | null | 2020-04-27T02:48:39 | 2020-03-05T08:10:39 | C++ | UTF-8 | C++ | false | false | 1,284 | h | #pragma once
#include "Reme/Events/Event.h"
namespace Reme
{
class WindowResizeEvent : public Event
{
public:
WindowResizeEvent(unsigned int width, unsigned int height)
: m_Width(width), m_Height(height) {}
inline unsigned int GetWidth() const { return m_Width; }
inline unsigned int GetHeight() const { return m_Height; }
std::string ToString() const override
{
std::stringstream ss;
ss << "WindowResizeEvent: " << m_Width << ", " << m_Height;
return ss.str();
}
EVENT_CLASS_TYPE(WindowResize)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
private:
unsigned int m_Width, m_Height;
};
class WindowCloseEvent : public Event
{
public:
WindowCloseEvent() = default;
EVENT_CLASS_TYPE(WindowClose)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
class AppTickEvent : public Event
{
public:
AppTickEvent() = default;
EVENT_CLASS_TYPE(AppTick)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
class AppUpdateEvent : public Event
{
public:
AppUpdateEvent() = default;
EVENT_CLASS_TYPE(AppUpdate)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
class AppRenderEvent : public Event
{
public:
AppRenderEvent() = default;
EVENT_CLASS_TYPE(AppRender)
EVENT_CLASS_CATEGORY(EventCategoryApplication)
};
}
| [
"lqv.remtori@gmail.com"
] | lqv.remtori@gmail.com |
4cd32807cffd98f94f1276eee77893ee61de3e3b | 2f0c70013cb2e8f3815694ae75dd9b73fdf22d33 | /spectrum/models/genericE6SSM/genericE6SSM_two_scale_soft_beta_TYd.cpp | ff52d8cc917d9aa0a22a282839b612a222bbea22 | [] | no_license | azedarach/E6SSM-Tuning | 9d3e0fffb3fe5979b8735a2907219eb944fcfeae | 62f8050e814db2e4468b868cb31bcb63ee1dbda2 | refs/heads/master | 2021-05-31T00:07:01.359375 | 2016-01-03T22:34:23 | 2016-01-03T22:34:23 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,711 | cpp | // ====================================================================
// This file is part of FlexibleSUSY.
//
// FlexibleSUSY 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.
//
// FlexibleSUSY 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 FlexibleSUSY. If not, see
// <http://www.gnu.org/licenses/>.
// ====================================================================
// File generated at Sun 15 Jun 2014 19:16:29
#include "genericE6SSM_two_scale_soft_parameters.hpp"
#include "wrappers.hpp"
namespace flexiblesusy {
#define INPUT(parameter) input.parameter
#define TRACE_STRUCT soft_traces
/**
* Calculates the one-loop beta function of TYd.
*
* @return one-loop beta function
*/
Eigen::Matrix<double,3,3> genericE6SSM_soft_parameters::calc_beta_TYd_one_loop(const Soft_traces& soft_traces) const
{
const auto Qdp = INPUT(Qdp);
const auto QH1p = INPUT(QH1p);
const auto QQp = INPUT(QQp);
const double traceAdjYdTYd = TRACE_STRUCT.traceAdjYdTYd;
const double traceAdjYeTYe = TRACE_STRUCT.traceAdjYeTYe;
const double traceYdAdjYd = TRACE_STRUCT.traceYdAdjYd;
const double traceYeAdjYe = TRACE_STRUCT.traceYeAdjYe;
Eigen::Matrix<double,3,3> beta_TYd;
beta_TYd = oneOver16PiSqr*(3*traceYdAdjYd*TYd + traceYeAdjYe*TYd +
AbsSqr(Lambdax)*TYd - 0.4666666666666667*Sqr(g1)*TYd - 3*Sqr(g2)*TYd -
5.333333333333333*Sqr(g3)*TYd - 2*Sqr(gN)*Sqr(Qdp)*TYd - 2*Sqr(gN)*Sqr(
QH1p)*TYd - 2*Sqr(gN)*Sqr(QQp)*TYd + Yd*(6*traceAdjYdTYd + 2*
traceAdjYeTYe + 0.9333333333333333*MassB*Sqr(g1) + 6*MassWB*Sqr(g2) +
10.666666666666666*MassG*Sqr(g3) + 4*MassBp*Sqr(gN)*Sqr(Qdp) + 4*MassBp*
Sqr(gN)*Sqr(QH1p) + 4*MassBp*Sqr(gN)*Sqr(QQp) + 2*Conj(Lambdax)*TLambdax)
+ 4*(Yd*Yd.adjoint()*TYd) + 2*(Yd*Yu.adjoint()*TYu) + 5*(TYd*Yd.adjoint(
)*Yd) + TYd*Yu.adjoint()*Yu);
return beta_TYd;
}
/**
* Calculates the two-loop beta function of TYd.
*
* @return two-loop beta function
*/
Eigen::Matrix<double,3,3> genericE6SSM_soft_parameters::calc_beta_TYd_two_loop(const Soft_traces& soft_traces) const
{
const auto Qdp = INPUT(Qdp);
const auto QDxbarp = INPUT(QDxbarp);
const auto QDxp = INPUT(QDxp);
const auto Qep = INPUT(Qep);
const auto QH1p = INPUT(QH1p);
const auto QH2p = INPUT(QH2p);
const auto QHpbarp = INPUT(QHpbarp);
const auto QHpp = INPUT(QHpp);
const auto QLp = INPUT(QLp);
const auto QQp = INPUT(QQp);
const auto QSp = INPUT(QSp);
const auto Qup = INPUT(Qup);
const double traceYdAdjYd = TRACE_STRUCT.traceYdAdjYd;
const double traceYeAdjYe = TRACE_STRUCT.traceYeAdjYe;
const double traceAdjYdTYd = TRACE_STRUCT.traceAdjYdTYd;
const double traceAdjYeTYe = TRACE_STRUCT.traceAdjYeTYe;
const double traceYuAdjYu = TRACE_STRUCT.traceYuAdjYu;
const double traceKappaAdjKappa = TRACE_STRUCT.traceKappaAdjKappa;
const double traceLambda12AdjLambda12 =
TRACE_STRUCT.traceLambda12AdjLambda12;
const double traceAdjYuTYu = TRACE_STRUCT.traceAdjYuTYu;
const double traceAdjKappaTKappa = TRACE_STRUCT.traceAdjKappaTKappa;
const double traceAdjLambda12TLambda12 =
TRACE_STRUCT.traceAdjLambda12TLambda12;
const double traceYdAdjYdTYdAdjYd = TRACE_STRUCT.traceYdAdjYdTYdAdjYd;
const double traceYdAdjYuTYuAdjYd = TRACE_STRUCT.traceYdAdjYuTYuAdjYd;
const double traceYeAdjYeTYeAdjYe = TRACE_STRUCT.traceYeAdjYeTYeAdjYe;
const double traceYuAdjYdTYdAdjYu = TRACE_STRUCT.traceYuAdjYdTYdAdjYu;
const double traceYdAdjYdYdAdjYd = TRACE_STRUCT.traceYdAdjYdYdAdjYd;
const double traceYdAdjYuYuAdjYd = TRACE_STRUCT.traceYdAdjYuYuAdjYd;
const double traceYeAdjYeYeAdjYe = TRACE_STRUCT.traceYeAdjYeYeAdjYe;
Eigen::Matrix<double,3,3> beta_TYd;
beta_TYd = twoLoop*(4.588888888888889*Power(g1,4)*TYd + 16.5*Power(g2,
4)*TYd + 14.222222222222221*Power(g3,4)*TYd + 22*Power(gN,4)*Power(Qdp,4)
*TYd + 16*Power(gN,4)*Power(QH1p,4)*TYd + 40*Power(gN,4)*Power(QQp,4)*TYd
- 9*traceYdAdjYdYdAdjYd*TYd - 3*traceYdAdjYuYuAdjYd*TYd - 3*
traceYeAdjYeYeAdjYe*TYd - 3*traceKappaAdjKappa*AbsSqr(Lambdax)*TYd - 2*
traceLambda12AdjLambda12*AbsSqr(Lambdax)*TYd - 3*traceYuAdjYu*AbsSqr(
Lambdax)*TYd - 0.4*traceYdAdjYd*Sqr(g1)*TYd + 1.2*traceYeAdjYe*Sqr(g1)*
TYd + Sqr(g1)*Sqr(g2)*TYd + 16*traceYdAdjYd*Sqr(g3)*TYd +
0.8888888888888888*Sqr(g1)*Sqr(g3)*TYd + 8*Sqr(g2)*Sqr(g3)*TYd + 6*
traceYdAdjYd*Sqr(gN)*Sqr(Qdp)*TYd + 0.5333333333333333*Sqr(g1)*Sqr(gN)*
Sqr(Qdp)*TYd + 10.666666666666666*Sqr(g3)*Sqr(gN)*Sqr(Qdp)*TYd + 18*Power
(gN,4)*Sqr(Qdp)*Sqr(QDxbarp)*TYd + 18*Power(gN,4)*Sqr(Qdp)*Sqr(QDxp)*TYd
+ 2*traceYeAdjYe*Sqr(gN)*Sqr(Qep)*TYd + 6*Power(gN,4)*Sqr(Qdp)*Sqr(Qep)*
TYd - 6*traceYdAdjYd*Sqr(gN)*Sqr(QH1p)*TYd - 2*traceYeAdjYe*Sqr(gN)*Sqr(
QH1p)*TYd - 2*AbsSqr(Lambdax)*Sqr(gN)*Sqr(QH1p)*TYd + 1.2*Sqr(g1)*Sqr(gN)
*Sqr(QH1p)*TYd + 6*Sqr(g2)*Sqr(gN)*Sqr(QH1p)*TYd + 30*Power(gN,4)*Sqr(Qdp
)*Sqr(QH1p)*TYd + 18*Power(gN,4)*Sqr(QDxbarp)*Sqr(QH1p)*TYd + 18*Power(gN
,4)*Sqr(QDxp)*Sqr(QH1p)*TYd + 6*Power(gN,4)*Sqr(Qep)*Sqr(QH1p)*TYd + 2*
AbsSqr(Lambdax)*Sqr(gN)*Sqr(QH2p)*TYd + 12*Power(gN,4)*Sqr(Qdp)*Sqr(QH2p)
*TYd + 12*Power(gN,4)*Sqr(QH1p)*Sqr(QH2p)*TYd + 4*Power(gN,4)*Sqr(Qdp)*
Sqr(QHpbarp)*TYd + 4*Power(gN,4)*Sqr(QH1p)*Sqr(QHpbarp)*TYd + 4*Power(gN,
4)*Sqr(Qdp)*Sqr(QHpp)*TYd + 4*Power(gN,4)*Sqr(QH1p)*Sqr(QHpp)*TYd + 2*
traceYeAdjYe*Sqr(gN)*Sqr(QLp)*TYd + 12*Power(gN,4)*Sqr(Qdp)*Sqr(QLp)*TYd
+ 12*Power(gN,4)*Sqr(QH1p)*Sqr(QLp)*TYd + 6*traceYdAdjYd*Sqr(gN)*Sqr(QQp)
*TYd + 0.13333333333333333*Sqr(g1)*Sqr(gN)*Sqr(QQp)*TYd + 6*Sqr(g2)*Sqr(
gN)*Sqr(QQp)*TYd + 10.666666666666666*Sqr(g3)*Sqr(gN)*Sqr(QQp)*TYd + 54*
Power(gN,4)*Sqr(Qdp)*Sqr(QQp)*TYd + 18*Power(gN,4)*Sqr(QDxbarp)*Sqr(QQp)*
TYd + 18*Power(gN,4)*Sqr(QDxp)*Sqr(QQp)*TYd + 6*Power(gN,4)*Sqr(Qep)*Sqr(
QQp)*TYd + 48*Power(gN,4)*Sqr(QH1p)*Sqr(QQp)*TYd + 12*Power(gN,4)*Sqr(
QH2p)*Sqr(QQp)*TYd + 4*Power(gN,4)*Sqr(QHpbarp)*Sqr(QQp)*TYd + 4*Power(gN
,4)*Sqr(QHpp)*Sqr(QQp)*TYd + 12*Power(gN,4)*Sqr(QLp)*Sqr(QQp)*TYd + 2*
AbsSqr(Lambdax)*Sqr(gN)*Sqr(QSp)*TYd + 6*Power(gN,4)*Sqr(Qdp)*Sqr(QSp)*
TYd + 6*Power(gN,4)*Sqr(QH1p)*Sqr(QSp)*TYd + 6*Power(gN,4)*Sqr(QQp)*Sqr(
QSp)*TYd + 18*Power(gN,4)*Sqr(Qdp)*Sqr(Qup)*TYd + 18*Power(gN,4)*Sqr(QH1p
)*Sqr(Qup)*TYd + 18*Power(gN,4)*Sqr(QQp)*Sqr(Qup)*TYd - 3*Sqr(Conj(
Lambdax))*Sqr(Lambdax)*TYd - 0.044444444444444446*Yd*(413*Power(g1,4)*
MassB + 1280*Power(g3,4)*MassG + 1485*Power(g2,4)*MassWB + 1980*Power(gN,
4)*MassBp*Power(Qdp,4) + 1440*Power(gN,4)*MassBp*Power(QH1p,4) + 3600*
Power(gN,4)*MassBp*Power(QQp,4) + 810*traceYdAdjYdTYdAdjYd + 135*
traceYdAdjYuTYuAdjYd + 270*traceYeAdjYeTYeAdjYe + 135*
traceYuAdjYdTYdAdjYu + 18*traceAdjYdTYd*Sqr(g1) - 54*traceAdjYeTYe*Sqr(g1
) + 54*MassB*traceYeAdjYe*Sqr(g1) + 45*MassB*Sqr(g1)*Sqr(g2) + 45*MassWB*
Sqr(g1)*Sqr(g2) - 720*traceAdjYdTYd*Sqr(g3) + 40*MassB*Sqr(g1)*Sqr(g3) +
40*MassG*Sqr(g1)*Sqr(g3) + 360*MassG*Sqr(g2)*Sqr(g3) + 360*MassWB*Sqr(g2)
*Sqr(g3) - 270*traceAdjYdTYd*Sqr(gN)*Sqr(Qdp) + 24*MassB*Sqr(g1)*Sqr(gN)*
Sqr(Qdp) + 24*MassBp*Sqr(g1)*Sqr(gN)*Sqr(Qdp) + 480*MassBp*Sqr(g3)*Sqr(gN
)*Sqr(Qdp) + 480*MassG*Sqr(g3)*Sqr(gN)*Sqr(Qdp) + 1620*Power(gN,4)*MassBp
*Sqr(Qdp)*Sqr(QDxbarp) + 1620*Power(gN,4)*MassBp*Sqr(Qdp)*Sqr(QDxp) - 90*
traceAdjYeTYe*Sqr(gN)*Sqr(Qep) + 90*MassBp*traceYeAdjYe*Sqr(gN)*Sqr(Qep)
+ 540*Power(gN,4)*MassBp*Sqr(Qdp)*Sqr(Qep) + 270*traceAdjYdTYd*Sqr(gN)*
Sqr(QH1p) + 90*traceAdjYeTYe*Sqr(gN)*Sqr(QH1p) - 90*MassBp*traceYeAdjYe*
Sqr(gN)*Sqr(QH1p) + 54*MassB*Sqr(g1)*Sqr(gN)*Sqr(QH1p) + 54*MassBp*Sqr(g1
)*Sqr(gN)*Sqr(QH1p) + 270*MassBp*Sqr(g2)*Sqr(gN)*Sqr(QH1p) + 270*MassWB*
Sqr(g2)*Sqr(gN)*Sqr(QH1p) + 2700*Power(gN,4)*MassBp*Sqr(Qdp)*Sqr(QH1p) +
1620*Power(gN,4)*MassBp*Sqr(QDxbarp)*Sqr(QH1p) + 1620*Power(gN,4)*MassBp*
Sqr(QDxp)*Sqr(QH1p) + 540*Power(gN,4)*MassBp*Sqr(Qep)*Sqr(QH1p) + 1080*
Power(gN,4)*MassBp*Sqr(Qdp)*Sqr(QH2p) + 1080*Power(gN,4)*MassBp*Sqr(QH1p)
*Sqr(QH2p) + 360*Power(gN,4)*MassBp*Sqr(Qdp)*Sqr(QHpbarp) + 360*Power(gN,
4)*MassBp*Sqr(QH1p)*Sqr(QHpbarp) + 360*Power(gN,4)*MassBp*Sqr(Qdp)*Sqr(
QHpp) + 360*Power(gN,4)*MassBp*Sqr(QH1p)*Sqr(QHpp) - 90*traceAdjYeTYe*Sqr
(gN)*Sqr(QLp) + 90*MassBp*traceYeAdjYe*Sqr(gN)*Sqr(QLp) + 1080*Power(gN,4
)*MassBp*Sqr(Qdp)*Sqr(QLp) + 1080*Power(gN,4)*MassBp*Sqr(QH1p)*Sqr(QLp) -
270*traceAdjYdTYd*Sqr(gN)*Sqr(QQp) + 6*MassB*Sqr(g1)*Sqr(gN)*Sqr(QQp) +
6*MassBp*Sqr(g1)*Sqr(gN)*Sqr(QQp) + 270*MassBp*Sqr(g2)*Sqr(gN)*Sqr(QQp) +
270*MassWB*Sqr(g2)*Sqr(gN)*Sqr(QQp) + 480*MassBp*Sqr(g3)*Sqr(gN)*Sqr(QQp
) + 480*MassG*Sqr(g3)*Sqr(gN)*Sqr(QQp) + 4860*Power(gN,4)*MassBp*Sqr(Qdp)
*Sqr(QQp) + 1620*Power(gN,4)*MassBp*Sqr(QDxbarp)*Sqr(QQp) + 1620*Power(gN
,4)*MassBp*Sqr(QDxp)*Sqr(QQp) + 540*Power(gN,4)*MassBp*Sqr(Qep)*Sqr(QQp)
+ 4320*Power(gN,4)*MassBp*Sqr(QH1p)*Sqr(QQp) + 1080*Power(gN,4)*MassBp*
Sqr(QH2p)*Sqr(QQp) + 360*Power(gN,4)*MassBp*Sqr(QHpbarp)*Sqr(QQp) + 360*
Power(gN,4)*MassBp*Sqr(QHpp)*Sqr(QQp) + 1080*Power(gN,4)*MassBp*Sqr(QLp)*
Sqr(QQp) - 18*traceYdAdjYd*(MassB*Sqr(g1) - 5*(8*MassG*Sqr(g3) + 3*MassBp
*Sqr(gN)*(Sqr(Qdp) - Sqr(QH1p) + Sqr(QQp)))) + 540*Power(gN,4)*MassBp*Sqr
(Qdp)*Sqr(QSp) + 540*Power(gN,4)*MassBp*Sqr(QH1p)*Sqr(QSp) + 540*Power(gN
,4)*MassBp*Sqr(QQp)*Sqr(QSp) + 1620*Power(gN,4)*MassBp*Sqr(Qdp)*Sqr(Qup)
+ 1620*Power(gN,4)*MassBp*Sqr(QH1p)*Sqr(Qup) + 1620*Power(gN,4)*MassBp*
Sqr(QQp)*Sqr(Qup) + 270*Lambdax*Sqr(Conj(Lambdax))*TLambdax - 45*Conj(
Lambdax)*(Lambdax*(-3*traceAdjKappaTKappa - 2*traceAdjLambda12TLambda12 -
3*traceAdjYuTYu + 2*MassBp*Sqr(gN)*Sqr(QH1p) - 2*MassBp*Sqr(gN)*Sqr(QH2p
) - 2*MassBp*Sqr(gN)*Sqr(QSp)) - (3*traceKappaAdjKappa + 2*
traceLambda12AdjLambda12 + 3*traceYuAdjYu + 2*Sqr(gN)*Sqr(QH1p) - 2*Sqr(
gN)*Sqr(QH2p) - 2*Sqr(gN)*Sqr(QSp))*TLambdax)) - 0.4*(45*traceAdjYdTYd +
15*traceAdjYeTYe + 4*MassB*Sqr(g1) + 30*MassWB*Sqr(g2) - 10*MassBp*Sqr(gN
)*Sqr(Qdp) + 30*MassBp*Sqr(gN)*Sqr(QH1p) + 10*MassBp*Sqr(gN)*Sqr(QQp) +
15*Conj(Lambdax)*TLambdax)*(Yd*Yd.adjoint()*Yd) - 12*traceYdAdjYd*(Yd*
Yd.adjoint()*TYd) - 4*traceYeAdjYe*(Yd*Yd.adjoint()*TYd) - 4*AbsSqr(
Lambdax)*(Yd*Yd.adjoint()*TYd) + 1.2*Sqr(g1)*(Yd*Yd.adjoint()*TYd) + 6*
Sqr(g2)*(Yd*Yd.adjoint()*TYd) + 8*Sqr(gN)*Sqr(QH1p)*(Yd*Yd.adjoint()*TYd)
- 6*traceAdjYuTYu*(Yd*Yu.adjoint()*Yu) - 1.6*MassB*Sqr(g1)*(Yd*
Yu.adjoint()*Yu) - 4*MassBp*Sqr(gN)*Sqr(QH2p)*(Yd*Yu.adjoint()*Yu) + 4*
MassBp*Sqr(gN)*Sqr(QQp)*(Yd*Yu.adjoint()*Yu) - 4*MassBp*Sqr(gN)*Sqr(Qup)*
(Yd*Yu.adjoint()*Yu) - 2*Conj(Lambdax)*TLambdax*(Yd*Yu.adjoint()*Yu) - 6*
traceYuAdjYu*(Yd*Yu.adjoint()*TYu) - 2*AbsSqr(Lambdax)*(Yd*Yu.adjoint()*
TYu) + 1.6*Sqr(g1)*(Yd*Yu.adjoint()*TYu) + 4*Sqr(gN)*Sqr(QH2p)*(Yd*
Yu.adjoint()*TYu) - 4*Sqr(gN)*Sqr(QQp)*(Yd*Yu.adjoint()*TYu) + 4*Sqr(gN)*
Sqr(Qup)*(Yd*Yu.adjoint()*TYu) - 15*traceYdAdjYd*(TYd*Yd.adjoint()*Yd) -
5*traceYeAdjYe*(TYd*Yd.adjoint()*Yd) - 5*AbsSqr(Lambdax)*(TYd*Yd.adjoint(
)*Yd) + 1.2*Sqr(g1)*(TYd*Yd.adjoint()*Yd) + 12*Sqr(g2)*(TYd*Yd.adjoint()*
Yd) - 6*Sqr(gN)*Sqr(Qdp)*(TYd*Yd.adjoint()*Yd) + 10*Sqr(gN)*Sqr(QH1p)*(
TYd*Yd.adjoint()*Yd) + 6*Sqr(gN)*Sqr(QQp)*(TYd*Yd.adjoint()*Yd) - 3*
traceYuAdjYu*(TYd*Yu.adjoint()*Yu) - AbsSqr(Lambdax)*(TYd*Yu.adjoint()*Yu
) + 0.8*Sqr(g1)*(TYd*Yu.adjoint()*Yu) + 2*Sqr(gN)*Sqr(QH2p)*(TYd*
Yu.adjoint()*Yu) - 2*Sqr(gN)*Sqr(QQp)*(TYd*Yu.adjoint()*Yu) + 2*Sqr(gN)*
Sqr(Qup)*(TYd*Yu.adjoint()*Yu) - 6*(Yd*Yd.adjoint()*Yd*Yd.adjoint()*TYd)
- 8*(Yd*Yd.adjoint()*TYd*Yd.adjoint()*Yd) - 2*(Yd*Yu.adjoint()*Yu*
Yd.adjoint()*TYd) - 4*(Yd*Yu.adjoint()*Yu*Yu.adjoint()*TYu) - 4*(Yd*
Yu.adjoint()*TYu*Yd.adjoint()*Yd) - 4*(Yd*Yu.adjoint()*TYu*Yu.adjoint()*
Yu) - 6*(TYd*Yd.adjoint()*Yd*Yd.adjoint()*Yd) - 4*(TYd*Yu.adjoint()*Yu*
Yd.adjoint()*Yd) - 2*(TYd*Yu.adjoint()*Yu*Yu.adjoint()*Yu));
return beta_TYd;
}
} // namespace flexiblesusy
| [
"dylan.harries@adelaide.edu.au"
] | dylan.harries@adelaide.edu.au |
f2bcacd71d462cf0bdaef301cc87e2cc42df506d | 436adbbd309a6d2d283a4e9fe2e7c5c671ce0db7 | /Classes/UIWidgets/LuaExtensionsDS.cpp | 27966b4584bdcb073317745e07b72dc64e07d7f2 | [] | no_license | daxingyou/q_card | 87077b343445acf04132cdd0701952d941f19036 | 3b458ee32ec03509f293324ab8de88efad3d2501 | refs/heads/master | 2021-12-23T19:59:58.341338 | 2017-11-21T06:36:57 | 2017-11-21T06:36:57 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,185 | cpp | /*
** Lua binding: Cocos2d
** Generated automatically by tolua++-1.0.92 on 02/10/14 14:41:11.
*/
/****************************************************************************
Copyright (c) 2011 cocos2d-x.org
http://www.cocos2d-x.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.
****************************************************************************/
extern "C" {
#include "tolua_fix.h"
}
#include <map>
#include <string>
#include "cocos2d.h"
#include "CCLuaEngine.h"
#include "SimpleAudioEngine.h"
#include "cocos-ext.h"
#include "string.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
#include "Common/CommonDefine.h"
#include "UIWidgets/DSMask.h"
#include "UIWidgets/RichLabel.h"
#include "UIWidgets/GuideLayer.h"
#include "UIWidgets/GraySprite.h"
using namespace cocos2d;
using namespace cocos2d::extension;
using namespace CocosDenshion;
using namespace DianshiTech;
/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
tolua_usertype(tolua_S,"CCLayerRGBA");
tolua_usertype(tolua_S,"CCSize");
tolua_usertype(tolua_S,"ccColor3B");
tolua_usertype(tolua_S,"RichLabel");
tolua_usertype(tolua_S,"GuideLayer");
tolua_usertype(tolua_S,"DSMask");
tolua_usertype(tolua_S,"CCSprite");
tolua_usertype(tolua_S,"CCLayerColor");
tolua_usertype(tolua_S,"GraySprite");
tolua_usertype(tolua_S,"DrawCricleMask");
}
/* method: create of class RichLabel */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_RichLabel_create00
static int tolua_Cocos2d_RichLabel_create00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"RichLabel",0,&tolua_err) ||
!tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isstring(tolua_S,3,0,&tolua_err) ||
!tolua_isnumber(tolua_S,4,0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"CCSize",0,&tolua_err)) ||
!tolua_isboolean(tolua_S,6,1,&tolua_err) ||
!tolua_isboolean(tolua_S,7,1,&tolua_err) ||
!tolua_isnoobj(tolua_S,8,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
const char* fontName = ((const char*) tolua_tostring(tolua_S,3,0));
const int fontSize = ((const int) tolua_tonumber(tolua_S,4,0));
CCSize labelSize = *((CCSize*) tolua_tousertype(tolua_S,5,0));
bool appendString = ((bool) tolua_toboolean(tolua_S,6,false));
bool enableShadow = ((bool) tolua_toboolean(tolua_S,7,true));
{
RichLabel* tolua_ret = (RichLabel*) RichLabel::create(str,fontName,fontSize,labelSize,appendString,enableShadow);
tolua_pushusertype(tolua_S,(void*)tolua_ret,"RichLabel");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: setColor of class RichLabel */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_RichLabel_setColor00
static int tolua_Cocos2d_RichLabel_setColor00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"RichLabel",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ccColor3B",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
RichLabel* self = (RichLabel*) tolua_tousertype(tolua_S,1,0);
const ccColor3B* color3 = ((const ccColor3B*) tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setColor'", NULL);
#endif
{
self->setColor(*color3);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'setColor'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: getString of class RichLabel */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_RichLabel_getString00
static int tolua_Cocos2d_RichLabel_getString00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"RichLabel",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
RichLabel* self = (RichLabel*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getString'", NULL);
#endif
{
char* tolua_ret = (char*) self->getString();
tolua_pushstring(tolua_S,(const char*)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'getString'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: getTextSize of class RichLabel */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_RichLabel_getTextSize00
static int tolua_Cocos2d_RichLabel_getTextSize00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"RichLabel",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
RichLabel* self = (RichLabel*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getTextSize'", NULL);
#endif
{
CCSize tolua_ret = (CCSize) self->getTextSize();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((CCSize)(tolua_ret));
tolua_pushusertype(tolua_S,tolua_obj,"CCSize");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(CCSize));
tolua_pushusertype(tolua_S,tolua_obj,"CCSize");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'getTextSize'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: createMask of class DSMask */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_DSMask_createMask00
static int tolua_Cocos2d_DSMask_createMask00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"DSMask",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"CCSize",0,&tolua_err)) ||
!tolua_isusertype(tolua_S,3,"CCSprite",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CCSize contentSize = *((CCSize*) tolua_tousertype(tolua_S,2,0));
CCSprite* bg = ((CCSprite*) tolua_tousertype(tolua_S,3,0));
{
DSMask* tolua_ret = (DSMask*) DSMask::createMask(contentSize,bg);
tolua_pushusertype(tolua_S,(void*)tolua_ret,"DSMask");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'createMask'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: createMask of class DSMask */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_DSMask_createMask01
static int tolua_Cocos2d_DSMask_createMask01(lua_State* tolua_S)
{
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"DSMask",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"CCSize",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
{
CCSize contentSize = *((CCSize*) tolua_tousertype(tolua_S,2,0));
{
DSMask* tolua_ret = (DSMask*) DSMask::createMask(contentSize);
tolua_pushusertype(tolua_S,(void*)tolua_ret,"DSMask");
}
}
return 1;
tolua_lerror:
return tolua_Cocos2d_DSMask_createMask00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE
/* method: createGuideLayer of class GuideLayer */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_GuideLayer_createGuideLayer00
static int tolua_Cocos2d_GuideLayer_createGuideLayer00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"GuideLayer",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
{
GuideLayer* tolua_ret = (GuideLayer*) GuideLayer::createGuideLayer();
tolua_pushusertype(tolua_S,(void*)tolua_ret,"GuideLayer");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'createGuideLayer'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: setMaskRect of class GuideLayer */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_GuideLayer_setMaskRect00
static int tolua_Cocos2d_GuideLayer_setMaskRect00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"GuideLayer",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"CCRect",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
GuideLayer* self = (GuideLayer*) tolua_tousertype(tolua_S,1,0);
CCRect rect = *((CCRect*) tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setMaskRect'", NULL);
#endif
{
self->setMaskRect(rect);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'setMaskRect'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: setMaskPicturePath of class GuideLayer */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_GuideLayer_setMaskPicturePath00
static int tolua_Cocos2d_GuideLayer_setMaskPicturePath00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"GuideLayer",0,&tolua_err) ||
!tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isstring(tolua_S,3,0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"CCPoint",0,&tolua_err)) ||
!tolua_isnumber(tolua_S,5,0,&tolua_err) ||
!tolua_isnumber(tolua_S,6,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,7,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
GuideLayer* self = (GuideLayer*) tolua_tousertype(tolua_S,1,0);
const char* guideInfo = ((const char*) tolua_tostring(tolua_S,2,0));
const char* guideTips = ((const char*) tolua_tostring(tolua_S,3,0));
CCPoint poxPoint = *((CCPoint*) tolua_tousertype(tolua_S,4,0));
emStandDir dirStand = ((emStandDir) (int) tolua_tonumber(tolua_S,5,0));
emPromptDirection dir = ((emPromptDirection) (int) tolua_tonumber(tolua_S,6,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setMaskPicturePath'", NULL);
#endif
{
self->setMaskPicturePath(guideInfo,guideTips,poxPoint,dirStand,dir);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'setMaskPicturePath'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: skip of class GuideLayer */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_GuideLayer_skip00
static int tolua_Cocos2d_GuideLayer_skip00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"GuideLayer",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
GuideLayer* self = (GuideLayer*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'skip'", NULL);
#endif
{
self->skip();
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'skip'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: create of class GraySprite */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_GraySprite_create00
static int tolua_Cocos2d_GraySprite_create00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"GraySprite",0,&tolua_err) ||
!tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
const char* pszFileName = ((const char*) tolua_tostring(tolua_S,2,0));
{
GraySprite* tolua_ret = (GraySprite*) GraySprite::create(pszFileName);
tolua_pushusertype(tolua_S,(void*)tolua_ret,"GraySprite");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: createWithSpriteFrameName of class GraySprite */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_GraySprite_createWithSpriteFrameName00
static int tolua_Cocos2d_GraySprite_createWithSpriteFrameName00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"GraySprite",0,&tolua_err) ||
!tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
const char* pszSpriteFrameName = ((const char*) tolua_tostring(tolua_S,2,0));
{
GraySprite* tolua_ret = (GraySprite*) GraySprite::createWithSpriteFrameName(pszSpriteFrameName);
tolua_pushusertype(tolua_S,(void*)tolua_ret,"GraySprite");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'createWithSpriteFrameName'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: createWithTexture of class GraySprite */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_GraySprite_createWithTexture00
static int tolua_Cocos2d_GraySprite_createWithTexture00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"GraySprite",0,&tolua_err) ||
!tolua_isusertype(tolua_S,2,"CCTexture2D",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CCTexture2D* pTexture = ((CCTexture2D*) tolua_tousertype(tolua_S,2,0));
{
GraySprite* tolua_ret = (GraySprite*) GraySprite::createWithTexture(pTexture);
tolua_pushusertype(tolua_S,(void*)tolua_ret,"GraySprite");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'createWithTexture'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: create of class DrawCricleMask */
#ifndef TOLUA_DISABLE_tolua_Cocos2d_DrawCricleMask_create00
static int tolua_Cocos2d_DrawCricleMask_create00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"DrawCricleMask",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isusertype(tolua_S,3,"CCNode",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
float fRadius = ((float) tolua_tonumber(tolua_S,2,0));
CCNode* node = ((CCNode*) tolua_tousertype(tolua_S,3,0));
{
DrawCricleMask* tolua_ret = (DrawCricleMask*) DrawCricleMask::create(fRadius,node);
tolua_pushusertype(tolua_S,(void*)tolua_ret,"DrawCricleMask");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* Open function */
TOLUA_API int tolua_Cocos2d_open_for_ExtensionsDS (lua_State* tolua_S)
{
tolua_open(tolua_S);
tolua_reg_types(tolua_S);
tolua_module(tolua_S,NULL,0);
tolua_beginmodule(tolua_S,NULL);
tolua_cclass(tolua_S,"RichLabel","RichLabel","CCLayerRGBA",NULL);
tolua_beginmodule(tolua_S,"RichLabel");
tolua_function(tolua_S,"create",tolua_Cocos2d_RichLabel_create00);
tolua_function(tolua_S,"setColor",tolua_Cocos2d_RichLabel_setColor00);
tolua_function(tolua_S,"getString",tolua_Cocos2d_RichLabel_getString00);
tolua_function(tolua_S,"getTextSize",tolua_Cocos2d_RichLabel_getTextSize00);
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"DSMask","DSMask","CCLayerColor",NULL);
tolua_beginmodule(tolua_S,"DSMask");
tolua_function(tolua_S,"createMask",tolua_Cocos2d_DSMask_createMask00);
tolua_function(tolua_S,"createMask",tolua_Cocos2d_DSMask_createMask01);
tolua_endmodule(tolua_S);
tolua_constant(tolua_S,"emUpArrow",emUpArrow);
tolua_constant(tolua_S,"emDownArrow",emDownArrow);
tolua_constant(tolua_S,"emLeftArrow",emLeftArrow);
tolua_constant(tolua_S,"emRightArrow",emRightArrow);
tolua_constant(tolua_S,"emLeft",emLeft);
tolua_constant(tolua_S,"emRight",emRight);
tolua_cclass(tolua_S,"GuideLayer","GuideLayer","CCLayer",NULL);
tolua_beginmodule(tolua_S,"GuideLayer");
tolua_function(tolua_S,"createGuideLayer",tolua_Cocos2d_GuideLayer_createGuideLayer00);
tolua_function(tolua_S,"setMaskRect",tolua_Cocos2d_GuideLayer_setMaskRect00);
tolua_function(tolua_S,"setMaskPicturePath",tolua_Cocos2d_GuideLayer_setMaskPicturePath00);
tolua_function(tolua_S,"skip",tolua_Cocos2d_GuideLayer_skip00);
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"GraySprite","GraySprite","CCSprite",NULL);
tolua_beginmodule(tolua_S,"GraySprite");
tolua_function(tolua_S,"create",tolua_Cocos2d_GraySprite_create00);
tolua_function(tolua_S,"createWithSpriteFrameName",tolua_Cocos2d_GraySprite_createWithSpriteFrameName00);
tolua_function(tolua_S,"createWithTexture",tolua_Cocos2d_GraySprite_createWithTexture00);
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"DrawCricleMask","DrawCricleMask","CCNode",NULL);
tolua_beginmodule(tolua_S,"DrawCricleMask");
tolua_function(tolua_S,"create",tolua_Cocos2d_DrawCricleMask_create00);
tolua_endmodule(tolua_S);
tolua_endmodule(tolua_S);
return 1;
}
| [
"chenhlb8055@gmail.com"
] | chenhlb8055@gmail.com |
52ccfb4b5a146a48b1e5e012967aca37e9abf6ae | 5aa3aad29eadddbddf454164f17649eff5a7f93f | /Sources/chap02/bool.cpp | b46d6d0d096c953b4e51103775a84c1a930a802b | [] | no_license | jungwongarden/cpp | 1304d0e266e22d9aa3e7b02fe4ea61ea47e2e34d | 456d7025b542ff05fbdc2849f202b1beb77ed1b4 | refs/heads/master | 2022-01-13T19:01:19.740931 | 2019-06-29T01:28:07 | 2019-06-29T01:28:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 152 | cpp | #include <iostream>
using namespace std;
int main() {
bool b;
b = (1 == 2);
cout << std::boolalpha;
cout << b << endl;
return 0;
} | [
"noreply@github.com"
] | jungwongarden.noreply@github.com |
9890d3a178eda9ed7d21fb9173a577d04c71417b | cdd954c874762b94828dac7c29f185804403b4b2 | /RocketPlugin/buildmode/RocketScenePackager.h | 584e0cc6fe475b6af799cd658b99a72f73842eae | [
"Apache-2.0"
] | permissive | Adminotech/meshmoon-plugins | cd2c898bcae0fbab796e9829c48754c81be4644a | 32043ef783bdf137860d7d01eb22de564628e572 | refs/heads/master | 2021-01-13T00:44:55.012875 | 2016-03-07T14:58:03 | 2016-03-07T14:58:03 | 52,879,540 | 4 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 8,573 | h | /**
@author Adminotech Ltd.
Copyright Adminotech Ltd.
All rights reserved.
@file
@brief */
#pragma once
#include "RocketFwd.h"
#include "FrameworkFwd.h"
#include "SceneFwd.h"
#include "CoreDefines.h"
#include "qts3/QS3Fwd.h"
#include "utils/RocketZipWorker.h"
#include "IAttribute.h"
#include "AssetAPI.h"
#include "AssetReference.h"
#include "ui_RocketSceneOptimizerWidget.h"
#include <QObject>
#include <QDir>
#include <QTime>
#include <QFileInfo>
#include <QHash>
class QFile;
class EC_Mesh;
class EC_Material;
/// @cond PRIVATE
class RocketScenePackager : public QObject
{
Q_OBJECT
public:
explicit RocketScenePackager(RocketPlugin *plugin);
~RocketScenePackager();
struct AssetFileInfo
{
AssetReference ref;
QString bundleAssetRef;
QString diskSourceAbsolutePath;
QFileInfo diskSource;
bool dontProcess;
bool texturesProcessed;
bool texturePostProcessed;
AssetFileInfo(const QString &_ref, const QString &_type) :
dontProcess(false), texturesProcessed(false), texturePostProcessed(false),
ref(_ref, _type)
{
}
void SetDiskSource(const QString absoluteDiskSource)
{
diskSourceAbsolutePath = absoluteDiskSource;
diskSource = QFileInfo(diskSourceAbsolutePath);
}
};
struct TextureInfo
{
int iTech;
int iPass;
int iTexUnit;
QString ref;
TextureInfo() : iTech(-1), iPass(-1), iTexUnit(-1) {}
};
typedef QList<TextureInfo> TextureList;
struct TextureProcessing
{
bool process;
QString convertToFormat;
QString mipmapGeneration;
uint rescaleMode;
uint maxSize;
uint maxMipmaps;
uint quality;
uint totalProcessed;
uint totalConverted;
uint totalResized;
uint totalRescaled;
QStringList supportedInputFormats;
TextureProcessing() :
process(false),
mipmapGeneration("UseSource"),
rescaleMode(0),
maxSize(0),
maxMipmaps(1),
quality(255),
totalProcessed(0),
totalConverted(0),
totalResized(0),
totalRescaled(0)
{
}
void Disable() { Reset(); }
void Reset() { *this = TextureProcessing(); }
bool IsEnabled() const
{
if (!process)
return false;
if (convertToFormat != "")
return true;
if (mipmapGeneration != "" && mipmapGeneration != "UseSource")
return true;
if (rescaleMode != 0)
return true;
if (maxSize != 0)
return true;
return false;
}
};
struct State
{
uint maxPackagerThreads;
bool storageAuthenticated;
bool waitingForAssetBundleUploads;
bool bundleStorageUploadsOk;
bool bundlesUploading;
uint entitiesProcessed;
uint entitiesEmptyRemoved;
uint totalConvertedRefs;
uint bundledMeshRefs;
uint bundledMaterialRefs;
uint bundledTextureRefs;
uint bundledTextureGeneratedRefs;
uint currentMeshBundleIndex;
uint currentTextureBundleIndex;
uint currentTextureGeneratedBundleIndex;
qint64 totalFileSize;
qint64 totalFileSizeMesh;
qint64 totalFileSizeMat;
qint64 totalFileSizeTex;
qint64 totalFileSizeTexGen;
qint64 nowFileSizeMesh;
qint64 nowFileSizeTex;
qint64 nowFileSizeTexGen;
qint64 bundleSplitSize;
qint64 filesCopied;
uint foundMaxTexWidth;
uint foundMaxTexHeight;
bool processMeshes;
bool processMaterials;
bool processGeneratedMaterials;
bool processScriptEnts;
bool processContentToolsEnts;
bool removeEmptyEntities;
bool rewriteAssetReferences;
QFile *logFile;
bool logDebug;
TextureProcessing texProcessing;
QString txmlRef;
QString txmlBaseUrl;
QString txmlForcedBaseUrl;
QString outputTxmlFile;
QString bundlePrefix;
QString textureTool;
QDir outputDir;
QList<AssetFileInfo*> assetsInfo;
QHash<QString, QString> assetBaseToUuid;
QSet<QString> rewriteUuidFilenames;
QHash<QString, QString> oldToNewGeneraterMaterial;
QList<RocketZipWorker*> packagers;
QList<QPair<AttributeWeakPtr, QString> > changedAttributes;
QSet<QString> optimizedAssetRefs;
QTime time;
State() : logFile(0), storageAuthenticated(false) { Reset(); }
void Reset();
QFile *OpenLog();
};
public slots:
void Show();
void Hide();
/// Returns if the tool is running.
bool IsRunning() const;
/// Returns if the tool is stopping.
bool IsStopping() const;
/// Requests the tool to be stopped, if the tool is running.
/** This is not a synchronous operation, we need to stop processing tools etc. over a short period of time. Connect to Stopped signals to be notified.
@note This will prompt a main window modal dialog to ask the user if he wants to stop, the result will be returned as a bool.
@return True if user wanted to stop the packager, false otherwise. */
bool RequestStop();
QWidget *Widget() const;
signals:
void Started();
void Stopped();
private slots:
void Start();
bool CheckStopping();
void AuthenticateStorate();
void BackupCompleted(QS3CopyObjectResponse *response);
void Run();
void Stop();
void TryStartProcessing();
void Process();
void EnableInterface(bool enabled);
void StorageAuthCompleted();
void StorageAuthCanceled();
void ReadConfig();
void SaveConfig();
void StartAssetBundleUploads();
void ReplicateChangesToServer();
RocketZipWorker *StartPackager(const QString &destinationFilePath, const QString &inputDirPath, RocketZipWorker::Compression compression = RocketZipWorker::Normal);
uint RunningPackagers() const;
uint PendingPackagers() const;
void Log(const QString &message, bool logToConsole = false, bool errorChannel = false, bool warningChannel = false, const QString &color = QString(), bool logToFile = true);
void LogProgress(const QString &action, int progress = -1, bool updateButton = false);
void OnProcessTexturesChanged();
void OnProcessMipmapGenerationChanged();
void OnBrowseOutputDir();
void OnToggleLogDocking();
void OnPackagerThreadCompleted();
void OnAssetBundleUploadOperationProgress(QS3PutObjectResponse *response, qint64 completed, qint64 total, MeshmoonStorageOperationMonitor *operation);
void OnAssetBundlesUploaded(MeshmoonStorageOperationMonitor *monitor);
void ProcessGeneratedMaterial(Entity *ent, EC_Material *comp);
void ProcessMeshRef(Entity *ent, EC_Mesh *comp);
void ProcessMaterialRefs(Entity *ent, EC_Mesh *comp);
void ProcessTextures(AssetFileInfo *materialAssetInfo, const TextureList &textures);
RocketScenePackager::AssetFileInfo *GetOrCreateAssetFileInfo(const QString &ref, const QString &type, AssetAPI::AssetRefType refType, const QString &basePath, const QString &fileName, const QString &subAssetName);
RocketScenePackager::AssetFileInfo *GetAssetFileInfo(const QString &ref);
void TrimBaseStorageUrl(QString &ref);
TextureList GetTextures(const QString &materialRef);
void PostProcessTexture(AssetFileInfo *textureInfo, const QString &type);
bool CreateOrClearWorkingDirectory();
bool ClearDirectoryWithConfirmation(const QDir &dir);
void RemoveAllFilesRecursive(const QDir &dir, bool onlyTxmlFromRoot = true);
protected:
template <typename T>
std::vector<T*> GetTargets(std::vector<shared_ptr<T> > candidates) const;
bool eventFilter(QObject *obj, QEvent *e);
private:
RocketPlugin *plugin_;
Framework *framework_;
QString LC_;
QString contentToolsDataCompName_;
SceneWeakPtr scene_;
State state_;
bool running_;
bool stopping_;
QWidget *widget_;
QWidget *logWindow_;
Ui::RocketSceneOptimizerWidget ui_;
};
/// @endcond
| [
"jonne@adminotech.com"
] | jonne@adminotech.com |
43d45e2b9e81492779ed297d6f0346fa8c48107f | c6c1b91615287a431581d3e71d87eda3aed5713a | /Demos/iOS/UnicodeDemo/Classes/UnicodeDemoController.h | 8a483d5b3859aa7576aa897fc61e00151d1709d4 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | sloopdoom/ftgles-gles2 | a813eaf57d98ef33c976c0c700444946d000f4b6 | 13aa7b45ecc890efc6703abcb0cbdd59ffb5cde3 | refs/heads/master | 2021-01-15T18:50:43.125598 | 2013-05-07T08:17:32 | 2013-05-07T08:17:32 | 9,907,253 | 0 | 1 | MIT | 2018-10-01T03:54:29 | 2013-05-07T08:18:24 | C | UTF-8 | C++ | false | false | 1,449 | h | /*
Copyright (c) 2010 David Petrie
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.
*/
#ifndef UNICODE_DEMO_CONTROLLER_H
#define UNICODE_DEMO_CONTROLLER_H
#include <OpenGLES/ES1/gl.h>
#include <OpenGLES/ES1/glext.h>
/*
* FTGL Includes
*/
#include "FTGL/ftgles.h"
class UnicodeDemoController
{
public:
UnicodeDemoController(const char* path, float width, float height, float scale);
~UnicodeDemoController();
void Draw();
};
#endif | [
"yeetan@gmail.com"
] | yeetan@gmail.com |
cdbfa32e9d1832828f4dd0abcd2c523571e46cfa | 6336483e4cb8bff0f0cf2ecbb70a88c57d6f9c87 | /SDXEngine/SDXRenderer.h | 1e84814175683ebdc2777204282fe866dc90ec60 | [] | no_license | hoisin/SDXEngine | 8deef9f456bf41ac0c420c5a1498176abc44cb94 | 7d5cb792657a19ef4055f159a1d8d645e950db93 | refs/heads/master | 2022-08-10T19:21:16.553728 | 2022-08-01T20:43:51 | 2022-08-01T20:43:51 | 139,254,558 | 0 | 0 | null | 2022-07-30T14:46:04 | 2018-06-30T14:09:33 | C++ | UTF-8 | C++ | false | false | 1,448 | h | //--------------------------------------------------------------------------
//
// Renderer class
//
//--------------------------------------------------------------------------
#pragma once
#include <list>
#include "SDXDirectX.h"
#include "SDXDirect2D.h"
#include "SDXCameraFP.h"
#include "SDXRasterState.h"
#include "SDXMesh.h"
namespace SDXEngine
{
struct SDXDrawItem
{
XMFLOAT3 worldPos = XMFLOAT3(0.f, 0.f, 0.f);
XMFLOAT3 rotation = XMFLOAT3(0.f, 0.f, 0.f);
XMFLOAT3 scale = XMFLOAT3(1.f, 1.f, 1.f);
SDXMesh* mesh = nullptr;
};
class SDXRenderer
{
public:
SDXRenderer();
~SDXRenderer();
SDXErrorId Initialise(const SDXDirectXInfo& info);
void BeginDraw();
void EndDraw();
void Render(SDXDrawItem* drawItem);
void Render(const std::list<SDXDrawItem*>& drawList);
void UpdateProjectionMatrix(const XMFLOAT4X4& proj);
void UpdateViewMatrix(const XMFLOAT4X4& view);
void RenderText(UINT x, UINT y, const std::string& text);
// Tester methods
SDXErrorId CreateViewAndPerspective();
void UpdateTest();
void RenderCube();
void EnableWireFrame(bool bEnable);
SDXDirectX* GetDirectX();
private:
SDXDirectX m_directX;
SDXDirect2D m_direct2D;
// Testing
ID3D11Buffer* m_vertexBuffer;
ID3D11Buffer* m_indexBuffer;
int m_indexCount;
ConstantBufferStruct m_worldViewProj;
int m_testFrameCount;
SDXRasterState m_fillState;
SDXRasterState m_wireFrame;
};
}
| [
"mwctsang@gmail.com"
] | mwctsang@gmail.com |
3ea8fdf0f1d8fdccfde60f5ced1edf7a5792a09d | 95b4c39aa258a484e867027328efc9ff6010b1db | /util/Ext/typeid_cast.h | bc6034db180a44631b50bd0660c217778eda8af7 | [] | no_license | wusihang/db | d9d1067d4e4a145a56682cffaab64371079833a4 | 2d17871abd6135fbf60cd3083e78a6f79e7584ea | refs/heads/master | 2020-03-13T06:57:04.561319 | 2018-11-27T00:51:12 | 2018-11-27T00:51:12 | 131,015,240 | 0 | 1 | null | 2018-11-27T00:51:13 | 2018-04-25T14:01:22 | C | UTF-8 | C++ | false | false | 664 | h | #pragma once
#include <type_traits>
#include <typeinfo>
#include <string>
#include<Poco/Exception.h>
template <typename To, typename From>
typename std::enable_if<std::is_reference<To>::value, To>::type typeid_cast(From & from)
{
if (typeid(from) == typeid(To))
return static_cast<To>(from);
else
throw Poco::Exception("Bad cast from type " + std::string(typeid(from).name()) + " to " + std::string(typeid(To).name()));
}
template <typename To, typename From>
To typeid_cast(From * from)
{
if (typeid(*from) == typeid(typename std::remove_pointer<To>::type))
return static_cast<To>(from);
else
return nullptr;
}
| [
"wusihang9@139.com"
] | wusihang9@139.com |
ed920c83d7b4584a0fcb0fc0fea55f795d3fb57c | 1a9bb62b32771102c0b32ffefe305ca702bea268 | /tide/core/configuration/Configuration.h | 297ff1b68fc9def56ed0641fcb4aab1edb2a207e | [
"BSD-2-Clause"
] | permissive | BlueBrain/Tide | 9fa3a5b802026f204491eb625653d6e431c2bea8 | e35a8952b3c8ea86db098602f2d95fb4ba542dae | refs/heads/master | 2022-05-07T01:14:44.308665 | 2022-04-27T13:47:18 | 2022-04-27T13:47:18 | 54,562,203 | 52 | 21 | BSD-2-Clause | 2022-04-27T13:47:19 | 2016-03-23T13:33:25 | C++ | UTF-8 | C++ | false | false | 6,568 | h | /*********************************************************************/
/* Copyright (c) 2013-2018, EPFL/Blue Brain Project */
/* Raphael Dumusc <raphael.dumusc@epfl.ch> */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* 1. Redistributions of source code must retain the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer. */
/* */
/* 2. Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials */
/* provided with the distribution. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE ECOLE POLYTECHNIQUE */
/* FEDERALE DE LAUSANNE ''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 ECOLE */
/* POLYTECHNIQUE FEDERALE DE LAUSANNE OR CONTRIBUTORS BE */
/* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
/* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) */
/* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN */
/* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE */
/* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* */
/* The views and conclusions contained in the software and */
/* documentation are those of the authors and should not be */
/* interpreted as representing official policies, either expressed */
/* or implied, of Ecole polytechnique federale de Lausanne. */
/*********************************************************************/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include "configuration/Process.h"
#include "configuration/Screen.h"
#include "configuration/SurfaceConfig.h"
/**
* The Configuration manages all the parameters needed to setup the processes.
*
* @warning: this class can only be used AFTER creating a QApplication.
*/
class Configuration
{
public:
/** Default constructor used for deserialization. */
Configuration() = default;
/**
* Constructor
* @param filename \see Configuration
* @throw std::runtime_error if the file could not be read
*/
Configuration(const QString& filename);
/** The list of display surfaces. */
std::vector<SurfaceConfig> surfaces;
/** The list of render processes. */
std::vector<Process> processes;
struct Folders
{
/** Root directory for opening contents. */
QString contents;
/** Sessions directory. */
QString sessions;
/** Directory for uploading temporay contents via web interface. */
QString tmp;
/** Directory for saving session contents uploaded via web interface. */
QString upload;
} folders;
struct Global
{
SwapSync swapsync = SwapSync::software;
} global;
struct Launcher
{
/** DISPLAY identifier in string format for the Launcher. */
QString display;
/** URL of Rendering Resources Manager's API for the demo service. */
QString demoServiceUrl;
} launcher;
struct Master
{
/** Hostname where the application is running. */
QString hostname;
/** Display identifier in string format matching DISPLAY env_var. */
QString display;
/** Master application is headless (no visible window) */
bool headless = false;
/** Serial port used to control Planar equipment. */
QString planarSerialPort;
/** Port for the WebService server to listen for incoming requests. */
uint16_t webservicePort = 8888;
} master;
struct Settings
{
/** Informative name of the installation. */
QString infoName;
/** Timeout in minutes after which the screens should be turned off. */
uint inactivityTimeout = 60;
/** Number of touch points required to power on screens. */
uint touchpointsToWakeup = 1;
/** Maximum scaling factor for bitmap contents. */
double contentMaxScale = 0.0;
/** Maximum scaling factor for vectorial contents. */
double contentMaxScaleVectorial = 0.0;
} settings;
struct Webbrowser
{
/** URL used as start page when opening a Web Browser. */
QString defaultUrl;
/** Default size to use when opening a Web Browser. */
QSize defaultSize{1280, 1024};
} webbrowser;
struct Whiteboard
{
/** Directory used for saving whiteboard images. */
QString saveDir;
/** Default size to use when opening a Web Browser. */
QSize defaultSize{1920, 1080};
} whiteboard;
/**
* Save background changes to the current file.
* @return true on success, false on failure.
*/
bool saveBackgroundChanges() const;
/**
* Save background changes to the specified file.
* @param filename destination file.
* @return true on success, false on failure.
*/
bool saveBackgroundChanges(const QString& filename) const;
/** @return a default configuration, useful for comparing default values. */
static Configuration defaults();
private:
QString _filename;
bool _isXml() const;
void _loadJson();
void _loadXml();
bool _saveJson(const QString& saveFilename) const;
bool _saveXml(const QString& saveFilename) const;
void _setDefaults();
};
#endif
| [
"raphael.dumusc@epfl.ch"
] | raphael.dumusc@epfl.ch |
50373f7c8aa234bef1b3ad254de74dcc76433be1 | 26673266a372001ad9c10bda162ef373476fbf0f | /ObstacleMap.cpp | 43ae2318e128b8b726e0f1e83fefc672fea53fd8 | [] | no_license | megamareep/SmallGame | cb577f7a48b3433db2137e5db8e9d3085e28ebc0 | 9ca8314fecb61d3c1e8c5c24e6ded105b202ccfb | refs/heads/master | 2021-01-15T11:49:03.484997 | 2014-04-07T13:24:26 | 2014-04-07T13:24:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,553 | cpp | /*!
@ObstacleMap.cpp
*/
#include "ObstacleMap.h"
using namespace std;
ObstacleMap::ObstacleMap()
{
height = 0;
width = 0;
gridSquareSize = 0;
texture = LoadTexture::getInstance();
player = Player::getInstance();
//texture->Initialise();
}
ObstacleMap::~ObstacleMap()
{
}
void ObstacleMap::loadFromFile(const char * fileName)
{
ifstream inputFile;
istringstream parser;
string line;
char character;
int numberFromFile;
inputFile.open(fileName);//!< Opens the file
if(inputFile.is_open())//!< If the file is open
{
int enemyQuantity;
getline(inputFile,line);
parser.clear();
parser.str(line);
parser >> height >> width >> gridSquareSize;//!< Read in height and width of Map. Then the size of each square.
drawMap.resize(width);
for(int i=0;i<width;++i)
{
drawMap[i].resize(height);
}
colsMap.resize(width);
for(int i=0;i<width;++i)
{
colsMap[i].resize(height);
}
box.setSize(gridSquareSize,gridSquareSize);
int j = 0;
while ( getline(inputFile,line) )
{
int i = 0;
// Send the string reader to have our newly read line
parser.clear();
parser.str(line);
// Read all the numbers
while(parser >> character)
{
switch(character)
{
case '1':
box.setQuestionBlock(false);
box.setDestroyable(true);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);//!<Sets the position of the texture.
box.setTextureCoords(0*16,0);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '2':
box.setQuestionBlock(true);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(24*16,0);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '3':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(0*16,9*16);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '4':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(1*16,9*16);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '5':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(0*16,8*16);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '6':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(1*16,8*16);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '7':
box.setQuestionBlock(false);
box.setDestroyable(true);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(2*16,0*16);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case 'n':
box.setQuestionBlock(true);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(2*16,0*16);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '8':
box.setQuestionBlock(false);
box.setDestroyable(true);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(1*16,0);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '9':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(0*16,16);
box.setCoeffient(0.05f,6.f,1.0f,0.0f);
box.setInverseMass(0);
colsMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case 'o':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(16*16,8*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '|':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(16*16,9*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '/':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(8*16,8*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '\\'://!< Single Backslash escapes quote
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(10*16,8*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '[':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(10*16,9*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case ']':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(8*16,9*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case '^':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(9*16,8*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case 'h':
box.setQuestionBlock(false);
box.setDestroyable(false);
box.setPos(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
box.setTextureCoords(9*16,9*16);
//box.setCoeffient(0.05f,6.f,1.0f,0.0f);
//box.setInverseMass(0);
drawMap[i][j] = box;//!< Pushes a box into a vector of boxes
break;
case 'e':
enemy.Initialise(gridSquareSize,gridSquareSize,
i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
enemies.push_back(enemy);
break;
case 'c':
coin.Initialise(gridSquareSize,gridSquareSize,
i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2);
coins.push_back(coin);
break;
case 'p':
player->getPlayer()->setPos(Vector2D(i*gridSquareSize+gridSquareSize/2,j*gridSquareSize+gridSquareSize/2));
break;
default:
break;
}
//if(character == 'e')
//{
// //!< Pushes a box into a vector of boxes
//}
++i;
}
++j;
}
inputFile.close();
}
}
void ObstacleMap::setTextureCoords(int nx, int ny)
{
box.setTextureCoords(nx,ny);//!< Set the texture coordinate for the collidable box.
}
void ObstacleMap::draw(sf::RenderTarget &target, sf::RenderStates states)const
{
//box.setTextureCoords();
std::vector<std::vector<Box>>::const_iterator it;
std::vector<Box>::const_iterator it2;
//states.texture = ;
for(it = colsMap.begin(); it != colsMap.end(); ++it)
{
for(it2 = it->begin();it2 != it->end();++it2)
{
//!Draws Collidable boxes
it2->draw(target,texture->getTexture());
}
}
for(it = drawMap.begin(); it != drawMap.end(); ++it)
{
for(it2 = it->begin();it2 != it->end();++it2)
{
//!Draws none collidable boxes
it2->draw(target,texture->getTexture());
}
}
}
std::vector<std::vector<Box>> * ObstacleMap::getMap()
{
return &drawMap; //!< Returns the draw map
}
std::vector<std::vector<Box>> * ObstacleMap::getCollisions()
{
return &colsMap;//!< Returns the collision map.
}
std::list<Enemy> * ObstacleMap::getEnemies()
{
return &enemies;//!< Returns the list of enemies.
}
std::list<Coin> * ObstacleMap::getCoins()
{
return &coins;//!< Returns the list of coins.
}
| [
"megamareep@gmail.com"
] | megamareep@gmail.com |
0592ba078b8772fbbce1d2ec29ba1990b58e6d5a | ccddbc9b140b5630212f75f1654073edfdf8cfd9 | /Third/ExCode/bigNumber.cpp | 533936fab61bf334db0ff0543c1d000884f4fcb0 | [] | no_license | ksunchikk/oop | fd974d436dd6ab5bef4f078e9a537e101b075655 | 2530c625e224fad0df1e5e0cb545105edd0b5e5b | refs/heads/master | 2023-02-13T13:33:56.688722 | 2021-01-09T09:49:51 | 2021-01-09T09:49:51 | 296,397,165 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 8,418 | cpp | #include "bigNumber.h"
#include <cstdio>
#include <iostream>
namespace Prog3a {
bigDecNum::bigDecNum()
{
//знак +, все цифры - нули
for (int i = 0; i < SZ + 1; ++i) Num[i] = 0;
n = 1; //количество разрядов
}
//формирование из типа long int
bigDecNum::bigDecNum(long int x) {
//устанавливаем знак
if (x < 0)
Num[0] = 1;
else
Num[0] = 0;
long int a = abs(x);
int i = 1;
n = 0;
while (a) {
++n; //считаем количество разрядов
Num[i] = (a % 10);
a /= 10;
i++;
if (n > SZ)
throw std::invalid_argument("Overflow");
}
for (int j = SZ; j >= SZ - n + 1; j--) Num[j] = 0; //заполнение лидирующими нулями
}
//конструирование большого числа из строки
bigDecNum::bigDecNum(const char* str) {
Set(str);
}
bigDecNum& bigDecNum::Set(const char* str) {
std::string STR = str;
//определяем длину строки
int l = STR.std::string::length();
if (l > SZ + 1) throw std::invalid_argument("Too many chars!");
n = l;
if (str[0] == '-') {
Num[0] = 1;
n--;
}
else Num[0] = 0;
//проверка, есть ли в строке нецифровые символы
int pr1 = STR.std::string::find_first_not_of("-0123456789");
if (pr1 >= 0) {
bigDecNum a;
*this = a;
throw std::invalid_argument("Incorrect data. Your can only have 0-9 chars");
}
int z = 0;
int i = str[0] == '-' ? 1 : 0;
if ((str[0] == '-' && str[1] == '0') || str[0] == '0') {
while (str[i] == '0') { //считаем лидирующие нули
i++;
z++;
}
if (i == l) { //если вся строка состоит из нулей, то создаем ноль нашего класса
Num[0] = 0;
n = 1;
for (int i = 1; i < SZ + 1; ++i) Num[i] = 0;
return *this;
}
}
n -= z; //количество разрядов не учитывает лидирующие нули
i = l - 1; //идем со старших разрядов
for (int k = 1; k <= n; k++) {
Num[k] = str[i] - '0';
i--;
}
//заполнение лидирующими нулями
for (int k = SZ; k >= n + 1; k--) Num[k] = 0;
return *this;
}
bigDecNum bigDecNum::AddCode() const {
bigDecNum a;
if (Num[0] == 0)
return *this;
int pr = 1;
for (int i = 1; i <= SZ; i++) {
if (pr && Num[i] != 0) {
a.Num[i] = 10 - Num[i];
pr = 0;
}
else if (!pr)
a.Num[i] = 9 - Num[i];
}
a.n = n;
if (Num[1] == 0) a.Num[1] = 0;
a.Num[0] = Num[0];
return a;
}
bool bigDecNum::Large(const bigDecNum& t) const {
if (n > t.n) return true;
if (t.n > n) return false;
if (t.n == n) {
for (int i = n; i >= 1; i--) {
if (Num[i] > t.Num[i]) return true;
if (t.Num[i] > Num[i]) return false;
}
}
return true;
}
bigDecNum bigDecNum::Sum(const bigDecNum& t)const
{
int dop = 0;
bool index = (Num[0] == t.Num[0]);
int j = n >= t.n ? n : t.n;
bigDecNum s1 = (this)->AddCode(), s2(t.AddCode());
for (int i = 0; i <= SZ; i++) {
if (s1.Num[i] + s2.Num[i] + dop < 10) {
s1.Num[i] = s1.Num[i] + s2.Num[i] + dop;
dop = 0;
}
else {
s1.Num[i] = s1.Num[i] + s2.Num[i] + dop - 10;
dop = 1;
}
}
if ((dop > 0) && index && ((Num[SZ] != 0) || (t.Num[SZ] != 0)))
throw std::invalid_argument("Overflow!");
if (!index) {
if ((this)->Large(t)) {
s1.Num[0] = Num[0];
}
else if (t.Large(*this)) {
s1.Num[0] = t.Num[0];
}
else {
s1.Num[0] = 0;
s1.n = 1;
return s1;
}
}
else
s1.Num[0] = Num[0];
s1 = s1.AddCode();
if (j < SZ) j += 1;
for (int i = j; i > 0; i--) {
if (s1.Num[i] != 0) {
s1.n = i;
break;
}
}
return s1;
}
bigDecNum bigDecNum::Sub(bigDecNum t) const {
bigDecNum s2 = t, s1 = *this;
if (s2.Num[0] == 0) s2.Num[0] = 1;
else s2.Num[0] = 0;
s1 = s1.Sum(s2);
return s1;
}
bigDecNum bigDecNum::Inc10() const
{
bigDecNum inc;
inc.n = n + 1;
if (n == 1 && Num[1] == 0) {
inc.n = 1;
return inc;
}
if (Num[SZ] != 0)
throw std::invalid_argument("Overflow!");
inc.Num[0] = Num[0];
inc.Num[1] = 0;
for (int i = n; i >= 1; i--)
inc.Num[i + 1] = Num[i];
return inc;
}
bigDecNum bigDecNum::Dec10() const
{
bigDecNum inc;
inc.n = n - 1;
if (n == 1) {
inc.n = 1;
return inc;
}
inc.Num[0] = Num[0];
for (int i = n; i >= 2; i--)
inc.Num[i - 1] = Num[i];
return inc;
}
bigDecNum bigDecNum::Input() const {
const char* ptr = "";
std::string ss;
std::cin >> ss;
if (ss.std::string::length() > SZ + 1)
throw std::invalid_argument("Overflow!");
ptr = ss.c_str();
std::cin.clear();
bigDecNum decNum(ptr);
std::cout << std::endl;
return decNum;
}
void bigDecNum::Print() const {
if (Num[0] == 1)
std::cout << "-";
bool k = false;
if (n == 1) {
if (Num[1] == 0) k = true;
}
if (k) std::cout << 0;
if (n == 1 && Num[1] == 0) std::cout << 0;
else {
for (int i = n; i >= 1; i--) {
int t = Num[i];
std::cout << t;
}
}
std::cout << std::endl;
}
//для тестов
int bigDecNum::ToInt() const {
int i = 0;
int pow = 1;
if (n > 50)
throw std::invalid_argument("Too many chars!");
for (int k = 1; k <= n; k++) {
i += Num[k] * pow;
pow *= 10;
}
i = Num[0] == 0 ? i : -i;
return i;
}
/// dialog functions
int dialog(const char* msgs[], int N) {
std::string errmsg;
int rc, n;
do {
std::cout << errmsg;
errmsg = "You are wrong. Repeat, please\n";
for (int j = 0; j < N; ++j)
puts(msgs[j]);
puts("Make your choice: --> ");
n = getInt(rc);
if (n == 0)
rc = 0;
} while (rc < 0 || rc >= N);
return rc;
}
int dialog_getAddCode(bigDecNum& f) {
try {
std::cout << "There is an add-code for your first num: ";
f.AddCode().Print();
}
catch (std::exception& ex) {
std::cout << ex.what() << std::endl;
}
return 1;
}
int dialog_inc10(bigDecNum& f) {
try {
bigDecNum f1 = f.Inc10();
std::cout << "Received number: ";
f1.Print();
std::cout << std::endl;
}
catch (const std::exception& msg) {
std::cout << msg.what() << std::endl;
}
return 1;
}
int dialog_dec10(bigDecNum& f) {
try {
bigDecNum f1 = f.Dec10();
std::cout << "Received number: ";
f1.Print();
std::cout << std::endl;
}
catch (const std::exception& msg) {
std::cout << msg.what() << std::endl;
}
return 1;
}
///
} | [
"k151201@yandex.ru"
] | k151201@yandex.ru |
4d73cc07efeb029b65692723e40d589e8fd725ef | eb1d2c439aa39a699efbe67221d2ce60355ee334 | /main.cpp | d2c135a35b0841fa051c3dc1493836c711cfbcac | [] | no_license | ruthbijaoui/hw9 | 2ba73642061c29858d9ed5fb31aa098242d4738d | fc43e590330d995306c97b1d0b643a3d6c77d3fe | refs/heads/main | 2023-02-23T18:45:08.044951 | 2021-01-30T16:21:19 | 2021-01-30T16:21:19 | 333,941,916 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,166 | cpp | #include <iostream>
#include <cstring>
#include "ip.h"
#include "port.h"
extern int check_args(int, char**);
extern void parse_input(Field&);
int main(int argc, char** argv) {
String* output;
size_t size = 0;
/* Check that the parameters of main method are correct */
if (check_args(argc, argv) != 0) {
return -1;
}
String new_rule(argv[1]);
new_rule.split("=", &output, &size);
String new_rule_name(output[0].trim());
String new_rule_val(output[1].trim());
/* Check if the command is IP */
if ((new_rule_name.equals("src-ip")) || (new_rule_name.equals("dst-ip"))) {
Ip ip(new_rule_name);
ip.set_value(new_rule_val);
parse_input(ip); /* Receives a reference to IP objects */
} /* and print the captured packets that */
/* meet the defined rules. */
/* Check if the command is port */
if((new_rule_name.equals("src-port")) || (new_rule_name.equals("dst-port"))) {
Port port(new_rule_name);
port.set_value(new_rule_val);
parse_input(port); /* Receives a reference to port objects */
} /* and print the captured packets that */
delete[] output; /* meet the defined rules. */
return 0;
}
| [
"ruthbijaoui"
] | ruthbijaoui |
2c141e0a8dbd034e3a30fc5d5c44a85ff02c4cbe | 3e5ae9b260b16fcc86bb0669c1bd4e56912b5433 | /VCB600ENU1/MSDN_VCB/SAMPLES/VC98/MFC/GENERAL/SNAPVW/SNAPPS.H | 01f7981508fc0a467886e459561a64b889340833 | [] | no_license | briancpark/deitel-cpp | e8612c7011c9d9d748290419ae2708d2f3f11543 | 90cdae5661718e65ab945bcf45fe6adff30c1e10 | refs/heads/main | 2023-06-14T14:07:05.497253 | 2021-07-05T01:46:04 | 2021-07-05T01:46:04 | 382,984,213 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,480 | h | #if !defined(AFX_SNAPPS_H__E2FD70FC_605F_11D1_A346_00C04FD91807__INCLUDED_)
#define AFX_SNAPPS_H__E2FD70FC_605F_11D1_A346_00C04FD91807__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SnapPs.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CSnapPropertySheet
class CSnapPropertySheet : public CPropertySheet
{
DECLARE_DYNAMIC(CSnapPropertySheet)
// Construction
public:
CSnapPropertySheet() : CPropertySheet() { }
CSnapPropertySheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
CSnapPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSnapPropertySheet)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CSnapPropertySheet();
// Generated message map functions
protected:
//{{AFX_MSG(CSnapPropertySheet)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SNAPPS_H__E2FD70FC_605F_11D1_A346_00C04FD91807__INCLUDED_)
| [
"briancpark@berkeley.edu"
] | briancpark@berkeley.edu |
fbab7dfdc2b5e4a7ad4d47e9e08373704ee5705a | c237a84cbb8ce7742233249391ac57324bd50ee9 | /Neo_Study/0828_API_03_BLOCKGAME/SceneManager.cpp | 2d56d45cef34d8855ebcdf373b281078f8959731 | [] | no_license | JongHyunP/PJH | f7e0b597594520a2dc82eed249a87da599c38a17 | 621bf2385197cd2ba445ae1b5dcb38489aa5d6ed | refs/heads/master | 2020-07-07T06:48:47.162030 | 2019-10-24T00:06:07 | 2019-10-24T00:06:07 | 203,282,005 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 626 | cpp | #include "SceneManager.h"
SceneManager::SceneManager()
{
}
SceneManager::~SceneManager()
{
}
void SceneManager::registerScene(const string & sceneName, Scene * scene)
{
sceneContainer.insert(pair<string,Scene*>(sceneName, scene));
}
void SceneManager::reserveChangeScene(const string & sceneName)
{
map<string, Scene*>::iterator iter;
iter = sceneContainer.find(sceneName);
}
void SceneManager::Update(int sceneUpdatenum) //입력 받으면 바꿔주고
{
switch (sceneUpdatenum)
{
case 1:
break;
case 2:
break;
default:
break;
}
}
void SceneManager::Render(HDC hdc, float dt) // 그려준다.
{
}
| [
"Administrator@DESKTOP-UPBBAIM"
] | Administrator@DESKTOP-UPBBAIM |
4de4d446c75776fb8e30e043fbdb19a35617595e | 62c5835005ce84cd7f18cefb1ad3b5ee46e20ecc | /src/Eta.h | 2e0d576c34f02c339223c60c35a7cd5b254c2f0f | [] | no_license | s-jeong/MSBS | b5ca0a938ab0c13c7d7e76a1267ecc3c788d2a76 | d911084bba137867cffd68241d41115f4c3a4847 | refs/heads/master | 2023-07-09T13:41:44.479595 | 2021-08-21T15:40:31 | 2021-08-21T15:40:31 | 286,003,613 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 814 | h | #ifndef _ETA_H
#define _ETA_H
#include <RcppArmadillo.h>
using namespace Rcpp;
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::export]]
IntegerVector Eta(List delta, IntegerVector gamma, int p, int q) {
int total_length = 0;
for (int i = 0; i < p; ++i){
total_length += Rf_length(delta[i]);
}
IntegerVector ind(p);
ind[gamma[Range(0,p-1)]==2] = 1;
int index = 0;
IntegerVector vecdelta(total_length+q);
for(int i = 0; i < p; i++) {
IntegerVector tempdelta=as<IntegerVector>(wrap(delta[i]))*ind(i);
if(gamma[i]==1) {
tempdelta[0]=1;
}
std::copy(tempdelta.begin(), tempdelta.end(), vecdelta.begin() + index);
index += tempdelta.size();
}
if(q > 0.5){
std::copy(gamma[Range(p,p+q-1)].begin(), gamma[Range(p,p+q-1)].end(), vecdelta.begin() + index);
}
return vecdelta;
}
#else
#endif
| [
"sjeong823@gmail.com"
] | sjeong823@gmail.com |
97833e08f5190c867189f6d6bdcd765e0436f676 | d7285a8b2ed222c0e0870e29374d0ba644aa9622 | /03.cpp | 83da72012caccd5563cdbf2e0c82cac8df29d00c | [] | no_license | ANAGHA-R-NAIR/assignment-3 | acf5cc1e42a7826dd9d2bdcd613afe428e59ca36 | a02082be6217cf741e1fe833bef30827968aaa5d | refs/heads/master | 2021-01-23T10:22:09.529333 | 2017-09-15T15:16:49 | 2017-09-15T15:16:49 | 102,612,478 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 221 | cpp | #include<iostream>
using namespace std;
main(){
int a;
cout<<"Enter number= ";
cin>>a;
if( a<0) {
cout<<"Negative number"<<endl;
}else if(a>0) {
cout<<"Positive number"<<endl;
}else{
cout<<"Number=0"<<endl;
}
return 0;
}
| [
"noreply@github.com"
] | ANAGHA-R-NAIR.noreply@github.com |
7fc04c794ab80b01acb34b7a63b9bdbb86444e1b | 2eecc41bc8ae893490b30e3abd9808bbd2bd6bdb | /Source/DirectX11Texture.cpp | 278a4cd13f1a17ac6ce27b97da5abbd3c9e725ff | [] | no_license | shadercoder/scge | d991230860573a56a44f3ecac2de38c4f25a67f3 | cec2bb285aa284206b4d41b9bbbf129a151bf200 | refs/heads/master | 2021-01-10T04:20:19.240225 | 2012-11-05T22:50:20 | 2012-11-05T22:50:20 | 44,643,412 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,637 | cpp | #include "scge\Graphics\DirectX11\DirectX11Texture.h"
#include <string>
#include <fstream>
#include <sstream>
DirectX11TextureData::DirectX11TextureData(ID3D11Device *d3d11Device, Console &console, FileSystem &fileSystem, bool multiThreadLoad, const std::string &arguments)
: TextureResourceData(fileSystem)
, mConsole(console)
, mD3D11Device(d3d11Device)
, mMultiThreadLoad(multiThreadLoad)
{
mFileName = arguments;
}
std::unique_ptr<Resource> DirectX11TextureData::createResource() const
{
return std::unique_ptr<Resource>(new DirectX11Texture(this));
}
bool DirectX11Texture::Load()
{
std::ifstream file = mResourceData->mFileSystem.OpenFileRead(mResourceData->mFileName, true);
if(!file || !file.is_open())
return true;
file.seekg(0, std::ios::end);
std::ifstream::pos_type length = file.tellg();
file.seekg(0, std::ios::beg);
if(length <= 0)
return true;
mLoadingData.resize((unsigned int)length);
file.read(mLoadingData.data(), length);
return mResourceData->mMultiThreadLoad && finaliseLoad();
}
bool DirectX11Texture::Finalise()
{
if(!mResourceData->mMultiThreadLoad && finaliseLoad())
return true;
registerForChanges();
return false;
}
bool DirectX11Texture::finaliseLoad()
{
if(FAILED(D3DX11CreateShaderResourceViewFromMemory(mResourceData->mD3D11Device, mLoadingData.data(), mLoadingData.size(), nullptr, nullptr, mTextureSRV.getModifiablePointer(), nullptr)))
return true;
mLoadingData.clear();
return false;
}
void DirectX11Texture::Release()
{
unregisterForChanges();
mTextureSRV.Release();
mLoadingData.clear();
} | [
"quaver.smith@0469fb3b-1f0d-998d-8d12-02512b85cd7a"
] | quaver.smith@0469fb3b-1f0d-998d-8d12-02512b85cd7a |
4a749cb60b637b01dbd5ed6da0898f7c7ddf8bdc | 6a2b431dbccff26a1a092ed506bebdfa4ae261b8 | /VectTypes/VectVert.hpp | a7bb4aa5c0c97a76da9f1a96f4375114359cb6bd | [] | no_license | l-GlebaTi-l/VectHoriVert | e75781bb7955d6550b62d57c91a0687183814ef3 | ddbf976420ee026fd4ca57fdae0518b1518294b3 | refs/heads/master | 2022-09-18T16:53:40.507211 | 2020-06-03T12:01:22 | 2020-06-03T12:01:22 | 269,068,309 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 274 | hpp | class CStringVert : public CString {
public:
using CString::operator=;
CStringVert(char *str) : CString(str){}
int output();
};
class FactoryCStringVert : public CFabricData{
public:
CString* Create(char *str){
return new CStringVert(str);
}
};
| [
"gleban37@rambler.ru"
] | gleban37@rambler.ru |
a56741b839854b815bc2c9af710b293492279984 | 41b4e949f031f189ac27f16cb45fc29801c1cebb | /frameworks/base/services/surfaceflinger/Layer.cpp | 307ef5531dc183934df2fab827070be809e70e83 | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | MeteorOS-project/android_gingerbread_inspiration | b9d498c79ace82c6dd1a0ec9f26aedca8e9804d5 | 80269edd6df74514e37d87cfabd3570123cd80f1 | refs/heads/master | 2023-05-23T04:42:55.879988 | 2015-02-22T06:14:57 | 2015-02-22T06:14:57 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 34,385 | cpp | /*
* Copyright (C) 2007 The Android Open Source Project
* Copyright (C) 2010, Code Aurora Forum. 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 <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
#include <cutils/properties.h>
#include <cutils/native_handle.h>
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/StopWatch.h>
#include <ui/GraphicBuffer.h>
#include <ui/PixelFormat.h>
#include <surfaceflinger/Surface.h>
#include "clz.h"
#include "GLExtensions.h"
#include "Layer.h"
#include "SurfaceFlinger.h"
#include "DisplayHardware/DisplayHardware.h"
#if defined(TARGET_USES_OVERLAY)
#include "overlayLib.h"
#endif
#define DEBUG_RESIZE 0
namespace android {
template <typename T> inline T min(T a, T b) {
return a<b ? a : b;
}
// ---------------------------------------------------------------------------
Layer::Layer(SurfaceFlinger* flinger,
DisplayID display, const sp<Client>& client)
: LayerBaseClient(flinger, display, client),
mGLExtensions(GLExtensions::getInstance()),
mNeedsBlending(true),
mNeedsDithering(false),
mSecure(false),
mTextureManager(),
mBufferManager(mTextureManager),
mWidth(0), mHeight(0), mNeedsScaling(false), mFixedSize(false),
mBypassState(false)
{
}
Layer::~Layer()
{
// FIXME: must be called from the main UI thread
EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
mBufferManager.destroy(dpy);
// we can use getUserClientUnsafe here because we know we're
// single-threaded at that point.
sp<UserClient> ourClient(mUserClientRef.getUserClientUnsafe());
if (ourClient != 0) {
ourClient->detachLayer(this);
}
if(getStereoscopic3DFormat()) {
const DisplayHardware& hw(mFlinger->graphicPlane(0).displayHardware());
hw.videoOverlayStarted(false);
mFlinger->enableOverlayOpt(true);
}
}
status_t Layer::setToken(const sp<UserClient>& userClient,
SharedClient* sharedClient, int32_t token)
{
int numbuffers = mBufferManager.getDefaultBufferCount();
#if defined(SF_BYPASS)
if (getLayerInitFlags() & ISurfaceComposer::eFullScreen) {
numbuffers = 3;
mBufferManager.resize(numbuffers);
}
#endif
sp<SharedBufferServer> lcblk = new SharedBufferServer(
sharedClient, token, numbuffers,
getIdentity());
status_t err = mUserClientRef.setToken(userClient, lcblk, token);
LOGE_IF(err != NO_ERROR,
"ClientRef::setToken(%p, %p, %u) failed",
userClient.get(), lcblk.get(), token);
if (err == NO_ERROR) {
// we need to free the buffers associated with this surface
}
return err;
}
int32_t Layer::getToken() const
{
return mUserClientRef.getToken();
}
sp<UserClient> Layer::getClient() const
{
return mUserClientRef.getClient();
}
// called with SurfaceFlinger::mStateLock as soon as the layer is entered
// in the purgatory list
void Layer::onRemoved()
{
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (lcblk) {
// wake up the condition
lcblk->setStatus(NO_INIT);
}
// If original resolution surface, close current VG channels.
// Notify gralloc of the end of current playback.
if(getUseOriginalSurfaceResolution()) {
const DisplayHardware& hw(graphicPlane(0).displayHardware());
hw.stopOrigResDisplay();
freeBypassBuffers();
}
}
sp<LayerBaseClient::Surface> Layer::createSurface() const
{
return mSurface;
}
status_t Layer::ditch()
{
// NOTE: Called from the main UI thread
// the layer is not on screen anymore. free as much resources as possible
mFreezeLock.clear();
EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
mBufferManager.destroy(dpy);
mSurface.clear();
Mutex::Autolock _l(mLock);
mWidth = mHeight = 0;
return NO_ERROR;
}
status_t Layer::setBuffers( uint32_t w, uint32_t h,
PixelFormat format, uint32_t flags)
{
// this surfaces pixel format
PixelFormatInfo info;
status_t err = getPixelFormatInfo(format, &info);
if (err) return err;
// the display's pixel format
const DisplayHardware& hw(graphicPlane(0).displayHardware());
uint32_t const maxSurfaceDims = min(
hw.getMaxTextureSize(), hw.getMaxViewportDims());
// never allow a surface larger than what our underlying GL implementation
// can handle.
if ((uint32_t(w)>maxSurfaceDims) || (uint32_t(h)>maxSurfaceDims)) {
return BAD_VALUE;
}
PixelFormatInfo displayInfo;
getPixelFormatInfo(hw.getFormat(), &displayInfo);
const uint32_t hwFlags = hw.getFlags();
mFormat = format;
mWidth = w;
mHeight = h;
mReqFormat = format;
mReqWidth = w;
mReqHeight = h;
mSecure = (flags & ISurfaceComposer::eSecure) ? true : false;
mNeedsBlending = (info.h_alpha - info.l_alpha) > 0;
// we use the red index
int displayRedSize = displayInfo.getSize(PixelFormatInfo::INDEX_RED);
int layerRedsize = info.getSize(PixelFormatInfo::INDEX_RED);
mNeedsDithering = layerRedsize > displayRedSize;
mSurface = new SurfaceLayer(mFlinger, this);
return NO_ERROR;
}
void Layer::reloadTexture(const Region& dirty)
{
sp<GraphicBuffer> buffer(mBufferManager.getActiveBuffer());
if (buffer == NULL) {
// this situation can happen if we ran out of memory for instance.
// not much we can do. continue to use whatever texture was bound
// to this context.
return;
}
if (mGLExtensions.haveDirectTexture()) {
EGLDisplay dpy(mFlinger->graphicPlane(0).getEGLDisplay());
if (mBufferManager.initEglImage(dpy, buffer) != NO_ERROR) {
// not sure what we can do here...
goto slowpath;
}
} else {
slowpath:
GGLSurface t;
if (buffer->usage & GRALLOC_USAGE_SW_READ_MASK) {
status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN);
LOGE_IF(res, "error %d (%s) locking buffer %p",
res, strerror(res), buffer.get());
if (res == NO_ERROR) {
mBufferManager.loadTexture(dirty, t);
buffer->unlock();
}
} else {
// we can't do anything
}
}
}
void Layer::drawForSreenShot() const
{
const bool currentFiltering = mNeedsFiltering;
const_cast<Layer*>(this)->mNeedsFiltering = true;
LayerBase::drawForSreenShot();
const_cast<Layer*>(this)->mNeedsFiltering = currentFiltering;
}
status_t Layer::freeBypassBuffers() const
{
if (!isOverlayUsed())
return NO_ERROR;
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (lcblk)
lcblk->setInUseBypass(-1);
setOverlayUsed(false);
return NO_ERROR;
}
status_t Layer::freeBypassBuffers(bool clearOverlayFlag) const
{
if (!isOverlayUsed())
return NO_ERROR;
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (lcblk)
lcblk->setInUseBypass(-1);
if (clearOverlayFlag)
setOverlayUsed(false);
return NO_ERROR;
}
status_t Layer::setBufferInUse() const
{
Texture tex(mBufferManager.getActiveTexture());
if (tex.image == EGL_NO_IMAGE_KHR)
return INVALID_OPERATION;
GLuint textureName = tex.name;
if (UNLIKELY(textureName == -1LU)) {
return INVALID_OPERATION;
}
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (lcblk) {
int buf = mBufferManager.getActiveBufferIndex();
if (buf >= 0)
lcblk->setInUseBypass(buf);
}
return NO_ERROR;
}
status_t Layer::drawWithOverlay(const Region& clip,
bool hdmiConnected, bool ignoreFB) const
{
#if defined(TARGET_USES_OVERLAY)
Texture tex(mBufferManager.getActiveTexture());
if (tex.image == EGL_NO_IMAGE_KHR)
return INVALID_OPERATION;
GLuint textureName = tex.name;
if (UNLIKELY(textureName == -1LU)) {
return INVALID_OPERATION;
}
const DisplayHardware& hw(graphicPlane(0).displayHardware());
if(getUseOriginalSurfaceResolution()){
sp<GraphicBuffer> buffer(mBufferManager.getActiveBuffer());
buffer_handle_t handle = (buffer->getNativeBuffer())->handle;
hw.postOrigResBuffer(handle, mWidth, mHeight, mFormat, getOrientation());
setOverlayUsed(true);
setBufferInUse();
return NO_ERROR;
}
overlay::Overlay* temp = hw.getOverlayObject();
int s3dFormat = getStereoscopic3DFormat();
if (s3dFormat) {
hw.videoOverlayStarted(true);
}
if (!temp->setSource(mWidth, mHeight, mFormat|s3dFormat,
getOrientation(), hdmiConnected,
ignoreFB, mBufferManager.getNumBuffers()))
return INVALID_OPERATION;
if ((s3dFormat) && !temp->setCrop(0, 0, mWidth, mHeight))
return INVALID_OPERATION;
const Rect bounds(mTransformedBounds);
int x = bounds.left;
int y = bounds.top;
int w = bounds.width();
int h = bounds.height();
int ovpos_x, ovpos_y;
uint32_t ovpos_w, ovpos_h;
bool ret;
if (ret = temp->getPosition(ovpos_x, ovpos_y, ovpos_w, ovpos_h)) {
if ((ovpos_x != x) || (ovpos_y != y) || (ovpos_w != w) || (ovpos_h != h)) {
ret = temp->setPosition(x, y, w, h);
}
} else
ret = temp->setPosition(x, y, w, h);
if (!ret)
return INVALID_OPERATION;
int orientation;
if (ret = temp->getOrientation(orientation)) {
if (orientation != getOrientation())
ret = temp->setParameter(OVERLAY_TRANSFORM, getOrientation());
}
else
ret = temp->setParameter(OVERLAY_TRANSFORM, getOrientation());
if (!ret)
return INVALID_OPERATION;
sp<GraphicBuffer> buffer(mBufferManager.getActiveBuffer());
buffer_handle_t handle = (buffer->getNativeBuffer())->handle;
ret = temp->queueBuffer(handle);
if (!ret)
return INVALID_OPERATION;
if (!ignoreFB)
clearWithOpenGL(clip);
setOverlayUsed(true);
return NO_ERROR;
#endif
return INVALID_OPERATION;
}
void Layer::onDraw(const Region& clip) const
{
Texture tex(mBufferManager.getActiveTexture());
if (tex.name == -1LU) {
// the texture has not been created yet, this Layer has
// in fact never been drawn into. This happens frequently with
// SurfaceView because the WindowManager can't know when the client
// has drawn the first time.
// If there is nothing under us, we paint the screen in black, otherwise
// we just skip this update.
// figure out if there is something below us
Region under;
const SurfaceFlinger::LayerVector& drawingLayers(mFlinger->mDrawingState.layersSortedByZ);
const size_t count = drawingLayers.size();
for (size_t i=0 ; i<count ; ++i) {
const sp<LayerBase>& layer(drawingLayers[i]);
if (layer.get() == static_cast<LayerBase const*>(this))
break;
under.orSelf(layer->visibleRegionScreen);
}
// if not everything below us is covered, we plug the holes!
Region holes(clip.subtract(under));
if (!holes.isEmpty()) {
clearWithOpenGL(holes, 0, 0, 0, 1);
}
return;
}
drawWithOpenGL(clip, tex);
const DisplayHardware& hw(mFlinger->graphicPlane(0).displayHardware());
if(hw.getDumpframe()){
const_cast<DumpFrame&>(mDumpFrame).dump(this, clip);
}
}
bool Layer::needsFiltering() const
{
if (!(mFlags & DisplayHardware::SLOW_CONFIG)) {
// if our buffer is not the same size than ourselves,
// we need filtering.
Mutex::Autolock _l(mLock);
if (mNeedsScaling)
return true;
}
return LayerBase::needsFiltering();
}
status_t Layer::setBufferCount(int bufferCount)
{
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (!lcblk) {
// oops, the client is already gone
return DEAD_OBJECT;
}
// NOTE: lcblk->resize() is protected by an internal lock
status_t err = lcblk->resize(bufferCount);
if (err == NO_ERROR)
mBufferManager.resize(bufferCount);
return err;
}
sp<GraphicBuffer> Layer::requestBuffer(int index,
uint32_t reqWidth, uint32_t reqHeight, uint32_t reqFormat,
uint32_t usage)
{
sp<GraphicBuffer> buffer;
if (int32_t(reqWidth | reqHeight | reqFormat) < 0)
return buffer;
if ((!reqWidth && reqHeight) || (reqWidth && !reqHeight))
return buffer;
// this ensures our client doesn't go away while we're accessing
// the shared area.
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (!lcblk) {
// oops, the client is already gone
return buffer;
}
/*
* This is called from the client's Surface::dequeue(). This can happen
* at any time, especially while we're in the middle of using the
* buffer 'index' as our front buffer.
*/
uint32_t w, h, f, bypass;
{ // scope for the lock
Mutex::Autolock _l(mLock);
bypass = mBypassState;
// zero means default
mFixedSize = reqWidth && reqHeight;
if (!reqFormat) reqFormat = mFormat;
if (!reqWidth) reqWidth = mWidth;
if (!reqHeight) reqHeight = mHeight;
w = reqWidth;
h = reqHeight;
f = reqFormat;
if ((reqWidth != mReqWidth) || (reqHeight != mReqHeight) ||
(reqFormat != mReqFormat)) {
mReqWidth = reqWidth;
mReqHeight = reqHeight;
mReqFormat = reqFormat;
mNeedsScaling = mWidth != mReqWidth || mHeight != mReqHeight;
lcblk->reallocateAllExcept(index);
}
}
// here we have to reallocate a new buffer because the buffer could be
// used as the front buffer, or by a client in our process
// (eg: status bar), and we can't release the handle under its feet.
uint32_t effectiveUsage = getEffectiveUsage(usage);
status_t err = NO_MEMORY;
if (err != NO_ERROR) {
buffer = new GraphicBuffer(w, h, f, effectiveUsage);
err = buffer->initCheck();
}
if (err || buffer->handle == 0) {
GraphicBuffer::dumpAllocationsToSystemLog();
LOGE_IF(err || buffer->handle == 0,
"Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d failed (%s)",
this, index, w, h, strerror(-err));
} else {
LOGD_IF(DEBUG_RESIZE,
"Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d, handle=%p",
this, index, w, h, buffer->handle);
}
if (err == NO_ERROR && buffer->handle != 0) {
Mutex::Autolock _l(mLock);
mBufferManager.attachBuffer(index, buffer);
}
return buffer;
}
uint32_t Layer::getEffectiveUsage(uint32_t usage) const
{
/*
* buffers used for software rendering, but h/w composition
* are allocated with SW_READ_OFTEN | SW_WRITE_OFTEN | HW_TEXTURE
*
* buffers used for h/w rendering and h/w composition
* are allocated with HW_RENDER | HW_TEXTURE
*
* buffers used with h/w rendering and either NPOT or no egl_image_ext
* are allocated with SW_READ_RARELY | HW_RENDER
*
*/
if (mSecure) {
// secure buffer, don't store it into the GPU
usage = GraphicBuffer::USAGE_SW_READ_OFTEN |
GraphicBuffer::USAGE_SW_WRITE_OFTEN;
} else {
// it's allowed to modify the usage flags here, but generally
// the requested flags should be honored.
// request EGLImage for all buffers
usage |= GraphicBuffer::USAGE_HW_TEXTURE;
}
return usage;
}
bool Layer::setBypass(bool enable)
{
#if defined(SF_BYPASS)
const DisplayHardware& hw(mFlinger->graphicPlane(0).displayHardware());
if (!hw.isOverlayUIEnabled() || getStereoscopic3DFormat() ||
getUseOriginalSurfaceResolution())
return false;
Mutex::Autolock _l(mLock);
if (mNeedsScaling || mNeedsFiltering) {
return false;
}
if (mBufferManager.getNumBuffers()
<= mBufferManager.getDefaultBufferCount())
return false;
if (mBypassState != enable) {
mBypassState = enable;
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (lcblk && enable) {
// all buffers need reallocation
lcblk->reallocateAll();
}
}
return true;
#endif
return false;
}
void Layer::updateBuffersOrientation()
{
sp<GraphicBuffer> buffer(getBypassBuffer());
if (buffer != NULL && mOrientation != buffer->transform) {
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (lcblk) { // all buffers need reallocation
lcblk->reallocateAll();
}
}
}
uint32_t Layer::doTransaction(uint32_t flags)
{
const Layer::State& front(drawingState());
const Layer::State& temp(currentState());
const bool sizeChanged = (front.requested_w != temp.requested_w) ||
(front.requested_h != temp.requested_h);
if (sizeChanged) {
// the size changed, we need to ask our client to request a new buffer
LOGD_IF(DEBUG_RESIZE,
"resize (layer=%p), requested (%dx%d), drawing (%d,%d)",
this,
int(temp.requested_w), int(temp.requested_h),
int(front.requested_w), int(front.requested_h));
if (!isFixedSize()) {
// we're being resized and there is a freeze display request,
// acquire a freeze lock, so that the screen stays put
// until we've redrawn at the new size; this is to avoid
// glitches upon orientation changes.
if (mFlinger->hasFreezeRequest()) {
// if the surface is hidden, don't try to acquire the
// freeze lock, since hidden surfaces may never redraw
if (!(front.flags & ISurfaceComposer::eLayerHidden)) {
mFreezeLock = mFlinger->getFreezeLock();
}
}
// this will make sure LayerBase::doTransaction doesn't update
// the drawing state's size
Layer::State& editDraw(mDrawingState);
editDraw.requested_w = temp.requested_w;
editDraw.requested_h = temp.requested_h;
// record the new size, form this point on, when the client request
// a buffer, it'll get the new size.
setBufferSize(temp.requested_w, temp.requested_h);
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (lcblk) {
// all buffers need reallocation
lcblk->reallocateAll();
}
} else {
// record the new size
setBufferSize(temp.requested_w, temp.requested_h);
}
}
if (temp.sequence != front.sequence) {
if (temp.flags & ISurfaceComposer::eLayerHidden || temp.alpha == 0) {
// this surface is now hidden, so it shouldn't hold a freeze lock
// (it may never redraw, which is fine if it is hidden)
mFreezeLock.clear();
}
}
return LayerBase::doTransaction(flags);
}
void Layer::setBufferSize(uint32_t w, uint32_t h) {
Mutex::Autolock _l(mLock);
mWidth = w;
mHeight = h;
mNeedsScaling = mWidth != mReqWidth || mHeight != mReqHeight;
}
bool Layer::isFixedSize() const {
Mutex::Autolock _l(mLock);
return mFixedSize;
}
// ----------------------------------------------------------------------------
// pageflip handling...
// ----------------------------------------------------------------------------
void Layer::lockPageFlip(bool& recomputeVisibleRegions)
{
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
if (!lcblk) {
// client died
recomputeVisibleRegions = true;
return;
}
ssize_t buf = lcblk->retireAndLock();
mNothingToUpdate = false;
if (buf == NOT_ENOUGH_DATA) {
// NOTE: This is not an error, it simply means there is nothing to
// retire. The buffer is locked because we will use it
// for composition later in the loop
mNothingToUpdate = true;
return;
}
if (buf < NO_ERROR) {
LOGE("retireAndLock() buffer index (%d) out of range", int(buf));
mPostedDirtyRegion.clear();
return;
}
// we retired a buffer, which becomes the new front buffer
if (mBufferManager.setActiveBufferIndex(buf) < NO_ERROR) {
LOGE("retireAndLock() buffer index (%d) out of range", int(buf));
mPostedDirtyRegion.clear();
return;
}
sp<GraphicBuffer> newFrontBuffer(getBuffer(buf));
if (newFrontBuffer != NULL) {
// get the dirty region
// compute the posted region
const Region dirty(lcblk->getDirtyRegion(buf));
mPostedDirtyRegion = dirty.intersect( newFrontBuffer->getBounds() );
// update the layer size and release freeze-lock
const Layer::State& front(drawingState());
if (newFrontBuffer->getWidth() == front.requested_w &&
newFrontBuffer->getHeight() == front.requested_h)
{
if ((front.w != front.requested_w) ||
(front.h != front.requested_h))
{
// Here we pretend the transaction happened by updating the
// current and drawing states. Drawing state is only accessed
// in this thread, no need to have it locked
Layer::State& editDraw(mDrawingState);
editDraw.w = editDraw.requested_w;
editDraw.h = editDraw.requested_h;
// We also need to update the current state so that we don't
// end-up doing too much work during the next transaction.
// NOTE: We actually don't need hold the transaction lock here
// because State::w and State::h are only accessed from
// this thread
Layer::State& editTemp(currentState());
editTemp.w = editDraw.w;
editTemp.h = editDraw.h;
// recompute visible region
recomputeVisibleRegions = true;
}
// we now have the correct size, unfreeze the screen
mFreezeLock.clear();
}
// get the crop region
setBufferCrop( lcblk->getCrop(buf) );
// get the transformation
setBufferTransform( lcblk->getTransform(buf) );
} else {
// this should not happen unless we ran out of memory while
// allocating the buffer. we're hoping that things will get back
// to normal the next time the app tries to draw into this buffer.
// meanwhile, pretend the screen didn't update.
mPostedDirtyRegion.clear();
}
if (lcblk->getQueuedCount()) {
// signal an event if we have more buffers waiting
mFlinger->signalEvent();
}
/* a buffer was posted, so we need to call reloadTexture(), which
* will update our internal data structures (eg: EGLImageKHR or
* texture names). we need to do this even if mPostedDirtyRegion is
* empty -- it's orthogonal to the fact that a new buffer was posted,
* for instance, a degenerate case could be that the user did an empty
* update but repainted the buffer with appropriate content (after a
* resize for instance).
*/
reloadTexture( mPostedDirtyRegion );
}
void Layer::unlockPageFlip(
const Transform& planeTransform, Region& outDirtyRegion)
{
Region dirtyRegion(mPostedDirtyRegion);
if (!dirtyRegion.isEmpty()) {
mPostedDirtyRegion.clear();
// The dirty region is given in the layer's coordinate space
// transform the dirty region by the surface's transformation
// and the global transformation.
const Layer::State& s(drawingState());
const Transform tr(planeTransform * s.transform);
dirtyRegion = tr.transform(dirtyRegion);
// At this point, the dirty region is in screen space.
// Make sure it's constrained by the visible region (which
// is in screen space as well).
dirtyRegion.andSelf(visibleRegionScreen);
outDirtyRegion.orSelf(dirtyRegion);
}
if (visibleRegionScreen.isEmpty()) {
// an invisible layer should not hold a freeze-lock
// (because it may never be updated and therefore never release it)
mFreezeLock.clear();
}
}
void Layer::dump(String8& result, char* buffer, size_t SIZE) const
{
LayerBaseClient::dump(result, buffer, SIZE);
ClientRef::Access sharedClient(mUserClientRef);
SharedBufferServer* lcblk(sharedClient.get());
uint32_t totalTime = 0;
if (lcblk) {
SharedBufferStack::Statistics stats = lcblk->getStats();
totalTime= stats.totalTime;
result.append( lcblk->dump(" ") );
}
sp<const GraphicBuffer> buf0(getBuffer(0));
sp<const GraphicBuffer> buf1(getBuffer(1));
uint32_t w0=0, h0=0, s0=0;
uint32_t w1=0, h1=0, s1=0;
if (buf0 != 0) {
w0 = buf0->getWidth();
h0 = buf0->getHeight();
s0 = buf0->getStride();
}
if (buf1 != 0) {
w1 = buf1->getWidth();
h1 = buf1->getHeight();
s1 = buf1->getStride();
}
snprintf(buffer, SIZE,
" "
"format=%2d, [%3ux%3u:%3u] [%3ux%3u:%3u],"
" freezeLock=%p, bypass=%d, dq-q-time=%u us\n",
mFormat, w0, h0, s0, w1, h1, s1,
getFreezeLock().get(), mBypassState, totalTime);
result.append(buffer);
}
// ---------------------------------------------------------------------------
Layer::ClientRef::ClientRef()
: mControlBlock(0), mToken(-1) {
}
Layer::ClientRef::~ClientRef() {
}
int32_t Layer::ClientRef::getToken() const {
Mutex::Autolock _l(mLock);
return mToken;
}
sp<UserClient> Layer::ClientRef::getClient() const {
Mutex::Autolock _l(mLock);
return mUserClient.promote();
}
status_t Layer::ClientRef::setToken(const sp<UserClient>& uc,
const sp<SharedBufferServer>& sharedClient, int32_t token) {
Mutex::Autolock _l(mLock);
{ // scope for strong mUserClient reference
sp<UserClient> userClient(mUserClient.promote());
if (mUserClient != 0 && mControlBlock != 0) {
mControlBlock->setStatus(NO_INIT);
}
}
mUserClient = uc;
mToken = token;
mControlBlock = sharedClient;
return NO_ERROR;
}
sp<UserClient> Layer::ClientRef::getUserClientUnsafe() const {
return mUserClient.promote();
}
// this class gives us access to SharedBufferServer safely
// it makes sure the UserClient (and its associated shared memory)
// won't go away while we're accessing it.
Layer::ClientRef::Access::Access(const ClientRef& ref)
: mControlBlock(0)
{
Mutex::Autolock _l(ref.mLock);
mUserClientStrongRef = ref.mUserClient.promote();
if (mUserClientStrongRef != 0)
mControlBlock = ref.mControlBlock;
}
Layer::ClientRef::Access::~Access()
{
}
// ---------------------------------------------------------------------------
Layer::BufferManager::BufferManager(TextureManager& tm)
: mNumBuffers(NUM_BUFFERS), mTextureManager(tm),
mActiveBuffer(-1), mFailover(false)
{
}
Layer::BufferManager::~BufferManager()
{
}
status_t Layer::BufferManager::resize(size_t size)
{
Mutex::Autolock _l(mLock);
mNumBuffers = size;
return NO_ERROR;
}
// only for debugging
sp<GraphicBuffer> Layer::BufferManager::getBuffer(size_t index) const {
return mBufferData[index].buffer;
}
status_t Layer::BufferManager::setActiveBufferIndex(size_t index) {
mActiveBuffer = index;
return NO_ERROR;
}
size_t Layer::BufferManager::getActiveBufferIndex() const {
return mActiveBuffer;
}
Texture Layer::BufferManager::getActiveTexture() const {
Texture res;
if (mFailover || mActiveBuffer<0) {
res = mFailoverTexture;
} else {
static_cast<Image&>(res) = mBufferData[mActiveBuffer].texture;
}
return res;
}
sp<GraphicBuffer> Layer::BufferManager::getActiveBuffer() const {
sp<GraphicBuffer> result;
const ssize_t activeBuffer = mActiveBuffer;
if (activeBuffer >= 0) {
BufferData const * const buffers = mBufferData;
Mutex::Autolock _l(mLock);
result = buffers[activeBuffer].buffer;
}
return result;
}
sp<GraphicBuffer> Layer::BufferManager::detachBuffer(size_t index)
{
BufferData* const buffers = mBufferData;
sp<GraphicBuffer> buffer;
Mutex::Autolock _l(mLock);
buffer = buffers[index].buffer;
buffers[index].buffer = 0;
return buffer;
}
status_t Layer::BufferManager::attachBuffer(size_t index,
const sp<GraphicBuffer>& buffer)
{
BufferData* const buffers = mBufferData;
Mutex::Autolock _l(mLock);
buffers[index].buffer = buffer;
buffers[index].texture.dirty = true;
return NO_ERROR;
}
status_t Layer::BufferManager::destroy(EGLDisplay dpy)
{
BufferData* const buffers = mBufferData;
size_t num;
{ // scope for the lock
Mutex::Autolock _l(mLock);
num = mNumBuffers;
for (size_t i=0 ; i<num ; i++) {
buffers[i].buffer = 0;
}
}
for (size_t i=0 ; i<num ; i++) {
destroyTexture(&buffers[i].texture, dpy);
}
destroyTexture(&mFailoverTexture, dpy);
return NO_ERROR;
}
status_t Layer::BufferManager::initEglImage(EGLDisplay dpy,
const sp<GraphicBuffer>& buffer)
{
status_t err = NO_INIT;
ssize_t index = mActiveBuffer;
if (index >= 0) {
if (!mFailover) {
{
// Without that lock, there is a chance of race condition
// where while composing a specific index, requestBuf
// with the same index can be executed and touch the same data
// that is being used in initEglImage.
// (e.g. dirty flag in texture)
Mutex::Autolock _l(mLock);
Image& texture(mBufferData[index].texture);
err = mTextureManager.initEglImage(&texture, dpy, buffer);
}
// if EGLImage fails, we switch to regular texture mode, and we
// free all resources associated with using EGLImages.
if (err == NO_ERROR) {
mFailover = false;
destroyTexture(&mFailoverTexture, dpy);
} else {
mFailover = true;
const size_t num = mNumBuffers;
for (size_t i=0 ; i<num ; i++) {
destroyTexture(&mBufferData[i].texture, dpy);
}
}
} else {
// we failed once, don't try again
err = BAD_VALUE;
}
}
return err;
}
status_t Layer::BufferManager::loadTexture(
const Region& dirty, const GGLSurface& t)
{
return mTextureManager.loadTexture(&mFailoverTexture, dirty, t);
}
status_t Layer::BufferManager::destroyTexture(Image* tex, EGLDisplay dpy)
{
if (tex->name != -1U) {
glDeleteTextures(1, &tex->name);
tex->name = -1U;
}
if (tex->image != EGL_NO_IMAGE_KHR) {
eglDestroyImageKHR(dpy, tex->image);
tex->image = EGL_NO_IMAGE_KHR;
}
return NO_ERROR;
}
// ---------------------------------------------------------------------------
Layer::SurfaceLayer::SurfaceLayer(const sp<SurfaceFlinger>& flinger,
const sp<Layer>& owner)
: Surface(flinger, owner->getIdentity(), owner)
{
}
Layer::SurfaceLayer::~SurfaceLayer()
{
}
sp<GraphicBuffer> Layer::SurfaceLayer::requestBuffer(int index,
uint32_t w, uint32_t h, uint32_t format, uint32_t usage)
{
sp<GraphicBuffer> buffer;
sp<Layer> owner(getOwner());
if (owner != 0) {
/*
* requestBuffer() cannot be called from the main thread
* as it could cause a dead-lock, since it may have to wait
* on conditions updated my the main thread.
*/
buffer = owner->requestBuffer(index, w, h, format, usage);
}
return buffer;
}
status_t Layer::SurfaceLayer::setBufferCount(int bufferCount)
{
status_t err = DEAD_OBJECT;
sp<Layer> owner(getOwner());
if (owner != 0) {
/*
* setBufferCount() cannot be called from the main thread
* as it could cause a dead-lock, since it may have to wait
* on conditions updated my the main thread.
*/
err = owner->setBufferCount(bufferCount);
}
return err;
}
status_t Layer::SurfaceLayer::setStereoscopic3DFormat(int format)
{
sp<Layer> owner(getOwner());
if (owner != 0) {
owner->setStereoscopic3DFormat(format);
}
return 0;
}
status_t Layer::SurfaceLayer::useOriginalSurfaceResolution(bool flag)
{
sp<Layer> owner(getOwner());
if (LIKELY(owner != 0)) {
owner->useOriginalSurfaceResolution(flag);
const DisplayHardware& hw(owner->graphicPlane(0).displayHardware());
hw.startOrigResDisplay();
}
return 0;
}
// ---------------------------------------------------------------------------
}; // namespace android
| [
"xdtianyu@gmail.com"
] | xdtianyu@gmail.com |
afe0a09aeee5266c518ab6daa39d2cbb610303c8 | fab0133d18d7ed079166e5fc0d19ddef6c9d1064 | /Leetcode/Linked List/160. Intersection of Two Linked Lists.cpp | e5aaca0e198bc6abc7cbc1aa72e057c5f48a3b76 | [] | no_license | sarthak11yadav/Competitive-Programming | f0a708223c524ed419efb4d7741390b79de8e76d | 5bf2abced61940c19d9e6d60d2181638f069d372 | refs/heads/master | 2022-12-24T11:56:34.389709 | 2020-10-12T08:35:43 | 2020-10-12T08:35:43 | 303,455,130 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,014 | cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
int ct1=0,ct2=0,i,j,k,n,m;
ListNode *temp1=headA,*temp2=headB;
while(temp1!=NULL){
temp1=temp1->next;
ct1++;
}
while(temp2!=NULL){
temp2=temp2->next;
ct2++;
}
temp1=headA;temp2=headB;
if(ct1>ct2){
int ct=ct1-ct2;temp1=headA;
while(ct!=0){
temp1=temp1->next;
ct--;
}
}
else if(ct2>ct1){
int ct=ct2-ct1;temp2=headB;
while(ct!=0){
temp2=temp2->next;
ct--;
}
}
while(temp1!=temp2){
temp1=temp1->next;
temp2=temp2->next;
}
return temp1;
}
};
| [
"noreply@github.com"
] | sarthak11yadav.noreply@github.com |
d808cf570c37eaf7d975d2382f8882ba4a37cdb9 | 82996d1c42874a5e75ebde51189e086126162774 | /screenshot.cpp | ab86c9beb1f14f1d951ff47ca7bd29435820a269 | [
"MIT"
] | permissive | Happy-Ferret/GLCollection | 804f7c85e322ff83d725ad12247fc4f7305739b5 | 13d7a60e7e7a4bd099195fe4d3d35d9c08c31a62 | refs/heads/master | 2020-06-02T21:13:56.982206 | 2018-12-14T19:53:47 | 2018-12-14T19:53:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,602 | cpp |
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include "gl.h"
#include "glfw_utilities.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb_image_write.h> // https://github.com/nothings/stb
void flipVertically(int width, int height, char *data)
{
char rgb[3];
for (int y = 0; y < height / 2; ++y)
{
for (int x = 0; x < width; ++x)
{
int top = (x + y * width) * 3;
int bottom = (x + (height - y - 1) * width) * 3;
memcpy(rgb, data + top, sizeof(rgb));
memcpy(data + top, data + bottom, sizeof(rgb));
memcpy(data + bottom, rgb, sizeof(rgb));
}
}
}
int saveScreenshot(const char *filename)
{
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
int x = viewport[0];
int y = viewport[1];
int width = viewport[2];
int height = viewport[3];
char *data = (char*) malloc((size_t) (width * height * 3)); // 3 components (R, G, B)
if (!data)
return 0;
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, data);
flipVertically(width, height, data);
int saved = stbi_write_png(filename, width, height, 3, data, 0);
free(data);
return saved;
}
const char* createScreenshotBasename()
{
static char basename[30];
time_t t = time(NULL);
strftime(basename, 30, "%Y%m%d_%H%M%S.png", localtime(&t));
return basename;
}
int captureScreenshot()
{
char filename[50];
strcpy(filename, "screenshots/");
strcat(filename, createScreenshotBasename());
int saved = saveScreenshot(filename);
if (saved)
printf("Successfully Saved Image: %s\n", filename);
else
fprintf(stderr, "Failed Saving Image: %s\n", filename);
return saved;
}
int main(int argc, char *argv[])
{
// flipVertically in saveScreenshot
// or
// stbi_flip_vertically_on_write(1);
if (!glfwInit())
{
fprintf(stderr, "Failed initializing GLFW\n");
return EXIT_FAILURE;
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
GLFWwindow *window = glfwCreateWindow(640, 480, "Screenshot - GLCollection", NULL, NULL);
if (!window)
{
fprintf(stderr, "Failed creating window\n");
glfwTerminate();
return EXIT_FAILURE;
}
glcCenterWindow(window, glcGetBestMonitor(window));
glfwShowWindow(window);
glfwMakeContextCurrent(window);
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{
fprintf(stderr, "Failed loading OpenGL functions and extensions\n");
glfwTerminate();
return EXIT_FAILURE;
}
glEnable(GL_SCISSOR_TEST);
bool repeated = false;
while (!glfwWindowShouldClose(window))
{
int down = glfwGetKey(window, GLFW_KEY_F5);
if (down && !repeated)
{
captureScreenshot();
repeated = true;
}
else if (!down)
repeated = false;
int viewportWidth, viewportHeight;
glfwGetFramebufferSize(window, &viewportWidth, &viewportHeight);
glViewport(0, 0, viewportWidth, viewportHeight);
glScissor(0, viewportHeight / 2, viewportWidth / 2, viewportHeight / 2);
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glScissor(viewportWidth / 2, viewportHeight / 2, viewportWidth / 2, viewportHeight / 2);
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glScissor(0, 0, viewportWidth / 2, viewportHeight / 2);
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glScissor(viewportWidth / 2, 0, viewportWidth / 2, viewportHeight / 2);
glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwDestroyWindow(window);
glfwTerminate();
return EXIT_SUCCESS;
}
| [
"vallentinsource@gmail.com"
] | vallentinsource@gmail.com |
c1d5dd653fd6e1779ccd5cb558d4ae99700365ef | ccbb81d220a9eb23b5bb170cef885851e86e6b53 | /Alyona and Spreadsheet.cpp | 6d747fe210fd6aee09b6c71be5eacdafad51eac1 | [] | no_license | anuragpratap05/Dynamic_Programming--1 | 93beb2918cfd50a9a56454f1382584b99e4f6a98 | cdd2d20796b9271216dfe0a60ec9158e7b482b1e | refs/heads/master | 2023-01-02T11:23:10.444370 | 2020-10-31T09:39:59 | 2020-10-31T09:39:59 | 299,927,611 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,245 | cpp | # Dynamic_Programming--1
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
int a[n+1][m+1];
for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
cin>>a[i][j];
}
}
int dp[n+1][m+1];
for(int i=1;i<2;i++)
{
for(int j=1;j<=m;j++)
{
dp[i][j]=1;
}
}
for(int i=2;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
if(a[i][j]>=a[i-1][j])
{
dp[i][j]=dp[i-1][j];
}
else
{
dp[i][j]=i;
}
}
}
/*for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
cout<<dp[i][j]<<" ";
}
cout<<endl;
}*/
int q;
cin>>q;
for(int i=0;i<q;i++)
{
int l,r;
cin>>l>>r;
for(int j=1;j<=m;j++)
{
if(dp[r][j]<=l)
{
cout<<"Yes"<<endl;
break;
}
if(j==m)
{
cout<<"No"<<endl;
break;
}
}
//cout<<endl;
}
//int ans[n+1];
}
| [
"noreply@github.com"
] | anuragpratap05.noreply@github.com |
3e6d26dfd305babd712138badda5af72a4d2cf91 | cc034592d1eeb2a1d8a5bfbb96346a3da7f812f2 | /Sail/src/graphics/text/Text.cpp | f16ac205025499b5aca08e1375f7f0d552596831 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | tofb15/Sail | 63187e070b8bc45cc216e1975e3224c30e52c26b | ce3162a7336a4ef77221eac9a7e96ac2e4f8de0b | refs/heads/master | 2020-06-13T03:37:26.946324 | 2019-02-05T22:36:36 | 2019-02-05T22:36:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 784 | cpp | #include "pch.h"
#include "Text.h"
#include "SailFont.h"
#include "../shader/ShaderSet.h"
using namespace DirectX::SimpleMath;
Text::Ptr Text::Create(const std::wstring& text, const Vector2& pos, const Vector4& color) {
return std::make_unique<Text>(text, pos, color);
}
Text::Text(const std::wstring& text, const Vector2& pos, const Vector4& color)
: m_text(text)
, m_pos(pos)
, m_color(color)
{ }
void Text::setText(const std::wstring& text) {
m_text = text;
}
const std::wstring& Text::getText() const {
return m_text;
}
void Text::setPosition(const Vector2& pos) {
m_pos = pos;
}
const Vector2& Text::getPosition() const {
return m_pos;
}
void Text::setColor(const Vector4& color) {
m_color = color;
}
const Vector4& Text::getColor() const {
return m_color;
}
| [
"alexander.wester@gmail.com"
] | alexander.wester@gmail.com |
6cb53157b9dfeb0cf3351cd1075f43053653f031 | 9413ac384ca5a94484b0cfe11a95d09d01bd1015 | /main.cpp | e0d9138cec7088969dfb44edac3bc4fc4899bae5 | [] | no_license | peerasakp/demo2 | ae75106758b864b64a5c68f0ad851301ee666001 | f3ab8b296d90cebeffcf9a6be0633f05d4a8292a | refs/heads/master | 2022-12-28T15:54:08.788643 | 2020-10-15T06:54:32 | 2020-10-15T06:54:32 | 304,235,276 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 208 | cpp | #include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
cout << "hello";
return 0;
}
| [
"peerasakp@gmail.com"
] | peerasakp@gmail.com |
de0ea780bde278519d98386257e3ca0a1532af17 | 8a0fa8913bd6fc1dc0573c3bd1178083f9c7cbdc | /排序/归并排序/归并排序.cpp | 60962ac5d44a22f3321ba88e799937f1a5f28b68 | [] | no_license | zhenghao-peng13/first | 18469c813080941cfb125413f261f6659b202fac | 2ca015baf634a414d65555b76951fd3f9433aa15 | refs/heads/master | 2023-04-25T11:09:18.274625 | 2021-05-14T11:33:46 | 2021-05-14T11:33:46 | 330,086,776 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 256 | cpp | #include <iostream>
#include<random>
using namespace std;
int main()
{
srand((unsigned)time(NULL));
int a[10];
for (int i = 0; i < 10; i++) {
a[i] = rand() % 50;
cout << a[i]<<'\t';
}
cout << endl;
return 0;
}
| [
"3120001535@mail2.gdut.edu.cn"
] | 3120001535@mail2.gdut.edu.cn |
e774613e5bb5e7e77921eb67f01f7eeb3f36929c | a46973289535ae19034b148fa54c2e91db3f4436 | /15 Geometry Shader Beginning/Effects.h | faabeade92e97759e27a93f70763367ee472b442 | [
"MIT"
] | permissive | SunIcey/DirectX11-With-Windows-SDK | 2ba4e77cdf07ec3d49c9f1cbba26d8910849f44d | a0bb4fd618c6d9e1b4a35b46f2f94a289072a8e9 | refs/heads/master | 2020-04-30T00:57:59.161013 | 2019-03-17T04:31:27 | 2019-03-17T04:31:27 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 2,529 | h | //***************************************************************************************
// Effects.h by X_Jun(MKXJun) (C) 2018-2019 All Rights Reserved.
// Licensed under the MIT License.
//
// 简易特效管理框架
// Simple effect management framework.
//***************************************************************************************
#ifndef EFFECTS_H
#define EFFECTS_H
#include <memory>
#include "LightHelper.h"
#include "RenderStates.h"
class IEffect
{
public:
// 使用模板别名(C++11)简化类型名
template <class T>
using ComPtr = Microsoft::WRL::ComPtr<T>;
IEffect() = default;
// 不支持复制构造
IEffect(const IEffect&) = delete;
IEffect& operator=(const IEffect&) = delete;
// 允许转移
IEffect(IEffect&& moveFrom) = default;
IEffect& operator=(IEffect&& moveFrom) = default;
virtual ~IEffect() = default;
// 更新并绑定常量缓冲区
virtual void Apply(ComPtr<ID3D11DeviceContext> deviceContext) = 0;
};
class BasicEffect : public IEffect
{
public:
BasicEffect();
virtual ~BasicEffect() override;
BasicEffect(BasicEffect&& moveFrom);
BasicEffect& operator=(BasicEffect&& moveFrom);
// 获取单例
static BasicEffect& Get();
// 初始化Basic.hlsli所需资源并初始化渲染状态
bool InitAll(ComPtr<ID3D11Device> device);
//
// 渲染模式的变更
//
// 绘制三角形分裂
void SetRenderSplitedTriangle(ComPtr<ID3D11DeviceContext> deviceContext);
// 绘制无上下盖的圆柱体
void SetRenderCylinderNoCap(ComPtr<ID3D11DeviceContext> deviceContext);
// 绘制所有顶点的法向量
void SetRenderNormal(ComPtr<ID3D11DeviceContext> deviceContext);
//
// 矩阵设置
//
void XM_CALLCONV SetWorldMatrix(DirectX::FXMMATRIX W);
void XM_CALLCONV SetViewMatrix(DirectX::FXMMATRIX V);
void XM_CALLCONV SetProjMatrix(DirectX::FXMMATRIX P);
//
// 光照、材质和纹理相关设置
//
// 各种类型灯光允许的最大数目
static const int maxLights = 5;
void SetDirLight(size_t pos, const DirectionalLight& dirLight);
void SetPointLight(size_t pos, const PointLight& pointLight);
void SetSpotLight(size_t pos, const SpotLight& spotLight);
void SetMaterial(const Material& material);
void XM_CALLCONV SetEyePos(DirectX::FXMVECTOR eyePos);
// 设置圆柱体侧面高度
void SetCylinderHeight(float height);
// 应用常量缓冲区和纹理资源的变更
void Apply(ComPtr<ID3D11DeviceContext> deviceContext);
private:
class Impl;
std::unique_ptr<Impl> pImpl;
};
#endif
| [
"757919340@qq.com"
] | 757919340@qq.com |
f469b2a95a3d505457d0a3873898a94f90ed9607 | cce5c0e483c887dea4a32da7bcdd7118d437987c | /Forest Simulator/ForestSim/ForestSimApp.cpp | 23201c0fb2179bde08c0bafe627ed3cbfc1de50d | [] | no_license | PotatoesBasket/AIE-AIForGames | 7f79a929da820313877937d4a4de38f2eb9cbe98 | 2bc1a2f0226d5e2a008da1f721eebf2a9ffd9f83 | refs/heads/master | 2021-08-06T03:58:08.253386 | 2021-07-13T04:58:43 | 2021-07-13T04:58:43 | 221,143,227 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,367 | cpp | #include "ForestSimApp.h"
#include "Texture.h"
#include "Font.h"
#include "Input.h"
#include "ScreenDefines.h"
#include <time.h>
bool ForestSimApp::startup()
{
RNG& rng = RNG::getInstance();
rng.setSeed((int)time);
m_2dRenderer = std::make_unique<aie::Renderer2D>();
m_map = std::make_unique<Map>();
initCamera();
return true;
}
void ForestSimApp::update(float deltaTime)
{
camControls(cappedDeltaTime(deltaTime));
m_map->update(cappedDeltaTime(deltaTime));
m_debug.getInput();
m_debug.printData();
}
void ForestSimApp::draw()
{
clearScreen();
m_2dRenderer->begin();
m_map->draw(m_2dRenderer.get());
m_2dRenderer->end();
}
void ForestSimApp::initCamera()
{
// init cam pan speed
m_currentPanSpeed = m_panSpeed;
// position camera in centre of map
m_camPos = glm::vec2(
(m_map->getMapWidthPx() - SCR_WIDTH) * 0.5f,
(m_map->getMapHeightPx() - SCR_HEIGHT) * 0.5f);
// set initial camera scale to medium zoom
m_2dRenderer->setCameraScale(1.5f);
}
void ForestSimApp::camControls(float deltaTime)
{
aie::Input* getInput = aie::Input::getInstance();
// press escape to quit
if (getInput->isKeyDown(aie::INPUT_KEY_ESCAPE))
quit();
//// press space to toggle zoom
//if (getInput->isKeyDown(aie::INPUT_KEY_SPACE))
// m_zoomInputPressed = true;
//else if (m_zoomInputPressed)
//{
// m_zoomInputPressed = false;
// // set zoom and realign camera
// switch (m_zoomLevel)
// {
// case 0:
// m_2dRenderer->setCameraScale(1.0f);
// ++m_zoomLevel;
// break;
// case 1:
// m_2dRenderer->setCameraScale(1.5f);
// ++m_zoomLevel;
// break;
// case 2:
// m_2dRenderer->setCameraScale(0.5f);
// m_zoomLevel = 0;
// }
//}
// left/right pan
if (getInput->isKeyDown(aie::INPUT_KEY_A) || getInput->isKeyDown(aie::INPUT_KEY_LEFT))
m_camPos.x -= m_currentPanSpeed * deltaTime;
else if (getInput->isKeyDown(aie::INPUT_KEY_D) || getInput->isKeyDown(aie::INPUT_KEY_RIGHT))
m_camPos.x += m_currentPanSpeed * deltaTime;
// up/down pan
if (getInput->isKeyDown(aie::INPUT_KEY_S) || getInput->isKeyDown(aie::INPUT_KEY_DOWN))
m_camPos.y -= m_currentPanSpeed * deltaTime;
else if (getInput->isKeyDown(aie::INPUT_KEY_W) || getInput->isKeyDown(aie::INPUT_KEY_UP))
m_camPos.y += m_currentPanSpeed * deltaTime;
// hold shift to speed up camera panning
if (getInput->isKeyDown(aie::INPUT_KEY_LEFT_SHIFT) || getInput->isKeyDown(aie::INPUT_KEY_RIGHT_SHIFT))
m_currentPanSpeed = m_fastPanSpeed * m_2dRenderer->getCameraScale();
else
m_currentPanSpeed = m_panSpeed * m_2dRenderer->getCameraScale();
// restrict camera position to map boundaries
// its weird and i hate it
float halfTileSize = m_map->getTileSize() * 0.5f;
switch (m_zoomLevel)
{
case 0:
if (m_camPos.x < 0.0f - SCR_WIDTH * 0.25f - halfTileSize)
m_camPos.x = 0.0f - SCR_WIDTH * 0.25f - halfTileSize;
if (m_camPos.x > m_map->getMapWidthPx() - SCR_WIDTH * 0.75f - halfTileSize)
m_camPos.x = m_map->getMapWidthPx() - SCR_WIDTH * 0.75f - halfTileSize;
if (m_camPos.y < 0.0f - SCR_HEIGHT * 0.25f + halfTileSize)
m_camPos.y = 0.0f - SCR_HEIGHT * 0.25f + halfTileSize;
if (m_camPos.y > m_map->getMapHeightPx() - SCR_HEIGHT * 0.75f + halfTileSize)
m_camPos.y = m_map->getMapHeightPx() - SCR_HEIGHT * 0.75f + halfTileSize;
break;
case 1:
if (m_camPos.x < 0.0f - halfTileSize)
m_camPos.x = 0.0f - halfTileSize;
if (m_camPos.x > m_map->getMapWidthPx() - SCR_WIDTH - halfTileSize)
m_camPos.x = m_map->getMapWidthPx() - SCR_WIDTH - halfTileSize;
if (m_camPos.y < 0.0f + halfTileSize)
m_camPos.y = 0.0f + halfTileSize;
if (m_camPos.y > m_map->getMapHeightPx() - SCR_HEIGHT + halfTileSize)
m_camPos.y = m_map->getMapHeightPx() - SCR_HEIGHT + halfTileSize;
break;
case 2:
if (m_camPos.x < 0.0f + SCR_WIDTH * 0.25f - halfTileSize)
m_camPos.x = 0.0f + SCR_WIDTH * 0.25f - halfTileSize;
if (m_camPos.x > m_map->getMapWidthPx() - SCR_WIDTH * 1.25f - halfTileSize)
m_camPos.x = m_map->getMapWidthPx() - SCR_WIDTH * 1.25f - halfTileSize;
if (m_camPos.y < 0.0f + SCR_HEIGHT * 0.25f + halfTileSize)
m_camPos.y = 0.0f + SCR_HEIGHT * 0.25f + halfTileSize;
if (m_camPos.y > m_map->getMapHeightPx() - SCR_HEIGHT * 1.25f + halfTileSize)
m_camPos.y = m_map->getMapHeightPx() - SCR_HEIGHT * 1.25f + halfTileSize;
break;
}
// update camera pos
m_2dRenderer->setCameraPos(m_camPos.x, m_camPos.y);
} | [
"PotatoesBasket@hotmail.com"
] | PotatoesBasket@hotmail.com |
289fa46965c3730d770a63fd67a294e8432ded8d | 72b7c060297cb81101047f5e2e575b6f532541ca | /src/Open3D/Geometry/EstimateNormals.cpp | d4ce195490d47a8b9f130754a7b0fac402114132 | [] | no_license | iwanbok/INFOMR_Project | cfd0d56401f448d64f647bc1e7f4399001b2b3f0 | 5c8317f36304e45ca279f7bec069faeb55a2bef5 | refs/heads/master | 2022-03-15T20:44:43.865180 | 2019-11-10T11:18:34 | 2019-11-10T11:21:27 | 206,776,943 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,496 | cpp | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.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.
// ----------------------------------------------------------------------------
#include <Eigen/Eigenvalues>
// #include "Open3D/Geometry/KDTreeFlann.h"
#include "PointCloud.h"
// #include "Open3D/Utility/Console.h"
namespace open3d {
namespace {
using namespace geometry;
Eigen::Vector3d ComputeEigenvector0(const Eigen::Matrix3d &A, double eval0) {
Eigen::Vector3d row0(A(0, 0) - eval0, A(0, 1), A(0, 2));
Eigen::Vector3d row1(A(0, 1), A(1, 1) - eval0, A(1, 2));
Eigen::Vector3d row2(A(0, 2), A(1, 2), A(2, 2) - eval0);
Eigen::Vector3d r0xr1 = row0.cross(row1);
Eigen::Vector3d r0xr2 = row0.cross(row2);
Eigen::Vector3d r1xr2 = row1.cross(row2);
double d0 = r0xr1.dot(r0xr1);
double d1 = r0xr2.dot(r0xr2);
double d2 = r1xr2.dot(r1xr2);
double dmax = d0;
int imax = 0;
if (d1 > dmax) {
dmax = d1;
imax = 1;
}
if (d2 > dmax) {
imax = 2;
}
if (imax == 0) {
return r0xr1 / std::sqrt(d0);
} else if (imax == 1) {
return r0xr2 / std::sqrt(d1);
} else {
return r1xr2 / std::sqrt(d2);
}
}
Eigen::Vector3d ComputeEigenvector1(const Eigen::Matrix3d &A,
const Eigen::Vector3d &evec0,
double eval1) {
Eigen::Vector3d U, V;
if (std::abs(evec0(0)) > std::abs(evec0(1))) {
double inv_length =
1 / std::sqrt(evec0(0) * evec0(0) + evec0(2) * evec0(2));
U << -evec0(2) * inv_length, 0, evec0(0) * inv_length;
} else {
double inv_length =
1 / std::sqrt(evec0(1) * evec0(1) + evec0(2) * evec0(2));
U << 0, evec0(2) * inv_length, -evec0(1) * inv_length;
}
V = evec0.cross(U);
Eigen::Vector3d AU(A(0, 0) * U(0) + A(0, 1) * U(1) + A(0, 2) * U(2),
A(0, 1) * U(0) + A(1, 1) * U(1) + A(1, 2) * U(2),
A(0, 2) * U(0) + A(1, 2) * U(1) + A(2, 2) * U(2));
Eigen::Vector3d AV = {A(0, 0) * V(0) + A(0, 1) * V(1) + A(0, 2) * V(2),
A(0, 1) * V(0) + A(1, 1) * V(1) + A(1, 2) * V(2),
A(0, 2) * V(0) + A(1, 2) * V(1) + A(2, 2) * V(2)};
double m00 = U(0) * AU(0) + U(1) * AU(1) + U(2) * AU(2) - eval1;
double m01 = U(0) * AV(0) + U(1) * AV(1) + U(2) * AV(2);
double m11 = V(0) * AV(0) + V(1) * AV(1) + V(2) * AV(2) - eval1;
double absM00 = std::abs(m00);
double absM01 = std::abs(m01);
double absM11 = std::abs(m11);
double max_abs_comp;
if (absM00 >= absM11) {
max_abs_comp = std::max(absM00, absM01);
if (max_abs_comp > 0) {
if (absM00 >= absM01) {
m01 /= m00;
m00 = 1 / std::sqrt(1 + m01 * m01);
m01 *= m00;
} else {
m00 /= m01;
m01 = 1 / std::sqrt(1 + m00 * m00);
m00 *= m01;
}
return m01 * U - m00 * V;
} else {
return U;
}
} else {
max_abs_comp = std::max(absM11, absM01);
if (max_abs_comp > 0) {
if (absM11 >= absM01) {
m01 /= m11;
m11 = 1 / std::sqrt(1 + m01 * m01);
m01 *= m11;
} else {
m11 /= m01;
m01 = 1 / std::sqrt(1 + m11 * m11);
m11 *= m01;
}
return m11 * U - m01 * V;
} else {
return U;
}
}
}
Eigen::Vector3d FastEigen3x3(Eigen::Matrix3d &A) {
// Previous version based on:
// https://en.wikipedia.org/wiki/Eigenvalue_algorithm#3.C3.973_matrices
// Current version based on
// https://www.geometrictools.com/Documentation/RobustEigenSymmetric3x3.pdf
// which handles edge cases like points on a plane
double max_coeff = A.maxCoeff();
if (max_coeff == 0) {
return Eigen::Vector3d::Zero();
}
A /= max_coeff;
double norm = A(0, 1) * A(0, 1) + A(0, 2) * A(0, 2) + A(1, 2) * A(1, 2);
if (norm > 0) {
Eigen::Vector3d eval;
Eigen::Vector3d evec0;
Eigen::Vector3d evec1;
Eigen::Vector3d evec2;
double q = (A(0, 0) + A(1, 1) + A(2, 2)) / 3;
double b00 = A(0, 0) - q;
double b11 = A(1, 1) - q;
double b22 = A(2, 2) - q;
double p =
std::sqrt((b00 * b00 + b11 * b11 + b22 * b22 + norm * 2) / 6);
double c00 = b11 * b22 - A(1, 2) * A(1, 2);
double c01 = A(0, 1) * b22 - A(1, 2) * A(0, 2);
double c02 = A(0, 1) * A(1, 2) - b11 * A(0, 2);
double det = (b00 * c00 - A(0, 1) * c01 + A(0, 2) * c02) / (p * p * p);
double half_det = det * 0.5;
half_det = std::min(std::max(half_det, -1.0), 1.0);
double angle = std::acos(half_det) / (double)3;
double const two_thirds_pi = 2.09439510239319549;
double beta2 = std::cos(angle) * 2;
double beta0 = std::cos(angle + two_thirds_pi) * 2;
double beta1 = -(beta0 + beta2);
eval(0) = q + p * beta0;
eval(1) = q + p * beta1;
eval(2) = q + p * beta2;
if (half_det >= 0) {
evec2 = ComputeEigenvector0(A, eval(2));
if (eval(2) < eval(0) && eval(2) < eval(1)) {
A *= max_coeff;
return evec2;
}
evec1 = ComputeEigenvector1(A, evec2, eval(1));
A *= max_coeff;
if (eval(1) < eval(0) && eval(1) < eval(2)) {
return evec1;
}
evec0 = evec1.cross(evec2);
return evec0;
} else {
evec0 = ComputeEigenvector0(A, eval(0));
if (eval(0) < eval(1) && eval(0) < eval(2)) {
A *= max_coeff;
return evec0;
}
evec1 = ComputeEigenvector1(A, evec0, eval(1));
A *= max_coeff;
if (eval(1) < eval(0) && eval(1) < eval(2)) {
return evec1;
}
evec2 = evec0.cross(evec1);
return evec2;
}
} else {
A *= max_coeff;
if (A(0, 0) < A(1, 1) && A(0, 0) < A(2, 2)) {
return Eigen::Vector3d(1, 0, 0);
} else if (A(1, 1) < A(0, 0) && A(1, 1) < A(2, 2)) {
return Eigen::Vector3d(0, 1, 0);
} else {
return Eigen::Vector3d(0, 0, 1);
}
}
}
Eigen::Vector3d ComputeNormal(const PointCloud &cloud,
const std::vector<int> &indices,
bool fast_normal_computation) {
if (indices.size() == 0) {
return Eigen::Vector3d::Zero();
}
Eigen::Matrix3d covariance;
Eigen::Matrix<double, 9, 1> cumulants;
cumulants.setZero();
for (size_t i = 0; i < indices.size(); i++) {
const Eigen::Vector3d &point = cloud.points_[indices[i]];
cumulants(0) += point(0);
cumulants(1) += point(1);
cumulants(2) += point(2);
cumulants(3) += point(0) * point(0);
cumulants(4) += point(0) * point(1);
cumulants(5) += point(0) * point(2);
cumulants(6) += point(1) * point(1);
cumulants(7) += point(1) * point(2);
cumulants(8) += point(2) * point(2);
}
cumulants /= (double)indices.size();
covariance(0, 0) = cumulants(3) - cumulants(0) * cumulants(0);
covariance(1, 1) = cumulants(6) - cumulants(1) * cumulants(1);
covariance(2, 2) = cumulants(8) - cumulants(2) * cumulants(2);
covariance(0, 1) = cumulants(4) - cumulants(0) * cumulants(1);
covariance(1, 0) = covariance(0, 1);
covariance(0, 2) = cumulants(5) - cumulants(0) * cumulants(2);
covariance(2, 0) = covariance(0, 2);
covariance(1, 2) = cumulants(7) - cumulants(1) * cumulants(2);
covariance(2, 1) = covariance(1, 2);
if (fast_normal_computation) {
return FastEigen3x3(covariance);
} else {
Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> solver;
solver.compute(covariance, Eigen::ComputeEigenvectors);
return solver.eigenvectors().col(0);
}
}
} // unnamed namespace
namespace geometry {
// bool PointCloud::EstimateNormals(
// const KDTreeSearchParam &search_param /* = KDTreeSearchParamKNN()*/,
// bool fast_normal_computation /* = true */) {
// bool has_normal = HasNormals();
// if (HasNormals() == false) {
// normals_.resize(points_.size());
// }
// KDTreeFlann kdtree;
// kdtree.SetGeometry(*this);
// #ifdef _OPENMP
// #pragma omp parallel for schedule(static)
// #endif
// for (int i = 0; i < (int)points_.size(); i++) {
// std::vector<int> indices;
// std::vector<double> distance2;
// Eigen::Vector3d normal;
// if (kdtree.Search(points_[i], search_param, indices, distance2) >= 3) {
// normal = ComputeNormal(*this, indices, fast_normal_computation);
// if (normal.norm() == 0.0) {
// if (has_normal) {
// normal = normals_[i];
// } else {
// normal = Eigen::Vector3d(0.0, 0.0, 1.0);
// }
// }
// if (has_normal && normal.dot(normals_[i]) < 0.0) {
// normal *= -1.0;
// }
// normals_[i] = normal;
// } else {
// normals_[i] = Eigen::Vector3d(0.0, 0.0, 1.0);
// }
// }
// return true;
// }
bool PointCloud::OrientNormalsToAlignWithDirection(
const Eigen::Vector3d &orientation_reference
/* = Eigen::Vector3d(0.0, 0.0, 1.0)*/) {
if (HasNormals() == false) {
printf(
"[OrientNormalsToAlignWithDirection] No normals in the "
"PointCloud. Call EstimateNormals() first.\n");
}
#ifdef _OPENMP
#pragma omp parallel for schedule(static)
#endif
for (int i = 0; i < (int)points_.size(); i++) {
auto &normal = normals_[i];
if (normal.norm() == 0.0) {
normal = orientation_reference;
} else if (normal.dot(orientation_reference) < 0.0) {
normal *= -1.0;
}
}
return true;
}
bool PointCloud::OrientNormalsTowardsCameraLocation(
const Eigen::Vector3d &camera_location /* = Eigen::Vector3d::Zero()*/) {
if (HasNormals() == false) {
printf(
"[OrientNormalsTowardsCameraLocation] No normals in the "
"PointCloud. Call EstimateNormals() first.\n");
}
#ifdef _OPENMP
#pragma omp parallel for schedule(static)
#endif
for (int i = 0; i < (int)points_.size(); i++) {
Eigen::Vector3d orientation_reference = camera_location - points_[i];
auto &normal = normals_[i];
if (normal.norm() == 0.0) {
normal = orientation_reference;
if (normal.norm() == 0.0) {
normal = Eigen::Vector3d(0.0, 0.0, 1.0);
} else {
normal.normalize();
}
} else if (normal.dot(orientation_reference) < 0.0) {
normal *= -1.0;
}
}
return true;
}
} // namespace geometry
} // namespace open3d
| [
"iwan.boksebeld@gmail.com"
] | iwan.boksebeld@gmail.com |
247b288bd8c17df8885928057c7739b8e3c9aee0 | 7292047e5cf82bfeec921ac1623ea3038a564ff3 | /GraphicManager.cpp | c49b3d64a6216e6705bda9878e861108aef2e326 | [] | no_license | kokojae/MultiMapEngine | 9e756fd21e20cbae9b811d247e3048b825aeb4eb | 60783f59441e84e7989351fe488d16c03defef7c | refs/heads/master | 2022-11-22T02:01:26.395661 | 2020-07-25T08:28:34 | 2020-07-25T08:28:34 | 282,165,144 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 1,994 | cpp | #include "DXUT.h"
#include "GraphicManager.h"
#include "MultiMapEngine.h"
LPD3DXSPRITE GraphicManager::sprite = nullptr;
ID3DXFont* GraphicManager::font = nullptr;
void GraphicManager::Init()
{
D3DXCreateSprite(DXUTGetD3D9Device(), &sprite);
D3DXCreateFont(
DXUTGetD3D9Device(),
70,
0,
FW_BOLD,
1,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DONTCARE,
L"Arial",
&font);
}
void GraphicManager::Render()
{
sprite->Begin(D3DXSPRITE_ALPHABLEND);
ObjectManager::Render();
sprite->End();
}
void GraphicManager::Release()
{
sprite->Release();
font->Release();
}
void GraphicManager::TextureRender(TextureInfo info, D3DXVECTOR2 position)
{
D3DXMATRIX mat, center, pos, scale, degree;
D3DXMatrixTranslation(¢er, -info.center.x, -info.center.y, 0);
D3DXMatrixTranslation(&pos, position.x, position.y, 0);
D3DXMatrixScaling(&scale, info.scale.x, info.scale.y, 1);
D3DXMatrixRotationZ(°ree, D3DXToRadian(info.degree));
mat = center * scale * degree * pos;
if (info.camOn)
mat *= Camera::GetCameraMatrix();
sprite->SetTransform(&mat);
// 도트겜에 사용
DXUTGetD3D9Device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
DXUTGetD3D9Device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
DXUTGetD3D9Device()->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_POINT);
RECT rc = {
(LONG)info.index * (LONG)info.size.x,
0,
(LONG)(info.index + 1) * (LONG)info.size.x,
(LONG)info.size.y
};
sprite->Draw(info.texture, &rc, NULL, NULL, info.color);
}
void GraphicManager::TextRender(std::wstring text, D3DXVECTOR2 position, D3DXVECTOR2 scale, bool isUI)
{
D3DXMATRIX mat, pos, sca;
D3DXMatrixTranslation(&pos, (int)position.x, (int)position.y, 0);
D3DXMatrixScaling(&sca, scale.x, scale.y, 1);
mat = sca * pos;
if (!isUI)
mat *= Camera::GetCameraMatrix();
sprite->SetTransform(&mat);
font->DrawText(sprite, text.c_str(), -1, NULL, DT_NOCLIP, D3DCOLOR_XRGB(0, 0, 0));
}
| [
"54296776+kokojae@users.noreply.github.com"
] | 54296776+kokojae@users.noreply.github.com |
7f568f1b1cefcd2c3d315456368f8ccf99a36cb6 | eeedc65ef99590d8316963717d1012cc6c90c9c5 | /src/qt/addresstablemodel.cpp | c85306b81d7557a7d4c5dcd2cc205287826833ef | [
"MIT"
] | permissive | BayerTM/DraftCoinZ | e277353042c908373738bce65716c38ab0cbc0ff | 217db2822a320d278d93dda4d3cd5dc4d01764f2 | refs/heads/main | 2023-06-01T00:54:12.511923 | 2021-06-09T21:35:24 | 2021-06-09T21:35:24 | 362,256,925 | 0 | 0 | MIT | 2021-04-27T22:23:49 | 2021-04-27T21:33:59 | null | UTF-8 | C++ | false | false | 14,640 | cpp | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2020 The DFTz Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "addresstablemodel.h"
#include "guiutil.h"
#include "walletmodel.h"
#include "base58.h"
#include "wallet/wallet.h"
#include <QFont>
#include <QDebug>
const QString AddressTableModel::Send = "S";
const QString AddressTableModel::Receive = "R";
struct AddressTableEntry
{
enum Type {
Sending,
Receiving,
Hidden /* QSortFilterProxyModel will filter these out */
};
Type type;
QString label;
QString address;
AddressTableEntry() {}
AddressTableEntry(Type _type, const QString &_label, const QString &_address):
type(_type), label(_label), address(_address) {}
};
struct AddressTableEntryLessThan
{
bool operator()(const AddressTableEntry &a, const AddressTableEntry &b) const
{
return a.address < b.address;
}
bool operator()(const AddressTableEntry &a, const QString &b) const
{
return a.address < b;
}
bool operator()(const QString &a, const AddressTableEntry &b) const
{
return a < b.address;
}
};
/* Determine address type from address purpose */
static AddressTableEntry::Type translateTransactionType(const QString &strPurpose, bool isMine)
{
AddressTableEntry::Type addressType = AddressTableEntry::Hidden;
// "refund" addresses aren't shown, and change addresses aren't in mapAddressBook at all.
if (strPurpose == "send")
addressType = AddressTableEntry::Sending;
else if (strPurpose == "receive")
addressType = AddressTableEntry::Receiving;
else if (strPurpose == "unknown" || strPurpose == "") // if purpose not set, guess
addressType = (isMine ? AddressTableEntry::Receiving : AddressTableEntry::Sending);
return addressType;
}
// Private implementation
class AddressTablePriv
{
public:
CWallet *wallet;
QList<AddressTableEntry> cachedAddressTable;
AddressTableModel *parent;
AddressTablePriv(CWallet *_wallet, AddressTableModel *_parent):
wallet(_wallet), parent(_parent) {}
void refreshAddressTable()
{
cachedAddressTable.clear();
{
LOCK(wallet->cs_wallet);
for (const std::pair<CTxDestination, CAddressBookData>& item : wallet->mapAddressBook)
{
const CBitcoinAddress& address = item.first;
bool fMine = IsMine(*wallet, address.Get());
AddressTableEntry::Type addressType = translateTransactionType(
QString::fromStdString(item.second.purpose), fMine);
const std::string& strName = item.second.name;
cachedAddressTable.append(AddressTableEntry(addressType,
QString::fromStdString(strName),
QString::fromStdString(address.ToString())));
}
}
// qLowerBound() and qUpperBound() require our cachedAddressTable list to be sorted in asc order
// Even though the map is already sorted this re-sorting step is needed because the originating map
// is sorted by binary address, not by base58() address.
qSort(cachedAddressTable.begin(), cachedAddressTable.end(), AddressTableEntryLessThan());
}
void updateEntry(const QString &address, const QString &label, bool isMine, const QString &purpose, int status)
{
// Find address / label in model
QList<AddressTableEntry>::iterator lower = qLowerBound(
cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan());
QList<AddressTableEntry>::iterator upper = qUpperBound(
cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan());
int lowerIndex = (lower - cachedAddressTable.begin());
int upperIndex = (upper - cachedAddressTable.begin());
bool inModel = (lower != upper);
AddressTableEntry::Type newEntryType = translateTransactionType(purpose, isMine);
switch(status)
{
case CT_NEW:
if(inModel)
{
qWarning() << "AddressTablePriv::updateEntry: Warning: Got CT_NEW, but entry is already in model";
break;
}
parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex);
cachedAddressTable.insert(lowerIndex, AddressTableEntry(newEntryType, label, address));
parent->endInsertRows();
break;
case CT_UPDATED:
if(!inModel)
{
qWarning() << "AddressTablePriv::updateEntry: Warning: Got CT_UPDATED, but entry is not in model";
break;
}
lower->type = newEntryType;
lower->label = label;
parent->emitDataChanged(lowerIndex);
break;
case CT_DELETED:
if(!inModel)
{
qWarning() << "AddressTablePriv::updateEntry: Warning: Got CT_DELETED, but entry is not in model";
break;
}
parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex-1);
cachedAddressTable.erase(lower, upper);
parent->endRemoveRows();
break;
}
}
int size()
{
return cachedAddressTable.size();
}
AddressTableEntry *index(int idx)
{
if(idx >= 0 && idx < cachedAddressTable.size())
{
return &cachedAddressTable[idx];
}
else
{
return 0;
}
}
};
AddressTableModel::AddressTableModel(CWallet *_wallet, WalletModel *parent) :
QAbstractTableModel(parent),walletModel(parent),wallet(_wallet),priv(0)
{
columns << tr("Label") << tr("Address");
priv = new AddressTablePriv(wallet, this);
priv->refreshAddressTable();
}
AddressTableModel::~AddressTableModel()
{
delete priv;
}
int AddressTableModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return priv->size();
}
int AddressTableModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return columns.length();
}
QVariant AddressTableModel::data(const QModelIndex &index, int role) const
{
if(!index.isValid())
return QVariant();
AddressTableEntry *rec = static_cast<AddressTableEntry*>(index.internalPointer());
if(role == Qt::DisplayRole || role == Qt::EditRole)
{
switch(index.column())
{
case Label:
if(rec->label.isEmpty() && role == Qt::DisplayRole)
{
return tr("(no label)");
}
else
{
return rec->label;
}
case Address:
return rec->address;
}
}
else if (role == Qt::FontRole)
{
QFont font;
if(index.column() == Address)
{
font = GUIUtil::fixedPitchFont();
}
return font;
}
else if (role == TypeRole)
{
switch(rec->type)
{
case AddressTableEntry::Sending:
return Send;
case AddressTableEntry::Receiving:
return Receive;
default: break;
}
}
return QVariant();
}
bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if(!index.isValid())
return false;
AddressTableEntry *rec = static_cast<AddressTableEntry*>(index.internalPointer());
std::string strPurpose = (rec->type == AddressTableEntry::Sending ? "send" : "receive");
editStatus = OK;
if(role == Qt::EditRole)
{
LOCK(wallet->cs_wallet); /* For SetAddressBook / DelAddressBook */
CTxDestination curAddress = CBitcoinAddress(rec->address.toStdString()).Get();
if(index.column() == Label)
{
// Do nothing, if old label == new label
if(rec->label == value.toString())
{
editStatus = NO_CHANGES;
return false;
}
wallet->SetAddressBook(curAddress, value.toString().toStdString(), strPurpose);
} else if(index.column() == Address) {
CTxDestination newAddress = CBitcoinAddress(value.toString().toStdString()).Get();
// Refuse to set invalid address, set error status and return false
if(boost::get<CNoDestination>(&newAddress))
{
editStatus = INVALID_ADDRESS;
return false;
}
// Do nothing, if old address == new address
else if(newAddress == curAddress)
{
editStatus = NO_CHANGES;
return false;
}
// Check for duplicate addresses to prevent accidental deletion of addresses, if you try
// to paste an existing address over another address (with a different label)
else if(wallet->mapAddressBook.count(newAddress))
{
editStatus = DUPLICATE_ADDRESS;
return false;
}
// Double-check that we're not overwriting a receiving address
else if(rec->type == AddressTableEntry::Sending)
{
// Remove old entry
wallet->DelAddressBook(curAddress);
// Add new entry with new address
wallet->SetAddressBook(newAddress, rec->label.toStdString(), strPurpose);
}
}
return true;
}
return false;
}
QVariant AddressTableModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if(orientation == Qt::Horizontal)
{
if(role == Qt::DisplayRole && section < columns.size())
{
return columns[section];
}
}
return QVariant();
}
Qt::ItemFlags AddressTableModel::flags(const QModelIndex &index) const
{
if(!index.isValid())
return 0;
AddressTableEntry *rec = static_cast<AddressTableEntry*>(index.internalPointer());
Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
// Can edit address and label for sending addresses,
// and only label for receiving addresses.
if(rec->type == AddressTableEntry::Sending ||
(rec->type == AddressTableEntry::Receiving && index.column()==Label))
{
retval |= Qt::ItemIsEditable;
}
return retval;
}
QModelIndex AddressTableModel::index(int row, int column, const QModelIndex &parent) const
{
Q_UNUSED(parent);
AddressTableEntry *data = priv->index(row);
if(data)
{
return createIndex(row, column, priv->index(row));
}
else
{
return QModelIndex();
}
}
void AddressTableModel::updateEntry(const QString &address,
const QString &label, bool isMine, const QString &purpose, int status)
{
// Update address book model from DFTz core
priv->updateEntry(address, label, isMine, purpose, status);
}
QString AddressTableModel::addRow(const QString &type, const QString &label, const QString &address)
{
std::string strLabel = label.toStdString();
std::string strAddress = address.toStdString();
editStatus = OK;
if(type == Send)
{
if(!walletModel->validateAddress(address))
{
editStatus = INVALID_ADDRESS;
return QString();
}
// Check for duplicate addresses
{
LOCK(wallet->cs_wallet);
if(wallet->mapAddressBook.count(CBitcoinAddress(strAddress).Get()))
{
editStatus = DUPLICATE_ADDRESS;
return QString();
}
}
}
else if(type == Receive)
{
// Generate a new address to associate with given label
CPubKey newKey;
if(!wallet->GetKeyFromPool(newKey, false))
{
WalletModel::UnlockContext ctx(walletModel->requestUnlock());
if(!ctx.isValid())
{
// Unlock wallet failed or was cancelled
editStatus = WALLET_UNLOCK_FAILURE;
return QString();
}
if(!wallet->GetKeyFromPool(newKey, false))
{
editStatus = KEY_GENERATION_FAILURE;
return QString();
}
}
strAddress = CBitcoinAddress(newKey.GetID()).ToString();
}
else
{
return QString();
}
// Add entry
{
LOCK(wallet->cs_wallet);
wallet->SetAddressBook(CBitcoinAddress(strAddress).Get(), strLabel,
(type == Send ? "send" : "receive"));
}
return QString::fromStdString(strAddress);
}
bool AddressTableModel::removeRows(int row, int count, const QModelIndex &parent)
{
Q_UNUSED(parent);
AddressTableEntry *rec = priv->index(row);
if(count != 1 || !rec || rec->type == AddressTableEntry::Receiving)
{
// Can only remove one row at a time, and cannot remove rows not in model.
// Also refuse to remove receiving addresses.
return false;
}
{
LOCK(wallet->cs_wallet);
wallet->DelAddressBook(CBitcoinAddress(rec->address.toStdString()).Get());
}
return true;
}
/* Look up label for address in address book, if not found return empty string.
*/
QString AddressTableModel::labelForAddress(const QString &address) const
{
CBitcoinAddress address_parsed(address.toStdString());
return labelForAddress(address_parsed);
}
QString AddressTableModel::labelForAddress(const CBitcoinAddress &address) const
{
return labelForDestination(address.Get());
}
QString AddressTableModel::labelForDestination(const CTxDestination &dest) const
{
{
LOCK(wallet->cs_wallet);
std::map<CTxDestination, CAddressBookData>::iterator mi = wallet->mapAddressBook.find(dest);
if (mi != wallet->mapAddressBook.end())
{
return QString::fromStdString(mi->second.name);
}
}
return QString();
}
int AddressTableModel::lookupAddress(const QString &address) const
{
QModelIndexList lst = match(index(0, Address, QModelIndex()),
Qt::EditRole, address, 1, Qt::MatchExactly);
if(lst.isEmpty())
{
return -1;
}
else
{
return lst.at(0).row();
}
}
void AddressTableModel::emitDataChanged(int idx)
{
Q_EMIT dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length()-1, QModelIndex()));
}
| [
"james@xmc.com"
] | james@xmc.com |
04fe555f6203f99adbddb5c4801b76aafe989bf8 | 84609227f080f26a80b96c0bcae8e54e88cee2a8 | /AR40.cpp | c59a62f0f976f1536799d36c1e669ddf39e6f6fc | [] | no_license | leann0101/hw | 00306381fef2afa7137368f59c8dac4c76429b88 | 18a1bf8e102c09894d734e56379fd92f744f5b33 | refs/heads/master | 2022-11-17T19:59:12.715029 | 2020-07-10T14:24:43 | 2020-07-10T14:24:43 | 278,432,584 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 717 | cpp | #include <iostream>
#include <stdlib.h>
#include<string>
using namespace std;
int main(){
int num, j=0, cnt=0;
cin >> num;
int n[10000] = {};
for (int i = 0; i < num;i++){
cin >> n[i];
}
if(n[0]<=5)//從右半邊開始
cnt += n[0] * 36;//360度除以10,每格是36度,算往右邊跑幾格
else
cnt += (10-n[0])*36;//算往左邊跑幾格
while(j<num-1){
if(abs(n[j + 1] - n[j]) <= 5)//兩個相距在5格以內的話
cnt += abs(n[j + 1] - n[j])*36;//直接相減
else
cnt += (10 - (abs(n[j + 1] - n[j])))*36;//不然就從另一個方向跑,用10去減
j++;
}
cout << "Minimal summation of swinging degrees is " << cnt << endl;
}
| [
"noreply@github.com"
] | leann0101.noreply@github.com |
9254a860f87e923fb8403077c9aae5c7704a5444 | e41bbc5c02ccea33b7904ff0799c7d16ab48c6d5 | /client/AuctionWidget.hpp | ba927aa6eec268b1d4dca9740d8a9f64693422e1 | [] | no_license | dbertha/quidditch-man | a1a53ae2cfb5bdf1b588340df57ee31644547f84 | 91dc4938c2e1b4acd488e7888cde076125f915ad | refs/heads/master | 2020-03-30T08:05:37.019366 | 2014-04-08T09:08:40 | 2014-04-08T09:08:40 | 30,409,519 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,437 | hpp | #ifndef AUCTIONWIDGET_H
#define AUCTIONWIDGET_H
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <QMainWindow>
#include <QAction>
#include <QMenuBar>
#include <QMenu>
#include <QMessageBox>
#include <QStringList>
#include <QProgressDialog>
#include <QSocketNotifier>
#include <QTimer>
#include <QLabel>
#include <QApplication>
#include <QtGui>
#include <vector>
#include "Client.hpp"
#include "MainWindow.hpp"
#include "ListAuctionsWidget.hpp"
class ListAuctionsWidget;
class AuctionWidget : public QWidget {
Q_OBJECT
public:
AuctionWidget(Client* client, QWidget* parent);
void paintEvent(QPaintEvent*);
void pause();
void resume();
void maskLabel();
void startTurn();
void endOfTurn();
void makeJoinable();
void updateLabels();
public slots:
void init();
void join();
void bid();
void quit();
void prepareForNextTurn();
void prepareForEndOfTurn();
void changeLabel();
public:
Client* _client;
QWidget* _parent;
bool _inAuction;
ListAuctionsWidget* _listAuctionsWidget;
QTimer* _endOfTurnTimer,*_nextTurnTimer,*_updater;
int _startingPrice,_turnPrice,_timeBeforeEndOfTurn,_timeBeforeTurn,_timeLeft,_currentTurn;
bool _hasBidden,_hasLeft;
int _currentPrice,_nbOfBidders,_auctionID;
QPushButton* _bidButton;
QPushButton* _quitButton;
QPushButton* _joinButton;
QLabel* _priceLabel;
QLabel* _biddersLabel;
QHBoxLayout* _zone;
QStackedWidget* _stack;
QLabel* _errorLabel;
};
#endif | [
"manolegr@ulb.ac.be"
] | manolegr@ulb.ac.be |
8d233de45ba7a1e22720382a48b39438077f424f | a4a8b3219ff36ce2d945c50f01e3fedd2796446a | /muduo/net/http/HttpRequest.h | 6714fd72b0fccd69559b0bbac2011001ddf812f6 | [
"BSD-3-Clause"
] | permissive | HhTtLllL/muduo | 9883bc0c1ce9004cbff1695b6884c30718446c47 | 5250f18c2efda4cac7d8a03eb0b37b2a2f0a64b4 | refs/heads/master | 2021-05-18T11:03:33.570737 | 2020-08-10T05:17:56 | 2020-08-10T05:17:56 | 251,220,297 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,053 | h | // Copyright 2010, Shuo Chen. All rights reserved.
// http://code.google.com/p/muduo/
//
// Use of this source code is governed by a BSD-style license
// that can be found in the License file.
// Author: Shuo Chen (chenshuo at chenshuo dot com)
//
// This is a public header file, it must only include public header files.
#ifndef MUDUO_NET_HTTP_HTTPREQUEST_H
#define MUDUO_NET_HTTP_HTTPREQUEST_H
#include "muduo/base/copyable.h"
#include "muduo/base/Timestamp.h"
#include "muduo/base/Types.h"
#include <map>
#include <assert.h>
#include <stdio.h>
namespace muduo
{
namespace net
{
//http请求类的封装
class HttpRequest : public muduo::copyable
{
public:
enum Method
{
//kInvaild 无效的方法, 其他为 当前支持的方法
kInvalid, kGet, kPost, kHead, kPut, kDelete
};
//http 协议版本
enum Version
{
kUnknown, kHttp10, kHttp11
};
HttpRequest()
: method_(kInvalid),
version_(kUnknown)
{
}
// 设置请求版本
void setVersion(Version v)
{
version_ = v;
}
// 获取请求版本
Version getVersion() const
{ return version_; }
//设置方法
bool setMethod(const char* start, const char* end)
{
assert(method_ == kInvalid);
string m(start, end);
if (m == "GET")
{
method_ = kGet;
}
else if (m == "POST")
{
method_ = kPost;
}
else if (m == "HEAD")
{
method_ = kHead;
}
else if (m == "PUT")
{
method_ = kPut;
}
else if (m == "DELETE")
{
method_ = kDelete;
}
else
{
method_ = kInvalid;
}
return method_ != kInvalid;
}
Method method() const
{ return method_; }
//返回 请求放阿飞
const char* methodString() const
{
const char* result = "UNKNOWN";
switch(method_)
{
case kGet:
result = "GET";
break;
case kPost:
result = "POST";
break;
case kHead:
result = "HEAD";
break;
case kPut:
result = "PUT";
break;
case kDelete:
result = "DELETE";
break;
default:
break;
}
return result;
}
// 设置路径
void setPath(const char* start, const char* end)
{
path_.assign(start, end);
}
//返回路径
const string& path() const
{ return path_; }
void setQuery(const char* start, const char* end)
{
query_.assign(start, end);
}
const string& query() const
{ return query_; }
//设置接受时间
void setReceiveTime(Timestamp t)
{ receiveTime_ = t; }
//返回接受时间
Timestamp receiveTime() const
{ return receiveTime_; }
//添加一个头部信息
void addHeader(const char* start, const char* colon, const char* end)
{
string field(start, colon); //header 域
++colon;
//取出左空格
while (colon < end && isspace(*colon))
{
++colon;
}
string value(colon, end); //header 值
//取出右空格
while (!value.empty() && isspace(value[value.size()-1]))
{
value.resize(value.size()-1);
}
headers_[field] = value;
}
// 获取头部信息
string getHeader(const string& field) const
{
string result;
std::map<string, string>::const_iterator it = headers_.find(field);
if (it != headers_.end())
{
result = it->second;
}
return result;
}
const std::map<string, string>& headers() const
{ return headers_; }
// 交换数据成员
void swap(HttpRequest& that)
{
std::swap(method_, that.method_);
std::swap(version_, that.version_);
path_.swap(that.path_);
query_.swap(that.query_);
receiveTime_.swap(that.receiveTime_);
headers_.swap(that.headers_);
}
private:
Method method_; //请求方法
Version version_; //协议版本 1.0/1.1
string path_; //请求路径
string query_;
Timestamp receiveTime_; //请求时间
std::map<string, string> headers_; //header 列表
};
} // namespace net
} // namespace muduo
#endif // MUDUO_NET_HTTP_HTTPREQUEST_H
| [
"1430249706@qq.com"
] | 1430249706@qq.com |
6143f3d82fc58dc22669d41a127e4d47c562d521 | 10883f9d5286249c155c01292e090320e09da1f7 | /DeviceGateway/serialport/myserialport.h | e4ac4a3f6210c1737585790824245bd9b93c1744 | [] | no_license | ZJPJAY/QT_Quick_Project | 004bb1b52640704ef8cebfd5e34d25cbd1c6e6a6 | e00ebc40912adacc00fd336684a29963fedbe761 | refs/heads/main | 2023-06-16T22:01:29.547663 | 2021-07-16T13:32:28 | 2021-07-16T13:32:28 | 384,033,166 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,375 | h | #ifndef MYSERIALPORT_H
#define MYSERIALPORT_H
#include <QSerialPort>
#include <QTimer>
#include <QStringList>
class MySerialPort : public QSerialPort
{
Q_OBJECT
protected:
explicit MySerialPort(QObject *parent = nullptr);
public:
static MySerialPort *getObject();
QStringList getPortList();
void requestTeAndHu();
void requestLig();
void requestUlt();
void requestCo2();
void requestPm();
void controlLight(unsigned char con);//开关警报灯
void controlAlert(unsigned char con);//开关警报铃
protected slots:
void readyReadSlot();
void sendTimeoutSlot();
void appendTimeoutSlot();
//void pushTimeroutSlot();若数据都在一个表里面使用这个定时信号槽函数
protected:
static MySerialPort *mspObj;
void handleData(QByteArray data);//解析传输数据格式
void handleFrame(QByteArray data);//解析数据内容
QByteArray temp;//缓冲区
QList<QByteArray> sendList;
QTimer *sendTimer;
QTimer *appendTimer;
//QTimer *pushTimer;若数据都在一个表里面使用这个定时器,时间为上面appendTimer的时间间隔,一次性发送所有数据
double te;
double hu;
double lig;
int co2;
int ur;
int pm;
signals:
public slots:
};
#endif // MYSERIALPORT_H
| [
"563902816@qq.com"
] | 563902816@qq.com |
55b6ada0906ca3825603842a71a9f597cb58a473 | 17c9968d84be9a156d4717248b44bb0ea133233e | /SS_Dll/Misc.cpp | 6c4e3aa5bab5053b8b04b38fa87994ba28bc9546 | [] | no_license | NamoPark/Sample | b0f48f4b977c22456c8e615f2be98736fa263ff8 | ccc873db51bce9fd16084474232630b9d9d036d6 | refs/heads/master | 2021-01-15T05:24:47.277293 | 2020-02-25T02:16:15 | 2020-02-25T02:16:15 | 242,889,282 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,831 | cpp | #include "stdafx.h"
#include "Misc.h"
#include <WS2tcpip.h>
#include "SS_Interface.h"
#define UNSIGNED_BYTE_0 85;
#define UNSIGNED_BYTE_1 83;
#define SIGNED_BYTE_0 83;
#define SIGNED_BYTE_1 73;
static char ix_Mutex[cVaU3_MaxMutexID + 1];
void SleepMsg(DWORD dwMilliseconds)
{
DWORD dwStart = 0;
MSG msg = { 0, };
dwStart = GetTickCount();
while (GetTickCount() - dwStart < dwMilliseconds)
{
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
// Lower CPU Usage
Sleep(10);
}
}
BOOL FileRW(BOOL Method, const TCHAR *AFName, int ASize, void *Buf, BOOL AMsgBox)
{
HANDLE qF = CreateFile(AFName,
Method ? GENERIC_WRITE : GENERIC_READ,
Method ? 0 : FILE_SHARE_READ, NULL,
Method ? CREATE_ALWAYS : OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
DWORD qNumRW;
if (qF == INVALID_HANDLE_VALUE) {
qNumRW = 0;
while (++qNumRW < 3 && GetLastError() == ERROR_SHARING_VIOLATION) {
Sleep(200);
qF = CreateFile(AFName,
Method ? GENERIC_WRITE : GENERIC_READ,
Method ? 0 : FILE_SHARE_READ, NULL,
Method ? CREATE_ALWAYS : OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
if (qF != INVALID_HANDLE_VALUE)
goto Label_Begin;
};
return FALSE;
};
Label_Begin:
if (!Method) {
int qFSize = GetFileSize(qF, NULL);
if (ASize <= 0)
ASize = qFSize;
else
if (ASize != qFSize) {
CloseHandle(qF);
return FALSE;
};
};
if (Method) WriteFile(qF, Buf, ASize, &qNumRW, NULL);
else ReadFile(qF, Buf, ASize, &qNumRW, NULL);
if ((int)qNumRW != ASize) {
CloseHandle(qF);
return FALSE;
};
CloseHandle(qF);
return TRUE;
}
ULONG VAU3_InetAddrTCHAR(const TCHAR *AAddr)
{
char qAddr[40];
ULONG Ret;
memset(qAddr, sizeof(qAddr), 0);
#ifdef UNICODE
WideCharToMultiByte(CP_ACP, 0, AAddr, -1, qAddr, sizeof(qAddr), NULL, NULL);
#else
_tcsncpy(qAddr, AAddr, sizeof(qAddr) - 1);
#endif
//return inet_addr(qAddr);
if (inet_pton(AF_INET, qAddr, &Ret) != 0)
return Ret;
else
return -1;
}
void VaU3_MutexCreate(int AMutexID)
{
ix_Mutex[AMutexID] = 0;
}
BOOL VaU3_MutexGet(int AMutexID)
{
int qWaitCount = 0;
while (ix_Mutex[AMutexID]) {
Sleep(1);
if (++qWaitCount > 10 && !VaU3_MutexLocked(AMutexID))
return FALSE;
if (ix_Mutex[AMutexID] == 2) {
return 2;
}
};
ix_Mutex[AMutexID] = 1;
return TRUE;
}
void VaU3_MutexRelease(int AMutexID)
{
ix_Mutex[AMutexID] = 0;
}
void VaU3_MutexDelete(int AMutexID)
{
ix_Mutex[AMutexID] = 0;
}
void VaU3_MutexLock(int AMutexID)
{
ix_Mutex[AMutexID] = 2;
}
BOOL VaU3_MutexLocked(int AMutexID)
{
return ix_Mutex[AMutexID] == 2;
}
void VaU3_CloseThreadHandle(HANDLE *AThread, int ADelay)
{
HANDLE qHandle = *AThread;
if (qHandle) {
*AThread = NULL;
if (WaitForSingleObject(qHandle, ADelay) == WAIT_TIMEOUT)
TerminateThread(qHandle, 255);
CloseHandle(qHandle);
};
}
void CreateDir(TCHAR* Path)
{
TCHAR DirName[256];
TCHAR* p = Path;
TCHAR* q = DirName;
while (*p) {
if (('\\' == *p) || ('/' == *p)) {
if (':' != *(p - 1))
CreateDirectory(DirName, NULL);
}
*q++ = *p++;
*q = '\0';
}
CreateDirectory(DirName, NULL);
}
int CropFrame(UINT16* Src, UINT16* Dst, tVaU_ImgDim* pImgDim)
{
if ((pImgDim->rFrameHeight - pImgDim->rImgCutBottom - pImgDim->rImgCutTop) <= 0)
return 0;
if ((pImgDim->rFrameWidth - pImgDim->rImgCutLeft - pImgDim->rImgCutRight) <= 0)
return 0;
UINT16 *rowSrc, *rowDst;
int widthCropped = pImgDim->rFrameWidth - pImgDim->rImgCutLeft - pImgDim->rImgCutRight;
for (int y = pImgDim->rImgCutTop; y < (pImgDim->rFrameHeight - pImgDim->rImgCutBottom); y++) {
rowSrc = (Src + (pImgDim->rFrameWidth * y) + pImgDim->rImgCutLeft);
rowDst = (Dst + (widthCropped * (y - pImgDim->rImgCutTop)));
memcpy_s(rowDst, sizeof(UINT16)*widthCropped, rowSrc, sizeof(UINT16)*widthCropped);
}
return 0;
} | [
"nhpark@DESKTOP-F13BD6F"
] | nhpark@DESKTOP-F13BD6F |
b8f5b943b07ecee0d67f06671bd2443036217073 | 214d6269dacd432903b1aeda037869972ea2642d | /C++ Program/Array/Kadane's_Algorithm.cpp | 618a21cc9f6b00b6c07561c0e4a3bfda35818107 | [] | no_license | shivitdoescode/Example-Programs | 671562ebea5b3dcc338d0fffaae79ef30b2d875f | 5d4fff960b3fdecfff59b4e6d7ae388380beb967 | refs/heads/main | 2023-08-12T11:05:40.742656 | 2021-10-04T12:27:55 | 2021-10-04T12:27:55 | 413,411,301 | 1 | 0 | null | 2021-10-04T12:26:33 | 2021-10-04T12:26:33 | null | UTF-8 | C++ | false | false | 482 | cpp | ///Kadane's Algorithm
#include<bits/stdc++.h>
using namespace std;
int maxSubArraySum(int a[], int size)
{
int maxi = a[0];
int curx = a[0];
for (int i = 1; i < size; i++)
{
curx = max(a[i], curx+a[i]);
maxi = max(maxi, curx);
}
return maxi;
}
int main()
{
int a[] = {-2, -5, 9, -11, -4, 1, 5, 7};
int n = sizeof(a)/sizeof(a[0]);
int max_sum = maxSubArraySum(a, n);
cout << "Maximum contiguous sum is " << max_sum;
return 0;
}
| [
"noreply@github.com"
] | shivitdoescode.noreply@github.com |
e7c31c7808d3ffd0e8ad54a248ca63a7d2ae8a89 | 417f0d1edc5e77c5a0073ac88e274cf97b4768a1 | /Basketball_demo/src/Regulator.h | b186ad706712a22129900ed35c090a717b422f4a | [] | no_license | lyback/LGameAI | c559dea9f77c24c216fd3f4bff953a927b4309e5 | 4751a6fa699f77379eb56565139e96b40ad89b11 | refs/heads/master | 2021-01-05T14:25:50.448823 | 2017-07-23T08:16:46 | 2017-07-23T08:16:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,794 | h |
// @Name : REGULATOR_H
//
// @Author : Yukang Chen (moorekang@gmail.com)
// @Date : 2011-09-04 21:56:19
//
// @Brief : this is defination of Regulator,
// : be used by those requested more time distance computations
#if !defined(REGULATOR_H)
#define REGULATOR_H
#include "PrecisionTimer.h"
class Regulator
{
private:
double m_UpdatePeriod; //the time diff requested
double m_ElapseTime; //the time have elapsed
timeval prevTime;
public:
//@ countPerSecond: counts in one seconds
Regulator(int countPerSecond)
{
assert(countPerSecond > 0 && "countPerSecond>0");
m_ElapseTime = 0.0;
gettimeofday(&prevTime, NULL);
if (countPerSecond > 0){
m_UpdatePeriod = 1000.0 / countPerSecond;
}
else if (isEqual(0.0, countPerSecond)){
m_UpdatePeriod = 0.0;
}
}
Regulator(double periodTime)//in seconds
{
assert(periodTime>0 && "periodTime must larger than 0");
m_ElapseTime = 0.0;
gettimeofday(&prevTime, NULL);
m_UpdatePeriod = 1000.0*periodTime;
}
//return true iff elapsed time is more than m_dUpdatePeriod
//reset elapsed time to zero
bool isReady()
{
if( m_ElapseTime > m_UpdatePeriod ){
//m_ElapseTime = 0;
return true;
}
timeval nowTime;
gettimeofday(&nowTime, NULL);
m_ElapseTime += TIMER->TimeDiff(&prevTime, &nowTime);
//prevTime = nowTime;
gettimeofday(&prevTime, NULL);
return false;
}
double getElapseTime()
{
return m_ElapseTime;
}
};
#endif
| [
"laiyierjiangsu@gmail.com"
] | laiyierjiangsu@gmail.com |
797f0ca69040d4f031ccbcf79ab26195a1ef2da7 | f299ad78e0760d64dc2a9cb78ccba99f0f5353de | /src/RDSParser.cpp | 3752ad231fe4670c89fbe8a445dcfb894bc378be | [
"BSD-3-Clause"
] | permissive | mathertel/Radio | 20f98fc4afe64cffb7a8134b31d38e95b1138f28 | 470badc405b07cb52340c860024bc84027fe1e46 | refs/heads/master | 2023-02-13T18:12:54.391452 | 2023-02-11T15:03:15 | 2023-02-11T15:03:15 | 23,551,116 | 274 | 101 | BSD-3-Clause | 2023-02-03T19:02:28 | 2014-09-01T18:05:11 | C++ | UTF-8 | C++ | false | false | 5,702 | cpp | ///
/// \file RDSParser.cpp
/// \brief RDS Parser class implementation.
///
/// \author Matthias Hertel, http://www.mathertel.de
/// \copyright Copyright (c) 2014 by Matthias Hertel.\n
/// This work is licensed under a BSD style license.\n
/// See http://www.mathertel.de/License.aspx
///
/// \details
///
/// More documentation and source code is available at http://www.mathertel.de/Arduino
///
/// ChangeLog see RDSParser.h.
#include "RDSParser.h"
#define DEBUG_FUNC0(fn) \
{ \
Serial.print(fn); \
Serial.println("()"); \
}
/// Setup the RDS object and initialize private variables to 0.
RDSParser::RDSParser() {
memset(this, 0, sizeof(RDSParser));
} // RDSParser()
void RDSParser::init() {
strcpy(_PSName1, "11111111");
strcpy(_PSName2, "22222222");
strcpy(_PSName3, "33333333");
strcpy(programServiceName, " ");
strcpy(lastServiceName, " ");
memset(_RDSText, 0, sizeof(_RDSText));
_lastTextIDX = 0;
} // init()
void RDSParser::attachServiceNameCallback(receiveServiceNameFunction newFunction) {
_sendServiceName = newFunction;
} // attachServiceNameCallback
void RDSParser::attachTextCallback(receiveTextFunction newFunction) {
_sendText = newFunction;
} // attachTextCallback
void RDSParser::attachTimeCallback(receiveTimeFunction newFunction) {
_sendTime = newFunction;
} // attachTimeCallback
void RDSParser::processData(uint16_t block1, uint16_t block2, uint16_t block3, uint16_t block4) {
// DEBUG_FUNC0("process");
uint8_t idx; // index of rdsText
char c1, c2;
uint16_t mins; ///< RDS time in minutes
uint8_t off; ///< RDS time offset and sign
// Serial.print('('); Serial.print(block1, HEX); Serial.print(' '); Serial.print(block2, HEX); Serial.print(' '); Serial.print(block3, HEX); Serial.print(' '); Serial.println(block4, HEX);
if (block1 == 0) {
// reset all the RDS info.
init();
// Send out empty data
if (_sendServiceName) _sendServiceName(programServiceName);
if (_sendText) _sendText("");
return;
} // if
// analyzing Block 2
rdsGroupType = 0x0A | ((block2 & 0xF000) >> 8) | ((block2 & 0x0800) >> 11);
rdsTP = (block2 & 0x0400);
rdsPTY = (block2 & 0x0400);
switch (rdsGroupType) {
case 0x0A:
case 0x0B:
// The data received is part of the Service Station Name
idx = 2 * (block2 & 0x0003); // idx = 0, 2, 4, 6
// new data is 2 chars from block 4
c1 = block4 >> 8;
c2 = block4 & 0x00FF;
// Serial.printf(">%d %c%c %02x %02x\n", idx, c1, c2, c1, c2);
// shift new data into _PSNameN
_PSName3[idx] = _PSName2[idx];
_PSName2[idx] = _PSName1[idx];
_PSName1[idx] = c1;
_PSName3[idx+1] = _PSName2[idx+1];
_PSName2[idx+1] = _PSName1[idx+1];
_PSName1[idx+1] = c2;
// check that the data was received successfully twice
// before publishing the station name
if (idx == 6) {
bool isGood = true;
// create programServiceName with 2 of 3
for (int n= 0; n < 8; n++) {
if ((_PSName1[n] == _PSName2[n]) || (_PSName1[n] == _PSName3[n])) {
programServiceName[n] = _PSName1[n];
} else if (_PSName2[n] == _PSName3[n]) {
programServiceName[n] = _PSName2[n];
} else {
isGood = false;
}
}
if ((isGood) && (strcmp(lastServiceName, programServiceName) != 0)) {
strcpy(lastServiceName, programServiceName);
if (_sendServiceName)
_sendServiceName(programServiceName);
}
} // if
break;
case 0x2A:
// The data received is part of the RDS Text.
_textAB = (block2 & 0x0010);
idx = 4 * (block2 & 0x000F);
if (idx < _lastTextIDX) {
// the existing text might be complete because the index is starting at the beginning again.
// now send it to the possible listener.
if (_sendText)
_sendText(_RDSText);
}
_lastTextIDX = idx;
if (_textAB != _last_textAB) {
// when this bit is toggled the whole buffer should be cleared.
_last_textAB = _textAB;
memset(_RDSText, 0, sizeof(_RDSText));
// Serial.println("T>CLEAR");
} // if
// new data is 2 chars from block 3
_RDSText[idx] = (block3 >> 8);
idx++;
_RDSText[idx] = (block3 & 0x00FF);
idx++;
// new data is 2 chars from block 4
_RDSText[idx] = (block4 >> 8);
idx++;
_RDSText[idx] = (block4 & 0x00FF);
idx++;
// Serial.print(' '); Serial.println(_RDSText);
// Serial.print("T>"); Serial.println(_RDSText);
break;
case 0x4A:
// Clock time and date
off = (block4)&0x3F; // 6 bits
mins = (block4 >> 6) & 0x3F; // 6 bits
mins += 60 * (((block3 & 0x0001) << 4) | ((block4 >> 12) & 0x0F));
// adjust offset
if (off & 0x20) {
mins -= 30 * (off & 0x1F);
} else {
mins += 30 * (off & 0x1F);
}
if ((_sendTime) && (mins != _lastRDSMinutes)) {
_lastRDSMinutes = mins;
_sendTime(mins / 60, mins % 60);
} // if
break;
case 0x6A:
// IH
break;
case 0x8A:
// TMC
break;
case 0xAA:
// TMC
break;
case 0xCA:
// TMC
break;
case 0xEA:
// IH
break;
default:
// Serial.print("RDS_GRP:"); Serial.println(rdsGroupType, HEX);
break;
}
} // processData()
// End. | [
"mathertel@hotmail.com"
] | mathertel@hotmail.com |
a361b74378c300f6c8497fc181e09278f2737d19 | 9f32ed58a8c9c1fb390d5f5b27542bdc534dbc6b | /astgen/src/ast_utils.cpp | ee4c387c7ab9dcfaf8131ef9ebcbbd9b57944cc0 | [] | no_license | bgyss/cppmm | f97fb52cf3c90f8a49ecaba10f8cdafe35989231 | cf6506283625256d1e61356b8986e8db98eb1962 | refs/heads/main | 2023-08-19T23:55:27.813763 | 2021-10-22T21:25:08 | 2021-10-22T21:25:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,639 | cpp | #include "ast_utils.hpp"
#include "pystring.h"
namespace ps = pystring;
#include "base64.hpp"
#include <clang/AST/ASTContext.h>
#include <clang/AST/Attr.h>
#include <clang/Basic/ExceptionSpecificationType.h>
#include <clang/Basic/SourceManager.h>
#define SPDLOG_ACTIVE_LEVEL TRACE
#include <spdlog/fmt/fmt.h>
#include <spdlog/fmt/ostr.h>
#include <spdlog/spdlog.h>
using namespace clang;
namespace cppmm {
/// Get any annotation attributes on the given Decl and return their values as
/// a vector of strings
std::vector<std::string> get_attrs(const clang::Decl* decl) {
std::vector<std::string> attrs;
if (decl->hasAttrs()) {
clang::ASTContext& ctx = decl->getASTContext();
for (const auto& attr : decl->attrs()) {
const clang::AnnotateAttr* ann =
clang::dyn_cast<const clang::AnnotateAttr>(attr);
if (ann) {
attrs.push_back(ann->getAnnotation().str());
}
}
}
return attrs;
}
/// Strip the type kinds off the front of a type name in the given string
std::string strip_name_kinds(std::string s) {
s = pystring::replace(s, "class ", "");
s = pystring::replace(s, "struct ", "");
s = pystring::replace(s, "enum ", "");
s = pystring::replace(s, "union ", "");
return s;
}
/// Get a nice, qualified name for the given record
std::string get_record_name(const CXXRecordDecl* crd) {
// we have to do this dance to get the template parameters in the name,
// otherwise they're omitted
return strip_name_kinds(crd->getCanonicalDecl()
->getTypeForDecl()
->getCanonicalTypeInternal()
.getAsString());
}
/// Get the full namespace path as a string
std::string get_namespace_path(const DeclContext* dc) {
std::string result;
auto* parent = dc->getParent();
while (parent) {
if (parent->isNamespace()) {
const clang::NamespaceDecl* ns =
static_cast<const clang::NamespaceDecl*>(parent);
result = ns->getNameAsString() + "::" + result;
} else if (parent->isRecord()) {
const clang::CXXRecordDecl* crd =
static_cast<const clang::CXXRecordDecl*>(parent);
result = crd->getNameAsString() + "::" + result;
}
parent = parent->getParent();
}
return result;
}
std::string mangle_type(const QualType& qt) {
std::string const_ = "";
if (qt.isConstQualified()) {
const_ = "const ";
}
if (qt->isPointerType() || qt->isReferenceType()) {
std::string pointee = mangle_type(qt->getPointeeType());
std::string ptr = "*";
if (qt->isReferenceType()) {
ptr = "&";
} else if (qt->isRValueReferenceType()) {
ptr = "&&";
}
return fmt::format("{}{}{}", const_, pointee, ptr);
} else if (qt->isConstantArrayType()) {
const ConstantArrayType* cat =
dyn_cast<ConstantArrayType>(qt.getTypePtr());
std::string element = mangle_type(cat->getElementType());
return fmt::format("{}{}[{}]", const_, element,
cat->getSize().getLimitedValue());
} else if (qt->isRecordType()) {
auto crd = qt->getAsCXXRecordDecl();
return fmt::format("{}{}", const_, mangle_decl(crd));
} else if (qt->isBuiltinType()) {
return fmt::format("{}{}", const_,
qt.getUnqualifiedType().getAsString());
} else if (qt->isEnumeralType()) {
auto ed = qt->getAsTagDecl();
return fmt::format("{}{}", const_, mangle_decl(ed));
} else if (qt->isFunctionProtoType()) {
const auto type_name = qt.getUnqualifiedType().getAsString();
return fmt::format("{}{}", const_, type_name);
} else {
const auto type_name = qt.getUnqualifiedType().getAsString();
SPDLOG_WARN("Unhandled type in mangling {}", type_name);
return fmt::format("{}{}", const_, type_name);
}
}
std::vector<std::string>
mangle_template_args(const TemplateArgumentList& args) {
std::vector<std::string> result;
for (int i = 0; i < args.size(); ++i) {
const auto& arg = args[i];
if (arg.getKind() == TemplateArgument::ArgKind::Null) {
result.push_back("Null");
} else if (arg.getKind() == TemplateArgument::ArgKind::Type) {
result.push_back(mangle_type(arg.getAsType()));
} else if (arg.getKind() == TemplateArgument::ArgKind::Declaration) {
result.push_back("Declaration");
} else if (arg.getKind() == TemplateArgument::ArgKind::NullPtr) {
result.push_back("NullPtr");
} else if (arg.getKind() == TemplateArgument::ArgKind::Integral) {
result.push_back(
ps::replace(arg.getAsIntegral().toString(10), "-", "neg"));
} else if (arg.getKind() == TemplateArgument::ArgKind::Template) {
result.push_back("Template");
} else if (arg.getKind() ==
TemplateArgument::ArgKind::TemplateExpansion) {
result.push_back("TemplateExpansion");
} else if (arg.getKind() == TemplateArgument::ArgKind::Expression) {
result.push_back("Expression");
} else {
result.push_back("Pack");
}
}
return result;
}
std::string mangle_decl(const TagDecl* crd) {
std::string namespace_path = get_namespace_path(crd);
if (const auto* ctd = dyn_cast<ClassTemplateSpecializationDecl>(crd)) {
auto args = mangle_template_args(ctd->getTemplateArgs());
return fmt::format("{}::{}<{}>", namespace_path, ctd->getNameAsString(),
ps::join(", ", args));
} else {
return fmt::format("{}::{}", namespace_path, crd->getNameAsString());
}
}
std::string get_comment(const clang::Decl* decl) {
ASTContext& ctx = decl->getASTContext();
SourceManager& sm = ctx.getSourceManager();
const RawComment* rc = ctx.getRawCommentForDeclNoCache(decl);
if (rc) {
// Found comment!
SourceRange range = rc->getSourceRange();
PresumedLoc startPos = sm.getPresumedLoc(range.getBegin());
PresumedLoc endPos = sm.getPresumedLoc(range.getEnd());
return rc->getFormattedText(sm, sm.getDiagnostics());
}
return "";
}
std::string get_comment_base64(const clang::Decl* decl) {
return base64::base64_encode(get_comment(decl));
}
bool is_noexcept(const clang::FunctionDecl* fd) {
return isNoexceptExceptionSpec(fd->getExceptionSpecType());
}
} // namespace cppmm
| [
"anderslanglands@gmail.com"
] | anderslanglands@gmail.com |
30b3c7d54d1c1210d296287bc65e31b594a6f02b | bbeaadef08cccb872c9a1bb32ebac7335d196318 | /Fontes/Patamar/TFormPatamar.h | c3eb60a9132d04bbc2c22734a6e1a06442ad7c9b | [] | no_license | danilodesouzapereira/plataformasinap_exportaopendss | d0e529b493f280aefe91b37e893359a373557ef8 | c624e9e078dce4b9bcc8e5b03dd4d9ea71c29b3f | refs/heads/master | 2023-03-20T20:37:21.948550 | 2021-03-12T17:53:12 | 2021-03-12T17:53:12 | 347,150,304 | 0 | 0 | null | null | null | null | ISO-8859-2 | C++ | false | false | 2,815 | h | //---------------------------------------------------------------------------
#ifndef TFormPatamarH
#define TFormPatamarH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
#include <ToolWin.hpp>
#include <CheckLst.hpp>
#include <Grids.hpp>
#include <System.Actions.hpp>
#include <System.ImageList.hpp>
//---------------------------------------------------------------------------
class VTApl;
class VTPatamar;
//---------------------------------------------------------------------------
class TFormPatamar : public TForm
{
__published: // IDE-managed Components
TRadioGroup *RGroupPatamares;
TToolBar *ToolBar1;
TToolButton *butConfirma;
TToolButton *butCancela;
TImageList *ImageList1;
TActionList *ActionList1;
TAction *ActionCancela;
TAction *ActionConfirma;
TAction *ActionEnablePatamar;
TAction *ActionDisablePatamar;
TPageControl *PageControl;
TTabSheet *TabSheetHoraCal;
TTabSheet *TabSheetHabilita;
TGroupBox *GroupBoxHabilitar;
TCheckListBox *CLBoxPatamar;
TToolBar *ToolBarPatamar;
TToolButton *ToolButton1;
TToolButton *ToolButton2;
TStringGrid *StringGridConfig;
void __fastcall ActionCancelaExecute(TObject *Sender);
void __fastcall ActionConfirmaExecute(TObject *Sender);
void __fastcall RGroupPatamaresClick(TObject *Sender);
void __fastcall ActionEnablePatamarExecute(TObject *Sender);
void __fastcall ActionDisablePatamarExecute(TObject *Sender);
void __fastcall CLBoxPatamarClickCheck(TObject *Sender);
public: // User declarations
__fastcall TFormPatamar(TComponent* Owner, VTApl *apl);
__fastcall ~TFormPatamar(void);
private: //métodos
bool __fastcall AtualizaPatamar(VTPatamar *patamar, TDateTime date_time_ini,TDateTime date_time_fim,TDateTime date_time_cal);
void __fastcall CLBoxPatamarInicia(void);
void __fastcall CriaPatamares(void);
void __fastcall FormIniciaPosicao(void);
void __fastcall LimpaTStringGrid(TStringGrid *StringGrid);
void __fastcall RGroupPatamarInicia(void);
bool __fastcall SalvaPatamares(void);
bool __fastcall SalvaValores(void);
bool __fastcall SalvaValoresInfoset(AnsiString nome_pat, TDateTime date_time_ini,TDateTime date_time_fim,TDateTime date_time_cal);
void __fastcall StringGridConfigInicia(void);
bool __fastcall ValidaHoraMinutoCalculo(VTPatamar *patamar, TDateTime date_time_cal);
bool __fastcall ValidaValores(AnsiString *pat1, AnsiString *pat2);
private: //objetos externos
VTApl *apl;
private: //dados locais
TList *lisPAT;
};
//---------------------------------------------------------------------------
#endif
//eof
| [
"danilopereira@usp.br"
] | danilopereira@usp.br |
e6fb6f4685c46f5af54a6ab2ebb93dc2201a4ff9 | c8cadfa6aca222ac8d7f8f54c9c18c6fa463309a | /zlibrary/core/src/language/ZLLanguageDetector.h | 44435adf900a370b1370d31d7adf6fae1a5db518 | [] | no_license | justsoso8/fbreader-0.8.17 | 9f402e4796b5d9eb0eb008d40f38d28f19a73cfa | 9aab2bbcb3db1ac0c4927919cdcfd24cfa2abe4b | refs/heads/master | 2021-01-22T23:21:22.120929 | 2010-11-11T03:59:00 | 2010-11-11T03:59:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,594 | h | /*
* Copyright (C) 2007-2008 Geometer Plus <contact@geometerplus.com>
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef __ZLLANGUAGEDETECTOR_H__
#define __ZLLANGUAGEDETECTOR_H__
#include <vector>
#include <string>
#include <shared_ptr.h>
class ZLWordBasedMatcher;
class ZLChineseMatcher;
class ZLLanguageDetector {
public:
struct LanguageInfo {
LanguageInfo(const std::string &language, const std::string &encoding);
const std::string Language;
const std::string Encoding;
};
public:
ZLLanguageDetector();
~ZLLanguageDetector();
shared_ptr<LanguageInfo> findInfo(const char *buffer, size_t length, int matchingCriterion = 0);
private:
typedef std::vector<shared_ptr<ZLWordBasedMatcher> > WBVector;
typedef std::vector<shared_ptr<ZLChineseMatcher> > ZHVector;
WBVector myUtf8Matchers;
WBVector myNonUtf8Matchers;
ZHVector myChineseMatchers;
};
#endif /* __ZLLANGUAGEDETECTOR_H__ */
| [
"Justsoso8@gmail.com"
] | Justsoso8@gmail.com |
196df46724cbedbc46d6503fad0507c5ab170929 | 7719e2ae617b3bd0a444444707682d75c379c82d | /Labirintas/Priesai.cpp | 070b1d283b030419b8b5b2a7fad237f8d0146cf4 | [] | no_license | deivunis/Labirintas | d599db168eca8b38cc410ef3a9736b08b4402bb7 | 45b6806d30d185dd5afad1cb319ce3620721bcbf | refs/heads/master | 2023-04-20T01:20:44.277461 | 2021-05-14T16:36:23 | 2021-05-14T16:36:23 | 364,684,556 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,052 | cpp | #include "Priesai.h"
using namespace std;
/*/void Goblinas::Monstras()
{
mx = 7;
my = 1;
monstras = { 4 };
}*/
int Goblinas::Damage()
{
srand((unsigned)time(0));
int dmg = 1 + (rand() % 30);
return dmg;
}
int Goblinas::Exhaustion()
{
srand((unsigned)time(0));
int exh = 1 + (rand() % 30);
return exh;
}
int Goblinas::goblino_Pinigai()
{
srand((unsigned)time(0));
int money = 1 + (rand() % 100);
return money;
}
int Vilkolakis::Damage()
{
srand((unsigned)time(0));
int dmg = 1 + (rand() % 50);
return dmg;
}
int Vilkolakis::Exhaustion()
{
srand((unsigned)time(0));
int exh = 1 + (rand() % 15);
return exh;
}
int Vilkolakis::vilkolakio_Eleksyras()
{
srand((unsigned)time(0));
int hp = 1 + (rand() % 20);
return hp;
}
int Skeletonas::Damage()
{
srand((unsigned)time(0));
int dmg = 1 + (rand() % 30);
return dmg;
}
int Skeletonas::Exhaustion()
{
srand((unsigned)time(0));
int exh = 1 + (rand() % 50);
return exh;
}
int Skeletonas::skeletono_Eleksyras()
{
srand((unsigned)time(0));
int pwr = 1 + (rand() % 20);
return pwr;
}
| [
"d3ivunis@gmail.com"
] | d3ivunis@gmail.com |
f1b2d8711664ef90eded1c74bd147f3a1e32ad0c | 659d99d090479506b63b374831a049dba5d70fcf | /xray-svn-trunk/xrNetServer/NET_Client.cpp | 96b27ed91435f13d94683fa52958d3ac65daa281 | [] | no_license | ssijonson/Rengen_Luch | a9312fed06dd08c7de19f36e5fd5e476881beb85 | 9bd0ff54408a890d4bdac1c493d67ce26b964555 | refs/heads/main | 2023-05-03T13:09:58.983176 | 2021-05-19T10:04:47 | 2021-05-19T10:04:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 20,620 | cpp | #include "stdafx.h"
#include "NET_Common.h"
#include "net_client.h"
#include "net_server.h"
#include "net_messages.h"
#include "NET_Log.h"
#pragma warning(push)
#pragma warning(disable:4995)
#include <malloc.h>
#include "dxerr.h"
//#pragma warning(pop)
// {0218FA8B-515B-4bf2-9A5F-2F079D1759F3}
static const GUID NET_GUID =
{ 0x218fa8b, 0x515b, 0x4bf2, { 0x9a, 0x5f, 0x2f, 0x7, 0x9d, 0x17, 0x59, 0xf3 } };
// {8D3F9E5E-A3BD-475b-9E49-B0E77139143C}
static const GUID CLSID_NETWORKSIMULATOR_DP8SP_TCPIP =
{ 0x8d3f9e5e, 0xa3bd, 0x475b, { 0x9e, 0x49, 0xb0, 0xe7, 0x71, 0x39, 0x14, 0x3c } };
const GUID CLSID_DirectPlay8Client =
{ 0x743f1dc6, 0x5aba, 0x429f, { 0x8b, 0xdf, 0xc5, 0x4d, 0x03, 0x25, 0x3d, 0xc2 } };
// {DA825E1B-6830-43d7-835D-0B5AD82956A2}
const GUID CLSID_DirectPlay8Server =
{ 0xda825e1b, 0x6830, 0x43d7, { 0x83, 0x5d, 0x0b, 0x5a, 0xd8, 0x29, 0x56, 0xa2 } };
// {286F484D-375E-4458-A272-B138E2F80A6A}
const GUID CLSID_DirectPlay8Peer =
{ 0x286f484d, 0x375e, 0x4458, { 0xa2, 0x72, 0xb1, 0x38, 0xe2, 0xf8, 0x0a, 0x6a } };
// CLSIDs added for DirectX 9
// {FC47060E-6153-4b34-B975-8E4121EB7F3C}
const GUID CLSID_DirectPlay8ThreadPool =
{ 0xfc47060e, 0x6153, 0x4b34, { 0xb9, 0x75, 0x8e, 0x41, 0x21, 0xeb, 0x7f, 0x3c } };
// {E4C1D9A2-CBF7-48bd-9A69-34A55E0D8941}
const GUID CLSID_DirectPlay8NATResolver =
{ 0xe4c1d9a2, 0xcbf7, 0x48bd, { 0x9a, 0x69, 0x34, 0xa5, 0x5e, 0x0d, 0x89, 0x41 } };
/****************************************************************************
*
* DirectPlay8 Interface IIDs
*
****************************************************************************/
typedef REFIID DP8REFIID;
// {5102DACD-241B-11d3-AEA7-006097B01411}
const GUID IID_IDirectPlay8Client =
{ 0x5102dacd, 0x241b, 0x11d3, { 0xae, 0xa7, 0x00, 0x60, 0x97, 0xb0, 0x14, 0x11 } };
// {5102DACE-241B-11d3-AEA7-006097B01411}
const GUID IID_IDirectPlay8Server =
{ 0x5102dace, 0x241b, 0x11d3, { 0xae, 0xa7, 0x00, 0x60, 0x97, 0xb0, 0x14, 0x11 } };
// {5102DACF-241B-11d3-AEA7-006097B01411}
const GUID IID_IDirectPlay8Peer =
{ 0x5102dacf, 0x241b, 0x11d3, { 0xae, 0xa7, 0x00, 0x60, 0x97, 0xb0, 0x14, 0x11 } };
// IIDs added for DirectX 9
// {0D22EE73-4A46-4a0d-89B2-045B4D666425}
const GUID IID_IDirectPlay8ThreadPool =
{ 0xd22ee73, 0x4a46, 0x4a0d, { 0x89, 0xb2, 0x04, 0x5b, 0x4d, 0x66, 0x64, 0x25 } };
// {A9E213F2-9A60-486f-BF3B-53408B6D1CBB}
const GUID IID_IDirectPlay8NATResolver =
{ 0xa9e213f2, 0x9a60, 0x486f, { 0xbf, 0x3b, 0x53, 0x40, 0x8b, 0x6d, 0x1c, 0xbb } };
// {53934290-628D-11D2-AE0F-006097B01411}
const GUID CLSID_DP8SP_IPX =
{ 0x53934290, 0x628d, 0x11d2, { 0xae, 0x0f, 0x00, 0x60, 0x97, 0xb0, 0x14, 0x11 } };
// {6D4A3650-628D-11D2-AE0F-006097B01411}
const GUID CLSID_DP8SP_MODEM =
{ 0x6d4a3650, 0x628d, 0x11d2, { 0xae, 0x0f, 0x00, 0x60, 0x97, 0xb0, 0x14, 0x11 } };
// {743B5D60-628D-11D2-AE0F-006097B01411}
const GUID CLSID_DP8SP_SERIAL =
{ 0x743b5d60, 0x628d, 0x11d2, { 0xae, 0x0f, 0x00, 0x60, 0x97, 0xb0, 0x14, 0x11 } };
// {EBFE7BA0-628D-11D2-AE0F-006097B01411}
const GUID CLSID_DP8SP_TCPIP =
{ 0xebfe7ba0, 0x628d, 0x11d2, { 0xae, 0x0f, 0x00, 0x60, 0x97, 0xb0, 0x14, 0x11 } };
// Service providers added for DirectX 9
// {995513AF-3027-4b9a-956E-C772B3F78006}
const GUID CLSID_DP8SP_BLUETOOTH =
{ 0x995513af, 0x3027, 0x4b9a, { 0x95, 0x6e, 0xc7, 0x72, 0xb3, 0xf7, 0x80, 0x06 } };
const GUID CLSID_DirectPlay8Address =
{ 0x934a9523, 0xa3ca, 0x4bc5, { 0xad, 0xa0, 0xd6, 0xd9, 0x5d, 0x97, 0x94, 0x21 } };
const GUID IID_IDirectPlay8Address =
{ 0x83783300, 0x4063, 0x4c8a, { 0x9d, 0xb3, 0x82, 0x83, 0x0a, 0x7f, 0xeb, 0x31 } };
static INetLog* pClNetLog = NULL;
void dump_URL (LPCSTR p, IDirectPlay8Address* A)
{
string256 aaaa;
DWORD aaaa_s = sizeof(aaaa);
R_CHK (A->GetURLA(aaaa,&aaaa_s));
Log (p,aaaa);
}
//
INetQueue::INetQueue()
{
unused.reserve (128);
for (int i=0; i<16; i++)
unused.push_back (xr_new <NET_Packet>());
}
INetQueue::~INetQueue()
{
cs.Enter ();
u32 it;
for (it=0; it<unused.size(); it++) xr_delete(unused[it]);
for (it=0; it<ready.size(); it++) xr_delete(ready[it]);
cs.Leave ();
}
static u32 LastTimeCreate = 0;
NET_Packet* INetQueue::Create ()
{
NET_Packet* P = 0;
//cs.Enter ();
//#ifdef _DEBUG
// Msg ("- INetQueue::Create - ready %d, unused %d", ready.size(), unused.size());
//#endif
if (unused.empty())
{
ready.push_back (xr_new <NET_Packet> ());
P = ready.back ();
//---------------------------------------------
LastTimeCreate = GetTickCount();
//---------------------------------------------
} else {
ready.push_back (unused.back());
unused.pop_back ();
P = ready.back ();
}
//cs.Leave ();
return P;
}
NET_Packet* INetQueue::Create (const NET_Packet& _other)
{
NET_Packet* P = 0;
cs.Enter ();
//#ifdef _DEBUG
// Msg ("- INetQueue::Create - ready %d, unused %d", ready.size(), unused.size());
//#endif
if (unused.empty())
{
ready.push_back (xr_new <NET_Packet>());
P = ready.back ();
//---------------------------------------------
LastTimeCreate = GetTickCount();
//---------------------------------------------
} else {
ready.push_back (unused.back());
unused.pop_back ();
P = ready.back ();
}
CopyMemory (P,&_other,sizeof(NET_Packet));
cs.Leave ();
return P;
}
NET_Packet* INetQueue::Retreive ()
{
NET_Packet* P = 0;
//cs.Enter ();
//#ifdef _DEBUG
// Msg ("INetQueue::Retreive - ready %d, unused %d", ready.size(), unused.size());
//#endif
if (!ready.empty()) P = ready.front();
//---------------------------------------------
else
{
u32 tmp_time = GetTickCount()-60000;
u32 size = unused.size();
if ((LastTimeCreate < tmp_time) && (size > 32))
{
xr_delete(unused.back());
unused.pop_back();
}
}
//---------------------------------------------
//cs.Leave ();
return P;
}
void INetQueue::Release ()
{
//cs.Enter ();
//#ifdef _DEBUG
// Msg ("INetQueue::Release - ready %d, unused %d", ready.size(), unused.size());
//#endif
VERIFY (!ready.empty());
//---------------------------------------------
u32 tmp_time = GetTickCount()-60000;
u32 size = unused.size();
ready.front()->B.count = 0;
if ((LastTimeCreate < tmp_time) && (size > 32))
{
xr_delete(ready.front());
}
else
unused.push_back(ready.front());
//---------------------------------------------
ready.pop_front ();
//cs.Leave ();
}
//
const u32 syncQueueSize = 512;
const int syncSamples = 256;
class XRNETSERVER_API syncQueue
{
u32 table [syncQueueSize];
u32 write;
u32 count;
public:
syncQueue() { clear(); }
IC void push (u32 value)
{
table[write++] = value;
if (write == syncQueueSize) write = 0;
if (count <= syncQueueSize) count++;
}
IC u32* begin () { return table; }
IC u32* end () { return table+count; }
IC u32 size () { return count; }
IC void clear () { write=0; count=0; }
} net_DeltaArray;
//-------
XRNETSERVER_API Flags32 psNET_Flags = {0};
/****************************************************************************
*
* DirectPlay8 Service Provider GUIDs
*
****************************************************************************/
void
IPureClient::_SendTo_LL( const void* data, u32 size, u32 flags, u32 timeout )
{
IPureClient::SendTo_LL( const_cast<void*>(data), size, flags, timeout );
}
//------------------------------------------------------------------------------
void
IPureClient::_Recieve( const void* data, u32 data_size, u32 /*param*/ )
{
MSYS_PING* cfg = (MSYS_PING*)data;
net_Statistic.dwBytesReceived += data_size;
if( (data_size>=2*sizeof(u32))
&& (cfg->sign1==0x12071980)
&& (cfg->sign2==0x26111975)
)
{
// Internal system message
if( (data_size == sizeof(MSYS_PING)) )
{
// It is reverted(server) ping
u32 time = TimerAsync( device_timer );
u32 ping = time - (cfg->dwTime_ClientSend);
u32 delta = cfg->dwTime_Server + ping/2 - time;
net_DeltaArray.push ( delta );
Sync_Average ();
return;
}
if ( data_size == sizeof(MSYS_CONFIG) )
{
net_Connected = EnmConnectionCompleted;
return;
}
Msg( "! Unknown system message" );
return;
}
else if( net_Connected == EnmConnectionCompleted )
{
// one of the messages - decompress it
if( psNET_Flags.test( NETFLAG_LOG_CL_PACKETS ) )
{
if( !pClNetLog )
pClNetLog = xr_new <INetLog>("logs\\net_cl_log.log", timeServer());
if( pClNetLog )
pClNetLog->LogData( timeServer(), const_cast<void*>(data), data_size, TRUE );
}
OnMessage( const_cast<void*>(data), data_size );
}
}
//==============================================================================
IPureClient::IPureClient (CTimer* timer): net_Statistic(timer)
{
NET = NULL;
net_Address_server = NULL;
net_Address_device = NULL;
device_timer = timer;
net_TimeDelta_User = 0;
net_Time_LastUpdate = 0;
net_TimeDelta = 0;
net_TimeDelta_Calculated = 0;
pClNetLog = NULL;//xr_new<INetLog>("logs\\net_cl_log.log", timeServer());
}
IPureClient::~IPureClient ()
{
xr_delete(pClNetLog); pClNetLog = NULL;
}
BOOL IPureClient::Connect (LPCSTR options)
{
R_ASSERT (options);
net_Disconnected = FALSE;
// Sync
net_TimeDelta = 0;
return TRUE;
}
void IPureClient::Disconnect()
{
if( NET ) NET->Close(0);
// Clean up Host _list_
net_csEnumeration.Enter ();
for (u32 i=0; i<net_Hosts.size(); i++) {
HOST_NODE& N = net_Hosts[i];
_RELEASE (N.pHostAddress);
}
net_Hosts.clear ();
net_csEnumeration.Leave ();
// Release interfaces
_SHOW_REF ("cl_netADR_Server",net_Address_server);
_RELEASE (net_Address_server);
_SHOW_REF ("cl_netADR_Device",net_Address_device);
_RELEASE (net_Address_device);
_SHOW_REF ("cl_netCORE",NET);
_RELEASE (NET);
net_Connected = EnmConnectionWait;
net_Syncronised = FALSE;
}
HRESULT IPureClient::net_Handler(u32 dwMessageType, PVOID pMessage)
{
// HRESULT hr = S_OK;
switch (dwMessageType)
{
case DPN_MSGID_ENUM_HOSTS_RESPONSE:
{
PDPNMSG_ENUM_HOSTS_RESPONSE pEnumHostsResponseMsg;
const DPN_APPLICATION_DESC* pDesc;
// HOST_NODE* pHostNode = NULL;
// WCHAR* pwszSession = NULL;
pEnumHostsResponseMsg = (PDPNMSG_ENUM_HOSTS_RESPONSE) pMessage;
pDesc = pEnumHostsResponseMsg->pApplicationDescription;
if (pDesc->dwApplicationReservedDataSize && pDesc->pvApplicationReservedData)
{
R_ASSERT(pDesc->dwApplicationReservedDataSize == sizeof(m_game_description));
CopyMemory(&m_game_description, pDesc->pvApplicationReservedData,
pDesc->dwApplicationReservedDataSize);
}
// Insert each host response if it isn't already present
net_csEnumeration.Enter ();
BOOL bHostRegistered = FALSE;
for (u32 I=0; I<net_Hosts.size(); I++)
{
HOST_NODE& N = net_Hosts [I];
if ( pDesc->guidInstance == N.dpAppDesc.guidInstance)
{
// This host is already in the list
bHostRegistered = TRUE;
break;
}
}
if (!bHostRegistered)
{
// This host session is not in the list then so insert it.
HOST_NODE NODE;
ZeroMemory (&NODE, sizeof(HOST_NODE));
// Copy the Host Address
R_CHK (pEnumHostsResponseMsg->pAddressSender->Duplicate(&NODE.pHostAddress ) );
CopyMemory(&NODE.dpAppDesc,pDesc,sizeof(DPN_APPLICATION_DESC));
// Null out all the pointers we aren't copying
NODE.dpAppDesc.pwszSessionName = NULL;
NODE.dpAppDesc.pwszPassword = NULL;
NODE.dpAppDesc.pvReservedData = NULL;
NODE.dpAppDesc.dwReservedDataSize = 0;
NODE.dpAppDesc.pvApplicationReservedData = NULL;
NODE.dpAppDesc.dwApplicationReservedDataSize = 0;
if( pDesc->pwszSessionName) {
string4096 dpSessionName;
R_CHK (WideCharToMultiByte(CP_ACP,0,pDesc->pwszSessionName,-1,dpSessionName,sizeof(dpSessionName),0,0));
NODE.dpSessionName = (char*)(&dpSessionName[0]);
}
net_Hosts.push_back (NODE);
}
net_csEnumeration.Leave ();
}
break;
case DPN_MSGID_RECEIVE:
{
PDPNMSG_RECEIVE pMsg = (PDPNMSG_RECEIVE) pMessage;
MultipacketReciever::RecievePacket( pMsg->pReceiveData, pMsg->dwReceiveDataSize );
}
break;
case DPN_MSGID_TERMINATE_SESSION:
{
PDPNMSG_TERMINATE_SESSION pMsg = (PDPNMSG_TERMINATE_SESSION ) pMessage;
char* m_data = (char*)pMsg->pvTerminateData;
u32 m_size = pMsg->dwTerminateDataSize;
HRESULT m_hResultCode = pMsg->hResultCode;
net_Disconnected = TRUE;
if (m_size != 0)
{
OnSessionTerminate(m_data);
#ifdef DEBUG
Msg("- Session terminated : %s", m_data);
#endif
}
else
{
#ifdef DEBUG
OnSessionTerminate( (::Debug.error2string(m_hResultCode)));
Msg("- Session terminated : %s", (::Debug.error2string(m_hResultCode)));
#endif
}
};
break;
default:
{
#if 1
LPSTR msg = "";
switch (dwMessageType)
{
case DPN_MSGID_ADD_PLAYER_TO_GROUP: msg = "DPN_MSGID_ADD_PLAYER_TO_GROUP"; break;
case DPN_MSGID_ASYNC_OP_COMPLETE: msg = "DPN_MSGID_ASYNC_OP_COMPLETE"; break;
case DPN_MSGID_CLIENT_INFO: msg = "DPN_MSGID_CLIENT_INFO"; break;
case DPN_MSGID_CONNECT_COMPLETE:
{
PDPNMSG_CONNECT_COMPLETE pMsg = (PDPNMSG_CONNECT_COMPLETE)pMessage;
#ifdef DEBUG
// const char* x = DXGetErrorString9(pMsg->hResultCode);
if (pMsg->hResultCode != S_OK)
{
string1024 tmp="";
DXTRACE_ERR(tmp, pMsg->hResultCode);
}
#endif
if (pMsg->dwApplicationReplyDataSize)
{
string256 ResStr = "";
strncpy_s(ResStr, (char*)(pMsg->pvApplicationReplyData), pMsg->dwApplicationReplyDataSize);
Msg("Connection result : %s", ResStr);
}
else
msg = "DPN_MSGID_CONNECT_COMPLETE";
}break;
case DPN_MSGID_CREATE_GROUP: msg = "DPN_MSGID_CREATE_GROUP"; break;
case DPN_MSGID_CREATE_PLAYER: msg = "DPN_MSGID_CREATE_PLAYER"; break;
case DPN_MSGID_DESTROY_GROUP: msg = "DPN_MSGID_DESTROY_GROUP"; break;
case DPN_MSGID_DESTROY_PLAYER: msg = "DPN_MSGID_DESTROY_PLAYER"; break;
case DPN_MSGID_ENUM_HOSTS_QUERY: msg = "DPN_MSGID_ENUM_HOSTS_QUERY"; break;
case DPN_MSGID_GROUP_INFO: msg = "DPN_MSGID_GROUP_INFO"; break;
case DPN_MSGID_HOST_MIGRATE: msg = "DPN_MSGID_HOST_MIGRATE"; break;
case DPN_MSGID_INDICATE_CONNECT: msg = "DPN_MSGID_INDICATE_CONNECT"; break;
case DPN_MSGID_INDICATED_CONNECT_ABORTED: msg = "DPN_MSGID_INDICATED_CONNECT_ABORTED"; break;
case DPN_MSGID_PEER_INFO: msg = "DPN_MSGID_PEER_INFO"; break;
case DPN_MSGID_REMOVE_PLAYER_FROM_GROUP: msg = "DPN_MSGID_REMOVE_PLAYER_FROM_GROUP"; break;
case DPN_MSGID_RETURN_BUFFER: msg = "DPN_MSGID_RETURN_BUFFER"; break;
case DPN_MSGID_SEND_COMPLETE: msg = "DPN_MSGID_SEND_COMPLETE"; break;
case DPN_MSGID_SERVER_INFO: msg = "DPN_MSGID_SERVER_INFO"; break;
case DPN_MSGID_TERMINATE_SESSION: msg = "DPN_MSGID_TERMINATE_SESSION"; break;
default: msg = "???"; break;
}
//Msg("! ************************************ : %s",msg);
#endif
}
break;
}
return S_OK;
}
void IPureClient::OnMessage(void* data, u32 size)
{
// One of the messages - decompress it
net_Queue.Lock();
NET_Packet* P = net_Queue.Create();
P->construct( data, size );
P->timeReceive = timeServer_Async();//TimerAsync (device_timer);
u16 m_type;
P->r_begin (m_type);
net_Queue.Unlock();
}
void IPureClient::timeServer_Correct(u32 sv_time, u32 cl_time)
{
u32 ping = net_Statistic.getPing();
u32 delta = sv_time + ping/2 - cl_time;
net_DeltaArray.push (delta);
Sync_Average ();
}
void IPureClient::SendTo_LL(void* data, u32 size, u32 dwFlags, u32 dwTimeout)
{
if( net_Disconnected )
return;
if( psNET_Flags.test(NETFLAG_LOG_CL_PACKETS) )
{
if( !pClNetLog)
pClNetLog = xr_new <INetLog>( "logs\\net_cl_log.log", timeServer() );
if( pClNetLog )
pClNetLog->LogData( timeServer(), data, size );
}
DPN_BUFFER_DESC desc;
desc.dwBufferSize = size;
desc.pBufferData = (BYTE*)data;
net_Statistic.dwBytesSended += size;
// verify
VERIFY(desc.dwBufferSize);
VERIFY(desc.pBufferData);
VERIFY(NET);
DPNHANDLE hAsync = 0;
HRESULT hr = NET->Send( &desc, 1, dwTimeout, 0, &hAsync, dwFlags | DPNSEND_COALESCE );
// Msg("- Client::SendTo_LL [%d]", size);
if( FAILED(hr) )
{
Msg ("! ERROR: Failed to send net-packet, reason: %s",::Debug.error2string(hr));
// const char* x = DXGetErrorString9(hr);
string1024 tmp="";
DXTRACE_ERR(tmp, hr);
}
}
void IPureClient::Send( NET_Packet& packet, u32 dwFlags, u32 dwTimeout )
{
MultipacketSender::SendPacket( packet.B.data, packet.B.count, dwFlags, dwTimeout );
}
void IPureClient::Flush_Send_Buffer ()
{
MultipacketSender::FlushSendBuffer( 0 );
}
void IPureClient::Sync_Thread ()
{
MSYS_PING clPing;
//***** Ping server
net_DeltaArray.clear();
R_ASSERT (NET);
for (; NET && !net_Disconnected; )
{
// Waiting for queue empty state
if (net_Syncronised) break; // Sleep(2000);
else {
DWORD dwPending=0;
do {
R_CHK (NET->GetSendQueueInfo(&dwPending,0,0));
Sleep (1);
} while (dwPending);
}
// Construct message
clPing.sign1 = 0x12071980;
clPing.sign2 = 0x26111975;
clPing.dwTime_ClientSend = TimerAsync(device_timer);
// Send it
__try {
DPN_BUFFER_DESC desc;
DPNHANDLE hAsync=0;
desc.dwBufferSize = sizeof(clPing);
desc.pBufferData = LPBYTE(&clPing);
if (0==NET || net_Disconnected) break;
if (FAILED(NET->Send(&desc,1,0,0,&hAsync,net_flags(FALSE,FALSE,TRUE)))) {
Msg("* CLIENT: SyncThread: EXIT. (failed to send - disconnected?)");
break;
}
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
Msg("* CLIENT: SyncThread: EXIT. (failed to send - disconnected?)");
break;
}
// Waiting for reply-packet to arrive
if (!net_Syncronised) {
u32 old_size = net_DeltaArray.size();
u32 timeBegin = TimerAsync(device_timer);
while ((net_DeltaArray.size()==old_size)&&(TimerAsync(device_timer)-timeBegin<5000)) Sleep(1);
if (net_DeltaArray.size()>=syncSamples) {
net_Syncronised = TRUE;
net_TimeDelta = net_TimeDelta_Calculated;
// Msg ("* CL_TimeSync: DELTA: %d",net_TimeDelta);
}
}
}
}
void IPureClient::Sync_Average ()
{
//***** Analyze results
s64 summary_delta = 0;
s32 size = net_DeltaArray.size();
u32* I = net_DeltaArray.begin();
u32* E = I+size;
for (; I!=E; I++) summary_delta += *((int*)I);
s64 frac = s64(summary_delta) % s64(size);
if (frac<0) frac=-frac;
summary_delta /= s64(size);
if (frac>s64(size/2)) summary_delta += (summary_delta<0)?-1:1;
net_TimeDelta_Calculated= s32(summary_delta);
net_TimeDelta = (net_TimeDelta*5+net_TimeDelta_Calculated)/6;
// Msg("* CLIENT: d(%d), dc(%d), s(%d)",net_TimeDelta,net_TimeDelta_Calculated,size);
}
void sync_thread(void* P)
{
SetThreadPriority (GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL);
IPureClient* C = (IPureClient*)P;
C->Sync_Thread ();
}
void IPureClient::net_Syncronize ()
{
net_Syncronised = FALSE;
net_DeltaArray.clear();
thread_spawn (sync_thread,"network-time-sync",0,this);
}
BOOL IPureClient::net_IsSyncronised()
{
return net_Syncronised;
}
#include <WINSOCK2.H>
#include <Ws2tcpip.h>
bool IPureClient::GetServerAddress (ip_address& pAddress, DWORD* pPort)
{
*pPort = 0;
if (!net_Address_server) return false;
WCHAR wstrHostname[ 2048 ] = {0};
DWORD dwHostNameSize = sizeof(wstrHostname);
DWORD dwHostNameDataType = DPNA_DATATYPE_STRING;
CHK_DX(net_Address_server->GetComponentByName( DPNA_KEY_HOSTNAME, wstrHostname, &dwHostNameSize, &dwHostNameDataType ));
string2048 HostName;
CHK_DX(WideCharToMultiByte(CP_ACP,0,wstrHostname,-1,HostName,sizeof(HostName),0,0));
hostent* pHostEnt = gethostbyname(HostName);
char* localIP;
localIP = inet_ntoa (*(struct in_addr *)*pHostEnt->h_addr_list);
pHostEnt = gethostbyname(pHostEnt->h_name);
localIP = inet_ntoa (*(struct in_addr *)*pHostEnt->h_addr_list);
pAddress.set (localIP);
//. pAddress[0] = (char)(*(struct in_addr *)*pHostEnt->h_addr_list).s_net;
//. pAddress[1] = (char)(*(struct in_addr *)*pHostEnt->h_addr_list).s_host;
//. pAddress[2] = (char)(*(struct in_addr *)*pHostEnt->h_addr_list).s_lh;
//. pAddress[3] = (char)(*(struct in_addr *)*pHostEnt->h_addr_list).s_impno;
DWORD dwPort = 0;
DWORD dwPortSize = sizeof(dwPort);
DWORD dwPortDataType = DPNA_DATATYPE_DWORD;
CHK_DX(net_Address_server->GetComponentByName( DPNA_KEY_PORT, &dwPort, &dwPortSize, &dwPortDataType ));
*pPort = dwPort;
return true;
};
| [
"16670637+KRodinn@users.noreply.github.com"
] | 16670637+KRodinn@users.noreply.github.com |
995b491b4c413bf764fa008b4e124225a928db28 | 4aab8fc2297c562ab5c473bb306038fc88060d5d | /ListCtrlDemo/ListCtrlDemo/ListCtrlDemoDlg.h | d0555ab12779e03c97b6fe4519d29973d51711b8 | [] | no_license | imhawool/C-MFC | 93e88edd1921068943498cd2fde254c796f3ce96 | 7ebf3be7ffe2d2b5482ba435fb2d625f318e9c4d | refs/heads/master | 2020-05-26T19:37:23.573459 | 2017-04-19T01:04:15 | 2017-04-19T01:04:15 | 82,498,566 | 0 | 1 | null | 2017-03-03T01:22:43 | 2017-02-19T23:57:05 | C++ | UHC | C++ | false | false | 854 | h |
// ListCtrlDemoDlg.h : 헤더 파일
//
#pragma once
#include "afxcmn.h"
// CListCtrlDemoDlg 대화 상자
class CListCtrlDemoDlg : public CDialogEx
{
// 생성입니다.
public:
CListCtrlDemoDlg(CWnd* pParent = NULL); // 표준 생성자입니다.
// 대화 상자 데이터입니다.
enum { IDD = IDD_LISTCTRLDEMO_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다.
// 구현입니다.
protected:
HICON m_hIcon;
// 생성된 메시지 맵 함수
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
CListCtrl m_List;
afx_msg void OnLvnEndlabeleditList(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnBnClickedButtonDelete();
};
| [
"noreply@github.com"
] | imhawool.noreply@github.com |
c8e487cbfecf24e8f60c12a2732b7298a49ffe24 | 0674a19a60ed1e2c16cd8eeae4306de2bcf44e92 | /dialog.cpp | c974c2a43a2fde5be671d20fcd9887307bf4612c | [
"MIT"
] | permissive | ashumeow/SchoolSystem | e5ca45ba5cf5db1231d6f00a68f65e775f4cc25c | 5bd9ed8e6c32246293cc70a7a75d2e67986bf7bd | refs/heads/master | 2021-01-15T05:43:46.274299 | 2014-04-25T22:02:33 | 2014-04-25T22:02:33 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,329 | cpp | #include "dialog.h"
Dialog::Dialog(const QStringList &m_listSubject, QDialog *parent): QDialog(parent),
gLayout(new QGridLayout), labelSubject(new QLabel("Subject")), labelGrade(new QLabel("Grade")),
comboBoxSubject(new QComboBox), comboBoxGrade(new QComboBox),
ok(new QPushButton("Accept")), cancel(new QPushButton("Cancel"))
{
//setAttribute(Qt::WA_DeleteOnClose);
QStringList listSubject, listGrade;
if(m_listSubject.size() == 0){
listSubject << "English Language" << "Mathematics" << "Biology" << "Agricultural Science"
<< "Physics" << "Chemistry" << "Economics" << "Yoruba" << "Geography"
<< "Government" << "Account" << "Literature in English" << "Commerce"
<< "Civic Education" << "CRK" << "CRS" << "Further Maths" << "Igbo"
<< "Hausa";
} else {
listSubject.append(m_listSubject);
}
listGrade << "A1" << "B2" << "B3" << "C4" << "C5" << "C6" << "D7" << "E8" << "F9";
listSubject.sort(Qt::CaseInsensitive);
comboBoxSubject->addItems(listSubject);
comboBoxGrade->addItems(listGrade);
gLayout->addWidget(labelSubject, 0, 0);
gLayout->addWidget(labelGrade, 1, 0);
gLayout->addWidget(comboBoxSubject, 0, 1);
gLayout->addWidget(comboBoxGrade, 1, 1);
gLayout->addWidget(ok, 2, 1);
gLayout->addWidget(cancel, 2, 2);
this->setLayout(gLayout);
QObject::connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
QObject::connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
QObject::connect(comboBoxSubject, SIGNAL(activated(QString)), this, SLOT(setSubject(QString)));
QObject::connect(comboBoxGrade, SIGNAL(activated(QString)), this, SLOT(setGrade(QString)));
}
const QString& Dialog::subject() const
{
return m_subject;
}
const QString& Dialog::grade() const
{
return m_grade;
}
void Dialog::setGrade(const QString &text)
{
if(text == m_grade || text == "")
return;
m_grade = text;
emit gradeChanged(text);
}
void Dialog::setSubject(const QString &text)
{
if(text == m_subject || text == "")
return;
m_subject = text;
emit subjectChanged(text);
}
void Dialog::setSubjectList(const QStringList &subjectList)
{
comboBoxSubject->clear();
comboBoxSubject->addItems(subjectList);
}
| [
"ogunyinkajoshua@yahoo.com"
] | ogunyinkajoshua@yahoo.com |
3c4d8280dc09d6e5bc323ede7fe86a41107c8287 | d6cf7e3a1a58fd3185e2619419f6aa66e8e9a9da | /3.6.7 Cyclic process. Working with numbers in number/9/main.cpp | ce0abb202045bce0c497a2731fa39e7c85b34228 | [] | no_license | Nkeyka/Qt-Creator-Cpp-Book | 6ba92cdb0eda0b844c83815266756c7e18d285e1 | dcbfaf86bd0ece7c0e5642e03ab5796e2a68c916 | refs/heads/main | 2023-02-23T08:52:16.902547 | 2021-02-02T05:21:36 | 2021-02-02T05:21:36 | 319,847,831 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 299 | cpp | #include <iostream>
using namespace std;
int main()
{
int N, N2;
cout << "N = ";
cin >> N;
cout << "N2 = ";
cin >> N2;
while (N != N2) {
if (N > N2) N -= N2;
else N2 -= N;
}
(N == 1) ? cout << "Yes" : cout << "No";
return 0;
}
| [
"nkeyka@gmail.com"
] | nkeyka@gmail.com |
9f6409b4ad031fd1090c6ffab3f56cda5f9fe999 | 1bcb966740f47c0edc23e9b05afec55f2bcae36a | /client/cplusplus/loginregister/LayerLogin.h | 12718b2ecc2884e87d36f3e0954e405c91a08027 | [] | no_license | East196/diabloworld | 0d2e9dbf650aa86fcc7b9fc1ef49912e79adb954 | d7a83a21287ed66aea690ecb6b73588569478be6 | refs/heads/master | 2021-05-09T12:15:31.640065 | 2018-02-04T15:16:54 | 2018-02-04T15:16:54 | 119,007,609 | 3 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,283 | h | #ifndef Client_LayerLogin_h
#define Client_LayerLogin_h
#include"cocos2d.h"
#include"cocos-ext.h"
#include "SocketClient.h"
#include "CData.h"
#include "LodingLayer.h"
#include "TeXiao.h"
USING_NS_CC;
USING_NS_CC_EXT;
using namespace std;
class LayerLogin:public CCLayer
{
public:
CREATE_FUNC(LayerLogin);
virtual bool init();
virtual void onExit();
~LayerLogin();
CCSprite * texiao;
bool hasRole;
Loading * load;
CCSprite * logo;
CCSize winSize;
char * denglu1;
void removeLoader();
void receiveLoginData();
void sendPersonalData();
void receivePersonalData();
void receiveCityData();
void jiumiaoshanyou();
void firefly();
void callNull1();
void callNull2();
void zhenping();
char * sendData;
private:
void initUI();
void loadRes();
// bool init();
void menuItemCallbackLogin(CCObject* pSender);
void menuItemCallbackStart(CCObject* pSender);
void menuItemCallbackSelector(CCObject* pSender);
//CCLabelTTF *label1;
//CCLabelTTF *label2;
CCMenuItemImage *url1,*url2;
CCSprite *pSpriteDialogLogin;
CCEditBox* editBoxUsername;
CCEditBox* editBoxPassword;
};
#endif
| [
"2901180515@qq.com"
] | 2901180515@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.