blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 905
values | visit_date timestamp[us]date 2015-08-09 11:21:18 2023-09-06 10:45:07 | revision_date timestamp[us]date 1997-09-14 05:04:47 2023-09-17 19:19:19 | committer_date timestamp[us]date 1997-09-14 05:04:47 2023-09-06 06:22:19 | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-07 00:51:45 2023-09-14 21:58:39 ⌀ | gha_created_at timestamp[us]date 2008-03-27 23:40:48 2023-08-21 23:17:38 ⌀ | gha_language stringclasses 141
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 115
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f61f3ab121386c79848694b01ceecc5f23377b5c | 7b6764e2d4805d5ca6974ee520460c6adf5c9828 | /src/simplest_scheduler.cpp | e78e4c4731ce9cb372a2c820eea1593310dd770b | [
"BSD-3-Clause"
] | permissive | icnc/icnc | 4c0580587f3b5e7bf225dcfbaef5a2c73fb52122 | 0213a13ca94a944cac7efacc21019541ce3e09ca | refs/heads/master | 2023-02-07T03:38:53.269607 | 2023-01-25T20:12:08 | 2023-01-25T20:12:08 | 20,026,405 | 116 | 28 | BSD-3-Clause | 2021-11-23T21:03:56 | 2014-05-21T15:30:18 | C++ | UTF-8 | C++ | false | false | 4,146 | cpp | /* *******************************************************************************
* Copyright (c) 2007-2021, Intel Corporation
*
* 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 Intel Corporation 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.
********************************************************************************/
/*
see simplest_scheduler.h
*/
#define _CRT_SECURE_NO_DEPRECATE
#include "simplest_scheduler.h"
#include <cnc/internal/dist/distributor.h>
#include "pinning.h"
#include <algorithm> // min/max
namespace CnC {
namespace Internal {
static std::atomic< bool > s_have_pinning_observer;
namespace {
static pinning_observer * s_po = NULL;
struct poi {
~poi() { delete s_po; }
};
static poi s_poi;
}
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
simplest_scheduler::simplest_scheduler( context_base &context, int numThreads, int htstride )
: scheduler_i( context ),
m_status(),
m_taskGroup(),
m_taskArena( std::max( 2, numThreads + ( distributor::myPid() == 0 ? 0 : 1 ) ) )
{
// {Speaker oss; oss << std::max( 2, numThreads + ( distributor::myPid() == 0 ? 0 : 1 ) );}
bool _tmp(false);
if( htstride && s_have_pinning_observer.compare_exchange_strong( _tmp, true ) ) {
s_po = new pinning_observer( htstride );
}
m_status = COMPLETED;
}
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
simplest_scheduler::~simplest_scheduler() noexcept
{
m_taskGroup.wait();
}
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void simplest_scheduler::do_schedule( schedulable * stepInstance )
{
int _tmp(COMPLETED);
m_status.compare_exchange_strong( _tmp, RUNNING );
m_taskArena.execute( [&]{ m_taskGroup.run( [=]{ stepInstance->scheduler().do_execute(stepInstance); } ); } );
}
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void simplest_scheduler::wait( const inflight_counter_type & /*steps_in_flight*/ )
{
m_taskGroup.wait();
m_status = COMPLETED;
}
} // namespace Internal
} // namespace CnC
| [
"frank.schlimbach@intel.com"
] | frank.schlimbach@intel.com |
58057d5923c2413e440cd3378e5e259d41b9a27f | 334802586c8966f62f45debea1e4faf37ffa939d | /src/transform.cpp | 6cab10cc812e1b913dfc6c391f7f8449a488acbc | [] | no_license | MarcyMosswitch/Pokemon-Fan-Game | d3e8844b8e1e7c9324c7ed54a68aa5093585b9e9 | 8bf22f6034971fc267d5675181dbc8948f9d5def | refs/heads/master | 2022-12-28T18:41:34.251486 | 2020-10-08T03:32:47 | 2020-10-08T03:32:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,307 | cpp | #include "transform.h"
#include <cmath>
#include <algorithm>
#define PI 3.14159265
#define MAGIC_ANGLE (90.0 - 30.0)
double Transform::offsetX;
double Transform::offsetY;
double Transform::offsetZ;
void Transform::transform(double in[3]) {
double rotateZ[3][3] = {{sin(45.0 * PI/180.0), -sin(45.0 * PI/180.0), 0.0},
{cos(45.0 * PI/180.0), cos(45.0 * PI/180.0), 0.0},
{0.0, 0.0, 0.0}};
//^^Rotates 3D points 45 degrees around the Z-axis.
double rotateX[3][3] = {{1.0, 0.0, 0.0},
{0.0, cos(MAGIC_ANGLE * PI/180.0), -sin(MAGIC_ANGLE * PI/180.0)},
{0.0, sin(MAGIC_ANGLE * PI/180.0), cos(MAGIC_ANGLE * PI/180.0)}};
//^^Rotates 3D points (90.0 - 35.264) degrees around the X-axis.
double operation1[3] = {0.0, 0.0, 0.0};
for(int row = 0; row < 3; row++) {
for(int column = 0; column < 3; column++) {
operation1[row] += rotateZ[row][column] * in[column];
}
}
double operation2[3] = {0.0, 0.0, 0.0};
for(int row = 0; row < 3; row++) {
for(int column = 0; column < 3; column++) {
operation2[row] += rotateX[row][column] * operation1[column];
}
}
std::copy(operation2, operation2 + 3, in);
}
void Transform::offset(double in[3]) {
in[0] += offsetX;
in[1] += offsetY;
in[2] += offsetZ;
//^^The 3D point gets offset by the offset values.
}
| [
"magicalmanjack@gmail.com"
] | magicalmanjack@gmail.com |
6cd9920917d598ecc0fb9ab5f9eafbe892e543da | ce7ad1d167614954deba8960bd1a41d04b5d3866 | /Tutorials-Foam-Extend-3.1/incompressible/circularChannel/system/fvSchemes | cf5f09ac0b66a2196f96664666af8899c53b80ea | [] | no_license | amikkonen/pisoCentralFoam | 8191614788e7148bd019ff8df20879aa371a4c26 | 0137fcede7a439ac92d0f49a40930dca1d2d19e9 | refs/heads/master | 2021-01-25T04:58:56.942179 | 2017-06-06T11:53:11 | 2017-06-06T11:53:11 | 93,497,647 | 1 | 0 | null | 2017-06-06T08:58:34 | 2017-06-06T08:58:34 | null | UTF-8 | C++ | false | false | 1,842 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(tauMC) Gauss linear;
div((-devRhoReff&U)) Gauss linear;
div((muEff*dev2(grad(U).T()))) Gauss linear;
//momentum equation
div(phiNeg,U) Gauss vanLeerV;
div(phiPos,U) Gauss vanLeerV;
//energy equation
div(phiNeg,h) Gauss vanLeer;
div(phiPos,h) Gauss vanLeer;
div(phiNeg,Ek) Gauss vanLeer;
div(phiPos,Ek) Gauss vanLeer;
//continuity equation
div(phid_neg,p) Gauss vanLeer;
div(phid_pos,p) Gauss vanLeer;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default none;
interpolate((rho*U)) linear;
reconstruct(psi) vanLeer;
reconstruct(p) vanLeer;
reconstruct(U) vanLeerV;
reconstruct(Dp) vanLeer;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default none;
p;
}
// ************************************************************************* //
| [
"matvey.kraposhin@sl-BIG.inicluster.ru"
] | matvey.kraposhin@sl-BIG.inicluster.ru | |
ab0bf027813b1b87f600bfe41dc4c8f868675eda | fef35e45b060a701cc91b59fca69feb094b82380 | /C/8/3계좌조회.cpp | ab3a7e00839b89a9af909ccbeb31a514f851d6d9 | [] | no_license | EIDOSDATA/OLD_STUDY | f03a1c8203236deb5f3766431bca03655ed7056d | a6389514eba647b59f76a4c8dc8d6814ceadb52d | refs/heads/main | 2023-06-16T08:15:17.060616 | 2021-07-17T06:25:14 | 2021-07-17T06:25:14 | 381,949,580 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,034 | cpp | #include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
#define SI 15
#define CN 20
#define EN 10
class Account
{
char accid[SI]; // 계좌번호
char name[CN]; // 고객명
long long balance; // 잔액
int inx = 0;
public:
void print_menu();
void MakingAccount();
void Deposit();
void Withdrawal();
void Account_inquiry();
void All_Account_inquiry();
void addMoney(long long money)
{
balance += money;
}
void subMoney(long long money)
{
balance -= money;
}
void setData(char *_accid, char *_name, long long money)
{
strcpy(accid, _accid);
strcpy(name, _name);
balance = money;
}
void disp()
{
cout << accid << "\t\t" << ends;
cout << name << "\t\t\t" << ends;
cout << balance << endl;
}
};
static Account p[EN];
int main()
{
int process_selectl;
int i = 0;
while (1)
{
p->print_menu();
cout << "input process number :\t" << ends;
cin >> process_selectl;
cout << "-------------------------" << endl;
switch (process_selectl)
{
case 1:
p->MakingAccount();
break;
case 2:
p->Deposit();
break;
case 3:
p->Withdrawal();
break;
case 4:
p->Account_inquiry();
break;
case 5:
p->All_Account_inquiry();
break;
case 6:
cout << "PROGRAME EXIT" << endl;
exit(0);
break;
default:
cout << "PROGRAME EXIT" << endl;
exit(0);
break;
}
}
return 0;
}
void Account::All_Account_inquiry()
{
cout << "#5 All Account inquiry" << endl;
if (inx == 0)
{
cout << "NO Account Inquiry" << endl;
return;
}
cout << "AccID\t\tUser Name\t\tBalance" << endl;
for (int i = 0; i < inx; i++)
{
p[i].disp();
}
}
void Account::Account_inquiry()
{
char inputdata[SI];
cout << "#4 Account inquiry" << endl;
if (inx == 0)
{
cout << "NO Account Inquiry" << endl;
return;
}
cout << "Input Serching Account inquiry :\t" << ends;
fflush(stdin);
cin.getline(inputdata, SI);
for (int i = 0; i < inx; i++)
{
if (strcmp(p[i].accid, inputdata) == 0)
{
cout << "Find Complete" << endl;
cout << "AccID\t\tUser Name\t\tBalance" << endl;
p[i].disp();
}
else
{
cout << "Can't find Accid" << endl;
}
}
}
void Account::Withdrawal()
{
char inputaccid[SI];
long long money = 0;
int account_f = 0, sub_f = 0; // find account
cout << "#3 Withdrawal" << endl;
if (inx == 0)
{
cout << "NO Account Inquiry" << endl;
return;
}
while (1)
{
cout << "Enter Account Number : \t" << ends;
fflush(stdin);
cin.getline(inputaccid, SI);
for (int i = 0; i < inx; i++)
{
if (strcmp(p[i].accid, inputaccid) == 0)
{
account_f = 1;
break;
}
}
if (account_f == 1)
{
break;
}
else if (account_f == 0)
{
cout << "No Matched...Retry Again" << endl;
}
}
if (account_f == 1)
{
while(1)
{
cout << "Input Withdrawal value :\t" << ends;
fflush(stdin);
cin >> money;
for (int i = 0; i < inx; i++)
{
if (strcmp(p[i].accid, inputaccid) == 0)
{
if(p[i].balance >= money)
{
p[i].subMoney(money);
sub_f = 1;
}
else
{
cout << "===========================" << endl;
cout << "Not Enough Money. Retry Again" << endl;
cout << "===========================" << endl;
}
}
break;
}
if(sub_f == 1)
{
break;
}
}
}
for (int i = 0; i < inx; i++)
{
if (strcmp(p[i].accid, inputaccid) == 0)
{
cout << "AccID\t\tUser Name\t\tBalance" << endl;
p[i].disp();
}
}
}
void Account::Deposit()
{
char inputaccid[SI];
long long money = 0;
int account_f = 0; // find account
cout << "#2 Deposit" << endl;
if (inx == 0)
{
cout << "NO Account Inquiry" << endl;
return;
}
while (1)
{
cout << "Enter Account Number : \t" << ends;
fflush(stdin);
cin.getline(inputaccid, SI);
for (int i = 0; i < inx; i++)
{
if (strcmp(p[i].accid, inputaccid) == 0)
{
account_f = 1;
break;
}
}
if (account_f == 1)
{
break;
}
else if (account_f == 0)
{
cout << "No Matched...Retry Again" << endl;
}
}
if (account_f == 1)
{
cout << "Input Deposit value :\t" << ends;
fflush(stdin);
cin >> money;
for (int i = 0; i < inx; i++)
{
if (strcmp(p[i].accid, inputaccid) == 0)
{
p[i].addMoney(money);
}
}
}
for (int i = 0; i < inx; i++)
{
if (strcmp(p[i].accid, inputaccid) == 0)
{
cout << "AccID\t\tUser Name\t\tBalance" << endl;
p[i].disp();
}
}
}
void Account::MakingAccount()
{
char inputdata[SI];
int flag = 0;
cout << "#1 Making an Bank Account" << endl;
do
{
flag = 0;
cout << "Enter Account Number : \t" << ends;
fflush(stdin);
cin.getline(inputdata, SI);
for (int i = 0; i <= inx; i++)
{
if (strcmp(p[i].accid, inputdata) == 0)
{
cout << "ERROR!! There is a duplicate ID." << endl;
flag = 1;
break;
}
}
} while (flag);
strcpy(p[inx].accid, inputdata);
cout << "Enter User Name : \t" << ends;
fflush(stdin);
cin.getline(p[inx].name, CN);
cout << "Offerings Amount :\t" << ends;
fflush(stdin);
cin >> p[inx].balance;
inx++;
}
void Account::print_menu()
{
cout << "----------MENU----------" << endl;
cout << "1. Making an Bank Account" << endl;
cout << "2. Deposit" << endl;
cout << "3. Withdrawal" << endl;
cout << "4. Account inquiry" << endl;
cout << "5. All Account inquiry" << endl;
cout << "6. End of work" << endl;
} | [
"ihjisan00@gmail.com"
] | ihjisan00@gmail.com |
8fa7cc5164f80b98ccc455b440a31f2c0070d16f | 4a08a54ce2fa877f17a7c8b060c28b4b71d9325b | /sources/inc/CountDaLoot.hpp | ec0fcacc8a52e63e8057e3f49ec4fb60ab5d5ce5 | [
"MIT"
] | permissive | stryku/CountDaLoot | 263c09bcaa51a551da8a17cd45e97bed03f14bcc | 805e3cd094201bc5694ed111e66a1f6d0021a756 | refs/heads/master | 2021-01-21T14:43:34.662468 | 2017-07-26T18:43:09 | 2017-07-26T18:43:09 | 95,328,026 | 0 | 0 | null | 2017-07-26T18:43:10 | 2017-06-24T23:30:38 | null | UTF-8 | C++ | false | false | 1,211 | hpp | #pragma once
#include "view/LootListUpdater.hpp"
#include "view/LootTabStateLabelUpdater.hpp"
#include "loot/NewLootProvider.hpp"
#include "ui/controls/Table.hpp"
#include "loot/KilledMonstersData.hpp"
#include "view/summary/SummaryUpdater.hpp"
#include "log/LoggerFactory.hpp"
#include "mainwindow.h"
#include <QApplication>
#include <QDebug>
namespace cdl
{
class CountDaLoot
{
public:
explicit CountDaLoot(int argc, char* argv[]);
int execute();
private:
std::function<void(const std::string&)> getAddInterestingItemCallback();
std::function<void(view::LootListViewType)> getLootListViewTypeChangedCallback();
QApplication mApplication;
MainWindow mWindow;
log::LoggerFactory mLoggerFactory;
view::LootListUpdater mLootListUpdater;
view::LootTabStateLabelUpdater mLootTabStateLabelUpdater;
loot::KilledMonsterData mKilledMonsterData;
loot::NewLootProvider mNewLootProvider;
ui::controls::Table<1> mInterestingItemsTable;
ui::controls::Table<2> mSummaryMonstersTable;
ui::controls::Table<2> mSummaryItemsTable;
view::summary::SummaryUpdater mSummaryUpdater;
};
}
| [
"stryku2393@gmail.com"
] | stryku2393@gmail.com |
daeb5e0019d296956b04787c28ac8d330a56cd3b | e84a10d08e93db20b06d97dcb7a2c35a8ee8359c | /Foundation/Public/EnumClass.h | 7738fc9c73e16ef691a0990ffbcc7b8f1bcb1d47 | [
"Unlicense"
] | permissive | randyfan/NOME3 | 44b142f87105dcaeaa25fa03b79e9ab73de6115d | 26c47cc6d45214e619d89dcc29787528f4db4aeb | refs/heads/master | 2023-07-29T00:24:01.433701 | 2021-09-19T16:45:14 | 2021-09-19T16:45:14 | 293,137,094 | 4 | 6 | null | 2021-03-10T21:26:27 | 2020-09-05T18:58:36 | C++ | UTF-8 | C++ | false | false | 1,928 | h | #pragma once
#include <type_traits>
#define DEFINE_ENUM_CLASS_BITWISE_OPERATORS(Enum)\
inline Enum& operator|=(Enum& lhs, Enum rhs) { return lhs = (Enum)((std::underlying_type_t<Enum>)lhs | (std::underlying_type_t<Enum>)rhs); }\
inline Enum& operator&=(Enum& lhs, Enum rhs) { return lhs = (Enum)((std::underlying_type_t<Enum>)lhs & (std::underlying_type_t<Enum>)rhs); }\
inline Enum& operator^=(Enum& lhs, Enum rhs) { return lhs = (Enum)((std::underlying_type_t<Enum>)lhs ^ (std::underlying_type_t<Enum>)rhs); }\
inline constexpr Enum operator|(Enum lhs, Enum rhs) { return (Enum)((std::underlying_type_t<Enum>)lhs | (std::underlying_type_t<Enum>)rhs); }\
inline constexpr Enum operator&(Enum lhs, Enum rhs) { return (Enum)((std::underlying_type_t<Enum>)lhs & (std::underlying_type_t<Enum>)rhs); }\
inline constexpr Enum operator^(Enum lhs, Enum rhs) { return (Enum)((std::underlying_type_t<Enum>)lhs ^ (std::underlying_type_t<Enum>)rhs); }\
inline constexpr bool operator!(Enum e) { return !(std::underlying_type_t<Enum>)e; }\
inline constexpr Enum operator~(Enum e) { return (Enum)~(std::underlying_type_t<Enum>)e; }
#define TO_UNDERLYING(T, x) static_cast<typename std::underlying_type<T>::type>(x)
// https://stackoverflow.com/questions/15586163/c11-type-trait-to-differentiate-between-enum-class-and-regular-enum
template <typename E>
using is_scoped_enum = std::integral_constant<
bool,
std::is_enum<E>::value && !std::is_convertible<E, int>::value>;
template<typename E>
inline constexpr bool is_scoped_enum_v = is_scoped_enum<E>::value;
template <typename enum_t>
inline std::enable_if_t<is_scoped_enum_v<enum_t>, bool> Any(enum_t flags)
{
return TO_UNDERLYING(enum_t, flags) != 0;
}
template <typename enum_t>
inline std::enable_if_t<is_scoped_enum_v<enum_t>, bool> Any(enum_t flags, enum_t compare)
{
return (TO_UNDERLYING(enum_t, flags) & TO_UNDERLYING(enum_t, compare)) != 0;
}
#undef TO_UNDERLYING
| [
"randyfan@berkeley.edu"
] | randyfan@berkeley.edu |
d547b9d67129d741da75c351b9ef263602b17ae8 | 337f830cdc233ad239a5cc2f52c6562fbb671ea8 | /case5cells/9.9/gradTy | 80b2f0cddb2f186a2a06ea3159c9c92ecd01c2aa | [] | no_license | j-avdeev/laplacianFoamF | dba31d0941c061b2435532cdfbd5a5b337e6ffe9 | 6e1504dc84780dc86076145c18862f1882078da5 | refs/heads/master | 2021-06-25T23:52:36.435909 | 2017-02-05T17:28:45 | 2017-02-05T17:28:45 | 26,997,393 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,640 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "9.9";
object gradTy;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 -1 0 1 0 0 0];
internalField nonuniform List<scalar>
64
(
-5.03143
-5.03143
5.03143
5.03143
-5.03143
-5.03143
5.03143
5.03143
-0.0314326
-5.03143
-0.0314326
-5.03143
-0.0314326
-5.03143
-0.0314326
-0.0314326
-5.03143
-0.0314326
-5.03143
-0.0314326
-5.03143
-0.0314326
0.0314326
0.0314326
5.03143
5.03143
5.03143
0.0314326
0.0314326
0.0314326
0.0314326
5.03143
5.03143
5.03143
0.0314326
0.0314326
-0.0314326
-5.03143
-5.03143
-0.0314326
-0.0314326
-5.03143
-0.0314326
-0.0314326
-5.03143
-5.03143
-0.0314326
-0.0314326
-5.03143
-0.0314326
0.0314326
5.03143
0.0314326
5.03143
5.03143
0.0314326
0.0314326
0.0314326
5.03143
0.0314326
5.03143
5.03143
0.0314326
0.0314326
)
;
boundaryField
{
walls
{
type calculated;
value nonuniform List<scalar>
64
(
10
-5.03143
-5.03143
-10
10
10
10
-5.03143
5.03143
5.03143
5.03143
5.03143
-5.03143
-10
-10
-10
10
10
10
-5.03143
-0.0314326
-0.0314326
-0.0314326
-0.0314326
-5.03143
-10
-10
-10
10
10
10
10
10
10
10
10
10
-0.0314326
-0.0314326
-5.03143
5.03143
0.0314326
0.0314326
0.0314326
0.0314326
5.03143
5.03143
0.0314326
0.0314326
0.0314326
0.0314326
5.03143
-5.03143
-0.0314326
-0.0314326
-10
-10
-10
-10
-10
-10
-10
-10
-10
)
;
}
inlet
{
type calculated;
value nonuniform List<scalar>
16
(
-5.03143
5.03143
5.03143
-5.03143
-0.0314326
-0.0314326
-5.03143
5.03143
0.0314326
0.0314326
0.0314326
0.0314326
5.03143
-5.03143
-0.0314326
-0.0314326
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
16
(
-5.03143
-5.03143
5.03143
5.03143
-5.03143
-0.0314326
-0.0314326
-0.0314326
-0.0314326
-5.03143
5.03143
0.0314326
0.0314326
0.0314326
0.0314326
5.03143
)
;
}
}
// ************************************************************************* //
| [
"j-avdeev@ya.ru"
] | j-avdeev@ya.ru | |
57b10468d6419dd49ab4ef2c436b0a275c2cb103 | 97eb00d7b35076b1efce57b21ad51636ac2a920c | /ABC/157/C.cpp | 9592111119da9cacd0b78c1fa693458af2e4d4df | [] | no_license | jimjin73/compro | 43199716dc857f52c10d3237908e70c1801e7fb4 | b194b4414752fff3debc838f4ee70af8e2e43f34 | refs/heads/master | 2021-05-18T01:02:39.338377 | 2020-08-06T12:25:20 | 2020-08-06T12:25:20 | 251,037,702 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 648 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N,M;
int d[5];
int main(){
cin >> N >> M;
for(int i=0;i<N;i++) d[i] = -1;
for(int i=0;i<M;i++){
int a,b;
cin >> a >> b;
if(d[a-1] != -1 && d[a-1] != b){
cout << -1 << endl;
return 0;
}
d[a-1] = b;
}
if(d[0] == 0 && N > 1){
cout << -1 << endl;
return 0;
}
for(int i=0;i<N;i++){
if(d[i] == -1){
if(i == N-1 || i != 0) cout << 0;
else cout << 1;
}else{
cout << d[i];
}
}
cout << endl;
return 0;
} | [
"j.kam.j.kan.w.jmj@gmail.com"
] | j.kam.j.kan.w.jmj@gmail.com |
2e1edc30f725caf6994d3fcbf615ec8461992068 | 92604577dc46debdc467cb3f4f7d07aed69c02f7 | /amarillion_Laundry Day at Bananas Manor/tins12/include/main.h | 33feb4d1cf63f207c14c75d8dbf8c243912d91cd | [] | no_license | amarillion/TINS-is-not-speedhack-2012 | 73da3d6253ec5804f9afde36a1bd394163dca49c | ae3e9c5617477777d8049ba6d7b2c011cfaa592e | refs/heads/master | 2016-08-03T19:25:19.126941 | 2012-09-29T08:40:29 | 2012-09-29T08:40:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 587 | h | #ifndef MAIN_H
#define MAIN_H
#include <allegro.h>
#include "resources.h"
#include "engine.h"
#include "settings.h"
#include "mainloop.h"
class Main : public MainLoop
{
private:
Engine engine;
Settings settings;
Resources resources;
public:
Settings *getSettings() { return &settings; }
Resources *getResources() { return &resources; }
virtual int postInit();
virtual int update();
virtual void draw (const GraphicsContext &gc);
virtual void parseOpts(std::vector<std::string> &opts) {}
virtual void handleMessage(int code) {}
void stop();
Main ();
~Main();
};
#endif
| [
"mvaniersel@gmail.com"
] | mvaniersel@gmail.com |
8284a1b7a342866270010be059ad9a5cac4dc1a8 | 2acafbd539b4e5060951ce6af04eb723a7022a24 | /GCore/GC_ClockManager.cpp | 48de689a5395391283e92d62bbe3c4754bb54f9e | [] | no_license | Klaim/gamecore | 163eb76f16e92b3e109e689833f23b0debeffd55 | 167f9d1c59ae15e12f42cc1e4c2b7784b9db0742 | refs/heads/master | 2021-01-01T16:34:52.468541 | 2015-03-14T09:50:05 | 2015-03-14T09:50:05 | 32,204,874 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,301 | cpp | #include "GC_ClockManager.h"
#include <algorithm>
#include "GC_Clock.h"
namespace gcore
{
/** Constructor.
@param timeReference Provide time used as reference to update all Clocks.
*/
ClockManager::ClockManager(const TimeReferenceProvider& timeReference, size_t reserveClockCount )
: m_timeReference(timeReference)
, m_deltaTime( 0 )
, m_lastUpdateTime( timeReference.getTimeSinceStart() )
, m_max_deltaTime( 0 )
{
}
/** Destructor.
*/
ClockManager::~ClockManager()
{
if(!m_clockList.empty())
destroyAllClocks();
}
/** Create a Clock object.
The name of the Clock must be unique for this ClockManager,
if not an exception will occurs.
@param name Name given to the Clock object.
@return A pointer to the new Clock object.
*/
Clock* ClockManager::createClock(const String& name)
{
if( m_clockIndex.find(name)!=m_clockIndex.end())
{
//Name already registered
GC_EXCEPTION << "Tried to create a Clock with a name already registered!";
}
//create the clock
Clock* clock = new Clock(name, (*this) );
//register it's name if necessary
if(name != "")
m_clockIndex[name] = clock;
//register the clock for future updates
m_clockList.push_back(clock);
return clock;
}
/** Destroy a Clock created by this ClockManager.
If the Clock object was not created by this ClockManager,
an exception occurs.
@param clock Pointer to the Clock to destroy.
*/
void ClockManager::destroyClock(Clock* clock)
{
GC_ASSERT( clock != nullptr, "Tried to destroy a null clock!" );
GC_ASSERT( std::count( m_clockList.begin(), m_clockList.end(), clock ) == 1 , String( "Tried to destroy a clock that was not created by this manager! Clock name : ") + clock->name() );
for(ClockList::iterator it= m_clockList.begin(); it != m_clockList.end(); ++it)
{
Clock* registeredClock = (*it);
GC_ASSERT_NOT_NULL( registeredClock );
if( registeredClock == clock )
{
//Found!
//unregister
m_clockList.erase(it);
m_clockIndex.erase( clock->name() );
//destroy
delete clock;
return;
}
}
GC_ASSERT( false, "Clock not found! - Previous checks failed!" );
}
/** Destroy all Clocks created by this ClockManager.
This will make all pointers to those Clock objects invalid!
*/
void ClockManager::destroyAllClocks()
{
//delete all clocks
for(ClockList::iterator it = m_clockList.begin(); it != m_clockList.end(); ++it)
{
Clock* clock = *it;
GC_ASSERT( clock != nullptr, "Found a null clock in the clock list!" );
delete clock;
}
//unregister all clocks
m_clockList.clear();
m_clockIndex.clear();
}
/** Get a Clock by it's name.
@param name Clock's name (given at it's creation).
@return A pointer to the Clock or nullptr if not found.
*/
Clock* ClockManager::getClock(const String& name)
{
Clock* result = nullptr;
ClockIndex::iterator it = m_clockIndex.find(name);
if( it != m_clockIndex.end() )
result = it->second;
return result;
}
/** Update all Clock time.
@remark This should be called as frequently as possible,
each main loop cycle at best.
*/
void ClockManager::updateClocks()
{
//get the new delta
TimeValue timeValue = m_timeReference.getTimeSinceStart();
GC_ASSERT( timeValue >= 0, "Time since start cannot be negative!" );
m_deltaTime = timeValue - m_lastUpdateTime ;
GC_ASSERT( m_deltaTime >= 0, "Delta time cannot be negative!" );
if( m_max_deltaTime > 0 )
{
m_deltaTime = std::min< TimeValue >( m_deltaTime, m_max_deltaTime ); // take the lowest delta time
}
//update clocks
for (ClockList::iterator it = m_clockList.begin(); it != m_clockList.end(); ++it )
{
Clock* clock = (*it);
GC_ASSERT_NOT_NULL( clock );
clock->update(m_deltaTime);
}
//save the last update time
m_lastUpdateTime = timeValue;
}
void ClockManager::reset()
{
for (ClockList::iterator it = m_clockList.begin(); it != m_clockList.end(); ++it )
{
Clock* clock = (*it);
GC_ASSERT_NOT_NULL( clock );
clock->reset();
}
m_lastUpdateTime = m_timeReference.getTimeSinceStart();
m_deltaTime = 0;
}
} | [
"mjklaim@gmail.com"
] | mjklaim@gmail.com |
2c2bbc9be836453ffa4b20fba079c8a163eea38c | 38c10c01007624cd2056884f25e0d6ab85442194 | /media/filters/video_renderer_algorithm.h | 71d251f416a667e9515afb779d776bdbbffba12d | [
"BSD-3-Clause"
] | permissive | zenoalbisser/chromium | 6ecf37b6c030c84f1b26282bc4ef95769c62a9b2 | e71f21b9b4b9b839f5093301974a45545dad2691 | refs/heads/master | 2022-12-25T14:23:18.568575 | 2016-07-14T21:49:52 | 2016-07-23T08:02:51 | 63,980,627 | 0 | 2 | BSD-3-Clause | 2022-12-12T12:43:41 | 2016-07-22T20:14:04 | null | UTF-8 | C++ | false | false | 15,086 | h | // 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.
#ifndef MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_
#define MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_
#include <deque>
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "media/base/media_export.h"
#include "media/base/moving_average.h"
#include "media/base/video_frame.h"
#include "media/base/video_renderer.h"
#include "media/filters/video_cadence_estimator.h"
namespace media {
// VideoRendererAlgorithm manages a queue of VideoFrames from which it chooses
// frames with the goal of providing a smooth playback experience. I.e., the
// selection process results in the best possible uniformity for displayed frame
// durations over time.
//
// Clients will provide frames to VRA via EnqueueFrame() and then VRA will yield
// one of those frames in response to a future Render() call. Each Render()
// call takes a render interval which is used to compute the best frame for
// display during that interval.
//
// Render() calls are expected to happen on a regular basis. Failure to do so
// will result in suboptimal rendering experiences. If a client knows that
// Render() callbacks are stalled for any reason, it should tell VRA to expire
// frames which are unusable via RemoveExpiredFrames(); this prevents useless
// accumulation of stale VideoFrame objects (which are frequently quite large).
//
// The primary means of smooth frame selection is via forced integer cadence,
// see VideoCadenceEstimator for details on this process. In cases of non-
// integer cadence, the algorithm will fall back to choosing the frame which
// covers the most of the current render interval. If no frame covers the
// current interval, the least bad frame will be chosen based on its drift from
// the start of the interval.
//
// Combined these three approaches enforce optimal smoothness in many cases.
class MEDIA_EXPORT VideoRendererAlgorithm {
public:
explicit VideoRendererAlgorithm(
const TimeSource::WallClockTimeCB& wall_clock_time_cb);
~VideoRendererAlgorithm();
// Chooses the best frame for the interval [deadline_min, deadline_max] based
// on available and previously rendered frames.
//
// Under ideal circumstances the deadline interval provided to a Render() call
// should be directly adjacent to the deadline given to the previous Render()
// call with no overlap or gaps. In practice, |deadline_max| is an estimated
// value, which means the next |deadline_min| may overlap it slightly or have
// a slight gap. Gaps which exceed the length of the deadline interval are
// assumed to be repeated frames for the purposes of cadence detection.
//
// If provided, |frames_dropped| will be set to the number of frames which
// were removed from |frame_queue_|, during this call, which were never
// returned during a previous Render() call and are no longer suitable for
// rendering since their wall clock time is too far in the past.
scoped_refptr<VideoFrame> Render(base::TimeTicks deadline_min,
base::TimeTicks deadline_max,
size_t* frames_dropped);
// Removes all video frames which are unusable since their ideal render
// interval [timestamp, timestamp + duration] is too far away from
// |deadline_min| than is allowed by drift constraints.
//
// At least one frame will always remain after this call so that subsequent
// Render() calls have a frame to return if no new frames are enqueued before
// then. Returns the number of frames removed.
//
// Note: In cases where there is no known frame duration (i.e. perhaps a video
// with only a single frame), the last frame can not be expired, regardless of
// the given deadline. Clients must handle this case externally.
size_t RemoveExpiredFrames(base::TimeTicks deadline);
// Clients should call this if the last frame provided by Render() was never
// rendered; it ensures the presented cadence matches internal models. This
// must be called before the next Render() call.
void OnLastFrameDropped();
// Adds a frame to |frame_queue_| for consideration by Render(). Out of order
// timestamps will be sorted into appropriate order. Do not enqueue end of
// stream frames. Frames inserted prior to the last rendered frame will not
// be used. They will be discarded on the next call to Render(), counting as
// dropped frames, or by RemoveExpiredFrames(), counting as expired frames.
//
// Attempting to enqueue a frame with the same timestamp as a previous frame
// will result in the previous frame being replaced if it has not been
// rendered yet. If it has been rendered, the new frame will be dropped.
void EnqueueFrame(const scoped_refptr<VideoFrame>& frame);
// Removes all frames from the |frame_queue_| and clears predictors. The
// algorithm will be as if freshly constructed after this call.
void Reset();
// Returns the number of frames currently buffered which could be rendered
// assuming current Render() interval trends. Before Render() is called, this
// will be the same as the number of frames given to EnqueueFrame(). After
// Render() has been called, one of two things will be returned:
//
// If a cadence has been identified, this will return the number of frames
// which have a non-zero ideal render count.
//
// If cadence has not been identified, this will return the number of frames
// which have a frame end time greater than the end of the last render
// interval passed to Render(). Note: If Render() callbacks become suspended
// and the duration is unknown the last frame may never be stop counting as
// effective. Clients must handle this case externally.
//
// In either case, frames enqueued before the last displayed frame will not
// be counted as effective.
size_t EffectiveFramesQueued() const;
// Tells the algorithm that Render() callbacks have been suspended for a known
// reason and such stoppage shouldn't be counted against future frames.
void set_time_stopped() { was_time_moving_ = false; }
size_t frames_queued() const { return frame_queue_.size(); }
// Returns the average of the duration of all frames in |frame_queue_|
// as measured in wall clock (not media) time.
base::TimeDelta average_frame_duration() const {
return average_frame_duration_;
}
// Method used for testing which disables frame dropping, in this mode the
// algorithm will never drop frames and instead always return every frame
// for display at least once.
void disable_frame_dropping() { frame_dropping_disabled_ = true; }
private:
friend class VideoRendererAlgorithmTest;
// The determination of whether to clamp to a given cadence is based on the
// number of seconds before a frame would have to be dropped or repeated to
// compensate for reaching the maximum acceptable drift.
//
// We've chosen 8 seconds based on practical observations and the fact that it
// allows 29.9fps and 59.94fps in 60Hz and vice versa.
//
// Most users will not be able to see a single frame repeated or dropped every
// 8 seconds and certainly should notice it less than the randomly variable
// frame durations.
static const int kMinimumAcceptableTimeBetweenGlitchesSecs = 8;
// Metadata container for enqueued frames. See |frame_queue_| below.
struct ReadyFrame {
ReadyFrame(const scoped_refptr<VideoFrame>& frame);
~ReadyFrame();
// For use with std::lower_bound.
bool operator<(const ReadyFrame& other) const;
scoped_refptr<VideoFrame> frame;
// |start_time| is only available after UpdateFrameStatistics() has been
// called and |end_time| only after we have more than one frame.
base::TimeTicks start_time;
base::TimeTicks end_time;
// True if this frame's end time is based on the average frame duration and
// not the time of the next frame.
bool has_estimated_end_time;
int ideal_render_count;
int render_count;
int drop_count;
};
// Updates the render count for the last rendered frame based on the number
// of missing intervals between Render() calls.
void AccountForMissedIntervals(base::TimeTicks deadline_min,
base::TimeTicks deadline_max);
// Updates the render count and wall clock timestamps for all frames in
// |frame_queue_|. Updates |was_time_stopped_|, |cadence_estimator_| and
// |frame_duration_calculator_|.
//
// Note: Wall clock time is recomputed each Render() call because it's
// expected that the TimeSource powering TimeSource::WallClockTimeCB will skew
// slightly based on the audio clock.
//
// TODO(dalecurtis): Investigate how accurate we need the wall clock times to
// be, so we can avoid recomputing every time (we would need to recompute when
// playback rate changes occur though).
void UpdateFrameStatistics();
// Updates the ideal render count for all frames in |frame_queue_| based on
// the cadence returned by |cadence_estimator_|. Cadence is assigned based
// on |frame_counter_|.
void UpdateCadenceForFrames();
// If |cadence_estimator_| has detected a valid cadence, attempts to find the
// next frame which should be rendered. Returns -1 if not enough frames are
// available for cadence selection or there is no cadence.
//
// Returns the number of times a prior frame was over displayed and ate into
// the returned frames ideal render count via |remaining_overage|.
//
// For example, if we have 2 frames and each has an ideal display count of 3,
// but the first was displayed 4 times, the best frame is the second one, but
// it should only be displayed twice instead of thrice, so it's overage is 1.
int FindBestFrameByCadence(int* remaining_overage) const;
// Iterates over |frame_queue_| and finds the frame which covers the most of
// the deadline interval. If multiple frames have coverage of the interval,
// |second_best| will be set to the index of the frame with the next highest
// coverage. Returns -1 if no frame has any coverage of the current interval.
//
// Prefers the earliest frame if multiple frames have similar coverage (within
// a few percent of each other).
int FindBestFrameByCoverage(base::TimeTicks deadline_min,
base::TimeTicks deadline_max,
int* second_best) const;
// Iterates over |frame_queue_| and find the frame which drifts the least from
// |deadline_min|. There's always a best frame by drift, so the return value
// is always a valid frame index. |selected_frame_drift| will be set to the
// drift of the chosen frame.
//
// Note: Drift calculations assume contiguous frames in the time domain, so
// it's not possible to have a case where a frame is -10ms from |deadline_min|
// and another frame which is at some time after |deadline_min|. The second
// frame would be considered to start at -10ms before |deadline_min| and would
// overlap |deadline_min|, so its drift would be zero.
int FindBestFrameByDrift(base::TimeTicks deadline_min,
base::TimeDelta* selected_frame_drift) const;
// Calculates the drift from |deadline_min| for the given |frame_index|. If
// the [start_time, end_time] lies before |deadline_min| the drift is
// the delta between |deadline_min| and |end_time|. If the frame
// overlaps |deadline_min| the drift is zero. If the frame lies after
// |deadline_min| the drift is the delta between |deadline_min| and
// |start_time|.
base::TimeDelta CalculateAbsoluteDriftForFrame(base::TimeTicks deadline_min,
int frame_index) const;
// Queue of incoming frames waiting for rendering.
using VideoFrameQueue = std::deque<ReadyFrame>;
VideoFrameQueue frame_queue_;
// The index of the last frame rendered; presumed to be the first frame if no
// frame has been rendered yet. Updated by Render() and EnqueueFrame() if any
// frames are added or removed.
//
// In most cases this value is zero, but when out of order timestamps are
// present, the last rendered frame may be moved.
size_t last_frame_index_;
// Handles cadence detection and frame cadence assignments.
VideoCadenceEstimator cadence_estimator_;
// Indicates if any calls to Render() have successfully yielded a frame yet.
bool have_rendered_frames_;
// Callback used to convert media timestamps into wall clock timestamps.
const TimeSource::WallClockTimeCB wall_clock_time_cb_;
// The last |deadline_max| provided to Render(), used to predict whether
// frames were rendered over cadence between Render() calls.
base::TimeTicks last_deadline_max_;
// The average of the duration of all frames in |frame_queue_| as measured in
// wall clock (not media) time at the time of the last Render().
MovingAverage frame_duration_calculator_;
base::TimeDelta average_frame_duration_;
// The length of the last deadline interval given to Render(), updated at the
// start of Render().
base::TimeDelta render_interval_;
// The maximum acceptable drift before a frame can no longer be considered for
// rendering within a given interval.
base::TimeDelta max_acceptable_drift_;
// Indicates that the last call to Render() experienced a rendering glitch; it
// may have: under-rendered a frame, over-rendered a frame, dropped one or
// more frames, or chosen a frame which exceeded acceptable drift.
bool last_render_had_glitch_;
// For testing functionality which enables clockless playback of all frames,
// does not prevent frame dropping due to equivalent timestamps.
bool frame_dropping_disabled_;
// Tracks frames dropped during enqueue when identical timestamps are added
// to the queue. Callers are told about these frames during Render().
size_t frames_dropped_during_enqueue_;
// When cadence is present, we don't want to start counting against cadence
// until the first frame has reached its presentation time.
bool first_frame_;
// The frame number of the last rendered frame; incremented for every frame
// rendered and every frame dropped or expired since the last rendered frame.
//
// Given to |cadence_estimator_| when assigning cadence values to the
// ReadyFrameQueue. Cleared when a new cadence is detected.
uint64_t cadence_frame_counter_;
// Tracks whether the last call to Render() choose to ignore the frame chosen
// by cadence in favor of one by drift or coverage.
bool last_render_ignored_cadence_frame_;
// Indicates if time was moving, set to the return value from
// UpdateFrameStatistics() during Render() or externally by
// set_time_stopped().
bool was_time_moving_;
DISALLOW_COPY_AND_ASSIGN(VideoRendererAlgorithm);
};
} // namespace media
#endif // MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_
| [
"zeno.albisser@hemispherian.com"
] | zeno.albisser@hemispherian.com |
8ebe65a92b47e2e28df7b97e5cfc752ff164ff5d | 52482fb96fe7f3eed874db7a88c889ecd5bc34c5 | /src/Details/FDTransfer.cpp | 5a7fa11012df8b74681688e62046d2109a047138 | [] | no_license | rusingineer/EmulePlus | f3e29ca7ca853feea920c4cb5ffb0d0a13ed236e | 21955cd94d28cebdb3cf9c289f0aafa7a5cf3744 | refs/heads/master | 2021-01-17T11:54:26.925858 | 2016-06-20T12:22:32 | 2016-06-20T12:22:32 | 61,430,884 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 5,561 | cpp | // This file is part of eMule Plus
//
// 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "stdafx.h"
#include "..\resource.h"
#include "FDTransfer.h"
#include "..\PartFile.h"
#include "..\emule.h"
#include "..\otherfunctions.h"
IMPLEMENT_DYNCREATE(CFDTransfer, CPropertyPage)
CFDTransfer::CFDTransfer() : CPropertyPage(CFDTransfer::IDD)
{
m_pFile = NULL;
}
CFDTransfer::~CFDTransfer()
{
}
BEGIN_MESSAGE_MAP(CFDTransfer, CPropertyPage)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFDTransfer message handlers
/////////////////////////////////////////////////////////////////////////////
void CFDTransfer::Update()
{
EMULE_TRY
if ((m_pFile == NULL) || !::IsWindow(GetSafeHwnd()))
return;
CString strBuffer;
strBuffer.Format(_T("%u"), m_pFile->GetSourceCount());
SetDlgItemText(IDC_FOUNDSRC_VAL, strBuffer);
strBuffer.Format(_T("%u"), m_pFile->GetCompleteSourcesCount());
SetDlgItemText(IDC_COMPLETESRC_VAL, strBuffer);
strBuffer.Format(_T("%u"), m_pFile->GetTransferringSrcCount());
SetDlgItemText(IDC_TRANSFERRINGSRC_VAL, strBuffer);
strBuffer.Format(_T("%u (%u)"), m_pFile->GetPartCount(), m_pFile->GetHashCount());
SetDlgItemText(IDC_PARTCNT_VAL, strBuffer);
double dblPartsPercent = 0.0;
if (m_pFile->GetPartCount() != 0)
dblPartsPercent = static_cast<double>(m_pFile->GetAvailablePartCount() * 100) / static_cast<double>(m_pFile->GetPartCount());
strBuffer.Format(_T("%u (%.1f%%)"), m_pFile->GetAvailablePartCount(), dblPartsPercent);
SetDlgItemText(IDC_AVAILABLEPARTS_VAL, strBuffer);
if (m_pFile->lastseencomplete == NULL)
GetResString(&strBuffer, IDS_NEVER);
else
strBuffer = m_pFile->LocalizeLastSeenComplete();
SetDlgItemText(IDC_LASTSEENCOMPLETE_VAL, strBuffer);
SetDlgItemText(IDC_TRANSFERRED_VAL, strBuffer = CastItoXBytes(m_pFile->GetTransferred()));
SetDlgItemText(IDC_COMPLETEDSIZE_VAL, strBuffer = CastItoXBytes(m_pFile->GetCompletedSize()));
strBuffer.Format(_T("%.2f %%"), m_pFile->GetPercentCompleted2());
SetDlgItemText(IDC_COMPPERC_VAL, strBuffer);
strBuffer.Format(_T("%.2f %s"), static_cast<double>(m_pFile->GetDataRate())/1024.0, GetResString(IDS_KBYTESEC));
SetDlgItemText(IDC_DATARATE_VAL, strBuffer);
if (m_pFile->GetTransferred() == 0)
GetResString(&strBuffer, IDS_NEVER);
else
strBuffer = m_pFile->LocalizeLastDownTransfer();
SetDlgItemText(IDC_LASTRECEPTION_VAL, strBuffer);
SetDlgItemText(IDC_CORRUPTIONLOSS_VAL, strBuffer = CastItoXBytes(m_pFile->GetLostDueToCorruption()));
SetDlgItemText(IDC_COMPRESSIONGAIN_VAL, strBuffer = CastItoXBytes(m_pFile->GetGainDueToCompression()));
EnumPartFileStatuses eFileStatus = m_pFile->GetStatus();
uint64 qwFileSz = ((eFileStatus == PS_COMPLETING) || (eFileStatus == PS_COMPLETE)) ? m_pFile->GetFileSize() : m_pFile->GetCompletedSize();
strBuffer.Format(_T("%.2f %%"), (qwFileSz != 0) ? (100 * static_cast<double>(m_pFile->GetLostDueToCorruption()) / static_cast<double>(qwFileSz)) : 0);
SetDlgItemText(IDC_CORRUPTIONLOSS_PERC, strBuffer);
strBuffer.Format(_T("%.2f %%"), (qwFileSz != 0) ? (100 * static_cast<double>(m_pFile->GetGainDueToCompression()) / static_cast<double>(qwFileSz)) : 0);
SetDlgItemText(IDC_COMPRESSIONGAIN_PERC, strBuffer);
strBuffer.Format(_T("%u"), m_pFile->TotalPacketsSavedDueToICH());
SetDlgItemText(IDC_ICHRECOVERED_VAL, strBuffer);
SetDlgItemText(IDC_SIZEONDISK_VAL, strBuffer = CastItoXBytes(m_pFile->GetRealFileSize()));
EMULE_CATCH
}
BOOL CFDTransfer::OnInitDialog()
{
CPropertyPage::OnInitDialog();
Localize();
Update();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CFDTransfer::Localize()
{
static const uint16 s_auResTbl[][2] =
{
{ IDC_TRANSFERRINGSRC_LBL, IDS_FD_TRANSI },
{ IDC_TRANSFERRED_LBL, IDS_SF_TRANS },
{ IDC_COMPLETEDSIZE_LBL, IDS_FD_COMPSIZE },
{ IDC_DATARATE_LBL, IDS_FD_DATARATE },
{ IDC_CORRUPTIONLOSS_LBL, IDS_FD_CORRUPTION },
{ IDC_COMPRESSIONGAIN_LBL, IDS_FD_COMPRESSION },
{ IDC_ICHRECOVERED_LBL, IDS_FD_RECOVERED }
};
static const uint16 s_auResTbl2[][2] =
{
{ IDC_FOUNDSRC_LBL, IDS_FD_SOURCES },
{ IDC_COMPLETESRC_LBL, IDS_SF_COMPLETESRC },
{ IDC_PARTCNT_LBL, IDS_FD_PARTS },
{ IDC_AVAILABLEPARTS_LBL, IDS_INFLST_FILE_PARTAVAILABLE },
{ IDC_LASTSEENCOMPLETE_LBL, IDS_LASTSEENCOMPLETE },
{ IDC_LASTRECEPTION_LBL, IDS_LASTRECEPTION },
{ IDC_SIZEONDISK_LBL, IDS_SIZE_ON_DISK }
};
EMULE_TRY
if (GetSafeHwnd())
{
CString strBuffer;
for (uint32 i = 0; i < ARRSIZE(s_auResTbl); i++)
{
GetResString(&strBuffer, static_cast<UINT>(s_auResTbl[i][1]));
SetDlgItemText(s_auResTbl[i][0], strBuffer);
}
for (uint32 i = 0; i < ARRSIZE(s_auResTbl2); i++)
{
GetResString(&strBuffer, static_cast<UINT>(s_auResTbl2[i][1]));
strBuffer += _T(":");
SetDlgItemText(s_auResTbl2[i][0], strBuffer);
}
}
EMULE_CATCH
}
| [
"makani@inbox.ru"
] | makani@inbox.ru |
04e4abe61e351eaaaca39aa5d9bc81e1642efb13 | 52415739d86f95e206936d6d7a308b4d56e1af6e | /Blink1/Screen.cpp | 56a94c2229febed09f425844db76dd1c41fd4100 | [] | no_license | AbdulovHell/Esm-RPi2- | cfeac0a44332b697244fcda983a9da2e54e9c005 | e92ab2e7ecb2ce3fbdd49865da95fb8f5adc2f47 | refs/heads/master | 2021-01-01T04:49:31.922368 | 2019-02-18T07:51:41 | 2019-02-18T07:51:41 | 97,258,142 | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 8,593 | cpp | #include "sys_headers.h"
#include <functional>
#include "Display.h"
#include "Screen.h"
#include "DisplayControl.h"
#include "Colorize.h"
void Display::Screen::UpdateScrllFlag()
{
if (Lines->size() > 4) {
bScrollable = true;
}
else {
bScrollable = false;
}
}
void Display::Screen::UpdateDisplay()
{
display->SetScreen(Lines, TopLine);
DrawScrollBar();
if (isMenu) {
display->Power(1, cursor);
display->SetCursorPos(SelectedLine - TopLine, 1);
}
}
void Display::Screen::DrawScrollBar()
{
if (!bScrollable) return;
#define ONELINE 1
#define TWOLINE 3
//высота экрана 8*4=32 , 4 строки
int doubleline = 128 / LinesCount;
int oneline = 32 - doubleline;
int parts = oneline / (LinesCount - 4);
int top = parts * TopLine;
if (TopLine == LinesCount - 4)
top = oneline;
display->SetCGRAMAddr(0x0);
for (int i = 0; i < top; i++) {
display->SendText(ONELINE);
}
for (int i = top; i < top + doubleline; i++) {
display->SendText(TWOLINE);
}
for (int i = top + doubleline; i < 32; i++) {
display->SendText(ONELINE);
}
for (int i = 0; i < 4; i++) {
display->SetCursorPos(i + 1, 20);
display->SendText((char)i);
}
}
void Display::Screen::DispatchMessage()
{
KeyEvents.erase(KeyEvents.begin());
ScreenMutex.unlock();
}
Display::Screen::Screen(Display * disp)
{
Lines = new list<DisplayString*>;
LinesCount = Lines->size();
bScrollable = false;
TopLine = 0;
display = disp;
cursor = Display::Cursor::NoCursor_SymbolFlashing;
}
Display::Screen::Screen(Display * disp, Display::Cursor curs)
{
Lines = new list<DisplayString*>;
LinesCount = Lines->size();
bScrollable = false;
TopLine = 0;
display = disp;
cursor = curs;
}
Display::DisplayString* Display::Screen::operator[](size_t c)
{
list<DisplayString*>::iterator it = Lines->begin();
std::advance(it, c);
return *it;
}
size_t Display::Screen::AddLine(DisplayString * txt)
{
Lines->push_back(txt);
LinesCount = Lines->size();
UpdateScrllFlag();
//UpdateDisplay();
return LinesCount;
}
size_t Display::Screen::AddLine(DisplayString * txt, size_t pos)
{
std::list<DisplayString*>::iterator it = Lines->begin();
std::advance(it, pos);
Lines->emplace(it, txt);
LinesCount = Lines->size();
UpdateScrllFlag();
//UpdateDisplay();
return LinesCount;
}
int Display::Screen::Count()
{
return (int)LinesCount;
}
int Display::Screen::TopLineIndex()
{
return TopLine;
}
size_t Display::Screen::RemoveLine(size_t num)
{
std::list<DisplayString*>::iterator it = Lines->begin();
std::advance(it, num);
Lines->erase(it);
LinesCount = Lines->size();
UpdateScrllFlag();
//UpdateDisplay();
return LinesCount;
}
bool Display::Screen::isScrollable()
{
return bScrollable;
}
void Display::Screen::SetActive()
{
UpdateDisplay();
bool needUpdate = false;
if (!isActive) isActive = true;
int size = 0;
while (isActive) {
this_thread::sleep_for(std::chrono::microseconds(1));
size = KeyEvents.size();
if (size > 0) {
ScreenMutex.lock();
switch (KeyEvents[0]->eCode)
{
case EventCode::UpKeyPress:
DispatchMessage();
if (UpKeyCallback != nullptr)
UpKeyCallback(display, 0);
break;
case EventCode::DownKeyPress:
DispatchMessage();
if (DownKeyCallback != nullptr)
DownKeyCallback(display, 0);
break;
case EventCode::LeftKeyPress:
DispatchMessage();
if (LeftKeyCallback != nullptr)
LeftKeyCallback(display, 0);
break;
case EventCode::RightKeyPress:
DispatchMessage();
if (RightKeyCallback != nullptr)
RightKeyCallback(display, 0);
break;
case EventCode::MidKeyPress:
//printf("%s: Mid key pressed\n", Stuff::MakeColor("DISPLAY", Stuff::Yellow).c_str());
DispatchMessage();
//printf("%s: dispatch\n", Stuff::MakeColor("DISPLAY", Stuff::Yellow).c_str());
{
std::list<DisplayString*>::iterator it1 = Lines->begin();
std::advance(it1, SelectedLine - 1);
if ((*it1)->ItemPressedCallback != nullptr) {
//printf("%s: func ptr finded, %s\n", Stuff::MakeColor("DISPLAY", Stuff::Yellow).c_str(), (*it1)->GetString());
(*it1)->ItemPressedCallback(display, 0);
}
}
break;
default:
DispatchMessage();
break;
}
needUpdate = true;
}
if (needUpdate) {
needUpdate = false;
UpdateDisplay();
}
}
}
void Display::Screen::SetActive(std::function<bool(uint32_t)> loop)
{
UpdateDisplay();
bool needUpdate = false;
if (!isActive) isActive = true;
int size = 0;
while (isActive) {
this_thread::sleep_for(std::chrono::microseconds(1));
size = KeyEvents.size();
if (size > 0) {
ScreenMutex.lock();
switch (KeyEvents[0]->eCode)
{
case EventCode::UpKeyPress:
DispatchMessage();
if (UpKeyCallback != nullptr)
UpKeyCallback(display, 0);
break;
case EventCode::DownKeyPress:
DispatchMessage();
if (DownKeyCallback != nullptr)
DownKeyCallback(display, 0);
break;
case EventCode::LeftKeyPress:
DispatchMessage();
if (LeftKeyCallback != nullptr)
LeftKeyCallback(display, 0);
break;
case EventCode::RightKeyPress:
DispatchMessage();
if (RightKeyCallback != nullptr)
RightKeyCallback(display, 0);
break;
case EventCode::MidKeyPress:
//printf("%s: Mid key pressed\n", Stuff::MakeColor("DISPLAY", Stuff::Yellow).c_str());
DispatchMessage();
//printf("%s: dispatch\n", Stuff::MakeColor("DISPLAY", Stuff::Yellow).c_str());
{
std::list<DisplayString*>::iterator it1 = Lines->begin();
std::advance(it1, SelectedLine - 1);
if ((*it1)->ItemPressedCallback != nullptr) {
//printf("%s: func ptr finded, %s\n", Stuff::MakeColor("DISPLAY", Stuff::Yellow).c_str(), (*it1)->GetString());
(*it1)->ItemPressedCallback(display, 0);
}
}
break;
default:
DispatchMessage();
break;
}
needUpdate = true;
}
needUpdate=loop(0);
if (needUpdate) {
needUpdate = false;
UpdateDisplay();
}
}
}
void Display::Screen::ProceedMessage(KeyEvent * ev)
{
switch (KeyEvents[0]->eCode)
{
case EventCode::UpKeyPress:
DispatchMessage();
if (UpKeyCallback != nullptr)
UpKeyCallback(display, 0);
break;
case EventCode::DownKeyPress:
DispatchMessage();
if (DownKeyCallback != nullptr)
DownKeyCallback(display, 0);
break;
case EventCode::LeftKeyPress:
DispatchMessage();
if (LeftKeyCallback != nullptr)
LeftKeyCallback(display, 0);
break;
case EventCode::RightKeyPress:
DispatchMessage();
if (RightKeyCallback != nullptr)
RightKeyCallback(display, 0);
break;
case EventCode::MidKeyPress:
DispatchMessage();
{
std::list<DisplayString*>::iterator it1 = Lines->begin();
std::advance(it1, SelectedLine - 1);
if ((*it1)->ItemPressedCallback != nullptr)
(*it1)->ItemPressedCallback(display, 0);
}
break;
default:
DispatchMessage();
break;
}
}
void Display::Screen::Scroll(int offset)
{
//if (TopLine + offset >= LinesCount || TopLine + offset < 0) return;
TopLine += offset;
if (TopLine + 4 > LinesCount) {
TopLine -= (TopLine + 4) - LinesCount;
}
if (TopLine < 0) TopLine = 0;
UpdateDisplay();
}
void Display::Screen::EnableMenu(int headerLen, int DefaultCursorPos)
{
if (DefaultCursorPos > 4 || DefaultCursorPos < 1) {
DefaultCursorPos = headerLen + 1;
}
isMenu = true;
HeaderLen = headerLen;
SelectedLine = DefaultCursorPos;
UpKeyCallback = [this](Display* disp, uint32_t param) { ScrollMenu(-1); };
DownKeyCallback = [this](Display* disp, uint32_t param) { ScrollMenu(1); };
}
void Display::Screen::ScrollMenu(int offset)
{
if (!isMenu) return;
int PrevSL = SelectedLine;
SelectedLine += offset;
if (SelectedLine < 1 + HeaderLen)
SelectedLine = 1 + HeaderLen;
if (SelectedLine > LinesCount)
SelectedLine = LinesCount;
int Diff = SelectedLine - PrevSL;
if (Diff < 0) {
if (SelectedLine < TopLine + 1) {
Scroll(Diff);
}
if (SelectedLine <= HeaderLen + 1) {
Scroll(-TopLine);
}
}
else if (Diff > 0) {
if (SelectedLine > TopLine + 4) {
Scroll(Diff);
}
}
else { //Diff==0
return;
}
int CrPos = SelectedLine - TopLine;
display->SetCursorPos(CrPos, 1);
}
int Display::Screen::GetSelectedIndex()
{
return SelectedLine;
}
void Display::Screen::ReturnToPrevMenu(Display * disp, uint32_t param)
{
isActive = false;
}
//отсчет от 0
size_t Display::Screen::SetLine(DisplayString* line, int pos)
{
if (pos > LinesCount - 1) {
return AddLine(line);
}
std::list<DisplayString*>::iterator it = Lines->begin();
std::advance(it, pos);
(**it) = (*line);
delete line;
LinesCount = Lines->size();
UpdateScrllFlag();
return LinesCount;
}
| [
"dronovova@gmail.com"
] | dronovova@gmail.com |
2bd21fc40f4c8e68b58742a4b69945feeaccef29 | bfd4c1ef0a7d413114243dfec6711b3bb12b47f7 | /Source.cpp | fb241958addab8f8347ca1a9972a132c09445c43 | [] | no_license | benson871229/multithread | 9d790de6c9a34529250688ded4618d51a41751ab | 156dc0c4a2c71658d187ab5c6ee74a0f83ea19e9 | refs/heads/master | 2023-04-07T13:21:10.362217 | 2021-04-10T04:53:16 | 2021-04-10T04:53:16 | 356,473,884 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 841 | cpp | #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<Windows.h>
#define THREAD_AMOUNT 30
typedef struct _DATA
{
char str[32];
int value;
} DATA, * LPDATA;
DWORD WINAPI ThreadfFunc(LPVOID lpParam)
{
LPDATA pData = (LPDATA)lpParam;
for (int i = 0; i < 10; i++)
{
printf("%s,%d\n", pData->str, pData->value++);
}
return TRUE;
}
int main(void)
{
HANDLE hThread[THREAD_AMOUNT];
DATA data[THREAD_AMOUNT];
for (int i = 0; i < THREAD_AMOUNT; i++)
{
data[i] = { 0 };
sprintf(data[i].str, "str-> %d", 'A' + i);
data[i].value = 0;
}
for (int i = 0; i < THREAD_AMOUNT; i++)
{
hThread[i] = CreateThread(NULL, 0, ThreadfFunc, &data[i], NULL, NULL);
}
WaitForMultipleObjects(THREAD_AMOUNT, hThread, TRUE, INFINITE);
for (int i = 0; i < THREAD_AMOUNT; i++)
{
CloseHandle(hThread[i]);
}
return 0;
}
| [
"71371929+benson871229@users.noreply.github.com"
] | 71371929+benson871229@users.noreply.github.com |
90f62b3266a2874ecb10f9f0d23546090f794b04 | 776f5892f1395bb8d30731a60466e4c756a44c8c | /contests/abc257/abc257_b/main.cc | 7b49e07c57ee22c5569221d15e7f72ebbf605631 | [] | no_license | kkishi/atcoder | fae494af4b47a9f39f05e7536e93d5c4dd21555b | f21d22095699dbf064c0d084a5ce5a09a252dc6b | refs/heads/master | 2023-08-31T18:37:13.293499 | 2023-08-27T21:33:43 | 2023-08-27T21:33:43 | 264,760,383 | 0 | 0 | null | 2023-03-10T05:24:07 | 2020-05-17T21:30:14 | C++ | UTF-8 | C++ | false | false | 237 | cc | #include <bits/stdc++.h>
#include "atcoder.h"
void Main() {
ints(n, k, q);
V<int> a(k), l(q);
cin >> a >> l;
each(e, l) {
--e;
if (a[e] == n) continue;
if (e == k - 1 || a[e] + 1 != a[e + 1]) ++a[e];
}
wt(a);
}
| [
"keisuke.kishimoto@gmail.com"
] | keisuke.kishimoto@gmail.com |
ccba003e9308762293836db36f92f819d731f28f | 13d93c2922005af35056d015f1ae3ebebe05ee31 | /pong/trunk/src/random-singleton.h | 49c37b26cdf73deade80fbd8c8c66b370d8641c0 | [] | no_license | scls19fr/openphysic | 647cc2cdadbdafd050d178e02bc3873bd2b07445 | 67bdb548574f4feecb99b60995238f12f4ef26da | refs/heads/master | 2021-04-30T23:16:26.197961 | 2020-11-16T20:21:17 | 2020-11-16T20:21:17 | 32,207,155 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,367 | h | //Random Singleton
//Ce fichier d'en-tete propose un bon generateur aleatoire
//de nombre reels ou entiers.Il s'agit du generateur de L'Ecuyer avec melange
//de Bays-Durham, des Numerical Recipes (http://www.nr.com)
//This header file provides a good random generator. It is the one of L'Ecuyer
//with Bays-Durham shuffle, found in Numerical Recipes(http://www.nr.com)
#ifndef __RANDOM_H__
#define __RANDOM_H__
#include <cmath>
#include <limits>
using namespace std;
class Random //Singleton
{
private:
template<typename T>
static inline bool typeIsInteger(void)
{return numeric_limits<T>::is_integer;}
//Si le numeric_limits<T> ne marche pas/if numeric_limits doesn't work
//{return static_cast<T>(1)/static_cast<T>(2)==static_cast<T>(0);}
public:
//Reinitialise la graine / Inits the seed
//Attention, 0 et 1 pour la graine donnent la meme suite
//Beware that 0 and 1 for the seed give the same sequence
static void Randomize(long thatSeed=0);
//Pour un type T, renvoie une valeur uniformement dans [min;max]
//(min et max exclu pour les types non entiers)
//For a type T, returns a value uniformly in [min;max]
//(min and max excluded for non integral types)
template <typename T>
static inline T Uniform(T min, T max)
{return static_cast<T>(min+(max+(typeIsInteger<T>()?1:0)-min)*theRandom());}
//Par defaut : Uniform<double>(0,1) / default : Uniform<double>(0,1)
static inline double Uniform(void) {return theRandom();}
//Renvoie un nombre selon la Gaussienne de moyenne et d'ecartype specifies
//Par defaut, c'est la loi normale centree reduite
//Returns a double taken on a Gaussian with specified mean and standard dev.
//By default, it is the Normal law with mean=0, std dev=1
static double Gaussian(double mean=0, double standardDeviation=1);
//Exponential
inline static double Exponential(double lambda)
{return -std::log(Uniform())/lambda;}
//On ne peut instancier d'objets de cette classe
//You cannot instanciate objects of this class
private:
Random(long seed=0) {iv = new long[NTAB]; Random::Randomize(seed);}
Random(const Random&) {};
Random operator=(const Random&) {return *this;}
~Random() {if (iv) delete [] iv; iv = 0;}
private:
//Toutes ces constantes sont definies pour l'algorithme du generateur
//Useful consts
static const long int IM1;
static const long int IM2;
static const long int IMM1;
static const double AM;
static const int IA1;
static const int IA2;
static const int IQ1;
static const int IQ2;
static const int IR1;
static const int IR2;
static const int NDIV;
static const double EPS;
static const double RNMX;
private:
//Ces variables sont utilisees pour les calculs du generateur
//Useful variables
static long idum;
static long idum2;
static long iy;
static const int NTAB;
static long* iv;
//Cette fonction renvoie un double aleatoire uniforme dans ]0;1[
//C'est le coeur du generateur
//The kernel of the generator : returns a double uniformly in ]0;1[
static double theRandom(void);
private:
static Random Singleton; //Instanciation unique / Single instanciation
};
#endif // __RANDOM_H__
| [
"s.celles@gmail.com@41f3eeec-7763-abce-c6e2-0c955b6d8259"
] | s.celles@gmail.com@41f3eeec-7763-abce-c6e2-0c955b6d8259 |
30e7ce05765a037746a93fd57c4d990be7423905 | 81de7aaf7ba6a591720056ca9771dd0256e2396a | /include/CsGameInterface.h | 95e3914cc098f22a353aa232582af7295fd0ccc4 | [] | no_license | SabinT/Wings-Of-Chaos | 9286add428d4a9a76f713bcc9ce6ac2560ace58f | 71359b1287613f82a35997c50a1c6c5882f98581 | refs/heads/master | 2021-01-10T21:45:41.628525 | 2013-11-25T08:37:22 | 2013-11-25T08:37:22 | 13,536,656 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,156 | h | #ifndef CSGAMEINTERFACE_H
#define CSGAMEINTERFACE_H
#include <OgrePrerequisites.h>
#include <CsCommons.h>
// TODO: separate input into separate class, which handles controls
#include <CsLockable.h>
class CsGameInterface: public CsLockable
{
public:
CsGameInterface() : mRoot(0), mWindow(0), mViewport(0), mSceneMgr(0),
mShutdown(false)
{
for (int i = 0; i < Chaos::NUM_BUTTONS; i++) mButtonState[i]= false;
}
virtual ~CsGameInterface();
virtual int Run() = 0;
virtual void InjectShutdown();
protected:
//--------------------------------------------------------------------------------
virtual bool Init() = 0;
virtual void Cleanup() = 0;
// input manager
CsInputManager *mInputManager;
bool mButtonState[Chaos::NUM_BUTTONS];
CsLockableQueue<CsInputEvent> *mInputQueueLogic;
CsLockableQueue<CsInputEvent> *mInputQueueRender;
// Ogre root data
Ogre::Root* mRoot;
Ogre::RenderWindow* mWindow;
Ogre::Viewport* mViewport;
Ogre::SceneManager* mSceneMgr;
Ogre::Camera* mDefaultCamera;
// lock for game interface status variables provided by Lockable interface
bool mShutdown;
};
#endif // CSGAMEINTERFACE_H
| [
"stimalsena@verishhealth.com"
] | stimalsena@verishhealth.com |
39286193fa25ee3f7e2e0bbf1874dc306455108d | 811e4727612ce11d5d73a1f9646dc5aadfe2db4f | /cpp.cpp | 6dfd164782aa9d3e6b70db47e9e5d98c8f4c3b74 | [] | no_license | Brian3647/hello-world | 1e96d13347be8dff856f081c0d0346c4bb5b4068 | 0804732fae6cd0caf0aabb5766ede84553dec6a0 | refs/heads/master | 2023-06-14T23:46:35.031943 | 2021-06-30T15:14:42 | 2021-06-30T15:14:42 | 381,744,188 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 93 | cpp | #include <iostream>
int main()
{
std::cout << "Hello world!" << std::endl;
return 0;
}
| [
"victoris3647@gmail.com"
] | victoris3647@gmail.com |
b8a711b35d21ab45e387cbe02d404e0c8584c10e | 77b1e6f423fdbf544c798c87dde175189733b862 | /Lekcja6Zadanie2.cpp | 0d714aa540791e75a75d321486e1c0780552fa04 | [] | no_license | reagne/C-Simple-Exercises | d2747892666a153745f406856f8b50dbc2f5986b | 348414c5dfb7f414b15b5b480da6bce30db7c9b2 | refs/heads/master | 2021-01-10T05:03:42.604026 | 2016-03-17T13:40:56 | 2016-03-17T13:40:56 | 54,119,276 | 0 | 0 | null | null | null | null | WINDOWS-1250 | C++ | false | false | 2,229 | cpp | #include <iostream>
using namespace std;
enum menu // w enum nie może być spacji
{
Wyjscie,
SprawdzSaldo,
Wyplac50zl,
Wyplac100zl,
WyplacInnaKwote
};
int main()
{
int stanKonta = 2500; // stan naszego konta; gdy zaczynamy
int kwota; // kwota, którą bedziemy wyplacać z bankomatu;
cout << "Menu:\n1 - Sprawdz saldo\n2 - Szybka wyplata 50 zl\n3 - Szybka wyplata 100 zl\n4 - Wyplac inna kwote\n0 - Wyjscie" << endl;
int nr_akcji;
while( stanKonta > 0 ) // warunek wykonania -> musimy miec PLN na koncie, aby wyplacić
{
cin >> nr_akcji;
switch(nr_akcji)
{
case SprawdzSaldo:
cout << "Stan twojego konta: " << stanKonta << endl << endl;
break;
case Wyplac50zl:
kwota = 50;
stanKonta -= kwota;
cout << "Wyplaciles pieniadze. Stan twojego konta po tej operacji: "
<< stanKonta << endl << endl;
break;
case Wyplac100zl:
kwota = 100;
stanKonta -= kwota;
cout << "Wyplaciles pieniadze. Stan twojego konta po tej operacji: "
<< stanKonta << endl << endl;
break;
case WyplacInnaKwote:
cout << "Podaj kwote" << endl;
cin >> kwota; // użytkownik wpisuje kwotę; zwróć uwagę, że strzałki są w drugą stronę niż przy cout
if (kwota>0 && kwota <= stanKonta) // czy użytkownik ma na koncie tyle pieniędzy, ile chce wyplacić?
{
stanKonta = stanKonta - kwota; // to samo mozna zapisac jako: stanKonta -= kwota;
cout << "Wyplaciles pieniadze. Stan twojego konta po tej operacji: "
<< stanKonta << endl << endl;
}
else if (kwota<0)
{
cout << "Kwota musi byc dodatnia." << endl << endl;
continue;
}
else if (kwota==0)
{
break; // powoduje przerwanie pętli i przejście bezpośrednio do instrukcji po pętli
}
else // chcesz wyplacić wiecej niz masz pieniędzy na koncie
{
cout << "Nie masz tyle Kasy! Masz: "
<< stanKonta << endl << endl;
}
break;
case Wyjscie:
cout << "Dziekujemy za korzystanie z naszego bankomatu.\n";
return 0;
}
}
cout << "Dziekujemy za korzystanie z naszego bankomatu.\n";
system("pause");
return 0;
}
| [
"regina.anam@gmail.com"
] | regina.anam@gmail.com |
cd672d2c815dfb3cafb4b701dc0de2e342fb7bdc | aa3779604d4f2f9be049a99598e550fce2edbab4 | /src/Subsystems/Shooter.cpp | 8eaffb98edbc60b8d2c45e29dd565a7872dcaa8c | [] | no_license | CRRobotics/2017Robot | 082d408167071e16017bb06de57346d315285374 | fdd0135aa7d7038dd3f5f8c80d838ac0b3216f79 | refs/heads/master | 2021-03-27T20:00:48.811835 | 2017-04-29T03:19:18 | 2017-04-29T03:19:18 | 81,997,099 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,166 | cpp | // RobotBuilder Version: 2.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// C++ from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
#include "CANTalon.h"
#include "Robot.h"
#include "Shooter.h"
#include "../RobotMap.h"
#define SHOOTER_ACCEPTABLE_ERROR 900
Shooter::Shooter() : Subsystem("Shooter")
{
flywheel = RobotMap::shooterflywheel;
angleShift = RobotMap::shooterangleShift;
visionMode = false;
}
void Shooter::InitDefaultCommand()
{
}
void Shooter::RunFlywheel(double speed)
{
flywheel->Set(speed);
if (speed == 0)
isRunning = false;
else
isRunning = true;
}
void Shooter::ChangeControlMode(CANTalon::ControlMode cMode)
{
flywheel->SetControlMode(cMode);
if (Robot::tMode == Robot::TestMode::SHOOTER_SPEED)
{
shootP = frc::SmartDashboard::GetNumber("test_pCons", 0.0);
shootI = frc::SmartDashboard::GetNumber("test_iCons", 0.0);
shootD = frc::SmartDashboard::GetNumber("test_dCons", 0.0);
shootF = frc::SmartDashboard::GetNumber("test_fCons", 0.0);
}
if (cMode == CANTalon::ControlMode::kSpeed)
{
flywheel->SetPID(shootP, shootI, shootD, shootF);
}
}
double Shooter::GetFlywheelSpeed()
{
return flywheel->GetSpeed();
}
bool Shooter::UpToSpeed()
{
return abs(flywheel->GetClosedLoopError()) < SHOOTER_ACCEPTABLE_ERROR;
}
int Shooter::GetSpeedError()
{
return flywheel->GetClosedLoopError();
}
bool Shooter::IsRunning()
{
return isRunning;
}
void Shooter::SetGatePosition(bool pos)
{
RobotMap::leftGate->Set(pos);
RobotMap::rightGate->Set(pos);
}
void Shooter::SetRGatePosition(bool pos)
{
RobotMap::rightGate->Set(pos);
}
void Shooter::SetLGatePosition(bool pos)
{
RobotMap::leftGate->Set(pos);
}
void Shooter::SetAngle(bool high)
{
angleShift->Set(!high);
}
| [
"mrinal.thomas@icsd.k12.ny.us"
] | mrinal.thomas@icsd.k12.ny.us |
495cd3e93b3e024ef89f122714cd4e57947b35f8 | 9d6eca4001a864d3a23cd9ade63e3c5eb6c92783 | /Programming/C++/prog01.cpp | 805b644d6504c2212c30213532d41675da25ae64 | [] | no_license | LiasOne/iek-assignments | 2e163b09dad1a172e59d80f593f8880e3a4d03c1 | 0b76f47a97499a25bfad08466e72e867a25e3835 | refs/heads/master | 2020-04-07T02:29:11.400989 | 2019-06-20T13:40:08 | 2019-06-20T13:40:08 | 157,978,445 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 296 | cpp | #include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main() {
int num;
cout<<"Δώσε έναν αριθμό"<<endl;
cin>>num;
if (num >= 1 && num <=3 ) {
cout << "Μήνυμα" <<endl;
} else {
cout << "Άλλο μήνυμα" <<endl;
}
return 0;
}
| [
"eno@vostro.localdomain"
] | eno@vostro.localdomain |
12aff9d6c71ac4520b453841e8703c0135c7f02a | c061446e8dfe28c25c5b87ac721a1c6aff99f35b | /chromium/src/device/vr/vr_display_impl.h | d169dfaafd809fabb3daa56253019a28d435366d | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | jai2033shankar/chromium-webar | 698aab8a4f1db97f9f00eb5a62adaad1400aa477 | 429270e8f9ba9fa25de24aa6346e8e2f3fafda05 | refs/heads/master | 2021-01-02T22:40:04.421980 | 2017-07-20T20:13:07 | 2017-07-20T20:13:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,362 | h | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DEVICE_VR_VR_DISPLAY_IMPL_H
#define DEVICE_VR_VR_DISPLAY_IMPL_H
#include <memory>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "device/vr/vr_device.h"
#include "device/vr/vr_export.h"
#include "device/vr/vr_service.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace device {
class VRServiceImpl;
class VRDisplayImpl : public mojom::VRDisplay {
public:
VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service);
~VRDisplayImpl() override;
mojom::VRDisplayClient* client() { return client_.get(); }
private:
friend class VRDisplayImplTest;
friend class VRServiceImpl;
void GetPose(const GetPoseCallback& callback) override;
void ResetPose() override;
void GetMaxNumberOfPointsInPointCloud(const GetMaxNumberOfPointsInPointCloudCallback& callback) override;
void GetPointCloud(bool justUpdatePointCloud, unsigned pointsToSkip, bool transformPoints, const GetPointCloudCallback& callback) override;
void GetPickingPointAndPlaneInPointCloud(float x, float y, const GetPickingPointAndPlaneInPointCloudCallback& callback) override;
void GetSeeThroughCamera(const GetSeeThroughCameraCallback& callback) override;
void GetADFs(const GetADFsCallback& callback) override;
void EnableADF(const std::string& uuid) override;
void DisableADF() override;
void DetectMarkers(unsigned markerType, float markerSize, const DetectMarkersCallback& callback) override;
void RequestPresent(bool secure_origin,
const RequestPresentCallback& callback) override;
void ExitPresent() override;
void SubmitFrame(mojom::VRPosePtr pose) override;
void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds,
mojom::VRLayerBoundsPtr right_bounds) override;
void RequestPresentResult(const RequestPresentCallback& callback,
bool secure_origin,
bool success);
mojo::Binding<mojom::VRDisplay> binding_;
mojom::VRDisplayClientPtr client_;
device::VRDevice* device_;
VRServiceImpl* service_;
base::WeakPtrFactory<VRDisplayImpl> weak_ptr_factory_;
};
} // namespace device
#endif // DEVICE_VR_VR_DISPLAY_IMPL_H
| [
"ijamardo@ijamardo-glaptop2.roam.corp.google.com"
] | ijamardo@ijamardo-glaptop2.roam.corp.google.com |
17e9b911561e6a9c9d8ddfe092144fff121c82c7 | ef620c4a84f777a7916bed1d7d5d92ef4db3a416 | /src/spork.h | b1d4d71d150f01a7bf2c5bed3ecf4cf127d0a63f | [
"MIT"
] | permissive | bspanda98/improvedbtc | 8855a24e854dd058f8bb6525e7f1529bff73cdd1 | a92085ebc1ab011db76596934219e7e2686a7521 | refs/heads/master | 2022-04-19T05:38:39.397913 | 2020-04-18T07:44:23 | 2020-04-18T07:44:23 | 256,695,314 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,911 | h | // Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2016-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef SPORK_H
#define SPORK_H
#include "base58.h"
#include "key.h"
#include "main.h"
#include "net.h"
#include "sync.h"
#include "util.h"
#include "protocol.h"
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
/*
Don't ever reuse these IDs for other sporks
- This would result in old clients getting confused about which spork is for what
*/
#define SPORK_START 10001
#define SPORK_END 10015
#define SPORK_2_SWIFTTX 10001
#define SPORK_3_SWIFTTX_BLOCK_FILTERING 10002
#define SPORK_5_MAX_VALUE 10004
#define SPORK_7_MASTERNODE_SCANNING 10006
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT 10007
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT 10008
#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES 10009
#define SPORK_11_RESET_BUDGET 10010
#define SPORK_12_RECONSIDER_BLOCKS 10011
#define SPORK_13_ENABLE_SUPERBLOCKS 10012
#define SPORK_14_NEW_PROTOCOL_ENFORCEMENT 10013
#define SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2 10014
#define SPORK_16_MN_WINNER_MINIMUM_AGE 10015
#define SPORK_2_SWIFTTX_DEFAULT 978307200 //2001-1-1
#define SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT 1424217600 //2015-2-18
#define SPORK_5_MAX_VALUE_DEFAULT 1000 //1000 IBTC
#define SPORK_7_MASTERNODE_SCANNING_DEFAULT 4070908800 //2001-1-1
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT 1424217600 //ON
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT 1424217600 //ON
#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT 4070908800 //OFF
#define SPORK_11_RESET_BUDGET_DEFAULT 0
#define SPORK_12_RECONSIDER_BLOCKS_DEFAULT 0
#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT 1424217600 //ON
#define SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT 4070908800 //OFF
#define SPORK_16_MN_WINNER_MINIMUM_AGE_DEFAULT 8000 // Age in seconds. This should be > MASTERNODE_REMOVAL_SECONDS to avoid
// misconfigured new nodes in the list.
// Set this to zero to emulate classic behaviour
class CSporkMessage;
class CSporkManager;
extern std::map<uint256, CSporkMessage> mapSporks;
extern std::map<int, CSporkMessage> mapSporksActive;
extern CSporkManager sporkManager;
void LoadSporksFromDB();
void ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
int64_t GetSporkValue(int nSporkID);
bool IsSporkActive(int nSporkID);
void ReprocessBlocks(int nBlocks);
//
// Spork Class
// Keeps track of all of the network spork settings
//
class CSporkMessage
{
public:
std::vector<unsigned char> vchSig;
int nSporkID;
int64_t nValue;
int64_t nTimeSigned;
uint256 GetHash()
{
uint256 n = HashQuark(BEGIN(nSporkID), END(nTimeSigned));
return n;
}
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
READWRITE(nSporkID);
READWRITE(nValue);
READWRITE(nTimeSigned);
READWRITE(vchSig);
}
};
class CSporkManager
{
private:
std::vector<unsigned char> vchSig;
std::string strMasterPrivKey;
public:
CSporkManager()
{
}
std::string GetSporkNameByID(int id);
int GetSporkIDByName(std::string strName);
bool UpdateSpork(int nSporkID, int64_t nValue);
bool SetPrivKey(std::string strPrivKey);
bool CheckSignature(CSporkMessage& spork);
bool Sign(CSporkMessage& spork);
void Relay(CSporkMessage& msg);
};
#endif
| [
"rangecoin@outlook.com"
] | rangecoin@outlook.com |
2e15511d383563cf9828f839068aba13d2396178 | fd2754ec7ab1fbb7da19a605c650c51081d09feb | /px4-firmware/src/lib/matrix/matrix/SquareMatrix.hpp | 175a3e40a7d82810dad4b358b26e691d68cdaac9 | [
"BSD-3-Clause"
] | permissive | thehummingbird/MavrosToPx4 | 133a82093c2678bd233577b192f5c91941d55237 | 7378f0d1abd02e538a75ace62ebb515f924c9afb | refs/heads/master | 2020-09-15T13:35:10.893704 | 2019-11-23T14:07:12 | 2019-11-23T14:07:12 | 223,458,088 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,565 | hpp | /**
* @file SquareMatrix.hpp
*
* A square matrix
*
* @author James Goppert <james.goppert@gmail.com>
*/
#pragma once
#include "math.hpp"
namespace matrix
{
template <typename Type, size_t M, size_t N>
class Matrix;
template <typename Type, size_t M>
class Vector;
template <typename Type, size_t P, size_t Q, size_t M, size_t N>
class Slice;
template<typename Type, size_t M>
class SquareMatrix : public Matrix<Type, M, M>
{
public:
SquareMatrix() = default;
explicit SquareMatrix(const Type data_[M][M]) :
Matrix<Type, M, M>(data_)
{
}
explicit SquareMatrix(const Type data_[M*M]) :
Matrix<Type, M, M>(data_)
{
}
SquareMatrix(const Matrix<Type, M, M> &other) :
Matrix<Type, M, M>(other)
{
}
template<size_t P, size_t Q>
SquareMatrix(const Slice<Type, M, M, P, Q>& in_slice) : Matrix<Type, M, M>(in_slice)
{
}
SquareMatrix<Type, M>& operator=(const Matrix<Type, M, M>& other)
{
Matrix<Type, M, M>::operator=(other);
return *this;
}
template <size_t P, size_t Q>
SquareMatrix<Type, M> & operator=(const Slice<Type, M, M, P, Q>& in_slice)
{
Matrix<Type, M, M>::operator=(in_slice);
return *this;
}
// inverse alias
inline SquareMatrix<Type, M> I() const
{
SquareMatrix<Type, M> i;
if (inv(*this, i)) {
return i;
} else {
i.setZero();
return i;
}
}
// inverse alias
inline bool I(SquareMatrix<Type, M> &i) const
{
return inv(*this, i);
}
Vector<Type, M> diag() const
{
Vector<Type, M> res;
const SquareMatrix<Type, M> &self = *this;
for (size_t i = 0; i < M; i++) {
res(i) = self(i, i);
}
return res;
}
// get matrix upper right triangle in a row-major vector format
Vector<Type, M * (M + 1) / 2> upper_right_triangle() const
{
Vector<Type, M * (M + 1) / 2> res;
const SquareMatrix<Type, M> &self = *this;
unsigned idx = 0;
for (size_t x = 0; x < M; x++) {
for (size_t y = x; y < M; y++) {
res(idx) = self(x, y);
++idx;
}
}
return res;
}
Type trace() const
{
Type res = 0;
const SquareMatrix<Type, M> &self = *this;
for (size_t i = 0; i < M; i++) {
res += self(i, i);
}
return res;
}
};
typedef SquareMatrix<float, 3> SquareMatrix3f;
template<typename Type, size_t M>
SquareMatrix<Type, M> eye() {
SquareMatrix<Type, M> m;
m.setIdentity();
return m;
}
template<typename Type, size_t M>
SquareMatrix<Type, M> diag(Vector<Type, M> d) {
SquareMatrix<Type, M> m;
for (size_t i=0; i<M; i++) {
m(i,i) = d(i);
}
return m;
}
template<typename Type, size_t M>
SquareMatrix<Type, M> expm(const Matrix<Type, M, M> & A, size_t order=5)
{
SquareMatrix<Type, M> res;
SquareMatrix<Type, M> A_pow = A;
res.setIdentity();
size_t i_factorial = 1;
for (size_t i=1; i<=order; i++) {
i_factorial *= i;
res += A_pow / Type(i_factorial);
A_pow *= A_pow;
}
return res;
}
/**
* inverse based on LU factorization with partial pivotting
*/
template<typename Type, size_t M>
bool inv(const SquareMatrix<Type, M> & A, SquareMatrix<Type, M> & inv)
{
SquareMatrix<Type, M> L;
L.setIdentity();
SquareMatrix<Type, M> U = A;
SquareMatrix<Type, M> P;
P.setIdentity();
//printf("A:\n"); A.print();
// for all diagonal elements
for (size_t n = 0; n < M; n++) {
// if diagonal is zero, swap with row below
if (fabs(static_cast<float>(U(n, n))) < FLT_EPSILON) {
//printf("trying pivot for row %d\n",n);
for (size_t i = n + 1; i < M; i++) {
//printf("\ttrying row %d\n",i);
if (fabs(static_cast<float>(U(i, n))) > 1e-8f) {
//printf("swapped %d\n",i);
U.swapRows(i, n);
P.swapRows(i, n);
L.swapRows(i, n);
L.swapCols(i, n);
break;
}
}
}
#ifdef MATRIX_ASSERT
//printf("A:\n"); A.print();
//printf("U:\n"); U.print();
//printf("P:\n"); P.print();
//fflush(stdout);
//ASSERT(fabs(U(n, n)) > 1e-8f);
#endif
// failsafe, return zero matrix
if (fabs(static_cast<float>(U(n, n))) < FLT_EPSILON) {
return false;
}
// for all rows below diagonal
for (size_t i = (n + 1); i < M; i++) {
L(i, n) = U(i, n) / U(n, n);
// add i-th row and n-th row
// multiplied by: -a(i,n)/a(n,n)
for (size_t k = n; k < M; k++) {
U(i, k) -= L(i, n) * U(n, k);
}
}
}
//printf("L:\n"); L.print();
//printf("U:\n"); U.print();
// solve LY=P*I for Y by forward subst
//SquareMatrix<Type, M> Y = P;
// for all columns of Y
for (size_t c = 0; c < M; c++) {
// for all rows of L
for (size_t i = 0; i < M; i++) {
// for all columns of L
for (size_t j = 0; j < i; j++) {
// for all existing y
// subtract the component they
// contribute to the solution
P(i, c) -= L(i, j) * P(j, c);
}
// divide by the factor
// on current
// term to be solved
// Y(i,c) /= L(i,i);
// but L(i,i) = 1.0
}
}
//printf("Y:\n"); Y.print();
// solve Ux=y for x by back subst
//SquareMatrix<Type, M> X = Y;
// for all columns of X
for (size_t c = 0; c < M; c++) {
// for all rows of U
for (size_t k = 0; k < M; k++) {
// have to go in reverse order
size_t i = M - 1 - k;
// for all columns of U
for (size_t j = i + 1; j < M; j++) {
// for all existing x
// subtract the component they
// contribute to the solution
P(i, c) -= U(i, j) * P(j, c);
}
// divide by the factor
// on current
// term to be solved
//
// we know that U(i, i) != 0 from above
P(i, c) /= U(i, i);
}
}
//check sanity of results
for (size_t i = 0; i < M; i++) {
for (size_t j = 0; j < M; j++) {
if (!is_finite(P(i,j))) {
return false;
}
}
}
//printf("X:\n"); X.print();
inv = P;
return true;
}
/**
* inverse based on LU factorization with partial pivotting
*/
template<typename Type, size_t M>
SquareMatrix<Type, M> inv(const SquareMatrix<Type, M> & A)
{
SquareMatrix<Type, M> i;
if (inv(A, i)) {
return i;
} else {
i.setZero();
return i;
}
}
/**
* cholesky decomposition
*
* Note: A must be positive definite
*/
template<typename Type, size_t M>
SquareMatrix <Type, M> cholesky(const SquareMatrix<Type, M> & A)
{
SquareMatrix<Type, M> L;
for (size_t j = 0; j < M; j++) {
for (size_t i = j; i < M; i++) {
if (i==j) {
float sum = 0;
for (size_t k = 0; k < j; k++) {
sum += L(j, k)*L(j, k);
}
Type res = A(j, j) - sum;
if (res <= 0) {
L(j, j) = 0;
} else {
L(j, j) = sqrt(res);
}
} else {
float sum = 0;
for (size_t k = 0; k < j; k++) {
sum += L(i, k)*L(j, k);
}
if (L(j, j) <= 0) {
L(i, j) = 0;
} else {
L(i, j) = (A(i, j) - sum)/L(j, j);
}
}
}
}
return L;
}
/**
* cholesky inverse
*
* TODO: Check if gaussian elimination jumps straight to back-substitution
* for L or we need to do it manually. Will impact speed otherwise.
*/
template<typename Type, size_t M>
SquareMatrix <Type, M> choleskyInv(const SquareMatrix<Type, M> & A)
{
SquareMatrix<Type, M> L_inv = inv(cholesky(A));
return L_inv.T()*L_inv;
}
typedef SquareMatrix<float, 3> Matrix3f;
} // namespace matrix
/* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */
| [
"sharadmaheshwari19@gmail.com"
] | sharadmaheshwari19@gmail.com |
ece516d8486d3dd48532d0bc476f65299ffdc18d | a85a1e6c776e0433c30aa5830aa353a82f4c8833 | /multiplayer/multiplayer_controls_chatedit.cpp | 353b44d550d34fa14c7300975af0e7e252a64b23 | [] | no_license | IceCube-22/darkreign2 | fe97ccb194b9eacf849d97b2657e7bd1c52d2916 | 9ce9da5f21604310a997f0c41e9cd383f5e292c3 | refs/heads/master | 2023-03-20T02:27:03.321950 | 2018-10-04T10:06:38 | 2018-10-04T10:06:38 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,335 | cpp | ///////////////////////////////////////////////////////////////////////////////
//
// Copyright 1997-1999 Pandemic Studios, Dark Reign II
//
// MultiPlayer Stuff
// 1-JUL-1999
//
///////////////////////////////////////////////////////////////////////////////
//
// Includes
//
#include "multiplayer_controls_chatedit.h"
#include "iface.h"
#include "iface_types.h"
#include "input.h"
#include "stdload.h"
///////////////////////////////////////////////////////////////////////////////
//
// NameSpace MultiPlayer
//
namespace MultiPlayer
{
///////////////////////////////////////////////////////////////////////////////
//
// NameSpace Controls
//
namespace Controls
{
///////////////////////////////////////////////////////////////////////////////
//
// Class ChatEdit
//
//
// Constructor
//
ChatEdit::ChatEdit(IControl *parent)
: ConsoleEdit(parent),
typeVar(NULL),
prefixLen(0)
{
}
//
// Destructor
//
ChatEdit::~ChatEdit()
{
// Delete the var
if (typeVar)
{
delete typeVar;
typeVar = NULL;
}
}
//
// Setup
//
// Setup this control using a 'DefineControl' function
//
void ChatEdit::Setup(FScope *fScope)
{
switch (fScope->NameCrc())
{
case 0x22E56232: // "TypeVar"
{
ConfigureVar(typeVar, fScope);
break;
}
case 0x60DBE5AD: // "CmdPrefix"
{
cmdPrefix = StdLoad::TypeString(fScope);
prefixLen = Utils::Strlen(cmdPrefix.str);
break;
}
default:
{
ConsoleEdit::Setup(fScope);
break;
}
}
}
//
// HandleEvent
//
// Pass any events to the registered handler
//
U32 ChatEdit::HandleEvent(Event &e)
{
/*
if (e.type == Input::EventID())
{
switch (e.subType)
{
case Input::KEYDOWN:
case Input::KEYREPEAT:
{
switch (e.input.code)
{
// Var completion .. only available if the first character is ':' or '!'
case DIK_TAB:
{
if (*editBuf == ':' || *editBuf == '!')
{
// Var completion
if (mode != VARCOMPLETION)
{
// Enter Var completion mode
SetMode(VARCOMPLETION);
if (StartCompletion(e.input.state & Input::SHIFTDOWN ? FALSE : TRUE))
{
// Something was inserted into the list so insert it into the command line
UpdateCompletion();
}
else
{
// There was nothing in the completion list so return to edit mode
SetMode(EDIT);
}
}
else
{
// Cycle through the vars
ContinueCompletion(e.input.state & Input::SHIFTDOWN ? FALSE : TRUE);
UpdateCompletion();
}
}
// Handled
return (TRUE);
}
}
}
}
}
else
*/
if (e.type == IFace::EventID())
{
switch (e.subType)
{
case IFace::NOTIFY:
{
// Do specific handling
switch (e.iface.p1)
{
case IControlNotify::Activated:
{
// Check and setup the var
ActivateVar(typeVar);
// Check strings
if (*cmdPrefix.str == '\0')
{
ERR_FATAL(("Command prefix not defined for ChatEdit [%s]", Name()))
}
// Allow default behavior
break;
}
case IControlNotify::Deactivated:
{
// Unlink from var
typeVar->Deactivate();
// Allow default behavior
break;
}
case ICEditMsg::Enter:
{
// Add the command to the console
Console::AddCmdHist(editBuf, FALSE);
// Is this a special command ?
switch (*editBuf)
{
// A console command
/*
case ':':
case '!':
Console::ProcessCmd(editBuf + 1);
break;
*/
// A multiplayer command
case '/':
{
// Prefix the edit buffer with cmdPrefix
char *buf = new char[editMax + 1 + prefixLen];
Utils::Strcpy(buf, cmdPrefix.str);
Utils::Strcat(buf, editBuf + 1);
Console::ProcessCmd(buf);
delete buf;
break;
}
// A chat message
default:
{
if (typeVar)
{
// Build a cmd to execute the chat string
const char *cmd = typeVar->GetStringValue();
U32 size = editMax + 16 + prefixLen;
char *buf = new char[size];
Utils::Sprintf(buf, size, "%s%s %s", cmdPrefix.str, cmd, editBuf);
Console::ProcessCmd(buf);
delete buf;
}
break;
}
}
// Reset buffers
if (IsActive())
{
ResetInputBuf();
ResetWorkBuf();
// Grab keyboard focus
GetKeyFocus();
}
// Generate enter notification
SendNotify(this, ICEditNotify::Entered);
// Handled
return (TRUE);
}
}
}
}
}
return (ConsoleEdit::HandleEvent(e));
}
}
}
| [
"eider@protonmail.com"
] | eider@protonmail.com |
6bc1ea488b1f1fa1785f46d95c7fbb437793e477 | 9fda5b2aa670589d5911dae3084149ad9170bb60 | /simulator/sim/population/person.cpp | dbefcbcc76c430b0dce54e572aaa8be6784e144c | [] | no_license | mattj23/covid-delta-usa | 93bba1284324225dc65394ace9197415538fb1fd | 258b84673cc3dbe87a3c14dd40a96b016d323208 | refs/heads/main | 2023-07-07T22:44:12.391214 | 2021-08-20T05:20:16 | 2021-08-20T05:20:16 | 391,808,680 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 263 | cpp | #include "person.hpp"
void sim::Person::Reset() {
variant = Variant::None;
infected_day = 0;
symptom_onset = 0;
test_day = 0;
natural_immunity_scalar = 0;
vaccine_immunity_scalar = 0;
is_vaccinated = false;
vaccination_day = 0;
}
| [
"mattj23@gmail.com"
] | mattj23@gmail.com |
b4b5ba19a04b25b4395b7b4cfd54ae171076aa39 | 1a41836c57f1628cf2d796af3ca736d98044553e | /modules/perception/obstacle/camera/lane_post_process/common/connected_component.h | d8965e639b88fb90d336810681d3c47113e552dc | [
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | ColleyLi/JMCMAuto | 67fc7971bc8fe8725de5297ad7121d472db891ee | 54e727271e9d9f0fb300cdf7ab0dcc7789c6ca95 | refs/heads/master | 2023-04-25T19:49:21.978686 | 2021-06-03T10:28:49 | 2021-06-03T10:28:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,995 | h | /******************************************************************************
* Copyright 2018 The JmcAuto Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#ifndef MODULES_PERCEPTION_OBSTACLE_CAMERA_LANE_POST_PROCESS_COMMON_CC_H_
#define MODULES_PERCEPTION_OBSTACLE_CAMERA_LANE_POST_PROCESS_COMMON_CC_H_
#include <Eigen/Core>
#include <opencv2/core/core.hpp>
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>
#include <iostream>
// #include "modules/common/log.h"
#include "modules/perception/obstacle/camera/lane_post_process/common/base_type.h"
namespace jmc_auto {
namespace perception {
#ifndef NUM_RESERVE_VERTICES
#define NUM_RESERVE_VERTICES 4
#endif
#ifndef NUM_RESERVE_EDGES
#define NUM_RESERVE_EDGES 6
#endif
class DisjointSet {
public:
DisjointSet() : subset_num_(0) {}
explicit DisjointSet(const size_t siz) : subset_num_(0) {
disjoint_array_.reserve(siz);
}
~DisjointSet() {}
void Init(const size_t siz) {
disjoint_array_.clear();
disjoint_array_.reserve(siz);
subset_num_ = 0;
}
void Reset() {
disjoint_array_.clear();
subset_num_ = 0;
}
// get the number of subsets (root nodes)
int Size() const { return subset_num_; }
// get the total number of elements
size_t Num() const { return disjoint_array_.size(); }
// add a new element
int Add();
// find the root element of x
int Find(int x);
// union two elements x and y
void Unite(int x, int y);
private:
std::vector<int> disjoint_array_;
int subset_num_;
};
class ConnectedComponent {
public:
typedef Eigen::Matrix<ScalarType, 2, 1> Vertex;
typedef Eigen::Matrix<ScalarType, 2, 1> Displacement;
enum BoundingBoxSplitType {
NONE = -1, // do not split
VERTICAL, // split in vertical direction (y)
HORIZONTAL, // split in horizontal direction (x)
};
struct Edge {
int start_vertex_id;
int end_vertex_id;
Displacement vec;
ScalarType len;
ScalarType orie;
Edge()
: start_vertex_id(-1),
end_vertex_id(-1),
vec(0.0, 0.0),
len(0.0),
orie(0.0) {}
int get_start_vertex_id() const { return start_vertex_id; }
int get_end_vertex_id() const { return end_vertex_id; }
};
struct BoundingBox {
int x_min; // left
int y_min; // up
int x_max; // right
int y_max; // down
std::shared_ptr<std::vector<int>> bbox_pixel_idx;
BoundingBoxSplitType split;
std::shared_ptr<std::vector<int>> left_contour;
std::shared_ptr<std::vector<int>> up_contour;
std::shared_ptr<std::vector<int>> right_contour;
std::shared_ptr<std::vector<int>> down_contour;
BoundingBox()
: x_min(-1),
y_min(-1),
x_max(-1),
y_max(-1),
split(BoundingBoxSplitType::NONE) {
bbox_pixel_idx = std::make_shared<std::vector<int>>();
left_contour = std::make_shared<std::vector<int>>();
up_contour = std::make_shared<std::vector<int>>();
right_contour = std::make_shared<std::vector<int>>();
down_contour = std::make_shared<std::vector<int>>();
}
BoundingBox(int x, int y)
: x_min(x),
y_min(y),
x_max(x),
y_max(y),
split(BoundingBoxSplitType::NONE) {
bbox_pixel_idx = std::make_shared<std::vector<int>>();
left_contour = std::make_shared<std::vector<int>>();
up_contour = std::make_shared<std::vector<int>>();
right_contour = std::make_shared<std::vector<int>>();
down_contour = std::make_shared<std::vector<int>>();
}
int width() const { return x_max - x_min + 1; }
int height() const { return y_max - y_min + 1; }
};
ConnectedComponent() : pixel_count_(0), bbox_() {
pixels_ = std::make_shared<std::vector<cv::Point2i>>();
vertices_ = std::make_shared<std::vector<Vertex>>();
vertices_->reserve(NUM_RESERVE_VERTICES);
edges_ = std::make_shared<std::vector<Edge>>();
edges_->reserve(NUM_RESERVE_EDGES);
max_len_edge_id_ = -1;
clockwise_edge_ = std::make_shared<Edge>();
anticlockwise_edge_ = std::make_shared<Edge>();
inner_edge_ = std::make_shared<Edge>();
clockwise_edges_ = std::make_shared<std::vector<Edge>>();
anticlockwise_edges_ = std::make_shared<std::vector<Edge>>();
inner_edges_ = std::make_shared<std::vector<Edge>>();
}
ConnectedComponent(int x, int y) : pixel_count_(1), bbox_(x, y) {
pixels_ = std::make_shared<std::vector<cv::Point2i>>();
pixels_->push_back(cv::Point(x, y));
vertices_ = std::make_shared<std::vector<Vertex>>();
vertices_->reserve(NUM_RESERVE_VERTICES);
edges_ = std::make_shared<std::vector<Edge>>();
edges_->reserve(NUM_RESERVE_EDGES);
max_len_edge_id_ = -1;
clockwise_edge_ = std::make_shared<Edge>();
anticlockwise_edge_ = std::make_shared<Edge>();
inner_edge_ = std::make_shared<Edge>();
clockwise_edges_ = std::make_shared<std::vector<Edge>>();
anticlockwise_edges_ = std::make_shared<std::vector<Edge>>();
inner_edges_ = std::make_shared<std::vector<Edge>>();
}
~ConnectedComponent() {}
// CC pixels
void AddPixel(int x, int y);
/*
void AddPixel(int x, int y) {
if (pixel_count_ == 0) {
// new bounding box
bbox_.x_min = x; // x_min
bbox_.y_min = y; // y_min
bbox_.x_max = x; // x_max
bbox_.y_max = y; // y_max
} else {
// extend bounding box if necessary
if (x < bbox_.x_min) {
bbox_.x_min = x;
}
if (x > bbox_.x_max) {
bbox_.x_max = x;
}
if (y < bbox_.y_min) {
bbox_.y_min = y;
}
if (y > bbox_.y_max) {
bbox_.y_max = y;
}
}
pixels_->push_back(cv::Point(x, y));
pixel_count_++;
}
*/
int GetPixelCount() const { return pixel_count_; }
std::shared_ptr<const std::vector<cv::Point2i>> GetPixels() const {
return pixels_;
}
// bounding box
const BoundingBox* bbox() const { return &bbox_; }
int x_min() const { return bbox_.x_min; }
int y_min() const { return bbox_.y_min; }
int x_max() const { return bbox_.x_max; }
int y_max() const { return bbox_.y_max; }
cv::Rect GetBoundingBox() const {
return cv::Rect(bbox_.x_min, bbox_.y_min, bbox_.x_max - bbox_.x_min + 1,
bbox_.y_max - bbox_.y_min + 1);
}
int GetBoundingBoxArea() const {
return (bbox_.x_max - bbox_.x_min + 1) * (bbox_.y_max - bbox_.y_min + 1);
}
// split bounding box
BoundingBoxSplitType DetermineSplit(ScalarType split_siz);
void FindContourForSplit();
// bounding box pixels
void FindBboxPixels();
std::shared_ptr<const std::vector<int>> bbox_pixel_idx() const {
return bbox_.bbox_pixel_idx;
}
int GetBboxPixelCount() const {
return static_cast<int>(bbox_.bbox_pixel_idx->size());
}
// vertices
void FindVertices();
std::shared_ptr<const std::vector<Vertex>> GetVertices() const {
return vertices_;
}
Vertex GetVertex(int vertex_id, double scale, double start_y_pos) const {
// assert(vertex_id >= 0 && vertex_id < this->getVertexCount());
Vertex ver_pnt = vertices_->at(vertex_id);
ver_pnt[0] = static_cast<int>(ver_pnt[0] * scale);
ver_pnt[1] = static_cast<int>(ver_pnt[1] * scale + start_y_pos);
return ver_pnt;
// return vertices_->at(vertex_id);
}
int GetVertexCount() const { return static_cast<int>(vertices_->size()); }
// edges
bool IsValidEdgeVertices(int i, int j) {
return i >= 0 && i < this->GetVertexCount() && j >= 0 &&
j < this->GetVertexCount() && i != j;
}
void FindEdges();
int GetEdgeCount() const { return static_cast<int>(edges_->size()); }
const Edge* GetMaxLenthEdge() const { return &edges_->at(max_len_edge_id_); }
std::shared_ptr<const Edge> GetClockWiseEdge() const {
return clockwise_edge_;
}
std::shared_ptr<const Edge> GetAntiClockWiseEdge() const {
return anticlockwise_edge_;
}
std::shared_ptr<const Edge> GetInnerEdge() const { return inner_edge_; }
void SplitContour(int split_len);
std::shared_ptr<std::vector<Edge>> GetClockWiseEdges() const {
return clockwise_edges_;
}
std::shared_ptr<std::vector<Edge>> GetAntiClockWiseEdges() const {
return anticlockwise_edges_;
}
std::shared_ptr<std::vector<Edge>> GetInnerEdges() const {
return inner_edges_;
}
void Process(ScalarType split_siz, int split_len);
private:
int Sub2Ind(int row, int col, int width) { return row * width + col; }
void SplitContourVertical(int start_vertex_id, int end_vertex_id,
int len_split, bool is_clockwise);
void SplitContourVertical(int len_split, bool is_clockwise, int start_pos,
int end_pos);
void SplitContourHorizontal(int start_vertex_id, int end_vertex_id,
int len_split, bool is_clockwise);
void SplitContourHorizontal(int len_split, bool is_clockwise, int start_pos,
int end_pos);
std::vector<int> GetSplitRanges(int siz, int len_split);
Edge MakeEdge(int i, int j);
int pixel_count_;
std::shared_ptr<std::vector<cv::Point2i>> pixels_;
BoundingBox bbox_;
std::shared_ptr<std::vector<Vertex>> vertices_;
std::shared_ptr<std::vector<Edge>> edges_;
int max_len_edge_id_;
std::shared_ptr<Edge> clockwise_edge_, anticlockwise_edge_;
std::shared_ptr<Edge> inner_edge_;
std::shared_ptr<std::vector<Edge>> clockwise_edges_, anticlockwise_edges_;
std::shared_ptr<std::vector<Edge>> inner_edges_;
};
typedef std::shared_ptr<ConnectedComponent> ConnectedComponentPtr;
typedef const std::shared_ptr<ConnectedComponent> ConnectedComponentConstPtr;
class ConnectedComponentGenerator {
public:
ConnectedComponentGenerator(int image_width, int image_height);
ConnectedComponentGenerator(int image_width, int image_height, cv::Rect roi);
bool FindConnectedComponents(
const cv::Mat& lane_map,
std::vector<std::shared_ptr<ConnectedComponent>>* cc);
private:
size_t total_pix_;
int image_width_;
int image_height_;
int width_;
int height_;
int roi_x_min_;
int roi_y_min_;
int roi_x_max_;
int roi_y_max_;
DisjointSet labels_;
std::vector<int> frame_label_;
std::vector<int> root_map_;
};
} // namespace perception
} // namespace jmc_auto
#endif // MODULES_PERCEPTION_OBSTACLE_CAMERA_LANE_POST_PROCESS_COMMON_CC_H_
| [
"yli97@jmc.com.cn"
] | yli97@jmc.com.cn |
a660b0b69474ec404b01e8717128ec4e9a32af57 | c6f69ac70fbfe5380d691e35a818a6e8eaf6e914 | /src/videoseg/io.cpp | 62d75c7ba3a7b763ad63dcd40dcc447119eb0180 | [] | no_license | jvlmdr/non-rigid-tracking | 00e9d116410628da2d4f5153439167f5a34c55a1 | ee0377e3a324b4e82ee0fc2eee0fbcfe7ec062a1 | refs/heads/master | 2020-04-15T16:27:25.755272 | 2013-03-13T05:45:28 | 2013-03-13T05:45:28 | 6,432,545 | 5 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 6,703 | cpp | /*
* Created by Matthias Grundmann on 6/30/10.
* Copyright 2010 Matthias Grundmann. All rights reserved.
*
*/
#include "videoseg/io.hpp"
#include "videoseg/hierarchical-segmentation.hpp"
#include <iostream>
typedef unsigned char uchar;
namespace videoseg {
bool SegmentationWriter::OpenFile() {
// Open file to write
//LOG(INFO_V1) << "Writing segmentation to file " << filename_;
ofs_.open(filename_.c_str(),
std::ios_base::out | std::ios_base::binary | std::ios_base::trunc);
if (!ofs_) {
//LOG(ERROR) << "Could not open " << filename_ << " to write!\n";
return false;
}
num_chunks_ = 0;
curr_offset_ = 0;
return true;
}
void SegmentationWriter::AddSegmentationToChunk(const SegmentationDesc& desc,
int64_t pts) {
// Buffer for later.
file_offsets_.push_back(curr_offset_);
chunk_buffer_.push_back(string());
desc.SerializeToString(&chunk_buffer_.back());
// Increment by size of a SEG_FRAME.
curr_offset_ += chunk_buffer_.back().size() + 4 + sizeof(int32_t);
time_stamps_.push_back(pts);
}
void SegmentationWriter::AddSegmentationDataToChunk(const char* data,
int size,
int64_t pts) {
// Buffer for later.
file_offsets_.push_back(curr_offset_);
chunk_buffer_.push_back(string());
chunk_buffer_.back().assign(data, size);
curr_offset_ += size + 4 + sizeof(int32_t);
time_stamps_.push_back(pts);
}
namespace {
template <class T> const char* ToConstCharPtr(const T* t) {
return reinterpret_cast<const char*>(t);
}
template <class T> char* ToCharPtr(T* t) {
return reinterpret_cast<char*>(t);
}
} // namespace
void SegmentationWriter::WriteChunk() {
// Compile Header information.
int32_t num_frames = file_offsets_.size();
int32_t chunk_id = num_chunks_++;
ofs_.write("CHNK", 4);
ofs_.write(ToConstCharPtr(&chunk_id), sizeof(chunk_id));
ofs_.write(ToConstCharPtr(&num_frames), sizeof(num_frames));
int64_t size_of_header =
4 +
2 * sizeof(int32_t) +
num_frames * 2 * sizeof(int64_t) +
sizeof(int64_t);
// Advance offsets by size of header.
curr_offset_ += size_of_header;
for (size_t i = 0; i < file_offsets_.size(); ++i) {
file_offsets_[i] += size_of_header;
}
// Write offsets and pts.
for (size_t i = 0; i < file_offsets_.size(); ++i) {
ofs_.write(ToConstCharPtr(&file_offsets_[i]), sizeof(file_offsets_[i]));
}
//ASSURE_LOG(file_offsets_.size() == time_stamps_.size());
for (size_t i = 0; i < time_stamps_.size(); ++i) {
ofs_.write(ToConstCharPtr(&time_stamps_[i]), sizeof(time_stamps_[i]));
}
// Write offset of next header.
ofs_.write(ToConstCharPtr(&curr_offset_), sizeof(curr_offset_));
// Write frames.
//ASSURE_LOG(file_offsets_.size() == chunk_buffer_.size());
for (size_t i = 0; i < chunk_buffer_.size(); ++i) {
ofs_.write("SEGD", 4);
int32_t frame_size = chunk_buffer_[i].length();
ofs_.write(ToConstCharPtr(&frame_size), sizeof(frame_size));
ofs_.write(ToConstCharPtr(&chunk_buffer_[i][0]), frame_size);
}
// Clear chunk information.
chunk_buffer_.clear();
file_offsets_.clear();
time_stamps_.clear();
}
void SegmentationWriter::WriteTermHeaderAndClose() {
if (!chunk_buffer_.empty()) {
WriteChunk();
}
ofs_.write("TERM", 4);
ofs_.write(ToConstCharPtr(&num_chunks_), sizeof(num_chunks_));
ofs_.close();
}
void SegmentationWriter::FlushAndReopen(const string& filename) {
if (!chunk_buffer_.empty()) {
WriteChunk();
}
WriteTermHeaderAndClose();
filename_ = filename;
curr_offset_ = 0;
num_chunks_ = 0;
OpenFile();
}
bool SegmentationReader::OpenFileAndReadHeaders() {
// Open file.
//LOG(INFO_V1) << "Reading segmentation from file " << filename_;
ifs_.open(filename_.c_str(), std::ios_base::in | std::ios_base::binary);
if (!ifs_) {
//LOG(ERROR) << "Could not open segmentation file " << filename_ << "\n";
return false;
}
// Read file offsets until TERM header.
char header_type[5] = {0, 0, 0, 0, 0};
int prev_header_id = -1;
while (true) {
ifs_.read(header_type, 4);
// End of file, return.
if (strcmp(header_type, "TERM") == 0) {
break;
}
// We only process chunk headers while over skipping seg frames.
if (strcmp(header_type, "CHNK") != 0) {
//LOG(ERROR) << "Parsing error, expected chunk header at current offset."
// << " Found: " << header_type;
return false;
}
int32_t header_id;
ifs_.read(ToCharPtr(&header_id), sizeof(header_id));
//ASSURE_LOG(prev_header_id + 1 == header_id)
// << prev_header_id << " " << header_id;
prev_header_id = header_id;
int32_t num_frames_in_chunk;
ifs_.read(ToCharPtr(&num_frames_in_chunk), sizeof(num_frames_in_chunk));
// Read offsets.
for (int f = 0; f < num_frames_in_chunk; ++f) {
int64_t offset;
ifs_.read(ToCharPtr(&offset), sizeof(offset));
file_offsets_.push_back(offset);
}
// Read timestamps.
for (int f = 0; f < num_frames_in_chunk; ++f) {
int64_t timestamp;
ifs_.read(ToCharPtr(×tamp), sizeof(timestamp));
time_stamps_.push_back(timestamp);
}
int64_t next_header_pos;
ifs_.read(ToCharPtr(&next_header_pos), sizeof(next_header_pos));
ifs_.seekg(next_header_pos);
}
return true;
}
void SegmentationReader::SegmentationResolution(int* width, int* height) {
//ASSURE_LOG(width);
//ASSURE_LOG(height);
const int curr_playhead = curr_frame_;
SeekToFrame(0);
int frame_sz = ReadNextFrameSize();
vector<unsigned char> buffer(frame_sz);
ReadNextFrame(&buffer[0]);
SegmentationDesc segmentation;
segmentation.ParseFromArray(&buffer[0], buffer.size());
*width = segmentation.frame_width();
*height = segmentation.frame_height();
if (curr_playhead < NumFrames()) {
SeekToFrame(curr_playhead);
}
}
void SegmentationReader::SeekToFrame(int frame) {
//ASSURE_LOG(frame < file_offsets_.size()) << "Requested frame out of bound.";
curr_frame_ = frame;
}
int SegmentationReader::ReadNextFrameSize() {
// Seek to next frame (to skip chunk headers).
ifs_.seekg(file_offsets_[curr_frame_]);
char header_type[5] = {0, 0, 0, 0, 0};
ifs_.read(header_type, 4);
if (!strcmp(header_type, "SEGD") == 0) {
//LOG(ERROR) << "Expecting segmentation header. Error parsing file.";
return -1;
}
ifs_.read(ToCharPtr(&frame_sz_), sizeof(frame_sz_));
return frame_sz_;
}
void SegmentationReader::ReadNextFrame(uchar* data) {
ifs_.read(ToCharPtr(data), frame_sz_);
++curr_frame_;
}
} // namespace videoseg
| [
"jack.valmadre@gmail.com"
] | jack.valmadre@gmail.com |
72e08b141dc91d36bcf180ce2bba92c41ac197ac | 96ab4dd1b01a51164031c2cdf2dc9e7b773a4293 | /HPB_bot/bot_client.cpp | 439f58df9e18ec7eade093280aacbda48f01cb3d | [] | no_license | N7P0L3ON/hlsdk10-bots | 25e821d519f8229ac5ab6ab614df7698ce843f90 | d12620edecb1d2012663f32957a01d2c7b16c52a | refs/heads/master | 2023-05-02T05:57:31.064376 | 2018-08-25T10:01:57 | 2018-08-25T10:01:57 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,732 | cpp | //
// HPB bot - botman's High Ping Bastard bot
//
// (http://planethalflife.com/botman/)
//
// bot_client.cpp
//
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "bot.h"
#include "bot_func.h"
#include "bot_client.h"
#include "bot_weapons.h"
// types of damage to ignore...
#define IGNORE_DAMAGE (DMG_CRUSH | DMG_FREEZE | DMG_SHOCK | DMG_DROWN | \
DMG_NERVEGAS | DMG_RADIATION | DMG_DROWNRECOVER | \
DMG_ACID | DMG_SLOWBURN | DMG_SLOWFREEZE)
extern int mod_id;
extern bot_t bots[32];
bot_weapon_t weapon_defs[MAX_WEAPONS]; // array of weapon definitions
// This message is sent when the TFC VGUI menu is displayed.
void BotClient_TFC_VGUI(void *p, int bot_index)
{
if ((*(int *)p) == 2) // is it a team select menu?
bots[bot_index].start_action = MSG_TFC_TEAM_SELECT;
else if ((*(int *)p) == 3) // is is a class selection menu?
bots[bot_index].start_action = MSG_TFC_CLASS_SELECT;
}
// This message is sent when the Counter-Strike VGUI menu is displayed.
void BotClient_CS_VGUI(void *p, int bot_index)
{
if ((*(int *)p) == 2) // is it a team select menu?
bots[bot_index].start_action = MSG_CS_TEAM_SELECT;
else if ((*(int *)p) == 26) // is is a terrorist model select menu?
bots[bot_index].start_action = MSG_CS_T_SELECT;
else if ((*(int *)p) == 27) // is is a counter-terrorist model select menu?
bots[bot_index].start_action = MSG_CS_CT_SELECT;
}
// This message is sent when a menu is being displayed in Counter-Strike.
void BotClient_CS_ShowMenu(void *p, int bot_index)
{
static int state = 0; // current state machine state
if (state < 3)
{
state++; // ignore first 3 fields of message
return;
}
if (strcmp((char *)p, "#Team_Select") == 0) // team select menu?
{
bots[bot_index].start_action = MSG_CS_TEAM_SELECT;
}
else if (strcmp((char *)p, "#Terrorist_Select") == 0) // T model select?
{
bots[bot_index].start_action = MSG_CS_T_SELECT;
}
else if (strcmp((char *)p, "#CT_Select") == 0) // CT model select menu?
{
bots[bot_index].start_action = MSG_CS_CT_SELECT;
}
state = 0; // reset state machine
}
// This message is sent when a client joins the game. All of the weapons
// are sent with the weapon ID and information about what ammo is used.
void BotClient_Valve_WeaponList(void *p, int bot_index)
{
static int state = 0; // current state machine state
static bot_weapon_t bot_weapon;
if (state == 0)
{
state++;
strcpy(bot_weapon.szClassname, (char *)p);
}
else if (state == 1)
{
state++;
bot_weapon.iAmmo1 = *(int *)p; // ammo index 1
}
else if (state == 2)
{
state++;
bot_weapon.iAmmo1Max = *(int *)p; // max ammo1
}
else if (state == 3)
{
state++;
bot_weapon.iAmmo2 = *(int *)p; // ammo index 2
}
else if (state == 4)
{
state++;
bot_weapon.iAmmo2Max = *(int *)p; // max ammo2
}
else if (state == 5)
{
state++;
bot_weapon.iSlot = *(int *)p; // slot for this weapon
}
else if (state == 6)
{
state++;
bot_weapon.iPosition = *(int *)p; // position in slot
}
else if (state == 7)
{
state++;
bot_weapon.iId = *(int *)p; // weapon ID
}
else if (state == 8)
{
bot_weapon.iFlags = *(int *)p; // flags for weapon (WTF???)
// store away this weapon with it's ammo information...
weapon_defs[bot_weapon.iId] = bot_weapon;
state = 0;
}
}
void BotClient_TFC_WeaponList(void *p, int bot_index)
{
// this is just like the Valve Weapon List message
BotClient_Valve_WeaponList(p, bot_index);
}
void BotClient_CS_WeaponList(void *p, int bot_index)
{
// this is just like the Valve Weapon List message
BotClient_Valve_WeaponList(p, bot_index);
}
void BotClient_Gearbox_WeaponList(void *p, int bot_index)
{
// this is just like the Valve Weapon List message
BotClient_Valve_WeaponList(p, bot_index);
}
// This message is sent when a weapon is selected (either by the bot chosing
// a weapon or by the server auto assigning the bot a weapon).
void BotClient_Valve_CurrentWeapon(void *p, int bot_index)
{
static int state = 0; // current state machine state
static int iState;
static int iId;
static int iClip;
if (state == 0)
{
state++;
iState = *(int *)p; // state of the current weapon (WTF???)
}
else if (state == 1)
{
state++;
iId = *(int *)p; // weapon ID of current weapon
}
else if (state == 2)
{
if (iId <= 31)
{
iClip = *(int *)p; // ammo currently in the clip for this weapon
bots[bot_index].current_weapon.iId = iId;
bots[bot_index].current_weapon.iClip = iClip;
// update the ammo counts for this weapon...
bots[bot_index].current_weapon.iAmmo1 =
bots[bot_index].m_rgAmmo[weapon_defs[iId].iAmmo1];
bots[bot_index].current_weapon.iAmmo2 =
bots[bot_index].m_rgAmmo[weapon_defs[iId].iAmmo2];
}
state = 0;
}
}
void BotClient_TFC_CurrentWeapon(void *p, int bot_index)
{
// this is just like the Valve Current Weapon message
BotClient_Valve_CurrentWeapon(p, bot_index);
}
void BotClient_CS_CurrentWeapon(void *p, int bot_index)
{
// this is just like the Valve Current Weapon message
BotClient_Valve_CurrentWeapon(p, bot_index);
}
void BotClient_Gearbox_CurrentWeapon(void *p, int bot_index)
{
// this is just like the Valve Current Weapon message
BotClient_Valve_CurrentWeapon(p, bot_index);
}
// This message is sent whenever ammo ammounts are adjusted (up or down).
void BotClient_Valve_AmmoX(void *p, int bot_index)
{
static int state = 0; // current state machine state
static int index;
static int ammount;
int ammo_index;
if (state == 0)
{
state++;
index = *(int *)p; // ammo index (for type of ammo)
}
else if (state == 1)
{
ammount = *(int *)p; // the ammount of ammo currently available
bots[bot_index].m_rgAmmo[index] = ammount; // store it away
ammo_index = bots[bot_index].current_weapon.iId;
// update the ammo counts for this weapon...
bots[bot_index].current_weapon.iAmmo1 =
bots[bot_index].m_rgAmmo[weapon_defs[ammo_index].iAmmo1];
bots[bot_index].current_weapon.iAmmo2 =
bots[bot_index].m_rgAmmo[weapon_defs[ammo_index].iAmmo2];
state = 0;
}
}
void BotClient_TFC_AmmoX(void *p, int bot_index)
{
// this is just like the Valve AmmoX message
BotClient_Valve_AmmoX(p, bot_index);
}
void BotClient_CS_AmmoX(void *p, int bot_index)
{
// this is just like the Valve AmmoX message
BotClient_Valve_AmmoX(p, bot_index);
}
void BotClient_Gearbox_AmmoX(void *p, int bot_index)
{
// this is just like the Valve AmmoX message
BotClient_Valve_AmmoX(p, bot_index);
}
// This message is sent when the bot picks up some ammo (AmmoX messages are
// also sent so this message is probably not really necessary except it
// allows the HUD to draw pictures of ammo that have been picked up. The
// bots don't really need pictures since they don't have any eyes anyway.
void BotClient_Valve_AmmoPickup(void *p, int bot_index)
{
static int state = 0; // current state machine state
static int index;
static int ammount;
int ammo_index;
if (state == 0)
{
state++;
index = *(int *)p;
}
else if (state == 1)
{
ammount = *(int *)p;
bots[bot_index].m_rgAmmo[index] = ammount;
ammo_index = bots[bot_index].current_weapon.iId;
// update the ammo counts for this weapon...
bots[bot_index].current_weapon.iAmmo1 =
bots[bot_index].m_rgAmmo[weapon_defs[ammo_index].iAmmo1];
bots[bot_index].current_weapon.iAmmo2 =
bots[bot_index].m_rgAmmo[weapon_defs[ammo_index].iAmmo2];
state = 0;
}
}
void BotClient_TFC_AmmoPickup(void *p, int bot_index)
{
// this is just like the Valve Ammo Pickup message
BotClient_Valve_AmmoPickup(p, bot_index);
}
void BotClient_CS_AmmoPickup(void *p, int bot_index)
{
// this is just like the Valve Ammo Pickup message
BotClient_Valve_AmmoPickup(p, bot_index);
}
void BotClient_Gearbox_AmmoPickup(void *p, int bot_index)
{
// this is just like the Valve Ammo Pickup message
BotClient_Valve_AmmoPickup(p, bot_index);
}
// This message gets sent when the bot picks up a weapon.
void BotClient_Valve_WeaponPickup(void *p, int bot_index)
{
}
void BotClient_TFC_WeaponPickup(void *p, int bot_index)
{
// this is just like the Valve Weapon Pickup message
BotClient_Valve_WeaponPickup(p, bot_index);
}
void BotClient_CS_WeaponPickup(void *p, int bot_index)
{
// this is just like the Valve Weapon Pickup message
BotClient_Valve_WeaponPickup(p, bot_index);
}
void BotClient_Gearbox_WeaponPickup(void *p, int bot_index)
{
// this is just like the Valve Weapon Pickup message
BotClient_Valve_WeaponPickup(p, bot_index);
}
// This message gets sent when the bot picks up an item (like a battery
// or a healthkit)
void BotClient_Valve_ItemPickup(void *p, int bot_index)
{
}
void BotClient_TFC_ItemPickup(void *p, int bot_index)
{
// this is just like the Valve Item Pickup message
BotClient_Valve_ItemPickup(p, bot_index);
}
void BotClient_CS_ItemPickup(void *p, int bot_index)
{
// this is just like the Valve Item Pickup message
BotClient_Valve_ItemPickup(p, bot_index);
}
void BotClient_Gearbox_ItemPickup(void *p, int bot_index)
{
// this is just like the Valve Item Pickup message
BotClient_Valve_ItemPickup(p, bot_index);
}
// This message gets sent when the bots health changes.
void BotClient_Valve_Health(void *p, int bot_index)
{
bots[bot_index].bot_health = *(int *)p; // health ammount
}
void BotClient_TFC_Health(void *p, int bot_index)
{
// this is just like the Valve Health message
BotClient_Valve_Health(p, bot_index);
}
void BotClient_CS_Health(void *p, int bot_index)
{
// this is just like the Valve Health message
BotClient_Valve_Health(p, bot_index);
}
void BotClient_Gearbox_Health(void *p, int bot_index)
{
// this is just like the Valve Health message
BotClient_Valve_Health(p, bot_index);
}
// This message gets sent when the bots armor changes.
void BotClient_Valve_Battery(void *p, int bot_index)
{
bots[bot_index].bot_armor = *(int *)p; // armor ammount
}
void BotClient_TFC_Battery(void *p, int bot_index)
{
// this is just like the Valve Battery message
BotClient_Valve_Battery(p, bot_index);
}
void BotClient_CS_Battery(void *p, int bot_index)
{
// this is just like the Valve Battery message
BotClient_Valve_Battery(p, bot_index);
}
void BotClient_Gearbox_Battery(void *p, int bot_index)
{
// this is just like the Valve Battery message
BotClient_Valve_Battery(p, bot_index);
}
// This message gets sent when the bots are getting damaged.
void BotClient_Valve_Damage(void *p, int bot_index)
{
static int state = 0; // current state machine state
static int damage_armor;
static int damage_taken;
static int damage_bits; // type of damage being done
static Vector damage_origin;
if (state == 0)
{
state++;
damage_armor = *(int *)p;
}
else if (state == 1)
{
state++;
damage_taken = *(int *)p;
}
else if (state == 2)
{
state++;
damage_bits = *(int *)p;
}
else if (state == 3)
{
state++;
damage_origin.x = *(float *)p;
}
else if (state == 4)
{
state++;
damage_origin.y = *(float *)p;
}
else if (state == 5)
{
damage_origin.z = *(float *)p;
if ((damage_armor > 0) || (damage_taken > 0))
{
// ignore certain types of damage...
if (damage_bits & IGNORE_DAMAGE)
return;
// if the bot doesn't have an enemy and someone is shooting at it then
// turn in the attacker's direction...
if (bots[bot_index].pBotEnemy == NULL)
{
// face the attacker...
Vector v_enemy = damage_origin - bots[bot_index].pEdict->v.origin;
Vector bot_angles = UTIL_VecToAngles( v_enemy );
bots[bot_index].pEdict->v.ideal_yaw = bot_angles.y;
BotFixIdealYaw(bots[bot_index].pEdict);
}
}
state = 0;
}
}
void BotClient_TFC_Damage(void *p, int bot_index)
{
// this is just like the Valve Battery message
BotClient_Valve_Damage(p, bot_index);
}
void BotClient_CS_Damage(void *p, int bot_index)
{
// this is just like the Valve Battery message
BotClient_Valve_Damage(p, bot_index);
}
void BotClient_Gearbox_Damage(void *p, int bot_index)
{
// this is just like the Valve Battery message
BotClient_Valve_Damage(p, bot_index);
}
// This message gets sent when the bots money ammount changes (for CS)
void BotClient_CS_Money(void *p, int bot_index)
{
static int state = 0; // current state machine state
if (state == 0)
{
state++;
bots[bot_index].bot_money = *(int *)p; // amount of money
}
else
{
state = 0; // ingore this field
}
}
| [
"weimingzhi@baidu.com"
] | weimingzhi@baidu.com |
d187a5bed8df5ff2b9c992e0ee78e127dbc3dd31 | 7eaf54a78c9e2117247cb2ab6d3a0c20719ba700 | /SOFTWARE/A64-TERES/linux-a64/tools/gator/daemon/ExternalSource.h | 919e75e8a41af34d8935d8b58e3d6395602f87b6 | [
"Linux-syscall-note",
"GPL-2.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | OLIMEX/DIY-LAPTOP | ae82f4ee79c641d9aee444db9a75f3f6709afa92 | a3fafd1309135650bab27f5eafc0c32bc3ca74ee | refs/heads/rel3 | 2023-08-04T01:54:19.483792 | 2023-04-03T07:18:12 | 2023-04-03T07:18:12 | 80,094,055 | 507 | 92 | Apache-2.0 | 2023-04-03T07:05:59 | 2017-01-26T07:25:50 | C | UTF-8 | C++ | false | false | 1,212 | h | /**
* Copyright (C) ARM Limited 2010-2014. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef EXTERNALSOURCE_H
#define EXTERNALSOURCE_H
#include <semaphore.h>
#include "Buffer.h"
#include "Monitor.h"
#include "OlySocket.h"
#include "Source.h"
// Counters from external sources like graphics drivers and annotations
class ExternalSource : public Source {
public:
ExternalSource(sem_t *senderSem);
~ExternalSource();
bool prepare();
void run();
void interrupt();
bool isDone();
void write(Sender *sender);
private:
void waitFor(const int bytes);
void configureConnection(const int fd, const char *const handshake, size_t size);
bool connectMali();
bool connectMve();
sem_t mBufferSem;
Buffer mBuffer;
Monitor mMonitor;
OlyServerSocket mMveStartupUds;
OlyServerSocket mMaliStartupUds;
OlyServerSocket mAnnotate;
int mInterruptFd;
int mMaliUds;
int mMveUds;
// Intentionally unimplemented
ExternalSource(const ExternalSource &);
ExternalSource &operator=(const ExternalSource &);
};
#endif // EXTERNALSOURCE_H
| [
"gamishev@gmail.com"
] | gamishev@gmail.com |
54192b35735cc368179475591b8011c1a2b37f3c | f8aa2d3996aa3866101b1b680dff214efb1ead0d | /basicPrograme/function/difference_bn_date.cpp | 112c6d75f1b0ba0bd1d5664ece00e0be9802830d | [] | no_license | LokeshvarKr/cpp | 9590d9c0851667dd9aaacd16f37fc34acdefb6b7 | 6556e2b72aec2d0ebcabb84d542bf5b0e5670042 | refs/heads/master | 2022-04-30T21:01:13.341606 | 2022-04-09T18:12:39 | 2022-04-09T18:12:39 | 176,687,488 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 682 | cpp | #include<iostream>
using namespace std;
int main()
{
int d1,m1,y1,d2,m2,y2,d,m,y;
cout<<"Enter first and second date (first falls before second)"<<endl;
cout<<"Enter first date"<<endl;
cin>>d1>>m1>>y1;
cout<<"Enter second date"<<endl;
cin>>d2>>m2>>y2;
int is_leap=0;
if((y2%100!=0 && y2%4==0) || y2%400==0)
is_leap=1;
if(d2<d1)
{
if(m2==3)
{
if(is_leap)
d2=d2+29;
else
d2=d2+28;
}
else if(m2==5 || m2==7 || m2==10 || m2==12)
d2=d2+30;
else
d2=d2+31;
m2=m2-1;
}
if(m2<m1)
{
m2=m2+12;
y2=y2-1;
}
d=d2-d1;
m=m2-m1;
y=y2-y1;
cout<<"Difference is --- "<<"day---"<<d<<" | month---"<<m<<" | year---"<<y;
return 0;
}
| [
"lokeshvarszb@gmail.com"
] | lokeshvarszb@gmail.com |
125a6108c0f9e36c38b41edc47961421982c0f4e | f4e37c76b0fd36cf91a12a5d59e5a8d240214156 | /SuperClass/Base.inl | 0edb0459efcdd8080a7924ee2cde79db2e38657e | [] | no_license | cherleey/Vindictus | 53a1f4f70326310ef1486e3a350102d5222689c1 | e6d6a63c7cb2230d6152c54d41a01fb618191ebd | refs/heads/master | 2020-03-26T19:55:59.587337 | 2018-08-19T10:39:17 | 2018-08-19T10:39:17 | 145,293,679 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 298 | inl |
// unsigned long : 증가시키고 난 이후의 결과
unsigned long CBase::Add_Ref(void)
{
return ++m_dwRefCnt;
}
// unsigned long : 감소시키기 이전의 결과
unsigned long CBase::Release(void)
{
if(0 == m_dwRefCnt)
{
Free();
delete this;
return 0;
}
return m_dwRefCnt--;
} | [
"31400524+cherleey@users.noreply.github.com"
] | 31400524+cherleey@users.noreply.github.com |
6dba8d948edc8f9b097ec56d34196ad7db380c07 | ddd6539d24a45ab8d529cad73688212542b43e8b | /Sprite_Test/Direction2D.h | e9cfa8db6c24677eafe295bfa6d6b575d511e528 | [] | no_license | dele1251/SDL_Project | a8b9f1194c5954faa23f90dc0dcb6041c6075b05 | daeef8aab10707a31410ec476b65d8358f2a06e5 | refs/heads/master | 2021-01-21T15:19:10.264390 | 2017-05-21T00:50:41 | 2017-05-21T00:50:41 | 91,839,998 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,119 | h | //****************************************************************************
// File name: Direction2D.h
// Author: Doug Ryan
// Date: 1/13/2016
// Class: CS 250
// Assignment:SDL_MovingCircle
// Purpose: Represent a direction
//*****************************************************************************
#pragma once
#include <iostream>
using namespace std;
class Direction2D
{
public:
static const int NUMBER_OF_DIRECTIONS = 8;
static enum CompassDirection {
NORTH, NORTHEAST, EAST, SOUTHEAST,
SOUTH, NORTHWEST, WEST, SOUTHWEST
};
static const string CompassDirectionNames[];
Direction2D(CompassDirection = NORTH);
const Direction2D reflectOnSide() const;
const Direction2D reflectOnTop() const;
const Direction2D reflectOnBottom() const;
int getXMove() const;
int getYMove() const;
const CompassDirection getCompassDirection() const;
friend istream& operator>>(istream& in, Direction2D &cDir);
private:
CompassDirection mCompassDirection;
int mXMove;
int mYMove;
void setCompassDirection(string compassDir);
void setMoveByCompassDirection();
};
| [
"ernesto.deleon.1@gmail.com"
] | ernesto.deleon.1@gmail.com |
0040d35b432410ba5f761c1b8516317e57a90a51 | 1b315f2f82cc22b1caada7ae4d9e6770ee3a8ff5 | /src/DiskBufferReader.cpp | 56480df28ffe85b49c2a53de4c5d17ba2798b586 | [] | no_license | knightwh/gougou | 861b08989b9869ee3ec6414867178f2a75b0eea5 | 89b74da0f1e36bb58d3dfb41e4503a7b5e7824de | refs/heads/master | 2020-12-24T14:26:31.508012 | 2015-05-14T03:35:35 | 2015-05-14T03:35:35 | 31,428,725 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,139 | cpp | #include "DiskBufferReader.hpp"
#include "DAMreader.hpp"
#include <climits>
using namespace std;
DiskBufferReader::DiskBufferReader(DiskAsMemoryReader *theIOP,uint64_t beginP,uint64_t endP,int fileHandle,int offset) : theIO(theIOP),begin(beginP),end(endP),itemSize(theIOP->getItemSize())
{
usage = 0;
if(begin==ULLONG_MAX) //head buffer
{
buffer = (char*)mmap(0,end*itemSize,PROT_READ,MAP_SHARED,fileHandle,offset);
}
else
{
if(end<=begin)
{
cerr<<"incorrect offset!"<<endl;
return;
}
buffer = (char*)mmap(0,(end-begin)*itemSize,PROT_READ,MAP_SHARED,fileHandle,offset);
}
if(buffer == MAP_FAILED)
{
cerr<<"Could not mmap the buffer!"<<beginP<<" : "<<endP<<endl;
}
}
DiskItemReader* DiskBufferReader::localItem(uint64_t itemNum)
{
if(begin>end) // head buffer
{
if(itemNum<end)
{
usage++;
DiskItemReader* DI = new DiskItemReader(buffer+itemNum*itemSize,itemNum,this);
return DI;
}
else return NULL;
}
else
{
if(itemNum<end && itemNum>=begin)
{
usage++;
DiskItemReader* DI = new DiskItemReader(buffer+(itemNum-begin)*itemSize,itemNum,this);
return DI;
}
else return NULL;
}
}
bool DiskBufferReader::PutMultiItems(DiskMultiItemReader* DMI,uint64_t begin_num,unsigned item_num) {
if(begin>end) { // head buffer
if(begin_num + item_num <= end) {
usage++;
DMI->PutItems(this, buffer+itemSize*item_num, item_num);
return true;
} else {
cerr << "Locate multiple items failed at the buffer which is "<<begin<<" : "<<end<<endl;
return false;
}
} else {
if(begin_num >= begin && begin_num+item_num <= end) {
usage++;
DMI->PutItems(this, buffer+itemSize*(begin_num-begin), item_num);
return true;
} else {
cerr << "Locate multiple items failed at the buffer which is "<<begin<<" : "<<end<<endl;
return false;
}
}
}
void DiskBufferReader::freeUsage()
{
if(usage>1) usage--;
else
{
usage = 0;
if(begin!=ULLONG_MAX) theIO->freeBuffer(this);
}
}
DiskBufferReader::~DiskBufferReader()
{
if(begin==ULLONG_MAX) munmap(buffer,end*itemSize);
else munmap(buffer,(end-begin)*itemSize);
}
| [
"knightwha@gmail.com"
] | knightwha@gmail.com |
a3cf931a212d13c2c00c002a271d3f6909d27430 | c0472d749b96d43a551899bfbf4e5d61b2cadd46 | /OpenGL-Window-Manager-and-GUI-master/DVA222_Project/DVA222_Project/ImageBox.cpp | 7eaa7b2a12e225e4a062522f8fc8b5f0ab8ae7de | [] | no_license | jontelarsson94/OpenGL-Window-Manager-and-GUI | 3bb9323362b859bde8d8b6f4ac241a38323b3e7d | a1d76c1675c061beaedca1f3b5b852b7a6d13681 | refs/heads/master | 2021-01-12T16:56:17.476471 | 2016-10-20T13:40:42 | 2016-10-20T13:40:42 | 71,466,065 | 1 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 1,632 | cpp | #include "StdAfx.h"
#include "ImageBox.h"
#include "Graphix.h"
#include "glut.h"
using namespace std;
// This is just a sample code to show you how you can use different Event Handlers in your code
ImageBox::ImageBox()
{
hit = pressed = false;
}
ImageBox::ImageBox(int locX, int locY, int width, int height)
: UIControl(locX, locY, width, height)
{
hit = pressed = false;
}
ImageBox::~ImageBox()
{
delete normal;
delete hover;
delete press;
}
//This is called whenever the user moves the mouse around
void ImageBox::OnMouseMove(int button, int x, int y)
{
if (x>X && x < X + Width && y>Y && y < Y + Height)
hit = true;
else
{
pressed = hit = false;
}
}
//This is called whenever the application wants to redraw its contents. We have already set it to 30 fps. You cannot change that
void ImageBox::OnPaint()
{
/**if (pressed)
DrawBitmap(*press, 100, 100, 500, 500);
else if (hit)
DrawBitmap(*hover, 100, 100, 500, 500);
else
DrawBitmap(*normal, 100, 100, 500, 500);
**/
DrawBitmap(*normal, 0, 0, 100, 100);
}
//Is called once, when the object is being loaded
void ImageBox::OnLoaded()
{
//Only 24bit bmp files are supported
//Edit your bitmaps in MSPaint also remember that the width of the image MUST be a factor of 4 (be dividable by 4)
normal = new Bitmap("ButtonNorm.bmp");
}
//Is called when the user presses any of the mouse buttons down
void ImageBox::OnMouseDown(int button, int x, int y)
{
if (hit && button == MOUSE_LEFT)
pressed = true;
}
//Is called when the user releases any of the mouse buttons down
void ImageBox::OnMouseUp(int button, int x, int y)
{
pressed = false;
}
| [
"jonathan-larsson@outlook.com"
] | jonathan-larsson@outlook.com |
4c7d84881187403afedb78032bd478e89584cf6c | 37b1cc093229626cb58199379f39b6b1ec6f6fb0 | /src/core/NEON/kernels/arm_conv/depthwise/kernels/a64_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst/generic.cpp | fb533893a60c27916f5dd71b443254e29af224af | [
"MIT",
"LicenseRef-scancode-dco-1.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | ARM-software/ComputeLibrary | d4dfccb6a75b9f7bb79ae6c61b2338d519497211 | 874e0c7b3fe93a6764ecb2d8cfad924af19a9d25 | refs/heads/main | 2023-09-04T07:01:32.449866 | 2023-08-23T13:06:10 | 2023-08-23T13:06:10 | 84,570,214 | 2,706 | 810 | MIT | 2023-01-16T16:04:32 | 2017-03-10T14:51:43 | C++ | UTF-8 | C++ | false | false | 47,735 | cpp | /*
* Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* 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 "arm_gemm.hpp"
#include <cstddef>
#include <cstdint>
#if defined(__aarch64__)
namespace arm_conv {
namespace depthwise {
void a64_u8q_nhwc_3x3_s2_output2x2_mla_depthfirst_impl(
const unsigned int n_channels,
const uint8_t *const *const inptrs,
const uint8_t *const weights,
const int32_t *const bias,
const arm_gemm::Requantize32 &qp,
const int32_t *const requant_muls,
const int32_t *const requant_shifts,
uint8_t *const *const outptrs
)
{
struct Params
{
long unsigned int n_channels;
const void *weights;
const int32_t *bias;
const arm_gemm::Requantize32 *requant;
const int32_t *const requant_muls;
const int32_t *const requant_shifts;
uint8_t *const *const outptrs;
const uint8_t *inptrs[25];
Params(
long unsigned int n_channels,
const uint8_t *const *inptrs_raw,
const void *const weights,
const int32_t *const bias,
const arm_gemm::Requantize32 &qp,
const int32_t *const requant_muls,
const int32_t *const requant_shifts,
uint8_t *const *outptrs
) : n_channels(n_channels), weights(weights), bias(bias),
requant(&qp), requant_muls(requant_muls),
requant_shifts(requant_shifts), outptrs(outptrs)
{
inptrs[0] = inptrs_raw[12];
inptrs[1] = inptrs_raw[0];
inptrs[2] = inptrs_raw[1];
inptrs[3] = inptrs_raw[3];
inptrs[4] = inptrs_raw[4];
inptrs[5] = inptrs_raw[5];
inptrs[6] = inptrs_raw[6];
inptrs[7] = inptrs_raw[2];
inptrs[8] = inptrs_raw[8];
inptrs[9] = inptrs_raw[9];
inptrs[10] = inptrs_raw[7];
inptrs[11] = inptrs_raw[15];
inptrs[12] = inptrs_raw[10];
inptrs[13] = inptrs_raw[16];
inptrs[14] = inptrs_raw[11];
inptrs[15] = inptrs_raw[18];
inptrs[16] = inptrs_raw[13];
inptrs[17] = inptrs_raw[19];
inptrs[18] = inptrs_raw[20];
inptrs[19] = inptrs_raw[14];
inptrs[20] = inptrs_raw[21];
inptrs[21] = inptrs_raw[17];
inptrs[22] = inptrs_raw[23];
inptrs[23] = inptrs_raw[22];
inptrs[24] = inptrs_raw[24];
}
};
const Params params(n_channels, inptrs, weights, bias, qp,
requant_muls, requant_shifts, outptrs);
__asm__ __volatile__(
"ldr x7, [%x[params], %[offsetof_Params_n_channels]]\n"
"ldr x23, [%x[params], %[offsetof_Params_requant]]\n"
"lsr x8, x7, #0x3\n"
"add x20, x23, %[offsetof_Requantize32_a_offset]\n"
"ld1r { v6.16b }, [x20]\n"
"ldr x22, [%x[params], %[offsetof_Params_outptrs]]\n"
"add x21, x23, %[offsetof_Requantize32_b_offset]\n"
"add x20, x23, %[offsetof_Requantize32_c_offset]\n"
"ld1r { v15.16b }, [x21]\n"
"ld1r { v13.8h }, [x20]\n"
"add x21, x23, %[offsetof_Requantize32_minval]\n"
"add x20, x23, %[offsetof_Requantize32_maxval]\n"
"ld1r { v17.8h }, [x21]\n"
"ld1r { v24.8h }, [x20]\n"
"mov x17, #0x0\n"
"mov x16, #0x0\n"
"add x15, %x[params], %[offsetof_Params_inptrs]\n"
"ldr x14, [%x[params], %[offsetof_Params_weights]]\n"
"ldr x13, [%x[params], %[offsetof_Params_requant_muls]]\n"
"ldr x12, [%x[params], %[offsetof_Params_requant_shifts]]\n"
"ldp x11, x10, [x22, #0x0]\n"
"ldp x9, x28, [x22, #0x10]\n"
"cbz x8, 3f\n"
"ldr d11, [x14, #0x0]\n"
"ldr d22, [x14, #0x8]\n"
"subs x8, x8, #0x1\n"
"usubl v11.8h, v11.8b, v15.8b\n"
"ldr d14, [x14, #0x10]\n"
"ldr d28, [x14, #0x18]\n"
"usubl v22.8h, v22.8b, v15.8b\n"
"usubl v14.8h, v14.8b, v15.8b\n"
"ldr d18, [x14, #0x20]\n"
"ldr d9, [x14, #0x28]\n"
"usubl v28.8h, v28.8b, v15.8b\n"
"usubl v18.8h, v18.8b, v15.8b\n"
"ldr d26, [x14, #0x30]\n"
"ldr d7, [x14, #0x38]\n"
"usubl v9.8h, v9.8b, v15.8b\n"
"usubl v26.8h, v26.8b, v15.8b\n"
"ldr d4, [x14, #0x40]\n"
"ldr x20, [%x[params], %[offsetof_Params_bias]]\n"
"usubl v7.8h, v7.8b, v15.8b\n"
"usubl v4.8h, v4.8b, v15.8b\n"
"ldr q5, [x20, #0x0]\n"
"ldr q3, [x20, #0x10]\n"
"add x20, x20, #0x20\n"
"str x20, [%x[params], %[offsetof_Params_bias]]\n"
"ldp x27, x26, [x15, #0x0]\n"
"ldp x25, x24, [x15, #0x10]\n"
"mov v21.16b, v5.16b\n"
"mov v8.16b, v3.16b\n"
"ldp x23, x22, [x15, #0x20]\n"
"ldp x21, x20, [x15, #0x30]\n"
"mov v20.16b, v5.16b\n"
"mov v0.16b, v3.16b\n"
"ldr d25, [x27, x17]\n"
"ldr d27, [x26, x17]\n"
"mov v19.16b, v5.16b\n"
"mov v31.16b, v3.16b\n"
"ldr d1, [x25, x17]\n"
"ldr d2, [x24, x17]\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"ldr d12, [x23, x17]\n"
"ldr d16, [x22, x17]\n"
"usubl v1.8h, v1.8b, v6.8b\n"
"usubl v2.8h, v2.8b, v6.8b\n"
"ldr d23, [x21, x17]\n"
"ldr d10, [x20, x17]\n"
"usubl v12.8h, v12.8b, v6.8b\n"
"usubl v16.8h, v16.8b, v6.8b\n"
"usubl v23.8h, v23.8b, v6.8b\n"
"usubl v10.8h, v10.8b, v6.8b\n"
"beq 2f\n"
"1:" // Loop
"ldr q30, [x13, #0x0]\n"
"ldr q29, [x12, #0x0]\n"
"smlal v5.4s, v25.4h, v4.4h\n"
"smlal2 v3.4s, v25.8h, v4.8h\n"
"ldr x21, [x15, #0x58]\n"
"ldr x20, [x15, #0x78]\n"
"smlal v5.4s, v27.4h, v11.4h\n"
"smlal v21.4s, v25.4h, v26.4h\n"
"ldr x25, [x15, #0x60]\n"
"ldr x24, [x15, #0x80]\n"
"smlal v20.4s, v25.4h, v14.4h\n"
"smlal v19.4s, v25.4h, v11.4h\n"
"smlal2 v3.4s, v27.8h, v11.8h\n"
"ldr d27, [x21, x17]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"smlal v5.4s, v1.4h, v22.4h\n"
"smlal2 v8.4s, v25.8h, v26.8h\n"
"smlal2 v0.4s, v25.8h, v14.8h\n"
"ldr x23, [x15, #0x68]\n"
"ldr x22, [x15, #0x88]\n"
"smlal2 v31.4s, v25.8h, v11.8h\n"
"ldr d25, [x20, x17]\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"smlal v21.4s, v2.4h, v22.4h\n"
"smlal v20.4s, v27.4h, v28.4h\n"
"smlal v19.4s, v25.4h, v18.4h\n"
"ldr x21, [x15, #0x40]\n"
"ldr x20, [x15, #0x70]\n"
"smlal2 v3.4s, v1.8h, v22.8h\n"
"ldr d1, [x25, x17]\n"
"usubl v1.8h, v1.8b, v6.8b\n"
"smlal v5.4s, v16.4h, v28.4h\n"
"smlal2 v8.4s, v2.8h, v22.8h\n"
"ldr d2, [x24, x17]\n"
"usubl v2.8h, v2.8b, v6.8b\n"
"smlal2 v0.4s, v27.8h, v28.8h\n"
"ldr d27, [x23, x17]\n"
"smlal2 v31.4s, v25.8h, v18.8h\n"
"ldr d25, [x22, x17]\n"
"smlal v21.4s, v12.4h, v14.4h\n"
"ldr x25, [x15, #0x98]\n"
"smlal v20.4s, v1.4h, v11.4h\n"
"smlal v19.4s, v2.4h, v22.4h\n"
"ldr x24, [x15, #0x50]\n"
"smlal2 v3.4s, v16.8h, v28.8h\n"
"ldr d16, [x21, x17]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"smlal v5.4s, v23.4h, v18.4h\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"smlal2 v8.4s, v12.8h, v14.8h\n"
"ldr d12, [x20, x17]\n"
"ldr x23, [x15, #0x48]\n"
"smlal2 v0.4s, v1.8h, v11.8h\n"
"smlal2 v31.4s, v2.8h, v22.8h\n"
"ldr x21, [x15, #0x90]\n"
"ldr x20, [x15, #0xa8]\n"
"smlal v21.4s, v10.4h, v11.4h\n"
"smlal v20.4s, v27.4h, v18.4h\n"
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x22, [x15, #0xa0]\n"
"smlal v19.4s, v25.4h, v9.4h\n"
"smlal2 v3.4s, v23.8h, v18.8h\n"
"ldr d23, [x25, x17]\n"
"usubl v12.8h, v12.8b, v6.8b\n"
"usubl v23.8h, v23.8b, v6.8b\n"
"smlal v5.4s, v10.4h, v14.4h\n"
"smlal2 v8.4s, v10.8h, v11.8h\n"
"ldr d11, [x24, x17]\n"
"usubl v11.8h, v11.8b, v6.8b\n"
"smlal2 v0.4s, v27.8h, v18.8h\n"
"ldr d27, [x23, x17]\n"
"smlal2 v31.4s, v25.8h, v9.8h\n"
"ldr d25, [x21, x17]\n"
"ldr x21, [x15, #0xb0]\n"
"smlal v21.4s, v16.4h, v18.4h\n"
"smlal v20.4s, v12.4h, v22.4h\n"
"smlal v19.4s, v23.4h, v14.4h\n"
"smlal2 v3.4s, v10.8h, v14.8h\n"
"ldr d10, [x20, x17]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"usubl v10.8h, v10.8b, v6.8b\n"
"smlal v5.4s, v11.4h, v9.4h\n"
"ldr x20, [x15, #0xb8]\n"
"smlal2 v8.4s, v16.8h, v18.8h\n"
"ldr d18, [x22, x17]\n"
"ldr d16, [x21, x17]\n"
"smlal2 v0.4s, v12.8h, v22.8h\n"
"ldr d22, [x20, x17]\n"
"smlal2 v31.4s, v23.8h, v14.8h\n"
"ldr q14, [x13, #0x10]\n"
"smlal v21.4s, v27.4h, v9.4h\n"
"smlal v20.4s, v25.4h, v26.4h\n"
"smlal v19.4s, v10.4h, v28.4h\n"
"usubl v18.8h, v18.8b, v6.8b\n"
"ldr x21, [x15, #0xc0]\n"
"smlal2 v3.4s, v11.8h, v9.8h\n"
"usubl v16.8h, v16.8b, v6.8b\n"
"smlal v5.4s, v1.4h, v26.4h\n"
"ldr x20, [%x[params], %[offsetof_Params_bias]]\n"
"smlal2 v8.4s, v27.8h, v9.8h\n"
"ldr d27, [x21, x17]\n"
"smlal2 v0.4s, v25.8h, v26.8h\n"
"ldr q25, [x12, #0x10]\n"
"smlal2 v31.4s, v10.8h, v28.8h\n"
"smlal v21.4s, v11.4h, v28.4h\n"
"usubl v22.8h, v22.8b, v6.8b\n"
"add x14, x14, #0x48\n"
"smlal v20.4s, v18.4h, v7.4h\n"
"smlal v19.4s, v16.4h, v7.4h\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"add x17, x17, #0x8\n"
"smlal2 v3.4s, v1.8h, v26.8h\n"
"smlal v5.4s, v12.4h, v7.4h\n"
"sqrdmulh v5.4s, v5.4s, v30.4s\n"
"subs x8, x8, #0x1\n"
"smlal2 v8.4s, v11.8h, v28.8h\n"
"smlal2 v0.4s, v18.8h, v7.8h\n"
"and v28.16b, v5.16b, v29.16b\n"
"add x13, x13, #0x20\n"
"smlal2 v31.4s, v16.8h, v7.8h\n"
"smlal v21.4s, v2.4h, v7.4h\n"
"sshr v28.4s, v28.4s, #0x1f\n"
"add x12, x12, #0x20\n"
"smlal v20.4s, v10.4h, v9.4h\n"
"smlal v19.4s, v22.4h, v26.4h\n"
"sqadd v5.4s, v5.4s, v28.4s\n"
"smlal2 v3.4s, v12.8h, v7.8h\n"
"smlal2 v8.4s, v2.8h, v7.8h\n"
"sqrdmulh v3.4s, v3.4s, v14.4s\n"
"smlal2 v0.4s, v10.8h, v9.8h\n"
"smlal2 v31.4s, v22.8h, v26.8h\n"
"and v16.16b, v3.16b, v25.16b\n"
"smlal v21.4s, v23.4h, v4.4h\n"
"smlal v20.4s, v22.4h, v4.4h\n"
"sqrdmulh v21.4s, v21.4s, v30.4s\n"
"smlal v19.4s, v27.4h, v4.4h\n"
"smlal2 v8.4s, v23.8h, v4.8h\n"
"sqrdmulh v20.4s, v20.4s, v30.4s\n"
"smlal2 v0.4s, v22.8h, v4.8h\n"
"smlal2 v31.4s, v27.8h, v4.8h\n"
"sqrdmulh v19.4s, v19.4s, v30.4s\n"
"sshr v16.4s, v16.4s, #0x1f\n"
"and v12.16b, v21.16b, v29.16b\n"
"sqrdmulh v8.4s, v8.4s, v14.4s\n"
"and v23.16b, v20.16b, v29.16b\n"
"sqrdmulh v0.4s, v0.4s, v14.4s\n"
"and v9.16b, v19.16b, v29.16b\n"
"sqrdmulh v31.4s, v31.4s, v14.4s\n"
"sqadd v3.4s, v3.4s, v16.4s\n"
"sshr v12.4s, v12.4s, #0x1f\n"
"and v18.16b, v8.16b, v25.16b\n"
"sshr v23.4s, v23.4s, #0x1f\n"
"and v22.16b, v0.16b, v25.16b\n"
"sshr v9.4s, v9.4s, #0x1f\n"
"and v16.16b, v31.16b, v25.16b\n"
"sqadd v21.4s, v21.4s, v12.4s\n"
"sshr v18.4s, v18.4s, #0x1f\n"
"sqadd v20.4s, v20.4s, v23.4s\n"
"sshr v22.4s, v22.4s, #0x1f\n"
"sqadd v19.4s, v19.4s, v9.4s\n"
"sshr v16.4s, v16.4s, #0x1f\n"
"srshl v5.4s, v5.4s, v29.4s\n"
"srshl v21.4s, v21.4s, v29.4s\n"
"sqadd v8.4s, v8.4s, v18.4s\n"
"srshl v20.4s, v20.4s, v29.4s\n"
"sqadd v0.4s, v0.4s, v22.4s\n"
"srshl v19.4s, v19.4s, v29.4s\n"
"sqadd v31.4s, v31.4s, v16.4s\n"
"srshl v3.4s, v3.4s, v25.4s\n"
"sqxtn v5.4h, v5.4s\n"
"srshl v8.4s, v8.4s, v25.4s\n"
"sqxtn v21.4h, v21.4s\n"
"srshl v0.4s, v0.4s, v25.4s\n"
"sqxtn v20.4h, v20.4s\n"
"srshl v31.4s, v31.4s, v25.4s\n"
"sqxtn v19.4h, v19.4s\n"
"sqxtn2 v5.8h, v3.4s\n"
"sqxtn2 v21.8h, v8.4s\n"
"sqxtn2 v20.8h, v0.4s\n"
"sqxtn2 v19.8h, v31.4s\n"
"sqadd v5.8h, v5.8h, v13.8h\n"
"sqadd v21.8h, v21.8h, v13.8h\n"
"sqadd v20.8h, v20.8h, v13.8h\n"
"sqadd v19.8h, v19.8h, v13.8h\n"
"smax v5.8h, v5.8h, v17.8h\n"
"smax v21.8h, v21.8h, v17.8h\n"
"smax v20.8h, v20.8h, v17.8h\n"
"smax v19.8h, v19.8h, v17.8h\n"
"smin v5.8h, v5.8h, v24.8h\n"
"smin v21.8h, v21.8h, v24.8h\n"
"smin v20.8h, v20.8h, v24.8h\n"
"smin v19.8h, v19.8h, v24.8h\n"
"uzp1 v5.16b, v5.16b, v5.16b\n"
"str d5, [x11, x16]\n"
"uzp1 v21.16b, v21.16b, v21.16b\n"
"uzp1 v20.16b, v20.16b, v20.16b\n"
"str d21, [x10, x16]\n"
"uzp1 v19.16b, v19.16b, v19.16b\n"
"str d20, [x9, x16]\n"
"str d19, [x28, x16]\n"
"ldr q5, [x20, #0x0]\n"
"ldr q3, [x20, #0x10]\n"
"add x20, x20, #0x20\n"
"ldr d11, [x14, #0x0]\n"
"ldr d22, [x14, #0x8]\n"
"add x16, x16, #0x8\n"
"str x20, [%x[params], %[offsetof_Params_bias]]\n"
"ldr d14, [x14, #0x10]\n"
"ldr d28, [x14, #0x18]\n"
"mov v21.16b, v5.16b\n"
"mov v8.16b, v3.16b\n"
"ldr d18, [x14, #0x20]\n"
"ldr d9, [x14, #0x28]\n"
"mov v20.16b, v5.16b\n"
"mov v0.16b, v3.16b\n"
"ldr d26, [x14, #0x30]\n"
"ldr d7, [x14, #0x38]\n"
"mov v19.16b, v5.16b\n"
"mov v31.16b, v3.16b\n"
"ldr d4, [x14, #0x40]\n"
"ldp x27, x26, [x15, #0x0]\n"
"usubl v11.8h, v11.8b, v15.8b\n"
"usubl v22.8h, v22.8b, v15.8b\n"
"ldp x25, x24, [x15, #0x10]\n"
"ldp x23, x22, [x15, #0x20]\n"
"usubl v14.8h, v14.8b, v15.8b\n"
"usubl v28.8h, v28.8b, v15.8b\n"
"ldp x21, x20, [x15, #0x30]\n"
"ldr d25, [x27, x17]\n"
"usubl v18.8h, v18.8b, v15.8b\n"
"usubl v9.8h, v9.8b, v15.8b\n"
"ldr d27, [x26, x17]\n"
"ldr d1, [x25, x17]\n"
"usubl v26.8h, v26.8b, v15.8b\n"
"usubl v7.8h, v7.8b, v15.8b\n"
"ldr d2, [x24, x17]\n"
"ldr d12, [x23, x17]\n"
"usubl v4.8h, v4.8b, v15.8b\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"ldr d16, [x22, x17]\n"
"ldr d23, [x21, x17]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"usubl v1.8h, v1.8b, v6.8b\n"
"ldr d10, [x20, x17]\n"
"usubl v2.8h, v2.8b, v6.8b\n"
"usubl v12.8h, v12.8b, v6.8b\n"
"usubl v16.8h, v16.8b, v6.8b\n"
"usubl v23.8h, v23.8b, v6.8b\n"
"usubl v10.8h, v10.8b, v6.8b\n"
"bgt 1b\n"
"2:" // Tail
"ldr q29, [x13, #0x0]\n"
"ldr q30, [x12, #0x0]\n"
"smlal v5.4s, v25.4h, v4.4h\n"
"smlal2 v3.4s, v25.8h, v4.8h\n"
"ldr x21, [x15, #0x58]\n"
"ldr x20, [x15, #0x78]\n"
"smlal v5.4s, v27.4h, v11.4h\n"
"smlal v21.4s, v25.4h, v26.4h\n"
"ldr x25, [x15, #0x60]\n"
"ldr x24, [x15, #0x80]\n"
"smlal v20.4s, v25.4h, v14.4h\n"
"smlal v19.4s, v25.4h, v11.4h\n"
"smlal2 v3.4s, v27.8h, v11.8h\n"
"ldr d27, [x21, x17]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"smlal v5.4s, v1.4h, v22.4h\n"
"smlal2 v8.4s, v25.8h, v26.8h\n"
"smlal2 v0.4s, v25.8h, v14.8h\n"
"ldr x23, [x15, #0x68]\n"
"ldr x22, [x15, #0x88]\n"
"smlal2 v31.4s, v25.8h, v11.8h\n"
"ldr d25, [x20, x17]\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"smlal v21.4s, v2.4h, v22.4h\n"
"smlal v20.4s, v27.4h, v28.4h\n"
"smlal v19.4s, v25.4h, v18.4h\n"
"ldr x21, [x15, #0x40]\n"
"ldr x20, [x15, #0x70]\n"
"smlal2 v3.4s, v1.8h, v22.8h\n"
"ldr d1, [x25, x17]\n"
"usubl v1.8h, v1.8b, v6.8b\n"
"smlal v5.4s, v16.4h, v28.4h\n"
"smlal2 v8.4s, v2.8h, v22.8h\n"
"ldr d2, [x24, x17]\n"
"usubl v2.8h, v2.8b, v6.8b\n"
"smlal2 v0.4s, v27.8h, v28.8h\n"
"ldr d27, [x23, x17]\n"
"smlal2 v31.4s, v25.8h, v18.8h\n"
"ldr d25, [x22, x17]\n"
"smlal v21.4s, v12.4h, v14.4h\n"
"ldr x25, [x15, #0x98]\n"
"smlal v20.4s, v1.4h, v11.4h\n"
"smlal v19.4s, v2.4h, v22.4h\n"
"ldr x24, [x15, #0x50]\n"
"smlal2 v3.4s, v16.8h, v28.8h\n"
"ldr d16, [x21, x17]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"smlal v5.4s, v23.4h, v18.4h\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"smlal2 v8.4s, v12.8h, v14.8h\n"
"ldr d12, [x20, x17]\n"
"ldr x23, [x15, #0x48]\n"
"smlal2 v0.4s, v1.8h, v11.8h\n"
"smlal2 v31.4s, v2.8h, v22.8h\n"
"ldr x21, [x15, #0x90]\n"
"ldr x20, [x15, #0xa8]\n"
"smlal v21.4s, v10.4h, v11.4h\n"
"smlal v20.4s, v27.4h, v18.4h\n"
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x22, [x15, #0xa0]\n"
"smlal v19.4s, v25.4h, v9.4h\n"
"smlal2 v3.4s, v23.8h, v18.8h\n"
"ldr d23, [x25, x17]\n"
"usubl v12.8h, v12.8b, v6.8b\n"
"usubl v23.8h, v23.8b, v6.8b\n"
"smlal v5.4s, v10.4h, v14.4h\n"
"smlal2 v8.4s, v10.8h, v11.8h\n"
"ldr d11, [x24, x17]\n"
"usubl v11.8h, v11.8b, v6.8b\n"
"smlal2 v0.4s, v27.8h, v18.8h\n"
"ldr d27, [x23, x17]\n"
"smlal2 v31.4s, v25.8h, v9.8h\n"
"ldr d25, [x21, x17]\n"
"ldr x21, [x15, #0xb0]\n"
"smlal v21.4s, v16.4h, v18.4h\n"
"smlal v20.4s, v12.4h, v22.4h\n"
"smlal v19.4s, v23.4h, v14.4h\n"
"smlal2 v3.4s, v10.8h, v14.8h\n"
"ldr d10, [x20, x17]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"usubl v25.8h, v25.8b, v6.8b\n"
"usubl v10.8h, v10.8b, v6.8b\n"
"smlal v5.4s, v11.4h, v9.4h\n"
"ldr x20, [x15, #0xb8]\n"
"smlal2 v8.4s, v16.8h, v18.8h\n"
"ldr d16, [x22, x17]\n"
"ldr d18, [x21, x17]\n"
"smlal2 v0.4s, v12.8h, v22.8h\n"
"ldr d22, [x20, x17]\n"
"smlal2 v31.4s, v23.8h, v14.8h\n"
"ldr q14, [x13, #0x10]\n"
"smlal v21.4s, v27.4h, v9.4h\n"
"smlal v20.4s, v25.4h, v26.4h\n"
"smlal v19.4s, v10.4h, v28.4h\n"
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0xc0]\n"
"smlal2 v3.4s, v11.8h, v9.8h\n"
"usubl v18.8h, v18.8b, v6.8b\n"
"smlal v5.4s, v1.4h, v26.4h\n"
"tst x7, #0x7\n"
"smlal2 v8.4s, v27.8h, v9.8h\n"
"ldr d27, [x20, x17]\n"
"smlal2 v0.4s, v25.8h, v26.8h\n"
"ldr q25, [x12, #0x10]\n"
"smlal2 v31.4s, v10.8h, v28.8h\n"
"smlal v21.4s, v11.4h, v28.4h\n"
"usubl v22.8h, v22.8b, v6.8b\n"
"add x17, x17, #0x8\n"
"smlal v20.4s, v16.4h, v7.4h\n"
"smlal v19.4s, v18.4h, v7.4h\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"add x13, x13, #0x20\n"
"smlal2 v3.4s, v1.8h, v26.8h\n"
"smlal v5.4s, v12.4h, v7.4h\n"
"sqrdmulh v5.4s, v5.4s, v29.4s\n"
"add x12, x12, #0x20\n"
"smlal2 v8.4s, v11.8h, v28.8h\n"
"smlal2 v0.4s, v16.8h, v7.8h\n"
"and v16.16b, v5.16b, v30.16b\n"
"smlal2 v31.4s, v18.8h, v7.8h\n"
"smlal v21.4s, v2.4h, v7.4h\n"
"sshr v16.4s, v16.4s, #0x1f\n"
"smlal v20.4s, v10.4h, v9.4h\n"
"smlal v19.4s, v22.4h, v26.4h\n"
"sqadd v5.4s, v5.4s, v16.4s\n"
"smlal2 v3.4s, v12.8h, v7.8h\n"
"smlal2 v8.4s, v2.8h, v7.8h\n"
"sqrdmulh v3.4s, v3.4s, v14.4s\n"
"smlal2 v0.4s, v10.8h, v9.8h\n"
"smlal2 v31.4s, v22.8h, v26.8h\n"
"and v16.16b, v3.16b, v25.16b\n"
"smlal v21.4s, v23.4h, v4.4h\n"
"smlal v20.4s, v22.4h, v4.4h\n"
"sqrdmulh v21.4s, v21.4s, v29.4s\n"
"smlal v19.4s, v27.4h, v4.4h\n"
"smlal2 v8.4s, v23.8h, v4.8h\n"
"sqrdmulh v20.4s, v20.4s, v29.4s\n"
"smlal2 v0.4s, v22.8h, v4.8h\n"
"smlal2 v31.4s, v27.8h, v4.8h\n"
"sqrdmulh v19.4s, v19.4s, v29.4s\n"
"sshr v16.4s, v16.4s, #0x1f\n"
"and v23.16b, v21.16b, v30.16b\n"
"sqrdmulh v8.4s, v8.4s, v14.4s\n"
"and v27.16b, v20.16b, v30.16b\n"
"sqrdmulh v0.4s, v0.4s, v14.4s\n"
"and v22.16b, v19.16b, v30.16b\n"
"sqrdmulh v31.4s, v31.4s, v14.4s\n"
"sqadd v3.4s, v3.4s, v16.4s\n"
"sshr v23.4s, v23.4s, #0x1f\n"
"and v14.16b, v8.16b, v25.16b\n"
"sshr v27.4s, v27.4s, #0x1f\n"
"and v18.16b, v0.16b, v25.16b\n"
"sshr v22.4s, v22.4s, #0x1f\n"
"and v16.16b, v31.16b, v25.16b\n"
"sqadd v21.4s, v21.4s, v23.4s\n"
"sshr v14.4s, v14.4s, #0x1f\n"
"sqadd v20.4s, v20.4s, v27.4s\n"
"sshr v18.4s, v18.4s, #0x1f\n"
"sqadd v19.4s, v19.4s, v22.4s\n"
"sshr v16.4s, v16.4s, #0x1f\n"
"srshl v5.4s, v5.4s, v30.4s\n"
"srshl v21.4s, v21.4s, v30.4s\n"
"sqadd v8.4s, v8.4s, v14.4s\n"
"srshl v20.4s, v20.4s, v30.4s\n"
"sqadd v0.4s, v0.4s, v18.4s\n"
"srshl v19.4s, v19.4s, v30.4s\n"
"sqadd v31.4s, v31.4s, v16.4s\n"
"srshl v3.4s, v3.4s, v25.4s\n"
"sqxtn v5.4h, v5.4s\n"
"srshl v8.4s, v8.4s, v25.4s\n"
"sqxtn v21.4h, v21.4s\n"
"srshl v0.4s, v0.4s, v25.4s\n"
"sqxtn v20.4h, v20.4s\n"
"srshl v31.4s, v31.4s, v25.4s\n"
"sqxtn v19.4h, v19.4s\n"
"sqxtn2 v5.8h, v3.4s\n"
"sqxtn2 v21.8h, v8.4s\n"
"sqxtn2 v20.8h, v0.4s\n"
"sqxtn2 v19.8h, v31.4s\n"
"sqadd v5.8h, v5.8h, v13.8h\n"
"sqadd v21.8h, v21.8h, v13.8h\n"
"sqadd v20.8h, v20.8h, v13.8h\n"
"sqadd v19.8h, v19.8h, v13.8h\n"
"smax v5.8h, v5.8h, v17.8h\n"
"smax v21.8h, v21.8h, v17.8h\n"
"smax v20.8h, v20.8h, v17.8h\n"
"smax v19.8h, v19.8h, v17.8h\n"
"smin v5.8h, v5.8h, v24.8h\n"
"smin v21.8h, v21.8h, v24.8h\n"
"smin v20.8h, v20.8h, v24.8h\n"
"smin v19.8h, v19.8h, v24.8h\n"
"uzp1 v5.16b, v5.16b, v5.16b\n"
"str d5, [x11, x16]\n"
"uzp1 v21.16b, v21.16b, v21.16b\n"
"uzp1 v20.16b, v20.16b, v20.16b\n"
"str d21, [x10, x16]\n"
"uzp1 v19.16b, v19.16b, v19.16b\n"
"str d20, [x9, x16]\n"
"str d19, [x28, x16]\n"
"add x16, x16, #0x8\n"
"beq 88f\n"
"add x14, x14, #0x48\n"
"3:" // Oddments
"ldr x20, [%x[params], %[offsetof_Params_bias]]\n"
"tbz x7, #2, 5f\n"
"ld1 { v5.4s }, [x20], #0x10\n"
"tbz x7, #1, 4f\n"
"ld1 { v3.d }[0], [x20], #0x8\n"
"tbz x7, #0, 7f\n"
"ld1 { v3.s }[2], [x20]\n"
"b 7f\n"
"4:" // Oddments: Load bias: Bit 2: Bit 1: Unset
"tbz x7, #0, 7f\n"
"ld1 { v3.s }[0], [x20]\n"
"b 7f\n"
"5:" // Oddments: Load bias: Bit 2: Unset
"tbz x7, #1, 6f\n"
"ld1 { v5.d }[0], [x20], #0x8\n"
"tbz x7, #0, 7f\n"
"ld1 { v5.s }[2], [x20]\n"
"b 7f\n"
"6:" // Oddments: Load bias: Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 7f\n"
"ld1 { v5.s }[0], [x20]\n"
"7:" // Oddments: Load bias: Bit 2: End
"ldr d11, [x14, #0x0]\n"
"ldr d22, [x14, #0x8]\n"
"mov v21.16b, v5.16b\n"
"mov v8.16b, v3.16b\n"
"ldr d14, [x14, #0x10]\n"
"ldr d28, [x14, #0x18]\n"
"mov v20.16b, v5.16b\n"
"mov v0.16b, v3.16b\n"
"ldr d18, [x14, #0x20]\n"
"ldr d9, [x14, #0x28]\n"
"mov v19.16b, v5.16b\n"
"mov v31.16b, v3.16b\n"
"ldr d26, [x14, #0x30]\n"
"ldr d7, [x14, #0x38]\n"
"usubl v11.8h, v11.8b, v15.8b\n"
"usubl v22.8h, v22.8b, v15.8b\n"
"ldr d4, [x14, #0x40]\n"
"ldp x27, x26, [x15, #0x0]\n"
"usubl v14.8h, v14.8b, v15.8b\n"
"usubl v28.8h, v28.8b, v15.8b\n"
"ldp x25, x24, [x15, #0x10]\n"
"ldp x23, x22, [x15, #0x20]\n"
"usubl v18.8h, v18.8b, v15.8b\n"
"usubl v9.8h, v9.8b, v15.8b\n"
"ldp x21, x20, [x15, #0x30]\n"
"usubl v26.8h, v26.8b, v15.8b\n"
"usubl v7.8h, v7.8b, v15.8b\n"
"usubl v4.8h, v4.8b, v15.8b\n"
"add x27, x27, x17\n"
"add x26, x26, x17\n"
"add x25, x25, x17\n"
"add x24, x24, x17\n"
"add x23, x23, x17\n"
"add x22, x22, x17\n"
"add x21, x21, x17\n"
"add x20, x20, x17\n"
"tbz x7, #2, 9f\n"
"ld1 { v25.s }[0], [x27], #0x4\n"
"ld1 { v27.s }[0], [x26], #0x4\n"
"ld1 { v1.s }[0], [x25], #0x4\n"
"ld1 { v2.s }[0], [x24], #0x4\n"
"ld1 { v12.s }[0], [x23], #0x4\n"
"ld1 { v16.s }[0], [x22], #0x4\n"
"ld1 { v23.s }[0], [x21], #0x4\n"
"ld1 { v10.s }[0], [x20], #0x4\n"
"tbz x7, #1, 8f\n"
"ld1 { v25.h }[2], [x27], #0x2\n"
"ld1 { v27.h }[2], [x26], #0x2\n"
"ld1 { v1.h }[2], [x25], #0x2\n"
"ld1 { v2.h }[2], [x24], #0x2\n"
"ld1 { v12.h }[2], [x23], #0x2\n"
"ld1 { v16.h }[2], [x22], #0x2\n"
"ld1 { v23.h }[2], [x21], #0x2\n"
"ld1 { v10.h }[2], [x20], #0x2\n"
"tbz x7, #0, 11f\n"
"ld1 { v25.b }[6], [x27]\n"
"ld1 { v27.b }[6], [x26]\n"
"ld1 { v1.b }[6], [x25]\n"
"ld1 { v2.b }[6], [x24]\n"
"ld1 { v12.b }[6], [x23]\n"
"ld1 { v16.b }[6], [x22]\n"
"ld1 { v23.b }[6], [x21]\n"
"ld1 { v10.b }[6], [x20]\n"
"b 11f\n"
"8:" // Oddments: Initial loads: Bit 2: Bit 1: Unset
"tbz x7, #0, 11f\n"
"ld1 { v25.b }[4], [x27]\n"
"ld1 { v27.b }[4], [x26]\n"
"ld1 { v1.b }[4], [x25]\n"
"ld1 { v2.b }[4], [x24]\n"
"ld1 { v12.b }[4], [x23]\n"
"ld1 { v16.b }[4], [x22]\n"
"ld1 { v23.b }[4], [x21]\n"
"ld1 { v10.b }[4], [x20]\n"
"b 11f\n"
"9:" // Oddments: Initial loads: Bit 2: Unset
"tbz x7, #1, 10f\n"
"ld1 { v25.h }[0], [x27], #0x2\n"
"ld1 { v27.h }[0], [x26], #0x2\n"
"ld1 { v1.h }[0], [x25], #0x2\n"
"ld1 { v2.h }[0], [x24], #0x2\n"
"ld1 { v12.h }[0], [x23], #0x2\n"
"ld1 { v16.h }[0], [x22], #0x2\n"
"ld1 { v23.h }[0], [x21], #0x2\n"
"ld1 { v10.h }[0], [x20], #0x2\n"
"tbz x7, #0, 11f\n"
"ld1 { v25.b }[2], [x27]\n"
"ld1 { v27.b }[2], [x26]\n"
"ld1 { v1.b }[2], [x25]\n"
"ld1 { v2.b }[2], [x24]\n"
"ld1 { v12.b }[2], [x23]\n"
"ld1 { v16.b }[2], [x22]\n"
"ld1 { v23.b }[2], [x21]\n"
"ld1 { v10.b }[2], [x20]\n"
"b 11f\n"
"10:" // Oddments: Initial loads: Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 11f\n"
"ld1 { v25.b }[0], [x27]\n"
"ld1 { v27.b }[0], [x26]\n"
"ld1 { v1.b }[0], [x25]\n"
"ld1 { v2.b }[0], [x24]\n"
"ld1 { v12.b }[0], [x23]\n"
"ld1 { v16.b }[0], [x22]\n"
"ld1 { v23.b }[0], [x21]\n"
"ld1 { v10.b }[0], [x20]\n"
"11:" // Oddments: Initial loads: Bit 2: End
"usubl v25.8h, v25.8b, v6.8b\n"
"smlal v5.4s, v25.4h, v4.4h\n"
"smlal2 v3.4s, v25.8h, v4.8h\n"
"ldr x20, [x15, #0x40]\n"
"usubl v27.8h, v27.8b, v6.8b\n"
"smlal v5.4s, v27.4h, v11.4h\n"
"smlal2 v3.4s, v27.8h, v11.8h\n"
"usubl v1.8h, v1.8b, v6.8b\n"
"smlal v21.4s, v25.4h, v26.4h\n"
"smlal2 v8.4s, v25.8h, v26.8h\n"
"add x20, x20, x17\n"
"smlal v5.4s, v1.4h, v22.4h\n"
"smlal2 v3.4s, v1.8h, v22.8h\n"
"usubl v2.8h, v2.8b, v6.8b\n"
"usubl v16.8h, v16.8b, v6.8b\n"
"smlal v21.4s, v2.4h, v22.4h\n"
"smlal2 v8.4s, v2.8h, v22.8h\n"
"smlal v5.4s, v16.4h, v28.4h\n"
"smlal2 v3.4s, v16.8h, v28.8h\n"
"usubl v12.8h, v12.8b, v6.8b\n"
"usubl v23.8h, v23.8b, v6.8b\n"
"smlal v21.4s, v12.4h, v14.4h\n"
"smlal2 v8.4s, v12.8h, v14.8h\n"
"smlal v5.4s, v23.4h, v18.4h\n"
"smlal2 v3.4s, v23.8h, v18.8h\n"
"usubl v10.8h, v10.8b, v6.8b\n"
"smlal v20.4s, v25.4h, v14.4h\n"
"smlal2 v0.4s, v25.8h, v14.8h\n"
"smlal v19.4s, v25.4h, v11.4h\n"
"smlal2 v31.4s, v25.8h, v11.8h\n"
"smlal v5.4s, v10.4h, v14.4h\n"
"smlal2 v3.4s, v10.8h, v14.8h\n"
"smlal v21.4s, v10.4h, v11.4h\n"
"smlal2 v8.4s, v10.8h, v11.8h\n"
"tbz x7, #2, 13f\n"
"ld1 { v15.s }[0], [x20], #0x4\n"
"tbz x7, #1, 12f\n"
"ld1 { v15.h }[2], [x20], #0x2\n"
"tbz x7, #0, 15f\n"
"ld1 { v15.b }[6], [x20]\n"
"b 15f\n"
"12:" // Oddments: Load (1, 3): Bit 2: Bit 1: Unset
"tbz x7, #0, 15f\n"
"ld1 { v15.b }[4], [x20]\n"
"b 15f\n"
"13:" // Oddments: Load (1, 3): Bit 2: Unset
"tbz x7, #1, 14f\n"
"ld1 { v15.h }[0], [x20], #0x2\n"
"tbz x7, #0, 15f\n"
"ld1 { v15.b }[2], [x20]\n"
"b 15f\n"
"14:" // Oddments: Load (1, 3): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 15f\n"
"ld1 { v15.b }[0], [x20]\n"
"15:" // Oddments: Load (1, 3): Bit 2: End
"usubl v15.8h, v15.8b, v6.8b\n"
"ldr x20, [x15, #0x48]\n"
"smlal v21.4s, v15.4h, v18.4h\n"
"smlal2 v8.4s, v15.8h, v18.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 17f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 16f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 19f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 19f\n"
"16:" // Oddments: Load (1, 4): Bit 2: Bit 1: Unset
"tbz x7, #0, 19f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 19f\n"
"17:" // Oddments: Load (1, 4): Bit 2: Unset
"tbz x7, #1, 18f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 19f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 19f\n"
"18:" // Oddments: Load (1, 4): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 19f\n"
"ld1 { v16.b }[0], [x20]\n"
"19:" // Oddments: Load (1, 4): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x50]\n"
"smlal v21.4s, v16.4h, v9.4h\n"
"smlal2 v8.4s, v16.8h, v9.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 21f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 20f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 23f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 23f\n"
"20:" // Oddments: Load (1, 2): Bit 2: Bit 1: Unset
"tbz x7, #0, 23f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 23f\n"
"21:" // Oddments: Load (1, 2): Bit 2: Unset
"tbz x7, #1, 22f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 23f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 23f\n"
"22:" // Oddments: Load (1, 2): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 23f\n"
"ld1 { v16.b }[0], [x20]\n"
"23:" // Oddments: Load (1, 2): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x58]\n"
"smlal v5.4s, v16.4h, v9.4h\n"
"smlal2 v3.4s, v16.8h, v9.8h\n"
"smlal v21.4s, v16.4h, v28.4h\n"
"smlal2 v8.4s, v16.8h, v28.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 25f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 24f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 27f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 27f\n"
"24:" // Oddments: Load (3, 0): Bit 2: Bit 1: Unset
"tbz x7, #0, 27f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 27f\n"
"25:" // Oddments: Load (3, 0): Bit 2: Unset
"tbz x7, #1, 26f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 27f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 27f\n"
"26:" // Oddments: Load (3, 0): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 27f\n"
"ld1 { v16.b }[0], [x20]\n"
"27:" // Oddments: Load (3, 0): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x60]\n"
"smlal v20.4s, v16.4h, v28.4h\n"
"smlal2 v0.4s, v16.8h, v28.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 29f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 28f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 31f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 31f\n"
"28:" // Oddments: Load (2, 0): Bit 2: Bit 1: Unset
"tbz x7, #0, 31f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 31f\n"
"29:" // Oddments: Load (2, 0): Bit 2: Unset
"tbz x7, #1, 30f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 31f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 31f\n"
"30:" // Oddments: Load (2, 0): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 31f\n"
"ld1 { v16.b }[0], [x20]\n"
"31:" // Oddments: Load (2, 0): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x68]\n"
"smlal v5.4s, v16.4h, v26.4h\n"
"smlal2 v3.4s, v16.8h, v26.8h\n"
"smlal v20.4s, v16.4h, v11.4h\n"
"smlal2 v0.4s, v16.8h, v11.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 33f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 32f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 35f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 35f\n"
"32:" // Oddments: Load (3, 1): Bit 2: Bit 1: Unset
"tbz x7, #0, 35f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 35f\n"
"33:" // Oddments: Load (3, 1): Bit 2: Unset
"tbz x7, #1, 34f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 35f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 35f\n"
"34:" // Oddments: Load (3, 1): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 35f\n"
"ld1 { v16.b }[0], [x20]\n"
"35:" // Oddments: Load (3, 1): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x70]\n"
"smlal v20.4s, v16.4h, v18.4h\n"
"smlal2 v0.4s, v16.8h, v18.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 37f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 36f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 39f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 39f\n"
"36:" // Oddments: Load (2, 1): Bit 2: Bit 1: Unset
"tbz x7, #0, 39f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 39f\n"
"37:" // Oddments: Load (2, 1): Bit 2: Unset
"tbz x7, #1, 38f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 39f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 39f\n"
"38:" // Oddments: Load (2, 1): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 39f\n"
"ld1 { v16.b }[0], [x20]\n"
"39:" // Oddments: Load (2, 1): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x78]\n"
"smlal v5.4s, v16.4h, v7.4h\n"
"smlal2 v3.4s, v16.8h, v7.8h\n"
"smlal v20.4s, v16.4h, v22.4h\n"
"smlal2 v0.4s, v16.8h, v22.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 41f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 40f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 43f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 43f\n"
"40:" // Oddments: Load (3, 3): Bit 2: Bit 1: Unset
"tbz x7, #0, 43f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 43f\n"
"41:" // Oddments: Load (3, 3): Bit 2: Unset
"tbz x7, #1, 42f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 43f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 43f\n"
"42:" // Oddments: Load (3, 3): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 43f\n"
"ld1 { v16.b }[0], [x20]\n"
"43:" // Oddments: Load (3, 3): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x80]\n"
"smlal v19.4s, v16.4h, v18.4h\n"
"smlal2 v31.4s, v16.8h, v18.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 45f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 44f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 47f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 47f\n"
"44:" // Oddments: Load (2, 3): Bit 2: Bit 1: Unset
"tbz x7, #0, 47f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 47f\n"
"45:" // Oddments: Load (2, 3): Bit 2: Unset
"tbz x7, #1, 46f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 47f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 47f\n"
"46:" // Oddments: Load (2, 3): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 47f\n"
"ld1 { v16.b }[0], [x20]\n"
"47:" // Oddments: Load (2, 3): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x88]\n"
"smlal v21.4s, v16.4h, v7.4h\n"
"smlal2 v8.4s, v16.8h, v7.8h\n"
"smlal v19.4s, v16.4h, v22.4h\n"
"smlal2 v31.4s, v16.8h, v22.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 49f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 48f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 51f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 51f\n"
"48:" // Oddments: Load (3, 4): Bit 2: Bit 1: Unset
"tbz x7, #0, 51f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 51f\n"
"49:" // Oddments: Load (3, 4): Bit 2: Unset
"tbz x7, #1, 50f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 51f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 51f\n"
"50:" // Oddments: Load (3, 4): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 51f\n"
"ld1 { v16.b }[0], [x20]\n"
"51:" // Oddments: Load (3, 4): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x90]\n"
"smlal v19.4s, v16.4h, v9.4h\n"
"smlal2 v31.4s, v16.8h, v9.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 53f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 52f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 55f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 55f\n"
"52:" // Oddments: Load (4, 0): Bit 2: Bit 1: Unset
"tbz x7, #0, 55f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 55f\n"
"53:" // Oddments: Load (4, 0): Bit 2: Unset
"tbz x7, #1, 54f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 55f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 55f\n"
"54:" // Oddments: Load (4, 0): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 55f\n"
"ld1 { v16.b }[0], [x20]\n"
"55:" // Oddments: Load (4, 0): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0x98]\n"
"smlal v20.4s, v16.4h, v26.4h\n"
"smlal2 v0.4s, v16.8h, v26.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 57f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 56f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 59f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 59f\n"
"56:" // Oddments: Load (2, 4): Bit 2: Bit 1: Unset
"tbz x7, #0, 59f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 59f\n"
"57:" // Oddments: Load (2, 4): Bit 2: Unset
"tbz x7, #1, 58f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 59f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 59f\n"
"58:" // Oddments: Load (2, 4): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 59f\n"
"ld1 { v16.b }[0], [x20]\n"
"59:" // Oddments: Load (2, 4): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0xa0]\n"
"smlal v21.4s, v16.4h, v4.4h\n"
"smlal2 v8.4s, v16.8h, v4.8h\n"
"smlal v19.4s, v16.4h, v14.4h\n"
"smlal2 v31.4s, v16.8h, v14.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 61f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 60f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 63f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 63f\n"
"60:" // Oddments: Load (4, 1): Bit 2: Bit 1: Unset
"tbz x7, #0, 63f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 63f\n"
"61:" // Oddments: Load (4, 1): Bit 2: Unset
"tbz x7, #1, 62f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 63f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 63f\n"
"62:" // Oddments: Load (4, 1): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 63f\n"
"ld1 { v16.b }[0], [x20]\n"
"63:" // Oddments: Load (4, 1): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0xa8]\n"
"smlal v20.4s, v16.4h, v7.4h\n"
"smlal2 v0.4s, v16.8h, v7.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 65f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 64f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 67f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 67f\n"
"64:" // Oddments: Load (3, 2): Bit 2: Bit 1: Unset
"tbz x7, #0, 67f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 67f\n"
"65:" // Oddments: Load (3, 2): Bit 2: Unset
"tbz x7, #1, 66f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 67f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 67f\n"
"66:" // Oddments: Load (3, 2): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 67f\n"
"ld1 { v16.b }[0], [x20]\n"
"67:" // Oddments: Load (3, 2): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0xb0]\n"
"smlal v20.4s, v16.4h, v9.4h\n"
"smlal2 v0.4s, v16.8h, v9.8h\n"
"smlal v19.4s, v16.4h, v28.4h\n"
"smlal2 v31.4s, v16.8h, v28.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 69f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 68f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 71f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 71f\n"
"68:" // Oddments: Load (4, 3): Bit 2: Bit 1: Unset
"tbz x7, #0, 71f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 71f\n"
"69:" // Oddments: Load (4, 3): Bit 2: Unset
"tbz x7, #1, 70f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 71f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 71f\n"
"70:" // Oddments: Load (4, 3): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 71f\n"
"ld1 { v16.b }[0], [x20]\n"
"71:" // Oddments: Load (4, 3): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0xb8]\n"
"smlal v19.4s, v16.4h, v7.4h\n"
"smlal2 v31.4s, v16.8h, v7.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 73f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 72f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 75f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 75f\n"
"72:" // Oddments: Load (4, 2): Bit 2: Bit 1: Unset
"tbz x7, #0, 75f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 75f\n"
"73:" // Oddments: Load (4, 2): Bit 2: Unset
"tbz x7, #1, 74f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 75f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 75f\n"
"74:" // Oddments: Load (4, 2): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 75f\n"
"ld1 { v16.b }[0], [x20]\n"
"75:" // Oddments: Load (4, 2): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"ldr x20, [x15, #0xc0]\n"
"smlal v20.4s, v16.4h, v4.4h\n"
"smlal2 v0.4s, v16.8h, v4.8h\n"
"smlal v19.4s, v16.4h, v26.4h\n"
"smlal2 v31.4s, v16.8h, v26.8h\n"
"add x20, x20, x17\n"
"tbz x7, #2, 77f\n"
"ld1 { v16.s }[0], [x20], #0x4\n"
"tbz x7, #1, 76f\n"
"ld1 { v16.h }[2], [x20], #0x2\n"
"tbz x7, #0, 79f\n"
"ld1 { v16.b }[6], [x20]\n"
"b 79f\n"
"76:" // Oddments: Load (4, 4): Bit 2: Bit 1: Unset
"tbz x7, #0, 79f\n"
"ld1 { v16.b }[4], [x20]\n"
"b 79f\n"
"77:" // Oddments: Load (4, 4): Bit 2: Unset
"tbz x7, #1, 78f\n"
"ld1 { v16.h }[0], [x20], #0x2\n"
"tbz x7, #0, 79f\n"
"ld1 { v16.b }[2], [x20]\n"
"b 79f\n"
"78:" // Oddments: Load (4, 4): Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 79f\n"
"ld1 { v16.b }[0], [x20]\n"
"79:" // Oddments: Load (4, 4): Bit 2: End
"usubl v16.8h, v16.8b, v6.8b\n"
"smlal v19.4s, v16.4h, v4.4h\n"
"smlal2 v31.4s, v16.8h, v4.8h\n"
"tbz x7, #2, 81f\n"
"ld1 { v14.4s }, [x13], #0x10\n"
"ld1 { v25.4s }, [x12], #0x10\n"
"tbz x7, #1, 80f\n"
"ld1 { v18.d }[0], [x13], #0x8\n"
"ld1 { v12.d }[0], [x12], #0x8\n"
"tbz x7, #0, 83f\n"
"ld1 { v18.s }[2], [x13]\n"
"ld1 { v12.s }[2], [x12]\n"
"b 83f\n"
"80:" // Oddments: Load requant params: Bit 2: Bit 1: Unset
"tbz x7, #0, 83f\n"
"ld1 { v18.s }[0], [x13]\n"
"ld1 { v12.s }[0], [x12]\n"
"b 83f\n"
"81:" // Oddments: Load requant params: Bit 2: Unset
"tbz x7, #1, 82f\n"
"ld1 { v14.d }[0], [x13], #0x8\n"
"ld1 { v25.d }[0], [x12], #0x8\n"
"tbz x7, #0, 83f\n"
"ld1 { v14.s }[2], [x13]\n"
"ld1 { v25.s }[2], [x12]\n"
"b 83f\n"
"82:" // Oddments: Load requant params: Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 83f\n"
"ld1 { v14.s }[0], [x13]\n"
"ld1 { v25.s }[0], [x12]\n"
"83:" // Oddments: Load requant params: Bit 2: End
"sqrdmulh v5.4s, v5.4s, v14.4s\n"
"and v28.16b, v5.16b, v25.16b\n"
"add x11, x11, x16\n"
"add x10, x10, x16\n"
"sqrdmulh v3.4s, v3.4s, v18.4s\n"
"sshr v28.4s, v28.4s, #0x1f\n"
"add x9, x9, x16\n"
"add x28, x28, x16\n"
"and v16.16b, v3.16b, v12.16b\n"
"sqrdmulh v21.4s, v21.4s, v14.4s\n"
"sqrdmulh v20.4s, v20.4s, v14.4s\n"
"sqrdmulh v19.4s, v19.4s, v14.4s\n"
"sqadd v5.4s, v5.4s, v28.4s\n"
"sshr v16.4s, v16.4s, #0x1f\n"
"and v14.16b, v21.16b, v25.16b\n"
"sqrdmulh v8.4s, v8.4s, v18.4s\n"
"and v6.16b, v20.16b, v25.16b\n"
"sqrdmulh v0.4s, v0.4s, v18.4s\n"
"and v4.16b, v19.16b, v25.16b\n"
"sqrdmulh v31.4s, v31.4s, v18.4s\n"
"sqadd v3.4s, v3.4s, v16.4s\n"
"sshr v14.4s, v14.4s, #0x1f\n"
"and v18.16b, v8.16b, v12.16b\n"
"sshr v6.4s, v6.4s, #0x1f\n"
"and v7.16b, v0.16b, v12.16b\n"
"sshr v4.4s, v4.4s, #0x1f\n"
"and v16.16b, v31.16b, v12.16b\n"
"sqadd v21.4s, v21.4s, v14.4s\n"
"sshr v18.4s, v18.4s, #0x1f\n"
"sqadd v20.4s, v20.4s, v6.4s\n"
"sshr v7.4s, v7.4s, #0x1f\n"
"sqadd v19.4s, v19.4s, v4.4s\n"
"sshr v16.4s, v16.4s, #0x1f\n"
"srshl v5.4s, v5.4s, v25.4s\n"
"srshl v21.4s, v21.4s, v25.4s\n"
"sqadd v8.4s, v8.4s, v18.4s\n"
"srshl v20.4s, v20.4s, v25.4s\n"
"sqadd v0.4s, v0.4s, v7.4s\n"
"srshl v19.4s, v19.4s, v25.4s\n"
"sqadd v31.4s, v31.4s, v16.4s\n"
"srshl v3.4s, v3.4s, v12.4s\n"
"sqxtn v5.4h, v5.4s\n"
"srshl v8.4s, v8.4s, v12.4s\n"
"sqxtn v21.4h, v21.4s\n"
"srshl v0.4s, v0.4s, v12.4s\n"
"sqxtn v20.4h, v20.4s\n"
"srshl v31.4s, v31.4s, v12.4s\n"
"sqxtn v19.4h, v19.4s\n"
"sqxtn2 v5.8h, v3.4s\n"
"sqxtn2 v21.8h, v8.4s\n"
"sqxtn2 v20.8h, v0.4s\n"
"sqxtn2 v19.8h, v31.4s\n"
"sqadd v5.8h, v5.8h, v13.8h\n"
"sqadd v21.8h, v21.8h, v13.8h\n"
"sqadd v20.8h, v20.8h, v13.8h\n"
"sqadd v19.8h, v19.8h, v13.8h\n"
"smax v5.8h, v5.8h, v17.8h\n"
"smax v21.8h, v21.8h, v17.8h\n"
"smax v20.8h, v20.8h, v17.8h\n"
"smax v19.8h, v19.8h, v17.8h\n"
"smin v5.8h, v5.8h, v24.8h\n"
"smin v21.8h, v21.8h, v24.8h\n"
"smin v20.8h, v20.8h, v24.8h\n"
"smin v19.8h, v19.8h, v24.8h\n"
"uzp1 v5.16b, v5.16b, v5.16b\n"
"uzp1 v21.16b, v21.16b, v21.16b\n"
"uzp1 v20.16b, v20.16b, v20.16b\n"
"uzp1 v19.16b, v19.16b, v19.16b\n"
"tbz x7, #2, 85f\n"
"st1 { v5.s }[0], [x11], #0x4\n"
"st1 { v21.s }[0], [x10], #0x4\n"
"st1 { v20.s }[0], [x9], #0x4\n"
"st1 { v19.s }[0], [x28], #0x4\n"
"tbz x7, #1, 84f\n"
"st1 { v5.h }[2], [x11], #0x2\n"
"st1 { v21.h }[2], [x10], #0x2\n"
"st1 { v20.h }[2], [x9], #0x2\n"
"st1 { v19.h }[2], [x28], #0x2\n"
"tbz x7, #0, 87f\n"
"st1 { v5.b }[6], [x11], #0x1\n"
"st1 { v21.b }[6], [x10], #0x1\n"
"st1 { v20.b }[6], [x9], #0x1\n"
"st1 { v19.b }[6], [x28], #0x1\n"
"b 87f\n"
"84:" // Oddments: Bit 2: Bit 1: Unset
"tbz x7, #0, 87f\n"
"st1 { v5.b }[4], [x11], #0x1\n"
"st1 { v21.b }[4], [x10], #0x1\n"
"st1 { v20.b }[4], [x9], #0x1\n"
"st1 { v19.b }[4], [x28], #0x1\n"
"b 87f\n"
"85:" // Oddments: Bit 2: Unset
"tbz x7, #1, 86f\n"
"st1 { v5.h }[0], [x11], #0x2\n"
"st1 { v21.h }[0], [x10], #0x2\n"
"st1 { v20.h }[0], [x9], #0x2\n"
"st1 { v19.h }[0], [x28], #0x2\n"
"tbz x7, #0, 87f\n"
"st1 { v5.b }[2], [x11], #0x1\n"
"st1 { v21.b }[2], [x10], #0x1\n"
"st1 { v20.b }[2], [x9], #0x1\n"
"st1 { v19.b }[2], [x28], #0x1\n"
"b 87f\n"
"86:" // Oddments: Bit 2: Unset: Bit 1: Unset
"tbz x7, #0, 87f\n"
"st1 { v5.b }[0], [x11], #0x1\n"
"st1 { v21.b }[0], [x10], #0x1\n"
"st1 { v20.b }[0], [x9], #0x1\n"
"st1 { v19.b }[0], [x28], #0x1\n"
"87:" // Oddments: Bit 2: End
"88:" // End
:
: [offsetof_Params_bias] "I" (offsetof(Params, bias)), [offsetof_Params_inptrs] "I" (offsetof(Params, inptrs)), [offsetof_Params_n_channels] "I" (offsetof(Params, n_channels)), [offsetof_Params_outptrs] "I" (offsetof(Params, outptrs)), [offsetof_Params_requant] "I" (offsetof(Params, requant)), [offsetof_Params_requant_muls] "I" (offsetof(Params, requant_muls)), [offsetof_Params_requant_shifts] "I" (offsetof(Params, requant_shifts)), [offsetof_Params_weights] "I" (offsetof(Params, weights)), [offsetof_Requantize32_a_offset] "I" (offsetof(arm_gemm::Requantize32, a_offset)), [offsetof_Requantize32_b_offset] "I" (offsetof(arm_gemm::Requantize32, b_offset)), [offsetof_Requantize32_c_offset] "I" (offsetof(arm_gemm::Requantize32, c_offset)), [offsetof_Requantize32_maxval] "I" (offsetof(arm_gemm::Requantize32, maxval)), [offsetof_Requantize32_minval] "I" (offsetof(arm_gemm::Requantize32, minval)), [params] "r" (¶ms)
: "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28"
);
}
} // namespace depthwise
} // namespace arm_conv
#endif // defined(__aarch64__)
| [
"bsgcomp@arm.com"
] | bsgcomp@arm.com |
31c03ed837c67de8ccdf658f553c7f50320d112b | cc6fc7b8fab0b25e83dfd148c18bcbb322dd4209 | /app/src/main/jni/ModelSettingJson.h | e94de212a0c95165680210dde4e33b86e9702ab4 | [] | no_license | HuyNguyen1590/live2d-android-wear | 372071c9e96ee565d81e16c3b5e826154e14ee2a | 6b733d4d1b0c3fe0a7824e91276bebf242c1d48a | refs/heads/master | 2021-05-31T19:01:20.843536 | 2016-06-19T23:46:01 | 2016-06-19T23:46:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,919 | h | /**
*
* You can modify and use this source freely
* only for the development of application related Live2D.
*
* (c) Live2D Inc. All rights reserved.
*/
#include "ModelSetting.h"
#include "util/Json.h"
// JSONのキー
const char NAME[]="name";
const char MODEL[]="model";
const char _ID[]="id";
const char TEXTURES[]="textures";
const char TEXTURE_DIR[]="texture_dir";
const char INIT_PARAM[]="init_param";
const char INIT_PARTS_VISIBLE[]="init_parts_visible";
const char HIT_AREAS[]="hit_areas";
const char EXPRESSIONS[]="expressions";
const char POSE[]="pose";
const char PHYSICS[]="physics";
const char MOTION_GROUPS[]="motions";
const char SOUND[]="sound";
const char FADE_IN[]="fade_in";
const char FADE_OUT[]="fade_out";
const char VAL[]="val";
const char LAYOUT[]="layout";
const char _FILE[]="file";
class ModelSettingJson : public ModelSetting
{
private:
live2d::Json* json;
// キーが存在するかどうかのチェック
bool existModelName() {return ! json->getRoot()[NAME].isNull() ;}
bool existModelFile() {return ! json->getRoot()[MODEL].isNull() ;}
bool existTextureFiles() {return ! json->getRoot()[TEXTURES].isNull() ;}
bool existInitParam() {return ! json->getRoot()[INIT_PARAM].isNull() ;}
bool existInitPartsVisible(){return ! json->getRoot()[INIT_PARTS_VISIBLE].isNull();}
bool existHitAreas() {return ! json->getRoot()[HIT_AREAS].isNull() ;}
bool existPhysicsFile() {return ! json->getRoot()[PHYSICS].isNull() ;}
bool existPoseFile() {return ! json->getRoot()[POSE].isNull() ;}
bool existExpressionFile() {return ! json->getRoot()[EXPRESSIONS].isNull() ;}
bool existMotionGroups() {return ! json->getRoot()[MOTION_GROUPS].isNull() ;}
bool existMotionGroup(const char* name) {return ! json->getRoot()[MOTION_GROUPS][name].isNull() ;}
bool existMotionSound(const char* name,int n) {return ! json->getRoot()[MOTION_GROUPS][name][n][SOUND].isNull();}
bool existMotionFadeIn(const char* name,int n) {return ! json->getRoot()[MOTION_GROUPS][name][n][FADE_IN].isNull();}
bool existMotionFadeOut(const char* name,int n) {return ! json->getRoot()[MOTION_GROUPS][name][n][FADE_OUT].isNull();}
public:
ModelSettingJson(const char* buf,size_t size){
json = live2d::Json::parseFromBytes( buf,(int)size ) ;
}
~ModelSettingJson(){
delete json;
}
// モデルデータについて
const char* getModelName()
{
if(!existModelName())return "";
return json->getRoot()[NAME].toString().c_str();
}
const char* getModelFile()
{
if(!existModelFile())return "";
return json->getRoot()[MODEL].toString().c_str();
}
// テクスチャについて
int getTextureNum()
{
if(!existTextureFiles())return 0;
return json->getRoot()[TEXTURES].size() ;
}
virtual const char* getTextureDir()
{
return json->getRoot()[TEXTURE_DIR].c_str() ;
}
const char* getTextureFile(int n) { return json->getRoot()[TEXTURES][n].toString().c_str(); }
// 初期パラメータについて
int getInitParamNum()
{
if(!existInitParam())return 0;
return json->getRoot()[INIT_PARAM].size();
}
float getInitParamValue(int n) { return json->getRoot()[INIT_PARAM][n][VAL].toDouble(); }
const char* getInitParamID(int n) { return json->getRoot()[INIT_PARAM][n][_ID].toString().c_str(); }
// 初期パーツ表示について
int getInitPartsVisibleNum()
{
if(!existInitPartsVisible())return 0;
return json->getRoot()[INIT_PARTS_VISIBLE].size();
}
float getInitPartsVisibleValue(int n) { return json->getRoot()[INIT_PARTS_VISIBLE][n][VAL].toDouble(); }
const char* getInitPartsVisibleID(int n) { return json->getRoot()[INIT_PARTS_VISIBLE][n][_ID].toString().c_str(); }
// あたり判定について
int getHitAreasNum()
{
if(!existHitAreas())return 0;
return json->getRoot()[HIT_AREAS].size() ;
}
const char* getHitAreaID(int n) {return json->getRoot()[HIT_AREAS][n][_ID].toString().c_str();}
const char* getHitAreaName(int n) {return json->getRoot()[HIT_AREAS][n][NAME].toString().c_str();}
// 物理演算、パーツ切り替え、表情ファイルについて
const char* getPhysicsFile()
{
if(!existPhysicsFile())return "";
return json->getRoot()[PHYSICS].toString().c_str();
}
const char* getPoseFile()
{
if(!existPoseFile())return "";
return json->getRoot()[POSE].toString().c_str();
}
int getExpressionNum()
{
if(!existExpressionFile())return 0;
return json->getRoot()[EXPRESSIONS].size();
}
const char* getExpressionFile(int n)
{
return json->getRoot()[EXPRESSIONS][n][_FILE].toString().c_str();
}
const char* getExpressionName(int n)
{
return json->getRoot()[EXPRESSIONS][n][NAME].toString().c_str();
}
// モーションについて
int getMotionNum(const char* name)
{
if(!existMotionGroup(name))return 0;
return json->getRoot()[MOTION_GROUPS][name].size();
}
const char* getMotionFile(const char* name,int n)
{
if(!existMotionGroup(name))return "";
return json->getRoot()[MOTION_GROUPS][name][n][_FILE].toString().c_str();
}
const char* getMotionSound(const char* name,int n)
{
if(!existMotionSound(name,n))return "";
return json->getRoot()[MOTION_GROUPS][name][n][SOUND].toString().c_str();
}
int getMotionFadeIn(const char* name,int n)
{
if(!existMotionFadeIn(name,n))return 1000;
return json->getRoot()[MOTION_GROUPS][name][n][FADE_IN].toInt();
}
int getMotionFadeOut(const char* name,int n)
{
if(!existMotionFadeOut(name,n))return 1000;
return json->getRoot()[MOTION_GROUPS][name][n][FADE_OUT].toInt();
}
int getMotionGroupNum()
{
if ( ! existMotionGroups()) {
return 0;
}
return json->getRoot()[MOTION_GROUPS].getKeys().size();
}
const char* getMotionGroupName(int n)
{
if ( ! existMotionGroups()) {
return NULL;
}
return json->getRoot()[MOTION_GROUPS].getKeys()[n].c_str();
}
bool getLayout(std::map<std::string, float> & layout)
{
live2d::LDMap<live2d::LDString, live2d::Value* > * map=json->getRoot()[LAYOUT].getMap();
if (map==NULL) {
return false;
}
live2d::LDMap<live2d::LDString, live2d::Value* >::const_iterator map_ite;
bool ret=false;
for(map_ite=map->begin();map_ite!=map->end();map_ite++)
{
layout[(*map_ite).first.c_str()] = (*map_ite).second->toDouble();
ret=true;
}
return ret;
}
}; | [
"woxxy@foolz.us"
] | woxxy@foolz.us |
31483fe25a39f8f34f46832cebb82d6af29e26af | 9d7a8d3e8d5df680c32fa70c73ef7c2820986187 | /.history/D05/ex03/Intern_20210312163129.cpp | fee76e43bb91d483a0ae54ee3aca57d285442b72 | [] | no_license | asleonova/cpp | dc2d606e361ffdfa2013953f68bd0da4530f34bc | adfaecc238cdb63053b34b106869d3185204d73a | refs/heads/master | 2023-04-06T19:27:21.725162 | 2021-04-13T19:18:00 | 2021-04-13T19:18:00 | 337,834,070 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,200 | cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Intern.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dbliss <dbliss@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/03/11 16:14:26 by dbliss #+# #+# */
/* Updated: 2021/03/12 16:31:29 by dbliss ### ########.fr */
/* */
/* ************************************************************************** */
#include "Intern.hpp"
/*
** ------------------------------- CONSTRUCTOR --------------------------------
*/
Intern::Intern()
{
}
Intern::Intern( const Intern & src )
{
*this = src;
}
/*
** -------------------------------- DESTRUCTOR --------------------------------
*/
Intern::~Intern()
{
}
/*
** --------------------------------- OVERLOAD ---------------------------------
*/
Intern & Intern::operator=( Intern const & rhs )
{
(void)rhs;
return *this;
}
/*
** --------------------------------- METHODS ----------------------------------
*/
Form* Intern::makeForm(std::string const name, std::string const target)
{
std::string type_names[3] = {
"robotomy request",
"presidential pardon request",
"shrubbery creation request"
};
Form* (forms[3]) = {
RobotomyRequestForm::createNewForm(target),
PresidentialPardonForm::createNewForm(target),
ShrubberyCreationForm::createNewForm(target)
};
for (int i = 0; i < 3; i++)
{
if (type_names[i] == name)
{
std::cout << "Intern creates " << forms[i]->getName() << std::endl;
return forms[i];
}
}
return (NULL);
// ERROR MESSAGE HERE!!!
}
/*
** --------------------------------- ACCESSOR ---------------------------------
*/
/* ************************************************************************** */ | [
"dbliss@oa-f5.msk.21-school.ru"
] | dbliss@oa-f5.msk.21-school.ru |
533e012b2ae40066b1000a1011947d8dfe0c82f1 | a37963cee6a482275b089922375a60b3819d8072 | /viz/PointLocator/ControlScreen.cpp | f6c56ce1e123058284fc077597b9114a5d8597ef | [] | no_license | njun-git/kvs | f639ab36df290d308531d1538066739b8ca265e6 | ae15b5dc2b50f9ff8fb5090bdd41fc1b496cada3 | refs/heads/master | 2021-01-23T07:03:20.287011 | 2012-02-14T06:53:59 | 2012-02-14T06:53:59 | 2,502,777 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,103 | cpp | /*
* ControlScreen.cpp
*
*
* Created by njun on 11/10/11.
* Copyright 2011 Jun Nishimura. All rights reserved.
*
*/
#include "ControlScreen.h"
#include <kvs/Mouse>
#include <kvs/MouseButton>
namespace kvs
{
ControlScreen::ControlScreen( kvs::glut::Application* app ) :
kvs::glut::Screen( app )
{
this->initialize();
}
ControlScreen::~ControlScreen( void )
{
}
void ControlScreen::initialize( void )
{
BaseClass::setTitle( "kvs::ControlScreen" );
BaseClass::setGeometry( 512, 0, 512, 512 );
m_screen = NULL;
m_point = NULL;
}
void ControlScreen::attachMainScreen( kvs::MainScreen* screen )
{
m_screen = screen;
m_point = screen->seedPoint();
}
void ControlScreen::mousePressEvent( kvs::MouseEvent* event )
{
m_mouse->setMode( kvs::Mouse::Translation );
m_mouse->press( event->x(), event->y() );
}
void ControlScreen::mouseMoveEvent( kvs::MouseEvent* event )
{
m_mouse->move( event->x(), event->y() );
const kvs::Xform x = m_point->xform();
const kvs::Vector3f coord( m_point->coords().pointer() );
kvs::Vector3f translation = m_mouse->translation();
if ( event->button() == kvs::MouseButton::Right ||
event->modifiers() == kvs::Key::ShiftModifier )
{
translation.z() = - translation.y();
translation.x() = 0.0f;
translation.y() = 0.0f;
}
const kvs::Vector3f normalize = m_screen->objectManager()->normalize();
translation.x() /= normalize.x() * x.scaling().x();
translation.y() /= normalize.y() * x.scaling().y();
translation.z() /= normalize.z() * x.scaling().z();
const kvs::Vector3f new_coord = coord + translation * x.rotation();
kvs::ValueArray<float> coords( 3 );
coords[0] = new_coord.x();
coords[1] = new_coord.y();
coords[2] = new_coord.z();
m_point->setCoords( coords );
m_screen->updateStreamLine();
BaseClass::redraw();
m_screen->redraw();
}
void ControlScreen::mouseReleaseEvent( kvs::MouseEvent* event )
{
m_mouse->release( event->x(), event->y() );
BaseClass::redraw();
m_screen->redraw();
}
}
| [
"njun3196@gmail.com"
] | njun3196@gmail.com |
104feedc3ec81dcfe782a22ad39a8683cea5f33d | bcd7af39651170ef451d2781943069439bbd3507 | /Rook.hpp | 09e1009370eaef9628a83107d7580f6e9cf2ffcb | [] | no_license | jacksonlawson/chess-challenge | 39bf571a3f36b3a43c9760fec6541c8b717e273c | 358deb7ea30c7ed37e0b9e64baf1970320a04848 | refs/heads/master | 2021-09-02T04:38:13.440895 | 2017-12-30T11:27:40 | 2017-12-30T11:27:40 | 115,333,905 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,009 | hpp |
#ifndef __ROOK_HPP__
#define __ROOK_HPP__
#include <Piece.hpp>
namespace chess_console
{
class Rook : public Piece
{
public:
static PieceType const type = PieceType::ptRook;
Rook(Board *pbrdptr, PlayerColor pplayer, BoardPosition pposition)
: Piece(pbrdptr, pplayer, pposition, Piece::PieceType::ptRook)
{
}
bool isValidMove(const BoardPosition pposition)
{
const BoardPosition cpos = getCurrentPosition();
if (cpos == pposition)
return false;
auto lmbexp = [this](auto & p) {
if (p)
{
if (p->getPlayerColor() == getPlayerColor())
{
return false;
}
else
{
return true;
}
}
return true;
};
auto p = getBoard()->getPieceAt(pposition.row, pposition.column);
if (lmbexp(p) == false)
{
return false;
}
// Check for obstacles like a piece of same color is in the path / target
// piece of opposite color is in between target and current position.
// If target position has opposite color piece take it out of active list.
if (cpos.row == pposition.row)
{
// std::cout << "Inside the ROOK same row move" << std::endl;
int const COLDIFF = pposition.column - cpos.column;
int const sign = COLDIFF > 0 ? 1 : -1;
for (int i = 1; i < std::abs(COLDIFF) + 1; ++i)
{
auto p = getBoard()->getPieceAt(cpos.row, cpos.column + (i * sign));
if (lmbexp(p) == false)
{
std::cout << "Invalid move for ROOK column wise" << std::endl;
return false;
}
}
return true;
}
if (cpos.column == pposition.column)
{
int const ROWDIFF = pposition.row - cpos.row;
int const sign = ROWDIFF > 0 ? 1 : -1;
for (int i = 1; i < std::abs(ROWDIFF) + 1; ++i)
{
auto p = getBoard()->getPieceAt(cpos.row + (i * sign), cpos.column);
if (lmbexp(p) == false)
{
std::cerr << "Invalid move for ROOK row wise" << std::endl;
return false;
}
}
return true;
}
return false;
}
std::string tostring() override
{
return getPlayerColorStr() + "R";
}
};
}
#endif
| [
"gnulinux2000@gmail.com"
] | gnulinux2000@gmail.com |
7a5fa94a83aa429cc64ce4375e164fe66fe4bc84 | d446ed18144ac191377c2a5e0585fb61317b96c2 | /include/eepp/scene/actions/resizewidth.hpp | fb598f67ccd0849a57799ba3790b490794af7a4b | [
"MIT"
] | permissive | thyrdmc/eepp | 6f8ee84f048efaf1b3aca931ea612e61136e15c4 | 93b72b1bcab794a43706658e7978c5e852c3b65a | refs/heads/master | 2023-06-25T11:18:16.371330 | 2019-05-22T04:26:41 | 2019-05-22T04:26:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 741 | hpp | #ifndef EE_SCENE_ACTIONS_RESIZEWIDTH_HPP
#define EE_SCENE_ACTIONS_RESIZEWIDTH_HPP
#include <eepp/scene/action.hpp>
#include <eepp/scene/actions/actioninterpolation1d.hpp>
namespace EE { namespace Scene { namespace Actions {
class EE_API ResizeWidth : public ActionInterpolation1d {
public:
static ResizeWidth * New( const Float& start, const Float& end, const Time& duration, const Ease::Interpolation& type = Ease::Linear );
Action * clone() const override;
Action * reverse() const override;
protected:
ResizeWidth();
ResizeWidth( const Float & start, const Float & end, const Time & duration, const Ease::Interpolation & type );
void onStart() override;
void onUpdate( const Time& time ) override;
};
}}}
#endif
| [
"spartanj@gmail.com"
] | spartanj@gmail.com |
3562faf14e4e454d1f0e6f89378b44e6a471220e | 8e58c8954b0a15d208144eabcdd7d8a7aa8852a8 | /Zjut_ACM/1322 Sums.cpp | 79774cfa4d5999a1305055031748cd2d5c8e4c49 | [] | no_license | EchoMemory/AcmSolutions | 5b0712f43904938e03dc408870dcf188787e483d | 9abe973669076ba98865359fba65fdeffa1fdcc0 | refs/heads/master | 2020-05-20T05:36:12.451011 | 2012-12-02T16:40:29 | 2012-12-02T16:40:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 389 | cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool cmp( int a,int b)
{
return a>b;
}
int main()
{
int m,n,k;
for( cin>>n; n>0; n-- )
{
vector<int> v;
int sum=0;
for( cin>>m; m>0; m-- )
{
cin>>k;
v.push_back(k);
}
sort(v.begin(),v.end() ,cmp);
for( int i=0; i<10; i++ )
sum+=v[i];
cout<<sum<<endl;
v.clear();
}
return 0;
}
| [
"memoryhash@gmail.com"
] | memoryhash@gmail.com |
900d2b837cda9abc64a190f39b29a1df747d1a35 | 18c5e87536673646f670e82585e386bbb5ccebc5 | /sketch_mar11a/sketch_mar11a.ino | 6bfdb6308aaf3adc50ba5dde365fe43a4c7e9713 | [] | no_license | ChenRuHsieh/2018-Room-escape | 4260f575f0280fefdc0597bfce5e9998f77f5307 | 004963add1dac9482f951ee42629ebc027ae2b80 | refs/heads/master | 2020-05-26T03:52:16.978511 | 2019-05-22T19:01:00 | 2019-05-22T19:01:00 | 188,097,380 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 256 | ino | #include <SoftwareSerial.h>
void setup() {
// put your setup code here, to run once:
pinMode(OUTPUT,13);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(13) !=LOW)
Serial.print("1\n");
else Serial.print("0\n");
}
| [
"peter105060016@gapp.nthu.edu.tw"
] | peter105060016@gapp.nthu.edu.tw |
fa6efda91915b3b2176b90eaefe9b1c5146f4ff1 | 19845af1616d5b81aedf7917a32cb44f61e02401 | /FunnyToys/端口扫描器/端口扫描器/源.cpp | f263aad9cc1d97c9ecdd95ef3f05b13f90e32ffc | [] | no_license | gsy3761/Pile | 560c78d471c70f69324984703cf01cd7680a3fca | e6217be03679d978a7a41b01dbb0baa159c0deec | refs/heads/master | 2020-12-21T04:04:31.661608 | 2020-01-23T13:16:05 | 2020-01-23T13:16:05 | 236,300,410 | 1 | 0 | null | 2020-01-26T11:05:01 | 2020-01-26T11:05:00 | null | UTF-8 | C++ | false | false | 5,887 | cpp | #define _CRT_SECURE_NO_WARNINGS
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <Winsock2.h>
#include <commctrl.h>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
// #include <stdio.h>
// #include <stdlib.h>
//#include <windows.h> //加这个头文件后面sleep会用到
//#pragma comment(lib,"ws2_32.lib")
#pragma comment(lib, "WS2_32.lib")
#define NETWORK_ERROR -1
#define NETWORK_OK 0
#define PORT_MIN 1
#define PORT_MAX 65535
const int ThreadCount = 16;
std::set<HANDLE> hThreads;
HANDLE hThread;
std::set<DWORD> hIDs;
DWORD hID;
std::queue<int> ports;
std::string hostname;
int starting_port = 0;
int ending_port = 0;
int nopen = 0;
int ThreadOpened = ThreadCount;
DWORD portscan();
bool ThreadLock; //
int main()
{
int ret;
WSADATA dat; //库版本信息结构
// WSADATA结构被用来储存调用AfxSocketInit全局函数返回的Windows Sockets初始化信息。
DWORD version;
version = MAKEWORD(2, 2);
// MAKEWORD(2,2)表示使用WINSOCK2版本.wsaData用来存储系统传回的关于WINSOCK的资料.
ret = WSAStartup(version, &dat);
//此函数在应用程序中初始化winsockDLL,格式:int PASCAL FAR WSAStartup( WORD wVersionRequested,
// LPWSADATA lpWSAData );
if(ret != 0)
{
std::cout << "加载套接字失败!\n";
WSACleanup();
return NETWORK_ERROR;
}
if(ret == 0)
{
std::cout<<"Enter hostname:";
//scanf("%s", hostname);
std::cin >> hostname;
std::cout << ("Enter starting port:");
//scanf("%d", &starting_port);
std::cin >> starting_port;
if(starting_port < PORT_MIN)
{
std::cout << ("起始端口出错\n");
WSACleanup();
return NETWORK_ERROR;
}
std::cout << ("Enter ending port:");
// scanf("%d", &ending_port);
std::cin >> ending_port;
if(ending_port > PORT_MAX)
{
std::cout << ("终点端口出错\n");
WSACleanup();
return NETWORK_ERROR;
}
// printf("\nScanning [%s]...\n", hostname);
std::cout << "Scanning [" << hostname << "]\n";
for(int i = starting_port; i <= ending_port; i++)
{
ports.push(int(i));
} //将任务加入队列
ThreadLock = false;
for(int i = 0; i < ThreadCount; i++)
{
hThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) portscan, 0, 0, &hID);
// Thread1 = CreateThread( 0, 默认线程堆栈大小 0(2M) ThreadProc,线程入口函数 0,创建标识
// 0代表立即执行,&Thread1ID获得线程ID);
if(hThread == 0)
{
std::cout << ("创建线程失败\n");
WSACleanup();
return NETWORK_ERROR;
}
else
{
hThreads.insert(hThread);
hIDs.insert(hID);
}
}
// Sleep(-1);//进程挂起
while(ThreadOpened)
; //等到所有进程结束后
std::cout<<("Number of ports opened = ")<< (nopen)<<std::endl;
}
WSACleanup();
// WSAStartup应该与WSACleanup成对使用,WSAStartup的功能是初始化Winsock DLL,
// WSACleanup是来解除与Socket库的绑定并且释放Socket库所占用的系统资源。
return NETWORK_OK;
}
DWORD portscan()
{
// printf("\nScanning [%s]...\n", hostname);
int i, nret;
SOCKET thesocket; //定义服务器套接字
LPHOSTENT hostent;
thesocket =
socket(AF_INET,
SOCK_STREAM,
IPPROTO_TCP); //第一个变量为协议簇,第二个变量为套接字类型,第三个变量为使用的通信协议
hostent = gethostbyname((
hostname.c_str())); // gethostbyname()返回对应于给定主机名的包含主机名字和地址信息的hostent结构指针。
// for (i = (int)ports.front(),ports.pop(); !ports.empty(); i=(int)ports.front(),ports.pop())
while(!ports.empty())
{
if(!ThreadLock)
{
ThreadLock = true;
i = ports.front(); //提取队列中第一个元素
ports.pop(); //从队列中删去第一个元素
ThreadLock = false;
} //进程锁防止读取冲突
else
{
continue;
}
if(i < 0)
{
break;
}
// printf("port:%dscaning\n", i);
SOCKADDR_IN hostinfo; //服务器地址信息结构
hostinfo.sin_family = AF_INET;
hostinfo.sin_addr = *((LPIN_ADDR) *hostent->h_addr_list); // sin.addr储存IP地址
hostinfo.sin_port = htons(i); // sin_port储存端口号
// htons 是将整型变量从主机字节顺序转变成网络字节顺序,
// 就是整数在地址空间存储方式变为:高位字节存放在内存的低地址处。
nret = connect(thesocket,
(LPSOCKADDR) &hostinfo,
sizeof(hostinfo)); // connect()函数:发送一个连接请求,返回值为 0成功。
// TCP是面向连接的、可靠的传输协议。
//参数一:套接字描述符
//参数二:指向数据机构sockaddr的指针,其中包括目的端口和IP地址
//参数三:参数二sockaddr的长度,可以通过sizeof(struct sockaddr)获得
//返回值为0代表成功
if(nret == 0)
{
//printf("\n\t%d\n", i);
++nopen;
}
}
// printf("\nScan complete.\n\n");
// printf("Number of ports opened = %d\n", nopen);
ThreadOpened--;
closesocket(thesocket);
return 0;
}
| [
"1395943920@qq.com"
] | 1395943920@qq.com |
5e93432b739bc2abd741ad052ba8772342d8e8e0 | d8effd075768aecbf0a590804e6c94127954d01c | /noz/src/noz/Nodes/Layout/Layout.h | f65bd5d4f5844c4ba61eafbfcd8c6f9c341d193a | [] | no_license | nozgames/noz-cpp | 55c88e0ea92408433ca34399f31007418d46a063 | 0466c938f54edf846c01dd195ce870b366821e99 | refs/heads/master | 2022-11-24T04:20:51.348835 | 2020-07-30T21:42:48 | 2020-07-30T21:42:48 | 283,881,452 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 490 | h | ///////////////////////////////////////////////////////////////////////////////
// NoZ Engine Framework
// Copyright (C) 2015 NoZ Games, LLC
// http://www.nozgames.com
///////////////////////////////////////////////////////////////////////////////
#ifndef __noz_Layout_h__
#define __noz_Layout_h__
namespace noz {
class Layout : public Node {
NOZ_OBJECT()
/// Default constructor for layout
protected: Layout (void);
};
} // namespace noz
#endif //__noz_Layout_h__
| [
"bryan.dube@resultstack.com"
] | bryan.dube@resultstack.com |
6bf4928d6de113fff89dbe8129111a7fe34bc3b8 | 6f8441f7e78f2014fdaf22675c12d991634a47da | /main.cpp | 920877d9cd3042f7a0316f5f553e957243f17146 | [
"MIT"
] | permissive | sheepy0125/SDL2-Pong | d52059e92cf5e7eeee663d678bd9403fb44bd72e | 9271280704394d13a266caaacb5167b05da322df | refs/heads/main | 2023-08-19T04:00:01.798562 | 2021-10-20T16:52:01 | 2021-10-20T16:52:01 | 418,721,353 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,682 | cpp | /* ===== *\
|* Setup *|
\* ===== */
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <iostream>
#include <string>
using namespace std;
/* Initialize SDL2 */
SDL_Renderer *renderer;
SDL_Window *window;
TTF_Font *font;
SDL_Color color;
/* Variables */
int frameCount;
int lastFrame;
int timerFPS;
int fps;
bool running = true;
/* Globals */
#define PI 3.14159265358979323846
#define WIDTH 720
#define HEIGHT 720
#define FONT_SIZE 32
#define FONT_PATH "assets/Peepo.ttf"
#define BALL_SIZE 16
#define BALL_START_SPEED 8
#define BALL_MAX_SPEED 16
#define BALL_SPEED_INC 1
#define PADDLE_SPEED 16
#define PADDLE_WIDTH 12
#define PADDLE_HEIGHT (HEIGHT / 8)
#define PADDLE_OFFSET 32
#define COMPUTER_PADDLE_SPEED (PADDLE_SPEED / 4)
/* Ball and paddles */
SDL_Rect scoreBoard;
SDL_Rect leftPaddle;
int leftScore;
SDL_Rect rightPaddle;
int rightScore;
SDL_Rect ball; /* TODO: turn into a circle */
int ballSpeed = BALL_START_SPEED;
float ballVelX, ballVelY = ballSpeed;
string score;
bool leftPlayerTurn;
/* ======================= *\
|* Turn bool into -1 or +1 *|
\* ======================= */
int turnPositiveOrNegative(bool theBool) {
if (theBool)
return 1;
return -1;
}
/* ======================= *\
|* Draw text to scoreboard *|
\* ======================= */
int drawTextToScoreboard(string text) {
int x = ((WIDTH / 2) + FONT_SIZE);
int y = (FONT_SIZE * 2);
SDL_Surface *surface;
SDL_Texture *texture;
/* Ensure font is loaded */
if (font == NULL) {
cerr << "Attempted to draw text, but font is null";
return 1;
}
/* Create surface and texture */
const char *textString = text.c_str();
surface = TTF_RenderText_Solid(font, textString, color);
texture = SDL_CreateTextureFromSurface(renderer, surface);
/* Update scoreboard */
scoreBoard.w = surface->w;
scoreBoard.h = surface->h;
scoreBoard.x = x - scoreBoard.w;
scoreBoard.y = y - scoreBoard.h;
/* We don't have a rect here (not needed), hence the NULL */
SDL_RenderCopy(renderer, texture, NULL, &scoreBoard);
/* Cleanup */
SDL_FreeSurface(surface);
SDL_DestroyTexture(texture);
return 0;
}
/* ===== *\
|* Serve *|
\* ===== */
void serve(void) {
/* Reset paddles*/
leftPaddle.y = rightPaddle.y = (HEIGHT / 2) - (PADDLE_HEIGHT / 2);
/* Reset ball */
ballSpeed = BALL_START_SPEED;
ball.x = (WIDTH / 2) - (BALL_SIZE / 2);
ball.y = (HEIGHT / 2) - (BALL_SIZE / 2);
ballVelY = 0;
/* Ball velocity */
if (leftPlayerTurn)
ballVelX = ballSpeed;
else
ballVelX = -ballSpeed;
/* Switch turn (whoever's turn currently is the person who won */
leftPlayerTurn = !leftPlayerTurn;
return;
}
/* ============= *\
|* Ball movement *|
\* ============= */
void ballMovement(void) {
ball.x += ballVelX;
ball.y += ballVelY;
return;
}
/* ================= *\
|* Computer movement *|
\* ================= */
void computerMovement(void) {
/* Go to the ball */
/* Need to go higher */
if (ball.y < (rightPaddle.y + (PADDLE_HEIGHT / 2)))
rightPaddle.y -= COMPUTER_PADDLE_SPEED;
/* Need to go lower */
if (ball.y > (rightPaddle.y + (PADDLE_HEIGHT / 2)))
rightPaddle.y += COMPUTER_PADDLE_SPEED;
return;
}
/* ================== *\
|* Get opposite angle *|
\* ================== */
double getOppositeAngle(int paddleY) {
/* Gets the opposite angle of where the ball hit the paddle */
/* What Y value on the paddle is the ball touching (from 0-PADDLE_HEIGHT) */
double rel_y = (paddleY + (PADDLE_HEIGHT / 2)) - (ball.y + (BALL_SIZE / 2));
/* Turn the relative Y value to be a number from 0-1 or 1-2, with the
* turning point being halfway through the paddle */
double normalized_y = rel_y / (PADDLE_HEIGHT / 2);
/* Turn that into an angle using glorious π
* The maximum angle will be 75° */
double angle = normalized_y * (5 * PI / 12);
return angle;
}
/* ======================= *\
|* Ball collision checking *|
\* ======================= */
void ballCollisionCheck(void) {
/* Top or bottom */
if (ball.y <= 0 || (ball.y + BALL_SIZE) >= HEIGHT)
ballVelY *= -1;
/* Off screen */
else if ((ball.x - BALL_SIZE) > WIDTH) { /* left scored */
serve();
leftScore++;
} else if (ball.x < 0) { /* right scored */
serve();
rightScore++;
}
double oppositeAngle;
/* Touching paddles */
if (SDL_HasIntersection(&ball, &leftPaddle)) {
oppositeAngle = getOppositeAngle(leftPaddle.y);
leftPlayerTurn = false;
} else if (SDL_HasIntersection(&ball, &rightPaddle)) {
oppositeAngle = -getOppositeAngle(rightPaddle.y);
leftPlayerTurn = true;
} else
return;
/* Touched one of the paddles */
ballSpeed += BALL_SPEED_INC;
if (ballSpeed > BALL_MAX_SPEED)
ballSpeed = BALL_MAX_SPEED;
/* Velocities */
ballVelX = turnPositiveOrNegative(!leftPlayerTurn) * ballSpeed *
cos(oppositeAngle);
ballVelY = (sin(oppositeAngle) * ballSpeed);
// ballVelY = (ballSpeed - abs(ballVelX)); /* Too slow, see updated */
return;
}
/* ====== *\
|* Update *|
\* ====== */
void update(void) {
/* Score */
score = to_string(leftScore) + " " + to_string(rightScore);
/* Disallow paddles moving past the screen */
/* Left paddle */
if ((leftPaddle.y + PADDLE_HEIGHT) >= HEIGHT)
leftPaddle.y = (HEIGHT - PADDLE_HEIGHT);
else if (leftPaddle.y <= 0)
leftPaddle.y = 0;
/* Right paddle */
if ((rightPaddle.y + PADDLE_HEIGHT) >= HEIGHT)
rightPaddle.y = (HEIGHT - PADDLE_HEIGHT);
else if (rightPaddle.y <= 0)
rightPaddle.y = 0;
/* Only move computer paddle when it's their turn */
if (!leftPlayerTurn)
computerMovement();
ballMovement();
ballCollisionCheck();
return;
}
/* ===== *\
|* Input *|
\* ===== */
void input(void) {
/* Pull events */
SDL_Event event;
const Uint8 *keystates = SDL_GetKeyboardState(NULL);
/* Events */
while (SDL_PollEvent(&event)) {
if (event.type == SDL_QUIT) /* exit */
running = false;
}
/* Keys */
/* exit */
if (keystates[SDL_SCANCODE_ESCAPE]) {
running = false;
}
/* up */
if (keystates[SDL_SCANCODE_UP]) {
leftPaddle.y -= PADDLE_SPEED;
}
/* down */
if (keystates[SDL_SCANCODE_DOWN]) {
leftPaddle.y += PADDLE_SPEED;
}
return;
}
/* ====== *\
|* Render *|
\* ====== */
void render(void) {
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 255);
SDL_RenderClear(renderer);
SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 255);
/* Delay for stable FPS, like clock.tick */
++frameCount;
timerFPS = SDL_GetTicks() - lastFrame;
if (timerFPS < (1000 / 60)) {
SDL_Delay((1000 / 60) - timerFPS);
}
/* Paddles and ball */
SDL_RenderFillRect(renderer, &leftPaddle);
SDL_RenderFillRect(renderer, &rightPaddle);
SDL_RenderFillRect(renderer, &ball);
/* Scoreboard */
drawTextToScoreboard(score);
/* Show everything */
SDL_RenderPresent(renderer);
return;
}
/* ==== *\
|* Main *|
\* ==== */
int main(void) {
/* Create window with error handling */
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
cerr << "Failed to initialize SDL" << endl;
return 1;
}
if (SDL_CreateWindowAndRenderer(WIDTH, HEIGHT, 0, &window, &renderer) < 0) {
cerr << "Failed to create window" << endl;
return 1;
}
static int lastTime = 0;
/* Intialize other stuffs */
TTF_Init();
font = TTF_OpenFont(FONT_PATH, FONT_SIZE);
/* Color */
color.r = color.g = color.b = 255;
/* Ball and paddles */
leftScore = rightScore = 0;
leftPaddle.x = PADDLE_OFFSET;
leftPaddle.h = PADDLE_HEIGHT;
leftPaddle.y = (HEIGHT / 2) - (PADDLE_HEIGHT / 2); /* serve(); */
leftPaddle.w = PADDLE_WIDTH;
rightPaddle = leftPaddle; /* Right paddle is almost the same as
the left paddle except for position */
rightPaddle.x = (WIDTH - rightPaddle.w - 32);
ball.w = ball.h = BALL_SIZE;
/* Serve ball for first time */
serve();
/* Main loop */
do {
/* Frame and FPS stuff */
lastFrame = SDL_GetTicks();
if (lastFrame >= (lastTime + 1000)) { /* A second has passed */
lastTime = lastFrame;
fps = frameCount;
frameCount = 0;
}
/* Game code */
input();
update();
render();
} while (running);
return 0;
} | [
"sheepy404@gmail.com"
] | sheepy404@gmail.com |
ce6051c68c60abb7ba45e8b53ee8157246a83be1 | 7732bdbf2f7e074d5e001d5b79359629bf44090e | /django/cpp-django-react/cpp0/lights.cpp | e3c84a5cbd4fe07c11214edad5670a70e6954a3c | [] | no_license | urytururur/oldPi | 242f54fb516e25fea57b0562b8edf1196b7a2e40 | 31bd84101878e07f8cae8553f0b799be89607a68 | refs/heads/master | 2023-01-09T11:23:44.195383 | 2019-12-16T16:59:39 | 2019-12-16T16:59:39 | 228,433,540 | 0 | 0 | null | 2023-01-07T12:52:37 | 2019-12-16T16:56:12 | PHP | UTF-8 | C++ | false | false | 419 | cpp | #include "lights.h"
int Light::getOn()
{
return m_on;
}
void Light::setOn(int val)
{
m_on = val;
}
int Light::getBri()
{
return m_bri;
}
void Light::setBri(int val)
{
m_bri = val;
}
int Light::getHue()
{
return m_hue;
}
void Light::setHue(int val)
{
m_hue = val;
}
int Light::getSat()
{
return m_sat;
}
void Light::setSat(int val)
{
m_sat = val;
} | [
"torbjorn.ekstedt@hotmail.com"
] | torbjorn.ekstedt@hotmail.com |
2abd3f47a36c622e26d9d71239a2471b2f09906b | 35f8526b274760e72d35d426600b6bf435b91e50 | /src/component/componentstd.cpp | 206eedf6254e59dd7b15f7ecc81904946c81b550 | [] | no_license | madeso/pwn-engine | f9ca6a4551edbad719ff2c6999e5fc9e97b6a211 | c4767e5d798d5768e1bbf8a9ac73b6fb186ae497 | refs/heads/master | 2021-01-20T04:31:06.326355 | 2020-06-14T13:31:36 | 2020-06-14T13:31:36 | 33,419,254 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,831 | cpp | #include <pwn/component/componentstd.h>
#include <pwn/component/component.h>
#include <pwn/component/eventargs.h>
#include <pwn/component/property.h>
#include <pwn/component/componentdef.h>
#include <pwn/component/object.h>
namespace pwn
{
namespace component
{
class ComponentTimeout : public Component
{
public:
ComponentTimeout(const ComponentArgs& args)
: time(locals.refReal())
, ev(args.get("event")->getEvent())
{
time = args.get("time")->getReal();
}
void
onUpdate(const EventArgs& a)
{
const real delta = a[0].getReal();
time -= delta;
if (time < delta)
{
markForRemoval();
sendObjectEvent(ev, EventArgs());
}
}
DECLARE_CALLBACK();
static boost::shared_ptr<Component>
Create(const PropertyMap&, const ComponentArgs& args)
{
boost::shared_ptr<Component> c(new ComponentTimeout(args));
return c;
}
private:
core::EnumValue ev;
real& time;
};
BEGIN_EVENT_TABLE(ComponentTimeout)
REGISTER_CALLBACK(Update, onUpdate);
END_EVENT_TABLE()
//-----------------------------------------------------------------------------------------------
class ComponentReboundingHealth : public Component
{
public:
ComponentReboundingHealth(
const PropertyMap& props,
const ComponentArgs& args)
: health(props.get("health")->refReal())
, currentPauseTime(locals.refReal())
, regenPower(args.get("regen")->getReal())
, waitTime(args.get("wait")->getReal())
{
}
void
onUpdate(const EventArgs& args)
{
const real delta = args[0].getReal();
if (currentPauseTime <= 0)
{
health += regenPower * delta;
}
else
{
currentPauseTime -= delta;
}
}
void
onDamage(const EventArgs& args)
{
currentPauseTime = waitTime;
}
static boost::shared_ptr<Component>
Create(const PropertyMap& props, const ComponentArgs& args)
{
boost::shared_ptr<Component> c(
new ComponentReboundingHealth(props, args));
return c;
}
DECLARE_CALLBACK();
private:
real& health;
real& currentPauseTime;
const real regenPower;
const real waitTime;
};
BEGIN_EVENT_TABLE(ComponentReboundingHealth)
REGISTER_CALLBACK(Update, onUpdate);
REGISTER_CALLBACK(Damage, onDamage);
END_EVENT_TABLE()
//-----------------------------------------------------------------------------------------------
ComponentCreator::ComponentCreator()
{
}
ComponentCreator::~ComponentCreator()
{
}
boost::shared_ptr<Component>
ComponentCreator::create(
const ID& name,
const PropertyMap& props,
const ComponentArgs& args) const
{
Functions::const_iterator r = functions.find(name);
if (r == functions.end())
{
throw "unknown component";
}
return r->second(props, args);
}
void
ComponentCreator::add(const ID& name, CreateFunction func)
{
functions.insert(Functions::value_type(name, func));
}
//-----------------------------------------------------------------------------------------------
void
AddStandardComponents(ComponentCreator* cc)
{
cc->add("rebounding-health", ComponentReboundingHealth::Create);
cc->add("timeout", ComponentTimeout::Create);
}
}
}
| [
"sir.gustav.the.coder@gmail.com"
] | sir.gustav.the.coder@gmail.com |
f5b95393023973b99fa2fafcfaf9bf981c6ea32e | 1e2b69476b2b174ac210ba525b197c621280a390 | /L1Trigger/TrackFindingTracklet/test/PlotMacros/z0_and_rinv.cc | bffa3c5476e9e2a52f0154dfd64594be5d984137 | [
"Apache-2.0"
] | permissive | skinnari/cmssw | 640e5fe2f23a423ccb7afe82d43ea1b80a2603f0 | 62b49319e475fbcf14484d77814d47a552c61f63 | refs/heads/L1TK_CMSSW_11-1-0-pre4 | 2022-10-27T03:55:33.402157 | 2020-03-24T14:18:04 | 2020-03-24T14:18:04 | 11,660,178 | 2 | 3 | Apache-2.0 | 2020-03-24T14:16:54 | 2013-07-25T12:44:13 | C++ | UTF-8 | C++ | false | false | 2,181 | cc | #include "TMath.h"
#include "TRint.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TLorentzVector.h"
#include "TCanvas.h"
#include "TH1.h"
#include "TGaxis.h"
#include <fstream>
#include <iostream>
#include "TMath.h"
void z0_and_rinv(){
//
// To see the output of this macro, click here.
//
#include "TMath.h"
gROOT->Reset();
gROOT->SetStyle("Plain");
gStyle->SetCanvasColor(kWhite);
gStyle->SetCanvasBorderMode(0); // turn off canvas borders
gStyle->SetPadBorderMode(0);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(1);
// For publishing:
gStyle->SetLineWidth(1.5);
gStyle->SetTextSize(1.1);
gStyle->SetLabelSize(0.06,"xy");
gStyle->SetTitleSize(0.06,"xy");
gStyle->SetTitleOffset(1.2,"x");
gStyle->SetTitleOffset(1.0,"y");
gStyle->SetPadTopMargin(0.1);
gStyle->SetPadRightMargin(0.1);
gStyle->SetPadBottomMargin(0.16);
gStyle->SetPadLeftMargin(0.12);
TCanvas* c1 = new TCanvas("c1","Track performance",200,10,700,800);
c1->Divide(2,3);
c1->SetFillColor(0);
c1->SetGrid();
TH1 *hist1 = new TH1F("h1","z0 for accepted stub pairs L1L2",50,-50.0,50.0);
TH1 *hist2 = new TH1F("h2","rinv for acceptes stub pairs L1L2",50,-0.01,0.01);
TH1 *hist3 = new TH1F("h3","z0 for accepted stub pairs L3L4",50,-50.0,50.0);
TH1 *hist4 = new TH1F("h4","rinv for acceptes stub pairs L3L4",50,-0.01,0.01);
TH1 *hist5 = new TH1F("h5","z0 for accepted stub pairs L5L6",50,-50.0,50.0);
TH1 *hist6 = new TH1F("h6","rinv for acceptes stub pairs L5L6",50,-0.01,0.01);
ifstream in("z0_and_rinv.txt");
int count=0;
while (in.good()){
double z0,rinv;
int layer;
in>>layer>>z0>>rinv;
if (!in.good()) continue;
if (layer==1) {
hist1->Fill(z0);
hist2->Fill(rinv);
}
if (layer==3) {
hist3->Fill(z0);
hist4->Fill(rinv);
}
if (layer==5) {
hist5->Fill(z0);
hist6->Fill(rinv);
}
count++;
}
cout << "Processed: "<<count<<" events"<<endl;
c1->cd(1);
hist1->Draw();
c1->cd(2);
hist2->Draw();
c1->cd(3);
hist3->Draw();
c1->cd(4);
hist4->Draw();
c1->cd(5);
hist5->Draw();
c1->cd(6);
hist6->Draw();
c1->Print("z0_and_rinv.png");
c1->Print("z0_and_rinv.pdf");
}
| [
"louise.skinnari@cern.ch"
] | louise.skinnari@cern.ch |
85f7bb09f4230d594e5b784c78c7dbcf2c65f3b3 | 1c9d4bfb2e1252dd077f3cf6ea68544d8c9387e7 | /SimpleRayCaster/main.cpp | 248c2525742ee01529a0a144a3d3027ccbc1150b | [] | no_license | krishnaprasadsoundararajan/VolVis | ae5d952bf618a236c8a20cdfae67fc56c67d1ade | d6e1ce76494b065442f5d1d53aac0cab4bcf187e | refs/heads/master | 2020-04-06T04:59:40.584911 | 2014-09-22T13:15:17 | 2014-09-22T13:15:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,633 | cpp | // SimpleRaycaster
// Program to demonstrate single pass raycasting using OpenGL 2.0 functionality.
// The implementation uses GLEW for extension handling and GLUT for the user
// interface. The program requires vertex and fragment shaders in the
// subdirectory /shaders.
// Max Hermann, 2013
#include "GLConfig.h"
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include <iostream>
#include "SimpleRaycaster.h"
#include "VolumeData.h"
#include "LookupTable.h"
#include "Filename.h"
#include "glm-0.9.5.4\glm\glm\glm.hpp"
#include "glm-0.9.5.4\glm\glm\ext.hpp"
#include "glm-0.9.5.4\glm\glm\gtc\matrix_transform.hpp"
using namespace std;
//------------------------------------------------------------------------------
// Globals
//------------------------------------------------------------------------------
const char g_usage[] =
"Simple raycaster application \n"
"Max Hermann 2013 \n"
"\n"
"Usage: SimpleRaycaster <volume.mhd> <lookup.table> \n"
"\n";
SimpleRaycaster g_raycaster;
VolumeDataHeader* g_volume;
//LookupTable g_lookuptable;
float g_rotx=0.f, g_roty=0.f, g_rotz= 90.f;
//------------------------------------------------------------------------------
// Forward declarations
//------------------------------------------------------------------------------
/// Helper function to load a MHD image volume from disk.
VolumeDataHeader* load_volume( const char* filename, int verb, void** data_ptr );
//------------------------------------------------------------------------------
// Application menu
//------------------------------------------------------------------------------
enum Menu {
MENU_SHADER_ISO,
MENU_SHADER_TAGGED,
MENU_SHADER_RISK,
MENU_PROBABILITY_WEIGTED,
DIFFUSE_SWITCH
};
string vsName, fsName;
void menu( int entry )
{
switch( entry )
{
case MENU_SHADER_ISO:
fsName = "shader/raycast-iso.fs.glsl";
vsName = "shader/raycast.vs.glsl";
g_raycaster.getRaycastShader().load_shader
("shader/raycast.vs.glsl","shader/raycast-iso.fs.glsl");
break;
case MENU_SHADER_TAGGED:
g_raycaster.getRaycastShader().load_shader
("shader/raycast.vs.glsl","shader/raycast-tagged_new.fs.glsl");
break;
case MENU_SHADER_RISK:
g_raycaster.getRaycastShader().load_shader
("shader/raycast.vs.glsl","shader/risk-based.fs.glsl");
break;
case MENU_PROBABILITY_WEIGTED:
g_raycaster.getRaycastShader().load_shader
("shader/raycast.vs.glsl","shader/raycast-probability-weighted.fs.glsl");
//g_lookuptable.reload();
//g_raycaster.setLookupTable( );
break;
case DIFFUSE_SWITCH:
g_raycaster.getRaycastShader().diffuseSwitch();
g_raycaster.getRaycastShader().load_shader
("shader/raycast.vs.glsl","shader/raycast-tagged.fs.glsl");
break;
}
glutPostRedisplay();
}
void setupMenu()
{
glutCreateMenu( menu );
glutAddMenuEntry( "Shader ISO", MENU_SHADER_ISO );
glutAddMenuEntry( "Shader TAGGED", MENU_SHADER_TAGGED );
glutAddMenuEntry( "Shader RISK", MENU_SHADER_RISK );
glutAddMenuEntry( "PROBABILITY WEIGHTED", MENU_PROBABILITY_WEIGTED );
glutAddMenuEntry( "DiffuseLight On/Off", DIFFUSE_SWITCH);
glutAttachMenu( GLUT_RIGHT_BUTTON );
}
//------------------------------------------------------------------------------
// Application setup
//------------------------------------------------------------------------------
int init( const char* filename, const char* filename_lookupTable,
int width=512, int height=512 )
{
// --- Check for required OpenGL version and extensions ---
const char extRequired[] =
// GL core 1.2
"GL_EXT_texture3D "
// GL core 2.0
"GL_ARB_shading_language_100 "
"GL_ARB_fragment_shader "
"GL_ARB_vertex_shader "
// GL core 3.0
"GL_ARB_texture_float "
"GL_EXT_framebuffer_object ";
// Required GL extensions
if( !glewIsSupported( "GL_ARB_vertex_shader" )) //extRequired ))
{
cerr << "Error: Insufficient GPU capabilities, maybe installing an "
" new driver version will help." << endl
<< "The following capabilities / extensions are required: " << endl
<< extRequired << endl;
return -67;
}
// Optional GL extensions
if( !glewIsSupported("GL_ARB_texture_non_power_of_two") )
{
cerr << "Warning: GL_ARB_texture_non_power_of_two not supported, i.e. "
"only image volumes width power of two edge lengths are "
"supported." << endl;
}
// --- Load volume dataset ---
void* dataptr = NULL;
g_volume = load_volume( filename, 3, &dataptr );
if( !g_volume )
{
cerr << "Error: Couldn't load volume data from " << filename << "!"
<< endl;
return -1;
}
// --- Load lookup table ---
//if( !g_lookuptable.read( filename_lookupTable ) )
//{
//return -4;
//}
// --- Init RaycastShader ---
// Setup raycaster
if( !g_raycaster.init( width, height ) )
{
cerr << "Error: Initializing raycaster failed!" << endl;
return -2;
}
// Set default shader
if( !g_raycaster.getRaycastShader().load_shader
("shader/raycast.vs.glsl","shader/risk-based.fs.glsl") )
{
cerr << "Error: Could not load default shader!" << endl;
return -5;
}
// Download lookup table
g_raycaster.setLookupTable( );
// Download volume
if( !g_raycaster.downloadVolume(
g_volume->resX(), g_volume->resY(), g_volume->resZ(),
GL_UNSIGNED_BYTE, dataptr ) )
{
return -3;
}
// Some default OpenGL states
glClearColor( 0,0,1,1 );
glColor4f( 1,1,1,1 );
// --- Setup GLUT menu ---
setupMenu();
return 1;
}
void destroy()
{
g_raycaster.destroy();
if( g_volume ) delete g_volume; g_volume = NULL;
}
//------------------------------------------------------------------------------
// GLUT callbacks
//------------------------------------------------------------------------------
void render()
{
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glEnable( GL_DEPTH_TEST );
//GLfloat dlr = 1.0f;
//GLfloat dlg = 1.0f;
//GLfloat dlb = 1.0f;
//ambient light color variables
GLfloat alr = 1.0f;
GLfloat alg = 1.0f;
GLfloat alb = 1.0f;
//light position variables
GLfloat lx = 0.0f;
GLfloat ly = 0.0f;
GLfloat lz = 0.0f;
GLfloat lw = 1.0f;
GLfloat redDiffuseMaterial[] = {1.0, 1.0, 1.0}; //set the material to red
GLfloat whiteSpecularMaterial[] = {1.0, 1, 1}; //set the material to white
GLfloat greenEmissiveMaterial[] = {1,1,1}; //set the material to green
//GLfloat whiteSpecularLight[] = {1.0, 1.0, 1.0}; //set the light specular to white
//GLfloat blackAmbientLight[] = {0.0, 0.0, 0.0}; //set the light ambient to black
//GLfloat whiteDiffuseLight[] = {1.0, 1.0, 1.0}; //set the diffuse light to white
//GLfloat blankMaterial[] = {0.0, 0.0, 0.0}; //set the diffuse light to white
//GLfloat DiffuseLight[] = {dlr, dlg, dlb};
GLfloat AmbientLight[] = {alr, alg, alb};
GLfloat mShininess[] = {128};
//glLightfv (GL_LIGHT0, GL_DIFFUSE, DiffuseLight);
glLightfv (GL_LIGHT1, GL_AMBIENT, AmbientLight);
GLfloat LightPosition[] = {lx, ly, lz, lw};
glLightfv (GL_LIGHT0, GL_POSITION, LightPosition);
gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
// Camera
glLoadIdentity();
glTranslatef( 0,0,-5.f );
glRotatef( g_rotx, 1,0,0 );
glRotatef( g_roty, 0,1,0 );
glRotatef(g_rotz,0,0,1);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR,whiteSpecularMaterial);
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mShininess);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, redDiffuseMaterial);
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, greenEmissiveMaterial);
// Perform raycasting
g_raycaster.render();
glutSwapBuffers();
}
void reshape( int width, int height )
{
float aspect = width / (float)height;
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gluPerspective( 30, aspect, 0.1, 100 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
GLfloat LightPosition[] = {0.0,0.0,0.0,1.0};
glLightfv (GL_LIGHT0, GL_POSITION, LightPosition); //added
}
void motion( int x, int y )
{
// Simple camera, where pressing in the right/left and bottom/top of the
// window produces rotation around y and x axis, respectively.
int viewport[4];
glGetIntegerv( GL_VIEWPORT, viewport );
g_rotx = (2.f*(y / (float)viewport[3]) - 1.f) * 90.f;
g_roty = (2.f*(x / (float)viewport[2]) - 1.f) * 180.f;
GLfloat LightPosition[] = {0.0,0.0,0.0,1.0};
glLightfv (GL_LIGHT0, GL_POSITION, LightPosition);
glutPostRedisplay();
}
//------------------------------------------------------------------------------
// main()
//------------------------------------------------------------------------------
int main( int argc, char* argv[] )
{
if( argc != 3 )
{
cout << g_usage << endl;
return 0;
}
// size of render texture
const int width = 512,
height = 512;
// setup GLUT
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutInitWindowSize( width, height );
glutCreateWindow( "SimpleRaycaster" );
glutReshapeFunc ( reshape );
glutDisplayFunc ( render );
glutMotionFunc ( motion );
// setup GLEW
GLenum glew_err = glewInit();
if( glew_err != GLEW_OK )
{
cerr << "GLEW error:" << glewGetErrorString(glew_err) << endl;
return -11;
}
// init application
int ret = init( argv[1], argv[2], width, height ); // "data/Engine.mhd"
if( ret < 0 )
return ret;
// exit function
atexit( destroy );
// mainloop
glutMainLoop();
// never reached, glutMainLoop() quits with exit()
return 0;
}
//------------------------------------------------------------------------------
// Helper functions
//------------------------------------------------------------------------------
VolumeDataHeader* load_volume( const char* filename, int verb, void** data_ptr )
{
Misc::Filename fname( filename );
VolumeDataHeader* vol = NULL;
// -- load MHD/DAT header --
if( verb > 1 )
cout <<"Loading volume dataset \""<< fname.filename <<"\"..."<<endl;
VolumeDataHeaderLoaderMHD mhd;
VolumeDataHeaderLoaderDAT dat;
if( fname.ext == "mhd" )
{
if( mhd.load( fname.filename.c_str() ) )
vol = (VolumeDataHeader*)&mhd;
}
else
if( fname.ext == "dat" )
{
if( dat.load( fname.filename.c_str() ) )
vol = (VolumeDataHeader*)&dat;
}
else
{
cerr << "Error: Unknown file extension " << fname.ext << "!" << endl;
return NULL;
}
if( !vol )
{
cerr << "Error: Couldn't load " << fname.filename << "!" << endl;
return NULL;
}
// -- load RAW volume data --
std::string raw_filename = fname.path + vol->filename();
VolumeDataBase* base = VolumeDataBase::load_raw( raw_filename.c_str(), vol );
*data_ptr = base ? base->void_ptr() : NULL;
return (VolumeDataHeader*)base;
}
| [
"krishnaprasad.s89@gmail.com"
] | krishnaprasad.s89@gmail.com |
e6fbc54092ba33cde79a5b24c2d04496949c5a4c | 474a2c29d3104cc8d8c574d9a191777012d5a821 | /samples/hypercube/HCPacket_m.cc | 5a22d6da02d49ae4524bc81aa2a883730f1a60cf | [] | no_license | OsDim/NTUT_NG-PON2 | 5eda2a3d1bc2c2b3e30b481ad0bd4e892dd71c6f | dbd78aeab3fee094142eb181288846f5eaa6f596 | refs/heads/master | 2021-01-22T10:19:08.579237 | 2017-10-06T10:21:05 | 2017-10-06T10:21:05 | 102,335,095 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,794 | cc | //
// Generated file, do not edit! Created by nedtool 4.6 from HCPacket.msg.
//
// Disable warnings about unused variables, empty switch stmts, etc:
#ifdef _MSC_VER
# pragma warning(disable:4101)
# pragma warning(disable:4065)
#endif
#include <iostream>
#include <sstream>
#include "HCPacket_m.h"
USING_NAMESPACE
// Another default rule (prevents compiler from choosing base class' doPacking())
template<typename T>
void doPacking(cCommBuffer *, T& t) {
throw cRuntimeError("Parsim error: no doPacking() function for type %s or its base class (check .msg and _m.cc/h files!)",opp_typename(typeid(t)));
}
template<typename T>
void doUnpacking(cCommBuffer *, T& t) {
throw cRuntimeError("Parsim error: no doUnpacking() function for type %s or its base class (check .msg and _m.cc/h files!)",opp_typename(typeid(t)));
}
// Template rule for outputting std::vector<T> types
template<typename T, typename A>
inline std::ostream& operator<<(std::ostream& out, const std::vector<T,A>& vec)
{
out.put('{');
for(typename std::vector<T,A>::const_iterator it = vec.begin(); it != vec.end(); ++it)
{
if (it != vec.begin()) {
out.put(','); out.put(' ');
}
out << *it;
}
out.put('}');
char buf[32];
sprintf(buf, " (size=%u)", (unsigned int)vec.size());
out.write(buf, strlen(buf));
return out;
}
// Template rule which fires if a struct or class doesn't have operator<<
template<typename T>
inline std::ostream& operator<<(std::ostream& out,const T&) {return out;}
Register_Class(HCPacket);
HCPacket::HCPacket(const char *name, int kind) : ::cPacket(name,kind)
{
this->srcAddress_var = 0;
this->destAddress_var = 0;
this->hops_var = 0;
}
HCPacket::HCPacket(const HCPacket& other) : ::cPacket(other)
{
copy(other);
}
HCPacket::~HCPacket()
{
}
HCPacket& HCPacket::operator=(const HCPacket& other)
{
if (this==&other) return *this;
::cPacket::operator=(other);
copy(other);
return *this;
}
void HCPacket::copy(const HCPacket& other)
{
this->srcAddress_var = other.srcAddress_var;
this->destAddress_var = other.destAddress_var;
this->hops_var = other.hops_var;
}
void HCPacket::parsimPack(cCommBuffer *b)
{
::cPacket::parsimPack(b);
doPacking(b,this->srcAddress_var);
doPacking(b,this->destAddress_var);
doPacking(b,this->hops_var);
}
void HCPacket::parsimUnpack(cCommBuffer *b)
{
::cPacket::parsimUnpack(b);
doUnpacking(b,this->srcAddress_var);
doUnpacking(b,this->destAddress_var);
doUnpacking(b,this->hops_var);
}
int HCPacket::getSrcAddress() const
{
return srcAddress_var;
}
void HCPacket::setSrcAddress(int srcAddress)
{
this->srcAddress_var = srcAddress;
}
int HCPacket::getDestAddress() const
{
return destAddress_var;
}
void HCPacket::setDestAddress(int destAddress)
{
this->destAddress_var = destAddress;
}
int HCPacket::getHops() const
{
return hops_var;
}
void HCPacket::setHops(int hops)
{
this->hops_var = hops;
}
class HCPacketDescriptor : public cClassDescriptor
{
public:
HCPacketDescriptor();
virtual ~HCPacketDescriptor();
virtual bool doesSupport(cObject *obj) const;
virtual const char *getProperty(const char *propertyname) const;
virtual int getFieldCount(void *object) const;
virtual const char *getFieldName(void *object, int field) const;
virtual int findField(void *object, const char *fieldName) const;
virtual unsigned int getFieldTypeFlags(void *object, int field) const;
virtual const char *getFieldTypeString(void *object, int field) const;
virtual const char *getFieldProperty(void *object, int field, const char *propertyname) const;
virtual int getArraySize(void *object, int field) const;
virtual std::string getFieldAsString(void *object, int field, int i) const;
virtual bool setFieldAsString(void *object, int field, int i, const char *value) const;
virtual const char *getFieldStructName(void *object, int field) const;
virtual void *getFieldStructPointer(void *object, int field, int i) const;
};
Register_ClassDescriptor(HCPacketDescriptor);
HCPacketDescriptor::HCPacketDescriptor() : cClassDescriptor("HCPacket", "cPacket")
{
}
HCPacketDescriptor::~HCPacketDescriptor()
{
}
bool HCPacketDescriptor::doesSupport(cObject *obj) const
{
return dynamic_cast<HCPacket *>(obj)!=NULL;
}
const char *HCPacketDescriptor::getProperty(const char *propertyname) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
return basedesc ? basedesc->getProperty(propertyname) : NULL;
}
int HCPacketDescriptor::getFieldCount(void *object) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
return basedesc ? 3+basedesc->getFieldCount(object) : 3;
}
unsigned int HCPacketDescriptor::getFieldTypeFlags(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldTypeFlags(object, field);
field -= basedesc->getFieldCount(object);
}
static unsigned int fieldTypeFlags[] = {
FD_ISEDITABLE,
FD_ISEDITABLE,
FD_ISEDITABLE,
};
return (field>=0 && field<3) ? fieldTypeFlags[field] : 0;
}
const char *HCPacketDescriptor::getFieldName(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldName(object, field);
field -= basedesc->getFieldCount(object);
}
static const char *fieldNames[] = {
"srcAddress",
"destAddress",
"hops",
};
return (field>=0 && field<3) ? fieldNames[field] : NULL;
}
int HCPacketDescriptor::findField(void *object, const char *fieldName) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
int base = basedesc ? basedesc->getFieldCount(object) : 0;
if (fieldName[0]=='s' && strcmp(fieldName, "srcAddress")==0) return base+0;
if (fieldName[0]=='d' && strcmp(fieldName, "destAddress")==0) return base+1;
if (fieldName[0]=='h' && strcmp(fieldName, "hops")==0) return base+2;
return basedesc ? basedesc->findField(object, fieldName) : -1;
}
const char *HCPacketDescriptor::getFieldTypeString(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldTypeString(object, field);
field -= basedesc->getFieldCount(object);
}
static const char *fieldTypeStrings[] = {
"int",
"int",
"int",
};
return (field>=0 && field<3) ? fieldTypeStrings[field] : NULL;
}
const char *HCPacketDescriptor::getFieldProperty(void *object, int field, const char *propertyname) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldProperty(object, field, propertyname);
field -= basedesc->getFieldCount(object);
}
switch (field) {
default: return NULL;
}
}
int HCPacketDescriptor::getArraySize(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getArraySize(object, field);
field -= basedesc->getFieldCount(object);
}
HCPacket *pp = (HCPacket *)object; (void)pp;
switch (field) {
default: return 0;
}
}
std::string HCPacketDescriptor::getFieldAsString(void *object, int field, int i) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldAsString(object,field,i);
field -= basedesc->getFieldCount(object);
}
HCPacket *pp = (HCPacket *)object; (void)pp;
switch (field) {
case 0: return long2string(pp->getSrcAddress());
case 1: return long2string(pp->getDestAddress());
case 2: return long2string(pp->getHops());
default: return "";
}
}
bool HCPacketDescriptor::setFieldAsString(void *object, int field, int i, const char *value) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->setFieldAsString(object,field,i,value);
field -= basedesc->getFieldCount(object);
}
HCPacket *pp = (HCPacket *)object; (void)pp;
switch (field) {
case 0: pp->setSrcAddress(string2long(value)); return true;
case 1: pp->setDestAddress(string2long(value)); return true;
case 2: pp->setHops(string2long(value)); return true;
default: return false;
}
}
const char *HCPacketDescriptor::getFieldStructName(void *object, int field) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldStructName(object, field);
field -= basedesc->getFieldCount(object);
}
switch (field) {
default: return NULL;
};
}
void *HCPacketDescriptor::getFieldStructPointer(void *object, int field, int i) const
{
cClassDescriptor *basedesc = getBaseClassDescriptor();
if (basedesc) {
if (field < basedesc->getFieldCount(object))
return basedesc->getFieldStructPointer(object, field, i);
field -= basedesc->getFieldCount(object);
}
HCPacket *pp = (HCPacket *)object; (void)pp;
switch (field) {
default: return NULL;
}
}
| [
"aqwszx2@gmail.com"
] | aqwszx2@gmail.com |
2e2b8efe82116af32d3ed949e37a6ccf6ebbcb60 | 4aef7908c86d0857d4571bc26e2c486b57010a0c | /Realisation/Programs/QTms/DataFrame.cpp | 00b36c1d60497eb57675ded46f5cab88adb00993 | [] | no_license | raviluminy/gk | 3d9b5e27d808b56a510bb9b5ef5b3a81818c2443 | 3c017394e12a36e922c93e0ddcb0baffc4849db5 | refs/heads/master | 2020-04-05T23:24:55.230480 | 2014-03-29T11:08:36 | 2014-03-29T11:08:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 195 | cpp | #include "DataFrame.h"
#include "ui_DataFrame.h"
DataFrame::DataFrame(QWidget* parent) :
QFrame(parent),
ui(new Ui::DataFrame) {
ui->setupUi(this);
}
DataFrame::~DataFrame() {
delete ui;
}
| [
"mehdi-jonathan@hotmail.fr"
] | mehdi-jonathan@hotmail.fr |
ed3dc497a53e3ae8b14931e8b6daa967a811023a | 2b53a25a83b9aa3298f7cf976dc70c734dcdb157 | /OnlineJudgeCode/0Big Number 所有運算(Trying).cpp | 05825c70e54f62ae44745e41b3282e3b28f3881e | [] | no_license | mopack/OnlineJudgeCode | 2e0ce6e77ad133e82f4d5ce3196b78b19a4631e5 | 7a8704b37a69323bd90ac885d1b90d409d877722 | refs/heads/master | 2020-03-20T16:39:46.304160 | 2018-11-23T17:06:22 | 2018-11-23T17:06:22 | 137,543,798 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,292 | cpp | //#include <bits/stdc++.h>
////#include "LeetCodeStd.h"
//// --------------- //
////static int fast = []() {ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); return 0; }();
////class Solution {
////public:
//// vector<int> findOrder(int N, vector<pair<int, int>>& L2F) {
////
//// }
////};
//#include <iostream>
//#include <cstdlib>
//#include <bitset>
//using namespace std;
//
//// max <= 10^7, thus max <= 2^24
//// max! <= max^max 24*24 <= 600
//
//struct big {
// bitset<192347> n;
// int len;
// big() {
// len = 0;
// for (int i = 0; i < 192347; i++)n[i] = 0;
// }
//}one;
//
//big shift(big n, int a);
//big power(big m, big n);
//big cn2(big n);
//big mul(big a, big b);
//big factorial(big n);
//big int2big(int in);
//
//big shift(big n, int a) {
// for (int i = 0; i < n.len - a; i++)n.n[i] = n.n[i + a];
// n.len-=a;
// return n;
//}
//big power(big m, big n) { //n>=1
// //printf("power(%d,%d)", big2int(m), big2int(n));
//
// big temp = one;
// while (n.len >1 ||(n.len==1 && n.n[0])) {
// if (n.n[0]) {
// //printf("mul(%d,%d)=%d\n", big2int(temp), big2int(m), big2int(mul(temp, m)));
// //printf("%d * %d=%d\n", big2int(temp), big2int(m), big2int(mul(temp, m)));
// temp = mul(temp, m);
//
// }
// //printf("%d * %d=%d\n", big2int(m), big2int(m), big2int(mul(m, m)));
// m = mul(m,m);
//
// // n/=2
// n = shift(n, 1);
// }
// //printf("=%lld\n",big2int(temp));
// return temp;
//}
//unsigned long long big2int(big n) {
// unsigned long long ans = 0, two = 1;
// for (int i = 0; i < n.len; i++) {
// ans += two * n.n[i];
// two *= 2;
// }
// return ans;
//}
//
//void printbi(big n) {
// for (int i = 10; i >= 0; i--) cout << n.n[i];
//
// cout << endl;
//}
//
//big cn2(big n) {
// int nint = big2int(n);
//
// // x = (2^n+1)
// big x;
// x.len = nint+1;
// x.n[0] = 1; x.n[x.len - 1] = 1;
//
// // (2^n+1)^n
// big result = power(x, n);
//
// //printf("power(%d, %d)=%d\n", big2int(x), n, big2int(result));
//
// // m = n / 2
// big m = shift(n, 1);
//
// // shift n per time, and shift m times; thus shift amount = m*n
// int sh = big2int(mul(m,n));
//
// big ans = shift(power(x, n), sh);
//
// // mask
// ans.len= n.len;
// while (ans.n[ans.len - 1] == 0)ans.len--;
//
// return ans;
//}
//big mul(big a, big b) {
// big c;
//
// for (int i = 0; i <= a.len + b.len; i++) c.n[i] = 0; //fill(a, a+N, 0)
//
// for (int ai = 0; ai < a.len; ai++) {
// for (int bi = 0; bi < b.len; bi++){
// if (a.n[ai] & b.n[bi]) {
// //c.n[ai + bi]++
// int k = ai + bi;
// while (c.n[k]) {
// c.n[k] = 0; k++;
// }
// c.n[k] = 1;
// }
// //printbi(c);
// }
// }
//
// c.len = a.len + b.len;
// if (c.n[c.len-1] == 0)c.len--;
//
// //printf("%d * %d = %d\n", big2int(a), big2int(b), big2int(c));
// return c;
//}
//big factorial(big n) {
// big m;
// if (n.len == 1 && n.n[0] == 1) {
// //cout << "=1\n";
// return one;
// }
// else if (n.n[0] == 1) {// is odd
// m = n;
// m.n[0] = 0;
// int ii = big2int(mul(n, factorial(m))) , in = big2int(n), ifm = big2int(factorial(m)), im= big2int(m);
// //printf("n=%d is odd. m=n-1=%d. return n*f(m-1)=%d*%d=%d\n", in, im, in, ifm, ii);
// return mul(n, factorial(m));
// }
// else {
// // n>> 1 (a.k.a n/=2)
// m.len = n.len-1;
// for (int i = 1; i < n.len; i++) m.n[i - 1] = n.n[i];
//
//
// m = factorial(m);
//
// int ic = big2int(cn2(n)), in = big2int(n), im = big2int(m), i2 = big2int(factorial(m)),imm=big2int(mul(m, m)),icm=big2int(mul(cn2(n), mul(m, m)));
// //printf("n=%d is even. m=(n/2)!=%d. return= cn2(n)*m*m = %d * %d = %d\n", in, im, ic, imm, icm);
//
// return mul(cn2(n), mul(m, m));
// }
//}
//big int2big(int in) {
// big d;
// //10carry->2carry
// d.len = 0;
// while (in > 0) {
// d.n[d.len++] = (in % 2);
// in >>= 1;
// }
// return d;
//}
//int main() {
// //bitset<64> s(string("1000100010001000100010001000100010001000100010001000100010001000"));
// //cout << sizeof(s) << endl;
//
//
// int qn, in;
// //cin >> qn;
// big d,f;
//
// one.len = 1; one.n[0] = 1;
//
// for (int i = 1; i <= 10; i++) {
// d = int2big(i);
// printf("%d! = %d\n",i,big2int(factorial(d)));
// }
//
// //for (int q = 1; q <= qn; q++) {
// // cin >> in;
// // d = int2big(in);
// // f = factorial(d);
// // cout << f.len << endl;
// //}
// system("pause");
// return 0;
//} | [
"mopackp@gmail.com"
] | mopackp@gmail.com |
8dfb0e2cc9cab9aa23fd46f3377dcdd841635a27 | ece30e7058d8bd42bc13c54560228bd7add50358 | /DataCollector/mozilla/xulrunner-sdk/include/mozilla/a11y/Role.h | dab6c53079f1fb2152ed8104c6342fed5f1c9546 | [
"Apache-2.0"
] | permissive | andrasigneczi/TravelOptimizer | b0fe4d53f6494d40ba4e8b98cc293cb5451542ee | b08805f97f0823fd28975a36db67193386aceb22 | refs/heads/master | 2022-07-22T02:07:32.619451 | 2018-12-03T13:58:21 | 2018-12-03T13:58:21 | 53,926,539 | 1 | 0 | Apache-2.0 | 2022-07-06T20:05:38 | 2016-03-15T08:16:59 | C++ | UTF-8 | C++ | false | false | 23,227 | h | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _role_h_
#define _role_h_
/**
* @note Make sure to update the localized role names when changing the list.
* @note When adding a new role, be sure to also add it to base/RoleMap.h and
* update nsIAccessibleRole.
*/
namespace mozilla {
namespace a11y {
namespace roles {
enum Role {
/**
* Used when accessible hans't strong defined role.
*/
NOTHING = 0,
/**
* Represents a title or caption bar for a window. It is used by MSAA only,
* supported automatically by MS Windows.
*/
TITLEBAR = 1,
/**
* Represents the menu bar (positioned beneath the title bar of a window)
* from which menus are selected by the user. The role is used by
* xul:menubar or role="menubar".
*/
MENUBAR = 2,
/**
* Represents a vertical or horizontal scroll bar, which is part of the client
* area or used in a control.
*/
SCROLLBAR = 3,
/**
* Represents a special mouse pointer, which allows a user to manipulate user
* interface elements such as windows. For example, a user clicks and drags
* a sizing grip in the lower-right corner of a window to resize it.
*/
GRIP = 4,
/**
* Represents a system sound, which is associated with various system events.
*/
SOUND = 5,
/**
* Represents the system mouse pointer.
*/
CURSOR = 6,
/**
* Represents the system caret. The role is supported for caret.
*/
CARET = 7,
/**
* Represents an alert or a condition that a user should be notified about.
* Assistive Technologies typically respond to the role by reading the entire
* onscreen contents of containers advertising this role. Should be used for
* warning dialogs, etc. The role is used by xul:browsermessage,
* role="alert".
*/
ALERT = 8,
/**
* Represents the window frame, which contains child objects such as
* a title bar, client, and other objects contained in a window. The role
* is supported automatically by MS Windows.
*/
WINDOW = 9,
/**
* A sub-document (<frame> or <iframe>)
*/
INTERNAL_FRAME = 10,
/**
* Represents a menu, which presents a list of options from which the user can
* make a selection to perform an action. It is used for role="menu".
*/
MENUPOPUP = 11,
/**
* Represents a menu item, which is an entry in a menu that a user can choose
* to carry out a command, select an option. It is used for xul:menuitem,
* role="menuitem".
*/
MENUITEM = 12,
/**
* Represents a ToolTip that provides helpful hints.
*/
TOOLTIP = 13,
/**
* Represents a main window for an application. It is used for
* role="application". Also refer to APP_ROOT
*/
APPLICATION = 14,
/**
* Represents a document window. A document window is always contained within
* an application window. It is used for role="document".
*/
DOCUMENT = 15,
/**
* Represents a pane within a frame or document window. Users can navigate
* between panes and within the contents of the current pane, but cannot
* navigate between items in different panes. Thus, panes represent a level
* of grouping lower than frame windows or documents, but above individual
* controls. It is used for the first child of a <frame> or <iframe>.
*/
PANE = 16,
/**
* Represents a graphical image used to represent data.
*/
CHART = 17,
/**
* Represents a dialog box or message box. It is used for xul:dialog,
* role="dialog".
*/
DIALOG = 18,
/**
* Represents a window border.
*/
BORDER = 19,
/**
* Logically groups other objects. There is not always a parent-child
* relationship between the grouping object and the objects it contains. It
* is used for html:textfield, xul:groupbox, role="group".
*/
GROUPING = 20,
/**
* Used to visually divide a space into two regions, such as a separator menu
* item or a bar that divides split panes within a window. It is used for
* xul:separator, html:hr, role="separator".
*/
SEPARATOR = 21,
/**
* Represents a toolbar, which is a grouping of controls (push buttons or
* toggle buttons) that provides easy access to frequently used features. It
* is used for xul:toolbar, role="toolbar".
*/
TOOLBAR = 22,
/**
* Represents a status bar, which is an area at the bottom of a window that
* displays information about the current operation, state of the application,
* or selected object. The status bar has multiple fields, which display
* different kinds of information. It is used for xul:statusbar.
*/
STATUSBAR = 23,
/**
* Represents a table that contains rows and columns of cells, and optionally,
* row headers and column headers. It is used for html:table,
* role="grid". Also refer to the following role: COLUMNHEADER,
* ROWHEADER, COLUMN, ROW, CELL.
*/
TABLE = 24,
/**
* Represents a column header, providing a visual label for a column in
* a table. It is used for XUL tree column headers, html:th,
* role="colheader". Also refer to TABLE.
*/
COLUMNHEADER = 25,
/**
* Represents a row header, which provides a visual label for a table row.
* It is used for role="rowheader". Also, see TABLE.
*/
ROWHEADER = 26,
/**
* Represents a column of cells within a table. Also, see TABLE.
*/
COLUMN = 27,
/**
* Represents a row of cells within a table. Also, see TABLE.
*/
ROW = 28,
/**
* Represents a cell within a table. It is used for html:td,
* xul:tree cell and xul:listcell. Also, see TABLE.
*/
CELL = 29,
/**
* Represents a link to something else. This object might look like text or
* a graphic, but it acts like a button. It is used for
* xul:label@class="text-link", html:a, html:area.
*/
LINK = 30,
/**
* Displays a Help topic in the form of a ToolTip or Help balloon.
*/
HELPBALLOON = 31,
/**
* Represents a cartoon-like graphic object, such as Microsoft Office
* Assistant, which is displayed to provide help to users of an application.
*/
CHARACTER = 32,
/**
* Represents a list box, allowing the user to select one or more items. It
* is used for xul:listbox, html:select@size, role="list". See also
* LIST_ITEM.
*/
LIST = 33,
/**
* Represents an item in a list. See also LIST.
*/
LISTITEM = 34,
/**
* Represents an outline or tree structure, such as a tree view control,
* that displays a hierarchical list and allows the user to expand and
* collapse branches. Is is used for role="tree".
*/
OUTLINE = 35,
/**
* Represents an item in an outline or tree structure. It is used for
* role="treeitem".
*/
OUTLINEITEM = 36,
/**
* Represents a page tab, it is a child of a page tab list. It is used for
* xul:tab, role="treeitem". Also refer to PAGETABLIST.
*/
PAGETAB = 37,
/**
* Represents a property sheet. It is used for xul:tabpanel,
* role="tabpanel".
*/
PROPERTYPAGE = 38,
/**
* Represents an indicator, such as a pointer graphic, that points to the
* current item.
*/
INDICATOR = 39,
/**
* Represents a picture. Is is used for xul:image, html:img.
*/
GRAPHIC = 40,
/**
* Represents read-only text, such as labels for other controls or
* instructions in a dialog box. Static text cannot be modified or selected.
* Is is used for xul:label, xul:description, html:label, role="label".
*/
STATICTEXT = 41,
/**
* Represents selectable text that allows edits or is designated read-only.
*/
TEXT_LEAF = 42,
/**
* Represents a push button control. It is used for xul:button, html:button,
* role="button".
*/
PUSHBUTTON = 43,
/**
* Represents a check box control. It is used for xul:checkbox,
* html:input@type="checkbox", role="checkbox".
*/
CHECKBUTTON = 44,
/**
* Represents an option button, also called a radio button. It is one of a
* group of mutually exclusive options. All objects sharing a single parent
* that have this attribute are assumed to be part of single mutually
* exclusive group. It is used for xul:radio, html:input@type="radio",
* role="radio".
*/
RADIOBUTTON = 45,
/**
* Represents a combo box; an edit control with an associated list box that
* provides a set of predefined choices. It is used for html:select,
* xul:menulist, role="combobox".
*/
COMBOBOX = 46,
/**
* Represents the calendar control.
*/
DROPLIST = 47,
/**
* Represents a progress bar, dynamically showing the user the percent
* complete of an operation in progress. It is used for xul:progressmeter,
* role="progressbar".
*/
PROGRESSBAR = 48,
/**
* Represents a dial or knob whose purpose is to allow a user to set a value.
*/
DIAL = 49,
/**
* Represents a hot-key field that allows the user to enter a combination or
* sequence of keystrokes.
*/
HOTKEYFIELD = 50,
/**
* Represents a slider, which allows the user to adjust a setting in given
* increments between minimum and maximum values. It is used by xul:scale,
* role="slider".
*/
SLIDER = 51,
/**
* Represents a spin box, which is a control that allows the user to increment
* or decrement the value displayed in a separate "buddy" control associated
* with the spin box. It is used for xul:spinbuttons.
*/
SPINBUTTON = 52,
/**
* Represents a graphical image used to diagram data. It is used for svg:svg.
*/
DIAGRAM = 53,
/**
* Represents an animation control, which contains content that changes over
* time, such as a control that displays a series of bitmap frames.
*/
ANIMATION = 54,
/**
* Represents a mathematical equation. It is used by MATHML, where there is a
* rich DOM subtree for an equation. Use FLAT_EQUATION for <img role="math" alt="[TeX]"/>
*/
EQUATION = 55,
/**
* Represents a button that drops down a list of items.
*/
BUTTONDROPDOWN = 56,
/**
* Represents a button that drops down a menu.
*/
BUTTONMENU = 57,
/**
* Represents a button that drops down a grid. It is used for xul:colorpicker.
*/
BUTTONDROPDOWNGRID = 58,
/**
* Represents blank space between other objects.
*/
WHITESPACE = 59,
/**
* Represents a container of page tab controls. Is it used for xul:tabs,
* DHTML: role="tabs". Also refer to PAGETAB.
*/
PAGETABLIST = 60,
/**
* Represents a control that displays time.
*/
CLOCK = 61,
/**
* Represents a button on a toolbar that has a drop-down list icon directly
* adjacent to the button.
*/
SPLITBUTTON = 62,
/**
* Represents an edit control designed for an Internet Protocol (IP) address.
* The edit control is divided into sections for the different parts of the
* IP address.
*/
IPADDRESS = 63,
/**
* Represents a label control that has an accelerator.
*/
ACCEL_LABEL = 64,
/**
* Represents an arrow in one of the four cardinal directions.
*/
ARROW = 65,
/**
* Represents a control that can be drawn into and is used to trap events.
* It is used for html:canvas.
*/
CANVAS = 66,
/**
* Represents a menu item with a check box.
*/
CHECK_MENU_ITEM = 67,
/**
* Represents a specialized dialog that lets the user choose a color.
*/
COLOR_CHOOSER = 68,
/**
* Represents control whose purpose is to allow a user to edit a date.
*/
DATE_EDITOR = 69,
/**
* An iconified internal frame in an DESKTOP_PANE. Also refer to
* INTERNAL_FRAME.
*/
DESKTOP_ICON = 70,
/**
* A desktop pane. A pane that supports internal frames and iconified
* versions of those internal frames.
*/
DESKTOP_FRAME = 71,
/**
* A directory pane. A pane that allows the user to navigate through
* and select the contents of a directory. May be used by a file chooser.
* Also refer to FILE_CHOOSER.
*/
DIRECTORY_PANE = 72,
/**
* A file chooser. A specialized dialog that displays the files in the
* directory and lets the user select a file, browse a different directory,
* or specify a filename. May use the directory pane to show the contents of
* a directory. Also refer to DIRECTORY_PANE.
*/
FILE_CHOOSER = 73,
/**
* A font chooser. A font chooser is a component that lets the user pick
* various attributes for fonts.
*/
FONT_CHOOSER = 74,
/**
* Frame role. A top level window with a title bar, border, menu bar, etc.
* It is often used as the primary window for an application.
*/
CHROME_WINDOW = 75,
/**
* A glass pane. A pane that is guaranteed to be painted on top of all
* panes beneath it. Also refer to ROOT_PANE.
*/
GLASS_PANE = 76,
/**
* A document container for HTML, whose children represent the document
* content.
*/
HTML_CONTAINER = 77,
/**
* A small fixed size picture, typically used to decorate components.
*/
ICON = 78,
/**
* Presents an icon or short string in an interface.
*/
LABEL = 79,
/**
* A layered pane. A specialized pane that allows its children to be drawn
* in layers, providing a form of stacking order. This is usually the pane
* that holds the menu bar as well as the pane that contains most of the
* visual components in a window. Also refer to GLASS_PANE and
* ROOT_PANE.
*/
LAYERED_PANE = 80,
/**
* A specialized pane whose primary use is inside a dialog.
*/
OPTION_PANE = 81,
/**
* A text object uses for passwords, or other places where the text content
* is not shown visibly to the user.
*/
PASSWORD_TEXT = 82,
/**
* A temporary window that is usually used to offer the user a list of
* choices, and then hides when the user selects one of those choices.
*/
POPUP_MENU = 83,
/**
* A radio button that is a menu item.
*/
RADIO_MENU_ITEM = 84,
/**
* A root pane. A specialized pane that has a glass pane and a layered pane
* as its children. Also refer to GLASS_PANE and LAYERED_PANE.
*/
ROOT_PANE = 85,
/**
* A scroll pane. An object that allows a user to incrementally view a large
* amount of information. Its children can include scroll bars and a
* viewport. Also refer to VIEW_PORT.
*/
SCROLL_PANE = 86,
/**
* A split pane. A specialized panel that presents two other panels at the
* same time. Between the two panels is a divider the user can manipulate to
* make one panel larger and the other panel smaller.
*/
SPLIT_PANE = 87,
/**
* The header for a column of a table.
* XXX: it looks this role is dupe of COLUMNHEADER.
*/
TABLE_COLUMN_HEADER = 88,
/**
* The header for a row of a table.
* XXX: it looks this role is dupe of ROWHEADER
*/
TABLE_ROW_HEADER = 89,
/**
* A menu item used to tear off and reattach its menu.
*/
TEAR_OFF_MENU_ITEM = 90,
/**
* Represents an accessible terminal.
*/
TERMINAL = 91,
/**
* Collection of objects that constitute a logical text entity.
*/
TEXT_CONTAINER = 92,
/**
* A toggle button. A specialized push button that can be checked or
* unchecked, but does not provide a separate indicator for the current state.
*/
TOGGLE_BUTTON = 93,
/**
* Represent a control that is capable of expanding and collapsing rows as
* well as showing multiple columns of data.
*/
TREE_TABLE = 94,
/**
* A viewport. An object usually used in a scroll pane. It represents the
* portion of the entire data that the user can see. As the user manipulates
* the scroll bars, the contents of the viewport can change. Also refer to
* SCROLL_PANE.
*/
VIEWPORT = 95,
/**
* Header of a document page. Also refer to FOOTER.
*/
HEADER = 96,
/**
* Footer of a document page. Also refer to HEADER.
*/
FOOTER = 97,
/**
* A paragraph of text.
*/
PARAGRAPH = 98,
/**
* A ruler such as those used in word processors.
*/
RULER = 99,
/**
* A text entry having dialog or list containing items for insertion into
* an entry widget, for instance a list of words for completion of a
* text entry. It is used for xul:textbox@autocomplete
*/
AUTOCOMPLETE = 100,
/**
* An editable text object in a toolbar.
*/
EDITBAR = 101,
/**
* An control whose textual content may be entered or modified by the user.
*/
ENTRY = 102,
/**
* A caption describing another object.
*/
CAPTION = 103,
/**
* A visual frame or container which contains a view of document content.
* Document frames may occur within another Document instance, in which case
* the second document may be said to be embedded in the containing instance.
* HTML frames are often DOCUMENT_FRAME. Either this object, or a
* singleton descendant, should implement the Document interface.
*/
DOCUMENT_FRAME = 104,
/**
* Heading.
*/
HEADING = 105,
/**
* An object representing a page of document content. It is used in documents
* which are accessed by the user on a page by page basis.
*/
PAGE = 106,
/**
* A container of document content. An example of the use of this role is to
* represent an html:div.
*/
SECTION = 107,
/**
* An object which is redundant with another object in the accessible
* hierarchy. ATs typically ignore objects with this role.
*/
REDUNDANT_OBJECT = 108,
/**
* A container of form controls. An example of the use of this role is to
* represent an html:form.
*/
FORM = 109,
/**
* An object which is used to allow input of characters not found on a
* keyboard, such as the input of Chinese characters on a Western keyboard.
*/
IME = 110,
/**
* XXX: document this.
*/
APP_ROOT = 111,
/**
* Represents a menu item, which is an entry in a menu that a user can choose
* to display another menu.
*/
PARENT_MENUITEM = 112,
/**
* A calendar that allows the user to select a date.
*/
CALENDAR = 113,
/**
* A list of items that is shown by combobox.
*/
COMBOBOX_LIST = 114,
/**
* A item of list that is shown by combobox.
*/
COMBOBOX_OPTION = 115,
/**
* An image map -- has child links representing the areas
*/
IMAGE_MAP = 116,
/**
* An option in a listbox
*/
OPTION = 117,
/**
* A rich option in a listbox, it can have other widgets as children
*/
RICH_OPTION = 118,
/**
* A list of options
*/
LISTBOX = 119,
/**
* Represents a mathematical equation in the accessible name
*/
FLAT_EQUATION = 120,
/**
* Represents a cell within a grid. It is used for role="gridcell". Unlike
* CELL, it allows the calculation of the accessible name from subtree.
* Also, see TABLE.
*/
GRID_CELL = 121,
/**
* Represents an embedded object. It is used for html:object or html:embed.
*/
EMBEDDED_OBJECT = 122,
/**
* A note. Originally intended to be hidden until activated, but now also used
* for things like html 'aside'.
*/
NOTE = 123,
/**
* A figure. Used for things like HTML5 figure element.
*/
FIGURE = 124,
/**
* Represents a rich item with a check box.
*/
CHECK_RICH_OPTION = 125,
/**
* Represent a definition list (dl in HTML).
*/
DEFINITION_LIST = 126,
/**
* Represent a term in a definition list (dt in HTML).
*/
TERM = 127,
/**
* Represent a definition in a definition list (dd in HTML)
*/
DEFINITION = 128,
/**
* Represent a keyboard or keypad key (ARIA role "key").
*/
KEY = 129,
/**
* Represent a switch control widget (ARIA role "switch").
*/
SWITCH = 130,
/**
* A block of MathML code (math).
*/
MATHML_MATH = 131,
/**
* A MathML identifier (mi in MathML).
*/
MATHML_IDENTIFIER = 132,
/**
* A MathML number (mn in MathML).
*/
MATHML_NUMBER = 133,
/**
* A MathML operator (mo in MathML).
*/
MATHML_OPERATOR = 134,
/**
* A MathML text (mtext in MathML).
*/
MATHML_TEXT = 135,
/**
* A MathML string literal (ms in MathML).
*/
MATHML_STRING_LITERAL = 136,
/**
* A MathML glyph (mglyph in MathML).
*/
MATHML_GLYPH = 137,
/**
* A MathML row (mrow in MathML).
*/
MATHML_ROW = 138,
/**
* A MathML fraction (mfrac in MathML).
*/
MATHML_FRACTION = 139,
/**
* A MathML square root (msqrt in MathML).
*/
MATHML_SQUARE_ROOT = 140,
/**
* A MathML root (mroot in MathML).
*/
MATHML_ROOT = 141,
/**
* A MathML fenced element (mfenced in MathML).
*/
MATHML_FENCED = 142,
/**
* A MathML enclosed element (menclose in MathML).
*/
MATHML_ENCLOSED = 143,
/**
* A MathML styling element (mstyle in MathML).
*/
MATHML_STYLE = 144,
/**
* A MathML subscript (msub in MathML).
*/
MATHML_SUB = 145,
/**
* A MathML superscript (msup in MathML).
*/
MATHML_SUP = 146,
/**
* A MathML subscript and superscript (msubsup in MathML).
*/
MATHML_SUB_SUP = 147,
/**
* A MathML underscript (munder in MathML).
*/
MATHML_UNDER = 148,
/**
* A MathML overscript (mover in MathML).
*/
MATHML_OVER = 149,
/**
* A MathML underscript and overscript (munderover in MathML).
*/
MATHML_UNDER_OVER = 150,
/**
* A MathML multiple subscript and superscript element (mmultiscripts in
* MathML).
*/
MATHML_MULTISCRIPTS = 151,
/**
* A MathML table (mtable in MathML).
*/
MATHML_TABLE = 152,
/**
* A MathML labelled table row (mlabeledtr in MathML).
*/
MATHML_LABELED_ROW = 153,
/**
* A MathML table row (mtr in MathML).
*/
MATHML_TABLE_ROW = 154,
/**
* A MathML table entry or cell (mtd in MathML).
*/
MATHML_CELL = 155,
/**
* A MathML interactive element (maction in MathML).
*/
MATHML_ACTION = 156,
/**
* A MathML error message (merror in MathML).
*/
MATHML_ERROR = 157,
/**
* A MathML stacked (rows of numbers) element (mstack in MathML).
*/
MATHML_STACK = 158,
/**
* A MathML long division element (mlongdiv in MathML).
*/
MATHML_LONG_DIVISION = 159,
/**
* A MathML stack group (msgroup in MathML).
*/
MATHML_STACK_GROUP = 160,
/**
* A MathML stack row (msrow in MathML).
*/
MATHML_STACK_ROW = 161,
/**
* MathML carries, borrows, or crossouts for a row (mscarries in MathML).
*/
MATHML_STACK_CARRIES = 162,
/**
* A MathML carry, borrow, or crossout for a column (mscarry in MathML).
*/
MATHML_STACK_CARRY = 163,
/**
* A MathML line in a stack (msline in MathML).
*/
MATHML_STACK_LINE = 164,
/**
* A group containing radio buttons
*/
RADIO_GROUP = 165,
/**
* A text container exposing brief amount of information. See related
* TEXT_CONTAINER role.
*/
TEXT = 166,
LAST_ROLE = TEXT
};
} // namespace role
typedef enum mozilla::a11y::roles::Role role;
} // namespace a11y
} // namespace mozilla
#endif
| [
"andras.igneczi@doclerholding.com"
] | andras.igneczi@doclerholding.com |
d5cfc0091b51c33a5bcbe20896cbd6b792274f77 | 17f37b79643b9c6acd181c55c43a3ab4c889433e | /cavity/47.2/p | 6f59c00a88716e930dc004c3f7a8ff0ed1e74b2b | [] | no_license | aashay201297/OpenFOAM-simulations | 5208b766ab1e715178e42c73d028cc43d17ec4c9 | 273f60ef66e6f5b0c99a53ac52de406be0e876a2 | refs/heads/master | 2021-01-23T06:34:17.044650 | 2017-06-04T19:02:27 | 2017-06-04T19:02:27 | 86,373,858 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,138 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "47.2";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField nonuniform List<scalar>
400
(
-9.81328e-10
-0.00582998
-0.0129685
-0.018421
-0.0204388
-0.0182452
-0.0117807
-0.00149052
0.0118306
0.0271426
0.043238
0.0588168
0.0725725
0.0833023
0.0900467
0.0922608
0.0900197
0.0842377
0.0768744
0.0710609
0.00577609
-0.000223583
-0.00580974
-0.00954862
-0.0106052
-0.00843919
-0.00297655
0.00546744
0.0162962
0.0287051
0.0417433
0.0543796
0.0655802
0.0744038
0.0801141
0.0823096
0.081071
0.0770485
0.0712678
0.0653115
0.0133298
0.00502809
-0.00100115
-0.00442918
-0.00527918
-0.00327033
0.00159581
0.00902095
0.0184954
0.0293426
0.0407588
0.0518632
0.0617622
0.0696301
0.0748008
0.0768718
0.0758353
0.0720795
0.065799
0.057529
0.020134
0.00869029
0.00121996
-0.00267463
-0.00372838
-0.00189169
0.00272479
0.00977798
0.0187737
0.0290883
0.0399853
0.0506475
0.0602265
0.0679096
0.0729969
0.0749952
0.0737594
0.0694496
0.0615964
0.0500959
0.0244965
0.00976741
0.000583877
-0.003993
-0.00530848
-0.0035137
0.00116827
0.00832801
0.0174554
0.0279424
0.0390783
0.0500633
0.0600423
0.0681586
0.0736199
0.0757913
0.0743625
0.0692833
0.0595189
0.0445304
0.0251723
0.0071443
-0.0038079
-0.00906325
-0.0105183
-0.00850631
-0.00336324
0.00442293
0.0143068
0.0256724
0.0378072
0.0498966
0.0610415
0.0702965
0.0767281
0.0795104
0.0781324
0.072327
0.0605326
0.0418832
0.0210877
-0.00026817
-0.0129404
-0.0187153
-0.020036
-0.0174202
-0.0113247
-0.00232614
0.00898393
0.0219696
0.0359031
0.0499377
0.0631055
0.0743387
0.0825153
0.0865629
0.0857142
0.0794405
0.0656137
0.043065
0.0111369
-0.0136241
-0.027881
-0.0338602
-0.0346096
-0.0308637
-0.0232192
-0.0123516
0.0010984
0.0164774
0.033046
0.0499271
0.0660768
0.0802833
0.0911941
0.0974235
0.0978637
0.0916295
0.0758897
0.0491099
-0.0059732
-0.0342725
-0.0498761
-0.0555546
-0.0550962
-0.0495207
-0.0395997
-0.0261196
-0.0097635
0.00881656
0.0288945
0.049587
0.069791
0.088148
0.103041
0.112695
0.115544
0.110185
0.0928277
0.0614049
-0.0318633
-0.0638823
-0.0804231
-0.0850133
-0.0824262
-0.0740844
-0.0609871
-0.0440429
-0.0239578
-0.00134329
0.0231392
0.0486546
0.0740892
0.0979658
0.11839
0.133119
0.139982
0.136812
0.118434
0.0819274
-0.0686735
-0.10461
-0.121351
-0.123596
-0.117522
-0.105133
-0.0877244
-0.0663317
-0.0416433
-0.0141619
0.0155992
0.0469469
0.0788494
0.109787
0.137617
0.159579
0.172721
0.173772
0.155514
0.113565
-0.119408
-0.159363
-0.174921
-0.172763
-0.161154
-0.142935
-0.119765
-0.0927831
-0.0625835
-0.0294538
0.00636693
0.0444673
0.0840489
0.123697
0.16113
0.19308
0.215662
0.224071
0.208044
0.160626
-0.188634
-0.232248
-0.243945
-0.233954
-0.2137
-0.18716
-0.156378
-0.122507
-0.0859038
-0.0464781
-0.00402041
0.0415329
0.0898362
0.139823
0.189313
0.234683
0.271069
0.291658
0.281737
0.22977
-0.28398
-0.32931
-0.331837
-0.308286
-0.274714
-0.236445
-0.19577
-0.153616
-0.109846
-0.0637507
-0.0144434
0.0388578
0.0965487
0.158271
0.222369
0.285282
0.341392
0.381569
0.384908
0.331829
-0.419324
-0.459676
-0.442356
-0.395797
-0.342134
-0.287744
-0.234621
-0.182935
-0.131614
-0.07899
-0.0232191
0.0374702
0.104548
0.178833
0.259856
0.344965
0.428611
0.499695
0.52967
0.485386
-0.620537
-0.636749
-0.578682
-0.494198
-0.411245
-0.335663
-0.267785
-0.205982
-0.147541
-0.0893875
-0.0284306
0.0383438
0.113802
0.200467
0.29997
0.41202
0.533025
0.65177
0.732767
0.722391
-0.935928
-0.878519
-0.741746
-0.597953
-0.474397
-0.372663
-0.288872
-0.217767
-0.153957
-0.092468
-0.0287215
0.0416915
0.123259
0.220714
0.338922
0.48215
0.651992
0.841337
1.01527
1.0975
-1.47643
-1.20663
-0.920507
-0.691392
-0.517309
-0.387548
-0.290065
-0.213341
-0.148128
-0.0872194
-0.0245816
0.0454535
0.128933
0.233067
0.367099
0.542674
0.771289
1.05931
1.40328
1.73014
-2.53965
-1.63055
-1.04444
-0.710962
-0.495754
-0.352097
-0.254534
-0.183587
-0.126173
-0.073599
-0.019273
0.0427829
0.119208
0.218779
0.354808
0.54798
0.826389
1.23658
1.91167
2.92419
-4.36667
-2.04464
-0.973546
-0.563184
-0.35785
-0.24015
-0.170123
-0.123787
-0.0874851
-0.0535142
-0.0166584
0.0276566
0.0846034
0.161725
0.272407
0.442095
0.718215
1.2257
2.41103
4.84853
)
;
boundaryField
{
movingWall
{
type zeroGradient;
}
fixedWalls
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
| [
"aashay225@gmail.com"
] | aashay225@gmail.com | |
d5703c908ec90d71233883490bd6bb06444893be | 64e4fabf9b43b6b02b14b9df7e1751732b30ad38 | /src/chromium/gen/gen_combined/third_party/blink/renderer/core/css/properties/shorthands/webkit_mask_box_image.h | 5f285b1303f00980efcca375b9770615131ebb30 | [
"BSD-3-Clause"
] | permissive | ivan-kits/skia-opengl-emscripten | 8a5ee0eab0214c84df3cd7eef37c8ba54acb045e | 79573e1ee794061bdcfd88cacdb75243eff5f6f0 | refs/heads/master | 2023-02-03T16:39:20.556706 | 2020-12-25T14:00:49 | 2020-12-25T14:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,240 | h | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Generated from template:
// core/css/properties/templates/css_property_subclass.h.tmpl
// and input files:
// ../../third_party/blink/renderer/core/css/computed_style_field_aliases.json5
// ../../third_party/blink/renderer/core/css/css_properties.json5
// ../../third_party/blink/renderer/core/css/properties/css_property_methods.json5
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_SHORTHAND_WEBKIT_MASK_BOX_IMAGE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_SHORTHAND_WEBKIT_MASK_BOX_IMAGE_H_
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value_mappings.h"
#include "third_party/blink/renderer/core/css/properties/shorthand.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver_state.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
namespace blink {
namespace css_shorthand {
// Implements the '-webkit-mask-box-image' CSS property
// See src/third_party/blink/renderer/core/css/properties/README.md
class WebkitMaskBoxImage final : public Shorthand {
public:
constexpr WebkitMaskBoxImage() : Shorthand(CSSPropertyID::kWebkitMaskBoxImage,
0
| kProperty
,
'\0'
) {}
const char* GetPropertyName() const override { return "-webkit-mask-box-image"; }
const WTF::AtomicString& GetPropertyNameAtomicString() const override {
DEFINE_STATIC_LOCAL(const AtomicString, name, ("-webkit-mask-box-image"));
return name;
}
const char* GetJSPropertyName() const override {
return "webkitMaskBoxImage";
}
bool ParseShorthand(bool, CSSParserTokenRange&, const CSSParserContext&, const CSSParserLocalContext&, HeapVector<CSSPropertyValue, 256>&) const override;
const CSSValue* CSSValueFromComputedStyleInternal(const ComputedStyle&, const SVGComputedStyle&, const LayoutObject*, Node*, bool allow_visited_style) const override;
};
} // namespace css_shorthand
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_PROPERTIES_SHORTHAND_WEBKIT_MASK_BOX_IMAGE_H_
| [
"trofimov_d_a@magnit.ru"
] | trofimov_d_a@magnit.ru |
590b722d0dc55016ddcf5ae6511ba2a7c5a6c87d | eb2f8b3271e8ef9c9b092fcaeff3ff8307f7af86 | /Grade 8-9/Models for algorithms/完全背包(一维).cpp | 447965dd5b0c8211cf6842a46374337d5f3ba06e | [] | no_license | Orion545/OI-Record | 0071ecde8f766c6db1f67b9c2adf07d98fd4634f | fa7d3a36c4a184fde889123d0a66d896232ef14c | refs/heads/master | 2022-01-13T19:39:22.590840 | 2019-05-26T07:50:17 | 2019-05-26T07:50:17 | 188,645,194 | 4 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 319 | cpp | #include<iostream>
#include<cstdio>
using namespace std;
int c[101],w[101],f[10001];
int main(){
int n,v;cin>>n>>v;
for(int i=1;i<=n;i++){
cin>>c[i]>>w[i];
}
for(int i=1;i<=n;i++){
for(int j=0;j<=v;j++){
if(j-c[i]>=0) f[j]=max(f[j],f[j-c[i]]+w[i]);
printf("%3d",f[j]);
}
cout<<endl;
}
cout<<f[v];
}
| [
"orion545@qq.com"
] | orion545@qq.com |
9d77420e92c5178d55fe53bba478d06f0f6a109c | 6831f098839af584c0a1032fa8dec9c7327ee521 | /crypto/impl_dispatch_test.cc | efe12b450e9512a4c6f02da2d7c32bb2aa01c918 | [
"ISC",
"BSD-3-Clause",
"OpenSSL",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-ssleay-windows",
"MIT"
] | permissive | opensourceyouthprogramming/boringssl | f3f1a265ce6cd9bd9add7c0dbabbea57db83d640 | 33f456b8b05c73dff13c0b4653f7d964ed2721d6 | refs/heads/master | 2020-04-20T18:18:09.582847 | 2019-01-12T15:29:10 | 2019-02-01T18:03:39 | 169,016,196 | 1 | 0 | NOASSERTION | 2019-02-04T01:57:51 | 2019-02-04T01:57:51 | null | UTF-8 | C++ | false | false | 5,150 | cc | /* Copyright (c) 2018, Google Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#include <openssl/base.h>
#if !defined(NDEBUG) && !defined(BORINGSSL_FIPS) && \
!defined(BORINGSSL_SHARED_LIBRARY)
#include <functional>
#include <utility>
#include <vector>
#include <openssl/aead.h>
#include <openssl/aes.h>
#include <openssl/cpu.h>
#include <openssl/mem.h>
#include <gtest/gtest.h>
#include "internal.h"
class ImplDispatchTest : public ::testing::Test {
public:
void SetUp() override {
#if defined(OPENSSL_X86) || defined(OPENSSL_X86_64)
aesni_ = OPENSSL_ia32cap_P[1] & (1 << (57 - 32));
avx_movbe_ = ((OPENSSL_ia32cap_P[1] >> 22) & 0x41) == 0x41;
ssse3_ = OPENSSL_ia32cap_P[1] & (1 << (41 - 32));
is_x86_64_ =
#if defined(OPENSSL_X86_64)
true;
#else
false;
#endif
#endif // X86 || X86_64
}
protected:
// AssertFunctionsHit takes a list of pairs (flag index, boolean), and a
// function to test. It runs the given function and asserts, for each flag
// index, that the boolean reflects whether that flag index was written or
// not, and that no other flagged functions were triggered.
void AssertFunctionsHit(std::vector<std::pair<size_t, bool>> flags,
std::function<void()> f) {
OPENSSL_memset(BORINGSSL_function_hit, 0, sizeof(BORINGSSL_function_hit));
f();
for (const auto flag : flags) {
SCOPED_TRACE(flag.first);
ASSERT_LT(flag.first, sizeof(BORINGSSL_function_hit));
EXPECT_EQ(flag.second, BORINGSSL_function_hit[flag.first] == 1);
BORINGSSL_function_hit[flag.first] = 0;
}
for (size_t i = 0; i < sizeof(BORINGSSL_function_hit); i++) {
EXPECT_EQ(0u, BORINGSSL_function_hit[i])
<< "Flag " << i << " unexpectedly hit";
}
}
#if defined(OPENSSL_X86) || defined(OPENSSL_X86_64)
bool aesni_ = false;
bool avx_movbe_ = false;
bool ssse3_ = false;
bool is_x86_64_ = false;
#endif
};
#if !defined(OPENSSL_NO_ASM) && \
(defined(OPENSSL_X86) || defined(OPENSSL_X86_64))
constexpr size_t kFlag_aes_hw_ctr32_encrypt_blocks = 0;
constexpr size_t kFlag_aes_hw_encrypt = 1;
constexpr size_t kFlag_aesni_gcm_encrypt = 2;
constexpr size_t kFlag_aes_hw_set_encrypt_key = 3;
constexpr size_t kFlag_vpaes_encrypt = 4;
constexpr size_t kFlag_vpaes_set_encrypt_key = 5;
constexpr size_t kFlag_bsaes_ctr32_encrypt_blocks = 6;
TEST_F(ImplDispatchTest, AEAD_AES_GCM) {
AssertFunctionsHit(
{
{kFlag_aes_hw_ctr32_encrypt_blocks, aesni_},
{kFlag_aes_hw_encrypt, aesni_},
{kFlag_aes_hw_set_encrypt_key, aesni_},
{kFlag_aesni_gcm_encrypt, is_x86_64_ && aesni_ && avx_movbe_},
{kFlag_vpaes_encrypt, !is_x86_64_ && ssse3_ && !aesni_},
{kFlag_vpaes_set_encrypt_key, !is_x86_64_ && ssse3_ && !aesni_},
{kFlag_bsaes_ctr32_encrypt_blocks, is_x86_64_ && ssse3_ && !aesni_},
},
[] {
const uint8_t kZeros[16] = {0};
const uint8_t kPlaintext[40] = {1, 2, 3, 4, 0};
uint8_t ciphertext[sizeof(kPlaintext) + 16];
size_t ciphertext_len;
EVP_AEAD_CTX ctx;
ASSERT_TRUE(EVP_AEAD_CTX_init(&ctx, EVP_aead_aes_128_gcm(), kZeros,
sizeof(kZeros),
EVP_AEAD_DEFAULT_TAG_LENGTH, nullptr));
ASSERT_TRUE(EVP_AEAD_CTX_seal(
&ctx, ciphertext, &ciphertext_len, sizeof(ciphertext), kZeros,
EVP_AEAD_nonce_length(EVP_aead_aes_128_gcm()), kPlaintext,
sizeof(kPlaintext), nullptr, 0));
});
}
TEST_F(ImplDispatchTest, AES_set_encrypt_key) {
AssertFunctionsHit(
{
{kFlag_aes_hw_set_encrypt_key, aesni_},
// VPAES / BSAES will not be used for the |AES_*| functions.
},
[] {
AES_KEY key;
static const uint8_t kZeros[16] = {0};
AES_set_encrypt_key(kZeros, sizeof(kZeros) * 8, &key);
});
}
TEST_F(ImplDispatchTest, AES_single_block) {
AES_KEY key;
static const uint8_t kZeros[16] = {0};
AES_set_encrypt_key(kZeros, sizeof(kZeros) * 8, &key);
AssertFunctionsHit(
{
{kFlag_aes_hw_encrypt, aesni_},
// VPAES / BSAES will not be used for the |AES_*| functions.
},
[&key] {
uint8_t in[AES_BLOCK_SIZE] = {0};
uint8_t out[AES_BLOCK_SIZE];
AES_encrypt(in, out, &key);
});
}
#endif // X86 || X86_64
#endif // !NDEBUG && !FIPS && !SHARED_LIBRARY
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
0ef2f4bd8ad808407aaafec1a777a93145ccb48d | efeda21c44f8703c408b0e9b2a33f7c8742ad258 | /tests/stdexcept/stdexcept_full.hpp | 2a2d74e86f289a1200f83e20004a286f1490f43b | [
"MIT"
] | permissive | olegpublicprofile/stdfwd | 9d6987a49e57f73e3b625552c43c65818f91d041 | 19671bcc8e53bd4c008f07656eaf25a22495e093 | refs/heads/master | 2023-08-15T00:32:13.591955 | 2021-09-18T17:36:29 | 2021-09-18T17:36:29 | 347,794,330 | 18 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 309 | hpp | #pragma once
//------------------------------------------------------------------------------
namespace stdexcept_tests {
//------------------------------------------------------------------------------
void run_full();
//------------------------------------------------------------------------------
}
| [
"oleg.public.profile@ya.ru"
] | oleg.public.profile@ya.ru |
752d1f08c922e76f68551529c4722eae50f01a72 | e95adb59feacfe95904c3a8e90a4159860b6c26a | /build/Android/Preview/outsideTheBox/app/src/main/include/Android.Fallbacks.Android_android_media_MediaPlayerDLROnErrorListener.h | d0aca6aeaf561cf6bd872cebacb36ec8f066ac77 | [] | no_license | deliloka/bethebox | 837dff20c1ff55db631db1e0f6cb51d935497e91 | f9bc71b8593dd54b8aaf86bc0a654d233432c362 | refs/heads/master | 2021-01-21T08:20:42.970891 | 2016-02-19T10:00:37 | 2016-02-19T10:00:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,854 | h | // This file was generated based on '/usr/local/share/uno/Packages/Android/0.23.1/Android/Fallbacks/$.uno'.
// WARNING: Changes might be lost if you edit this file directly.
#pragma once
#include <Android.android.media.MediaPlayerDLROnErrorListener.h>
#include <Android.Base.Wrappers.IJWrapper.h>
#include <Android.java.lang.Object.h>
#include <jni.h>
#include <Uno.IDisposable.h>
namespace g{namespace Android{namespace android{namespace media{struct MediaPlayer;}}}}
namespace g{namespace Android{namespace Fallbacks{struct Android_android_media_MediaPlayerDLROnErrorListener;}}}
namespace g{
namespace Android{
namespace Fallbacks{
// public sealed extern class Android_android_media_MediaPlayerDLROnErrorListener :28265
// {
struct Android_android_media_MediaPlayerDLROnErrorListener_type : ::g::Android::java::lang::Object_type
{
::g::Android::android::media::MediaPlayerDLROnErrorListener interface2;
};
Android_android_media_MediaPlayerDLROnErrorListener_type* Android_android_media_MediaPlayerDLROnErrorListener_typeof();
void Android_android_media_MediaPlayerDLROnErrorListener__onError_fn(Android_android_media_MediaPlayerDLROnErrorListener* __this, ::g::Android::android::media::MediaPlayer* arg0, int* arg1, int* arg2, bool* __retval);
void Android_android_media_MediaPlayerDLROnErrorListener__onError_IMPL_9438_fn(bool* arg0_, jobject* arg1_, uObject* arg2_, int* arg3_, int* arg4_, bool* __retval);
struct Android_android_media_MediaPlayerDLROnErrorListener : ::g::Android::java::lang::Object
{
static jmethodID onError_9438_ID_;
static jmethodID& onError_9438_ID() { return onError_9438_ID_; }
bool onError(::g::Android::android::media::MediaPlayer* arg0, int arg1, int arg2);
static bool onError_IMPL_9438(bool arg0_, jobject arg1_, uObject* arg2_, int arg3_, int arg4_);
};
// }
}}} // ::g::Android::Fallbacks
| [
"Havard.Halse@nrk.no"
] | Havard.Halse@nrk.no |
aebacd9b68f92fe6ce7565d5c3971da05db3c013 | 53dc18be732e90bd8163fe42ead0d6a3ce0a939c | /Arduino_IRLearning/irLearning/irLearning.ino | 6b6fb665ceaaf085e3bfa7e13809ae4f80d24101 | [] | no_license | zdiubaldo/IRLearning_ReSpeaker | 12b128f008c65caea21378bf9bdda1589437fe26 | 7e74886471983ec5e1722f38ffcfb4819412e55c | refs/heads/master | 2020-05-22T05:32:07.087494 | 2016-09-05T09:24:34 | 2016-09-05T09:24:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,865 | ino |
#include "SPI.h"
#include "respeaker.h"
#include <Adafruit_NeoPixel.h>
#include "irlearning.h"
#define PIXELS_PIN 11
#define PIXELS_NUM 12
#define PIXELS_SPACE 128
IRLearning myir;
uint8_t commandIndex;
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(PIXELS_NUM, PIXELS_PIN, NEO_GRB + NEO_KHZ800);
int pixels_state = 0;
// 0 1 2 3 4 5 6 7 8
const char *pixels_patterns[] = {"sleep", "wakeup", "wait", "answer", "offline", "online","irlearning","stoplearning","control"};
void touch_event(uint8_t id, uint8_t event) {
// Serial << "id:" << id << " event:" << event << "\r\n";
}
void spi_event(uint8_t addr, uint8_t *data, uint8_t len)
{
for (uint8_t i = 0; i < sizeof(pixels_patterns) / sizeof(*pixels_patterns); i++) {
if (!strcmp(pixels_patterns[i], (char *)data)) {
pixels_state = i;
break;
}
}
}
void setup() {
pixels.begin();
for (int i = 0; i < PIXELS_NUM; i++) {
pixels.setPixelColor(i, 0, 0, 32);
}
pixels.show();
respeaker.begin();
respeaker.attach_touch_isr(touch_event);
respeaker.attach_spi_isr(spi_event);
delay(1000);
pixels.clear();
pixels.show();
myir.init();
commandIndex = 0;
// pixels_state = 3;
}
void loop() {
static uint32_t last_time = 0;
// Serial.print("1");
if (pixels_state == 0) {
pixels.clear();
pixels.show();
pixels_state = -1;
} else if (pixels_state == 1) {
for (int i = 0; i < PIXELS_NUM; i++) {
pixels.setPixelColor(i, 0, 0xFF, 0);
}
pixels.show();
pixels_state = -1;
} else if (pixels_state == 2) {
static uint32_t t = 0;
for (int i = 0; i < PIXELS_NUM; i++) {
pixels.setPixelColor(i, triangular_color((t + i * PIXELS_SPACE) % (PIXELS_SPACE * PIXELS_NUM)));
}
pixels.show();
t++;
if (t >= (PIXELS_SPACE * PIXELS_NUM)) {
t = 0;
}
} else if (pixels_state == 3) {
static uint32_t arc[PIXELS_NUM] = {0x10, 0x20, 0x30, 0x50, 0x80, 0xC0, 0xFF, 0xC0, 0x80, 0x50, 0x30, 0x20};
static uint8_t t = 0x80;
static int8_t deta = 1;
uint32_t current = millis();
if ((uint32_t)(current - last_time) > 5) {
last_time = current;
for (int i = 0; i < PIXELS_NUM; i++) {
int16_t c = arc[i] - t;
if (c < 0) {
c = 0;
}
pixels.setPixelColor(i, 0, c, 0);
}
pixels.show();
t += deta;
if (t <= 0x40 || t >= 0xF0) {
deta = -deta;
}
}
} else if (pixels_state == 4) {
for (int i = 0; i < PIXELS_NUM; i++) {
pixels.setPixelColor(i, 0xFF, 0, 0);
}
pixels.show();
pixels_state = -1;
} else if (pixels_state == 5) {
static uint8_t on = 0;
if (!on) {
for (int i = 0; i < PIXELS_NUM; i++) {
pixels.setPixelColor(i, 0, 0xFF, 0);
}
pixels.show();
on = 1;
last_time = millis();
} else {
uint32_t current = millis();
if ((uint32_t)(current - last_time) >= 1000) {
for (int i = 0; i < PIXELS_NUM; i++) {
pixels.setPixelColor(i, 0, 0, 0);
}
pixels.show();
on = 0;
pixels_state = -1;
}
}
} else if (pixels_state == 6) {
while(!myir.IRCommandRec()) {
if (pixels_state == 7){
break;
}
}
if(++commandIndex == 20) {
commandIndex == 0;
}
pixels_state = -1;
} else if (pixels_state == 7) {
pixels_state = -1;
} else if (pixels_state == 8) {
if(commandIndex == 0) {
myir.IRCommandSend(commandIndex);
} else {
myir.IRCommandSend(commandIndex-1);
}
}
}
uint32_t triangular_color(uint32_t t)
{
uint32_t c;
if (t < 256) {
c = pixels.Color(0, t, 0);
} else if (t < 512) {
c = pixels.Color(0, 511 - t, 0);
}
return c;
}
| [
"jiankai.li@seeed.cc"
] | jiankai.li@seeed.cc |
e1363abfd13160892d66553229fa2b9366cfcd5e | fe2362eda423bb3574b651c21ebacbd6a1a9ac2a | /VTK-7.1.1/Deprecated/vtkTimePointToString.h | 95df7bccf67d7f5bc1daf13ab1de128093e53deb | [
"BSD-3-Clause"
] | permissive | likewatchk/python-pcl | 1c09c6b3e9de0acbe2f88ac36a858fe4b27cfaaf | 2a66797719f1b5af7d6a0d0893f697b3786db461 | refs/heads/master | 2023-01-04T06:17:19.652585 | 2020-10-15T21:26:58 | 2020-10-15T21:26:58 | 262,235,188 | 0 | 0 | NOASSERTION | 2020-05-08T05:29:02 | 2020-05-08T05:29:01 | null | UTF-8 | C++ | false | false | 3,163 | h | /*=========================================================================
Program: Visualization Toolkit
Module: vtkTimePointToString.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
/**
* @class vtkTimePointToString
* @brief Converts a timestamp array to a string array
*
*
*
* vtkTimePointToString is a filter for converting a timestamp array
* into string array using one of the formats defined in vtkTimePointUtility.h.
*
* Use SetInputArrayToProcess to indicate the array to process.
* This array must be an unsigned 64-bit integer array for
* DATETIME formats, and may be either an unsigned 32-bit or
* unsigned 64-bit array for DATE and TIME formats.
*
* If the new array name is not specified, the array name will be
* the old name appended by " [to string]".
*/
#ifndef vtkTimePointToString_h
#define vtkTimePointToString_h
#include "vtkDataObjectAlgorithm.h"
class VTK_INFOVIS_EXPORT vtkTimePointToString : public vtkDataObjectAlgorithm
{
public:
static vtkTimePointToString* New();
vtkTypeMacro(vtkTimePointToString,vtkDataObjectAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
//@{
/**
* The format to use when converting the timestamp to a string.
*/
vtkSetMacro(ISO8601Format, int);
vtkGetMacro(ISO8601Format, int);
//@}
//@{
/**
* The name of the output array.
* If this is not specified, the name will be the input array name with
* " [to string]" appended to it.
*/
vtkSetStringMacro(OutputArrayName);
vtkGetStringMacro(OutputArrayName);
//@}
/**
* This is required to capture REQUEST_DATA_OBJECT requests.
*/
virtual int ProcessRequest(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
protected:
vtkTimePointToString();
~vtkTimePointToString();
/**
* Creates the same output type as the input type.
*/
virtual int RequestDataObject(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
int ISO8601Format;
char* OutputArrayName;
int RequestData(
vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
private:
vtkTimePointToString(const vtkTimePointToString&) VTK_DELETE_FUNCTION;
void operator=(const vtkTimePointToString&) VTK_DELETE_FUNCTION;
};
#endif
| [
"likewatchk@gmail.com"
] | likewatchk@gmail.com |
5354b4e1f1ae2a51bc6ddf6bd23c8bdd5baefeee | c9a156314b7d1c54b8e5fdfc72dd4adcabdb6575 | /VulkanRave/Engine/Libraries/glm/gtx/optimum_pow.hpp | 3d9e0185ac9ea44dfb8884be4188918529a69163 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-happy-bunny",
"MIT"
] | permissive | BullynckVictor/VulkanRave | 96d88734bf792493013dbe48c3c8533ba2198e90 | 28e543a0ce3ad0543f7e0f0be404d9f0ba67adb7 | refs/heads/master | 2023-07-24T03:08:30.624841 | 2021-09-04T13:50:08 | 2021-09-04T13:50:08 | 376,907,593 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,324 | hpp | /// @ref gtx_optimum_pow
/// @file glm/gtx/optimum_pow.hpp
///
/// @see core (dependence)
///
/// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow
/// @ingroup gtx
///
/// Include <Engine/Libraries/glm/gtx/optimum_pow.hpp> to use the features of this extension.
///
/// Integer exponentiation of power functions.
#pragma once
// Dependency:
#include "../glm.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_optimum_pow is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_optimum_pow extension included")
# endif
#endif
namespace glm{
namespace gtx
{
/// @addtogroup gtx_optimum_pow
/// @{
/// Returns x raised to the power of 2.
///
/// @see gtx_optimum_pow
template<typename genType>
GLM_FUNC_DECL genType pow2(genType const& x);
/// Returns x raised to the power of 3.
///
/// @see gtx_optimum_pow
template<typename genType>
GLM_FUNC_DECL genType pow3(genType const& x);
/// Returns x raised to the power of 4.
///
/// @see gtx_optimum_pow
template<typename genType>
GLM_FUNC_DECL genType pow4(genType const& x);
/// @}
}//namespace gtx
}//namespace glm
#include "optimum_pow.inl"
| [
"victor.bullynck@gmail.com"
] | victor.bullynck@gmail.com |
2fc5acf3d7d6d6b6208e0daf7873c296fae3927a | ba538e2ecd586f22e5974e98cbcc77315722bb45 | /GameBend/RawModel.cpp | 64ed8945742d85902d3908e823767e5f74df177a | [] | no_license | jscotty/CPP_choocy_adventure | ec32ef99ea6b8aca0a94598554fe2ff7441f597f | b4434b3d8ba05b466e98d89cc5c2da2a68ebae05 | refs/heads/master | 2020-03-25T11:57:50.482947 | 2018-08-06T16:38:59 | 2018-08-06T16:38:59 | 143,755,508 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 194 | cpp | #include "RawModel.h"
RawModel::RawModel(const GLuint vaoID, unsigned int vertexCount){
this->vaoID = vaoID;
this->vertexCount = vertexCount;
}
RawModel::RawModel(){}
RawModel::~RawModel(){} | [
"jscotty@hotmail.nl"
] | jscotty@hotmail.nl |
1cd091e1f6e563be4ba24c7a41f10109a454b80b | 55759f7fbc356445d3516ad66f5836633c15a105 | /UnitTest/gvariant_test.cpp | 2cf1fc4e4556ddfecf38cd6c36e68ebb312cf1f8 | [] | no_license | asankar1/GFramework | 403f91f17ba997eaf058e18e9730a28f5686e4ab | ce118d669a0e0fae4b06ada6db01708421085468 | refs/heads/master | 2021-10-02T09:07:05.454947 | 2021-08-28T09:27:17 | 2021-08-28T09:27:17 | 100,350,290 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,017 | cpp | #include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <array>
#include <stack>
#include <map>
#include <cassert>
#include <limits>
#include <cmath>
#include <array>
#include <functional>
#include <gtest/gtest.h>
#include <GFramework/GVariant/GTypes.h>
#include <GFramework/GVariant/GVariant.h>
#include <GFramework/GVariant/GObject.h>
#include "gvariant_test.h"
using namespace std;
using namespace GFramework;
template<typename T>
struct is_vector : std::false_type {};
template<typename T>
struct is_vector<std::vector<T>> : std::true_type {};
template<typename T>
struct is_list : std::false_type {};
template<typename T>
struct is_list<std::list<T>> : std::true_type {};
template<typename T>
struct is_stack : std::false_type {};
template<typename T, typename C>
struct is_stack<std::stack<T, C>> : std::true_type {};
template<typename T>
struct is_map : std::false_type {};
template<class K, class T, class C, class A>
struct is_map<std::map<K, T, C, A>> : std::true_type {};
template<typename T>
struct is_tuple : std::false_type {};
template<class... Types>
struct is_tuple<std::tuple<Types...>> : std::true_type {};
template<typename T>
struct is_function_object : std::false_type {};
template<typename T>
struct is_function_object<std::function<T>> : std::true_type {};
template<typename T, typename U = T>
typename T::DUMMY_TYPE
gvariant_arithmetic_test(GVariant);
template<typename T, typename U = T>
typename T::DUMMY_TYPE
gvariant_floatingpoint_test(GVariant);
template<typename T>
typename T::DUMMY_TYPE
gvariant_class_test(GVariant, T);
template<typename T>
bool gvariant_pointer_test(GVariant gv, T v1)
{
bool result = true;
//raw pointer
T* v6 = &v1;
gv = GVariant::create<T*>(v6);
result = result && (GVariant::cast<T*>(gv) == v6);
result = result && (*GVariant::cast<T*>(gv) == v1);
return result;
}
template<typename T>
bool gvariant_reference_test(GVariant gv, T v1)
{
bool result = true;
//lvalue reference
T& v2 = v1;
gv = GVariant::create<T>(v2);
result = result && (GVariant::cast<T>(gv) == v2);
//const lvalue
const T v3 = v1;
gv = GVariant::create<T>(v3);
result = result && (GVariant::cast<T>(gv) == v3);
//const lvalue reference
const T& v4 = v1;
gv = GVariant::create<T>(v4);
result = result && (GVariant::cast<T>(gv) == v4);
//rvalue
auto ret_rvalue = [v1]()->T {T v = v1; return v; };
gv = GVariant::create<T>(ret_rvalue());
result = result && (GVariant::cast<T>(gv) == ret_rvalue());
//rvalue reference
T&& v5 = std::move(v1);
gv = GVariant::create<T>(v5);
result = result && (GVariant::cast<T>(gv) == v5);
result = result && gvariant_pointer_test<T>(gv, v1);
return result;
}
template<typename T, typename U = T>
typename std::enable_if<std::is_arithmetic<U>::value, bool>::type
gvariant_arithmetic_test(GVariant gv)
{
bool result = true;
//constexpr range
gv = GVariant::create<T>(numeric_limits<U>::min());
result = result && (GVariant::cast<T>(gv) == numeric_limits<U>::min());
gv = GVariant::create<T>(numeric_limits<U>::lowest());
result = result && (GVariant::cast<T>(gv) == numeric_limits<U>::lowest());
gv = GVariant::create<T>(numeric_limits<U>::max());
result = result && (GVariant::cast<T>(gv) == numeric_limits<U>::max());
//lvalue
T v1 = numeric_limits<U>::min();
gv = GVariant::create<T>(v1);
result = result && (GVariant::cast<T>(gv) == v1);
result = result && gvariant_reference_test<T>(gv, v1);
return result;
}
template<typename T, typename U = T>
typename std::enable_if<std::is_floating_point<U>::value, bool>::type
gvariant_floatingpoint_test(GVariant gv)
{
bool result = true;
result = result && gvariant_arithmetic_test<T, U>(gv);
if (numeric_limits<U>::has_infinity)
{
gv = GVariant::create<T>(numeric_limits<U>::infinity());
result = result && (GVariant::cast<T>(gv) == numeric_limits<U>::infinity());
}
if (numeric_limits<U>::has_quiet_NaN)
{
gv = GVariant::create<T>(numeric_limits<U>::quiet_NaN());
result = result && (std::isnan((U)GVariant::cast<T>(gv))); //NaN is always != Nan, use std::isnan
}
if (numeric_limits<U>::has_signaling_NaN)
{
gv = GVariant::create<T>(numeric_limits<U>::signaling_NaN());
result = result && (std::isnan((U)GVariant::cast<T>(gv))); //NaN is always != Nan, use std::isnan
}
if (numeric_limits<U>::has_denorm)
{
gv = GVariant::create<T>(numeric_limits<U>::denorm_min());
result = result && (GVariant::cast<T>(gv) == numeric_limits<U>::denorm_min());
}
return result;
}
template<typename T>
typename std::enable_if<std::is_class<T>::value, bool>::type
gvariant_class_test(GVariant gv, T t)
{
bool result = true;
result = result && gvariant_reference_test<T>(gv, t);
return result;
}
template<typename T, typename = void>
struct dataType {};
template<typename T>
struct dataType <T, typename std::enable_if< std::is_void<T>::value >::type>
{
static bool variant_test(GVariant gv)
{
bool result = true;
int i = 23;
//raw void pointer
void* v6 = static_cast<void*>(&i);
gv = GVariant::create<void*>(v6);
result = result && (GVariant::cast<void*>(gv) == v6);
result = result && (*(static_cast<int*>(GVariant::cast<void*>(gv))) == i);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< std::is_null_pointer<T>::value >::type>
{
static bool variant_test(GVariant gv)
{
bool result = true;
//raw null pointer
gv = GVariant::create<nullptr_t>(nullptr);
result = result && (GVariant::cast<nullptr_t>(gv) == nullptr);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< std::is_integral<T>::value >::type>
{
static bool variant_test(GVariant gv)
{
return gvariant_arithmetic_test<T>(gv);
}
};
template<typename T>
struct dataType <T, typename std::enable_if< std::is_floating_point<T>::value >::type>
{
static bool variant_test(GVariant gv)
{
bool result = true;
result = result && gvariant_arithmetic_test<T>(gv);
result = result && gvariant_floatingpoint_test<T>(gv);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< std::is_array<T>::value >::type>
{
static_assert(std::rank<T>::value == 1, "Multi dimensional array is not supported");
static bool variant_test(GVariant gv, T t)
{
bool result = true;
gv = GVariant::create<T>(t);
result = result && (GVariant::cast<typename std::decay<T>::type>(gv)[0] == t[0]);
result = result && (GVariant::cast<typename std::decay<T>::type>(gv)[std::extent<T>::value-1] == t[std::extent<T>::value-1]);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< is_vector<T>::value >::type>
{
static bool variant_test(GVariant gv, T t)
{
bool result = true;
gv = GVariant::create<T>(t);
result = result && (GVariant::cast<T>(gv) == t);
if (t.size() > 0)
result = result && dataType<typename T::value_type>::variant_test(t[0]);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< is_list<T>::value >::type>
{
static bool variant_test(GVariant gv, T t)
{
bool result = true;
gv = GVariant::create<T>(t);
result = result && (GVariant::cast<T>(gv) == t);
if (t.size() > 0)
result = result && dataType<typename T::value_type>::variant_test(t.front());
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< is_map<T>::value >::type>
{
static bool variant_test(GVariant gv, T t)
{
bool result = true;
gv = GVariant::create<T>(t);
result = result && (GVariant::cast<T>(gv) == t);
if (t.size() > 0) {
result = result && dataType<typename T::value_type>::variant_test(t.begin()->first);
result = result && dataType<typename T::value_type>::variant_test(t.begin()->second);
}
return result;
}
};
template<class... Types>
struct dataType <std::tuple<Types...>>
{
static bool variant_test(GVariant gv, std::tuple<Types...> t)
{
bool result = true;
gv = GVariant::create<std::tuple<Types...>>(t);
result = result && (GVariant::cast<std::tuple<Types...>>(gv) == t);
result = result && forEachType<Types...>::variant_test(gv);
return result;
}
private:
template<class U, class... Types_Intenal>
struct forEachType
{
static bool variant_test(GVariant gv)
{
bool result = dataType<U>::variant_test(gv);
result = result && forEachType<Types_Intenal...>::variant_test(gv);
return result;
}
};
template<class U>
struct forEachType<U>
{
static bool variant_test(GVariant gv)
{
return dataType<U>::variant_test(gv);
}
};
};
template<typename T>
struct dataType <T, typename std::enable_if< is_function_object<T>::value >::type>
{
template<typename R>
static bool variant_test(GVariant gv, T t, R r)
{
bool result = true;
gv = GVariant::create(t);
result = result && ((GVariant::cast<T>(gv))() == r);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< is_shared_ptr<T>::value >::type>
{
static bool variant_test(GVariant gv, T t)
{
bool result = true;
gv = GVariant::create(t);
result = result && ((GVariant::cast<T>(gv)) == t);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if < std::is_class<T>::value && ! ( is_function_object<T>::value ||
std::is_base_of<GPropertyInterface, T>::value ||
is_vector<T>::value ||
is_list<T>::value ||
std::is_array<T>::value ||
is_stack<T>::value ||
is_map<T>::value ||
is_tuple<T>::value ||
is_shared_ptr<T>::value
)>::type>
{
static bool variant_test(GVariant gv, T t=T())
{
bool result = true;
gv = GVariant::create(t);
result = result && (GVariant::cast<T>(gv) == t);
result = gvariant_reference_test<T>(gv, t);
return result;
}
};
template<typename T>
struct dataType <T, typename std::enable_if< std::is_base_of<GPropertyInterface, T>::value>::type>
{
static bool variant_test(GVariant gv)
{
bool result = true;
T t;
result = result && gvariant_class_test<T>(gv, t);
result = result && dataType_internal<typename T::type>::variant_test(gv);
return result;
}
private:
template<typename U, typename = void>
struct dataType_internal {};
template<typename U>
struct dataType_internal <U, typename std::enable_if< std::is_integral<U>::value >::type>
{
static bool variant_test(GVariant gv)
{
return gvariant_arithmetic_test<T, U>(gv);
}
};
template<typename U>
struct dataType_internal <U, typename std::enable_if< std::is_floating_point<U>::value >::type>
{
static bool variant_test(GVariant gv)
{
bool result = true;
result = result && gvariant_arithmetic_test<T, U>(gv);
result = result && gvariant_floatingpoint_test<T, U>(gv);
return result;
}
};
template<typename U>
struct dataType_internal <U, typename std::enable_if< std::is_class<U>::value >::type>
{
static bool variant_test(GVariant gv)
{
bool result = true;
U u;
result = result && gvariant_class_test<U>(gv, u);
return result;
}
};
};
class Color
{
public:
Color() {}
Color(uint8 _r, uint8 _g, uint8 _b, uint8 _a) : r(_r), g(_g), b(_b), a(_a) {}
uint8 r = 0, g = 0, b = 0, a = 0;
bool operator==(const Color& rhs) { return (this->r == rhs.r && this->g == rhs.g && this->b == rhs.b && this->a == rhs.a); }
};
class GVariantTest$$CompoundTypes : public ::testing::Test {
protected:
void SetUp() override {
intVector.push_back(11);
intVector.push_back(12);
intVector.push_back(13);
floatList.push_back(1.1f);
floatList.push_back(2.2f);
floatList.push_back(3.3f);
stringDoubleMap["1.23"] = 1.23;
stringDoubleMap["4.56"] = 4.56;
stringDoubleMap["7.89"] = 7.89;
boolIntStringTuple = std::make_tuple(true, 768, "large number");
}
protected:
string str = "Default test string";
wstring wstr = L"\x6f\x6c\xc3\xa9";
int arr1[5] = { 1,2,3,4,5 };
int arr2[2][5] = { { 1,2,3,4,5 }, { 1,2,3,4,5 } };
glm::vec3 arr3[3] = { glm::vec3(1),glm::vec3(2), glm::vec3(3) };
std::vector<int> intVector;
std::list<float> floatList;
std::map < std::string, double> stringDoubleMap;
std::tuple<bool, int, std::string > boolIntStringTuple;
Color red{ 255,0,0,255 };
std::shared_ptr<Color> green = std::make_shared<Color>(0, 255, 0, 255);
};
GVariant gv;
#define GTEST_GVARIANT2( SUITE, NAME, TYPE ) \
TEST(SUITE, NAME ) { \
EXPECT_EQ(true, dataType<TYPE>::variant_test(gv)); \
}
#define GTEST_GVARIANT( SUITE, TYPE ) GTEST_GVARIANT2(SUITE, TYPE, TYPE)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, void)
GTEST_GVARIANT2(GVariantTest$$FundementalTypes, nullptrType, nullptr_t)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, bool)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, int8)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, uint8)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, char)
GTEST_GVARIANT2(GVariantTest$$FundementalTypes, char16Type, char16_t)
GTEST_GVARIANT2(GVariantTest$$FundementalTypes, char32Type, char32_t)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, int16)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, uint16)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, int32)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, uint32)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, int64)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, uint64)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, float32)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, float64)
GTEST_GVARIANT(GVariantTest$$FundementalTypes, float80)
TEST_F(GVariantTest$$CompoundTypes, OneDimensionalArray) {
EXPECT_EQ(true, dataType<decltype(arr1)>::variant_test(gv, arr1));
//EXPECT_EQ(true, dataType<decltype(arr2)>::variant_test(gv, arr2)); //Must give compilation error
EXPECT_EQ(true, dataType<decltype(arr3)>::variant_test(gv, arr3));
}
TEST_F(GVariantTest$$CompoundTypes, FunctionObject) {
bool result = true;
std::function<int()> f1 = []()->int {return 345; };
EXPECT_EQ(true, dataType<decltype(f1)>::variant_test(gv, f1, 345));
int i = 23;
std::function<int()> f2 = [=]()->int {return i; };
EXPECT_EQ(true, dataType<decltype(f2)>::variant_test(gv, f2, i));
int j = 47;
std::function<int()> f3 = [&]()->int {return ++j; };
EXPECT_EQ(true, dataType<decltype(f3)>::variant_test(gv, f3, 48));
}
TEST_F(GVariantTest$$CompoundTypes, Class) {
EXPECT_EQ(true, dataType<Color>::variant_test(gv, red));
}
TEST_F(GVariantTest$$CompoundTypes, SharedPtr) {
EXPECT_EQ(true, dataType< std::shared_ptr<Color> >::variant_test(gv, green));
}
TEST_F(GVariantTest$$CompoundTypes, string) {
EXPECT_EQ(true, dataType< string >::variant_test(gv, str));
}
TEST_F(GVariantTest$$CompoundTypes, wstring) {
EXPECT_EQ(true, dataType< wstring >::variant_test(gv, wstr));
}
//STL Container types
TEST_F(GVariantTest$$CompoundTypes, Vector) {
EXPECT_EQ(true, dataType< std::vector<int>>::variant_test(gv, intVector));
}
TEST_F(GVariantTest$$CompoundTypes, List) {
EXPECT_EQ(true, dataType< std::list<float>>::variant_test(gv, floatList));
}
TEST_F(GVariantTest$$CompoundTypes, Map) {
bool result = dataType< std::map < std::string, double> >::variant_test(gv, stringDoubleMap);
EXPECT_EQ(true, result);
}
TEST_F(GVariantTest$$CompoundTypes, Tuple) {
bool result = dataType< std::tuple<bool, int, std::string > >::variant_test(gv, boolIntStringTuple);
EXPECT_EQ(true, result);
}
TEST(DISABLED_GVariantTest$$CompoundTypes, Multi_Dim_Array) {
bool result = false;
EXPECT_EQ(true, result);
}
TEST(DISABLED_GVariantTest$$CompoundTypes, unique_ptr) {
bool result = false;
EXPECT_EQ(true, result);
}
TEST(DISABLED_GVariantTest$$CompoundTypes, lvalue_ref) {
bool result = false;
EXPECT_EQ(true, result);
}
//GProperty types
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GBoolProperty)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GCharProperty)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GInt8Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GUint8Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GInt16Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GUint16Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GInt32Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GUint32Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GInt64Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GUint64Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GFloatProperty)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GDoubleProperty)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GVec2Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GVec3Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GVec4Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GMat2Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GMat3Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GMat4Property)
GTEST_GVARIANT(GVariantTest$$GPropertyTypes, GObjectPointerProperty)
//Serialization test
//GTEST_GSERIALIZATION(GVariantTest$$FundementalTypes, int8)
void variant_test()
{
}
| [
"asankar1@outlook.com"
] | asankar1@outlook.com |
2526a533d063f5f20b534f4335c6eb4b3d51c1c0 | cae83fb974436ea3be3c2fcee7d9f889b12760b3 | /src/test/test_bitcoin.cpp | e648c97c50cc7a506d3484cb8bc0f25b1e54cdd4 | [
"MIT"
] | permissive | Thepokeyman/String | 26f376ff192238ffeb99eae19f820c153a9c9008 | dac28ad0631fcec3879ed313a15a354c62c1597c | refs/heads/master | 2021-04-28T03:53:44.436306 | 2018-02-27T03:58:31 | 2018-02-27T03:58:31 | 122,148,590 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,749 | cpp | #define BOOST_TEST_MODULE String Test Suite
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
#include "db.h"
#include "txdb.h"
#include "main.h"
#include "wallet.h"
#include "util.h"
CWallet* pwalletMain;
CClientUIInterface uiInterface;
extern bool fPrintToConsole;
extern void noui_connect();
struct TestingSetup {
CCoinsViewDB *pcoinsdbview;
boost::filesystem::path pathTemp;
boost::thread_group threadGroup;
TestingSetup() {
fPrintToDebugger = true; // don't want to write to debug.log file
noui_connect();
bitdb.MakeMock();
pathTemp = GetTempPath() / strprintf("test_string_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
boost::filesystem::create_directories(pathTemp);
mapArgs["-datadir"] = pathTemp.string();
pblocktree = new CBlockTreeDB(1 << 20, true);
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
InitBlockIndex();
bool fFirstRun;
pwalletMain = new CWallet("wallet.dat");
pwalletMain->LoadWallet(fFirstRun);
RegisterWallet(pwalletMain);
nScriptCheckThreads = 3;
for (int i=0; i < nScriptCheckThreads-1; i++)
threadGroup.create_thread(&ThreadScriptCheck);
}
~TestingSetup()
{
threadGroup.interrupt_all();
threadGroup.join_all();
delete pwalletMain;
pwalletMain = NULL;
delete pcoinsTip;
delete pcoinsdbview;
delete pblocktree;
bitdb.Flush(true);
boost::filesystem::remove_all(pathTemp);
}
};
BOOST_GLOBAL_FIXTURE(TestingSetup);
void Shutdown(void* parg)
{
exit(0);
}
void StartShutdown()
{
exit(0);
}
| [
"Thepokeymanvideos@gmail.com"
] | Thepokeymanvideos@gmail.com |
f22bb9efcd60729e0052495dcc6ba2fe4a1a3e42 | 0d0548fd104467d3e2f55b6fc5b40b289221d910 | /TileList.h | f67c9de09af2d0938084c1830541fe6c5c4f3d6b | [] | no_license | JohanssonDaniel/tiles | 83aca4e897861720daadb22c83dfdd71a12642b8 | 154517a2f8a7cc269a5d4dd95b91515a640c2161 | refs/heads/master | 2016-09-05T12:51:32.980865 | 2014-10-13T09:12:44 | 2014-10-13T09:12:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 919 | h | // This is the .h file you will edit and turn in.
// We have provided a skeleton for you,
// but you must finish it as described in the spec.
// Also remove these comments here and add your own, as well as on the members.
// TODO: remove this comment header
#ifndef TILELIST_H
#define TILELIST_H
#include <QGraphicsScene>
#include "Tile.h"
class TileList {
public:
TileList();
~TileList();
void addTile(Tile tile);
void drawAll(QGraphicsScene* scene) const;
int indexOfTopTile(int x, int y) const;
void lower(int x, int y);
void raise(int x, int y);
void remove(int x, int y);
void removeAll(int x, int y);
private:
int m_size = 0; // number of elements added
int m_capacity = 10; // length of array
Tile* m_elements = new Tile[m_capacity]; // array of elements
void checkResize();
};
#endif // TILELIST_H
| [
"johanssondaniel93@gmail.com"
] | johanssondaniel93@gmail.com |
10644066854696eed24425aa6a8e3e9f84abf814 | ed2330a2992c53490d100b8f56b60bae20380429 | /source/SplayTree.cpp | f4dd981b0b5666d9e67faa817318678c1629d00e | [] | no_license | ILLLIGION/SplayTree | dde2a82a155bd25c5beedb9979b21348e1280463 | 10596103537153ed0d83fdbd875fa0d24da4c492 | refs/heads/master | 2021-05-11T13:14:06.712661 | 2018-02-01T12:40:25 | 2018-02-01T12:40:25 | 117,675,562 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,829 | cpp | #include "../include/SplayTree.hpp"
template <typename T>
SplayTree<T>::Node::Node(short key_, T value_) : key(key_), value(value_), left_(nullptr), right_(nullptr),
parent_(nullptr) {};
template <typename T>
SplayTree<T>::Node::~Node()
{
left_ = nullptr;
right_ = nullptr;
};
template <typename T>
auto SplayTree<T>::Node::equal(std::shared_ptr<Node> tree) const noexcept -> bool
{
if ((left_ && !tree->left_) || (right_ && !tree->right_))
return false;
if ((!left_ && tree->left_) || (!right_ && tree->right_))
return false;
bool equalLeft = true; bool equalRight = true;
if ((value != tree->value) || (key != tree->key))
return false;
else
{
if (!left_ && !right_)
return true;
if (left_)
equalLeft = left_->equal(tree->left_);
if (right_)
equalRight = right_->equal(tree->right_);
return equalLeft && equalRight;
}
}
template <typename T>
SplayTree<T>::SplayTree() : root_(nullptr) {};
/*template <typename T>
SplayTree<T>::SplayTree(const std::initializer_list<T>& list) : root_(nullptr)
{
for (auto it = list.begin(); it != list.end(); ++it)
insert(*it);
};
*/
template <typename T>
auto SplayTree<T>::rotate_left(std::shared_ptr<Node> node) -> void
{
std::shared_ptr<Node> tmp = node->left_;
if (node->parent_ == nullptr)
root_ = tmp;
else if (node == node->parent_->left_)
node->parent_->left_ = tmp;
else
node->parent_->right_ = tmp;
tmp->parent_ = node->parent_;
node->left_ = tmp->right_;
if (node->left_ != nullptr)
node->left_->parent_ = node;
tmp->right_ = node;
node->parent_ = tmp;
}
template <typename T>
auto SplayTree<T>::rotate_right(std::shared_ptr<Node> node) -> void
{
std::shared_ptr<Node> tmp = node->right_;
if (node->parent_ == nullptr)
root_ = tmp;
else if (node == node->parent_->left_)
node->parent_->left_ = tmp;
else
node->parent_->right_ = tmp;
tmp->parent_ = node->parent_;
node->right_ = tmp->left_;
if (node->right_ != nullptr)
node->right_->parent_ = node;
tmp->left_ = node;
node->parent_ = tmp;
}
template <typename T>
auto SplayTree<T>::splay(std::shared_ptr<Node> node) -> void
{
if (node == nullptr)
return;
while (node->parent_ != nullptr && node->parent_->parent_ != nullptr) {
if (node == node->parent_->left_) {
if (node->parent_ == node->parent_->parent_->left_) {
// ZigZig
rotate_left(node->parent_->parent_);
rotate_left(node->parent_);
}
else {
// ZigZag
rotate_left(node->parent_);
rotate_right(node->parent_);
}
}
else {
if (node->parent_ == node->parent_->parent_->right_) {
// ZigZig
rotate_right(node->parent_->parent_);
rotate_right(node->parent_);
}
else {
// ZigZag
rotate_right(node->parent_);
rotate_left(node->parent_);
}
}
}
if (node->parent_ == nullptr) {
return;
}
if (node == node->parent_->left_) {
// Zig
rotate_left(node->parent_);
}
else {
// Zig
rotate_right(node->parent_);
}
}
template <typename T>
auto SplayTree<T>::insert(const short key, const T& value) -> bool
{
bool foundPlace = false;
if (root_ == nullptr)
{
root_ = std::make_shared<Node>(key, value);
return true;
}
std::shared_ptr<Node> thisNode = root_;
while (!foundPlace)
{
if (key == thisNode->key)
return false;
if (key < thisNode->key)
{
if (!thisNode->left_)
{
thisNode->left_ = std::make_shared<Node>(key, value);
thisNode->left_->parent_ = thisNode;
thisNode = thisNode->left_;
foundPlace = true;
}
else
thisNode = thisNode->left_;
}
else if (!thisNode->right_)
{
thisNode->right_ = std::make_shared<Node>(key, value);
thisNode->right_->parent_ = thisNode;
thisNode = thisNode -> right_;
foundPlace = true;
}
else
thisNode = thisNode->right_;
}
splay(thisNode);
this -> root_ = thisNode;
return foundPlace;
};
template <typename T>
auto SplayTree<T>::search(const short key) -> const T*
{
if (!root_)
return nullptr;
std::shared_ptr<Node> thisNode = root_;
while (1)
{
if (key == thisNode->key)
{
splay(thisNode);
this -> root_ = thisNode;
return &thisNode->value;
}
else if (key < thisNode->key)
if (thisNode->left_)
thisNode = thisNode->left_;
else
{
splay(thisNode);
this -> root_ = thisNode;
return nullptr;
}
else
{
if (thisNode->right_)
thisNode = thisNode->right_;
else
{
splay(thisNode);
this -> root_ = thisNode;
return nullptr;
}
}
}
};
template <typename T>
auto SplayTree<T>::max() const -> const T*
{
if (root_ == nullptr)
return nullptr;
std::shared_ptr<Node> tmp = root_;
while (tmp->right_ != nullptr)
tmp = tmp->right_;
return &tmp -> value;
}
template <typename T>
auto SplayTree<T>::merge(std::shared_ptr<Node> left_tree, std::shared_ptr<Node> right_tree) -> bool
{
std::shared_ptr<Node> new_root = max_merge(left_tree);
if (new_root == nullptr)
return false;
splay(new_root);
new_root->right_ = right_tree;
if (right_tree != nullptr)
right_tree->parent_ = new_root;
return true;
}
template <typename T>
auto SplayTree<T>::max_merge(std::shared_ptr<Node> left_tree) const -> std::shared_ptr<Node>
{
if (left_tree == nullptr)
return nullptr;
std::shared_ptr<Node> tmp = left_tree;
while (tmp->right_ != nullptr)
tmp = tmp->right_;
return tmp;
}
template <typename T>
auto SplayTree<T>::remove(const short key) -> bool
{
if(search(key))
{
search(key);
if (root_->right_ == nullptr) {
root_ = root_->left_;
if (root_ != nullptr)
root_->parent_ = nullptr;
return true;
}
if (!merge(root_->left_, root_->right_)) {
root_ = root_->right_;
if (root_ != nullptr)
root_->parent_ = nullptr;
return true;
}
return true;
}
else return false;
}
template <typename T>
auto SplayTree<T>::min() const -> const T*
{
if (root_ == nullptr)
return nullptr;
std::shared_ptr<Node> tmp = root_;
while (tmp->left_ != nullptr)
tmp = tmp->left_;
return &tmp->value;
}
template <typename T>
auto SplayTree<T>::operator == (const SplayTree& tree) -> bool
{
return (root_->equal(tree.root_));
};
template <typename T>
auto SplayTree<T>::print(std::ostream& out, std::shared_ptr<Node> node, int level) const noexcept -> bool
{
if (node)
{
print(out, node->right_, level + 1);
for(int i = 0; i< level; i++) std::cout<<" ";
std::cout << '[' << node->key << ' ' << node->value << ']' << std::endl;
print(out, node->left_, level + 1);
return true;
}
else return false;
} | [
"dazuk07@yandex.ru"
] | dazuk07@yandex.ru |
1a4dbcbed532426beaf4a588f2c115d84a280c88 | f2ed8aea695c3d64430864249d14d0dff305ff04 | /BlizzardBallBattle/Game/Scenes/SceneTemplate.cpp | a6e9301736274f7762a60228fb61ac5d3ba9c6a2 | [] | no_license | CarsonRoscoe/BlizzardBallBattle | 6f6e862b304f4235a81030ab97e6cc681ec2a164 | afb07f48399708078ea312efda08a9bd9e79fff2 | refs/heads/master | 2021-05-08T09:42:11.199715 | 2017-12-19T09:09:09 | 2017-12-19T09:09:09 | 107,194,696 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,349 | cpp | #include "SceneTemplate.h"
#include "MatchManager.h"
#include "GLHeaders.h"
#include "SpriteRendererManager.h"
#include "Shader.h"
#include "SharedConstants.h"
#include "Sender.h"
#include "Receiver.h"
#include "SpriteSheet.h"
#include <iostream>
SceneTemplate::SceneTemplate(int p1ai, int p2ai) : GameScene(p1ai, p2ai) {
this->p1ai = p1ai;
this->p2ai = p2ai;
}
void SceneTemplate::OnStart(){
BuildBaseScene();
GLuint snowTexture = SpriteRendererManager::GetInstance()->GenerateTexture(BuildPath("Game/Assets/Sprites/SnowTile.png"));
GLuint iceTexture = SpriteRendererManager::GetInstance()->GenerateTexture(BuildPath("Game/Assets/Sprites/IceTile.png"));
GLuint characterTexture = SpriteRendererManager::GetInstance()->GenerateTexture(BuildPath("Game/Assets/Sprites/Character.png"));
GLuint spriteSheetTexture = SpriteRendererManager::GetInstance()->GenerateTexture(BuildPath("Game/Assets/Sprites/WalkingSpriteSheet.png"));
// Create Players
MatchManager::GetInstance()->CreateBattlers(Shader::GetShader(), characterTexture, spriteSheetTexture, p1ai, p2ai);
}
void SceneTemplate::OnPause() {
MatchManager::GetInstance()->Stop();
ClearScene();
}
void SceneTemplate::OnEnd() {
}
void SceneTemplate::OnUpdate(int ticks) {
//player1->GetComponent<Sender*>()->SendUpdate();
//NetworkingManagerTemp::GetInstance()->SendQueuedEvents();
} | [
"CarsonRoscoe7@gmail.com"
] | CarsonRoscoe7@gmail.com |
3e210d1a552966455d2d40e6b25071604042d1f8 | 46d4712c82816290417d611a75b604d51b046ecc | /Samples/Win7Samples/multimedia/WMP/Wizards/services/templates/1033/Type1/sample.h | c5897bd4bbb2c57fd30365e84f0d930943493df1 | [
"MIT"
] | permissive | ennoherr/Windows-classic-samples | 00edd65e4808c21ca73def0a9bb2af9fa78b4f77 | a26f029a1385c7bea1c500b7f182d41fb6bcf571 | refs/heads/master | 2022-12-09T20:11:56.456977 | 2022-12-04T16:46:55 | 2022-12-04T16:46:55 | 156,835,248 | 1 | 0 | NOASSERTION | 2022-12-04T16:46:55 | 2018-11-09T08:50:41 | null | UTF-8 | C++ | false | false | 8,902 | h | //
// Copyright (c) Microsoft Corporation. All rights reserved.
//
#pragma once
#include "resource.h"
typedef struct _CONTENT_PARTNER_GLOBALS
{
LONG userLoggedIn;
LONG haveCachedCredentials;
ULONG totalDownloadFailures;
WCHAR credentialsFile[MAX_PATH];
} CONTENT_PARTNER_GLOBALS;
static const WCHAR g_rootURL[] = L"http://www.microsoft.com/windows/windowsmedia/player/11/samples/SampleType1Store/";
static const WCHAR g_audioRootURL[] = L"http://download.microsoft.com/download/a/e/b/aeb86cba-7d91-4eea-9e29-8d53c4bc05aa/";
static const WCHAR g_placeholderTrack[] = L"Placeholder.wma";
static const WCHAR* g_tracks[] =
{
L"House.wma",
L"Jeanne.wma",
L"Laure.wma",
L"Mellow.wma",
L"Multilang.wma",
};
typedef enum _ContentPartnerThreadType
{
ThreadTypeDownload = 1,
ThreadTypeBuy,
ThreadTypeRefreshLicense,
ThreadTypeLogin,
ThreadTypeSendMessage,
ThreadTypeUpdateDevice,
ThreadTypeList
} ContentPartnerThreadType;
typedef struct _DOWNLOAD_THREAD_CONTEXT2
{
UINT msgDownloadBatch;
} DOWNLOAD_THREAD_CONTEXT2;
typedef struct _DOWNLOAD_BATCH_CONTEXT
{
IStream* pIStream;
DWORD cookie;
} DOWNLOAD_BATCH_CONTEXT;
typedef struct _BUY_THREAD_CONTEXT2
{
UINT msgBuy;
} BUY_THREAD_CONTEXT2;
typedef struct _BUY_CONTEXT
{
IStream* pIStream;
DWORD cookie;
} BUY_CONTEXT;
typedef struct _REFRESH_LICENSE_THREAD_CONTEXT2
{
UINT msgRefreshLicense;
} REFRESH_LICENSE_THREAD_CONTEXT2;
typedef struct _REFRESH_LICENSE_CONTEXT
{
DWORD dwCookie;
VARIANT_BOOL fLocal;
BSTR bstrURL;
WMPStreamingType type;
ULONG contentID;
BSTR bstrRefreshReason;
VARIANT* pReasonContext;
} REFRESH_LICENSE_CONTEXT;
typedef struct _LOGIN_THREAD_CONTEXT2
{
UINT msgLogin;
UINT msgLogout;
UINT msgAuthenticate;
UINT msgVerifyPermission;
} LOGIN_THREAD_CONTEXT2;
typedef struct _LOGIN_CONTEXT
{
BLOB userInfo;
BLOB pwdInfo;
VARIANT_BOOL fUsedCachedCreds;
VARIANT_BOOL fOkToCahce;
BSTR bstrPermission;
VARIANT permissionContext;
} LOGIN_CONTEXT;
typedef struct _SEND_MESSAGE_THREAD_CONTEXT2
{
UINT msgSendMessage;
} SEND_MESSAGE_THREAD_CONTEXT2;
typedef struct _SEND_MESSAGE_CONTEXT
{
BSTR bstrMsg;
BSTR bstrParam;
} SEND_MESSAGE_CONTEXT;
typedef struct _UPDATE_DEVICE_THREAD_CONTEXT2
{
UINT msgUpdateDevice;
} UPDATE_DEVICE_THREAD_CONTEXT2;
typedef struct _UPDATE_DEVICE_CONTEXT
{
BSTR bstrDeviceName;
} UPDATE_DEVICE_CONTEXT;
typedef struct _LIST_THREAD_CONTEXT2
{
UINT msgGetListContents;
} LIST_THREAD_CONTEXT2;
typedef struct _LIST_CONTEXT
{
BSTR location;
VARIANT context;
BSTR bstrListType;
BSTR bstrParams;
DWORD dwListCookie;
} LIST_CONTEXT;
typedef struct _CONTENT_PARTNER_THREAD_CONTEXT
{
ContentPartnerThreadType threadType;
IStream* pIStream;
HANDLE hInitialized;
UINT msgExitMessageLoop;
union
{
DOWNLOAD_THREAD_CONTEXT2 downloadThreadContext;
BUY_THREAD_CONTEXT2 buyThreadContext;
REFRESH_LICENSE_THREAD_CONTEXT2 refreshLicenseThreadContext;
LOGIN_THREAD_CONTEXT2 loginThreadContext;
SEND_MESSAGE_THREAD_CONTEXT2 sendMessageThreadContext;
UPDATE_DEVICE_THREAD_CONTEXT2 updateDeviceThreadContext;
LIST_THREAD_CONTEXT2 listThreadContext;
};
} CONTENT_PARTNER_THREAD_CONTEXT;
class __declspec( uuid("{[!output CLASSID]}") )
C[!output Safe_root]:
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<C[!output Safe_root], &__uuidof(C[!output Safe_root])>,
public IWMPContentPartner
{
public:
DECLARE_REGISTRY_RESOURCEID(IDR_REGISTRY1)
BEGIN_COM_MAP(C[!output Safe_root])
COM_INTERFACE_ENTRY(IWMPContentPartner)
END_COM_MAP()
virtual HRESULT STDMETHODCALLTYPE SetCallback(
IWMPContentPartnerCallback* pCallback);
virtual HRESULT STDMETHODCALLTYPE Notify(
WMPPartnerNotification type,
VARIANT *pContext);
virtual HRESULT STDMETHODCALLTYPE GetItemInfo(
BSTR bstrInfoName,
VARIANT *pContext,
VARIANT *pData);
virtual HRESULT STDMETHODCALLTYPE GetContentPartnerInfo(
BSTR bstrInfoName,
VARIANT *pData);
virtual HRESULT STDMETHODCALLTYPE GetCommands(
BSTR location,
VARIANT *pLocationContext,
BSTR itemLocation,
ULONG cItemIDs,
ULONG *prgItemIDs,
ULONG *pcItemIDs,
WMPContextMenuInfo **pprgItems);
virtual HRESULT STDMETHODCALLTYPE InvokeCommand(
DWORD dwCommandID,
BSTR location,
VARIANT *pLocationContext,
BSTR itemLocation,
ULONG cItemIDs,
ULONG *rgItemIDs);
virtual HRESULT STDMETHODCALLTYPE CanBuySilent(
IWMPContentContainerList *pInfo,
BSTR *pbstrTotalPrice,
VARIANT_BOOL *pSilentOK);
virtual HRESULT STDMETHODCALLTYPE Buy(
IWMPContentContainerList *pInfo,
DWORD cookie);
virtual HRESULT STDMETHODCALLTYPE GetStreamingURL(
WMPStreamingType st,
VARIANT *pStreamContext,
BSTR *pbstrURL);
virtual HRESULT STDMETHODCALLTYPE Download(
IWMPContentContainerList *pInfo,
DWORD cookie);
virtual HRESULT STDMETHODCALLTYPE DownloadTrackComplete(
HRESULT hrResult,
ULONG contentID,
BSTR downloadTrackParam);
virtual HRESULT STDMETHODCALLTYPE RefreshLicense(
DWORD dwCookie,
VARIANT_BOOL fLocal,
BSTR bstrURL,
WMPStreamingType type,
ULONG contentID,
BSTR bstrRefreshReason,
VARIANT *pReasonContext);
virtual HRESULT STDMETHODCALLTYPE GetCatalogURL(
DWORD dwCatalogVersion,
DWORD dwCatalogSchemaVersion,
LCID catalogLCID,
DWORD *pdwNewCatalogVersion,
BSTR *pbstrCatalogURL,
VARIANT *pExpirationDate);
virtual HRESULT STDMETHODCALLTYPE GetTemplate(
WMPTaskType task,
BSTR location,
VARIANT *pContext,
BSTR clickLocation,
VARIANT *pClickContext,
BSTR bstrFilter,
BSTR bstrViewParams,
BSTR *pbstrTemplateURL,
WMPTemplateSize *pTemplateSize);
virtual HRESULT STDMETHODCALLTYPE UpdateDevice(
BSTR bstrDeviceName);
virtual HRESULT STDMETHODCALLTYPE GetListContents(
BSTR location,
VARIANT *pContext,
BSTR bstrListType,
BSTR bstrParams,
DWORD dwListCookie);
virtual HRESULT STDMETHODCALLTYPE Login(
BLOB userInfo,
BLOB pwdInfo,
VARIANT_BOOL fUsedCachedCreds,
VARIANT_BOOL fOkToCache);
virtual HRESULT STDMETHODCALLTYPE Authenticate(
BLOB userInfo,
BLOB pwdInfo);
virtual HRESULT STDMETHODCALLTYPE Logout(void);
virtual HRESULT STDMETHODCALLTYPE SendMessage(
BSTR bstrMsg,
BSTR bstrParam);
virtual HRESULT STDMETHODCALLTYPE StationEvent(
BSTR bstrStationEventType,
ULONG StationId,
ULONG PlaylistIndex,
ULONG TrackID,
BSTR TrackData,
DWORD dwSecondsPlayed);
virtual HRESULT STDMETHODCALLTYPE CompareContainerListPrices(
IWMPContentContainerList *pListBase,
IWMPContentContainerList *pListCompare,
long *pResult);
virtual HRESULT STDMETHODCALLTYPE VerifyPermission(
BSTR bstrPermission,
VARIANT *pContext);
C[!output Safe_root]();
HRESULT STDMETHODCALLTYPE FinalConstruct();
~C[!output Safe_root]();
private:
HRESULT STDMETHODCALLTYPE StartContentPartnerThread(ContentPartnerThreadType threadType);
HRESULT STDMETHODCALLTYPE ShutdownThreads();
HRESULT STDMETHODCALLTYPE CreateCredentialsFilePath();
CComPtr<IWMPContentPartnerCallback> m_spCallback;
// Members related to the download thread
HANDLE m_downloadThreadHandle;
DWORD m_downloadThreadId;
UINT m_msgDownloadBatch;
// Members related to the buy thread
HANDLE m_buyThreadHandle;
DWORD m_buyThreadId;
UINT m_msgBuy;
// Members related to the refresh-license thread
HANDLE m_refreshLicenseThreadHandle;
DWORD m_refreshLicenseThreadId;
UINT m_msgRefreshLicense;
// Members related to the log-in thread
HANDLE m_loginThreadHandle;
DWORD m_loginThreadId;
UINT m_msgLogin;
UINT m_msgLogout;
UINT m_msgAuthenticate;
UINT m_msgVerifyPermission;
// Members related to the send-message thread
HANDLE m_sendMessageThreadHandle;
DWORD m_sendMessageThreadId;
UINT m_msgSendMessage;
// Members related to the update-device thread
HANDLE m_updateDeviceThreadHandle;
DWORD m_updateDeviceThreadId;
UINT m_msgUpdateDevice;
// Members related to the list thread
HANDLE m_listThreadHandle;
DWORD m_listThreadId;
UINT m_msgGetListContents;
UINT m_msgExitMessageLoop;
};
HRESULT CacheCredentials(LOGIN_CONTEXT* pLoginCtx);
HRESULT HaveCachedCredentials(LONG* pCached);
DWORD WINAPI ContentPartnerThreadProc(LPVOID lpParameter);
| [
"chrisg@microsoft.com"
] | chrisg@microsoft.com |
d5a5a1ac5fbac5f68c861c1efdf11931cad7891c | 2d36ac7285664ce798edb27bafa00e0dbc0f25fb | /LSL/liblsl/external/lslboost/mpl/int_fwd.hpp | 818759063a72d891737996ccd6f0bf69f02af755 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | nagarjunvinukonda/Brain-Computer-Interface-for-Bionic-Arm | af1a6241df167e747a7d9426e497f95dda632fda | 839cb0dc798d2bf274d3df7c4db0fef62af3770d | refs/heads/master | 2023-02-13T12:02:36.692225 | 2021-01-14T08:32:35 | 2021-01-14T08:32:35 | 297,540,583 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 796 | hpp |
#ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED
#define BOOST_MPL_INT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.lslboost.org/LICENSE_1_0.txt)
//
// See http://www.lslboost.org/libs/mpl for documentation.
// $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <lslboost/mpl/aux_/adl_barrier.hpp>
#include <lslboost/mpl/aux_/nttp_decl.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(int_)
#endif // BOOST_MPL_INT_FWD_HPP_INCLUDED
| [
"vinukondanagarjun4@gmail.com"
] | vinukondanagarjun4@gmail.com |
031af8ac4c52ab148f66f8d2c97393e0f75003b4 | 6250f3343eff1638912510b66ed936c59796635a | /src_vc141/thirdparty/stlsoft/pantheios/src/inserters/hostid.cpp | 0f45c1c8c169f382169c7dc2489aa1e2b74d811e | [
"BSD-2-Clause",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | nneesshh/mytoolkit | b4b242307a6603bc5785bc130de8f4d3b5ea9265 | 336ae9c7077c8687a8cf8a2ce4aec804c28ab90c | refs/heads/master | 2020-04-05T15:18:07.985547 | 2018-12-17T11:36:07 | 2018-12-17T11:36:07 | 156,961,652 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 5,135 | cpp | /* /////////////////////////////////////////////////////////////////////////
* File: src/inserters/hostid.cpp
*
* Purpose: Implementation of the pantheios::hostId inserter class.
*
* Created: 14th April 2008
* Updated: 29th June 2016
*
* Home: http://www.pantheios.org/
*
* Copyright (c) 2008-2016, Matthew Wilson and Synesis Software
* 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(s) of Matthew Wilson and Synesis Software nor the
* names of any 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.
*
* ////////////////////////////////////////////////////////////////////// */
#define PANTHEIOS_NO_INCLUDE_STLSOFT_STRING_ACCESS
/* Pantheios header files */
#include <pantheios/pantheios.h>
#include <pantheios/inserters/hostid.hpp>
#include <pantheios/util/memory/auto_buffer_selector.hpp>
#include <pantheios/util/string/strdup.h>
#include <pantheios/util/system/hostname.h>
#include <pantheios/internal/safestr.h>
/* Standard C header files */
#if defined(STLSOFT_COMPILER_IS_BORLAND)
# include <memory.h>
#endif /* compiler */
#include <string.h>
/* /////////////////////////////////////////////////////////////////////////
* warning suppression
*/
#if defined(STLSOFT_COMPILER_IS_BORLAND)
# pragma warn -8008
# pragma warn -8066
#endif /* compiler */
/* /////////////////////////////////////////////////////////////////////////
* namespace
*/
#if !defined(PANTHEIOS_NO_NAMESPACE)
namespace pantheios
{
namespace
{
} /* anonymous namespace */
#endif /* !PANTHEIOS_NO_NAMESPACE */
/* /////////////////////////////////////////////////////////////////////////
* globals
*/
struct hostId_t const* hostId = 0;
/* /////////////////////////////////////////////////////////////////////////
* namespace
*/
#if !defined(PANTHEIOS_NO_NAMESPACE) && \
!defined(STLSOFT_COMPILER_IS_BORLAND)
namespace inserters
{
#endif /* !PANTHEIOS_NO_NAMESPACE) && !STLSOFT_COMPILER_IS_BORLAND */
/* /////////////////////////////////////////////////////////////////////////
* inserter classes
*/
// host_id_t
inline void host_id_t::construct_() const
{
const_cast<class_type*>(this)->construct_();
}
void host_id_t::construct_()
{
static const pan_char_t s_localHost[] = PANTHEIOS_LITERAL_STRING("localhost");
PANTHEIOS_NS_QUAL_(util, auto_buffer_selector)<
pan_char_t
, 256
>::type hostName_(256);
size_t cch = getHostName(hostName_);
pan_char_t const* hostName = hostName_.data();
if(0 == cch)
{
cch = STLSOFT_NUM_ELEMENTS(s_localHost) - 1;
hostName = s_localHost;
}
#ifdef STLSOFT_CF_THROW_BAD_ALLOC
m_value = pantheios_util_strdup_throw(hostName);
m_len = cch;
#else /* ? STLSOFT_CF_THROW_BAD_ALLOC */
m_value = pantheios_util_strdup_nothrow(hostName);
m_len = (NULL == m_value) ? 0 : cch;
#endif /* STLSOFT_CF_THROW_BAD_ALLOC */
}
host_id_t::host_id_t()
: m_value(NULL)
, m_len(0)
{}
host_id_t::~host_id_t() STLSOFT_NOEXCEPT
{
pantheios_util_strfree(const_cast<pan_char_t*>(m_value));
}
host_id_t::operator size_t () const
{
if(NULL == m_value)
{
construct_();
}
return m_len;
}
host_id_t::operator pan_char_t const* () const
{
if(NULL == m_value)
{
construct_();
}
return m_value;
}
/* /////////////////////////////////////////////////////////////////////////
* namespace
*/
#if !defined(PANTHEIOS_NO_NAMESPACE)
# if !defined(STLSOFT_COMPILER_IS_BORLAND)
} /* namespace inserters */
# endif /* !STLSOFT_COMPILER_IS_BORLAND */
} /* namespace pantheios */
#endif /* !PANTHEIOS_NO_NAMESPACE */
/* ///////////////////////////// end of file //////////////////////////// */
| [
"nneesshh@163.com"
] | nneesshh@163.com |
19c601747484785e681522535a265ad53d283c6b | ab83049141b3a1f35166e11c7e74e7db8be0950d | /converter/src/mapConverter/mapConverter.hpp | 7145c53aec322c29c1822bf7d66f8ef651378e37 | [
"MIT"
] | permissive | blurymind/Tiled2GBA | 773aa25cfa712c2ea37e848eb2d25bb9f2a31541 | 7f9a4f0c22803eec15e35bdd7fb36f9a9ed5f6b9 | refs/heads/master | 2021-01-26T02:28:17.502297 | 2019-01-26T21:44:49 | 2019-01-26T21:44:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 642 | hpp | #ifndef MAP_CONVERTER_H
#define MAP_CONVERTER_H
#include "../lib/tmxlite/Map.hpp"
#include "../gba/gbaMap/gbaMap.hpp"
#include "../lib/tmxlite/TileLayer.hpp"
using namespace std;
/**
* Converts a TMX Map to a GBA Map.
*/
class MapConverter {
public:
/**
* Convert a TMX Map.
* @param tmxMap The TMX Map.
* @return The GBA Map.
*/
GBAMap convert(const string &name, const tmx::Map &tmxMap);
private:
vector<const tmx::TileLayer*> getTileLayers(const vector<tmx::Layer::Ptr> &layers);
vector<const tmx::ObjectGroup*> getObjectLayers(const vector<tmx::Layer::Ptr> &layers);
};
#endif // MAP_CONVERTER_H | [
"10974297+LucvandenBrand@users.noreply.github.com"
] | 10974297+LucvandenBrand@users.noreply.github.com |
e0641d743e50b9ce4c62da3450faff6ca6d7ae7c | 1992f8fbd2ee5b3537f1106a6bdd81f692b161fa | /swarsim-3d/display/model_3ds.h | 9f17edb2a275c92263411439fd3acb2a34da054f | [
"MIT"
] | permissive | grohith327/MARL-Drones | 5e569794d0c7a2726a042c9501b974ebb3802c71 | ddaaff57266e7092b44a843ca671a4dc405fd7b8 | refs/heads/master | 2022-11-25T10:03:19.114297 | 2020-07-21T01:27:44 | 2020-07-21T01:27:44 | 256,265,495 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,758 | h | //////////////////////////////////////////////////////////////////////
//
// 3D Studio Model Class
// by: Matthew Fairfax
// Taken from: https://github.com/adamwdennis/Frogger/blob/master/src/Model3DS.h
//
// This is a simple class for loading and viewing
// 3D Studio model files (.3ds). It supports models
// with multiple objects. It also supports multiple
// textures per object. It does not support the animation
// for 3D Studio models b/c there are simply too many
// ways for an artist to animate a 3D Studio model and
// I didn't want to impose huge limitations on the artists.
// However, I have imposed a limitation on how the models are
// textured:
// 1) Every faces must be assigned a material
// 2) If you want the face to be textured assign the
// texture to the Diffuse Color map
// 3) The texture must be supported by the GLTexture class
// which only supports bitmap and targa right now
// 4) The texture must be located in the same directory as
// the model
//
// Support for non-textured faces is done by reading the color
// from the material's diffuse color.
//
// Some models have problems loading even if you follow all of
// the restrictions I have stated and I don't know why. If you
// can import the 3D Studio file into Milkshape 3D
// (http://www.swissquake.ch/chumbalum-soft) and then export it
// to a new 3D Studio file. This seems to fix many of the problems
// but there is a limit on the number of faces and vertices Milkshape 3D
// can read.
//
// Usage:
// Model3DS m;
//
// m.Load("model.3ds"); // Load the model
// m.Draw(); // Renders the model to the screen
//
// // If you want to show the model's normals
// m.shownormals = true;
//
// // If the model is not going to be lit then set the lit
// // variable to false. It defaults to true.
// m.lit = false;
//
// // You can disable the rendering of the model
// m.visible = false;
//
// // You can move and rotate the model like this:
// m.rot.x = 90.0f;
// m.rot.y = 30.0f;
// m.rot.z = 0.0f;
//
// m.pos.x = 10.0f;
// m.pos.y = 0.0f;
// m.pos.z = 0.0f;
//
// // If you want to move or rotate individual objects
// m.Objects[0].rot.x = 90.0f;
// m.Objects[0].rot.y = 30.0f;
// m.Objects[0].rot.z = 0.0f;
//
// m.Objects[0].pos.x = 10.0f;
// m.Objects[0].pos.y = 0.0f;
// m.Objects[0].pos.z = 0.0f;
//
//////////////////////////////////////////////////////////////////////
#ifndef MODEL_3DS_H
#define MODEL_3DS_H
#include <stdio.h>
#include <stdint.h>
#ifdef MAC
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
#else
#include <GL/gl.h>
#include <GL/glut.h>
#endif
#include "texture_manager.h"
class Model3DS
{
public:
// A VERY simple vector struct
// I could have included a complex class but I wanted the model class to stand alone
struct Vector {
float x;
float y;
float z;
};
// Vertex struct to make code easier to read in places
struct Vertex {
float x;
float y;
float z;
};
// Color struct holds the diffuse color of the material
struct Color4i {
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char a;
};
// Holds the material info
// TODO: add color support for non textured polys
struct Material {
char name[80]; // The material's name
GLuint tex; // The texture (this is the only outside reference in this class)
bool textured; // whether or not it is textured
Color4i color;
};
// Every chunk in the 3ds file starts with this struct
struct ChunkHeader {
uint16_t id; // The chunk's id
uint32_t len; // The lenght of the chunk
};
// I sort the mesh by material so that I won't have to switch textures a great deal
struct MaterialFaces {
unsigned short *subFaces; // Index to our vertex array of all the faces that use this material
int numSubFaces; // The number of faces
int MatIndex; // An index to our materials
};
// The 3ds file can be made up of several objects
struct Object {
char name[80]; // The object name
float *Vertexes; // The array of vertices
float *Normals; // The array of the normals for the vertices
float *TexCoords; // The array of texture coordinates for the vertices
unsigned short *Faces; // The array of face indices
int numFaces; // The number of faces
int numMatFaces; // The number of differnet material faces
int numVerts; // The number of vertices
int numTexCoords; // The number of vertices
bool textured; // True: the object has textures
MaterialFaces *MatFaces; // The faces are divided by materials
Vector pos; // The position to move the object to
Vector rot; // The angles to rotate the object
};
char *modelname; // The name of the model
char *path; // The path of the model
int numObjects; // Total number of objects in the model
int numMaterials; // Total number of materials in the model
int totalVerts; // Total number of vertices in the model
int totalFaces; // Total number of faces in the model
bool shownormals; // True: show the normals
Material *Materials; // The array of materials
Object *Objects; // The array of objects in the model
Vector pos; // The position to move the model to
Vector rot; // The angles to rotate the model
float scale; // The size you want the model scaled to
bool lit; // True: the model is lit
bool visible; // True: the model gets rendered
void Load(const char *name); // Loads a model
void Draw(); // Draws the model
FILE *bin3ds; // The binary 3ds file
Model3DS(); // Constructor
~Model3DS(); // Destructor
private:
void IntColorChunkProcessor(long length, long findex, int matindex);
void FloatColorChunkProcessor(long length, long findex, int matindex);
// Processes the Main Chunk that all the other chunks exist is
void MainChunkProcessor(long length, long findex);
// Processes the model's info
void EditChunkProcessor(long length, long findex);
// Processes the model's materials
void MaterialChunkProcessor(long length, long findex, int matindex);
// Processes the names of the materials
void MaterialNameChunkProcessor(long length, long findex, int matindex);
// Processes the material's diffuse color
void DiffuseColorChunkProcessor(long length, long findex, int matindex);
// Processes the material's texture maps
void TextureMapChunkProcessor(long length, long findex, int matindex);
// Processes the names of the textures and load the textures
void MapNameChunkProcessor(long length, long findex, int matindex);
// Processes the model's geometry
void ObjectChunkProcessor(long length, long findex, int objindex);
// Processes the triangles of the model
void TriangularMeshChunkProcessor(long length, long findex, int objindex);
// Processes the vertices of the model and loads them
void VertexListChunkProcessor(long length, long findex, int objindex);
// Processes the texture cordiantes of the vertices and loads them
void TexCoordsChunkProcessor(long length, long findex, int objindex);
// Processes the faces of the model and loads the faces
void FacesDescriptionChunkProcessor(long length, long findex, int objindex);
// Processes the materials of the faces and splits them up by material
void FacesMaterialsListChunkProcessor(long length, long findex, int objindex, int subfacesindex);
// Calculates the normals of the vertices by averaging
// the normals of the faces that use that vertex
void CalculateNormals();
TextureManager textureManager;
};
#endif
| [
"grohith327@gmail.com"
] | grohith327@gmail.com |
d97fc07680704a314daa3310823d4e2c4e9a510d | c7be9b178105262893dbae22212fef46fd31df00 | /common/rect.h | 5a119c17e718a5d869261cc871b01213df18738b | [
"Unlicense"
] | permissive | sgorsten/workbench-archived | f2d83bd7454fbabfc1280af60d447de6d06627fa | 360332d4757e8c53debabf5ff105b3b5d26b551a | refs/heads/master | 2021-05-31T03:41:53.410406 | 2016-04-03T00:55:18 | 2016-04-03T00:55:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 652 | h | // This is free and unencumbered software released into the public domain.
// For more information, please refer to <http://unlicense.org>
#ifndef RECT_H
#define RECT_H
#include "../thirdparty/linalg/linalg.h"
using namespace linalg::aliases;
struct rect
{
int x0, y0, x1, y1;
int width() const { return x1 - x0; }
int height() const { return y1 - y0; }
int2 dims() const { return {width(), height()}; }
float aspect_ratio() const { return (float)width()/height(); }
template<class T> bool contains(const linalg::vec<T,2> & point) const { return point.x >= x0 && point.y >= y0 && point.x < x1 && point.y < y1; }
};
#endif | [
"sgorsten@gmail.com"
] | sgorsten@gmail.com |
99deecc0d7562fb3e289ae318cf594573ae5defc | 260e5dec446d12a7dd3f32e331c1fde8157e5cea | /Indi/SDK/Indi_HeadGear_Cowboy_Var01_classes.hpp | 409c91b2e5ccfb2349aafbaff547ffdf994fcf59 | [] | no_license | jfmherokiller/TheOuterWorldsSdkDump | 6e140fde4fcd1cade94ce0d7ea69f8a3f769e1c0 | 18a8c6b1f5d87bb1ad4334be4a9f22c52897f640 | refs/heads/main | 2023-08-30T09:27:17.723265 | 2021-09-17T00:24:52 | 2021-09-17T00:24:52 | 407,437,218 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 694 | hpp | #pragma once
// TheOuterWorlds SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "Indi_HeadGear_Cowboy_Var01_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass HeadGear_Cowboy_Var01.HeadGear_Cowboy_Var01_C
// 0x0000 (0x02B0 - 0x02B0)
class UHeadGear_Cowboy_Var01_C : public UHelmet
{
public:
static UClass* StaticClass()
{
static auto ptr = UObject::FindClass("BlueprintGeneratedClass HeadGear_Cowboy_Var01.HeadGear_Cowboy_Var01_C");
return ptr;
}
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"peterpan0413@live.com"
] | peterpan0413@live.com |
8decb66a01aef419bd2dee3877c533422d45f7ac | a590f039107aaab0980d7ded36b6f79cd47e541d | /OpenFOAM/elliot-7/Dissertation/H/Initial Cases/scalarTransportH/0.92/phi | 6e627c46393a7cd484b4324e1ec20bf0b6bf26e4 | [] | no_license | etenno/uni | 3f85179768ae5a5d77dd21879f84323278a7a2f6 | bb62570182ea239c123df954eb0893e2d681fe8d | refs/heads/master | 2023-03-04T08:30:00.034753 | 2021-02-14T12:54:03 | 2021-02-14T12:54:03 | 338,678,729 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,697 | /*--------------------------------*- 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 surfaceScalarField;
location "0.92";
object phi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet1
{
type calculated;
value nonuniform List<scalar>
100
(
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
-0.002
)
;
}
inlet2
{
type calculated;
value nonuniform List<scalar>
100
(
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
-0.004
)
;
}
outlet1
{
type calculated;
value uniform 0;
}
outlet2
{
type calculated;
value uniform 0;
}
fixedWalls
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //
| [
"elliot.s.tennison@gmail.com"
] | elliot.s.tennison@gmail.com | |
5519f0dda757e6e3bed7cfa66c4ff9d8415cde40 | cad604b38f9257c5410751bfebded37a73b02436 | /Kernel/Storage/SATADiskDevice.h | 5d75134205c67d959eff6043d2cc732da61ef46e | [
"BSD-2-Clause"
] | permissive | govi20/serenity | 5f4d7217afbe8b98313aed26ad663d1f56553250 | 67362b1f8501b19b451c71cc28b540da15171739 | refs/heads/master | 2023-06-26T21:14:06.461110 | 2021-07-09T02:57:34 | 2021-07-09T13:36:50 | 384,451,039 | 1 | 0 | BSD-2-Clause | 2021-07-09T13:49:20 | 2021-07-09T13:49:19 | null | UTF-8 | C++ | false | false | 1,053 | h | /*
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Lock.h>
#include <Kernel/Storage/AHCIPort.h>
#include <Kernel/Storage/StorageDevice.h>
namespace Kernel {
class AHCIController;
class SATADiskDevice final : public StorageDevice {
friend class AHCIController;
public:
enum class InterfaceType : u8 {
SATA,
SATAPI,
};
public:
static NonnullRefPtr<SATADiskDevice> create(const AHCIController&, const AHCIPort&, size_t sector_size, u64 max_addressable_block);
virtual ~SATADiskDevice() override;
// ^StorageDevice
// ^BlockDevice
virtual void start_request(AsyncBlockDeviceRequest&) override;
virtual String device_name() const override;
private:
SATADiskDevice(const AHCIController&, const AHCIPort&, size_t sector_size, u64 max_addressable_block);
// ^DiskDevice
virtual const char* class_name() const override;
NonnullRefPtr<AHCIPort> m_port;
};
}
| [
"kling@serenityos.org"
] | kling@serenityos.org |
4400e69c94a1678b443734a402b4f5fb5a0c7d11 | a2143118e790e800879d0bb4400454f11907443b | /src/vcml/models/generic/throttle.cpp | e6b511240b090041ad36ea6965f30b41a9839440 | [
"Apache-2.0"
] | permissive | Manewing/vcml | 555c78a4cc9c2f5da118ef4f7e6ce42f326097b2 | 023e20b961f432f86ef0b23a33d0dd7282662010 | refs/heads/master | 2023-02-09T23:45:40.072075 | 2021-01-07T20:43:46 | 2021-01-07T20:43:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,546 | cpp | /******************************************************************************
* *
* Copyright 2021 Jan Henrik Weinstock *
* *
* 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 "vcml/models/generic/throttle.h"
namespace vcml { namespace generic {
void throttle::update() {
sc_time quantum = tlm::tlm_global_quantum::instance().get();
sc_time interval = max(update_interval.get(), quantum);
next_trigger(interval);
if (rtf > 0.0) {
u64 actual = realtime_us() - m_time_real;
u64 target = time_to_us(interval) / rtf;
if (actual < target) {
usleep(target - actual);
if (!m_throttling)
log_debug("throttling started");
m_throttling = true;
} else {
if (m_throttling)
log_debug("throttling stopped");
m_throttling = false;
}
}
m_time_real = realtime_us();
}
throttle::throttle(const sc_module_name& nm):
module(nm),
m_throttling(false),
m_time_real(realtime_us()),
update_interval("update_interval", sc_time(10.0, SC_MS)),
rtf("rtf", 0.0) {
SC_HAS_PROCESS(throttle);
SC_METHOD(update);
}
throttle::~throttle() {
// nothing to do
}
}}
| [
"jan.weinstock@rwth-aachen.de"
] | jan.weinstock@rwth-aachen.de |
0a8639f7384dda83a3f1b367f4dbed9dce985212 | 3b9b4049a8e7d38b49e07bb752780b2f1d792851 | /src/cc/trees/layer_tree_host_unittest_animation.cc | 9d7ba1fc71095231760f9b95f54b87fbfbb166e5 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | webosce/chromium53 | f8e745e91363586aee9620c609aacf15b3261540 | 9171447efcf0bb393d41d1dc877c7c13c46d8e38 | refs/heads/webosce | 2020-03-26T23:08:14.416858 | 2018-08-23T08:35:17 | 2018-09-20T14:25:18 | 145,513,343 | 0 | 2 | Apache-2.0 | 2019-08-21T22:44:55 | 2018-08-21T05:52:31 | null | UTF-8 | C++ | false | false | 64,492 | cc | // Copyright 2012 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 "cc/trees/layer_tree_host.h"
#include <stdint.h>
#include "cc/animation/animation_curve.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/animation_id_provider.h"
#include "cc/animation/animation_player.h"
#include "cc/animation/animation_timeline.h"
#include "cc/animation/element_animations.h"
#include "cc/animation/scroll_offset_animation_curve.h"
#include "cc/animation/scroll_offset_animations.h"
#include "cc/animation/timing_function.h"
#include "cc/animation/transform_operations.h"
#include "cc/base/completion_event.h"
#include "cc/base/time_util.h"
#include "cc/layers/layer.h"
#include "cc/layers/layer_impl.h"
#include "cc/test/animation_test_common.h"
#include "cc/test/fake_content_layer_client.h"
#include "cc/test/fake_picture_layer.h"
#include "cc/test/layer_tree_test.h"
#include "cc/trees/layer_tree_impl.h"
namespace cc {
namespace {
class LayerTreeHostAnimationTest : public LayerTreeTest {
public:
LayerTreeHostAnimationTest()
: timeline_id_(AnimationIdProvider::NextTimelineId()),
player_id_(AnimationIdProvider::NextPlayerId()),
player_child_id_(AnimationIdProvider::NextPlayerId()) {
timeline_ = AnimationTimeline::Create(timeline_id_);
player_ = AnimationPlayer::Create(player_id_);
player_child_ = AnimationPlayer::Create(player_child_id_);
player_->set_animation_delegate(this);
}
void AttachPlayersToTimeline() {
layer_tree_host()->animation_host()->AddAnimationTimeline(timeline_.get());
layer_tree_host()->SetElementIdsForTesting();
timeline_->AttachPlayer(player_.get());
timeline_->AttachPlayer(player_child_.get());
}
protected:
scoped_refptr<AnimationTimeline> timeline_;
scoped_refptr<AnimationPlayer> player_;
scoped_refptr<AnimationPlayer> player_child_;
const int timeline_id_;
const int player_id_;
const int player_child_id_;
};
// Makes sure that SetNeedsAnimate does not cause the CommitRequested() state to
// be set.
class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested()
: num_commits_(0) {}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void BeginMainFrame(const BeginFrameArgs& args) override {
// We skip the first commit because its the commit that populates the
// impl thread with a tree. After the second commit, the test is done.
if (num_commits_ != 1)
return;
layer_tree_host()->SetNeedsAnimate();
// Right now, CommitRequested is going to be true, because during
// BeginFrame, we force CommitRequested to true to prevent requests from
// hitting the impl thread. But, when the next DidCommit happens, we should
// verify that CommitRequested has gone back to false.
}
void DidCommit() override {
if (!num_commits_) {
EXPECT_FALSE(layer_tree_host()->CommitRequested());
layer_tree_host()->SetNeedsAnimate();
EXPECT_FALSE(layer_tree_host()->CommitRequested());
}
// Verifies that the SetNeedsAnimate we made in ::Animate did not
// trigger CommitRequested.
EXPECT_FALSE(layer_tree_host()->CommitRequested());
EndTest();
num_commits_++;
}
void AfterTest() override {}
private:
int num_commits_;
};
MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested);
// Trigger a frame with SetNeedsCommit. Then, inside the resulting animate
// callback, request another frame using SetNeedsAnimate. End the test when
// animate gets called yet-again, indicating that the proxy is correctly
// handling the case where SetNeedsAnimate() is called inside the BeginFrame
// flow.
class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback()
: num_begin_frames_(0) {}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void BeginMainFrame(const BeginFrameArgs& args) override {
if (!num_begin_frames_) {
layer_tree_host()->SetNeedsAnimate();
num_begin_frames_++;
return;
}
EndTest();
}
void AfterTest() override {}
private:
int num_begin_frames_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback);
// Add a layer animation and confirm that
// LayerTreeHostImpl::UpdateAnimationState does get called.
class LayerTreeHostAnimationTestAddAnimation
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestAddAnimation()
: update_animation_state_was_called_(false) {}
void BeginTest() override {
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
PostAddInstantAnimationToMainThreadPlayer(player_.get());
}
void UpdateAnimationState(LayerTreeHostImpl* host_impl,
bool has_unfinished_animation) override {
EXPECT_FALSE(has_unfinished_animation);
update_animation_state_was_called_ = true;
}
void NotifyAnimationStarted(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
int group) override {
EXPECT_LT(base::TimeTicks(), monotonic_time);
Animation* animation =
player_->element_animations()->GetAnimation(TargetProperty::OPACITY);
if (animation)
player_->RemoveAnimation(animation->id());
EndTest();
}
void AfterTest() override { EXPECT_TRUE(update_animation_state_was_called_); }
private:
bool update_animation_state_was_called_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestAddAnimation);
// Add a layer animation to a layer, but continually fail to draw. Confirm that
// after a while, we do eventually force a draw.
class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws()
: started_animating_(false) {}
void BeginTest() override {
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
PostAddAnimationToMainThreadPlayer(player_.get());
}
void AnimateLayers(LayerTreeHostImpl* host_impl,
base::TimeTicks monotonic_time) override {
started_animating_ = true;
}
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
if (started_animating_)
EndTest();
}
DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
LayerTreeHostImpl::FrameData* frame,
DrawResult draw_result) override {
return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
}
void AfterTest() override {}
private:
bool started_animating_;
};
// Starvation can only be an issue with the MT compositor.
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws);
// Ensures that animations eventually get deleted.
class LayerTreeHostAnimationTestAnimationsGetDeleted
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestAnimationsGetDeleted()
: started_animating_(false) {}
void BeginTest() override {
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
PostAddAnimationToMainThreadPlayer(player_.get());
}
void AnimateLayers(LayerTreeHostImpl* host_impl,
base::TimeTicks monotonic_time) override {
bool have_animations = !host_impl->animation_host()
->active_element_animations_for_testing()
.empty();
if (!started_animating_ && have_animations) {
started_animating_ = true;
return;
}
if (started_animating_ && !have_animations)
EndTest();
}
void NotifyAnimationFinished(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
int group) override {
// Animations on the impl-side ElementAnimations only get deleted during
// a commit, so we need to schedule a commit.
layer_tree_host()->SetNeedsCommit();
}
void AfterTest() override {}
private:
bool started_animating_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestAnimationsGetDeleted);
// Ensure that an animation's timing function is respected.
class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
picture_ = FakePictureLayer::Create(&client_);
picture_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(picture_->bounds());
layer_tree_host()->root_layer()->AddChild(picture_);
AttachPlayersToTimeline();
player_child_->AttachElement(picture_->element_id());
}
void BeginTest() override {
PostAddAnimationToMainThreadPlayer(player_child_.get());
}
void AnimateLayers(LayerTreeHostImpl* host_impl,
base::TimeTicks monotonic_time) override {
// TODO(ajuma): This test only checks the active tree. Add checks for
// pending tree too.
if (!host_impl->active_tree()->root_layer_for_testing())
return;
// Wait for the commit with the animation to happen.
if (host_impl->sync_tree()->source_frame_number() != 0)
return;
scoped_refptr<AnimationTimeline> timeline_impl =
host_impl->animation_host()->GetTimelineById(timeline_id_);
scoped_refptr<AnimationPlayer> player_child_impl =
timeline_impl->GetPlayerById(player_child_id_);
Animation* animation =
player_child_impl->element_animations()->GetAnimation(
TargetProperty::OPACITY);
const FloatAnimationCurve* curve =
animation->curve()->ToFloatAnimationCurve();
float start_opacity = curve->GetValue(base::TimeDelta());
float end_opacity = curve->GetValue(curve->Duration());
float linearly_interpolated_opacity =
0.25f * end_opacity + 0.75f * start_opacity;
base::TimeDelta time = TimeUtil::Scale(curve->Duration(), 0.25f);
// If the linear timing function associated with this animation was not
// picked up, then the linearly interpolated opacity would be different
// because of the default ease timing function.
EXPECT_FLOAT_EQ(linearly_interpolated_opacity, curve->GetValue(time));
EndTest();
}
void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> picture_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestAddAnimationWithTimingFunction);
// Ensures that main thread animations have their start times synchronized with
// impl thread animations.
class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
picture_ = FakePictureLayer::Create(&client_);
picture_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(picture_->bounds());
layer_tree_host()->root_layer()->AddChild(picture_);
AttachPlayersToTimeline();
player_child_->set_animation_delegate(this);
player_child_->AttachElement(picture_->element_id());
}
void BeginTest() override {
PostAddAnimationToMainThreadPlayer(player_child_.get());
}
void NotifyAnimationStarted(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
int group) override {
Animation* animation = player_child_->element_animations()->GetAnimation(
TargetProperty::OPACITY);
main_start_time_ = animation->start_time();
player_child_->element_animations()->RemoveAnimation(animation->id());
EndTest();
}
void UpdateAnimationState(LayerTreeHostImpl* impl_host,
bool has_unfinished_animation) override {
scoped_refptr<AnimationTimeline> timeline_impl =
impl_host->animation_host()->GetTimelineById(timeline_id_);
scoped_refptr<AnimationPlayer> player_child_impl =
timeline_impl->GetPlayerById(player_child_id_);
Animation* animation =
player_child_impl->element_animations()->GetAnimation(
TargetProperty::OPACITY);
if (!animation)
return;
impl_start_time_ = animation->start_time();
}
void AfterTest() override {
EXPECT_EQ(impl_start_time_, main_start_time_);
EXPECT_LT(base::TimeTicks(), impl_start_time_);
}
private:
base::TimeTicks main_start_time_;
base::TimeTicks impl_start_time_;
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> picture_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestSynchronizeAnimationStartTimes);
// Ensures that notify animation finished is called.
class LayerTreeHostAnimationTestAnimationFinishedEvents
: public LayerTreeHostAnimationTest {
public:
void BeginTest() override {
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
PostAddInstantAnimationToMainThreadPlayer(player_.get());
}
void NotifyAnimationFinished(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
int group) override {
Animation* animation =
player_->element_animations()->GetAnimation(TargetProperty::OPACITY);
if (animation)
player_->element_animations()->RemoveAnimation(animation->id());
EndTest();
}
void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestAnimationFinishedEvents);
// Ensures that when opacity is being animated, this value does not cause the
// subtree to be skipped.
class LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity()
: update_check_layer_() {}
void SetupTree() override {
update_check_layer_ = FakePictureLayer::Create(&client_);
update_check_layer_->SetOpacity(0.f);
layer_tree_host()->SetRootLayer(update_check_layer_);
client_.set_bounds(update_check_layer_->bounds());
LayerTreeHostAnimationTest::SetupTree();
AttachPlayersToTimeline();
player_->AttachElement(update_check_layer_->element_id());
}
void BeginTest() override {
PostAddAnimationToMainThreadPlayer(player_.get());
}
void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
scoped_refptr<AnimationTimeline> timeline_impl =
host_impl->animation_host()->GetTimelineById(timeline_id_);
scoped_refptr<AnimationPlayer> player_impl =
timeline_impl->GetPlayerById(player_id_);
Animation* animation_impl = player_impl->element_animations()->GetAnimation(
TargetProperty::OPACITY);
player_impl->element_animations()->RemoveAnimation(animation_impl->id());
EndTest();
}
void AfterTest() override {
// Update() should have been called once, proving that the layer was not
// skipped.
EXPECT_EQ(1, update_check_layer_->update_count());
// clear update_check_layer_ so LayerTreeHost dies.
update_check_layer_ = NULL;
}
private:
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> update_check_layer_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity);
// Layers added to tree with existing active animations should have the
// animation correctly recognized.
class LayerTreeHostAnimationTestLayerAddedWithAnimation
: public LayerTreeHostAnimationTest {
public:
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
AttachPlayersToTimeline();
scoped_refptr<Layer> layer = Layer::Create();
layer->SetElementId(ElementId(42, 0));
player_->AttachElement(layer->element_id());
player_->set_animation_delegate(this);
// Any valid AnimationCurve will do here.
std::unique_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
std::unique_ptr<Animation> animation(
Animation::Create(std::move(curve), 1, 1, TargetProperty::OPACITY));
player_->AddAnimation(std::move(animation));
// We add the animation *before* attaching the layer to the tree.
layer_tree_host()->root_layer()->AddChild(layer);
}
}
void AnimateLayers(LayerTreeHostImpl* impl_host,
base::TimeTicks monotonic_time) override {
EndTest();
}
void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestLayerAddedWithAnimation);
class LayerTreeHostAnimationTestCancelAnimateCommit
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestCancelAnimateCommit()
: num_begin_frames_(0), num_commit_calls_(0), num_draw_calls_(0) {}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void BeginMainFrame(const BeginFrameArgs& args) override {
num_begin_frames_++;
// No-op animate will cancel the commit.
if (layer_tree_host()->source_frame_number() == 1) {
EndTest();
return;
}
layer_tree_host()->SetNeedsAnimate();
}
void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
num_commit_calls_++;
if (impl->active_tree()->source_frame_number() > 1)
FAIL() << "Commit should have been canceled.";
}
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
num_draw_calls_++;
if (impl->active_tree()->source_frame_number() > 1)
FAIL() << "Draw should have been canceled.";
}
void AfterTest() override {
EXPECT_EQ(2, num_begin_frames_);
EXPECT_EQ(1, num_commit_calls_);
EXPECT_EQ(1, num_draw_calls_);
}
private:
int num_begin_frames_;
int num_commit_calls_;
int num_draw_calls_;
};
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestCancelAnimateCommit);
class LayerTreeHostAnimationTestForceRedraw
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestForceRedraw()
: num_animate_(0), num_draw_layers_(0) {}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void BeginMainFrame(const BeginFrameArgs& args) override {
if (++num_animate_ < 2)
layer_tree_host()->SetNeedsAnimate();
}
void UpdateLayerTreeHost() override {
layer_tree_host()->SetNextCommitForcesRedraw();
}
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (++num_draw_layers_ == 2)
EndTest();
}
void AfterTest() override {
// The first commit will always draw; make sure the second draw triggered
// by the animation was not cancelled.
EXPECT_EQ(2, num_draw_layers_);
EXPECT_EQ(2, num_animate_);
}
private:
int num_animate_;
int num_draw_layers_;
};
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestForceRedraw);
class LayerTreeHostAnimationTestAnimateAfterSetNeedsCommit
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestAnimateAfterSetNeedsCommit()
: num_animate_(0), num_draw_layers_(0) {}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void BeginMainFrame(const BeginFrameArgs& args) override {
if (++num_animate_ <= 2) {
layer_tree_host()->SetNeedsCommit();
layer_tree_host()->SetNeedsAnimate();
}
}
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (++num_draw_layers_ == 2)
EndTest();
}
void AfterTest() override {
// The first commit will always draw; make sure the second draw triggered
// by the SetNeedsCommit was not cancelled.
EXPECT_EQ(2, num_draw_layers_);
EXPECT_GE(num_animate_, 2);
}
private:
int num_animate_;
int num_draw_layers_;
};
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestAnimateAfterSetNeedsCommit);
// Animations should not be started when frames are being skipped due to
// checkerboard.
class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations
: public LayerTreeHostAnimationTest {
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
picture_ = FakePictureLayer::Create(&client_);
picture_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(picture_->bounds());
layer_tree_host()->root_layer()->AddChild(picture_);
AttachPlayersToTimeline();
player_child_->AttachElement(picture_->element_id());
player_child_->set_animation_delegate(this);
}
void InitializeSettings(LayerTreeSettings* settings) override {
// Make sure that drawing many times doesn't cause a checkerboarded
// animation to start so we avoid flake in this test.
settings->timeout_and_draw_when_animation_checkerboards = false;
LayerTreeHostAnimationTest::InitializeSettings(settings);
}
void BeginTest() override {
prevented_draw_ = 0;
started_times_ = 0;
PostSetNeedsCommitToMainThread();
}
DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
LayerTreeHostImpl::FrameData* frame_data,
DrawResult draw_result) override {
// Don't checkerboard when the first animation wants to start.
if (host_impl->active_tree()->source_frame_number() < 2)
return draw_result;
if (TestEnded())
return draw_result;
// Act like there is checkerboard when the second animation wants to draw.
++prevented_draw_;
if (prevented_draw_ > 2)
EndTest();
return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
}
void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// The animation is longer than 1 BeginFrame interval.
AddOpacityTransitionToPlayer(player_child_.get(), 0.1, 0.2f, 0.8f,
false);
break;
case 2:
// This second animation will not be drawn so it should not start.
AddAnimatedTransformToPlayer(player_child_.get(), 0.1, 5, 5);
break;
}
}
void NotifyAnimationStarted(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
int group) override {
if (TestEnded())
return;
started_times_++;
}
void AfterTest() override {
// Make sure we tried to draw the second animation but failed.
EXPECT_LT(0, prevented_draw_);
// The first animation should be started, but the second should not because
// of checkerboard.
EXPECT_EQ(1, started_times_);
}
int prevented_draw_;
int started_times_;
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> picture_;
};
MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations);
// Verifies that scroll offset animations are only accepted when impl-scrolling
// is supported, and that when scroll offset animations are accepted,
// scroll offset updates are sent back to the main thread.
class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
scroll_layer_ = FakePictureLayer::Create(&client_);
scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id());
scroll_layer_->SetBounds(gfx::Size(1000, 1000));
client_.set_bounds(scroll_layer_->bounds());
scroll_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20));
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
AttachPlayersToTimeline();
player_child_->AttachElement(scroll_layer_->element_id());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1: {
std::unique_ptr<ScrollOffsetAnimationCurve> curve(
ScrollOffsetAnimationCurve::Create(
gfx::ScrollOffset(500.f, 550.f),
CubicBezierTimingFunction::CreatePreset(
CubicBezierTimingFunction::EaseType::EASE_IN_OUT)));
std::unique_ptr<Animation> animation(Animation::Create(
std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
animation->set_needs_synchronized_start_time(true);
bool impl_scrolling_supported =
layer_tree_host()->proxy()->SupportsImplScrolling();
if (impl_scrolling_supported)
player_child_->AddAnimation(std::move(animation));
else
EndTest();
break;
}
default:
if (scroll_layer_->scroll_offset().x() > 10 &&
scroll_layer_->scroll_offset().y() > 20)
EndTest();
}
}
void AfterTest() override {}
private:
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> scroll_layer_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestScrollOffsetChangesArePropagated);
// Verifies that when a main thread scrolling reason gets added, the
// notification to takover the animation on the main thread gets sent.
class LayerTreeHostAnimationTestScrollOffsetAnimationTakeover
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestScrollOffsetAnimationTakeover() {}
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
scroll_layer_ = FakePictureLayer::Create(&client_);
scroll_layer_->SetBounds(gfx::Size(10000, 10000));
client_.set_bounds(scroll_layer_->bounds());
scroll_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20));
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
AttachPlayersToTimeline();
player_child_->AttachElement(scroll_layer_->element_id());
// Allows NotifyAnimationTakeover to get called.
player_child_->set_animation_delegate(this);
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
// Add an update after the first commit to trigger the animation takeover
// path.
layer_tree_host()
->animation_host()
->scroll_offset_animations()
.AddTakeoverUpdate(scroll_layer_->element_id());
EXPECT_TRUE(layer_tree_host()
->animation_host()
->scroll_offset_animations()
.HasUpdatesForTesting());
}
}
void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->sync_tree()->source_frame_number() == 0) {
host_impl->animation_host()->ImplOnlyScrollAnimationCreate(
scroll_layer_->element_id(), gfx::ScrollOffset(650.f, 750.f),
gfx::ScrollOffset(10, 20));
}
}
void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
double animation_start_time,
std::unique_ptr<AnimationCurve> curve) override {
EndTest();
}
void AfterTest() override {}
private:
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> scroll_layer_;
};
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestScrollOffsetAnimationTakeover);
// Verifies that an impl-only scroll offset animation gets updated when the
// scroll offset is adjusted on the main thread.
class LayerTreeHostAnimationTestScrollOffsetAnimationAdjusted
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestScrollOffsetAnimationAdjusted() {}
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
scroll_layer_ = FakePictureLayer::Create(&client_);
scroll_layer_->SetBounds(gfx::Size(10000, 10000));
client_.set_bounds(scroll_layer_->bounds());
scroll_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20));
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
AttachPlayersToTimeline();
player_child_->AttachElement(scroll_layer_->element_id());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
// Add an update after the first commit to trigger the animation update
// path.
layer_tree_host()
->animation_host()
->scroll_offset_animations()
.AddAdjustmentUpdate(scroll_layer_->element_id(),
gfx::Vector2dF(100.f, 100.f));
EXPECT_TRUE(layer_tree_host()
->animation_host()
->scroll_offset_animations()
.HasUpdatesForTesting());
} else if (layer_tree_host()->source_frame_number() == 2) {
// Verify that the update queue is cleared after the update is applied.
EXPECT_FALSE(layer_tree_host()
->animation_host()
->scroll_offset_animations()
.HasUpdatesForTesting());
}
}
void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
// Note that the frame number gets incremented after BeginCommitOnThread but
// before WillCommitCompleteOnThread and CommitCompleteOnThread.
if (host_impl->sync_tree()->source_frame_number() == 0) {
// This happens after the impl-only animation is added in
// WillCommitCompleteOnThread.
Animation* animation =
host_impl->animation_host()
->GetElementAnimationsForElementId(scroll_layer_->element_id())
->GetAnimation(TargetProperty::SCROLL_OFFSET);
ScrollOffsetAnimationCurve* curve =
animation->curve()->ToScrollOffsetAnimationCurve();
// Verifiy the initial and target position before the scroll offset
// update from MT.
EXPECT_EQ(Animation::RunState::RUNNING, animation->run_state());
EXPECT_EQ(gfx::ScrollOffset(10.f, 20.f),
curve->GetValue(base::TimeDelta()));
EXPECT_EQ(gfx::ScrollOffset(650.f, 750.f), curve->target_value());
}
}
void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->sync_tree()->source_frame_number() == 0) {
host_impl->animation_host()->ImplOnlyScrollAnimationCreate(
scroll_layer_->element_id(), gfx::ScrollOffset(650.f, 750.f),
gfx::ScrollOffset(10, 20));
}
}
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->sync_tree()->source_frame_number() == 1) {
Animation* animation =
host_impl->animation_host()
->GetElementAnimationsForElementId(scroll_layer_->element_id())
->GetAnimation(TargetProperty::SCROLL_OFFSET);
ScrollOffsetAnimationCurve* curve =
animation->curve()->ToScrollOffsetAnimationCurve();
// Verifiy the initial and target position after the scroll offset
// update from MT
EXPECT_EQ(Animation::RunState::STARTING, animation->run_state());
EXPECT_EQ(gfx::ScrollOffset(110.f, 120.f),
curve->GetValue(base::TimeDelta()));
EXPECT_EQ(gfx::ScrollOffset(750.f, 850.f), curve->target_value());
EndTest();
}
}
void AfterTest() override {}
private:
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> scroll_layer_;
};
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestScrollOffsetAnimationAdjusted);
// Verifies that when the main thread removes a scroll animation and sets a new
// scroll position, the active tree takes on exactly this new scroll position
// after activation, and the main thread doesn't receive a spurious scroll
// delta.
class LayerTreeHostAnimationTestScrollOffsetAnimationRemoval
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestScrollOffsetAnimationRemoval()
: final_postion_(50.0, 100.0) {}
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
scroll_layer_ = FakePictureLayer::Create(&client_);
scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id());
scroll_layer_->SetBounds(gfx::Size(10000, 10000));
client_.set_bounds(scroll_layer_->bounds());
scroll_layer_->SetScrollOffset(gfx::ScrollOffset(100.0, 200.0));
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
std::unique_ptr<ScrollOffsetAnimationCurve> curve(
ScrollOffsetAnimationCurve::Create(
gfx::ScrollOffset(6500.f, 7500.f),
CubicBezierTimingFunction::CreatePreset(
CubicBezierTimingFunction::EaseType::EASE_IN_OUT)));
std::unique_ptr<Animation> animation(Animation::Create(
std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
animation->set_needs_synchronized_start_time(true);
AttachPlayersToTimeline();
player_child_->AttachElement(scroll_layer_->element_id());
player_child_->AddAnimation(std::move(animation));
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void BeginMainFrame(const BeginFrameArgs& args) override {
switch (layer_tree_host()->source_frame_number()) {
case 0:
break;
case 1: {
Animation* animation =
player_child_->element_animations()
->GetAnimation(TargetProperty::SCROLL_OFFSET);
player_child_->RemoveAnimation(animation->id());
scroll_layer_->SetScrollOffset(final_postion_);
break;
}
default:
EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset());
}
}
void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
host_impl->BlockNotifyReadyToActivateForTesting(
ShouldBlockActivation(host_impl));
}
void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl,
const BeginFrameArgs& args) override {
host_impl->BlockNotifyReadyToActivateForTesting(
ShouldBlockActivation(host_impl));
}
void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->pending_tree()->source_frame_number() != 1)
return;
LayerImpl* scroll_layer_impl =
host_impl->pending_tree()->LayerById(scroll_layer_->id());
EXPECT_EQ(final_postion_, scroll_layer_impl->CurrentScrollOffset());
}
void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() != 1)
return;
LayerImpl* scroll_layer_impl =
host_impl->active_tree()->LayerById(scroll_layer_->id());
EXPECT_EQ(final_postion_, scroll_layer_impl->CurrentScrollOffset());
EndTest();
}
void AfterTest() override {
EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset());
}
private:
bool ShouldBlockActivation(LayerTreeHostImpl* host_impl) {
if (!host_impl->pending_tree())
return false;
if (!host_impl->active_tree()->root_layer_for_testing())
return false;
scoped_refptr<AnimationTimeline> timeline_impl =
host_impl->animation_host()->GetTimelineById(timeline_id_);
scoped_refptr<AnimationPlayer> player_impl =
timeline_impl->GetPlayerById(player_child_id_);
LayerImpl* scroll_layer_impl =
host_impl->active_tree()->LayerById(scroll_layer_->id());
Animation* animation = player_impl->element_animations()->GetAnimation(
TargetProperty::SCROLL_OFFSET);
if (!animation || animation->run_state() != Animation::RUNNING)
return false;
// Block activation until the running animation has a chance to produce a
// scroll delta.
gfx::Vector2dF scroll_delta = ScrollDelta(scroll_layer_impl);
if (scroll_delta.x() > 0.f || scroll_delta.y() > 0.f)
return false;
return true;
}
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> scroll_layer_;
const gfx::ScrollOffset final_postion_;
};
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestScrollOffsetAnimationRemoval);
// When animations are simultaneously added to an existing layer and to a new
// layer, they should start at the same time, even when there's already a
// running animation on the existing layer.
class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers()
: frame_count_with_pending_tree_(0) {}
void BeginTest() override {
AttachPlayersToTimeline();
PostSetNeedsCommitToMainThread();
}
void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
AddAnimatedTransformToPlayer(player_.get(), 4, 1, 1);
} else if (layer_tree_host()->source_frame_number() == 2) {
AddOpacityTransitionToPlayer(player_.get(), 1, 0.f, 0.5f, true);
scoped_refptr<Layer> layer = Layer::Create();
layer_tree_host()->root_layer()->AddChild(layer);
layer_tree_host()->SetElementIdsForTesting();
layer->SetBounds(gfx::Size(4, 4));
player_child_->AttachElement(layer->element_id());
player_child_->set_animation_delegate(this);
AddOpacityTransitionToPlayer(player_child_.get(), 1, 0.f, 0.5f, true);
}
}
void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
host_impl->BlockNotifyReadyToActivateForTesting(true);
}
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
// For the commit that added animations to new and existing layers, keep
// blocking activation. We want to verify that even with activation blocked,
// the animation on the layer that's already in the active tree won't get a
// head start.
if (host_impl->pending_tree()->source_frame_number() != 2) {
host_impl->BlockNotifyReadyToActivateForTesting(false);
}
}
void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl,
const BeginFrameArgs& args) override {
if (!host_impl->pending_tree() ||
host_impl->pending_tree()->source_frame_number() != 2)
return;
frame_count_with_pending_tree_++;
if (frame_count_with_pending_tree_ == 2) {
host_impl->BlockNotifyReadyToActivateForTesting(false);
}
}
void UpdateAnimationState(LayerTreeHostImpl* host_impl,
bool has_unfinished_animation) override {
scoped_refptr<AnimationTimeline> timeline_impl =
host_impl->animation_host()->GetTimelineById(timeline_id_);
scoped_refptr<AnimationPlayer> player_impl =
timeline_impl->GetPlayerById(player_id_);
scoped_refptr<AnimationPlayer> player_child_impl =
timeline_impl->GetPlayerById(player_child_id_);
// wait for tree activation.
if (!player_impl->element_animations())
return;
Animation* root_animation = player_impl->element_animations()->GetAnimation(
TargetProperty::OPACITY);
if (!root_animation || root_animation->run_state() != Animation::RUNNING)
return;
Animation* child_animation =
player_child_impl->element_animations()->GetAnimation(
TargetProperty::OPACITY);
EXPECT_EQ(Animation::RUNNING, child_animation->run_state());
EXPECT_EQ(root_animation->start_time(), child_animation->start_time());
player_impl->element_animations()->AbortAnimations(TargetProperty::OPACITY);
player_impl->element_animations()->AbortAnimations(
TargetProperty::TRANSFORM);
player_child_impl->element_animations()->AbortAnimations(
TargetProperty::OPACITY);
EndTest();
}
void AfterTest() override {}
private:
int frame_count_with_pending_tree_;
};
// This test blocks activation which is not supported for single thread mode.
MULTI_THREAD_BLOCKNOTIFY_TEST_F(
LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers);
class LayerTreeHostAnimationTestPendingTreeAnimatesFirstCommit
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(2, 2));
client_.set_bounds(layer_->bounds());
// Transform the layer to 4,4 to start.
gfx::Transform start_transform;
start_transform.Translate(4.0, 4.0);
layer_->SetTransform(start_transform);
layer_tree_host()->root_layer()->AddChild(layer_);
layer_tree_host()->SetElementIdsForTesting();
player_->AttachElement(layer_->element_id());
AttachPlayersToTimeline();
}
void BeginTest() override {
// Add a translate from 6,7 to 8,9.
TransformOperations start;
start.AppendTranslate(6.f, 7.f, 0.f);
TransformOperations end;
end.AppendTranslate(8.f, 9.f, 0.f);
AddAnimatedTransformToPlayer(player_.get(), 4.0, start, end);
PostSetNeedsCommitToMainThread();
}
void WillPrepareTiles(LayerTreeHostImpl* host_impl) override {
if (host_impl->sync_tree()->source_frame_number() != 0)
return;
// After checking this on the sync tree, we will activate, which will cause
// PrepareTiles to happen again (which races with the test exiting).
if (TestEnded())
return;
scoped_refptr<AnimationTimeline> timeline_impl =
host_impl->animation_host()->GetTimelineById(timeline_id_);
scoped_refptr<AnimationPlayer> player_impl =
timeline_impl->GetPlayerById(player_id_);
LayerImpl* child = host_impl->sync_tree()->LayerById(layer_->id());
Animation* animation = player_impl->element_animations()->GetAnimation(
TargetProperty::TRANSFORM);
// The animation should be starting for the first frame.
EXPECT_EQ(Animation::STARTING, animation->run_state());
// And the transform should be propogated to the sync tree layer, at its
// starting state which is 6,7.
gfx::Transform expected_transform;
expected_transform.Translate(6.0, 7.0);
EXPECT_TRANSFORMATION_MATRIX_EQ(expected_transform, child->DrawTransform());
// And the sync tree layer should know it is animating.
EXPECT_TRUE(child->screen_space_transform_is_animating());
player_impl->element_animations()->AbortAnimations(
TargetProperty::TRANSFORM);
EndTest();
}
void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<Layer> layer_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestPendingTreeAnimatesFirstCommit);
// When a layer with an animation is removed from the tree and later re-added,
// the animation should resume.
class LayerTreeHostAnimationTestAnimatedLayerRemovedAndAdded
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
layer_ = Layer::Create();
layer_->SetBounds(gfx::Size(4, 4));
layer_tree_host()->root_layer()->AddChild(layer_);
layer_tree_host()->SetElementIdsForTesting();
layer_tree_host()->animation_host()->AddAnimationTimeline(timeline_.get());
timeline_->AttachPlayer(player_.get());
player_->AttachElement(layer_->element_id());
DCHECK(player_->element_animations());
AddOpacityTransitionToPlayer(player_.get(), 10000.0, 0.1f, 0.9f, true);
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 0:
EXPECT_TRUE(
player_->element_animations()->has_element_in_active_list());
EXPECT_FALSE(
player_->element_animations()->has_element_in_pending_list());
EXPECT_TRUE(layer_tree_host()->animation_host()->NeedsAnimateLayers());
break;
case 1:
layer_->RemoveFromParent();
EXPECT_FALSE(
player_->element_animations()->has_element_in_active_list());
EXPECT_FALSE(
player_->element_animations()->has_element_in_pending_list());
EXPECT_FALSE(layer_tree_host()->animation_host()->NeedsAnimateLayers());
break;
case 2:
layer_tree_host()->root_layer()->AddChild(layer_);
EXPECT_TRUE(
player_->element_animations()->has_element_in_active_list());
EXPECT_FALSE(
player_->element_animations()->has_element_in_pending_list());
EXPECT_TRUE(layer_tree_host()->animation_host()->NeedsAnimateLayers());
break;
}
}
void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
scoped_refptr<AnimationTimeline> timeline_impl =
host_impl->animation_host()->GetTimelineById(timeline_id_);
scoped_refptr<AnimationPlayer> player_impl =
timeline_impl->GetPlayerById(player_id_);
switch (host_impl->active_tree()->source_frame_number()) {
case 0:
EXPECT_TRUE(
player_impl->element_animations()->has_element_in_active_list());
EXPECT_TRUE(host_impl->animation_host()->NeedsAnimateLayers());
break;
case 1:
EXPECT_FALSE(
player_impl->element_animations()->has_element_in_active_list());
EXPECT_FALSE(host_impl->animation_host()->NeedsAnimateLayers());
break;
case 2:
EXPECT_TRUE(
player_impl->element_animations()->has_element_in_active_list());
EXPECT_TRUE(host_impl->animation_host()->NeedsAnimateLayers());
EndTest();
break;
}
}
void AfterTest() override {}
private:
scoped_refptr<Layer> layer_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestAnimatedLayerRemovedAndAdded);
class LayerTreeHostAnimationTestAddAnimationAfterAnimating
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
layer_ = Layer::Create();
layer_->SetBounds(gfx::Size(4, 4));
layer_tree_host()->root_layer()->AddChild(layer_);
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
player_child_->AttachElement(layer_->element_id());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// First frame: add an animation to the root layer.
AddAnimatedTransformToPlayer(player_.get(), 0.1, 5, 5);
break;
case 2:
// Second frame: add an animation to the content layer. The root layer
// animation has caused us to animate already during this frame.
AddOpacityTransitionToPlayer(player_child_.get(), 0.1, 5, 5, false);
break;
}
}
void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
// After both animations have started, verify that they have valid
// start times.
if (host_impl->active_tree()->source_frame_number() < 2)
return;
AnimationHost::ElementToAnimationsMap element_animations_copy =
host_impl->animation_host()->active_element_animations_for_testing();
EXPECT_EQ(2u, element_animations_copy.size());
for (auto& it : element_animations_copy) {
ElementId id = it.first;
if (id ==
host_impl->active_tree()->root_layer_for_testing()->element_id()) {
Animation* anim = it.second->GetAnimation(TargetProperty::TRANSFORM);
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
} else if (id == layer_->element_id()) {
Animation* anim = it.second->GetAnimation(TargetProperty::OPACITY);
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
}
EndTest();
}
}
void AfterTest() override {}
private:
scoped_refptr<Layer> layer_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestAddAnimationAfterAnimating);
class LayerTreeHostAnimationTestRemoveAnimation
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(layer_->bounds());
layer_tree_host()->root_layer()->AddChild(layer_);
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
player_child_->AttachElement(layer_->element_id());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
AddAnimatedTransformToPlayer(player_child_.get(), 1.0, 5, 5);
break;
case 2:
Animation* animation =
player_child_->element_animations()->GetAnimation(
TargetProperty::TRANSFORM);
player_child_->RemoveAnimation(animation->id());
gfx::Transform transform;
transform.Translate(10.f, 10.f);
layer_->SetTransform(transform);
// Do something that causes property trees to get rebuilt. This is
// intended to simulate the conditions that caused the bug whose fix
// this is testing (the test will pass without it but won't test what
// we want it to). We were updating the wrong transform node at the end
// of an animation (we were assuming the layer with the finished
// animation still had its own transform node). But nodes can only get
// added/deleted when something triggers a rebuild. Adding a layer
// triggers a rebuild, and since the layer that had an animation before
// no longer has one, it doesn't get a transform node in the rebuild.
layer_->AddChild(Layer::Create());
break;
}
}
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
LayerImpl* child = host_impl->active_tree()->LayerById(layer_->id());
switch (host_impl->active_tree()->source_frame_number()) {
case 0:
// No animation yet.
break;
case 1:
// Animation is started.
EXPECT_TRUE(child->screen_space_transform_is_animating());
break;
case 2: {
// The animation is removed, the transform that was set afterward is
// applied.
gfx::Transform expected_transform;
expected_transform.Translate(10.f, 10.f);
EXPECT_TRANSFORMATION_MATRIX_EQ(expected_transform,
child->DrawTransform());
EXPECT_FALSE(child->screen_space_transform_is_animating());
EndTest();
break;
}
default:
NOTREACHED();
}
}
void AfterTest() override {}
private:
scoped_refptr<Layer> layer_;
FakeContentLayerClient client_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestRemoveAnimation);
class LayerTreeHostAnimationTestIsAnimating
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(layer_->bounds());
layer_tree_host()->root_layer()->AddChild(layer_);
AttachPlayersToTimeline();
player_->AttachElement(layer_->element_id());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
AddAnimatedTransformToPlayer(player_.get(), 1.0, 5, 5);
break;
case 2:
Animation* animation = player_->element_animations()->GetAnimation(
TargetProperty::TRANSFORM);
player_->RemoveAnimation(animation->id());
break;
}
}
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
LayerImpl* child = host_impl->sync_tree()->LayerById(layer_->id());
switch (host_impl->sync_tree()->source_frame_number()) {
case 0:
// No animation yet.
break;
case 1:
// Animation is started.
EXPECT_TRUE(child->screen_space_transform_is_animating());
break;
case 2:
// The animation is removed/stopped.
EXPECT_FALSE(child->screen_space_transform_is_animating());
EndTest();
break;
default:
NOTREACHED();
}
}
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
LayerImpl* child = host_impl->active_tree()->LayerById(layer_->id());
switch (host_impl->active_tree()->source_frame_number()) {
case 0:
// No animation yet.
break;
case 1:
// Animation is started.
EXPECT_TRUE(child->screen_space_transform_is_animating());
break;
case 2:
// The animation is removed/stopped.
EXPECT_FALSE(child->screen_space_transform_is_animating());
EndTest();
break;
default:
NOTREACHED();
}
}
void AfterTest() override {}
private:
scoped_refptr<Layer> layer_;
FakeContentLayerClient client_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestIsAnimating);
class LayerTreeHostAnimationTestAnimationFinishesDuringCommit
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestAnimationFinishesDuringCommit()
: signalled_(false) {}
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(layer_->bounds());
layer_tree_host()->root_layer()->AddChild(layer_);
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
player_child_->AttachElement(layer_->element_id());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1)
AddAnimatedTransformToPlayer(player_child_.get(), 0.04, 5, 5);
}
void WillCommit() override {
if (layer_tree_host()->source_frame_number() == 2) {
// Block until the animation finishes on the compositor thread. Since
// animations have already been ticked on the main thread, when the commit
// happens the state on the main thread will be consistent with having a
// running animation but the state on the compositor thread will be
// consistent with having only a finished animation.
completion_.Wait();
}
}
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
switch (host_impl->sync_tree()->source_frame_number()) {
case 1:
PostSetNeedsCommitToMainThread();
break;
case 2:
gfx::Transform expected_transform;
expected_transform.Translate(5.f, 5.f);
LayerImpl* layer_impl = host_impl->sync_tree()->LayerById(layer_->id());
EXPECT_TRANSFORMATION_MATRIX_EQ(expected_transform,
layer_impl->DrawTransform());
EndTest();
break;
}
}
void UpdateAnimationState(LayerTreeHostImpl* host_impl,
bool has_unfinished_animation) override {
if (host_impl->active_tree()->source_frame_number() == 1 &&
!has_unfinished_animation && !signalled_) {
// The animation has finished, so allow the main thread to commit.
completion_.Signal();
signalled_ = true;
}
}
void AfterTest() override {}
private:
scoped_refptr<Layer> layer_;
FakeContentLayerClient client_;
CompletionEvent completion_;
bool signalled_;
};
// An animation finishing during commit can only happen when we have a separate
// compositor thread.
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestAnimationFinishesDuringCommit);
class LayerTreeHostAnimationTestNotifyAnimationFinished
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestNotifyAnimationFinished()
: called_animation_started_(false), called_animation_finished_(false) {}
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
picture_ = FakePictureLayer::Create(&client_);
picture_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(picture_->bounds());
layer_tree_host()->root_layer()->AddChild(picture_);
AttachPlayersToTimeline();
player_->AttachElement(picture_->element_id());
player_->set_animation_delegate(this);
}
void BeginTest() override {
PostAddLongAnimationToMainThreadPlayer(player_.get());
}
void NotifyAnimationStarted(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
int group) override {
called_animation_started_ = true;
layer_tree_host()->AnimateLayers(base::TimeTicks::FromInternalValue(
std::numeric_limits<int64_t>::max()));
PostSetNeedsCommitToMainThread();
}
void NotifyAnimationFinished(base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
int group) override {
called_animation_finished_ = true;
EndTest();
}
void AfterTest() override {
EXPECT_TRUE(called_animation_started_);
EXPECT_TRUE(called_animation_finished_);
}
private:
bool called_animation_started_;
bool called_animation_finished_;
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> picture_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestNotifyAnimationFinished);
// Check that transform sync happens correctly at commit when we remove and add
// a different animation player to an element.
class LayerTreeHostAnimationTestChangeAnimationPlayer
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
AttachPlayersToTimeline();
timeline_->DetachPlayer(player_child_.get());
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
TransformOperations start;
start.AppendTranslate(5.f, 5.f, 0.f);
TransformOperations end;
end.AppendTranslate(5.f, 5.f, 0.f);
AddAnimatedTransformToPlayer(player_.get(), 1.0, start, end);
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
PropertyTrees* property_trees = host_impl->sync_tree()->property_trees();
TransformNode* node =
property_trees->transform_tree.Node(host_impl->sync_tree()
->root_layer_for_testing()
->transform_tree_index());
gfx::Transform translate;
translate.Translate(5, 5);
switch (host_impl->sync_tree()->source_frame_number()) {
case 2:
EXPECT_TRANSFORMATION_MATRIX_EQ(node->data.local, translate);
EndTest();
break;
default:
break;
}
}
void DidCommit() override { PostSetNeedsCommitToMainThread(); }
void WillBeginMainFrame() override {
if (layer_tree_host()->source_frame_number() == 2) {
// Destroy player.
timeline_->DetachPlayer(player_.get());
player_ = nullptr;
timeline_->AttachPlayer(player_child_.get());
player_child_->AttachElement(
layer_tree_host()->root_layer()->element_id());
AddAnimatedTransformToPlayer(player_child_.get(), 1.0, 10, 10);
Animation* animation = player_child_->element_animations()->GetAnimation(
TargetProperty::TRANSFORM);
animation->set_start_time(base::TimeTicks::Now() +
base::TimeDelta::FromSecondsD(1000));
animation->set_fill_mode(Animation::FillMode::NONE);
}
}
void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestChangeAnimationPlayer);
// Check that SetTransformIsPotentiallyAnimatingChanged is called
// if we destroy ElementAnimations.
class LayerTreeHostAnimationTestSetPotentiallyAnimatingOnLacDestruction
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
prev_screen_space_transform_is_animating_ = true;
screen_space_transform_animation_stopped_ = false;
LayerTreeHostAnimationTest::SetupTree();
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
AddAnimatedTransformToPlayer(player_.get(), 1.0, 5, 5);
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->pending_tree()->source_frame_number() <= 1) {
EXPECT_TRUE(host_impl->pending_tree()
->root_layer_for_testing()
->screen_space_transform_is_animating());
} else {
EXPECT_FALSE(host_impl->pending_tree()
->root_layer_for_testing()
->screen_space_transform_is_animating());
}
}
void DidCommit() override { PostSetNeedsCommitToMainThread(); }
void UpdateLayerTreeHost() override {
if (layer_tree_host()->source_frame_number() == 2) {
// Destroy player.
timeline_->DetachPlayer(player_.get());
player_ = nullptr;
}
}
DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
LayerTreeHostImpl::FrameData* frame_data,
DrawResult draw_result) override {
const bool screen_space_transform_is_animating =
host_impl->active_tree()
->root_layer_for_testing()
->screen_space_transform_is_animating();
// Check that screen_space_transform_is_animating changes only once.
if (screen_space_transform_is_animating &&
prev_screen_space_transform_is_animating_)
EXPECT_FALSE(screen_space_transform_animation_stopped_);
if (!screen_space_transform_is_animating &&
prev_screen_space_transform_is_animating_) {
EXPECT_FALSE(screen_space_transform_animation_stopped_);
screen_space_transform_animation_stopped_ = true;
}
if (!screen_space_transform_is_animating &&
!prev_screen_space_transform_is_animating_)
EXPECT_TRUE(screen_space_transform_animation_stopped_);
prev_screen_space_transform_is_animating_ =
screen_space_transform_is_animating;
return draw_result;
}
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() >= 2)
EndTest();
}
void AfterTest() override {
EXPECT_TRUE(screen_space_transform_animation_stopped_);
}
bool prev_screen_space_transform_is_animating_;
bool screen_space_transform_animation_stopped_;
};
MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestSetPotentiallyAnimatingOnLacDestruction);
// Check that we invalidate property trees on AnimationPlayer::SetNeedsCommit.
class LayerTreeHostAnimationTestRebuildPropertyTreesOnAnimationSetNeedsCommit
: public LayerTreeHostAnimationTest {
public:
void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(4, 4));
client_.set_bounds(layer_->bounds());
layer_tree_host()->root_layer()->AddChild(layer_);
AttachPlayersToTimeline();
player_->AttachElement(layer_tree_host()->root_layer()->element_id());
player_child_->AttachElement(layer_->element_id());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1 ||
layer_tree_host()->source_frame_number() == 2)
PostSetNeedsCommitToMainThread();
}
void UpdateLayerTreeHost() override {
if (layer_tree_host()->source_frame_number() == 1) {
EXPECT_FALSE(layer_tree_host()->property_trees()->needs_rebuild);
AddAnimatedTransformToPlayer(player_child_.get(), 1.0, 5, 5);
}
EXPECT_TRUE(layer_tree_host()->property_trees()->needs_rebuild);
}
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() >= 2)
EndTest();
}
void AfterTest() override {}
private:
scoped_refptr<Layer> layer_;
FakeContentLayerClient client_;
};
MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestRebuildPropertyTreesOnAnimationSetNeedsCommit);
} // namespace
} // namespace cc
| [
"changhyeok.bae@lge.com"
] | changhyeok.bae@lge.com |
9b65e24c6266329452abfa0b6020a348bc09757e | a3c71ebd227678b0ad1df6f8af51e126dffabd28 | /common/vectormath/ppu/cpp/vectormath_aos.h | 8d0ed8346e3fdf89e193492e3547129988e1ed5e | [
"MIT"
] | permissive | foobar-d/PSL1GHT | e713b46caede667740d4cb1bd94a652b3731c136 | ada438777ca5276a674babbbe22bddbb5a844730 | refs/heads/master | 2022-12-27T11:54:58.562760 | 2020-10-09T11:14:33 | 2020-10-09T11:14:33 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 76,755 | h | /*
Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
All rights reserved.
Redistribution and use in source and binary forms,
with or without modification, are permitted provided that the
following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Sony Computer Entertainment Inc 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 _VECTORMATH_AOS_CPP_PPU_H
#define _VECTORMATH_AOS_CPP_PPU_H
#include <math.h>
#include <altivec.h>
#include "vecidx_aos.h"
#include "floatInVec.h"
#include "boolInVec.h"
#ifdef _VECTORMATH_DEBUG
#include <stdio.h>
#endif
namespace Vectormath {
namespace Aos {
//-----------------------------------------------------------------------------
// Forward Declarations
//
class Vector3;
class Vector4;
class Point3;
class Quat;
class Matrix3;
class Matrix4;
class Transform3;
// A 3-D vector in array-of-structures format
//
class Vector3
{
vec_float4 mVec128;
public:
// Default constructor; does no initialization
//
inline Vector3( ) : mVec128((vec_float4){0.0f, 0.0f, 0.0f, 0.0f}) { };
// Construct a 3-D vector from x, y, and z elements
//
inline Vector3( float x, float y, float z );
// Construct a 3-D vector from x, y, and z elements (scalar data contained in vector data type)
//
inline Vector3( floatInVec x, floatInVec y, floatInVec z );
// Copy elements from a 3-D point into a 3-D vector
//
explicit inline Vector3( Point3 pnt );
// Set all elements of a 3-D vector to the same scalar value
//
explicit inline Vector3( float scalar );
// Set all elements of a 3-D vector to the same scalar value (scalar data contained in vector data type)
//
explicit inline Vector3( floatInVec scalar );
// Set vector float data in a 3-D vector
//
explicit inline Vector3( vec_float4 vf4 );
// Get vector float data from a 3-D vector
//
inline vec_float4 get128( ) const;
// Assign one 3-D vector to another
//
inline Vector3 & operator =( Vector3 vec );
// Set the x element of a 3-D vector
//
inline Vector3 & setX( float x );
// Set the y element of a 3-D vector
//
inline Vector3 & setY( float y );
// Set the z element of a 3-D vector
//
inline Vector3 & setZ( float z );
// Set the x element of a 3-D vector (scalar data contained in vector data type)
//
inline Vector3 & setX( floatInVec x );
// Set the y element of a 3-D vector (scalar data contained in vector data type)
//
inline Vector3 & setY( floatInVec y );
// Set the z element of a 3-D vector (scalar data contained in vector data type)
//
inline Vector3 & setZ( floatInVec z );
// Get the x element of a 3-D vector
//
inline const floatInVec getX( ) const;
// Get the y element of a 3-D vector
//
inline const floatInVec getY( ) const;
// Get the z element of a 3-D vector
//
inline const floatInVec getZ( ) const;
// Set an x, y, or z element of a 3-D vector by index
//
inline Vector3 & setElem( int idx, float value );
// Set an x, y, or z element of a 3-D vector by index (scalar data contained in vector data type)
//
inline Vector3 & setElem( int idx, floatInVec value );
// Get an x, y, or z element of a 3-D vector by index
//
inline const floatInVec getElem( int idx ) const;
// Subscripting operator to set or get an element
//
inline VecIdx operator []( int idx );
// Subscripting operator to get an element
//
inline const floatInVec operator []( int idx ) const;
// Add two 3-D vectors
//
inline const Vector3 operator +( Vector3 vec ) const;
// Subtract a 3-D vector from another 3-D vector
//
inline const Vector3 operator -( Vector3 vec ) const;
// Add a 3-D vector to a 3-D point
//
inline const Point3 operator +( Point3 pnt ) const;
// Multiply a 3-D vector by a scalar
//
inline const Vector3 operator *( float scalar ) const;
// Divide a 3-D vector by a scalar
//
inline const Vector3 operator /( float scalar ) const;
// Multiply a 3-D vector by a scalar (scalar data contained in vector data type)
//
inline const Vector3 operator *( floatInVec scalar ) const;
// Divide a 3-D vector by a scalar (scalar data contained in vector data type)
//
inline const Vector3 operator /( floatInVec scalar ) const;
// Perform compound assignment and addition with a 3-D vector
//
inline Vector3 & operator +=( Vector3 vec );
// Perform compound assignment and subtraction by a 3-D vector
//
inline Vector3 & operator -=( Vector3 vec );
// Perform compound assignment and multiplication by a scalar
//
inline Vector3 & operator *=( float scalar );
// Perform compound assignment and division by a scalar
//
inline Vector3 & operator /=( float scalar );
// Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
//
inline Vector3 & operator *=( floatInVec scalar );
// Perform compound assignment and division by a scalar (scalar data contained in vector data type)
//
inline Vector3 & operator /=( floatInVec scalar );
// Negate all elements of a 3-D vector
//
inline const Vector3 operator -( ) const;
// Perform equality comparsion of two 3-D vector
//
inline bool operator == (const Vector3& vec) const;
// Perform equality comparsion of two 3-D vector
//
inline bool operator != (const Vector3& vec) const;
// Perform lower than comparsion of two 3-D vector
//
inline bool operator < (const Vector3& vec) const;
// Perform lower or equal comparsion of two 3-D vector
//
inline bool operator <= (const Vector3& vec) const;
// Perform greater than comparsion of two 3-D vector
//
inline bool operator > (const Vector3& vec) const;
// Perform greater or equal comparsion of two 3-D vector
//
inline bool operator >= (const Vector3& vec) const;
// Construct x axis
//
static inline const Vector3 xAxis( );
// Construct y axis
//
static inline const Vector3 yAxis( );
// Construct z axis
//
static inline const Vector3 zAxis( );
};
// Multiply a 3-D vector by a scalar
//
inline const Vector3 operator *( float scalar, Vector3 vec );
// Multiply a 3-D vector by a scalar (scalar data contained in vector data type)
//
inline const Vector3 operator *( floatInVec scalar, Vector3 vec );
// Multiply two 3-D vectors per element
//
inline const Vector3 mulPerElem( Vector3 vec0, Vector3 vec1 );
// Divide two 3-D vectors per element
// NOTE:
// Floating-point behavior matches standard library function divf4.
//
inline const Vector3 divPerElem( Vector3 vec0, Vector3 vec1 );
// Compute the reciprocal of a 3-D vector per element
// NOTE:
// Floating-point behavior matches standard library function recipf4.
//
inline const Vector3 recipPerElem( Vector3 vec );
// Compute the square root of a 3-D vector per element
// NOTE:
// Floating-point behavior matches standard library function sqrtf4.
//
inline const Vector3 sqrtPerElem( Vector3 vec );
// Compute the reciprocal square root of a 3-D vector per element
// NOTE:
// Floating-point behavior matches standard library function rsqrtf4.
//
inline const Vector3 rsqrtPerElem( Vector3 vec );
// Compute the absolute value of a 3-D vector per element
//
inline const Vector3 absPerElem( Vector3 vec );
// Copy sign from one 3-D vector to another, per element
//
inline const Vector3 copySignPerElem( Vector3 vec0, Vector3 vec1 );
// Maximum of two 3-D vectors per element
//
inline const Vector3 maxPerElem( Vector3 vec0, Vector3 vec1 );
// Minimum of two 3-D vectors per element
//
inline const Vector3 minPerElem( Vector3 vec0, Vector3 vec1 );
// Maximum element of a 3-D vector
//
inline const floatInVec maxElem( Vector3 vec );
// Minimum element of a 3-D vector
//
inline const floatInVec minElem( Vector3 vec );
// Compute the sum of all elements of a 3-D vector
//
inline const floatInVec sum( Vector3 vec );
// Compute the dot product of two 3-D vectors
//
inline const floatInVec dot( Vector3 vec0, Vector3 vec1 );
// Compute the square of the length of a 3-D vector
//
inline const floatInVec lengthSqr( Vector3 vec );
// Compute the length of a 3-D vector
//
inline const floatInVec length( Vector3 vec );
// Normalize a 3-D vector
// NOTE:
// The result is unpredictable when all elements of vec are at or near zero.
//
inline const Vector3 normalize( Vector3 vec );
// Compute cross product of two 3-D vectors
//
inline const Vector3 cross( Vector3 vec0, Vector3 vec1 );
// Outer product of two 3-D vectors
//
inline const Matrix3 outer( Vector3 vec0, Vector3 vec1 );
// Pre-multiply a row vector by a 3x3 matrix
// NOTE:
// Slower than column post-multiply.
//
inline const Vector3 rowMul( Vector3 vec, const Matrix3 & mat );
// Cross-product matrix of a 3-D vector
//
inline const Matrix3 crossMatrix( Vector3 vec );
// Create cross-product matrix and multiply
// NOTE:
// Faster than separately creating a cross-product matrix and multiplying.
//
inline const Matrix3 crossMatrixMul( Vector3 vec, const Matrix3 & mat );
// Linear interpolation between two 3-D vectors
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Vector3 lerp( float t, Vector3 vec0, Vector3 vec1 );
// Linear interpolation between two 3-D vectors (scalar data contained in vector data type)
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Vector3 lerp( floatInVec t, Vector3 vec0, Vector3 vec1 );
// Spherical linear interpolation between two 3-D vectors
// NOTE:
// The result is unpredictable if the vectors point in opposite directions.
// Does not clamp t between 0 and 1.
//
inline const Vector3 slerp( float t, Vector3 unitVec0, Vector3 unitVec1 );
// Spherical linear interpolation between two 3-D vectors (scalar data contained in vector data type)
// NOTE:
// The result is unpredictable if the vectors point in opposite directions.
// Does not clamp t between 0 and 1.
//
inline const Vector3 slerp( floatInVec t, Vector3 unitVec0, Vector3 unitVec1 );
// Conditionally select between two 3-D vectors
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
// However, the transfer of select1 to a VMX register may use more processing time than a branch.
// Use the boolInVec version for better performance.
//
inline const Vector3 select( Vector3 vec0, Vector3 vec1, bool select1 );
// Conditionally select between two 3-D vectors (scalar data contained in vector data type)
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
//
inline const Vector3 select( Vector3 vec0, Vector3 vec1, boolInVec select1 );
// Load x, y, and z elements from the first three words of a quadword.
//
//
inline void loadXYZ( Vector3 & vec, const vec_float4 * quad );
// Load x, y, and z elements from the first three words of a float array.
//
//
inline void loadXYZ( Vector3 & vec, const float * fptr );
// Store x, y, and z elements of a 3-D vector in the first three words of a quadword.
// The value of the fourth word (the word with the highest address) remains unchanged
//
inline void storeXYZ( Vector3 vec, vec_float4 * quad );
// Store x, y, and z elements of a 3-D vector in the first three words of a float array.
// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
//
inline void storeXYZ( Vector3 vec, float * fptr );
// Load four three-float 3-D vectors, stored in three quadwords
//
inline void loadXYZArray( Vector3 & vec0, Vector3 & vec1, Vector3 & vec2, Vector3 & vec3, const vec_float4 * threeQuads );
// Store four 3-D vectors in three quadwords
//
inline void storeXYZArray( Vector3 vec0, Vector3 vec1, Vector3 vec2, Vector3 vec3, vec_float4 * threeQuads );
// Store eight 3-D vectors as half-floats
//
inline void storeHalfFloats( Vector3 vec0, Vector3 vec1, Vector3 vec2, Vector3 vec3, Vector3 vec4, Vector3 vec5, Vector3 vec6, Vector3 vec7, vec_ushort8 * threeQuads );
#ifdef _VECTORMATH_DEBUG
// Print a 3-D vector
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Vector3 vec );
// Print a 3-D vector and an associated string identifier
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Vector3 vec, const char * name );
#endif
// A 4-D vector in array-of-structures format
//
class Vector4
{
vec_float4 mVec128;
public:
// Default constructor; does no initialization
//
inline Vector4( ) : mVec128((vec_float4){0.0f, 0.0f, 0.0f, 0.0f}) { };
// Construct a 4-D vector from x, y, z, and w elements
//
inline Vector4( float x, float y, float z, float w );
// Construct a 4-D vector from x, y, z, and w elements (scalar data contained in vector data type)
//
inline Vector4( floatInVec x, floatInVec y, floatInVec z, floatInVec w );
// Construct a 4-D vector from a 3-D vector and a scalar
//
inline Vector4( Vector3 xyz, float w );
// Construct a 4-D vector from a 3-D vector and a scalar (scalar data contained in vector data type)
//
inline Vector4( Vector3 xyz, floatInVec w );
// Copy x, y, and z from a 3-D vector into a 4-D vector, and set w to 0
//
explicit inline Vector4( Vector3 vec );
// Copy x, y, and z from a 3-D point into a 4-D vector, and set w to 1
//
explicit inline Vector4( Point3 pnt );
// Copy elements from a quaternion into a 4-D vector
//
explicit inline Vector4( Quat quat );
// Set all elements of a 4-D vector to the same scalar value
//
explicit inline Vector4( float scalar );
// Set all elements of a 4-D vector to the same scalar value (scalar data contained in vector data type)
//
explicit inline Vector4( floatInVec scalar );
// Set vector float data in a 4-D vector
//
explicit inline Vector4( vec_float4 vf4 );
// Get vector float data from a 4-D vector
//
inline vec_float4 get128( ) const;
// Assign one 4-D vector to another
//
inline Vector4 & operator =( Vector4 vec );
// Set the x, y, and z elements of a 4-D vector
// NOTE:
// This function does not change the w element.
//
inline Vector4 & setXYZ( Vector3 vec );
// Get the x, y, and z elements of a 4-D vector
//
inline const Vector3 getXYZ( ) const;
// Set the x element of a 4-D vector
//
inline Vector4 & setX( float x );
// Set the y element of a 4-D vector
//
inline Vector4 & setY( float y );
// Set the z element of a 4-D vector
//
inline Vector4 & setZ( float z );
// Set the w element of a 4-D vector
//
inline Vector4 & setW( float w );
// Set the x element of a 4-D vector (scalar data contained in vector data type)
//
inline Vector4 & setX( floatInVec x );
// Set the y element of a 4-D vector (scalar data contained in vector data type)
//
inline Vector4 & setY( floatInVec y );
// Set the z element of a 4-D vector (scalar data contained in vector data type)
//
inline Vector4 & setZ( floatInVec z );
// Set the w element of a 4-D vector (scalar data contained in vector data type)
//
inline Vector4 & setW( floatInVec w );
// Get the x element of a 4-D vector
//
inline const floatInVec getX( ) const;
// Get the y element of a 4-D vector
//
inline const floatInVec getY( ) const;
// Get the z element of a 4-D vector
//
inline const floatInVec getZ( ) const;
// Get the w element of a 4-D vector
//
inline const floatInVec getW( ) const;
// Set an x, y, z, or w element of a 4-D vector by index
//
inline Vector4 & setElem( int idx, float value );
// Set an x, y, z, or w element of a 4-D vector by index (scalar data contained in vector data type)
//
inline Vector4 & setElem( int idx, floatInVec value );
// Get an x, y, z, or w element of a 4-D vector by index
//
inline const floatInVec getElem( int idx ) const;
// Subscripting operator to set or get an element
//
inline VecIdx operator []( int idx );
// Subscripting operator to get an element
//
inline const floatInVec operator []( int idx ) const;
// Add two 4-D vectors
//
inline const Vector4 operator +( Vector4 vec ) const;
// Subtract a 4-D vector from another 4-D vector
//
inline const Vector4 operator -( Vector4 vec ) const;
// Multiply a 4-D vector by a scalar
//
inline const Vector4 operator *( float scalar ) const;
// Divide a 4-D vector by a scalar
//
inline const Vector4 operator /( float scalar ) const;
// Multiply a 4-D vector by a scalar (scalar data contained in vector data type)
//
inline const Vector4 operator *( floatInVec scalar ) const;
// Divide a 4-D vector by a scalar (scalar data contained in vector data type)
//
inline const Vector4 operator /( floatInVec scalar ) const;
// Perform compound assignment and addition with a 4-D vector
//
inline Vector4 & operator +=( Vector4 vec );
// Perform compound assignment and subtraction by a 4-D vector
//
inline Vector4 & operator -=( Vector4 vec );
// Perform compound assignment and multiplication by a scalar
//
inline Vector4 & operator *=( float scalar );
// Perform compound assignment and division by a scalar
//
inline Vector4 & operator /=( float scalar );
// Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
//
inline Vector4 & operator *=( floatInVec scalar );
// Perform compound assignment and division by a scalar (scalar data contained in vector data type)
//
inline Vector4 & operator /=( floatInVec scalar );
// Negate all elements of a 4-D vector
//
inline const Vector4 operator -( ) const;
// Perform equality comparsion of two 4-D vector
//
inline bool operator == (const Vector4& vec) const;
// Perform equality comparsion of two 4-D vector
//
inline bool operator != (const Vector4& vec) const;
// Perform lower than comparsion of two 4-D vector
//
inline bool operator < (const Vector4& vec) const;
// Perform lower or equal comparsion of two 4-D vector
//
inline bool operator <= (const Vector4& vec) const;
// Perform greater than comparsion of two 4-D vector
//
inline bool operator > (const Vector4& vec) const;
// Perform greater or equal comparsion of two 4-D vector
//
inline bool operator >= (const Vector4& vec) const;
// Construct x axis
//
static inline const Vector4 xAxis( );
// Construct y axis
//
static inline const Vector4 yAxis( );
// Construct z axis
//
static inline const Vector4 zAxis( );
// Construct w axis
//
static inline const Vector4 wAxis( );
};
// Multiply a 4-D vector by a scalar
//
inline const Vector4 operator *( float scalar, Vector4 vec );
// Multiply a 4-D vector by a scalar (scalar data contained in vector data type)
//
inline const Vector4 operator *( floatInVec scalar, Vector4 vec );
// Multiply two 4-D vectors per element
//
inline const Vector4 mulPerElem( Vector4 vec0, Vector4 vec1 );
// Divide two 4-D vectors per element
// NOTE:
// Floating-point behavior matches standard library function divf4.
//
inline const Vector4 divPerElem( Vector4 vec0, Vector4 vec1 );
// Compute the reciprocal of a 4-D vector per element
// NOTE:
// Floating-point behavior matches standard library function recipf4.
//
inline const Vector4 recipPerElem( Vector4 vec );
// Compute the square root of a 4-D vector per element
// NOTE:
// Floating-point behavior matches standard library function sqrtf4.
//
inline const Vector4 sqrtPerElem( Vector4 vec );
// Compute the reciprocal square root of a 4-D vector per element
// NOTE:
// Floating-point behavior matches standard library function rsqrtf4.
//
inline const Vector4 rsqrtPerElem( Vector4 vec );
// Compute the absolute value of a 4-D vector per element
//
inline const Vector4 absPerElem( Vector4 vec );
// Copy sign from one 4-D vector to another, per element
//
inline const Vector4 copySignPerElem( Vector4 vec0, Vector4 vec1 );
// Maximum of two 4-D vectors per element
//
inline const Vector4 maxPerElem( Vector4 vec0, Vector4 vec1 );
// Minimum of two 4-D vectors per element
//
inline const Vector4 minPerElem( Vector4 vec0, Vector4 vec1 );
// Maximum element of a 4-D vector
//
inline const floatInVec maxElem( Vector4 vec );
// Minimum element of a 4-D vector
//
inline const floatInVec minElem( Vector4 vec );
// Compute the sum of all elements of a 4-D vector
//
inline const floatInVec sum( Vector4 vec );
// Compute the dot product of two 4-D vectors
//
inline const floatInVec dot( Vector4 vec0, Vector4 vec1 );
// Compute the square of the length of a 4-D vector
//
inline const floatInVec lengthSqr( Vector4 vec );
// Compute the length of a 4-D vector
//
inline const floatInVec length( Vector4 vec );
// Normalize a 4-D vector
// NOTE:
// The result is unpredictable when all elements of vec are at or near zero.
//
inline const Vector4 normalize( Vector4 vec );
// Outer product of two 4-D vectors
//
inline const Matrix4 outer( Vector4 vec0, Vector4 vec1 );
// Linear interpolation between two 4-D vectors
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Vector4 lerp( float t, Vector4 vec0, Vector4 vec1 );
// Linear interpolation between two 4-D vectors (scalar data contained in vector data type)
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Vector4 lerp( floatInVec t, Vector4 vec0, Vector4 vec1 );
// Spherical linear interpolation between two 4-D vectors
// NOTE:
// The result is unpredictable if the vectors point in opposite directions.
// Does not clamp t between 0 and 1.
//
inline const Vector4 slerp( float t, Vector4 unitVec0, Vector4 unitVec1 );
// Spherical linear interpolation between two 4-D vectors (scalar data contained in vector data type)
// NOTE:
// The result is unpredictable if the vectors point in opposite directions.
// Does not clamp t between 0 and 1.
//
inline const Vector4 slerp( floatInVec t, Vector4 unitVec0, Vector4 unitVec1 );
// Conditionally select between two 4-D vectors
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
// However, the transfer of select1 to a VMX register may use more processing time than a branch.
// Use the boolInVec version for better performance.
//
inline const Vector4 select( Vector4 vec0, Vector4 vec1, bool select1 );
// Conditionally select between two 4-D vectors (scalar data contained in vector data type)
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
//
inline const Vector4 select( Vector4 vec0, Vector4 vec1, boolInVec select1 );
// Store four 4-D vectors as half-floats
//
inline void storeHalfFloats( Vector4 vec0, Vector4 vec1, Vector4 vec2, Vector4 vec3, vec_ushort8 * twoQuads );
// Load x, y, z, and w elements from the first four words of a float array.
//
//
inline void loadXYZW( Vector4 & vec, const float * fptr );
// Store x, y, z, and w elements of a 4-D vector in the first four words of a float array.
// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
//
inline void storeXYZW( Vector4 vec, float * fptr );
#ifdef _VECTORMATH_DEBUG
// Print a 4-D vector
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Vector4 vec );
// Print a 4-D vector and an associated string identifier
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Vector4 vec, const char * name );
#endif
// A 3-D point in array-of-structures format
//
class Point3
{
vec_float4 mVec128;
public:
// Default constructor; does no initialization
//
inline Point3( ) : mVec128((vec_float4){0.0f, 0.0f, 0.0f, 0.0f}) { };
// Construct a 3-D point from x, y, and z elements
//
inline Point3( float x, float y, float z );
// Construct a 3-D point from x, y, and z elements (scalar data contained in vector data type)
//
inline Point3( floatInVec x, floatInVec y, floatInVec z );
// Copy elements from a 3-D vector into a 3-D point
//
explicit inline Point3( Vector3 vec );
// Set all elements of a 3-D point to the same scalar value
//
explicit inline Point3( float scalar );
// Set all elements of a 3-D point to the same scalar value (scalar data contained in vector data type)
//
explicit inline Point3( floatInVec scalar );
// Set vector float data in a 3-D point
//
explicit inline Point3( vec_float4 vf4 );
// Get vector float data from a 3-D point
//
inline vec_float4 get128( ) const;
// Assign one 3-D point to another
//
inline Point3 & operator =( Point3 pnt );
// Set the x element of a 3-D point
//
inline Point3 & setX( float x );
// Set the y element of a 3-D point
//
inline Point3 & setY( float y );
// Set the z element of a 3-D point
//
inline Point3 & setZ( float z );
// Set the x element of a 3-D point (scalar data contained in vector data type)
//
inline Point3 & setX( floatInVec x );
// Set the y element of a 3-D point (scalar data contained in vector data type)
//
inline Point3 & setY( floatInVec y );
// Set the z element of a 3-D point (scalar data contained in vector data type)
//
inline Point3 & setZ( floatInVec z );
// Get the x element of a 3-D point
//
inline const floatInVec getX( ) const;
// Get the y element of a 3-D point
//
inline const floatInVec getY( ) const;
// Get the z element of a 3-D point
//
inline const floatInVec getZ( ) const;
// Set an x, y, or z element of a 3-D point by index
//
inline Point3 & setElem( int idx, float value );
// Set an x, y, or z element of a 3-D point by index (scalar data contained in vector data type)
//
inline Point3 & setElem( int idx, floatInVec value );
// Get an x, y, or z element of a 3-D point by index
//
inline const floatInVec getElem( int idx ) const;
// Subscripting operator to set or get an element
//
inline VecIdx operator []( int idx );
// Subscripting operator to get an element
//
inline const floatInVec operator []( int idx ) const;
// Subtract a 3-D point from another 3-D point
//
inline const Vector3 operator -( Point3 pnt ) const;
// Add a 3-D point to a 3-D vector
//
inline const Point3 operator +( Vector3 vec ) const;
// Subtract a 3-D vector from a 3-D point
//
inline const Point3 operator -( Vector3 vec ) const;
// Perform compound assignment and addition with a 3-D vector
//
inline Point3 & operator +=( Vector3 vec );
// Perform compound assignment and subtraction by a 3-D vector
//
inline Point3 & operator -=( Vector3 vec );
// Perform equality comparsion of two 3-D point
//
inline bool operator == (const Point3& vec) const;
// Perform equality comparsion of two 3-D point
//
inline bool operator != (const Point3& vec) const;
// Perform lower than comparsion of two 3-D point
//
inline bool operator < (const Point3& vec) const;
// Perform lower or equal comparsion of two 3-D point
//
inline bool operator <= (const Point3& vec) const;
// Perform greater than comparsion of two 3-D point
//
inline bool operator > (const Point3& vec) const;
// Perform greater or equal comparsion of two 3-D point
//
inline bool operator >= (const Point3& vec) const;
};
// Multiply two 3-D points per element
//
inline const Point3 mulPerElem( Point3 pnt0, Point3 pnt1 );
// Divide two 3-D points per element
// NOTE:
// Floating-point behavior matches standard library function divf4.
//
inline const Point3 divPerElem( Point3 pnt0, Point3 pnt1 );
// Compute the reciprocal of a 3-D point per element
// NOTE:
// Floating-point behavior matches standard library function recipf4.
//
inline const Point3 recipPerElem( Point3 pnt );
// Compute the square root of a 3-D point per element
// NOTE:
// Floating-point behavior matches standard library function sqrtf4.
//
inline const Point3 sqrtPerElem( Point3 pnt );
// Compute the reciprocal square root of a 3-D point per element
// NOTE:
// Floating-point behavior matches standard library function rsqrtf4.
//
inline const Point3 rsqrtPerElem( Point3 pnt );
// Compute the absolute value of a 3-D point per element
//
inline const Point3 absPerElem( Point3 pnt );
// Copy sign from one 3-D point to another, per element
//
inline const Point3 copySignPerElem( Point3 pnt0, Point3 pnt1 );
// Maximum of two 3-D points per element
//
inline const Point3 maxPerElem( Point3 pnt0, Point3 pnt1 );
// Minimum of two 3-D points per element
//
inline const Point3 minPerElem( Point3 pnt0, Point3 pnt1 );
// Maximum element of a 3-D point
//
inline const floatInVec maxElem( Point3 pnt );
// Minimum element of a 3-D point
//
inline const floatInVec minElem( Point3 pnt );
// Compute the sum of all elements of a 3-D point
//
inline const floatInVec sum( Point3 pnt );
// Apply uniform scale to a 3-D point
//
inline const Point3 scale( Point3 pnt, float scaleVal );
// Apply uniform scale to a 3-D point (scalar data contained in vector data type)
//
inline const Point3 scale( Point3 pnt, floatInVec scaleVal );
// Apply non-uniform scale to a 3-D point
//
inline const Point3 scale( Point3 pnt, Vector3 scaleVec );
// Scalar projection of a 3-D point on a unit-length 3-D vector
//
inline const floatInVec projection( Point3 pnt, Vector3 unitVec );
// Compute the square of the distance of a 3-D point from the coordinate-system origin
//
inline const floatInVec distSqrFromOrigin( Point3 pnt );
// Compute the distance of a 3-D point from the coordinate-system origin
//
inline const floatInVec distFromOrigin( Point3 pnt );
// Compute the square of the distance between two 3-D points
//
inline const floatInVec distSqr( Point3 pnt0, Point3 pnt1 );
// Compute the distance between two 3-D points
//
inline const floatInVec dist( Point3 pnt0, Point3 pnt1 );
// Linear interpolation between two 3-D points
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Point3 lerp( float t, Point3 pnt0, Point3 pnt1 );
// Linear interpolation between two 3-D points (scalar data contained in vector data type)
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Point3 lerp( floatInVec t, Point3 pnt0, Point3 pnt1 );
// Conditionally select between two 3-D points
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
// However, the transfer of select1 to a VMX register may use more processing time than a branch.
// Use the boolInVec version for better performance.
//
inline const Point3 select( Point3 pnt0, Point3 pnt1, bool select1 );
// Conditionally select between two 3-D points (scalar data contained in vector data type)
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
//
inline const Point3 select( Point3 pnt0, Point3 pnt1, boolInVec select1 );
// Load x, y, and z elements from the first three words of a quadword.
//
//
inline void loadXYZ( Point3 & pnt, const vec_float4 * quad );
// Load x, y, and z elements from the first three words of a float array.
//
//
inline void loadXYZ( Point3 & pnt, const float * fptr );
// Store x, y, and z elements of a 3-D point in the first three words of a quadword.
// The value of the fourth word (the word with the highest address) remains unchanged
//
inline void storeXYZ( Point3 pnt, vec_float4 * quad );
// Store x, y, and z elements of a 3-D point in the first three words of a float array.
// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
//
inline void storeXYZ( Point3 pnt, float * fptr );
// Load four three-float 3-D points, stored in three quadwords
//
inline void loadXYZArray( Point3 & pnt0, Point3 & pnt1, Point3 & pnt2, Point3 & pnt3, const vec_float4 * threeQuads );
// Store four 3-D points in three quadwords
//
inline void storeXYZArray( Point3 pnt0, Point3 pnt1, Point3 pnt2, Point3 pnt3, vec_float4 * threeQuads );
// Store eight 3-D points as half-floats
//
inline void storeHalfFloats( Point3 pnt0, Point3 pnt1, Point3 pnt2, Point3 pnt3, Point3 pnt4, Point3 pnt5, Point3 pnt6, Point3 pnt7, vec_ushort8 * threeQuads );
#ifdef _VECTORMATH_DEBUG
// Print a 3-D point
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Point3 pnt );
// Print a 3-D point and an associated string identifier
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Point3 pnt, const char * name );
#endif
// A quaternion in array-of-structures format
//
class Quat
{
vec_float4 mVec128;
public:
// Default constructor; does no initialization
//
inline Quat( ) : mVec128((vec_float4){0.0f, 0.0f, 0.0f, 0.0f}) { };
// Construct a quaternion from x, y, z, and w elements
//
inline Quat( float x, float y, float z, float w );
// Construct a quaternion from x, y, z, and w elements (scalar data contained in vector data type)
//
inline Quat( floatInVec x, floatInVec y, floatInVec z, floatInVec w );
// Construct a quaternion from a 3-D vector and a scalar
//
inline Quat( Vector3 xyz, float w );
// Construct a quaternion from a 3-D vector and a scalar (scalar data contained in vector data type)
//
inline Quat( Vector3 xyz, floatInVec w );
// Copy elements from a 4-D vector into a quaternion
//
explicit inline Quat( Vector4 vec );
// Convert a rotation matrix to a unit-length quaternion
//
explicit inline Quat( const Matrix3 & rotMat );
// Set all elements of a quaternion to the same scalar value
//
explicit inline Quat( float scalar );
// Set all elements of a quaternion to the same scalar value (scalar data contained in vector data type)
//
explicit inline Quat( floatInVec scalar );
// Set vector float data in a quaternion
//
explicit inline Quat( vec_float4 vf4 );
// Get vector float data from a quaternion
//
inline vec_float4 get128( ) const;
// Assign one quaternion to another
//
inline Quat & operator =( Quat quat );
// Set the x, y, and z elements of a quaternion
// NOTE:
// This function does not change the w element.
//
inline Quat & setXYZ( Vector3 vec );
// Get the x, y, and z elements of a quaternion
//
inline const Vector3 getXYZ( ) const;
// Set the x element of a quaternion
//
inline Quat & setX( float x );
// Set the y element of a quaternion
//
inline Quat & setY( float y );
// Set the z element of a quaternion
//
inline Quat & setZ( float z );
// Set the w element of a quaternion
//
inline Quat & setW( float w );
// Set the x element of a quaternion (scalar data contained in vector data type)
//
inline Quat & setX( floatInVec x );
// Set the y element of a quaternion (scalar data contained in vector data type)
//
inline Quat & setY( floatInVec y );
// Set the z element of a quaternion (scalar data contained in vector data type)
//
inline Quat & setZ( floatInVec z );
// Set the w element of a quaternion (scalar data contained in vector data type)
//
inline Quat & setW( floatInVec w );
// Get the x element of a quaternion
//
inline const floatInVec getX( ) const;
// Get the y element of a quaternion
//
inline const floatInVec getY( ) const;
// Get the z element of a quaternion
//
inline const floatInVec getZ( ) const;
// Get the w element of a quaternion
//
inline const floatInVec getW( ) const;
// Set an x, y, z, or w element of a quaternion by index
//
inline Quat & setElem( int idx, float value );
// Set an x, y, z, or w element of a quaternion by index (scalar data contained in vector data type)
//
inline Quat & setElem( int idx, floatInVec value );
// Get an x, y, z, or w element of a quaternion by index
//
inline const floatInVec getElem( int idx ) const;
// Subscripting operator to set or get an element
//
inline VecIdx operator []( int idx );
// Subscripting operator to get an element
//
inline const floatInVec operator []( int idx ) const;
// Add two quaternions
//
inline const Quat operator +( Quat quat ) const;
// Subtract a quaternion from another quaternion
//
inline const Quat operator -( Quat quat ) const;
// Multiply two quaternions
//
inline const Quat operator *( Quat quat ) const;
// Multiply a quaternion by a scalar
//
inline const Quat operator *( float scalar ) const;
// Divide a quaternion by a scalar
//
inline const Quat operator /( float scalar ) const;
// Multiply a quaternion by a scalar (scalar data contained in vector data type)
//
inline const Quat operator *( floatInVec scalar ) const;
// Divide a quaternion by a scalar (scalar data contained in vector data type)
//
inline const Quat operator /( floatInVec scalar ) const;
// Perform compound assignment and addition with a quaternion
//
inline Quat & operator +=( Quat quat );
// Perform compound assignment and subtraction by a quaternion
//
inline Quat & operator -=( Quat quat );
// Perform compound assignment and multiplication by a quaternion
//
inline Quat & operator *=( Quat quat );
// Perform compound assignment and multiplication by a scalar
//
inline Quat & operator *=( float scalar );
// Perform compound assignment and division by a scalar
//
inline Quat & operator /=( float scalar );
// Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
//
inline Quat & operator *=( floatInVec scalar );
// Perform compound assignment and division by a scalar (scalar data contained in vector data type)
//
inline Quat & operator /=( floatInVec scalar );
// Negate all elements of a quaternion
//
inline const Quat operator -( ) const;
// Construct an identity quaternion
//
static inline const Quat identity( );
// Construct a quaternion to rotate between two unit-length 3-D vectors
// NOTE:
// The result is unpredictable if unitVec0 and unitVec1 point in opposite directions.
//
static inline const Quat rotation( Vector3 unitVec0, Vector3 unitVec1 );
// Construct a quaternion to rotate around a unit-length 3-D vector
//
static inline const Quat rotation( float radians, Vector3 unitVec );
// Construct a quaternion to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
//
static inline const Quat rotation( floatInVec radians, Vector3 unitVec );
// Construct a quaternion to rotate around the x axis
//
static inline const Quat rotationX( float radians );
// Construct a quaternion to rotate around the y axis
//
static inline const Quat rotationY( float radians );
// Construct a quaternion to rotate around the z axis
//
static inline const Quat rotationZ( float radians );
// Construct a quaternion to rotate around the x axis (scalar data contained in vector data type)
//
static inline const Quat rotationX( floatInVec radians );
// Construct a quaternion to rotate around the y axis (scalar data contained in vector data type)
//
static inline const Quat rotationY( floatInVec radians );
// Construct a quaternion to rotate around the z axis (scalar data contained in vector data type)
//
static inline const Quat rotationZ( floatInVec radians );
};
// Multiply a quaternion by a scalar
//
inline const Quat operator *( float scalar, Quat quat );
// Multiply a quaternion by a scalar (scalar data contained in vector data type)
//
inline const Quat operator *( floatInVec scalar, Quat quat );
// Compute the conjugate of a quaternion
//
inline const Quat conj( Quat quat );
// Use a unit-length quaternion to rotate a 3-D vector
//
inline const Vector3 rotate( Quat unitQuat, Vector3 vec );
// Compute the dot product of two quaternions
//
inline const floatInVec dot( Quat quat0, Quat quat1 );
// Compute the norm of a quaternion
//
inline const floatInVec norm( Quat quat );
// Compute the length of a quaternion
//
inline const floatInVec length( Quat quat );
// Normalize a quaternion
// NOTE:
// The result is unpredictable when all elements of quat are at or near zero.
//
inline const Quat normalize( Quat quat );
// Linear interpolation between two quaternions
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Quat lerp( float t, Quat quat0, Quat quat1 );
// Linear interpolation between two quaternions (scalar data contained in vector data type)
// NOTE:
// Does not clamp t between 0 and 1.
//
inline const Quat lerp( floatInVec t, Quat quat0, Quat quat1 );
// Spherical linear interpolation between two quaternions
// NOTE:
// Interpolates along the shortest path between orientations.
// Does not clamp t between 0 and 1.
//
inline const Quat slerp( float t, Quat unitQuat0, Quat unitQuat1 );
// Spherical linear interpolation between two quaternions (scalar data contained in vector data type)
// NOTE:
// Interpolates along the shortest path between orientations.
// Does not clamp t between 0 and 1.
//
inline const Quat slerp( floatInVec t, Quat unitQuat0, Quat unitQuat1 );
// Spherical quadrangle interpolation
//
inline const Quat squad( float t, Quat unitQuat0, Quat unitQuat1, Quat unitQuat2, Quat unitQuat3 );
// Spherical quadrangle interpolation (scalar data contained in vector data type)
//
inline const Quat squad( floatInVec t, Quat unitQuat0, Quat unitQuat1, Quat unitQuat2, Quat unitQuat3 );
// Load x, y, z, and w elements from the first four words of a float array.
//
//
inline void loadXYZW( Quat & quat, const float * fptr );
// Store x, y, z, and w elements of a quaternion in the first four words of a float array.
// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
//
inline void storeXYZW( Quat quat, float * fptr );
// Conditionally select between two quaternions
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
// However, the transfer of select1 to a VMX register may use more processing time than a branch.
// Use the boolInVec version for better performance.
//
inline const Quat select( Quat quat0, Quat quat1, bool select1 );
// Conditionally select between two quaternions (scalar data contained in vector data type)
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
//
inline const Quat select( Quat quat0, Quat quat1, boolInVec select1 );
#ifdef _VECTORMATH_DEBUG
// Print a quaternion
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Quat quat );
// Print a quaternion and an associated string identifier
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( Quat quat, const char * name );
#endif
// A 3x3 matrix in array-of-structures format
//
class Matrix3
{
Vector3 mCol0;
Vector3 mCol1;
Vector3 mCol2;
public:
// Default constructor; does no initialization
//
inline Matrix3( ) { };
// Copy a 3x3 matrix
//
inline Matrix3( const Matrix3 & mat );
// Construct a 3x3 matrix containing the specified columns
//
inline Matrix3( Vector3 col0, Vector3 col1, Vector3 col2 );
// Construct a 3x3 rotation matrix from a unit-length quaternion
//
explicit inline Matrix3( Quat unitQuat );
// Set all elements of a 3x3 matrix to the same scalar value
//
explicit inline Matrix3( float scalar );
// Set all elements of a 3x3 matrix to the same scalar value (scalar data contained in vector data type)
//
explicit inline Matrix3( floatInVec scalar );
// Assign one 3x3 matrix to another
//
inline Matrix3 & operator =( const Matrix3 & mat );
// Set column 0 of a 3x3 matrix
//
inline Matrix3 & setCol0( Vector3 col0 );
// Set column 1 of a 3x3 matrix
//
inline Matrix3 & setCol1( Vector3 col1 );
// Set column 2 of a 3x3 matrix
//
inline Matrix3 & setCol2( Vector3 col2 );
// Get column 0 of a 3x3 matrix
//
inline const Vector3 getCol0( ) const;
// Get column 1 of a 3x3 matrix
//
inline const Vector3 getCol1( ) const;
// Get column 2 of a 3x3 matrix
//
inline const Vector3 getCol2( ) const;
// Set the column of a 3x3 matrix referred to by the specified index
//
inline Matrix3 & setCol( int col, Vector3 vec );
// Set the row of a 3x3 matrix referred to by the specified index
//
inline Matrix3 & setRow( int row, Vector3 vec );
// Get the column of a 3x3 matrix referred to by the specified index
//
inline const Vector3 getCol( int col ) const;
// Get the row of a 3x3 matrix referred to by the specified index
//
inline const Vector3 getRow( int row ) const;
// Subscripting operator to set or get a column
//
inline Vector3 & operator []( int col );
// Subscripting operator to get a column
//
inline const Vector3 operator []( int col ) const;
// Set the element of a 3x3 matrix referred to by column and row indices
//
inline Matrix3 & setElem( int col, int row, float val );
// Set the element of a 3x3 matrix referred to by column and row indices (scalar data contained in vector data type)
//
inline Matrix3 & setElem( int col, int row, floatInVec val );
// Get the element of a 3x3 matrix referred to by column and row indices
//
inline const floatInVec getElem( int col, int row ) const;
// Add two 3x3 matrices
//
inline const Matrix3 operator +( const Matrix3 & mat ) const;
// Subtract a 3x3 matrix from another 3x3 matrix
//
inline const Matrix3 operator -( const Matrix3 & mat ) const;
// Negate all elements of a 3x3 matrix
//
inline const Matrix3 operator -( ) const;
// Multiply a 3x3 matrix by a scalar
//
inline const Matrix3 operator *( float scalar ) const;
// Multiply a 3x3 matrix by a scalar (scalar data contained in vector data type)
//
inline const Matrix3 operator *( floatInVec scalar ) const;
// Multiply a 3x3 matrix by a 3-D vector
//
inline const Vector3 operator *( Vector3 vec ) const;
// Multiply two 3x3 matrices
//
inline const Matrix3 operator *( const Matrix3 & mat ) const;
// Perform compound assignment and addition with a 3x3 matrix
//
inline Matrix3 & operator +=( const Matrix3 & mat );
// Perform compound assignment and subtraction by a 3x3 matrix
//
inline Matrix3 & operator -=( const Matrix3 & mat );
// Perform compound assignment and multiplication by a scalar
//
inline Matrix3 & operator *=( float scalar );
// Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
//
inline Matrix3 & operator *=( floatInVec scalar );
// Perform compound assignment and multiplication by a 3x3 matrix
//
inline Matrix3 & operator *=( const Matrix3 & mat );
// Construct an identity 3x3 matrix
//
static inline const Matrix3 identity( );
// Construct a 3x3 matrix to rotate around the x axis
//
static inline const Matrix3 rotationX( float radians );
// Construct a 3x3 matrix to rotate around the y axis
//
static inline const Matrix3 rotationY( float radians );
// Construct a 3x3 matrix to rotate around the z axis
//
static inline const Matrix3 rotationZ( float radians );
// Construct a 3x3 matrix to rotate around the x axis (scalar data contained in vector data type)
//
static inline const Matrix3 rotationX( floatInVec radians );
// Construct a 3x3 matrix to rotate around the y axis (scalar data contained in vector data type)
//
static inline const Matrix3 rotationY( floatInVec radians );
// Construct a 3x3 matrix to rotate around the z axis (scalar data contained in vector data type)
//
static inline const Matrix3 rotationZ( floatInVec radians );
// Construct a 3x3 matrix to rotate around the x, y, and z axes
//
static inline const Matrix3 rotationZYX( Vector3 radiansXYZ );
// Construct a 3x3 matrix to rotate around a unit-length 3-D vector
//
static inline const Matrix3 rotation( float radians, Vector3 unitVec );
// Construct a 3x3 matrix to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
//
static inline const Matrix3 rotation( floatInVec radians, Vector3 unitVec );
// Construct a rotation matrix from a unit-length quaternion
//
static inline const Matrix3 rotation( Quat unitQuat );
// Construct a 3x3 matrix to perform scaling
//
static inline const Matrix3 scale( Vector3 scaleVec );
};
// Multiply a 3x3 matrix by a scalar
//
inline const Matrix3 operator *( float scalar, const Matrix3 & mat );
// Multiply a 3x3 matrix by a scalar (scalar data contained in vector data type)
//
inline const Matrix3 operator *( floatInVec scalar, const Matrix3 & mat );
// Append (post-multiply) a scale transformation to a 3x3 matrix
// NOTE:
// Faster than creating and multiplying a scale transformation matrix.
//
inline const Matrix3 appendScale( const Matrix3 & mat, Vector3 scaleVec );
// Prepend (pre-multiply) a scale transformation to a 3x3 matrix
// NOTE:
// Faster than creating and multiplying a scale transformation matrix.
//
inline const Matrix3 prependScale( Vector3 scaleVec, const Matrix3 & mat );
// Multiply two 3x3 matrices per element
//
inline const Matrix3 mulPerElem( const Matrix3 & mat0, const Matrix3 & mat1 );
// Compute the absolute value of a 3x3 matrix per element
//
inline const Matrix3 absPerElem( const Matrix3 & mat );
// Transpose of a 3x3 matrix
//
inline const Matrix3 transpose( const Matrix3 & mat );
// Compute the inverse of a 3x3 matrix
// NOTE:
// Result is unpredictable when the determinant of mat is equal to or near 0.
//
inline const Matrix3 inverse( const Matrix3 & mat );
// Determinant of a 3x3 matrix
//
inline const floatInVec determinant( const Matrix3 & mat );
// Conditionally select between two 3x3 matrices
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
// However, the transfer of select1 to a VMX register may use more processing time than a branch.
// Use the boolInVec version for better performance.
//
inline const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, bool select1 );
// Conditionally select between two 3x3 matrices (scalar data contained in vector data type)
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
//
inline const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, boolInVec select1 );
#ifdef _VECTORMATH_DEBUG
// Print a 3x3 matrix
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( const Matrix3 & mat );
// Print a 3x3 matrix and an associated string identifier
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( const Matrix3 & mat, const char * name );
#endif
// A 4x4 matrix in array-of-structures format
//
class Matrix4
{
Vector4 mCol0;
Vector4 mCol1;
Vector4 mCol2;
Vector4 mCol3;
public:
// Default constructor; does no initialization
//
inline Matrix4( ) { };
// Copy a 4x4 matrix
//
inline Matrix4( const Matrix4 & mat );
// Construct a 4x4 matrix containing the specified columns
//
inline Matrix4( Vector4 col0, Vector4 col1, Vector4 col2, Vector4 col3 );
// Construct a 4x4 matrix from a 3x4 transformation matrix
//
explicit inline Matrix4( const Transform3 & mat );
// Construct a 4x4 matrix from a 3x3 matrix and a 3-D vector
//
inline Matrix4( const Matrix3 & mat, Vector3 translateVec );
// Construct a 4x4 matrix from a unit-length quaternion and a 3-D vector
//
inline Matrix4( Quat unitQuat, Vector3 translateVec );
// Set all elements of a 4x4 matrix to the same scalar value
//
explicit inline Matrix4( float scalar );
// Set all elements of a 4x4 matrix to the same scalar value (scalar data contained in vector data type)
//
explicit inline Matrix4( floatInVec scalar );
// Assign one 4x4 matrix to another
//
inline Matrix4 & operator =( const Matrix4 & mat );
// Set the upper-left 3x3 submatrix
// NOTE:
// This function does not change the bottom row elements.
//
inline Matrix4 & setUpper3x3( const Matrix3 & mat3 );
// Get the upper-left 3x3 submatrix of a 4x4 matrix
//
inline const Matrix3 getUpper3x3( ) const;
// Set translation component
// NOTE:
// This function does not change the bottom row elements.
//
inline Matrix4 & setTranslation( Vector3 translateVec );
// Get the translation component of a 4x4 matrix
//
inline const Vector3 getTranslation( ) const;
// Set column 0 of a 4x4 matrix
//
inline Matrix4 & setCol0( Vector4 col0 );
// Set column 1 of a 4x4 matrix
//
inline Matrix4 & setCol1( Vector4 col1 );
// Set column 2 of a 4x4 matrix
//
inline Matrix4 & setCol2( Vector4 col2 );
// Set column 3 of a 4x4 matrix
//
inline Matrix4 & setCol3( Vector4 col3 );
// Get column 0 of a 4x4 matrix
//
inline const Vector4 getCol0( ) const;
// Get column 1 of a 4x4 matrix
//
inline const Vector4 getCol1( ) const;
// Get column 2 of a 4x4 matrix
//
inline const Vector4 getCol2( ) const;
// Get column 3 of a 4x4 matrix
//
inline const Vector4 getCol3( ) const;
// Set the column of a 4x4 matrix referred to by the specified index
//
inline Matrix4 & setCol( int col, Vector4 vec );
// Set the row of a 4x4 matrix referred to by the specified index
//
inline Matrix4 & setRow( int row, Vector4 vec );
// Get the column of a 4x4 matrix referred to by the specified index
//
inline const Vector4 getCol( int col ) const;
// Get the row of a 4x4 matrix referred to by the specified index
//
inline const Vector4 getRow( int row ) const;
// Subscripting operator to set or get a column
//
inline Vector4 & operator []( int col );
// Subscripting operator to get a column
//
inline const Vector4 operator []( int col ) const;
// Set the element of a 4x4 matrix referred to by column and row indices
//
inline Matrix4 & setElem( int col, int row, float val );
// Set the element of a 4x4 matrix referred to by column and row indices (scalar data contained in vector data type)
//
inline Matrix4 & setElem( int col, int row, floatInVec val );
// Get the element of a 4x4 matrix referred to by column and row indices
//
inline const floatInVec getElem( int col, int row ) const;
// Add two 4x4 matrices
//
inline const Matrix4 operator +( const Matrix4 & mat ) const;
// Subtract a 4x4 matrix from another 4x4 matrix
//
inline const Matrix4 operator -( const Matrix4 & mat ) const;
// Negate all elements of a 4x4 matrix
//
inline const Matrix4 operator -( ) const;
// Multiply a 4x4 matrix by a scalar
//
inline const Matrix4 operator *( float scalar ) const;
// Multiply a 4x4 matrix by a scalar (scalar data contained in vector data type)
//
inline const Matrix4 operator *( floatInVec scalar ) const;
// Multiply a 4x4 matrix by a 4-D vector
//
inline const Vector4 operator *( Vector4 vec ) const;
// Multiply a 4x4 matrix by a 3-D vector
//
inline const Vector4 operator *( Vector3 vec ) const;
// Multiply a 4x4 matrix by a 3-D point
//
inline const Vector4 operator *( Point3 pnt ) const;
// Multiply two 4x4 matrices
//
inline const Matrix4 operator *( const Matrix4 & mat ) const;
// Multiply a 4x4 matrix by a 3x4 transformation matrix
//
inline const Matrix4 operator *( const Transform3 & tfrm ) const;
// Perform compound assignment and addition with a 4x4 matrix
//
inline Matrix4 & operator +=( const Matrix4 & mat );
// Perform compound assignment and subtraction by a 4x4 matrix
//
inline Matrix4 & operator -=( const Matrix4 & mat );
// Perform compound assignment and multiplication by a scalar
//
inline Matrix4 & operator *=( float scalar );
// Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
//
inline Matrix4 & operator *=( floatInVec scalar );
// Perform compound assignment and multiplication by a 4x4 matrix
//
inline Matrix4 & operator *=( const Matrix4 & mat );
// Perform compound assignment and multiplication by a 3x4 transformation matrix
//
inline Matrix4 & operator *=( const Transform3 & tfrm );
inline bool operator == (const Matrix4& mat) const;
inline bool operator != (const Matrix4& mat) const;
// Construct an identity 4x4 matrix
//
static inline const Matrix4 identity( );
// Construct a 4x4 matrix to rotate around the x axis
//
static inline const Matrix4 rotationX( float radians );
// Construct a 4x4 matrix to rotate around the y axis
//
static inline const Matrix4 rotationY( float radians );
// Construct a 4x4 matrix to rotate around the z axis
//
static inline const Matrix4 rotationZ( float radians );
// Construct a 4x4 matrix to rotate around the x axis (scalar data contained in vector data type)
//
static inline const Matrix4 rotationX( floatInVec radians );
// Construct a 4x4 matrix to rotate around the y axis (scalar data contained in vector data type)
//
static inline const Matrix4 rotationY( floatInVec radians );
// Construct a 4x4 matrix to rotate around the z axis (scalar data contained in vector data type)
//
static inline const Matrix4 rotationZ( floatInVec radians );
// Construct a 4x4 matrix to rotate around the x, y, and z axes
//
static inline const Matrix4 rotationZYX( Vector3 radiansXYZ );
// Construct a 4x4 matrix to rotate around a unit-length 3-D vector
//
static inline const Matrix4 rotation( float radians, Vector3 unitVec );
// Construct a 4x4 matrix to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
//
static inline const Matrix4 rotation( floatInVec radians, Vector3 unitVec );
// Construct a rotation matrix from a unit-length quaternion
//
static inline const Matrix4 rotation( Quat unitQuat );
// Construct a 4x4 matrix to perform scaling
//
static inline const Matrix4 scale( Vector3 scaleVec );
// Construct a 4x4 matrix to perform translation
//
static inline const Matrix4 translation( Vector3 translateVec );
// Construct viewing matrix based on eye position, position looked at, and up direction
//
static inline const Matrix4 lookAt( Point3 eyePos, Point3 lookAtPos, Vector3 upVec );
// Construct a perspective projection matrix
//
static inline const Matrix4 perspective( float fovyRadians, float aspect, float zNear, float zFar );
// Construct a perspective projection matrix based on frustum
//
static inline const Matrix4 frustum( float left, float right, float bottom, float top, float zNear, float zFar );
// Construct an orthographic projection matrix
//
static inline const Matrix4 orthographic( float left, float right, float bottom, float top, float zNear, float zFar );
};
// Multiply a 4x4 matrix by a scalar
//
inline const Matrix4 operator *( float scalar, const Matrix4 & mat );
// Multiply a 4x4 matrix by a scalar (scalar data contained in vector data type)
//
inline const Matrix4 operator *( floatInVec scalar, const Matrix4 & mat );
// Append (post-multiply) a scale transformation to a 4x4 matrix
// NOTE:
// Faster than creating and multiplying a scale transformation matrix.
//
inline const Matrix4 appendScale( const Matrix4 & mat, Vector3 scaleVec );
// Prepend (pre-multiply) a scale transformation to a 4x4 matrix
// NOTE:
// Faster than creating and multiplying a scale transformation matrix.
//
inline const Matrix4 prependScale( Vector3 scaleVec, const Matrix4 & mat );
// Multiply two 4x4 matrices per element
//
inline const Matrix4 mulPerElem( const Matrix4 & mat0, const Matrix4 & mat1 );
// Compute the absolute value of a 4x4 matrix per element
//
inline const Matrix4 absPerElem( const Matrix4 & mat );
// Transpose of a 4x4 matrix
//
inline const Matrix4 transpose( const Matrix4 & mat );
// Compute the inverse of a 4x4 matrix
// NOTE:
// Result is unpredictable when the determinant of mat is equal to or near 0.
//
inline const Matrix4 inverse( const Matrix4 & mat );
// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix
// NOTE:
// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions. The result is unpredictable when the determinant of mat is equal to or near 0.
//
inline const Matrix4 affineInverse( const Matrix4 & mat );
// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix with an orthogonal upper-left 3x3 submatrix
// NOTE:
// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions.
//
inline const Matrix4 orthoInverse( const Matrix4 & mat );
// Determinant of a 4x4 matrix
//
inline const floatInVec determinant( const Matrix4 & mat );
// Conditionally select between two 4x4 matrices
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
// However, the transfer of select1 to a VMX register may use more processing time than a branch.
// Use the boolInVec version for better performance.
//
inline const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, bool select1 );
// Conditionally select between two 4x4 matrices (scalar data contained in vector data type)
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
//
inline const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, boolInVec select1 );
#ifdef _VECTORMATH_DEBUG
// Print a 4x4 matrix
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( const Matrix4 & mat );
// Print a 4x4 matrix and an associated string identifier
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( const Matrix4 & mat, const char * name );
#endif
// A 3x4 transformation matrix in array-of-structures format
//
class Transform3
{
Vector3 mCol0;
Vector3 mCol1;
Vector3 mCol2;
Vector3 mCol3;
public:
// Default constructor; does no initialization
//
inline Transform3( ) { };
// Copy a 3x4 transformation matrix
//
inline Transform3( const Transform3 & tfrm );
// Construct a 3x4 transformation matrix containing the specified columns
//
inline Transform3( Vector3 col0, Vector3 col1, Vector3 col2, Vector3 col3 );
// Construct a 3x4 transformation matrix from a 3x3 matrix and a 3-D vector
//
inline Transform3( const Matrix3 & tfrm, Vector3 translateVec );
// Construct a 3x4 transformation matrix from a unit-length quaternion and a 3-D vector
//
inline Transform3( Quat unitQuat, Vector3 translateVec );
// Set all elements of a 3x4 transformation matrix to the same scalar value
//
explicit inline Transform3( float scalar );
// Set all elements of a 3x4 transformation matrix to the same scalar value (scalar data contained in vector data type)
//
explicit inline Transform3( floatInVec scalar );
// Assign one 3x4 transformation matrix to another
//
inline Transform3 & operator =( const Transform3 & tfrm );
// Set the upper-left 3x3 submatrix
//
inline Transform3 & setUpper3x3( const Matrix3 & mat3 );
// Get the upper-left 3x3 submatrix of a 3x4 transformation matrix
//
inline const Matrix3 getUpper3x3( ) const;
// Set translation component
//
inline Transform3 & setTranslation( Vector3 translateVec );
// Get the translation component of a 3x4 transformation matrix
//
inline const Vector3 getTranslation( ) const;
// Set column 0 of a 3x4 transformation matrix
//
inline Transform3 & setCol0( Vector3 col0 );
// Set column 1 of a 3x4 transformation matrix
//
inline Transform3 & setCol1( Vector3 col1 );
// Set column 2 of a 3x4 transformation matrix
//
inline Transform3 & setCol2( Vector3 col2 );
// Set column 3 of a 3x4 transformation matrix
//
inline Transform3 & setCol3( Vector3 col3 );
// Get column 0 of a 3x4 transformation matrix
//
inline const Vector3 getCol0( ) const;
// Get column 1 of a 3x4 transformation matrix
//
inline const Vector3 getCol1( ) const;
// Get column 2 of a 3x4 transformation matrix
//
inline const Vector3 getCol2( ) const;
// Get column 3 of a 3x4 transformation matrix
//
inline const Vector3 getCol3( ) const;
// Set the column of a 3x4 transformation matrix referred to by the specified index
//
inline Transform3 & setCol( int col, Vector3 vec );
// Set the row of a 3x4 transformation matrix referred to by the specified index
//
inline Transform3 & setRow( int row, Vector4 vec );
// Get the column of a 3x4 transformation matrix referred to by the specified index
//
inline const Vector3 getCol( int col ) const;
// Get the row of a 3x4 transformation matrix referred to by the specified index
//
inline const Vector4 getRow( int row ) const;
// Subscripting operator to set or get a column
//
inline Vector3 & operator []( int col );
// Subscripting operator to get a column
//
inline const Vector3 operator []( int col ) const;
// Set the element of a 3x4 transformation matrix referred to by column and row indices
//
inline Transform3 & setElem( int col, int row, float val );
// Set the element of a 3x4 transformation matrix referred to by column and row indices (scalar data contained in vector data type)
//
inline Transform3 & setElem( int col, int row, floatInVec val );
// Get the element of a 3x4 transformation matrix referred to by column and row indices
//
inline const floatInVec getElem( int col, int row ) const;
// Multiply a 3x4 transformation matrix by a 3-D vector
//
inline const Vector3 operator *( Vector3 vec ) const;
// Multiply a 3x4 transformation matrix by a 3-D point
//
inline const Point3 operator *( Point3 pnt ) const;
// Multiply two 3x4 transformation matrices
//
inline const Transform3 operator *( const Transform3 & tfrm ) const;
// Perform compound assignment and multiplication by a 3x4 transformation matrix
//
inline Transform3 & operator *=( const Transform3 & tfrm );
// Construct an identity 3x4 transformation matrix
//
static inline const Transform3 identity( );
// Construct a 3x4 transformation matrix to rotate around the x axis
//
static inline const Transform3 rotationX( float radians );
// Construct a 3x4 transformation matrix to rotate around the y axis
//
static inline const Transform3 rotationY( float radians );
// Construct a 3x4 transformation matrix to rotate around the z axis
//
static inline const Transform3 rotationZ( float radians );
// Construct a 3x4 transformation matrix to rotate around the x axis (scalar data contained in vector data type)
//
static inline const Transform3 rotationX( floatInVec radians );
// Construct a 3x4 transformation matrix to rotate around the y axis (scalar data contained in vector data type)
//
static inline const Transform3 rotationY( floatInVec radians );
// Construct a 3x4 transformation matrix to rotate around the z axis (scalar data contained in vector data type)
//
static inline const Transform3 rotationZ( floatInVec radians );
// Construct a 3x4 transformation matrix to rotate around the x, y, and z axes
//
static inline const Transform3 rotationZYX( Vector3 radiansXYZ );
// Construct a 3x4 transformation matrix to rotate around a unit-length 3-D vector
//
static inline const Transform3 rotation( float radians, Vector3 unitVec );
// Construct a 3x4 transformation matrix to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
//
static inline const Transform3 rotation( floatInVec radians, Vector3 unitVec );
// Construct a rotation matrix from a unit-length quaternion
//
static inline const Transform3 rotation( Quat unitQuat );
// Construct a 3x4 transformation matrix to perform scaling
//
static inline const Transform3 scale( Vector3 scaleVec );
// Construct a 3x4 transformation matrix to perform translation
//
static inline const Transform3 translation( Vector3 translateVec );
};
// Append (post-multiply) a scale transformation to a 3x4 transformation matrix
// NOTE:
// Faster than creating and multiplying a scale transformation matrix.
//
inline const Transform3 appendScale( const Transform3 & tfrm, Vector3 scaleVec );
// Prepend (pre-multiply) a scale transformation to a 3x4 transformation matrix
// NOTE:
// Faster than creating and multiplying a scale transformation matrix.
//
inline const Transform3 prependScale( Vector3 scaleVec, const Transform3 & tfrm );
// Multiply two 3x4 transformation matrices per element
//
inline const Transform3 mulPerElem( const Transform3 & tfrm0, const Transform3 & tfrm1 );
// Compute the absolute value of a 3x4 transformation matrix per element
//
inline const Transform3 absPerElem( const Transform3 & tfrm );
// Inverse of a 3x4 transformation matrix
// NOTE:
// Result is unpredictable when the determinant of the left 3x3 submatrix is equal to or near 0.
//
inline const Transform3 inverse( const Transform3 & tfrm );
// Compute the inverse of a 3x4 transformation matrix, expected to have an orthogonal upper-left 3x3 submatrix
// NOTE:
// This can be used to achieve better performance than a general inverse when the specified 3x4 transformation matrix meets the given restrictions.
//
inline const Transform3 orthoInverse( const Transform3 & tfrm );
// Conditionally select between two 3x4 transformation matrices
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
// However, the transfer of select1 to a VMX register may use more processing time than a branch.
// Use the boolInVec version for better performance.
//
inline const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, bool select1 );
// Conditionally select between two 3x4 transformation matrices (scalar data contained in vector data type)
// NOTE:
// This function uses a conditional select instruction to avoid a branch.
//
inline const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, boolInVec select1 );
#ifdef _VECTORMATH_DEBUG
// Print a 3x4 transformation matrix
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( const Transform3 & tfrm );
// Print a 3x4 transformation matrix and an associated string identifier
// NOTE:
// Function is only defined when _VECTORMATH_DEBUG is defined.
//
inline void print( const Transform3 & tfrm, const char * name );
#endif
} // namespace Aos
} // namespace Vectormath
#include "vec_aos.h"
#include "quat_aos.h"
#include "mat_aos.h"
#endif
| [
"shagkur@gmx.net"
] | shagkur@gmx.net |
86b9dfeec95d825fa74b939503c7d8c70e456d7b | 3309f27ee7cb46537ce566c373d9ee27ee460858 | /Akshar Singh/0,1_knapsack.cpp | 57173d7ea982b1989d39efa6dec12ea4ee7fe79e | [] | no_license | manisha069/hacktoberfest | 3e0c6d07d12fb3cb9e1728e368b5d18475f1c0a6 | 1faf4e19989604266773738e45ae44012629fd7b | refs/heads/master | 2023-08-28T12:42:06.640114 | 2021-10-19T14:17:14 | 2021-10-19T14:17:14 | 418,954,980 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 625 | cpp | #include<bits/stdc++.h>
using namespace std;
int bwdp(int wt[],int val[],int maxw,int items){
int dp[100][100]={0};
for(int i=0;i<=items;i++){
for(int j=0;j<=maxw;j++){
if(i==0|j==0){
dp[i][j]=0;
}
else{
if(j<wt[i]){
dp[i][j]=dp[i-1][j];
}
else{
dp[i][j] = max(val[i]+dp[i-1][j-wt[i]],dp[i-1][j]);
}
}
}
}
return dp[items][maxw];
}
int main(){
int wt[]={1,3,5,5};
int val[] ={1,4,5,7};
cout<<bwdp(wt,val,7,4);
} | [
"b20147@students.iitmandi.ac.in"
] | b20147@students.iitmandi.ac.in |
1f696edce8c8ea67e98ed6ca726a77e37d28378e | b23a7f3d087d0218d63b6f246a5009cfc91cca03 | /Solvers/Il2CppOutputProject/Source/il2cppOutput/Il2CppCompilerCalculateTypeValues_11Table.cpp | 47dcb69d18880e1022bdf5fd6659867ea0269cbe | [] | no_license | willguest/MRTK-Solvers | 2a77abf34bfc45528678040b2761e1ac4c28dc2a | 29d466d8200db11c65c9084a57d85f243ef879ae | refs/heads/master | 2022-10-15T04:41:55.835153 | 2020-06-09T10:54:31 | 2020-06-09T10:54:31 | 270,976,279 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 237,708 | cpp | #include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include <stdint.h>
#include "il2cpp-class-internals.h"
#include "codegen/il2cpp-codegen.h"
#include "il2cpp-object-internals.h"
// System.Action
struct Action_t591D2A86165F896B4B800BB5C25CE18672A55579;
// System.Byte[]
struct ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821;
// System.Char[]
struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2;
// System.Collections.IDictionary
struct IDictionary_t1BD5C1546718A374EA8122FBD6C6EE45331E8CE7;
// System.Collections.IDictionaryEnumerator
struct IDictionaryEnumerator_t456EB67407D2045A257B66A3A25A825E883FD027;
// System.Diagnostics.StackTrace[]
struct StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196;
// System.Exception
struct Exception_t;
// System.Int32[]
struct Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83;
// System.IntPtr[]
struct IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD;
// System.MarshalByRefObject
struct MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF;
// System.Object[]
struct ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A;
// System.Reflection.MethodBase
struct MethodBase_t;
// System.Reflection.MonoMethod
struct MonoMethod_t;
// System.Runtime.CompilerServices.IAsyncStateMachine
struct IAsyncStateMachine_tEFDFBE18E061A6065AB2FF735F1425FB59F919BC;
// System.Runtime.Remoting.Identity
struct Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6;
// System.Runtime.Remoting.Messaging.ArgInfo
struct ArgInfo_t67419B6DE53980148631C33DF785307579134942;
// System.Runtime.Remoting.Messaging.AsyncResult
struct AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2;
// System.Runtime.Remoting.Messaging.IMessageSink
struct IMessageSink_tB1CED1C3E8A2782C843D48468DB443B7940FC76C;
// System.Runtime.Remoting.Messaging.IMethodCallMessage
struct IMethodCallMessage_t9A3B0B9D1DCB71D44BB799FD5CA1100C4824C386;
// System.Runtime.Remoting.Messaging.IMethodMessage
struct IMethodMessage_tAF63A8DBD140DA0E8F5D8385270F81429CAA6420;
// System.Runtime.Remoting.Messaging.LogicalCallContext
struct LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E;
// System.Runtime.Remoting.Messaging.MCMDictionary
struct MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434;
// System.Runtime.Remoting.Messaging.MessageDictionary
struct MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5;
// System.Runtime.Remoting.Messaging.MethodReturnDictionary
struct MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48;
// System.Runtime.Remoting.Messaging.ObjRefSurrogate
struct ObjRefSurrogate_tE2F801FFAE2DBDE6B44A528F7E537922F3840547;
// System.Runtime.Remoting.Messaging.RemotingSurrogate
struct RemotingSurrogate_t722F41294C1F4DEA38A993DB43F51AC8CBB494BA;
// System.Runtime.Remoting.Proxies.RealProxy
struct RealProxy_t4B0A745F7C99373132CC67FE86D13421411361EF;
// System.Runtime.Remoting.ServerIdentity
struct ServerIdentity_t93C5C5C4D608C5E714F0C5061B9BFC17B3B567D2;
// System.Runtime.Serialization.ISurrogateSelector
struct ISurrogateSelector_t4C99617DAC31689CEC0EDB09B067A65E80E1C3EA;
// System.Runtime.Serialization.SafeSerializationManager
struct SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770;
// System.String
struct String_t;
// System.String[]
struct StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E;
// System.Threading.ContextCallback
struct ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676;
// System.Threading.ExecutionContext
struct ExecutionContext_t0E11C30308A4CC964D8A2EA9132F9BDCE5362C70;
// System.Threading.SendOrPostCallback
struct SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01;
// System.Threading.SynchronizationContext
struct SynchronizationContext_t06AEFE2C7CFCFC242D0A5729A74464AF18CF84E7;
// System.Threading.Tasks.Task
struct Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2;
// System.Threading.Tasks.Task`1<System.Boolean>
struct Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439;
// System.Threading.Tasks.Task`1<System.Int32>[]
struct Task_1U5BU5D_tF1E5C7D356B3C934B63AB0B3384819D681C4FD20;
// System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>
struct Task_1_t1359D75350E9D976BFA28AD96E417450DE277673;
// System.Threading.WaitCallback
struct WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC;
// System.Type
struct Type_t;
// System.Type[]
struct TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F;
// System.UInt32[]
struct UInt32U5BU5D_t9AA834AF2940E75BBF8E3F08FF0D20D266DB71CB;
struct AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2_marshaled_com;
struct AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2_marshaled_pinvoke;
struct Exception_t_marshaled_com;
struct Exception_t_marshaled_pinvoke;
#ifndef RUNTIMEOBJECT_H
#define RUNTIMEOBJECT_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Object
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMEOBJECT_H
#ifndef ATTRIBUTE_TF048C13FB3C8CFCC53F82290E4A3F621089F9A74_H
#define ATTRIBUTE_TF048C13FB3C8CFCC53F82290E4A3F621089F9A74_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Attribute
struct Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ATTRIBUTE_TF048C13FB3C8CFCC53F82290E4A3F621089F9A74_H
#ifndef EVENTARGS_T8E6CA180BE0E56674C6407011A94BAF7C757352E_H
#define EVENTARGS_T8E6CA180BE0E56674C6407011A94BAF7C757352E_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.EventArgs
struct EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E : public RuntimeObject
{
public:
public:
};
struct EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E_StaticFields
{
public:
// System.EventArgs System.EventArgs::Empty
EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E * ___Empty_0;
public:
inline static int32_t get_offset_of_Empty_0() { return static_cast<int32_t>(offsetof(EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E_StaticFields, ___Empty_0)); }
inline EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E * get_Empty_0() const { return ___Empty_0; }
inline EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E ** get_address_of_Empty_0() { return &___Empty_0; }
inline void set_Empty_0(EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E * value)
{
___Empty_0 = value;
Il2CppCodeGenWriteBarrier((&___Empty_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EVENTARGS_T8E6CA180BE0E56674C6407011A94BAF7C757352E_H
#ifndef EXCEPTION_T_H
#define EXCEPTION_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Exception
struct Exception_t : public RuntimeObject
{
public:
// System.String System.Exception::_className
String_t* ____className_1;
// System.String System.Exception::_message
String_t* ____message_2;
// System.Collections.IDictionary System.Exception::_data
RuntimeObject* ____data_3;
// System.Exception System.Exception::_innerException
Exception_t * ____innerException_4;
// System.String System.Exception::_helpURL
String_t* ____helpURL_5;
// System.Object System.Exception::_stackTrace
RuntimeObject * ____stackTrace_6;
// System.String System.Exception::_stackTraceString
String_t* ____stackTraceString_7;
// System.String System.Exception::_remoteStackTraceString
String_t* ____remoteStackTraceString_8;
// System.Int32 System.Exception::_remoteStackIndex
int32_t ____remoteStackIndex_9;
// System.Object System.Exception::_dynamicMethods
RuntimeObject * ____dynamicMethods_10;
// System.Int32 System.Exception::_HResult
int32_t ____HResult_11;
// System.String System.Exception::_source
String_t* ____source_12;
// System.Runtime.Serialization.SafeSerializationManager System.Exception::_safeSerializationManager
SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13;
// System.Diagnostics.StackTrace[] System.Exception::captured_traces
StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14;
// System.IntPtr[] System.Exception::native_trace_ips
IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* ___native_trace_ips_15;
public:
inline static int32_t get_offset_of__className_1() { return static_cast<int32_t>(offsetof(Exception_t, ____className_1)); }
inline String_t* get__className_1() const { return ____className_1; }
inline String_t** get_address_of__className_1() { return &____className_1; }
inline void set__className_1(String_t* value)
{
____className_1 = value;
Il2CppCodeGenWriteBarrier((&____className_1), 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((&____message_2), 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((&____data_3), 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((&____innerException_4), 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((&____helpURL_5), 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((&____stackTrace_6), 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((&____stackTraceString_7), 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((&____remoteStackTraceString_8), 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((&____dynamicMethods_10), 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((&____source_12), value);
}
inline static int32_t get_offset_of__safeSerializationManager_13() { return static_cast<int32_t>(offsetof(Exception_t, ____safeSerializationManager_13)); }
inline SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * get__safeSerializationManager_13() const { return ____safeSerializationManager_13; }
inline SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 ** get_address_of__safeSerializationManager_13() { return &____safeSerializationManager_13; }
inline void set__safeSerializationManager_13(SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * value)
{
____safeSerializationManager_13 = value;
Il2CppCodeGenWriteBarrier((&____safeSerializationManager_13), value);
}
inline static int32_t get_offset_of_captured_traces_14() { return static_cast<int32_t>(offsetof(Exception_t, ___captured_traces_14)); }
inline StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* get_captured_traces_14() const { return ___captured_traces_14; }
inline StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196** get_address_of_captured_traces_14() { return &___captured_traces_14; }
inline void set_captured_traces_14(StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* value)
{
___captured_traces_14 = value;
Il2CppCodeGenWriteBarrier((&___captured_traces_14), value);
}
inline static int32_t get_offset_of_native_trace_ips_15() { return static_cast<int32_t>(offsetof(Exception_t, ___native_trace_ips_15)); }
inline IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* get_native_trace_ips_15() const { return ___native_trace_ips_15; }
inline IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD** get_address_of_native_trace_ips_15() { return &___native_trace_ips_15; }
inline void set_native_trace_ips_15(IntPtrU5BU5D_t4DC01DCB9A6DF6C9792A6513595D7A11E637DCDD* value)
{
___native_trace_ips_15 = value;
Il2CppCodeGenWriteBarrier((&___native_trace_ips_15), 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((&___s_EDILock_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Exception
struct Exception_t_marshaled_pinvoke
{
char* ____className_1;
char* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_pinvoke* ____innerException_4;
char* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
char* ____stackTraceString_7;
char* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
char* ____source_12;
SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13;
StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14;
intptr_t* ___native_trace_ips_15;
};
// Native definition for COM marshalling of System.Exception
struct Exception_t_marshaled_com
{
Il2CppChar* ____className_1;
Il2CppChar* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_com* ____innerException_4;
Il2CppChar* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
Il2CppChar* ____stackTraceString_7;
Il2CppChar* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
Il2CppChar* ____source_12;
SafeSerializationManager_t4A754D86B0F784B18CBC36C073BA564BED109770 * ____safeSerializationManager_13;
StackTraceU5BU5D_t855F09649EA34DEE7C1B6F088E0538E3CCC3F196* ___captured_traces_14;
intptr_t* ___native_trace_ips_15;
};
#endif // EXCEPTION_T_H
#ifndef U3CU3EC_TFBB9560424DFB5E39123CDE092BE03875E657079_H
#define U3CU3EC_TFBB9560424DFB5E39123CDE092BE03875E657079_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c
struct U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079 : public RuntimeObject
{
public:
public:
};
struct U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields
{
public:
// System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c::<>9
U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079 * ___U3CU3E9_0;
// System.Threading.SendOrPostCallback System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c::<>9__6_0
SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 * ___U3CU3E9__6_0_1;
// System.Threading.WaitCallback System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c::<>9__6_1
WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC * ___U3CU3E9__6_1_2;
public:
inline static int32_t get_offset_of_U3CU3E9_0() { return static_cast<int32_t>(offsetof(U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields, ___U3CU3E9_0)); }
inline U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079 * get_U3CU3E9_0() const { return ___U3CU3E9_0; }
inline U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079 ** get_address_of_U3CU3E9_0() { return &___U3CU3E9_0; }
inline void set_U3CU3E9_0(U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079 * value)
{
___U3CU3E9_0 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3E9_0), value);
}
inline static int32_t get_offset_of_U3CU3E9__6_0_1() { return static_cast<int32_t>(offsetof(U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields, ___U3CU3E9__6_0_1)); }
inline SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 * get_U3CU3E9__6_0_1() const { return ___U3CU3E9__6_0_1; }
inline SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 ** get_address_of_U3CU3E9__6_0_1() { return &___U3CU3E9__6_0_1; }
inline void set_U3CU3E9__6_0_1(SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 * value)
{
___U3CU3E9__6_0_1 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3E9__6_0_1), value);
}
inline static int32_t get_offset_of_U3CU3E9__6_1_2() { return static_cast<int32_t>(offsetof(U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields, ___U3CU3E9__6_1_2)); }
inline WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC * get_U3CU3E9__6_1_2() const { return ___U3CU3E9__6_1_2; }
inline WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC ** get_address_of_U3CU3E9__6_1_2() { return &___U3CU3E9__6_1_2; }
inline void set_U3CU3E9__6_1_2(WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC * value)
{
___U3CU3E9__6_1_2 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3E9__6_1_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CU3EC_TFBB9560424DFB5E39123CDE092BE03875E657079_H
#ifndef U3CU3EC__DISPLAYCLASS4_0_T91BE7D82E3148DC17AD2CF3AFA190EE3018F2368_H
#define U3CU3EC__DISPLAYCLASS4_0_T91BE7D82E3148DC17AD2CF3AFA190EE3018F2368_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c__DisplayClass4_0
struct U3CU3Ec__DisplayClass4_0_t91BE7D82E3148DC17AD2CF3AFA190EE3018F2368 : public RuntimeObject
{
public:
// System.Threading.Tasks.Task System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c__DisplayClass4_0::innerTask
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___innerTask_0;
// System.Action System.Runtime.CompilerServices.AsyncMethodBuilderCore_<>c__DisplayClass4_0::continuation
Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * ___continuation_1;
public:
inline static int32_t get_offset_of_innerTask_0() { return static_cast<int32_t>(offsetof(U3CU3Ec__DisplayClass4_0_t91BE7D82E3148DC17AD2CF3AFA190EE3018F2368, ___innerTask_0)); }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * get_innerTask_0() const { return ___innerTask_0; }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 ** get_address_of_innerTask_0() { return &___innerTask_0; }
inline void set_innerTask_0(Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * value)
{
___innerTask_0 = value;
Il2CppCodeGenWriteBarrier((&___innerTask_0), value);
}
inline static int32_t get_offset_of_continuation_1() { return static_cast<int32_t>(offsetof(U3CU3Ec__DisplayClass4_0_t91BE7D82E3148DC17AD2CF3AFA190EE3018F2368, ___continuation_1)); }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * get_continuation_1() const { return ___continuation_1; }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 ** get_address_of_continuation_1() { return &___continuation_1; }
inline void set_continuation_1(Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * value)
{
___continuation_1 = value;
Il2CppCodeGenWriteBarrier((&___continuation_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CU3EC__DISPLAYCLASS4_0_T91BE7D82E3148DC17AD2CF3AFA190EE3018F2368_H
#ifndef CONTINUATIONWRAPPER_TCC429E05B578FB77DAD5970B18B3DD07748DB201_H
#define CONTINUATIONWRAPPER_TCC429E05B578FB77DAD5970B18B3DD07748DB201_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncMethodBuilderCore_ContinuationWrapper
struct ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201 : public RuntimeObject
{
public:
// System.Action System.Runtime.CompilerServices.AsyncMethodBuilderCore_ContinuationWrapper::m_continuation
Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * ___m_continuation_0;
// System.Action System.Runtime.CompilerServices.AsyncMethodBuilderCore_ContinuationWrapper::m_invokeAction
Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * ___m_invokeAction_1;
// System.Threading.Tasks.Task System.Runtime.CompilerServices.AsyncMethodBuilderCore_ContinuationWrapper::m_innerTask
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_innerTask_2;
public:
inline static int32_t get_offset_of_m_continuation_0() { return static_cast<int32_t>(offsetof(ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201, ___m_continuation_0)); }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * get_m_continuation_0() const { return ___m_continuation_0; }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 ** get_address_of_m_continuation_0() { return &___m_continuation_0; }
inline void set_m_continuation_0(Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * value)
{
___m_continuation_0 = value;
Il2CppCodeGenWriteBarrier((&___m_continuation_0), value);
}
inline static int32_t get_offset_of_m_invokeAction_1() { return static_cast<int32_t>(offsetof(ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201, ___m_invokeAction_1)); }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * get_m_invokeAction_1() const { return ___m_invokeAction_1; }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 ** get_address_of_m_invokeAction_1() { return &___m_invokeAction_1; }
inline void set_m_invokeAction_1(Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * value)
{
___m_invokeAction_1 = value;
Il2CppCodeGenWriteBarrier((&___m_invokeAction_1), value);
}
inline static int32_t get_offset_of_m_innerTask_2() { return static_cast<int32_t>(offsetof(ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201, ___m_innerTask_2)); }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * get_m_innerTask_2() const { return ___m_innerTask_2; }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 ** get_address_of_m_innerTask_2() { return &___m_innerTask_2; }
inline void set_m_innerTask_2(Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * value)
{
___m_innerTask_2 = value;
Il2CppCodeGenWriteBarrier((&___m_innerTask_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONTINUATIONWRAPPER_TCC429E05B578FB77DAD5970B18B3DD07748DB201_H
#ifndef MOVENEXTRUNNER_T6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_H
#define MOVENEXTRUNNER_T6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncMethodBuilderCore_MoveNextRunner
struct MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A : public RuntimeObject
{
public:
// System.Threading.ExecutionContext System.Runtime.CompilerServices.AsyncMethodBuilderCore_MoveNextRunner::m_context
ExecutionContext_t0E11C30308A4CC964D8A2EA9132F9BDCE5362C70 * ___m_context_0;
// System.Runtime.CompilerServices.IAsyncStateMachine System.Runtime.CompilerServices.AsyncMethodBuilderCore_MoveNextRunner::m_stateMachine
RuntimeObject* ___m_stateMachine_1;
public:
inline static int32_t get_offset_of_m_context_0() { return static_cast<int32_t>(offsetof(MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A, ___m_context_0)); }
inline ExecutionContext_t0E11C30308A4CC964D8A2EA9132F9BDCE5362C70 * get_m_context_0() const { return ___m_context_0; }
inline ExecutionContext_t0E11C30308A4CC964D8A2EA9132F9BDCE5362C70 ** get_address_of_m_context_0() { return &___m_context_0; }
inline void set_m_context_0(ExecutionContext_t0E11C30308A4CC964D8A2EA9132F9BDCE5362C70 * value)
{
___m_context_0 = value;
Il2CppCodeGenWriteBarrier((&___m_context_0), value);
}
inline static int32_t get_offset_of_m_stateMachine_1() { return static_cast<int32_t>(offsetof(MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A, ___m_stateMachine_1)); }
inline RuntimeObject* get_m_stateMachine_1() const { return ___m_stateMachine_1; }
inline RuntimeObject** get_address_of_m_stateMachine_1() { return &___m_stateMachine_1; }
inline void set_m_stateMachine_1(RuntimeObject* value)
{
___m_stateMachine_1 = value;
Il2CppCodeGenWriteBarrier((&___m_stateMachine_1), value);
}
};
struct MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_StaticFields
{
public:
// System.Threading.ContextCallback System.Runtime.CompilerServices.AsyncMethodBuilderCore_MoveNextRunner::s_invokeMoveNext
ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * ___s_invokeMoveNext_2;
public:
inline static int32_t get_offset_of_s_invokeMoveNext_2() { return static_cast<int32_t>(offsetof(MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_StaticFields, ___s_invokeMoveNext_2)); }
inline ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * get_s_invokeMoveNext_2() const { return ___s_invokeMoveNext_2; }
inline ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 ** get_address_of_s_invokeMoveNext_2() { return &___s_invokeMoveNext_2; }
inline void set_s_invokeMoveNext_2(ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * value)
{
___s_invokeMoveNext_2 = value;
Il2CppCodeGenWriteBarrier((&___s_invokeMoveNext_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MOVENEXTRUNNER_T6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_H
#ifndef ASYNCTASKCACHE_T34A97832FCD6948CE68777740FA37AEAB550E6CF_H
#define ASYNCTASKCACHE_T34A97832FCD6948CE68777740FA37AEAB550E6CF_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncTaskCache
struct AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF : public RuntimeObject
{
public:
public:
};
struct AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields
{
public:
// System.Threading.Tasks.Task`1<System.Boolean> System.Runtime.CompilerServices.AsyncTaskCache::TrueTask
Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 * ___TrueTask_0;
// System.Threading.Tasks.Task`1<System.Boolean> System.Runtime.CompilerServices.AsyncTaskCache::FalseTask
Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 * ___FalseTask_1;
// System.Threading.Tasks.Task`1<System.Int32>[] System.Runtime.CompilerServices.AsyncTaskCache::Int32Tasks
Task_1U5BU5D_tF1E5C7D356B3C934B63AB0B3384819D681C4FD20* ___Int32Tasks_2;
public:
inline static int32_t get_offset_of_TrueTask_0() { return static_cast<int32_t>(offsetof(AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields, ___TrueTask_0)); }
inline Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 * get_TrueTask_0() const { return ___TrueTask_0; }
inline Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 ** get_address_of_TrueTask_0() { return &___TrueTask_0; }
inline void set_TrueTask_0(Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 * value)
{
___TrueTask_0 = value;
Il2CppCodeGenWriteBarrier((&___TrueTask_0), value);
}
inline static int32_t get_offset_of_FalseTask_1() { return static_cast<int32_t>(offsetof(AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields, ___FalseTask_1)); }
inline Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 * get_FalseTask_1() const { return ___FalseTask_1; }
inline Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 ** get_address_of_FalseTask_1() { return &___FalseTask_1; }
inline void set_FalseTask_1(Task_1_tD6131FE3A3A2F1D58DB886B6CF31A2672B75B439 * value)
{
___FalseTask_1 = value;
Il2CppCodeGenWriteBarrier((&___FalseTask_1), value);
}
inline static int32_t get_offset_of_Int32Tasks_2() { return static_cast<int32_t>(offsetof(AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields, ___Int32Tasks_2)); }
inline Task_1U5BU5D_tF1E5C7D356B3C934B63AB0B3384819D681C4FD20* get_Int32Tasks_2() const { return ___Int32Tasks_2; }
inline Task_1U5BU5D_tF1E5C7D356B3C934B63AB0B3384819D681C4FD20** get_address_of_Int32Tasks_2() { return &___Int32Tasks_2; }
inline void set_Int32Tasks_2(Task_1U5BU5D_tF1E5C7D356B3C934B63AB0B3384819D681C4FD20* value)
{
___Int32Tasks_2 = value;
Il2CppCodeGenWriteBarrier((&___Int32Tasks_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYNCTASKCACHE_T34A97832FCD6948CE68777740FA37AEAB550E6CF_H
#ifndef ISVOLATILE_TF1A54712356B3B8EABAFA930B5C9372D27A18AEC_H
#define ISVOLATILE_TF1A54712356B3B8EABAFA930B5C9372D27A18AEC_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.IsVolatile
struct IsVolatile_tF1A54712356B3B8EABAFA930B5C9372D27A18AEC : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ISVOLATILE_TF1A54712356B3B8EABAFA930B5C9372D27A18AEC_H
#ifndef JITHELPERS_T6BCD6CAFCA9C54EDD15CC80B7D7416E8711E8AAB_H
#define JITHELPERS_T6BCD6CAFCA9C54EDD15CC80B7D7416E8711E8AAB_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.JitHelpers
struct JitHelpers_t6BCD6CAFCA9C54EDD15CC80B7D7416E8711E8AAB : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // JITHELPERS_T6BCD6CAFCA9C54EDD15CC80B7D7416E8711E8AAB_H
#ifndef RUNTIMEHELPERS_TB6CD53A56BCACB431A632ACD2709F245DBE3FA2E_H
#define RUNTIMEHELPERS_TB6CD53A56BCACB431A632ACD2709F245DBE3FA2E_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.RuntimeHelpers
struct RuntimeHelpers_tB6CD53A56BCACB431A632ACD2709F245DBE3FA2E : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMEHELPERS_TB6CD53A56BCACB431A632ACD2709F245DBE3FA2E_H
#ifndef CRITICALFINALIZEROBJECT_T8B006E1DEE084E781F5C0F3283E9226E28894DD9_H
#define CRITICALFINALIZEROBJECT_T8B006E1DEE084E781F5C0F3283E9226E28894DD9_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ConstrainedExecution.CriticalFinalizerObject
struct CriticalFinalizerObject_t8B006E1DEE084E781F5C0F3283E9226E28894DD9 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CRITICALFINALIZEROBJECT_T8B006E1DEE084E781F5C0F3283E9226E28894DD9_H
#ifndef EXCEPTIONDISPATCHINFO_T0C54083F3909DAF986A4DEAA7C047559531E0E2A_H
#define EXCEPTIONDISPATCHINFO_T0C54083F3909DAF986A4DEAA7C047559531E0E2A_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ExceptionServices.ExceptionDispatchInfo
struct ExceptionDispatchInfo_t0C54083F3909DAF986A4DEAA7C047559531E0E2A : public RuntimeObject
{
public:
// System.Exception System.Runtime.ExceptionServices.ExceptionDispatchInfo::m_Exception
Exception_t * ___m_Exception_0;
// System.Object System.Runtime.ExceptionServices.ExceptionDispatchInfo::m_stackTrace
RuntimeObject * ___m_stackTrace_1;
public:
inline static int32_t get_offset_of_m_Exception_0() { return static_cast<int32_t>(offsetof(ExceptionDispatchInfo_t0C54083F3909DAF986A4DEAA7C047559531E0E2A, ___m_Exception_0)); }
inline Exception_t * get_m_Exception_0() const { return ___m_Exception_0; }
inline Exception_t ** get_address_of_m_Exception_0() { return &___m_Exception_0; }
inline void set_m_Exception_0(Exception_t * value)
{
___m_Exception_0 = value;
Il2CppCodeGenWriteBarrier((&___m_Exception_0), value);
}
inline static int32_t get_offset_of_m_stackTrace_1() { return static_cast<int32_t>(offsetof(ExceptionDispatchInfo_t0C54083F3909DAF986A4DEAA7C047559531E0E2A, ___m_stackTrace_1)); }
inline RuntimeObject * get_m_stackTrace_1() const { return ___m_stackTrace_1; }
inline RuntimeObject ** get_address_of_m_stackTrace_1() { return &___m_stackTrace_1; }
inline void set_m_stackTrace_1(RuntimeObject * value)
{
___m_stackTrace_1 = value;
Il2CppCodeGenWriteBarrier((&___m_stackTrace_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXCEPTIONDISPATCHINFO_T0C54083F3909DAF986A4DEAA7C047559531E0E2A_H
#ifndef MESSAGEDICTIONARY_TC2DDCAFD65B74954A76393BCE90E57F58298F5C5_H
#define MESSAGEDICTIONARY_TC2DDCAFD65B74954A76393BCE90E57F58298F5C5_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.MessageDictionary
struct MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5 : public RuntimeObject
{
public:
// System.Collections.IDictionary System.Runtime.Remoting.Messaging.MessageDictionary::_internalProperties
RuntimeObject* ____internalProperties_0;
// System.Runtime.Remoting.Messaging.IMethodMessage System.Runtime.Remoting.Messaging.MessageDictionary::_message
RuntimeObject* ____message_1;
// System.String[] System.Runtime.Remoting.Messaging.MessageDictionary::_methodKeys
StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ____methodKeys_2;
// System.Boolean System.Runtime.Remoting.Messaging.MessageDictionary::_ownProperties
bool ____ownProperties_3;
public:
inline static int32_t get_offset_of__internalProperties_0() { return static_cast<int32_t>(offsetof(MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5, ____internalProperties_0)); }
inline RuntimeObject* get__internalProperties_0() const { return ____internalProperties_0; }
inline RuntimeObject** get_address_of__internalProperties_0() { return &____internalProperties_0; }
inline void set__internalProperties_0(RuntimeObject* value)
{
____internalProperties_0 = value;
Il2CppCodeGenWriteBarrier((&____internalProperties_0), value);
}
inline static int32_t get_offset_of__message_1() { return static_cast<int32_t>(offsetof(MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5, ____message_1)); }
inline RuntimeObject* get__message_1() const { return ____message_1; }
inline RuntimeObject** get_address_of__message_1() { return &____message_1; }
inline void set__message_1(RuntimeObject* value)
{
____message_1 = value;
Il2CppCodeGenWriteBarrier((&____message_1), value);
}
inline static int32_t get_offset_of__methodKeys_2() { return static_cast<int32_t>(offsetof(MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5, ____methodKeys_2)); }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get__methodKeys_2() const { return ____methodKeys_2; }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of__methodKeys_2() { return &____methodKeys_2; }
inline void set__methodKeys_2(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value)
{
____methodKeys_2 = value;
Il2CppCodeGenWriteBarrier((&____methodKeys_2), value);
}
inline static int32_t get_offset_of__ownProperties_3() { return static_cast<int32_t>(offsetof(MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5, ____ownProperties_3)); }
inline bool get__ownProperties_3() const { return ____ownProperties_3; }
inline bool* get_address_of__ownProperties_3() { return &____ownProperties_3; }
inline void set__ownProperties_3(bool value)
{
____ownProperties_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MESSAGEDICTIONARY_TC2DDCAFD65B74954A76393BCE90E57F58298F5C5_H
#ifndef DICTIONARYENUMERATOR_TA162086B57068DE62A7BAD2CAA7003E632DE2AB9_H
#define DICTIONARYENUMERATOR_TA162086B57068DE62A7BAD2CAA7003E632DE2AB9_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.MessageDictionary_DictionaryEnumerator
struct DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9 : public RuntimeObject
{
public:
// System.Runtime.Remoting.Messaging.MessageDictionary System.Runtime.Remoting.Messaging.MessageDictionary_DictionaryEnumerator::_methodDictionary
MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5 * ____methodDictionary_0;
// System.Collections.IDictionaryEnumerator System.Runtime.Remoting.Messaging.MessageDictionary_DictionaryEnumerator::_hashtableEnum
RuntimeObject* ____hashtableEnum_1;
// System.Int32 System.Runtime.Remoting.Messaging.MessageDictionary_DictionaryEnumerator::_posMethod
int32_t ____posMethod_2;
public:
inline static int32_t get_offset_of__methodDictionary_0() { return static_cast<int32_t>(offsetof(DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9, ____methodDictionary_0)); }
inline MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5 * get__methodDictionary_0() const { return ____methodDictionary_0; }
inline MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5 ** get_address_of__methodDictionary_0() { return &____methodDictionary_0; }
inline void set__methodDictionary_0(MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5 * value)
{
____methodDictionary_0 = value;
Il2CppCodeGenWriteBarrier((&____methodDictionary_0), value);
}
inline static int32_t get_offset_of__hashtableEnum_1() { return static_cast<int32_t>(offsetof(DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9, ____hashtableEnum_1)); }
inline RuntimeObject* get__hashtableEnum_1() const { return ____hashtableEnum_1; }
inline RuntimeObject** get_address_of__hashtableEnum_1() { return &____hashtableEnum_1; }
inline void set__hashtableEnum_1(RuntimeObject* value)
{
____hashtableEnum_1 = value;
Il2CppCodeGenWriteBarrier((&____hashtableEnum_1), value);
}
inline static int32_t get_offset_of__posMethod_2() { return static_cast<int32_t>(offsetof(DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9, ____posMethod_2)); }
inline int32_t get__posMethod_2() const { return ____posMethod_2; }
inline int32_t* get_address_of__posMethod_2() { return &____posMethod_2; }
inline void set__posMethod_2(int32_t value)
{
____posMethod_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DICTIONARYENUMERATOR_TA162086B57068DE62A7BAD2CAA7003E632DE2AB9_H
#ifndef METHODCALL_TF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA_H
#define METHODCALL_TF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.MethodCall
struct MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA : public RuntimeObject
{
public:
// System.String System.Runtime.Remoting.Messaging.MethodCall::_uri
String_t* ____uri_0;
// System.String System.Runtime.Remoting.Messaging.MethodCall::_typeName
String_t* ____typeName_1;
// System.String System.Runtime.Remoting.Messaging.MethodCall::_methodName
String_t* ____methodName_2;
// System.Object[] System.Runtime.Remoting.Messaging.MethodCall::_args
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ____args_3;
// System.Type[] System.Runtime.Remoting.Messaging.MethodCall::_methodSignature
TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ____methodSignature_4;
// System.Reflection.MethodBase System.Runtime.Remoting.Messaging.MethodCall::_methodBase
MethodBase_t * ____methodBase_5;
// System.Runtime.Remoting.Messaging.LogicalCallContext System.Runtime.Remoting.Messaging.MethodCall::_callContext
LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * ____callContext_6;
// System.Runtime.Remoting.Identity System.Runtime.Remoting.Messaging.MethodCall::_targetIdentity
Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * ____targetIdentity_7;
// System.Type[] System.Runtime.Remoting.Messaging.MethodCall::_genericArguments
TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ____genericArguments_8;
// System.Collections.IDictionary System.Runtime.Remoting.Messaging.MethodCall::ExternalProperties
RuntimeObject* ___ExternalProperties_9;
// System.Collections.IDictionary System.Runtime.Remoting.Messaging.MethodCall::InternalProperties
RuntimeObject* ___InternalProperties_10;
public:
inline static int32_t get_offset_of__uri_0() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____uri_0)); }
inline String_t* get__uri_0() const { return ____uri_0; }
inline String_t** get_address_of__uri_0() { return &____uri_0; }
inline void set__uri_0(String_t* value)
{
____uri_0 = value;
Il2CppCodeGenWriteBarrier((&____uri_0), value);
}
inline static int32_t get_offset_of__typeName_1() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____typeName_1)); }
inline String_t* get__typeName_1() const { return ____typeName_1; }
inline String_t** get_address_of__typeName_1() { return &____typeName_1; }
inline void set__typeName_1(String_t* value)
{
____typeName_1 = value;
Il2CppCodeGenWriteBarrier((&____typeName_1), value);
}
inline static int32_t get_offset_of__methodName_2() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____methodName_2)); }
inline String_t* get__methodName_2() const { return ____methodName_2; }
inline String_t** get_address_of__methodName_2() { return &____methodName_2; }
inline void set__methodName_2(String_t* value)
{
____methodName_2 = value;
Il2CppCodeGenWriteBarrier((&____methodName_2), value);
}
inline static int32_t get_offset_of__args_3() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____args_3)); }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* get__args_3() const { return ____args_3; }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A** get_address_of__args_3() { return &____args_3; }
inline void set__args_3(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* value)
{
____args_3 = value;
Il2CppCodeGenWriteBarrier((&____args_3), value);
}
inline static int32_t get_offset_of__methodSignature_4() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____methodSignature_4)); }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get__methodSignature_4() const { return ____methodSignature_4; }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of__methodSignature_4() { return &____methodSignature_4; }
inline void set__methodSignature_4(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value)
{
____methodSignature_4 = value;
Il2CppCodeGenWriteBarrier((&____methodSignature_4), value);
}
inline static int32_t get_offset_of__methodBase_5() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____methodBase_5)); }
inline MethodBase_t * get__methodBase_5() const { return ____methodBase_5; }
inline MethodBase_t ** get_address_of__methodBase_5() { return &____methodBase_5; }
inline void set__methodBase_5(MethodBase_t * value)
{
____methodBase_5 = value;
Il2CppCodeGenWriteBarrier((&____methodBase_5), value);
}
inline static int32_t get_offset_of__callContext_6() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____callContext_6)); }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * get__callContext_6() const { return ____callContext_6; }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E ** get_address_of__callContext_6() { return &____callContext_6; }
inline void set__callContext_6(LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * value)
{
____callContext_6 = value;
Il2CppCodeGenWriteBarrier((&____callContext_6), value);
}
inline static int32_t get_offset_of__targetIdentity_7() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____targetIdentity_7)); }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * get__targetIdentity_7() const { return ____targetIdentity_7; }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 ** get_address_of__targetIdentity_7() { return &____targetIdentity_7; }
inline void set__targetIdentity_7(Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * value)
{
____targetIdentity_7 = value;
Il2CppCodeGenWriteBarrier((&____targetIdentity_7), value);
}
inline static int32_t get_offset_of__genericArguments_8() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ____genericArguments_8)); }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get__genericArguments_8() const { return ____genericArguments_8; }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of__genericArguments_8() { return &____genericArguments_8; }
inline void set__genericArguments_8(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value)
{
____genericArguments_8 = value;
Il2CppCodeGenWriteBarrier((&____genericArguments_8), value);
}
inline static int32_t get_offset_of_ExternalProperties_9() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ___ExternalProperties_9)); }
inline RuntimeObject* get_ExternalProperties_9() const { return ___ExternalProperties_9; }
inline RuntimeObject** get_address_of_ExternalProperties_9() { return &___ExternalProperties_9; }
inline void set_ExternalProperties_9(RuntimeObject* value)
{
___ExternalProperties_9 = value;
Il2CppCodeGenWriteBarrier((&___ExternalProperties_9), value);
}
inline static int32_t get_offset_of_InternalProperties_10() { return static_cast<int32_t>(offsetof(MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA, ___InternalProperties_10)); }
inline RuntimeObject* get_InternalProperties_10() const { return ___InternalProperties_10; }
inline RuntimeObject** get_address_of_InternalProperties_10() { return &___InternalProperties_10; }
inline void set_InternalProperties_10(RuntimeObject* value)
{
___InternalProperties_10 = value;
Il2CppCodeGenWriteBarrier((&___InternalProperties_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // METHODCALL_TF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA_H
#ifndef METHODRESPONSE_T185820C6B3E7D56E9026084CB2CEF1387151D907_H
#define METHODRESPONSE_T185820C6B3E7D56E9026084CB2CEF1387151D907_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.MethodResponse
struct MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907 : public RuntimeObject
{
public:
// System.String System.Runtime.Remoting.Messaging.MethodResponse::_methodName
String_t* ____methodName_0;
// System.String System.Runtime.Remoting.Messaging.MethodResponse::_uri
String_t* ____uri_1;
// System.String System.Runtime.Remoting.Messaging.MethodResponse::_typeName
String_t* ____typeName_2;
// System.Reflection.MethodBase System.Runtime.Remoting.Messaging.MethodResponse::_methodBase
MethodBase_t * ____methodBase_3;
// System.Object System.Runtime.Remoting.Messaging.MethodResponse::_returnValue
RuntimeObject * ____returnValue_4;
// System.Exception System.Runtime.Remoting.Messaging.MethodResponse::_exception
Exception_t * ____exception_5;
// System.Type[] System.Runtime.Remoting.Messaging.MethodResponse::_methodSignature
TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ____methodSignature_6;
// System.Runtime.Remoting.Messaging.ArgInfo System.Runtime.Remoting.Messaging.MethodResponse::_inArgInfo
ArgInfo_t67419B6DE53980148631C33DF785307579134942 * ____inArgInfo_7;
// System.Object[] System.Runtime.Remoting.Messaging.MethodResponse::_args
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ____args_8;
// System.Object[] System.Runtime.Remoting.Messaging.MethodResponse::_outArgs
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ____outArgs_9;
// System.Runtime.Remoting.Messaging.IMethodCallMessage System.Runtime.Remoting.Messaging.MethodResponse::_callMsg
RuntimeObject* ____callMsg_10;
// System.Runtime.Remoting.Messaging.LogicalCallContext System.Runtime.Remoting.Messaging.MethodResponse::_callContext
LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * ____callContext_11;
// System.Runtime.Remoting.Identity System.Runtime.Remoting.Messaging.MethodResponse::_targetIdentity
Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * ____targetIdentity_12;
// System.Collections.IDictionary System.Runtime.Remoting.Messaging.MethodResponse::ExternalProperties
RuntimeObject* ___ExternalProperties_13;
// System.Collections.IDictionary System.Runtime.Remoting.Messaging.MethodResponse::InternalProperties
RuntimeObject* ___InternalProperties_14;
public:
inline static int32_t get_offset_of__methodName_0() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____methodName_0)); }
inline String_t* get__methodName_0() const { return ____methodName_0; }
inline String_t** get_address_of__methodName_0() { return &____methodName_0; }
inline void set__methodName_0(String_t* value)
{
____methodName_0 = value;
Il2CppCodeGenWriteBarrier((&____methodName_0), value);
}
inline static int32_t get_offset_of__uri_1() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____uri_1)); }
inline String_t* get__uri_1() const { return ____uri_1; }
inline String_t** get_address_of__uri_1() { return &____uri_1; }
inline void set__uri_1(String_t* value)
{
____uri_1 = value;
Il2CppCodeGenWriteBarrier((&____uri_1), value);
}
inline static int32_t get_offset_of__typeName_2() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____typeName_2)); }
inline String_t* get__typeName_2() const { return ____typeName_2; }
inline String_t** get_address_of__typeName_2() { return &____typeName_2; }
inline void set__typeName_2(String_t* value)
{
____typeName_2 = value;
Il2CppCodeGenWriteBarrier((&____typeName_2), value);
}
inline static int32_t get_offset_of__methodBase_3() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____methodBase_3)); }
inline MethodBase_t * get__methodBase_3() const { return ____methodBase_3; }
inline MethodBase_t ** get_address_of__methodBase_3() { return &____methodBase_3; }
inline void set__methodBase_3(MethodBase_t * value)
{
____methodBase_3 = value;
Il2CppCodeGenWriteBarrier((&____methodBase_3), value);
}
inline static int32_t get_offset_of__returnValue_4() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____returnValue_4)); }
inline RuntimeObject * get__returnValue_4() const { return ____returnValue_4; }
inline RuntimeObject ** get_address_of__returnValue_4() { return &____returnValue_4; }
inline void set__returnValue_4(RuntimeObject * value)
{
____returnValue_4 = value;
Il2CppCodeGenWriteBarrier((&____returnValue_4), value);
}
inline static int32_t get_offset_of__exception_5() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____exception_5)); }
inline Exception_t * get__exception_5() const { return ____exception_5; }
inline Exception_t ** get_address_of__exception_5() { return &____exception_5; }
inline void set__exception_5(Exception_t * value)
{
____exception_5 = value;
Il2CppCodeGenWriteBarrier((&____exception_5), value);
}
inline static int32_t get_offset_of__methodSignature_6() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____methodSignature_6)); }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get__methodSignature_6() const { return ____methodSignature_6; }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of__methodSignature_6() { return &____methodSignature_6; }
inline void set__methodSignature_6(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value)
{
____methodSignature_6 = value;
Il2CppCodeGenWriteBarrier((&____methodSignature_6), value);
}
inline static int32_t get_offset_of__inArgInfo_7() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____inArgInfo_7)); }
inline ArgInfo_t67419B6DE53980148631C33DF785307579134942 * get__inArgInfo_7() const { return ____inArgInfo_7; }
inline ArgInfo_t67419B6DE53980148631C33DF785307579134942 ** get_address_of__inArgInfo_7() { return &____inArgInfo_7; }
inline void set__inArgInfo_7(ArgInfo_t67419B6DE53980148631C33DF785307579134942 * value)
{
____inArgInfo_7 = value;
Il2CppCodeGenWriteBarrier((&____inArgInfo_7), value);
}
inline static int32_t get_offset_of__args_8() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____args_8)); }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* get__args_8() const { return ____args_8; }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A** get_address_of__args_8() { return &____args_8; }
inline void set__args_8(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* value)
{
____args_8 = value;
Il2CppCodeGenWriteBarrier((&____args_8), value);
}
inline static int32_t get_offset_of__outArgs_9() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____outArgs_9)); }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* get__outArgs_9() const { return ____outArgs_9; }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A** get_address_of__outArgs_9() { return &____outArgs_9; }
inline void set__outArgs_9(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* value)
{
____outArgs_9 = value;
Il2CppCodeGenWriteBarrier((&____outArgs_9), value);
}
inline static int32_t get_offset_of__callMsg_10() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____callMsg_10)); }
inline RuntimeObject* get__callMsg_10() const { return ____callMsg_10; }
inline RuntimeObject** get_address_of__callMsg_10() { return &____callMsg_10; }
inline void set__callMsg_10(RuntimeObject* value)
{
____callMsg_10 = value;
Il2CppCodeGenWriteBarrier((&____callMsg_10), value);
}
inline static int32_t get_offset_of__callContext_11() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____callContext_11)); }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * get__callContext_11() const { return ____callContext_11; }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E ** get_address_of__callContext_11() { return &____callContext_11; }
inline void set__callContext_11(LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * value)
{
____callContext_11 = value;
Il2CppCodeGenWriteBarrier((&____callContext_11), value);
}
inline static int32_t get_offset_of__targetIdentity_12() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ____targetIdentity_12)); }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * get__targetIdentity_12() const { return ____targetIdentity_12; }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 ** get_address_of__targetIdentity_12() { return &____targetIdentity_12; }
inline void set__targetIdentity_12(Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * value)
{
____targetIdentity_12 = value;
Il2CppCodeGenWriteBarrier((&____targetIdentity_12), value);
}
inline static int32_t get_offset_of_ExternalProperties_13() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ___ExternalProperties_13)); }
inline RuntimeObject* get_ExternalProperties_13() const { return ___ExternalProperties_13; }
inline RuntimeObject** get_address_of_ExternalProperties_13() { return &___ExternalProperties_13; }
inline void set_ExternalProperties_13(RuntimeObject* value)
{
___ExternalProperties_13 = value;
Il2CppCodeGenWriteBarrier((&___ExternalProperties_13), value);
}
inline static int32_t get_offset_of_InternalProperties_14() { return static_cast<int32_t>(offsetof(MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907, ___InternalProperties_14)); }
inline RuntimeObject* get_InternalProperties_14() const { return ___InternalProperties_14; }
inline RuntimeObject** get_address_of_InternalProperties_14() { return &___InternalProperties_14; }
inline void set_InternalProperties_14(RuntimeObject* value)
{
___InternalProperties_14 = value;
Il2CppCodeGenWriteBarrier((&___InternalProperties_14), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // METHODRESPONSE_T185820C6B3E7D56E9026084CB2CEF1387151D907_H
#ifndef OBJREFSURROGATE_TE2F801FFAE2DBDE6B44A528F7E537922F3840547_H
#define OBJREFSURROGATE_TE2F801FFAE2DBDE6B44A528F7E537922F3840547_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.ObjRefSurrogate
struct ObjRefSurrogate_tE2F801FFAE2DBDE6B44A528F7E537922F3840547 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // OBJREFSURROGATE_TE2F801FFAE2DBDE6B44A528F7E537922F3840547_H
#ifndef REMOTINGSURROGATE_T722F41294C1F4DEA38A993DB43F51AC8CBB494BA_H
#define REMOTINGSURROGATE_T722F41294C1F4DEA38A993DB43F51AC8CBB494BA_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.RemotingSurrogate
struct RemotingSurrogate_t722F41294C1F4DEA38A993DB43F51AC8CBB494BA : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // REMOTINGSURROGATE_T722F41294C1F4DEA38A993DB43F51AC8CBB494BA_H
#ifndef REMOTINGSURROGATESELECTOR_TEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_H
#define REMOTINGSURROGATESELECTOR_TEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
struct RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44 : public RuntimeObject
{
public:
// System.Runtime.Serialization.ISurrogateSelector System.Runtime.Remoting.Messaging.RemotingSurrogateSelector::_next
RuntimeObject* ____next_3;
public:
inline static int32_t get_offset_of__next_3() { return static_cast<int32_t>(offsetof(RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44, ____next_3)); }
inline RuntimeObject* get__next_3() const { return ____next_3; }
inline RuntimeObject** get_address_of__next_3() { return &____next_3; }
inline void set__next_3(RuntimeObject* value)
{
____next_3 = value;
Il2CppCodeGenWriteBarrier((&____next_3), value);
}
};
struct RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields
{
public:
// System.Type System.Runtime.Remoting.Messaging.RemotingSurrogateSelector::s_cachedTypeObjRef
Type_t * ___s_cachedTypeObjRef_0;
// System.Runtime.Remoting.Messaging.ObjRefSurrogate System.Runtime.Remoting.Messaging.RemotingSurrogateSelector::_objRefSurrogate
ObjRefSurrogate_tE2F801FFAE2DBDE6B44A528F7E537922F3840547 * ____objRefSurrogate_1;
// System.Runtime.Remoting.Messaging.RemotingSurrogate System.Runtime.Remoting.Messaging.RemotingSurrogateSelector::_objRemotingSurrogate
RemotingSurrogate_t722F41294C1F4DEA38A993DB43F51AC8CBB494BA * ____objRemotingSurrogate_2;
public:
inline static int32_t get_offset_of_s_cachedTypeObjRef_0() { return static_cast<int32_t>(offsetof(RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields, ___s_cachedTypeObjRef_0)); }
inline Type_t * get_s_cachedTypeObjRef_0() const { return ___s_cachedTypeObjRef_0; }
inline Type_t ** get_address_of_s_cachedTypeObjRef_0() { return &___s_cachedTypeObjRef_0; }
inline void set_s_cachedTypeObjRef_0(Type_t * value)
{
___s_cachedTypeObjRef_0 = value;
Il2CppCodeGenWriteBarrier((&___s_cachedTypeObjRef_0), value);
}
inline static int32_t get_offset_of__objRefSurrogate_1() { return static_cast<int32_t>(offsetof(RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields, ____objRefSurrogate_1)); }
inline ObjRefSurrogate_tE2F801FFAE2DBDE6B44A528F7E537922F3840547 * get__objRefSurrogate_1() const { return ____objRefSurrogate_1; }
inline ObjRefSurrogate_tE2F801FFAE2DBDE6B44A528F7E537922F3840547 ** get_address_of__objRefSurrogate_1() { return &____objRefSurrogate_1; }
inline void set__objRefSurrogate_1(ObjRefSurrogate_tE2F801FFAE2DBDE6B44A528F7E537922F3840547 * value)
{
____objRefSurrogate_1 = value;
Il2CppCodeGenWriteBarrier((&____objRefSurrogate_1), value);
}
inline static int32_t get_offset_of__objRemotingSurrogate_2() { return static_cast<int32_t>(offsetof(RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields, ____objRemotingSurrogate_2)); }
inline RemotingSurrogate_t722F41294C1F4DEA38A993DB43F51AC8CBB494BA * get__objRemotingSurrogate_2() const { return ____objRemotingSurrogate_2; }
inline RemotingSurrogate_t722F41294C1F4DEA38A993DB43F51AC8CBB494BA ** get_address_of__objRemotingSurrogate_2() { return &____objRemotingSurrogate_2; }
inline void set__objRemotingSurrogate_2(RemotingSurrogate_t722F41294C1F4DEA38A993DB43F51AC8CBB494BA * value)
{
____objRemotingSurrogate_2 = value;
Il2CppCodeGenWriteBarrier((&____objRemotingSurrogate_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // REMOTINGSURROGATESELECTOR_TEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_H
#ifndef RETURNMESSAGE_TCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03_H
#define RETURNMESSAGE_TCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.ReturnMessage
struct ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03 : public RuntimeObject
{
public:
// System.Object[] System.Runtime.Remoting.Messaging.ReturnMessage::_outArgs
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ____outArgs_0;
// System.Object[] System.Runtime.Remoting.Messaging.ReturnMessage::_args
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ____args_1;
// System.Runtime.Remoting.Messaging.LogicalCallContext System.Runtime.Remoting.Messaging.ReturnMessage::_callCtx
LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * ____callCtx_2;
// System.Object System.Runtime.Remoting.Messaging.ReturnMessage::_returnValue
RuntimeObject * ____returnValue_3;
// System.String System.Runtime.Remoting.Messaging.ReturnMessage::_uri
String_t* ____uri_4;
// System.Exception System.Runtime.Remoting.Messaging.ReturnMessage::_exception
Exception_t * ____exception_5;
// System.Reflection.MethodBase System.Runtime.Remoting.Messaging.ReturnMessage::_methodBase
MethodBase_t * ____methodBase_6;
// System.String System.Runtime.Remoting.Messaging.ReturnMessage::_methodName
String_t* ____methodName_7;
// System.Type[] System.Runtime.Remoting.Messaging.ReturnMessage::_methodSignature
TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ____methodSignature_8;
// System.String System.Runtime.Remoting.Messaging.ReturnMessage::_typeName
String_t* ____typeName_9;
// System.Runtime.Remoting.Messaging.MethodReturnDictionary System.Runtime.Remoting.Messaging.ReturnMessage::_properties
MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48 * ____properties_10;
// System.Runtime.Remoting.Identity System.Runtime.Remoting.Messaging.ReturnMessage::_targetIdentity
Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * ____targetIdentity_11;
// System.Runtime.Remoting.Messaging.ArgInfo System.Runtime.Remoting.Messaging.ReturnMessage::_inArgInfo
ArgInfo_t67419B6DE53980148631C33DF785307579134942 * ____inArgInfo_12;
public:
inline static int32_t get_offset_of__outArgs_0() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____outArgs_0)); }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* get__outArgs_0() const { return ____outArgs_0; }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A** get_address_of__outArgs_0() { return &____outArgs_0; }
inline void set__outArgs_0(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* value)
{
____outArgs_0 = value;
Il2CppCodeGenWriteBarrier((&____outArgs_0), value);
}
inline static int32_t get_offset_of__args_1() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____args_1)); }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* get__args_1() const { return ____args_1; }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A** get_address_of__args_1() { return &____args_1; }
inline void set__args_1(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* value)
{
____args_1 = value;
Il2CppCodeGenWriteBarrier((&____args_1), value);
}
inline static int32_t get_offset_of__callCtx_2() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____callCtx_2)); }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * get__callCtx_2() const { return ____callCtx_2; }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E ** get_address_of__callCtx_2() { return &____callCtx_2; }
inline void set__callCtx_2(LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * value)
{
____callCtx_2 = value;
Il2CppCodeGenWriteBarrier((&____callCtx_2), value);
}
inline static int32_t get_offset_of__returnValue_3() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____returnValue_3)); }
inline RuntimeObject * get__returnValue_3() const { return ____returnValue_3; }
inline RuntimeObject ** get_address_of__returnValue_3() { return &____returnValue_3; }
inline void set__returnValue_3(RuntimeObject * value)
{
____returnValue_3 = value;
Il2CppCodeGenWriteBarrier((&____returnValue_3), value);
}
inline static int32_t get_offset_of__uri_4() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____uri_4)); }
inline String_t* get__uri_4() const { return ____uri_4; }
inline String_t** get_address_of__uri_4() { return &____uri_4; }
inline void set__uri_4(String_t* value)
{
____uri_4 = value;
Il2CppCodeGenWriteBarrier((&____uri_4), value);
}
inline static int32_t get_offset_of__exception_5() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____exception_5)); }
inline Exception_t * get__exception_5() const { return ____exception_5; }
inline Exception_t ** get_address_of__exception_5() { return &____exception_5; }
inline void set__exception_5(Exception_t * value)
{
____exception_5 = value;
Il2CppCodeGenWriteBarrier((&____exception_5), value);
}
inline static int32_t get_offset_of__methodBase_6() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____methodBase_6)); }
inline MethodBase_t * get__methodBase_6() const { return ____methodBase_6; }
inline MethodBase_t ** get_address_of__methodBase_6() { return &____methodBase_6; }
inline void set__methodBase_6(MethodBase_t * value)
{
____methodBase_6 = value;
Il2CppCodeGenWriteBarrier((&____methodBase_6), value);
}
inline static int32_t get_offset_of__methodName_7() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____methodName_7)); }
inline String_t* get__methodName_7() const { return ____methodName_7; }
inline String_t** get_address_of__methodName_7() { return &____methodName_7; }
inline void set__methodName_7(String_t* value)
{
____methodName_7 = value;
Il2CppCodeGenWriteBarrier((&____methodName_7), value);
}
inline static int32_t get_offset_of__methodSignature_8() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____methodSignature_8)); }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get__methodSignature_8() const { return ____methodSignature_8; }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of__methodSignature_8() { return &____methodSignature_8; }
inline void set__methodSignature_8(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value)
{
____methodSignature_8 = value;
Il2CppCodeGenWriteBarrier((&____methodSignature_8), value);
}
inline static int32_t get_offset_of__typeName_9() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____typeName_9)); }
inline String_t* get__typeName_9() const { return ____typeName_9; }
inline String_t** get_address_of__typeName_9() { return &____typeName_9; }
inline void set__typeName_9(String_t* value)
{
____typeName_9 = value;
Il2CppCodeGenWriteBarrier((&____typeName_9), value);
}
inline static int32_t get_offset_of__properties_10() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____properties_10)); }
inline MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48 * get__properties_10() const { return ____properties_10; }
inline MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48 ** get_address_of__properties_10() { return &____properties_10; }
inline void set__properties_10(MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48 * value)
{
____properties_10 = value;
Il2CppCodeGenWriteBarrier((&____properties_10), value);
}
inline static int32_t get_offset_of__targetIdentity_11() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____targetIdentity_11)); }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * get__targetIdentity_11() const { return ____targetIdentity_11; }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 ** get_address_of__targetIdentity_11() { return &____targetIdentity_11; }
inline void set__targetIdentity_11(Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * value)
{
____targetIdentity_11 = value;
Il2CppCodeGenWriteBarrier((&____targetIdentity_11), value);
}
inline static int32_t get_offset_of__inArgInfo_12() { return static_cast<int32_t>(offsetof(ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03, ____inArgInfo_12)); }
inline ArgInfo_t67419B6DE53980148631C33DF785307579134942 * get__inArgInfo_12() const { return ____inArgInfo_12; }
inline ArgInfo_t67419B6DE53980148631C33DF785307579134942 ** get_address_of__inArgInfo_12() { return &____inArgInfo_12; }
inline void set__inArgInfo_12(ArgInfo_t67419B6DE53980148631C33DF785307579134942 * value)
{
____inArgInfo_12 = value;
Il2CppCodeGenWriteBarrier((&____inArgInfo_12), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RETURNMESSAGE_TCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03_H
#ifndef SERVERCONTEXTTERMINATORSINK_T11FA44A0CACACA4A89B73434FB6D685479C6B8E0_H
#define SERVERCONTEXTTERMINATORSINK_T11FA44A0CACACA4A89B73434FB6D685479C6B8E0_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.ServerContextTerminatorSink
struct ServerContextTerminatorSink_t11FA44A0CACACA4A89B73434FB6D685479C6B8E0 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SERVERCONTEXTTERMINATORSINK_T11FA44A0CACACA4A89B73434FB6D685479C6B8E0_H
#ifndef SERVEROBJECTREPLYSINK_TE1CEF247A2AC5DFD53842706CFE097CE9556CCB8_H
#define SERVEROBJECTREPLYSINK_TE1CEF247A2AC5DFD53842706CFE097CE9556CCB8_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.ServerObjectReplySink
struct ServerObjectReplySink_tE1CEF247A2AC5DFD53842706CFE097CE9556CCB8 : public RuntimeObject
{
public:
// System.Runtime.Remoting.Messaging.IMessageSink System.Runtime.Remoting.Messaging.ServerObjectReplySink::_replySink
RuntimeObject* ____replySink_0;
// System.Runtime.Remoting.ServerIdentity System.Runtime.Remoting.Messaging.ServerObjectReplySink::_identity
ServerIdentity_t93C5C5C4D608C5E714F0C5061B9BFC17B3B567D2 * ____identity_1;
public:
inline static int32_t get_offset_of__replySink_0() { return static_cast<int32_t>(offsetof(ServerObjectReplySink_tE1CEF247A2AC5DFD53842706CFE097CE9556CCB8, ____replySink_0)); }
inline RuntimeObject* get__replySink_0() const { return ____replySink_0; }
inline RuntimeObject** get_address_of__replySink_0() { return &____replySink_0; }
inline void set__replySink_0(RuntimeObject* value)
{
____replySink_0 = value;
Il2CppCodeGenWriteBarrier((&____replySink_0), value);
}
inline static int32_t get_offset_of__identity_1() { return static_cast<int32_t>(offsetof(ServerObjectReplySink_tE1CEF247A2AC5DFD53842706CFE097CE9556CCB8, ____identity_1)); }
inline ServerIdentity_t93C5C5C4D608C5E714F0C5061B9BFC17B3B567D2 * get__identity_1() const { return ____identity_1; }
inline ServerIdentity_t93C5C5C4D608C5E714F0C5061B9BFC17B3B567D2 ** get_address_of__identity_1() { return &____identity_1; }
inline void set__identity_1(ServerIdentity_t93C5C5C4D608C5E714F0C5061B9BFC17B3B567D2 * value)
{
____identity_1 = value;
Il2CppCodeGenWriteBarrier((&____identity_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SERVEROBJECTREPLYSINK_TE1CEF247A2AC5DFD53842706CFE097CE9556CCB8_H
#ifndef SERVEROBJECTTERMINATORSINK_T635122FE05BCEDE34F4B07AA9590AD77509752FD_H
#define SERVEROBJECTTERMINATORSINK_T635122FE05BCEDE34F4B07AA9590AD77509752FD_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink
struct ServerObjectTerminatorSink_t635122FE05BCEDE34F4B07AA9590AD77509752FD : public RuntimeObject
{
public:
// System.Runtime.Remoting.Messaging.IMessageSink System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink::_nextSink
RuntimeObject* ____nextSink_0;
public:
inline static int32_t get_offset_of__nextSink_0() { return static_cast<int32_t>(offsetof(ServerObjectTerminatorSink_t635122FE05BCEDE34F4B07AA9590AD77509752FD, ____nextSink_0)); }
inline RuntimeObject* get__nextSink_0() const { return ____nextSink_0; }
inline RuntimeObject** get_address_of__nextSink_0() { return &____nextSink_0; }
inline void set__nextSink_0(RuntimeObject* value)
{
____nextSink_0 = value;
Il2CppCodeGenWriteBarrier((&____nextSink_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SERVEROBJECTTERMINATORSINK_T635122FE05BCEDE34F4B07AA9590AD77509752FD_H
#ifndef STACKBUILDERSINK_T312B8C166D43B3871C33905CA64E57520C479897_H
#define STACKBUILDERSINK_T312B8C166D43B3871C33905CA64E57520C479897_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.StackBuilderSink
struct StackBuilderSink_t312B8C166D43B3871C33905CA64E57520C479897 : public RuntimeObject
{
public:
// System.MarshalByRefObject System.Runtime.Remoting.Messaging.StackBuilderSink::_target
MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF * ____target_0;
// System.Runtime.Remoting.Proxies.RealProxy System.Runtime.Remoting.Messaging.StackBuilderSink::_rp
RealProxy_t4B0A745F7C99373132CC67FE86D13421411361EF * ____rp_1;
public:
inline static int32_t get_offset_of__target_0() { return static_cast<int32_t>(offsetof(StackBuilderSink_t312B8C166D43B3871C33905CA64E57520C479897, ____target_0)); }
inline MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF * get__target_0() const { return ____target_0; }
inline MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF ** get_address_of__target_0() { return &____target_0; }
inline void set__target_0(MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF * value)
{
____target_0 = value;
Il2CppCodeGenWriteBarrier((&____target_0), value);
}
inline static int32_t get_offset_of__rp_1() { return static_cast<int32_t>(offsetof(StackBuilderSink_t312B8C166D43B3871C33905CA64E57520C479897, ____rp_1)); }
inline RealProxy_t4B0A745F7C99373132CC67FE86D13421411361EF * get__rp_1() const { return ____rp_1; }
inline RealProxy_t4B0A745F7C99373132CC67FE86D13421411361EF ** get_address_of__rp_1() { return &____rp_1; }
inline void set__rp_1(RealProxy_t4B0A745F7C99373132CC67FE86D13421411361EF * value)
{
____rp_1 = value;
Il2CppCodeGenWriteBarrier((&____rp_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STACKBUILDERSINK_T312B8C166D43B3871C33905CA64E57520C479897_H
#ifndef VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H
#define VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ValueType
struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_com
{
};
#endif // VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H
#ifndef DATETIME_T349B7449FBAAFF4192636E2B7A07694DA9236132_H
#define DATETIME_T349B7449FBAAFF4192636E2B7A07694DA9236132_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTime
struct DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132
{
public:
// System.UInt64 System.DateTime::dateData
uint64_t ___dateData_44;
public:
inline static int32_t get_offset_of_dateData_44() { return static_cast<int32_t>(offsetof(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132, ___dateData_44)); }
inline uint64_t get_dateData_44() const { return ___dateData_44; }
inline uint64_t* get_address_of_dateData_44() { return &___dateData_44; }
inline void set_dateData_44(uint64_t value)
{
___dateData_44 = value;
}
};
struct DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132_StaticFields
{
public:
// System.Int32[] System.DateTime::DaysToMonth365
Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* ___DaysToMonth365_29;
// System.Int32[] System.DateTime::DaysToMonth366
Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* ___DaysToMonth366_30;
// System.DateTime System.DateTime::MinValue
DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 ___MinValue_31;
// System.DateTime System.DateTime::MaxValue
DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 ___MaxValue_32;
public:
inline static int32_t get_offset_of_DaysToMonth365_29() { return static_cast<int32_t>(offsetof(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132_StaticFields, ___DaysToMonth365_29)); }
inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* get_DaysToMonth365_29() const { return ___DaysToMonth365_29; }
inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83** get_address_of_DaysToMonth365_29() { return &___DaysToMonth365_29; }
inline void set_DaysToMonth365_29(Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* value)
{
___DaysToMonth365_29 = value;
Il2CppCodeGenWriteBarrier((&___DaysToMonth365_29), value);
}
inline static int32_t get_offset_of_DaysToMonth366_30() { return static_cast<int32_t>(offsetof(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132_StaticFields, ___DaysToMonth366_30)); }
inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* get_DaysToMonth366_30() const { return ___DaysToMonth366_30; }
inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83** get_address_of_DaysToMonth366_30() { return &___DaysToMonth366_30; }
inline void set_DaysToMonth366_30(Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* value)
{
___DaysToMonth366_30 = value;
Il2CppCodeGenWriteBarrier((&___DaysToMonth366_30), value);
}
inline static int32_t get_offset_of_MinValue_31() { return static_cast<int32_t>(offsetof(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132_StaticFields, ___MinValue_31)); }
inline DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 get_MinValue_31() const { return ___MinValue_31; }
inline DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 * get_address_of_MinValue_31() { return &___MinValue_31; }
inline void set_MinValue_31(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 value)
{
___MinValue_31 = value;
}
inline static int32_t get_offset_of_MaxValue_32() { return static_cast<int32_t>(offsetof(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132_StaticFields, ___MaxValue_32)); }
inline DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 get_MaxValue_32() const { return ___MaxValue_32; }
inline DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 * get_address_of_MaxValue_32() { return &___MaxValue_32; }
inline void set_MaxValue_32(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 value)
{
___MaxValue_32 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIME_T349B7449FBAAFF4192636E2B7A07694DA9236132_H
#ifndef DECIMAL_T44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_H
#define DECIMAL_T44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Decimal
struct Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8
{
public:
// System.Int32 System.Decimal::flags
int32_t ___flags_14;
// System.Int32 System.Decimal::hi
int32_t ___hi_15;
// System.Int32 System.Decimal::lo
int32_t ___lo_16;
// System.Int32 System.Decimal::mid
int32_t ___mid_17;
public:
inline static int32_t get_offset_of_flags_14() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8, ___flags_14)); }
inline int32_t get_flags_14() const { return ___flags_14; }
inline int32_t* get_address_of_flags_14() { return &___flags_14; }
inline void set_flags_14(int32_t value)
{
___flags_14 = value;
}
inline static int32_t get_offset_of_hi_15() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8, ___hi_15)); }
inline int32_t get_hi_15() const { return ___hi_15; }
inline int32_t* get_address_of_hi_15() { return &___hi_15; }
inline void set_hi_15(int32_t value)
{
___hi_15 = value;
}
inline static int32_t get_offset_of_lo_16() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8, ___lo_16)); }
inline int32_t get_lo_16() const { return ___lo_16; }
inline int32_t* get_address_of_lo_16() { return &___lo_16; }
inline void set_lo_16(int32_t value)
{
___lo_16 = value;
}
inline static int32_t get_offset_of_mid_17() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8, ___mid_17)); }
inline int32_t get_mid_17() const { return ___mid_17; }
inline int32_t* get_address_of_mid_17() { return &___mid_17; }
inline void set_mid_17(int32_t value)
{
___mid_17 = value;
}
};
struct Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields
{
public:
// System.UInt32[] System.Decimal::Powers10
UInt32U5BU5D_t9AA834AF2940E75BBF8E3F08FF0D20D266DB71CB* ___Powers10_6;
// System.Decimal System.Decimal::Zero
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___Zero_7;
// System.Decimal System.Decimal::One
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___One_8;
// System.Decimal System.Decimal::MinusOne
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___MinusOne_9;
// System.Decimal System.Decimal::MaxValue
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___MaxValue_10;
// System.Decimal System.Decimal::MinValue
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___MinValue_11;
// System.Decimal System.Decimal::NearNegativeZero
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___NearNegativeZero_12;
// System.Decimal System.Decimal::NearPositiveZero
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___NearPositiveZero_13;
public:
inline static int32_t get_offset_of_Powers10_6() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___Powers10_6)); }
inline UInt32U5BU5D_t9AA834AF2940E75BBF8E3F08FF0D20D266DB71CB* get_Powers10_6() const { return ___Powers10_6; }
inline UInt32U5BU5D_t9AA834AF2940E75BBF8E3F08FF0D20D266DB71CB** get_address_of_Powers10_6() { return &___Powers10_6; }
inline void set_Powers10_6(UInt32U5BU5D_t9AA834AF2940E75BBF8E3F08FF0D20D266DB71CB* value)
{
___Powers10_6 = value;
Il2CppCodeGenWriteBarrier((&___Powers10_6), value);
}
inline static int32_t get_offset_of_Zero_7() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___Zero_7)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_Zero_7() const { return ___Zero_7; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_Zero_7() { return &___Zero_7; }
inline void set_Zero_7(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___Zero_7 = value;
}
inline static int32_t get_offset_of_One_8() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___One_8)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_One_8() const { return ___One_8; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_One_8() { return &___One_8; }
inline void set_One_8(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___One_8 = value;
}
inline static int32_t get_offset_of_MinusOne_9() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___MinusOne_9)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_MinusOne_9() const { return ___MinusOne_9; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_MinusOne_9() { return &___MinusOne_9; }
inline void set_MinusOne_9(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___MinusOne_9 = value;
}
inline static int32_t get_offset_of_MaxValue_10() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___MaxValue_10)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_MaxValue_10() const { return ___MaxValue_10; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_MaxValue_10() { return &___MaxValue_10; }
inline void set_MaxValue_10(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___MaxValue_10 = value;
}
inline static int32_t get_offset_of_MinValue_11() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___MinValue_11)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_MinValue_11() const { return ___MinValue_11; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_MinValue_11() { return &___MinValue_11; }
inline void set_MinValue_11(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___MinValue_11 = value;
}
inline static int32_t get_offset_of_NearNegativeZero_12() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___NearNegativeZero_12)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_NearNegativeZero_12() const { return ___NearNegativeZero_12; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_NearNegativeZero_12() { return &___NearNegativeZero_12; }
inline void set_NearNegativeZero_12(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___NearNegativeZero_12 = value;
}
inline static int32_t get_offset_of_NearPositiveZero_13() { return static_cast<int32_t>(offsetof(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_StaticFields, ___NearPositiveZero_13)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_NearPositiveZero_13() const { return ___NearPositiveZero_13; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_NearPositiveZero_13() { return &___NearPositiveZero_13; }
inline void set_NearPositiveZero_13(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___NearPositiveZero_13 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DECIMAL_T44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8_H
#ifndef ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H
#define ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Enum
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521 : public ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF
{
public:
public:
};
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields
{
public:
// System.Char[] System.Enum::enumSeperatorCharArray
CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___enumSeperatorCharArray_0;
public:
inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields, ___enumSeperatorCharArray_0)); }
inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; }
inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; }
inline void set_enumSeperatorCharArray_0(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value)
{
___enumSeperatorCharArray_0 = value;
Il2CppCodeGenWriteBarrier((&___enumSeperatorCharArray_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_com
{
};
#endif // ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H
#ifndef ASYNCMETHODBUILDERCORE_T4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01_H
#define ASYNCMETHODBUILDERCORE_T4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncMethodBuilderCore
struct AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01
{
public:
// System.Runtime.CompilerServices.IAsyncStateMachine System.Runtime.CompilerServices.AsyncMethodBuilderCore::m_stateMachine
RuntimeObject* ___m_stateMachine_0;
// System.Action System.Runtime.CompilerServices.AsyncMethodBuilderCore::m_defaultContextAction
Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * ___m_defaultContextAction_1;
public:
inline static int32_t get_offset_of_m_stateMachine_0() { return static_cast<int32_t>(offsetof(AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01, ___m_stateMachine_0)); }
inline RuntimeObject* get_m_stateMachine_0() const { return ___m_stateMachine_0; }
inline RuntimeObject** get_address_of_m_stateMachine_0() { return &___m_stateMachine_0; }
inline void set_m_stateMachine_0(RuntimeObject* value)
{
___m_stateMachine_0 = value;
Il2CppCodeGenWriteBarrier((&___m_stateMachine_0), value);
}
inline static int32_t get_offset_of_m_defaultContextAction_1() { return static_cast<int32_t>(offsetof(AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01, ___m_defaultContextAction_1)); }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * get_m_defaultContextAction_1() const { return ___m_defaultContextAction_1; }
inline Action_t591D2A86165F896B4B800BB5C25CE18672A55579 ** get_address_of_m_defaultContextAction_1() { return &___m_defaultContextAction_1; }
inline void set_m_defaultContextAction_1(Action_t591D2A86165F896B4B800BB5C25CE18672A55579 * value)
{
___m_defaultContextAction_1 = value;
Il2CppCodeGenWriteBarrier((&___m_defaultContextAction_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.CompilerServices.AsyncMethodBuilderCore
struct AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01_marshaled_pinvoke
{
RuntimeObject* ___m_stateMachine_0;
Il2CppMethodPointer ___m_defaultContextAction_1;
};
// Native definition for COM marshalling of System.Runtime.CompilerServices.AsyncMethodBuilderCore
struct AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01_marshaled_com
{
RuntimeObject* ___m_stateMachine_0;
Il2CppMethodPointer ___m_defaultContextAction_1;
};
#endif // ASYNCMETHODBUILDERCORE_T4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01_H
#ifndef COMPILATIONRELAXATIONSATTRIBUTE_T0067C359924196418CFB0DE4C07C5F4C4BCD54FF_H
#define COMPILATIONRELAXATIONSATTRIBUTE_T0067C359924196418CFB0DE4C07C5F4C4BCD54FF_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.CompilationRelaxationsAttribute
struct CompilationRelaxationsAttribute_t0067C359924196418CFB0DE4C07C5F4C4BCD54FF : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Int32 System.Runtime.CompilerServices.CompilationRelaxationsAttribute::m_relaxations
int32_t ___m_relaxations_0;
public:
inline static int32_t get_offset_of_m_relaxations_0() { return static_cast<int32_t>(offsetof(CompilationRelaxationsAttribute_t0067C359924196418CFB0DE4C07C5F4C4BCD54FF, ___m_relaxations_0)); }
inline int32_t get_m_relaxations_0() const { return ___m_relaxations_0; }
inline int32_t* get_address_of_m_relaxations_0() { return &___m_relaxations_0; }
inline void set_m_relaxations_0(int32_t value)
{
___m_relaxations_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMPILATIONRELAXATIONSATTRIBUTE_T0067C359924196418CFB0DE4C07C5F4C4BCD54FF_H
#ifndef COMPILERGENERATEDATTRIBUTE_T29C03D4EB4F2193B5BF85D03923EA47423C946FC_H
#define COMPILERGENERATEDATTRIBUTE_T29C03D4EB4F2193B5BF85D03923EA47423C946FC_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.CompilerGeneratedAttribute
struct CompilerGeneratedAttribute_t29C03D4EB4F2193B5BF85D03923EA47423C946FC : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMPILERGENERATEDATTRIBUTE_T29C03D4EB4F2193B5BF85D03923EA47423C946FC_H
#ifndef CONFIGUREDTASKAWAITER_TF1AAA16B8A1250CA037E32157A3424CD2BA47874_H
#define CONFIGUREDTASKAWAITER_TF1AAA16B8A1250CA037E32157A3424CD2BA47874_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.ConfiguredTaskAwaitable_ConfiguredTaskAwaiter
struct ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874
{
public:
// System.Threading.Tasks.Task System.Runtime.CompilerServices.ConfiguredTaskAwaitable_ConfiguredTaskAwaiter::m_task
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_0;
// System.Boolean System.Runtime.CompilerServices.ConfiguredTaskAwaitable_ConfiguredTaskAwaiter::m_continueOnCapturedContext
bool ___m_continueOnCapturedContext_1;
public:
inline static int32_t get_offset_of_m_task_0() { return static_cast<int32_t>(offsetof(ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874, ___m_task_0)); }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * get_m_task_0() const { return ___m_task_0; }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 ** get_address_of_m_task_0() { return &___m_task_0; }
inline void set_m_task_0(Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * value)
{
___m_task_0 = value;
Il2CppCodeGenWriteBarrier((&___m_task_0), value);
}
inline static int32_t get_offset_of_m_continueOnCapturedContext_1() { return static_cast<int32_t>(offsetof(ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874, ___m_continueOnCapturedContext_1)); }
inline bool get_m_continueOnCapturedContext_1() const { return ___m_continueOnCapturedContext_1; }
inline bool* get_address_of_m_continueOnCapturedContext_1() { return &___m_continueOnCapturedContext_1; }
inline void set_m_continueOnCapturedContext_1(bool value)
{
___m_continueOnCapturedContext_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.CompilerServices.ConfiguredTaskAwaitable/ConfiguredTaskAwaiter
struct ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874_marshaled_pinvoke
{
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_0;
int32_t ___m_continueOnCapturedContext_1;
};
// Native definition for COM marshalling of System.Runtime.CompilerServices.ConfiguredTaskAwaitable/ConfiguredTaskAwaiter
struct ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874_marshaled_com
{
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_0;
int32_t ___m_continueOnCapturedContext_1;
};
#endif // CONFIGUREDTASKAWAITER_TF1AAA16B8A1250CA037E32157A3424CD2BA47874_H
#ifndef CUSTOMCONSTANTATTRIBUTE_TBAC64D25BCB4BE5CAC32AC430CA8BEF070923191_H
#define CUSTOMCONSTANTATTRIBUTE_TBAC64D25BCB4BE5CAC32AC430CA8BEF070923191_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.CustomConstantAttribute
struct CustomConstantAttribute_tBAC64D25BCB4BE5CAC32AC430CA8BEF070923191 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CUSTOMCONSTANTATTRIBUTE_TBAC64D25BCB4BE5CAC32AC430CA8BEF070923191_H
#ifndef EPHEMERON_T6F0B12401657FF132AB44052E5BCD06D358FF1BA_H
#define EPHEMERON_T6F0B12401657FF132AB44052E5BCD06D358FF1BA_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.Ephemeron
struct Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA
{
public:
// System.Object System.Runtime.CompilerServices.Ephemeron::key
RuntimeObject * ___key_0;
// System.Object System.Runtime.CompilerServices.Ephemeron::value
RuntimeObject * ___value_1;
public:
inline static int32_t get_offset_of_key_0() { return static_cast<int32_t>(offsetof(Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA, ___key_0)); }
inline RuntimeObject * get_key_0() const { return ___key_0; }
inline RuntimeObject ** get_address_of_key_0() { return &___key_0; }
inline void set_key_0(RuntimeObject * value)
{
___key_0 = value;
Il2CppCodeGenWriteBarrier((&___key_0), value);
}
inline static int32_t get_offset_of_value_1() { return static_cast<int32_t>(offsetof(Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA, ___value_1)); }
inline RuntimeObject * get_value_1() const { return ___value_1; }
inline RuntimeObject ** get_address_of_value_1() { return &___value_1; }
inline void set_value_1(RuntimeObject * value)
{
___value_1 = value;
Il2CppCodeGenWriteBarrier((&___value_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.CompilerServices.Ephemeron
struct Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA_marshaled_pinvoke
{
Il2CppIUnknown* ___key_0;
Il2CppIUnknown* ___value_1;
};
// Native definition for COM marshalling of System.Runtime.CompilerServices.Ephemeron
struct Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA_marshaled_com
{
Il2CppIUnknown* ___key_0;
Il2CppIUnknown* ___value_1;
};
#endif // EPHEMERON_T6F0B12401657FF132AB44052E5BCD06D358FF1BA_H
#ifndef EXTENSIONATTRIBUTE_T34A17741DB6F2A390F30532BD50B269ECDB8F124_H
#define EXTENSIONATTRIBUTE_T34A17741DB6F2A390F30532BD50B269ECDB8F124_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.ExtensionAttribute
struct ExtensionAttribute_t34A17741DB6F2A390F30532BD50B269ECDB8F124 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXTENSIONATTRIBUTE_T34A17741DB6F2A390F30532BD50B269ECDB8F124_H
#ifndef FIXEDBUFFERATTRIBUTE_TF3065E17C7BDDEAEDC5D80CED0509DB83C558743_H
#define FIXEDBUFFERATTRIBUTE_TF3065E17C7BDDEAEDC5D80CED0509DB83C558743_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.FixedBufferAttribute
struct FixedBufferAttribute_tF3065E17C7BDDEAEDC5D80CED0509DB83C558743 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Type System.Runtime.CompilerServices.FixedBufferAttribute::elementType
Type_t * ___elementType_0;
// System.Int32 System.Runtime.CompilerServices.FixedBufferAttribute::length
int32_t ___length_1;
public:
inline static int32_t get_offset_of_elementType_0() { return static_cast<int32_t>(offsetof(FixedBufferAttribute_tF3065E17C7BDDEAEDC5D80CED0509DB83C558743, ___elementType_0)); }
inline Type_t * get_elementType_0() const { return ___elementType_0; }
inline Type_t ** get_address_of_elementType_0() { return &___elementType_0; }
inline void set_elementType_0(Type_t * value)
{
___elementType_0 = value;
Il2CppCodeGenWriteBarrier((&___elementType_0), value);
}
inline static int32_t get_offset_of_length_1() { return static_cast<int32_t>(offsetof(FixedBufferAttribute_tF3065E17C7BDDEAEDC5D80CED0509DB83C558743, ___length_1)); }
inline int32_t get_length_1() const { return ___length_1; }
inline int32_t* get_address_of_length_1() { return &___length_1; }
inline void set_length_1(int32_t value)
{
___length_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FIXEDBUFFERATTRIBUTE_TF3065E17C7BDDEAEDC5D80CED0509DB83C558743_H
#ifndef FRIENDACCESSALLOWEDATTRIBUTE_T7924C8657D64E9FCB405FD7457DDF6EFA131BE96_H
#define FRIENDACCESSALLOWEDATTRIBUTE_T7924C8657D64E9FCB405FD7457DDF6EFA131BE96_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.FriendAccessAllowedAttribute
struct FriendAccessAllowedAttribute_t7924C8657D64E9FCB405FD7457DDF6EFA131BE96 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FRIENDACCESSALLOWEDATTRIBUTE_T7924C8657D64E9FCB405FD7457DDF6EFA131BE96_H
#ifndef INTERNALSVISIBLETOATTRIBUTE_T3AEE3C8B7B894E54091E79A5A1C570B6DBB82767_H
#define INTERNALSVISIBLETOATTRIBUTE_T3AEE3C8B7B894E54091E79A5A1C570B6DBB82767_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.InternalsVisibleToAttribute
struct InternalsVisibleToAttribute_t3AEE3C8B7B894E54091E79A5A1C570B6DBB82767 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.String System.Runtime.CompilerServices.InternalsVisibleToAttribute::_assemblyName
String_t* ____assemblyName_0;
// System.Boolean System.Runtime.CompilerServices.InternalsVisibleToAttribute::_allInternalsVisible
bool ____allInternalsVisible_1;
public:
inline static int32_t get_offset_of__assemblyName_0() { return static_cast<int32_t>(offsetof(InternalsVisibleToAttribute_t3AEE3C8B7B894E54091E79A5A1C570B6DBB82767, ____assemblyName_0)); }
inline String_t* get__assemblyName_0() const { return ____assemblyName_0; }
inline String_t** get_address_of__assemblyName_0() { return &____assemblyName_0; }
inline void set__assemblyName_0(String_t* value)
{
____assemblyName_0 = value;
Il2CppCodeGenWriteBarrier((&____assemblyName_0), value);
}
inline static int32_t get_offset_of__allInternalsVisible_1() { return static_cast<int32_t>(offsetof(InternalsVisibleToAttribute_t3AEE3C8B7B894E54091E79A5A1C570B6DBB82767, ____allInternalsVisible_1)); }
inline bool get__allInternalsVisible_1() const { return ____allInternalsVisible_1; }
inline bool* get_address_of__allInternalsVisible_1() { return &____allInternalsVisible_1; }
inline void set__allInternalsVisible_1(bool value)
{
____allInternalsVisible_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INTERNALSVISIBLETOATTRIBUTE_T3AEE3C8B7B894E54091E79A5A1C570B6DBB82767_H
#ifndef ISREADONLYATTRIBUTE_TD69A056AD347DF5A551044EAB596F41434DF462D_H
#define ISREADONLYATTRIBUTE_TD69A056AD347DF5A551044EAB596F41434DF462D_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.IsReadOnlyAttribute
struct IsReadOnlyAttribute_tD69A056AD347DF5A551044EAB596F41434DF462D : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ISREADONLYATTRIBUTE_TD69A056AD347DF5A551044EAB596F41434DF462D_H
#ifndef RUNTIMECOMPATIBILITYATTRIBUTE_TF386C60D3DD4A0E1759F1D8F76841FC4522A6126_H
#define RUNTIMECOMPATIBILITYATTRIBUTE_TF386C60D3DD4A0E1759F1D8F76841FC4522A6126_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.RuntimeCompatibilityAttribute
struct RuntimeCompatibilityAttribute_tF386C60D3DD4A0E1759F1D8F76841FC4522A6126 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Boolean System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::m_wrapNonExceptionThrows
bool ___m_wrapNonExceptionThrows_0;
public:
inline static int32_t get_offset_of_m_wrapNonExceptionThrows_0() { return static_cast<int32_t>(offsetof(RuntimeCompatibilityAttribute_tF386C60D3DD4A0E1759F1D8F76841FC4522A6126, ___m_wrapNonExceptionThrows_0)); }
inline bool get_m_wrapNonExceptionThrows_0() const { return ___m_wrapNonExceptionThrows_0; }
inline bool* get_address_of_m_wrapNonExceptionThrows_0() { return &___m_wrapNonExceptionThrows_0; }
inline void set_m_wrapNonExceptionThrows_0(bool value)
{
___m_wrapNonExceptionThrows_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMECOMPATIBILITYATTRIBUTE_TF386C60D3DD4A0E1759F1D8F76841FC4522A6126_H
#ifndef RUNTIMEWRAPPEDEXCEPTION_T5E7538D9FD99A8A0FB32B396776E294A29866C0D_H
#define RUNTIMEWRAPPEDEXCEPTION_T5E7538D9FD99A8A0FB32B396776E294A29866C0D_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.RuntimeWrappedException
struct RuntimeWrappedException_t5E7538D9FD99A8A0FB32B396776E294A29866C0D : public Exception_t
{
public:
// System.Object System.Runtime.CompilerServices.RuntimeWrappedException::m_wrappedException
RuntimeObject * ___m_wrappedException_17;
public:
inline static int32_t get_offset_of_m_wrappedException_17() { return static_cast<int32_t>(offsetof(RuntimeWrappedException_t5E7538D9FD99A8A0FB32B396776E294A29866C0D, ___m_wrappedException_17)); }
inline RuntimeObject * get_m_wrappedException_17() const { return ___m_wrappedException_17; }
inline RuntimeObject ** get_address_of_m_wrappedException_17() { return &___m_wrappedException_17; }
inline void set_m_wrappedException_17(RuntimeObject * value)
{
___m_wrappedException_17 = value;
Il2CppCodeGenWriteBarrier((&___m_wrappedException_17), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMEWRAPPEDEXCEPTION_T5E7538D9FD99A8A0FB32B396776E294A29866C0D_H
#ifndef STATEMACHINEATTRIBUTE_T0F08DD69D5AB4A30C6A13E245143DD5335A4DA93_H
#define STATEMACHINEATTRIBUTE_T0F08DD69D5AB4A30C6A13E245143DD5335A4DA93_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.StateMachineAttribute
struct StateMachineAttribute_t0F08DD69D5AB4A30C6A13E245143DD5335A4DA93 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Type System.Runtime.CompilerServices.StateMachineAttribute::<StateMachineType>k__BackingField
Type_t * ___U3CStateMachineTypeU3Ek__BackingField_0;
public:
inline static int32_t get_offset_of_U3CStateMachineTypeU3Ek__BackingField_0() { return static_cast<int32_t>(offsetof(StateMachineAttribute_t0F08DD69D5AB4A30C6A13E245143DD5335A4DA93, ___U3CStateMachineTypeU3Ek__BackingField_0)); }
inline Type_t * get_U3CStateMachineTypeU3Ek__BackingField_0() const { return ___U3CStateMachineTypeU3Ek__BackingField_0; }
inline Type_t ** get_address_of_U3CStateMachineTypeU3Ek__BackingField_0() { return &___U3CStateMachineTypeU3Ek__BackingField_0; }
inline void set_U3CStateMachineTypeU3Ek__BackingField_0(Type_t * value)
{
___U3CStateMachineTypeU3Ek__BackingField_0 = value;
Il2CppCodeGenWriteBarrier((&___U3CStateMachineTypeU3Ek__BackingField_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STATEMACHINEATTRIBUTE_T0F08DD69D5AB4A30C6A13E245143DD5335A4DA93_H
#ifndef STRINGFREEZINGATTRIBUTE_T7ECA21C06003DECA46ECDD205612C746907ECA7C_H
#define STRINGFREEZINGATTRIBUTE_T7ECA21C06003DECA46ECDD205612C746907ECA7C_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.StringFreezingAttribute
struct StringFreezingAttribute_t7ECA21C06003DECA46ECDD205612C746907ECA7C : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STRINGFREEZINGATTRIBUTE_T7ECA21C06003DECA46ECDD205612C746907ECA7C_H
#ifndef TASKAWAITER_T0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F_H
#define TASKAWAITER_T0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.TaskAwaiter
struct TaskAwaiter_t0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F
{
public:
// System.Threading.Tasks.Task System.Runtime.CompilerServices.TaskAwaiter::m_task
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_0;
public:
inline static int32_t get_offset_of_m_task_0() { return static_cast<int32_t>(offsetof(TaskAwaiter_t0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F, ___m_task_0)); }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * get_m_task_0() const { return ___m_task_0; }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 ** get_address_of_m_task_0() { return &___m_task_0; }
inline void set_m_task_0(Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * value)
{
___m_task_0 = value;
Il2CppCodeGenWriteBarrier((&___m_task_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.CompilerServices.TaskAwaiter
struct TaskAwaiter_t0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F_marshaled_pinvoke
{
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_0;
};
// Native definition for COM marshalling of System.Runtime.CompilerServices.TaskAwaiter
struct TaskAwaiter_t0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F_marshaled_com
{
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_0;
};
#endif // TASKAWAITER_T0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F_H
#ifndef TYPEDEPENDENCYATTRIBUTE_TD04CE2948B22A3881F260D03D1440D7678A0EEBE_H
#define TYPEDEPENDENCYATTRIBUTE_TD04CE2948B22A3881F260D03D1440D7678A0EEBE_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.TypeDependencyAttribute
struct TypeDependencyAttribute_tD04CE2948B22A3881F260D03D1440D7678A0EEBE : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.String System.Runtime.CompilerServices.TypeDependencyAttribute::typeName
String_t* ___typeName_0;
public:
inline static int32_t get_offset_of_typeName_0() { return static_cast<int32_t>(offsetof(TypeDependencyAttribute_tD04CE2948B22A3881F260D03D1440D7678A0EEBE, ___typeName_0)); }
inline String_t* get_typeName_0() const { return ___typeName_0; }
inline String_t** get_address_of_typeName_0() { return &___typeName_0; }
inline void set_typeName_0(String_t* value)
{
___typeName_0 = value;
Il2CppCodeGenWriteBarrier((&___typeName_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TYPEDEPENDENCYATTRIBUTE_TD04CE2948B22A3881F260D03D1440D7678A0EEBE_H
#ifndef TYPEFORWARDEDFROMATTRIBUTE_TEE8D8DA95C9112F53D8E66EA00F476C923A003E2_H
#define TYPEFORWARDEDFROMATTRIBUTE_TEE8D8DA95C9112F53D8E66EA00F476C923A003E2_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.TypeForwardedFromAttribute
struct TypeForwardedFromAttribute_tEE8D8DA95C9112F53D8E66EA00F476C923A003E2 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.String System.Runtime.CompilerServices.TypeForwardedFromAttribute::assemblyFullName
String_t* ___assemblyFullName_0;
public:
inline static int32_t get_offset_of_assemblyFullName_0() { return static_cast<int32_t>(offsetof(TypeForwardedFromAttribute_tEE8D8DA95C9112F53D8E66EA00F476C923A003E2, ___assemblyFullName_0)); }
inline String_t* get_assemblyFullName_0() const { return ___assemblyFullName_0; }
inline String_t** get_address_of_assemblyFullName_0() { return &___assemblyFullName_0; }
inline void set_assemblyFullName_0(String_t* value)
{
___assemblyFullName_0 = value;
Il2CppCodeGenWriteBarrier((&___assemblyFullName_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TYPEFORWARDEDFROMATTRIBUTE_TEE8D8DA95C9112F53D8E66EA00F476C923A003E2_H
#ifndef UNSAFEVALUETYPEATTRIBUTE_T9ADB28EC5F3BD460026EA31456FBBAF7C27B8EE1_H
#define UNSAFEVALUETYPEATTRIBUTE_T9ADB28EC5F3BD460026EA31456FBBAF7C27B8EE1_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.UnsafeValueTypeAttribute
struct UnsafeValueTypeAttribute_t9ADB28EC5F3BD460026EA31456FBBAF7C27B8EE1 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UNSAFEVALUETYPEATTRIBUTE_T9ADB28EC5F3BD460026EA31456FBBAF7C27B8EE1_H
#ifndef YIELDAWAITABLE_T5A938EAA492F9B8ABA2EEFF16C7A83EA606B9911_H
#define YIELDAWAITABLE_T5A938EAA492F9B8ABA2EEFF16C7A83EA606B9911_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.YieldAwaitable
struct YieldAwaitable_t5A938EAA492F9B8ABA2EEFF16C7A83EA606B9911
{
public:
union
{
struct
{
};
uint8_t YieldAwaitable_t5A938EAA492F9B8ABA2EEFF16C7A83EA606B9911__padding[1];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // YIELDAWAITABLE_T5A938EAA492F9B8ABA2EEFF16C7A83EA606B9911_H
#ifndef YIELDAWAITER_TB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_H
#define YIELDAWAITER_TB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.YieldAwaitable_YieldAwaiter
struct YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B
{
public:
union
{
struct
{
};
uint8_t YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B__padding[1];
};
public:
};
struct YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_StaticFields
{
public:
// System.Threading.WaitCallback System.Runtime.CompilerServices.YieldAwaitable_YieldAwaiter::s_waitCallbackRunAction
WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC * ___s_waitCallbackRunAction_0;
// System.Threading.SendOrPostCallback System.Runtime.CompilerServices.YieldAwaitable_YieldAwaiter::s_sendOrPostCallbackRunAction
SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 * ___s_sendOrPostCallbackRunAction_1;
public:
inline static int32_t get_offset_of_s_waitCallbackRunAction_0() { return static_cast<int32_t>(offsetof(YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_StaticFields, ___s_waitCallbackRunAction_0)); }
inline WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC * get_s_waitCallbackRunAction_0() const { return ___s_waitCallbackRunAction_0; }
inline WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC ** get_address_of_s_waitCallbackRunAction_0() { return &___s_waitCallbackRunAction_0; }
inline void set_s_waitCallbackRunAction_0(WaitCallback_t61C5F053CAC7A7FE923208EFA060693D7997B4EC * value)
{
___s_waitCallbackRunAction_0 = value;
Il2CppCodeGenWriteBarrier((&___s_waitCallbackRunAction_0), value);
}
inline static int32_t get_offset_of_s_sendOrPostCallbackRunAction_1() { return static_cast<int32_t>(offsetof(YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_StaticFields, ___s_sendOrPostCallbackRunAction_1)); }
inline SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 * get_s_sendOrPostCallbackRunAction_1() const { return ___s_sendOrPostCallbackRunAction_1; }
inline SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 ** get_address_of_s_sendOrPostCallbackRunAction_1() { return &___s_sendOrPostCallbackRunAction_1; }
inline void set_s_sendOrPostCallbackRunAction_1(SendOrPostCallback_t3F9C0164860E4AA5138DF8B4488DFB0D33147F01 * value)
{
___s_sendOrPostCallbackRunAction_1 = value;
Il2CppCodeGenWriteBarrier((&___s_sendOrPostCallbackRunAction_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // YIELDAWAITER_TB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_H
#ifndef FIRSTCHANCEEXCEPTIONEVENTARGS_T0FA7904C9F4BAA2FC640BE3E5AC348F153AD8B6D_H
#define FIRSTCHANCEEXCEPTIONEVENTARGS_T0FA7904C9F4BAA2FC640BE3E5AC348F153AD8B6D_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs
struct FirstChanceExceptionEventArgs_t0FA7904C9F4BAA2FC640BE3E5AC348F153AD8B6D : public EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FIRSTCHANCEEXCEPTIONEVENTARGS_T0FA7904C9F4BAA2FC640BE3E5AC348F153AD8B6D_H
#ifndef HANDLEPROCESSCORRUPTEDSTATEEXCEPTIONSATTRIBUTE_TA72E0974E174E223166E56C7E2B20C319C322260_H
#define HANDLEPROCESSCORRUPTEDSTATEEXCEPTIONSATTRIBUTE_TA72E0974E174E223166E56C7E2B20C319C322260_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute
struct HandleProcessCorruptedStateExceptionsAttribute_tA72E0974E174E223166E56C7E2B20C319C322260 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HANDLEPROCESSCORRUPTEDSTATEEXCEPTIONSATTRIBUTE_TA72E0974E174E223166E56C7E2B20C319C322260_H
#ifndef COMCOMPATIBLEVERSIONATTRIBUTE_T8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2_H
#define COMCOMPATIBLEVERSIONATTRIBUTE_T8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.ComCompatibleVersionAttribute
struct ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Int32 System.Runtime.InteropServices.ComCompatibleVersionAttribute::_major
int32_t ____major_0;
// System.Int32 System.Runtime.InteropServices.ComCompatibleVersionAttribute::_minor
int32_t ____minor_1;
// System.Int32 System.Runtime.InteropServices.ComCompatibleVersionAttribute::_build
int32_t ____build_2;
// System.Int32 System.Runtime.InteropServices.ComCompatibleVersionAttribute::_revision
int32_t ____revision_3;
public:
inline static int32_t get_offset_of__major_0() { return static_cast<int32_t>(offsetof(ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2, ____major_0)); }
inline int32_t get__major_0() const { return ____major_0; }
inline int32_t* get_address_of__major_0() { return &____major_0; }
inline void set__major_0(int32_t value)
{
____major_0 = value;
}
inline static int32_t get_offset_of__minor_1() { return static_cast<int32_t>(offsetof(ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2, ____minor_1)); }
inline int32_t get__minor_1() const { return ____minor_1; }
inline int32_t* get_address_of__minor_1() { return &____minor_1; }
inline void set__minor_1(int32_t value)
{
____minor_1 = value;
}
inline static int32_t get_offset_of__build_2() { return static_cast<int32_t>(offsetof(ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2, ____build_2)); }
inline int32_t get__build_2() const { return ____build_2; }
inline int32_t* get_address_of__build_2() { return &____build_2; }
inline void set__build_2(int32_t value)
{
____build_2 = value;
}
inline static int32_t get_offset_of__revision_3() { return static_cast<int32_t>(offsetof(ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2, ____revision_3)); }
inline int32_t get__revision_3() const { return ____revision_3; }
inline int32_t* get_address_of__revision_3() { return &____revision_3; }
inline void set__revision_3(int32_t value)
{
____revision_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMCOMPATIBLEVERSIONATTRIBUTE_T8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2_H
#ifndef COMDEFAULTINTERFACEATTRIBUTE_TBBC585373029E9376B0BBA3472A3EC7372F79C2A_H
#define COMDEFAULTINTERFACEATTRIBUTE_TBBC585373029E9376B0BBA3472A3EC7372F79C2A_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.ComDefaultInterfaceAttribute
struct ComDefaultInterfaceAttribute_tBBC585373029E9376B0BBA3472A3EC7372F79C2A : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Type System.Runtime.InteropServices.ComDefaultInterfaceAttribute::_val
Type_t * ____val_0;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(ComDefaultInterfaceAttribute_tBBC585373029E9376B0BBA3472A3EC7372F79C2A, ____val_0)); }
inline Type_t * get__val_0() const { return ____val_0; }
inline Type_t ** get_address_of__val_0() { return &____val_0; }
inline void set__val_0(Type_t * value)
{
____val_0 = value;
Il2CppCodeGenWriteBarrier((&____val_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMDEFAULTINTERFACEATTRIBUTE_TBBC585373029E9376B0BBA3472A3EC7372F79C2A_H
#ifndef COMIMPORTATTRIBUTE_T274D44BA1076F587D6AC97C2AFBA0A7B25EFDF40_H
#define COMIMPORTATTRIBUTE_T274D44BA1076F587D6AC97C2AFBA0A7B25EFDF40_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.ComImportAttribute
struct ComImportAttribute_t274D44BA1076F587D6AC97C2AFBA0A7B25EFDF40 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMIMPORTATTRIBUTE_T274D44BA1076F587D6AC97C2AFBA0A7B25EFDF40_H
#ifndef COMVISIBLEATTRIBUTE_T3815D768D1DE3E84BAF7FC90E9F2F283FB1C74B3_H
#define COMVISIBLEATTRIBUTE_T3815D768D1DE3E84BAF7FC90E9F2F283FB1C74B3_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.ComVisibleAttribute
struct ComVisibleAttribute_t3815D768D1DE3E84BAF7FC90E9F2F283FB1C74B3 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Boolean System.Runtime.InteropServices.ComVisibleAttribute::_val
bool ____val_0;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(ComVisibleAttribute_t3815D768D1DE3E84BAF7FC90E9F2F283FB1C74B3, ____val_0)); }
inline bool get__val_0() const { return ____val_0; }
inline bool* get_address_of__val_0() { return &____val_0; }
inline void set__val_0(bool value)
{
____val_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMVISIBLEATTRIBUTE_T3815D768D1DE3E84BAF7FC90E9F2F283FB1C74B3_H
#ifndef DISPIDATTRIBUTE_TCA8BD48980DDAABEEB1213041A0B83FFAA8A16C3_H
#define DISPIDATTRIBUTE_TCA8BD48980DDAABEEB1213041A0B83FFAA8A16C3_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.DispIdAttribute
struct DispIdAttribute_tCA8BD48980DDAABEEB1213041A0B83FFAA8A16C3 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Int32 System.Runtime.InteropServices.DispIdAttribute::_val
int32_t ____val_0;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(DispIdAttribute_tCA8BD48980DDAABEEB1213041A0B83FFAA8A16C3, ____val_0)); }
inline int32_t get__val_0() const { return ____val_0; }
inline int32_t* get_address_of__val_0() { return &____val_0; }
inline void set__val_0(int32_t value)
{
____val_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DISPIDATTRIBUTE_TCA8BD48980DDAABEEB1213041A0B83FFAA8A16C3_H
#ifndef FIELDOFFSETATTRIBUTE_T0DC41E3845F489E8751A1087AE893D8F5A9ABA49_H
#define FIELDOFFSETATTRIBUTE_T0DC41E3845F489E8751A1087AE893D8F5A9ABA49_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.FieldOffsetAttribute
struct FieldOffsetAttribute_t0DC41E3845F489E8751A1087AE893D8F5A9ABA49 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Int32 System.Runtime.InteropServices.FieldOffsetAttribute::_val
int32_t ____val_0;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(FieldOffsetAttribute_t0DC41E3845F489E8751A1087AE893D8F5A9ABA49, ____val_0)); }
inline int32_t get__val_0() const { return ____val_0; }
inline int32_t* get_address_of__val_0() { return &____val_0; }
inline void set__val_0(int32_t value)
{
____val_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FIELDOFFSETATTRIBUTE_T0DC41E3845F489E8751A1087AE893D8F5A9ABA49_H
#ifndef GUIDATTRIBUTE_T12D6C9EA1C65F4B67401C657AB97CD253FC09D34_H
#define GUIDATTRIBUTE_T12D6C9EA1C65F4B67401C657AB97CD253FC09D34_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.GuidAttribute
struct GuidAttribute_t12D6C9EA1C65F4B67401C657AB97CD253FC09D34 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.String System.Runtime.InteropServices.GuidAttribute::_val
String_t* ____val_0;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(GuidAttribute_t12D6C9EA1C65F4B67401C657AB97CD253FC09D34, ____val_0)); }
inline String_t* get__val_0() const { return ____val_0; }
inline String_t** get_address_of__val_0() { return &____val_0; }
inline void set__val_0(String_t* value)
{
____val_0 = value;
Il2CppCodeGenWriteBarrier((&____val_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GUIDATTRIBUTE_T12D6C9EA1C65F4B67401C657AB97CD253FC09D34_H
#ifndef INATTRIBUTE_T753C98BE87DB84ECCEEB09841007A0D30C8B8A91_H
#define INATTRIBUTE_T753C98BE87DB84ECCEEB09841007A0D30C8B8A91_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.InAttribute
struct InAttribute_t753C98BE87DB84ECCEEB09841007A0D30C8B8A91 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INATTRIBUTE_T753C98BE87DB84ECCEEB09841007A0D30C8B8A91_H
#ifndef OPTIONALATTRIBUTE_T9C49E42A48E6C513B8CFB077C07C7AEF7AF96113_H
#define OPTIONALATTRIBUTE_T9C49E42A48E6C513B8CFB077C07C7AEF7AF96113_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.OptionalAttribute
struct OptionalAttribute_t9C49E42A48E6C513B8CFB077C07C7AEF7AF96113 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // OPTIONALATTRIBUTE_T9C49E42A48E6C513B8CFB077C07C7AEF7AF96113_H
#ifndef OUTATTRIBUTE_T171E39DD5144590B737DC30724E1886B20B1E94D_H
#define OUTATTRIBUTE_T171E39DD5144590B737DC30724E1886B20B1E94D_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.OutAttribute
struct OutAttribute_t171E39DD5144590B737DC30724E1886B20B1E94D : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // OUTATTRIBUTE_T171E39DD5144590B737DC30724E1886B20B1E94D_H
#ifndef PRESERVESIGATTRIBUTE_T60367CFFE2AFD385EAC54659911B50279DFFA576_H
#define PRESERVESIGATTRIBUTE_T60367CFFE2AFD385EAC54659911B50279DFFA576_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.PreserveSigAttribute
struct PreserveSigAttribute_t60367CFFE2AFD385EAC54659911B50279DFFA576 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PRESERVESIGATTRIBUTE_T60367CFFE2AFD385EAC54659911B50279DFFA576_H
#ifndef TYPELIBIMPORTCLASSATTRIBUTE_TF096AB90A395D44FFFC7AAEDBFC5D8DD85EA74C1_H
#define TYPELIBIMPORTCLASSATTRIBUTE_TF096AB90A395D44FFFC7AAEDBFC5D8DD85EA74C1_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.TypeLibImportClassAttribute
struct TypeLibImportClassAttribute_tF096AB90A395D44FFFC7AAEDBFC5D8DD85EA74C1 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.String System.Runtime.InteropServices.TypeLibImportClassAttribute::_importClassName
String_t* ____importClassName_0;
public:
inline static int32_t get_offset_of__importClassName_0() { return static_cast<int32_t>(offsetof(TypeLibImportClassAttribute_tF096AB90A395D44FFFC7AAEDBFC5D8DD85EA74C1, ____importClassName_0)); }
inline String_t* get__importClassName_0() const { return ____importClassName_0; }
inline String_t** get_address_of__importClassName_0() { return &____importClassName_0; }
inline void set__importClassName_0(String_t* value)
{
____importClassName_0 = value;
Il2CppCodeGenWriteBarrier((&____importClassName_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TYPELIBIMPORTCLASSATTRIBUTE_TF096AB90A395D44FFFC7AAEDBFC5D8DD85EA74C1_H
#ifndef MCMDICTIONARY_TD801081CC84A219F173B4A5A90A53A75A43D5434_H
#define MCMDICTIONARY_TD801081CC84A219F173B4A5A90A53A75A43D5434_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.MCMDictionary
struct MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434 : public MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5
{
public:
public:
};
struct MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434_StaticFields
{
public:
// System.String[] System.Runtime.Remoting.Messaging.MCMDictionary::InternalKeys
StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ___InternalKeys_4;
public:
inline static int32_t get_offset_of_InternalKeys_4() { return static_cast<int32_t>(offsetof(MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434_StaticFields, ___InternalKeys_4)); }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get_InternalKeys_4() const { return ___InternalKeys_4; }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of_InternalKeys_4() { return &___InternalKeys_4; }
inline void set_InternalKeys_4(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value)
{
___InternalKeys_4 = value;
Il2CppCodeGenWriteBarrier((&___InternalKeys_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MCMDICTIONARY_TD801081CC84A219F173B4A5A90A53A75A43D5434_H
#ifndef METHODRETURNDICTIONARY_TFCD4ADFA43AA2736517130020BBB9E60A253EB48_H
#define METHODRETURNDICTIONARY_TFCD4ADFA43AA2736517130020BBB9E60A253EB48_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.MethodReturnDictionary
struct MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48 : public MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5
{
public:
public:
};
struct MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48_StaticFields
{
public:
// System.String[] System.Runtime.Remoting.Messaging.MethodReturnDictionary::InternalReturnKeys
StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ___InternalReturnKeys_4;
// System.String[] System.Runtime.Remoting.Messaging.MethodReturnDictionary::InternalExceptionKeys
StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ___InternalExceptionKeys_5;
public:
inline static int32_t get_offset_of_InternalReturnKeys_4() { return static_cast<int32_t>(offsetof(MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48_StaticFields, ___InternalReturnKeys_4)); }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get_InternalReturnKeys_4() const { return ___InternalReturnKeys_4; }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of_InternalReturnKeys_4() { return &___InternalReturnKeys_4; }
inline void set_InternalReturnKeys_4(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value)
{
___InternalReturnKeys_4 = value;
Il2CppCodeGenWriteBarrier((&___InternalReturnKeys_4), value);
}
inline static int32_t get_offset_of_InternalExceptionKeys_5() { return static_cast<int32_t>(offsetof(MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48_StaticFields, ___InternalExceptionKeys_5)); }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get_InternalExceptionKeys_5() const { return ___InternalExceptionKeys_5; }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of_InternalExceptionKeys_5() { return &___InternalExceptionKeys_5; }
inline void set_InternalExceptionKeys_5(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value)
{
___InternalExceptionKeys_5 = value;
Il2CppCodeGenWriteBarrier((&___InternalExceptionKeys_5), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // METHODRETURNDICTIONARY_TFCD4ADFA43AA2736517130020BBB9E60A253EB48_H
#ifndef ONEWAYATTRIBUTE_T848DB2BC395D34A01B2932EEC85CEA65CA9C9B43_H
#define ONEWAYATTRIBUTE_T848DB2BC395D34A01B2932EEC85CEA65CA9C9B43_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.OneWayAttribute
struct OneWayAttribute_t848DB2BC395D34A01B2932EEC85CEA65CA9C9B43 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ONEWAYATTRIBUTE_T848DB2BC395D34A01B2932EEC85CEA65CA9C9B43_H
#ifndef ASYNCSTATEMACHINEATTRIBUTE_T71790D316286529022E8E3342C82150023358A00_H
#define ASYNCSTATEMACHINEATTRIBUTE_T71790D316286529022E8E3342C82150023358A00_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncStateMachineAttribute
struct AsyncStateMachineAttribute_t71790D316286529022E8E3342C82150023358A00 : public StateMachineAttribute_t0F08DD69D5AB4A30C6A13E245143DD5335A4DA93
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYNCSTATEMACHINEATTRIBUTE_T71790D316286529022E8E3342C82150023358A00_H
#ifndef ASYNCTASKMETHODBUILDER_1_T66ED1808B26B8081A2804D6A750D13386E360BD9_H
#define ASYNCTASKMETHODBUILDER_1_T66ED1808B26B8081A2804D6A750D13386E360BD9_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Threading.Tasks.VoidTaskResult>
struct AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9
{
public:
// System.Runtime.CompilerServices.AsyncMethodBuilderCore System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::m_coreState
AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 ___m_coreState_1;
// System.Threading.Tasks.Task`1<TResult> System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::m_task
Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * ___m_task_2;
public:
inline static int32_t get_offset_of_m_coreState_1() { return static_cast<int32_t>(offsetof(AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9, ___m_coreState_1)); }
inline AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 get_m_coreState_1() const { return ___m_coreState_1; }
inline AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 * get_address_of_m_coreState_1() { return &___m_coreState_1; }
inline void set_m_coreState_1(AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 value)
{
___m_coreState_1 = value;
}
inline static int32_t get_offset_of_m_task_2() { return static_cast<int32_t>(offsetof(AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9, ___m_task_2)); }
inline Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * get_m_task_2() const { return ___m_task_2; }
inline Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 ** get_address_of_m_task_2() { return &___m_task_2; }
inline void set_m_task_2(Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * value)
{
___m_task_2 = value;
Il2CppCodeGenWriteBarrier((&___m_task_2), value);
}
};
struct AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9_StaticFields
{
public:
// System.Threading.Tasks.Task`1<TResult> System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::s_defaultResultTask
Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * ___s_defaultResultTask_0;
public:
inline static int32_t get_offset_of_s_defaultResultTask_0() { return static_cast<int32_t>(offsetof(AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9_StaticFields, ___s_defaultResultTask_0)); }
inline Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * get_s_defaultResultTask_0() const { return ___s_defaultResultTask_0; }
inline Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 ** get_address_of_s_defaultResultTask_0() { return &___s_defaultResultTask_0; }
inline void set_s_defaultResultTask_0(Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * value)
{
___s_defaultResultTask_0 = value;
Il2CppCodeGenWriteBarrier((&___s_defaultResultTask_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYNCTASKMETHODBUILDER_1_T66ED1808B26B8081A2804D6A750D13386E360BD9_H
#ifndef ASYNCVOIDMETHODBUILDER_T44E3C9B52B019BB5BDCC0E1BB83188B536161CFF_H
#define ASYNCVOIDMETHODBUILDER_T44E3C9B52B019BB5BDCC0E1BB83188B536161CFF_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncVoidMethodBuilder
struct AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF
{
public:
// System.Threading.SynchronizationContext System.Runtime.CompilerServices.AsyncVoidMethodBuilder::m_synchronizationContext
SynchronizationContext_t06AEFE2C7CFCFC242D0A5729A74464AF18CF84E7 * ___m_synchronizationContext_0;
// System.Runtime.CompilerServices.AsyncMethodBuilderCore System.Runtime.CompilerServices.AsyncVoidMethodBuilder::m_coreState
AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 ___m_coreState_1;
// System.Threading.Tasks.Task System.Runtime.CompilerServices.AsyncVoidMethodBuilder::m_task
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_2;
public:
inline static int32_t get_offset_of_m_synchronizationContext_0() { return static_cast<int32_t>(offsetof(AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF, ___m_synchronizationContext_0)); }
inline SynchronizationContext_t06AEFE2C7CFCFC242D0A5729A74464AF18CF84E7 * get_m_synchronizationContext_0() const { return ___m_synchronizationContext_0; }
inline SynchronizationContext_t06AEFE2C7CFCFC242D0A5729A74464AF18CF84E7 ** get_address_of_m_synchronizationContext_0() { return &___m_synchronizationContext_0; }
inline void set_m_synchronizationContext_0(SynchronizationContext_t06AEFE2C7CFCFC242D0A5729A74464AF18CF84E7 * value)
{
___m_synchronizationContext_0 = value;
Il2CppCodeGenWriteBarrier((&___m_synchronizationContext_0), value);
}
inline static int32_t get_offset_of_m_coreState_1() { return static_cast<int32_t>(offsetof(AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF, ___m_coreState_1)); }
inline AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 get_m_coreState_1() const { return ___m_coreState_1; }
inline AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 * get_address_of_m_coreState_1() { return &___m_coreState_1; }
inline void set_m_coreState_1(AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01 value)
{
___m_coreState_1 = value;
}
inline static int32_t get_offset_of_m_task_2() { return static_cast<int32_t>(offsetof(AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF, ___m_task_2)); }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * get_m_task_2() const { return ___m_task_2; }
inline Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 ** get_address_of_m_task_2() { return &___m_task_2; }
inline void set_m_task_2(Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * value)
{
___m_task_2 = value;
Il2CppCodeGenWriteBarrier((&___m_task_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.CompilerServices.AsyncVoidMethodBuilder
struct AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF_marshaled_pinvoke
{
SynchronizationContext_t06AEFE2C7CFCFC242D0A5729A74464AF18CF84E7 * ___m_synchronizationContext_0;
AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01_marshaled_pinvoke ___m_coreState_1;
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_2;
};
// Native definition for COM marshalling of System.Runtime.CompilerServices.AsyncVoidMethodBuilder
struct AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF_marshaled_com
{
SynchronizationContext_t06AEFE2C7CFCFC242D0A5729A74464AF18CF84E7 * ___m_synchronizationContext_0;
AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01_marshaled_com ___m_coreState_1;
Task_t1F48C203E163126EBC69ACCA679D1A462DEE9EB2 * ___m_task_2;
};
#endif // ASYNCVOIDMETHODBUILDER_T44E3C9B52B019BB5BDCC0E1BB83188B536161CFF_H
#ifndef COMPILATIONRELAXATIONS_TCFC58143CB8E81E1E407EEA8FF9C9DF876F0750B_H
#define COMPILATIONRELAXATIONS_TCFC58143CB8E81E1E407EEA8FF9C9DF876F0750B_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.CompilationRelaxations
struct CompilationRelaxations_tCFC58143CB8E81E1E407EEA8FF9C9DF876F0750B
{
public:
// System.Int32 System.Runtime.CompilerServices.CompilationRelaxations::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(CompilationRelaxations_tCFC58143CB8E81E1E407EEA8FF9C9DF876F0750B, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMPILATIONRELAXATIONS_TCFC58143CB8E81E1E407EEA8FF9C9DF876F0750B_H
#ifndef CONFIGUREDTASKAWAITABLE_T24DE1415466EE20060BE5AD528DC5C812CFA53A9_H
#define CONFIGUREDTASKAWAITABLE_T24DE1415466EE20060BE5AD528DC5C812CFA53A9_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.ConfiguredTaskAwaitable
struct ConfiguredTaskAwaitable_t24DE1415466EE20060BE5AD528DC5C812CFA53A9
{
public:
// System.Runtime.CompilerServices.ConfiguredTaskAwaitable_ConfiguredTaskAwaiter System.Runtime.CompilerServices.ConfiguredTaskAwaitable::m_configuredTaskAwaiter
ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874 ___m_configuredTaskAwaiter_0;
public:
inline static int32_t get_offset_of_m_configuredTaskAwaiter_0() { return static_cast<int32_t>(offsetof(ConfiguredTaskAwaitable_t24DE1415466EE20060BE5AD528DC5C812CFA53A9, ___m_configuredTaskAwaiter_0)); }
inline ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874 get_m_configuredTaskAwaiter_0() const { return ___m_configuredTaskAwaiter_0; }
inline ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874 * get_address_of_m_configuredTaskAwaiter_0() { return &___m_configuredTaskAwaiter_0; }
inline void set_m_configuredTaskAwaiter_0(ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874 value)
{
___m_configuredTaskAwaiter_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.CompilerServices.ConfiguredTaskAwaitable
struct ConfiguredTaskAwaitable_t24DE1415466EE20060BE5AD528DC5C812CFA53A9_marshaled_pinvoke
{
ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874_marshaled_pinvoke ___m_configuredTaskAwaiter_0;
};
// Native definition for COM marshalling of System.Runtime.CompilerServices.ConfiguredTaskAwaitable
struct ConfiguredTaskAwaitable_t24DE1415466EE20060BE5AD528DC5C812CFA53A9_marshaled_com
{
ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874_marshaled_com ___m_configuredTaskAwaiter_0;
};
#endif // CONFIGUREDTASKAWAITABLE_T24DE1415466EE20060BE5AD528DC5C812CFA53A9_H
#ifndef DATETIMECONSTANTATTRIBUTE_T4E7414CDD051958BEA1F01140F38441AA442D9BE_H
#define DATETIMECONSTANTATTRIBUTE_T4E7414CDD051958BEA1F01140F38441AA442D9BE_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.DateTimeConstantAttribute
struct DateTimeConstantAttribute_t4E7414CDD051958BEA1F01140F38441AA442D9BE : public CustomConstantAttribute_tBAC64D25BCB4BE5CAC32AC430CA8BEF070923191
{
public:
// System.DateTime System.Runtime.CompilerServices.DateTimeConstantAttribute::date
DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 ___date_0;
public:
inline static int32_t get_offset_of_date_0() { return static_cast<int32_t>(offsetof(DateTimeConstantAttribute_t4E7414CDD051958BEA1F01140F38441AA442D9BE, ___date_0)); }
inline DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 get_date_0() const { return ___date_0; }
inline DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 * get_address_of_date_0() { return &___date_0; }
inline void set_date_0(DateTime_t349B7449FBAAFF4192636E2B7A07694DA9236132 value)
{
___date_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIMECONSTANTATTRIBUTE_T4E7414CDD051958BEA1F01140F38441AA442D9BE_H
#ifndef DECIMALCONSTANTATTRIBUTE_T3DFC057911F4AF28AD6A0472300EBE4C038BD9B5_H
#define DECIMALCONSTANTATTRIBUTE_T3DFC057911F4AF28AD6A0472300EBE4C038BD9B5_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.DecimalConstantAttribute
struct DecimalConstantAttribute_t3DFC057911F4AF28AD6A0472300EBE4C038BD9B5 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Decimal System.Runtime.CompilerServices.DecimalConstantAttribute::dec
Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 ___dec_0;
public:
inline static int32_t get_offset_of_dec_0() { return static_cast<int32_t>(offsetof(DecimalConstantAttribute_t3DFC057911F4AF28AD6A0472300EBE4C038BD9B5, ___dec_0)); }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 get_dec_0() const { return ___dec_0; }
inline Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 * get_address_of_dec_0() { return &___dec_0; }
inline void set_dec_0(Decimal_t44EE9DA309A1BF848308DE4DDFC070CAE6D95EE8 value)
{
___dec_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DECIMALCONSTANTATTRIBUTE_T3DFC057911F4AF28AD6A0472300EBE4C038BD9B5_H
#ifndef ITERATORSTATEMACHINEATTRIBUTE_TECB2E5CA9F79A291BC0E217CD60F706C5AFC563E_H
#define ITERATORSTATEMACHINEATTRIBUTE_TECB2E5CA9F79A291BC0E217CD60F706C5AFC563E_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.IteratorStateMachineAttribute
struct IteratorStateMachineAttribute_tECB2E5CA9F79A291BC0E217CD60F706C5AFC563E : public StateMachineAttribute_t0F08DD69D5AB4A30C6A13E245143DD5335A4DA93
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ITERATORSTATEMACHINEATTRIBUTE_TECB2E5CA9F79A291BC0E217CD60F706C5AFC563E_H
#ifndef LOADHINT_TAD3279A5DC1810A6D778793F6D5D2B52F8E7D4AF_H
#define LOADHINT_TAD3279A5DC1810A6D778793F6D5D2B52F8E7D4AF_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.LoadHint
struct LoadHint_tAD3279A5DC1810A6D778793F6D5D2B52F8E7D4AF
{
public:
// System.Int32 System.Runtime.CompilerServices.LoadHint::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(LoadHint_tAD3279A5DC1810A6D778793F6D5D2B52F8E7D4AF, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // LOADHINT_TAD3279A5DC1810A6D778793F6D5D2B52F8E7D4AF_H
#ifndef CER_T26325DB2296A2720F6F7C6608A867BCCC7739807_H
#define CER_T26325DB2296A2720F6F7C6608A867BCCC7739807_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ConstrainedExecution.Cer
struct Cer_t26325DB2296A2720F6F7C6608A867BCCC7739807
{
public:
// System.Int32 System.Runtime.ConstrainedExecution.Cer::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Cer_t26325DB2296A2720F6F7C6608A867BCCC7739807, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CER_T26325DB2296A2720F6F7C6608A867BCCC7739807_H
#ifndef CONSISTENCY_TDE0B5998ED48C4408C59644E7E13E309B2309729_H
#define CONSISTENCY_TDE0B5998ED48C4408C59644E7E13E309B2309729_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ConstrainedExecution.Consistency
struct Consistency_tDE0B5998ED48C4408C59644E7E13E309B2309729
{
public:
// System.Int32 System.Runtime.ConstrainedExecution.Consistency::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Consistency_tDE0B5998ED48C4408C59644E7E13E309B2309729, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONSISTENCY_TDE0B5998ED48C4408C59644E7E13E309B2309729_H
#ifndef CALLINGCONVENTION_T1CA20C42BA91F62017CDE4192C0FF930E81A1193_H
#define CALLINGCONVENTION_T1CA20C42BA91F62017CDE4192C0FF930E81A1193_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.CallingConvention
struct CallingConvention_t1CA20C42BA91F62017CDE4192C0FF930E81A1193
{
public:
// System.Int32 System.Runtime.InteropServices.CallingConvention::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(CallingConvention_t1CA20C42BA91F62017CDE4192C0FF930E81A1193, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CALLINGCONVENTION_T1CA20C42BA91F62017CDE4192C0FF930E81A1193_H
#ifndef CHARSET_T2DEB2DA03477AAFC8FD2E1EC33F49904F85632A5_H
#define CHARSET_T2DEB2DA03477AAFC8FD2E1EC33F49904F85632A5_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.CharSet
struct CharSet_t2DEB2DA03477AAFC8FD2E1EC33F49904F85632A5
{
public:
// System.Int32 System.Runtime.InteropServices.CharSet::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(CharSet_t2DEB2DA03477AAFC8FD2E1EC33F49904F85632A5, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CHARSET_T2DEB2DA03477AAFC8FD2E1EC33F49904F85632A5_H
#ifndef CLASSINTERFACETYPE_TC166DABAA0841D0021D87E2F422AC8110E7601FB_H
#define CLASSINTERFACETYPE_TC166DABAA0841D0021D87E2F422AC8110E7601FB_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.ClassInterfaceType
struct ClassInterfaceType_tC166DABAA0841D0021D87E2F422AC8110E7601FB
{
public:
// System.Int32 System.Runtime.InteropServices.ClassInterfaceType::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ClassInterfaceType_tC166DABAA0841D0021D87E2F422AC8110E7601FB, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CLASSINTERFACETYPE_TC166DABAA0841D0021D87E2F422AC8110E7601FB_H
#ifndef COMINTERFACETYPE_T06F9ED45C423386837E822765B7A00AC4A2EE607_H
#define COMINTERFACETYPE_T06F9ED45C423386837E822765B7A00AC4A2EE607_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.ComInterfaceType
struct ComInterfaceType_t06F9ED45C423386837E822765B7A00AC4A2EE607
{
public:
// System.Int32 System.Runtime.InteropServices.ComInterfaceType::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ComInterfaceType_t06F9ED45C423386837E822765B7A00AC4A2EE607, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMINTERFACETYPE_T06F9ED45C423386837E822765B7A00AC4A2EE607_H
#ifndef DLLIMPORTSEARCHPATH_T87FBB9B032F725A0F0850D3506147F8479C6C962_H
#define DLLIMPORTSEARCHPATH_T87FBB9B032F725A0F0850D3506147F8479C6C962_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.DllImportSearchPath
struct DllImportSearchPath_t87FBB9B032F725A0F0850D3506147F8479C6C962
{
public:
// System.Int32 System.Runtime.InteropServices.DllImportSearchPath::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(DllImportSearchPath_t87FBB9B032F725A0F0850D3506147F8479C6C962, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DLLIMPORTSEARCHPATH_T87FBB9B032F725A0F0850D3506147F8479C6C962_H
#ifndef UNMANAGEDTYPE_T87C9136E3089DE290F40B9993907743F4E3102E3_H
#define UNMANAGEDTYPE_T87C9136E3089DE290F40B9993907743F4E3102E3_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.UnmanagedType
struct UnmanagedType_t87C9136E3089DE290F40B9993907743F4E3102E3
{
public:
// System.Int32 System.Runtime.InteropServices.UnmanagedType::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UnmanagedType_t87C9136E3089DE290F40B9993907743F4E3102E3, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UNMANAGEDTYPE_T87C9136E3089DE290F40B9993907743F4E3102E3_H
#ifndef VARENUM_TBFABAADE217FFEE0854CF0555E8A719CC5E0BDA0_H
#define VARENUM_TBFABAADE217FFEE0854CF0555E8A719CC5E0BDA0_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.VarEnum
struct VarEnum_tBFABAADE217FFEE0854CF0555E8A719CC5E0BDA0
{
public:
// System.Int32 System.Runtime.InteropServices.VarEnum::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(VarEnum_tBFABAADE217FFEE0854CF0555E8A719CC5E0BDA0, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VARENUM_TBFABAADE217FFEE0854CF0555E8A719CC5E0BDA0_H
#ifndef CALLTYPE_TBE39760BBF734FCF6769A65BFA1F512B1D107243_H
#define CALLTYPE_TBE39760BBF734FCF6769A65BFA1F512B1D107243_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.CallType
struct CallType_tBE39760BBF734FCF6769A65BFA1F512B1D107243
{
public:
// System.Int32 System.Runtime.Remoting.Messaging.CallType::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(CallType_tBE39760BBF734FCF6769A65BFA1F512B1D107243, ___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;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CALLTYPE_TBE39760BBF734FCF6769A65BFA1F512B1D107243_H
#ifndef ASYNCTASKMETHODBUILDER_T0CD1893D670405BED201BE8CA6F2E811F2C0F487_H
#define ASYNCTASKMETHODBUILDER_T0CD1893D670405BED201BE8CA6F2E811F2C0F487_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.AsyncTaskMethodBuilder
struct AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487
{
public:
// System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Threading.Tasks.VoidTaskResult> System.Runtime.CompilerServices.AsyncTaskMethodBuilder::m_builder
AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9 ___m_builder_1;
public:
inline static int32_t get_offset_of_m_builder_1() { return static_cast<int32_t>(offsetof(AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487, ___m_builder_1)); }
inline AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9 get_m_builder_1() const { return ___m_builder_1; }
inline AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9 * get_address_of_m_builder_1() { return &___m_builder_1; }
inline void set_m_builder_1(AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9 value)
{
___m_builder_1 = value;
}
};
struct AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487_StaticFields
{
public:
// System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult> System.Runtime.CompilerServices.AsyncTaskMethodBuilder::s_cachedCompleted
Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * ___s_cachedCompleted_0;
public:
inline static int32_t get_offset_of_s_cachedCompleted_0() { return static_cast<int32_t>(offsetof(AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487_StaticFields, ___s_cachedCompleted_0)); }
inline Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * get_s_cachedCompleted_0() const { return ___s_cachedCompleted_0; }
inline Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 ** get_address_of_s_cachedCompleted_0() { return &___s_cachedCompleted_0; }
inline void set_s_cachedCompleted_0(Task_1_t1359D75350E9D976BFA28AD96E417450DE277673 * value)
{
___s_cachedCompleted_0 = value;
Il2CppCodeGenWriteBarrier((&___s_cachedCompleted_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.CompilerServices.AsyncTaskMethodBuilder
struct AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487_marshaled_pinvoke
{
AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9 ___m_builder_1;
};
// Native definition for COM marshalling of System.Runtime.CompilerServices.AsyncTaskMethodBuilder
struct AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487_marshaled_com
{
AsyncTaskMethodBuilder_1_t66ED1808B26B8081A2804D6A750D13386E360BD9 ___m_builder_1;
};
#endif // ASYNCTASKMETHODBUILDER_T0CD1893D670405BED201BE8CA6F2E811F2C0F487_H
#ifndef DEFAULTDEPENDENCYATTRIBUTE_T5401DA33101638B630ABCB8C22120ABDB29FE191_H
#define DEFAULTDEPENDENCYATTRIBUTE_T5401DA33101638B630ABCB8C22120ABDB29FE191_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.DefaultDependencyAttribute
struct DefaultDependencyAttribute_t5401DA33101638B630ABCB8C22120ABDB29FE191 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Runtime.CompilerServices.LoadHint System.Runtime.CompilerServices.DefaultDependencyAttribute::loadHint
int32_t ___loadHint_0;
public:
inline static int32_t get_offset_of_loadHint_0() { return static_cast<int32_t>(offsetof(DefaultDependencyAttribute_t5401DA33101638B630ABCB8C22120ABDB29FE191, ___loadHint_0)); }
inline int32_t get_loadHint_0() const { return ___loadHint_0; }
inline int32_t* get_address_of_loadHint_0() { return &___loadHint_0; }
inline void set_loadHint_0(int32_t value)
{
___loadHint_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DEFAULTDEPENDENCYATTRIBUTE_T5401DA33101638B630ABCB8C22120ABDB29FE191_H
#ifndef DEPENDENCYATTRIBUTE_TA90C07E3131623E3AEA30E4DDF8F6B188985EA57_H
#define DEPENDENCYATTRIBUTE_TA90C07E3131623E3AEA30E4DDF8F6B188985EA57_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.CompilerServices.DependencyAttribute
struct DependencyAttribute_tA90C07E3131623E3AEA30E4DDF8F6B188985EA57 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.String System.Runtime.CompilerServices.DependencyAttribute::dependentAssembly
String_t* ___dependentAssembly_0;
// System.Runtime.CompilerServices.LoadHint System.Runtime.CompilerServices.DependencyAttribute::loadHint
int32_t ___loadHint_1;
public:
inline static int32_t get_offset_of_dependentAssembly_0() { return static_cast<int32_t>(offsetof(DependencyAttribute_tA90C07E3131623E3AEA30E4DDF8F6B188985EA57, ___dependentAssembly_0)); }
inline String_t* get_dependentAssembly_0() const { return ___dependentAssembly_0; }
inline String_t** get_address_of_dependentAssembly_0() { return &___dependentAssembly_0; }
inline void set_dependentAssembly_0(String_t* value)
{
___dependentAssembly_0 = value;
Il2CppCodeGenWriteBarrier((&___dependentAssembly_0), value);
}
inline static int32_t get_offset_of_loadHint_1() { return static_cast<int32_t>(offsetof(DependencyAttribute_tA90C07E3131623E3AEA30E4DDF8F6B188985EA57, ___loadHint_1)); }
inline int32_t get_loadHint_1() const { return ___loadHint_1; }
inline int32_t* get_address_of_loadHint_1() { return &___loadHint_1; }
inline void set_loadHint_1(int32_t value)
{
___loadHint_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DEPENDENCYATTRIBUTE_TA90C07E3131623E3AEA30E4DDF8F6B188985EA57_H
#ifndef RELIABILITYCONTRACTATTRIBUTE_T784D3086C6F43192DE3A8676636DE98EE2CBEE45_H
#define RELIABILITYCONTRACTATTRIBUTE_T784D3086C6F43192DE3A8676636DE98EE2CBEE45_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ConstrainedExecution.ReliabilityContractAttribute
struct ReliabilityContractAttribute_t784D3086C6F43192DE3A8676636DE98EE2CBEE45 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Runtime.ConstrainedExecution.Consistency System.Runtime.ConstrainedExecution.ReliabilityContractAttribute::_consistency
int32_t ____consistency_0;
// System.Runtime.ConstrainedExecution.Cer System.Runtime.ConstrainedExecution.ReliabilityContractAttribute::_cer
int32_t ____cer_1;
public:
inline static int32_t get_offset_of__consistency_0() { return static_cast<int32_t>(offsetof(ReliabilityContractAttribute_t784D3086C6F43192DE3A8676636DE98EE2CBEE45, ____consistency_0)); }
inline int32_t get__consistency_0() const { return ____consistency_0; }
inline int32_t* get_address_of__consistency_0() { return &____consistency_0; }
inline void set__consistency_0(int32_t value)
{
____consistency_0 = value;
}
inline static int32_t get_offset_of__cer_1() { return static_cast<int32_t>(offsetof(ReliabilityContractAttribute_t784D3086C6F43192DE3A8676636DE98EE2CBEE45, ____cer_1)); }
inline int32_t get__cer_1() const { return ____cer_1; }
inline int32_t* get_address_of__cer_1() { return &____cer_1; }
inline void set__cer_1(int32_t value)
{
____cer_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RELIABILITYCONTRACTATTRIBUTE_T784D3086C6F43192DE3A8676636DE98EE2CBEE45_H
#ifndef CLASSINTERFACEATTRIBUTE_TC3F85A84242581EC37E2682E71720E10AC189154_H
#define CLASSINTERFACEATTRIBUTE_TC3F85A84242581EC37E2682E71720E10AC189154_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.ClassInterfaceAttribute
struct ClassInterfaceAttribute_tC3F85A84242581EC37E2682E71720E10AC189154 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Runtime.InteropServices.ClassInterfaceType System.Runtime.InteropServices.ClassInterfaceAttribute::_val
int32_t ____val_0;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(ClassInterfaceAttribute_tC3F85A84242581EC37E2682E71720E10AC189154, ____val_0)); }
inline int32_t get__val_0() const { return ____val_0; }
inline int32_t* get_address_of__val_0() { return &____val_0; }
inline void set__val_0(int32_t value)
{
____val_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CLASSINTERFACEATTRIBUTE_TC3F85A84242581EC37E2682E71720E10AC189154_H
#ifndef DEFAULTDLLIMPORTSEARCHPATHSATTRIBUTE_T78F841C413557838706F822862BAE029C8CF9B87_H
#define DEFAULTDLLIMPORTSEARCHPATHSATTRIBUTE_T78F841C413557838706F822862BAE029C8CF9B87_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute
struct DefaultDllImportSearchPathsAttribute_t78F841C413557838706F822862BAE029C8CF9B87 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Runtime.InteropServices.DllImportSearchPath System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute::_paths
int32_t ____paths_0;
public:
inline static int32_t get_offset_of__paths_0() { return static_cast<int32_t>(offsetof(DefaultDllImportSearchPathsAttribute_t78F841C413557838706F822862BAE029C8CF9B87, ____paths_0)); }
inline int32_t get__paths_0() const { return ____paths_0; }
inline int32_t* get_address_of__paths_0() { return &____paths_0; }
inline void set__paths_0(int32_t value)
{
____paths_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DEFAULTDLLIMPORTSEARCHPATHSATTRIBUTE_T78F841C413557838706F822862BAE029C8CF9B87_H
#ifndef DLLIMPORTATTRIBUTE_T75AED23F20C2D5E5D64417CAF2E886FC827D2048_H
#define DLLIMPORTATTRIBUTE_T75AED23F20C2D5E5D64417CAF2E886FC827D2048_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.DllImportAttribute
struct DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048 : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.String System.Runtime.InteropServices.DllImportAttribute::_val
String_t* ____val_0;
// System.String System.Runtime.InteropServices.DllImportAttribute::EntryPoint
String_t* ___EntryPoint_1;
// System.Runtime.InteropServices.CharSet System.Runtime.InteropServices.DllImportAttribute::CharSet
int32_t ___CharSet_2;
// System.Boolean System.Runtime.InteropServices.DllImportAttribute::SetLastError
bool ___SetLastError_3;
// System.Boolean System.Runtime.InteropServices.DllImportAttribute::ExactSpelling
bool ___ExactSpelling_4;
// System.Boolean System.Runtime.InteropServices.DllImportAttribute::PreserveSig
bool ___PreserveSig_5;
// System.Runtime.InteropServices.CallingConvention System.Runtime.InteropServices.DllImportAttribute::CallingConvention
int32_t ___CallingConvention_6;
// System.Boolean System.Runtime.InteropServices.DllImportAttribute::BestFitMapping
bool ___BestFitMapping_7;
// System.Boolean System.Runtime.InteropServices.DllImportAttribute::ThrowOnUnmappableChar
bool ___ThrowOnUnmappableChar_8;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ____val_0)); }
inline String_t* get__val_0() const { return ____val_0; }
inline String_t** get_address_of__val_0() { return &____val_0; }
inline void set__val_0(String_t* value)
{
____val_0 = value;
Il2CppCodeGenWriteBarrier((&____val_0), value);
}
inline static int32_t get_offset_of_EntryPoint_1() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___EntryPoint_1)); }
inline String_t* get_EntryPoint_1() const { return ___EntryPoint_1; }
inline String_t** get_address_of_EntryPoint_1() { return &___EntryPoint_1; }
inline void set_EntryPoint_1(String_t* value)
{
___EntryPoint_1 = value;
Il2CppCodeGenWriteBarrier((&___EntryPoint_1), value);
}
inline static int32_t get_offset_of_CharSet_2() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___CharSet_2)); }
inline int32_t get_CharSet_2() const { return ___CharSet_2; }
inline int32_t* get_address_of_CharSet_2() { return &___CharSet_2; }
inline void set_CharSet_2(int32_t value)
{
___CharSet_2 = value;
}
inline static int32_t get_offset_of_SetLastError_3() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___SetLastError_3)); }
inline bool get_SetLastError_3() const { return ___SetLastError_3; }
inline bool* get_address_of_SetLastError_3() { return &___SetLastError_3; }
inline void set_SetLastError_3(bool value)
{
___SetLastError_3 = value;
}
inline static int32_t get_offset_of_ExactSpelling_4() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___ExactSpelling_4)); }
inline bool get_ExactSpelling_4() const { return ___ExactSpelling_4; }
inline bool* get_address_of_ExactSpelling_4() { return &___ExactSpelling_4; }
inline void set_ExactSpelling_4(bool value)
{
___ExactSpelling_4 = value;
}
inline static int32_t get_offset_of_PreserveSig_5() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___PreserveSig_5)); }
inline bool get_PreserveSig_5() const { return ___PreserveSig_5; }
inline bool* get_address_of_PreserveSig_5() { return &___PreserveSig_5; }
inline void set_PreserveSig_5(bool value)
{
___PreserveSig_5 = value;
}
inline static int32_t get_offset_of_CallingConvention_6() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___CallingConvention_6)); }
inline int32_t get_CallingConvention_6() const { return ___CallingConvention_6; }
inline int32_t* get_address_of_CallingConvention_6() { return &___CallingConvention_6; }
inline void set_CallingConvention_6(int32_t value)
{
___CallingConvention_6 = value;
}
inline static int32_t get_offset_of_BestFitMapping_7() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___BestFitMapping_7)); }
inline bool get_BestFitMapping_7() const { return ___BestFitMapping_7; }
inline bool* get_address_of_BestFitMapping_7() { return &___BestFitMapping_7; }
inline void set_BestFitMapping_7(bool value)
{
___BestFitMapping_7 = value;
}
inline static int32_t get_offset_of_ThrowOnUnmappableChar_8() { return static_cast<int32_t>(offsetof(DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048, ___ThrowOnUnmappableChar_8)); }
inline bool get_ThrowOnUnmappableChar_8() const { return ___ThrowOnUnmappableChar_8; }
inline bool* get_address_of_ThrowOnUnmappableChar_8() { return &___ThrowOnUnmappableChar_8; }
inline void set_ThrowOnUnmappableChar_8(bool value)
{
___ThrowOnUnmappableChar_8 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DLLIMPORTATTRIBUTE_T75AED23F20C2D5E5D64417CAF2E886FC827D2048_H
#ifndef INTERFACETYPEATTRIBUTE_T4FD9BC97FD0CCFF82FA0562D6F897A54C00F9BEF_H
#define INTERFACETYPEATTRIBUTE_T4FD9BC97FD0CCFF82FA0562D6F897A54C00F9BEF_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.InterfaceTypeAttribute
struct InterfaceTypeAttribute_t4FD9BC97FD0CCFF82FA0562D6F897A54C00F9BEF : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Runtime.InteropServices.ComInterfaceType System.Runtime.InteropServices.InterfaceTypeAttribute::_val
int32_t ____val_0;
public:
inline static int32_t get_offset_of__val_0() { return static_cast<int32_t>(offsetof(InterfaceTypeAttribute_t4FD9BC97FD0CCFF82FA0562D6F897A54C00F9BEF, ____val_0)); }
inline int32_t get__val_0() const { return ____val_0; }
inline int32_t* get_address_of__val_0() { return &____val_0; }
inline void set__val_0(int32_t value)
{
____val_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INTERFACETYPEATTRIBUTE_T4FD9BC97FD0CCFF82FA0562D6F897A54C00F9BEF_H
#ifndef UNMANAGEDFUNCTIONPOINTERATTRIBUTE_TC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F_H
#define UNMANAGEDFUNCTIONPOINTERATTRIBUTE_TC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute
struct UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F : public Attribute_tF048C13FB3C8CFCC53F82290E4A3F621089F9A74
{
public:
// System.Runtime.InteropServices.CallingConvention System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute::m_callingConvention
int32_t ___m_callingConvention_0;
// System.Runtime.InteropServices.CharSet System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute::CharSet
int32_t ___CharSet_1;
// System.Boolean System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute::BestFitMapping
bool ___BestFitMapping_2;
// System.Boolean System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute::ThrowOnUnmappableChar
bool ___ThrowOnUnmappableChar_3;
// System.Boolean System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute::SetLastError
bool ___SetLastError_4;
public:
inline static int32_t get_offset_of_m_callingConvention_0() { return static_cast<int32_t>(offsetof(UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F, ___m_callingConvention_0)); }
inline int32_t get_m_callingConvention_0() const { return ___m_callingConvention_0; }
inline int32_t* get_address_of_m_callingConvention_0() { return &___m_callingConvention_0; }
inline void set_m_callingConvention_0(int32_t value)
{
___m_callingConvention_0 = value;
}
inline static int32_t get_offset_of_CharSet_1() { return static_cast<int32_t>(offsetof(UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F, ___CharSet_1)); }
inline int32_t get_CharSet_1() const { return ___CharSet_1; }
inline int32_t* get_address_of_CharSet_1() { return &___CharSet_1; }
inline void set_CharSet_1(int32_t value)
{
___CharSet_1 = value;
}
inline static int32_t get_offset_of_BestFitMapping_2() { return static_cast<int32_t>(offsetof(UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F, ___BestFitMapping_2)); }
inline bool get_BestFitMapping_2() const { return ___BestFitMapping_2; }
inline bool* get_address_of_BestFitMapping_2() { return &___BestFitMapping_2; }
inline void set_BestFitMapping_2(bool value)
{
___BestFitMapping_2 = value;
}
inline static int32_t get_offset_of_ThrowOnUnmappableChar_3() { return static_cast<int32_t>(offsetof(UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F, ___ThrowOnUnmappableChar_3)); }
inline bool get_ThrowOnUnmappableChar_3() const { return ___ThrowOnUnmappableChar_3; }
inline bool* get_address_of_ThrowOnUnmappableChar_3() { return &___ThrowOnUnmappableChar_3; }
inline void set_ThrowOnUnmappableChar_3(bool value)
{
___ThrowOnUnmappableChar_3 = value;
}
inline static int32_t get_offset_of_SetLastError_4() { return static_cast<int32_t>(offsetof(UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F, ___SetLastError_4)); }
inline bool get_SetLastError_4() const { return ___SetLastError_4; }
inline bool* get_address_of_SetLastError_4() { return &___SetLastError_4; }
inline void set_SetLastError_4(bool value)
{
___SetLastError_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UNMANAGEDFUNCTIONPOINTERATTRIBUTE_TC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F_H
#ifndef MONOMETHODMESSAGE_T0846334ADE91F66FECE638BEF57256CFF6EEA234_H
#define MONOMETHODMESSAGE_T0846334ADE91F66FECE638BEF57256CFF6EEA234_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.Remoting.Messaging.MonoMethodMessage
struct MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234 : public RuntimeObject
{
public:
// System.Reflection.MonoMethod System.Runtime.Remoting.Messaging.MonoMethodMessage::method
MonoMethod_t * ___method_0;
// System.Object[] System.Runtime.Remoting.Messaging.MonoMethodMessage::args
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ___args_1;
// System.String[] System.Runtime.Remoting.Messaging.MonoMethodMessage::names
StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ___names_2;
// System.Byte[] System.Runtime.Remoting.Messaging.MonoMethodMessage::arg_types
ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___arg_types_3;
// System.Runtime.Remoting.Messaging.LogicalCallContext System.Runtime.Remoting.Messaging.MonoMethodMessage::ctx
LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * ___ctx_4;
// System.Object System.Runtime.Remoting.Messaging.MonoMethodMessage::rval
RuntimeObject * ___rval_5;
// System.Exception System.Runtime.Remoting.Messaging.MonoMethodMessage::exc
Exception_t * ___exc_6;
// System.Runtime.Remoting.Messaging.AsyncResult System.Runtime.Remoting.Messaging.MonoMethodMessage::asyncResult
AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2 * ___asyncResult_7;
// System.Runtime.Remoting.Messaging.CallType System.Runtime.Remoting.Messaging.MonoMethodMessage::call_type
int32_t ___call_type_8;
// System.String System.Runtime.Remoting.Messaging.MonoMethodMessage::uri
String_t* ___uri_9;
// System.Runtime.Remoting.Messaging.MCMDictionary System.Runtime.Remoting.Messaging.MonoMethodMessage::properties
MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434 * ___properties_10;
// System.Type[] System.Runtime.Remoting.Messaging.MonoMethodMessage::methodSignature
TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___methodSignature_11;
// System.Runtime.Remoting.Identity System.Runtime.Remoting.Messaging.MonoMethodMessage::identity
Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * ___identity_12;
public:
inline static int32_t get_offset_of_method_0() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___method_0)); }
inline MonoMethod_t * get_method_0() const { return ___method_0; }
inline MonoMethod_t ** get_address_of_method_0() { return &___method_0; }
inline void set_method_0(MonoMethod_t * value)
{
___method_0 = value;
Il2CppCodeGenWriteBarrier((&___method_0), value);
}
inline static int32_t get_offset_of_args_1() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___args_1)); }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* get_args_1() const { return ___args_1; }
inline ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A** get_address_of_args_1() { return &___args_1; }
inline void set_args_1(ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* value)
{
___args_1 = value;
Il2CppCodeGenWriteBarrier((&___args_1), value);
}
inline static int32_t get_offset_of_names_2() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___names_2)); }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get_names_2() const { return ___names_2; }
inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of_names_2() { return &___names_2; }
inline void set_names_2(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value)
{
___names_2 = value;
Il2CppCodeGenWriteBarrier((&___names_2), value);
}
inline static int32_t get_offset_of_arg_types_3() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___arg_types_3)); }
inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* get_arg_types_3() const { return ___arg_types_3; }
inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821** get_address_of_arg_types_3() { return &___arg_types_3; }
inline void set_arg_types_3(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* value)
{
___arg_types_3 = value;
Il2CppCodeGenWriteBarrier((&___arg_types_3), value);
}
inline static int32_t get_offset_of_ctx_4() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___ctx_4)); }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * get_ctx_4() const { return ___ctx_4; }
inline LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E ** get_address_of_ctx_4() { return &___ctx_4; }
inline void set_ctx_4(LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * value)
{
___ctx_4 = value;
Il2CppCodeGenWriteBarrier((&___ctx_4), value);
}
inline static int32_t get_offset_of_rval_5() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___rval_5)); }
inline RuntimeObject * get_rval_5() const { return ___rval_5; }
inline RuntimeObject ** get_address_of_rval_5() { return &___rval_5; }
inline void set_rval_5(RuntimeObject * value)
{
___rval_5 = value;
Il2CppCodeGenWriteBarrier((&___rval_5), value);
}
inline static int32_t get_offset_of_exc_6() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___exc_6)); }
inline Exception_t * get_exc_6() const { return ___exc_6; }
inline Exception_t ** get_address_of_exc_6() { return &___exc_6; }
inline void set_exc_6(Exception_t * value)
{
___exc_6 = value;
Il2CppCodeGenWriteBarrier((&___exc_6), value);
}
inline static int32_t get_offset_of_asyncResult_7() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___asyncResult_7)); }
inline AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2 * get_asyncResult_7() const { return ___asyncResult_7; }
inline AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2 ** get_address_of_asyncResult_7() { return &___asyncResult_7; }
inline void set_asyncResult_7(AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2 * value)
{
___asyncResult_7 = value;
Il2CppCodeGenWriteBarrier((&___asyncResult_7), value);
}
inline static int32_t get_offset_of_call_type_8() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___call_type_8)); }
inline int32_t get_call_type_8() const { return ___call_type_8; }
inline int32_t* get_address_of_call_type_8() { return &___call_type_8; }
inline void set_call_type_8(int32_t value)
{
___call_type_8 = value;
}
inline static int32_t get_offset_of_uri_9() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___uri_9)); }
inline String_t* get_uri_9() const { return ___uri_9; }
inline String_t** get_address_of_uri_9() { return &___uri_9; }
inline void set_uri_9(String_t* value)
{
___uri_9 = value;
Il2CppCodeGenWriteBarrier((&___uri_9), value);
}
inline static int32_t get_offset_of_properties_10() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___properties_10)); }
inline MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434 * get_properties_10() const { return ___properties_10; }
inline MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434 ** get_address_of_properties_10() { return &___properties_10; }
inline void set_properties_10(MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434 * value)
{
___properties_10 = value;
Il2CppCodeGenWriteBarrier((&___properties_10), value);
}
inline static int32_t get_offset_of_methodSignature_11() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___methodSignature_11)); }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get_methodSignature_11() const { return ___methodSignature_11; }
inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of_methodSignature_11() { return &___methodSignature_11; }
inline void set_methodSignature_11(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value)
{
___methodSignature_11 = value;
Il2CppCodeGenWriteBarrier((&___methodSignature_11), value);
}
inline static int32_t get_offset_of_identity_12() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234, ___identity_12)); }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * get_identity_12() const { return ___identity_12; }
inline Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 ** get_address_of_identity_12() { return &___identity_12; }
inline void set_identity_12(Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * value)
{
___identity_12 = value;
Il2CppCodeGenWriteBarrier((&___identity_12), value);
}
};
struct MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_StaticFields
{
public:
// System.String System.Runtime.Remoting.Messaging.MonoMethodMessage::CallContextKey
String_t* ___CallContextKey_13;
// System.String System.Runtime.Remoting.Messaging.MonoMethodMessage::UriKey
String_t* ___UriKey_14;
public:
inline static int32_t get_offset_of_CallContextKey_13() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_StaticFields, ___CallContextKey_13)); }
inline String_t* get_CallContextKey_13() const { return ___CallContextKey_13; }
inline String_t** get_address_of_CallContextKey_13() { return &___CallContextKey_13; }
inline void set_CallContextKey_13(String_t* value)
{
___CallContextKey_13 = value;
Il2CppCodeGenWriteBarrier((&___CallContextKey_13), value);
}
inline static int32_t get_offset_of_UriKey_14() { return static_cast<int32_t>(offsetof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_StaticFields, ___UriKey_14)); }
inline String_t* get_UriKey_14() const { return ___UriKey_14; }
inline String_t** get_address_of_UriKey_14() { return &___UriKey_14; }
inline void set_UriKey_14(String_t* value)
{
___UriKey_14 = value;
Il2CppCodeGenWriteBarrier((&___UriKey_14), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Runtime.Remoting.Messaging.MonoMethodMessage
struct MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_marshaled_pinvoke
{
MonoMethod_t * ___method_0;
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ___args_1;
char** ___names_2;
uint8_t* ___arg_types_3;
LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * ___ctx_4;
Il2CppIUnknown* ___rval_5;
Exception_t_marshaled_pinvoke* ___exc_6;
AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2_marshaled_pinvoke* ___asyncResult_7;
int32_t ___call_type_8;
char* ___uri_9;
MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434 * ___properties_10;
TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___methodSignature_11;
Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * ___identity_12;
};
// Native definition for COM marshalling of System.Runtime.Remoting.Messaging.MonoMethodMessage
struct MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_marshaled_com
{
MonoMethod_t * ___method_0;
ObjectU5BU5D_t3C9242B5C88A48B2A5BD9FDA6CD0024E792AF08A* ___args_1;
Il2CppChar** ___names_2;
uint8_t* ___arg_types_3;
LogicalCallContext_t3A9A7C02A28577F0879F6E950E46EEC595731D7E * ___ctx_4;
Il2CppIUnknown* ___rval_5;
Exception_t_marshaled_com* ___exc_6;
AsyncResult_tCCDC69FF29D3DE32F7BD57870BBC329EFF8E58E2_marshaled_com* ___asyncResult_7;
int32_t ___call_type_8;
Il2CppChar* ___uri_9;
MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434 * ___properties_10;
TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___methodSignature_11;
Identity_tB4E8BEFF42D505C9B24C9284934E6538F29606B6 * ___identity_12;
};
#endif // MONOMETHODMESSAGE_T0846334ADE91F66FECE638BEF57256CFF6EEA234_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1100 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1101 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1102 = { sizeof (MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1102[11] =
{
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__uri_0(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__typeName_1(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__methodName_2(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__args_3(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__methodSignature_4(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__methodBase_5(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__callContext_6(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__targetIdentity_7(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of__genericArguments_8(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of_ExternalProperties_9(),
MethodCall_tF8FFD68F9EB80746F22EA5B9C23E9701A440E5CA::get_offset_of_InternalProperties_10(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1103 = { sizeof (MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434), -1, sizeof(MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1103[1] =
{
MCMDictionary_tD801081CC84A219F173B4A5A90A53A75A43D5434_StaticFields::get_offset_of_InternalKeys_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1104 = { sizeof (MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1104[4] =
{
MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5::get_offset_of__internalProperties_0(),
MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5::get_offset_of__message_1(),
MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5::get_offset_of__methodKeys_2(),
MessageDictionary_tC2DDCAFD65B74954A76393BCE90E57F58298F5C5::get_offset_of__ownProperties_3(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1105 = { sizeof (DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1105[3] =
{
DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9::get_offset_of__methodDictionary_0(),
DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9::get_offset_of__hashtableEnum_1(),
DictionaryEnumerator_tA162086B57068DE62A7BAD2CAA7003E632DE2AB9::get_offset_of__posMethod_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1106 = { sizeof (MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1106[15] =
{
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__methodName_0(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__uri_1(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__typeName_2(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__methodBase_3(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__returnValue_4(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__exception_5(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__methodSignature_6(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__inArgInfo_7(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__args_8(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__outArgs_9(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__callMsg_10(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__callContext_11(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of__targetIdentity_12(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of_ExternalProperties_13(),
MethodResponse_t185820C6B3E7D56E9026084CB2CEF1387151D907::get_offset_of_InternalProperties_14(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1107 = { sizeof (MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48), -1, sizeof(MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1107[2] =
{
MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48_StaticFields::get_offset_of_InternalReturnKeys_4(),
MethodReturnDictionary_tFCD4ADFA43AA2736517130020BBB9E60A253EB48_StaticFields::get_offset_of_InternalExceptionKeys_5(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1108 = { sizeof (MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234), -1, sizeof(MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1108[15] =
{
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_method_0(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_args_1(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_names_2(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_arg_types_3(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_ctx_4(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_rval_5(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_exc_6(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_asyncResult_7(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_call_type_8(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_uri_9(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_properties_10(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_methodSignature_11(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234::get_offset_of_identity_12(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_StaticFields::get_offset_of_CallContextKey_13(),
MonoMethodMessage_t0846334ADE91F66FECE638BEF57256CFF6EEA234_StaticFields::get_offset_of_UriKey_14(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1109 = { sizeof (CallType_tBE39760BBF734FCF6769A65BFA1F512B1D107243)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1109[5] =
{
CallType_tBE39760BBF734FCF6769A65BFA1F512B1D107243::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1110 = { sizeof (OneWayAttribute_t848DB2BC395D34A01B2932EEC85CEA65CA9C9B43), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1111 = { sizeof (RemotingSurrogate_t722F41294C1F4DEA38A993DB43F51AC8CBB494BA), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1112 = { sizeof (ObjRefSurrogate_tE2F801FFAE2DBDE6B44A528F7E537922F3840547), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1113 = { sizeof (RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44), -1, sizeof(RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1113[4] =
{
RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields::get_offset_of_s_cachedTypeObjRef_0(),
RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields::get_offset_of__objRefSurrogate_1(),
RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44_StaticFields::get_offset_of__objRemotingSurrogate_2(),
RemotingSurrogateSelector_tEABB3D5ACF04B7270F565E8BC105DDD94DDFFE44::get_offset_of__next_3(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1114 = { sizeof (ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1114[13] =
{
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__outArgs_0(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__args_1(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__callCtx_2(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__returnValue_3(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__uri_4(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__exception_5(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__methodBase_6(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__methodName_7(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__methodSignature_8(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__typeName_9(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__properties_10(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__targetIdentity_11(),
ReturnMessage_tCB42BAB06521388D0FC8E5745FC9A74FCC4E6E03::get_offset_of__inArgInfo_12(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1115 = { sizeof (ServerContextTerminatorSink_t11FA44A0CACACA4A89B73434FB6D685479C6B8E0), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1116 = { sizeof (ServerObjectTerminatorSink_t635122FE05BCEDE34F4B07AA9590AD77509752FD), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1116[1] =
{
ServerObjectTerminatorSink_t635122FE05BCEDE34F4B07AA9590AD77509752FD::get_offset_of__nextSink_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1117 = { sizeof (ServerObjectReplySink_tE1CEF247A2AC5DFD53842706CFE097CE9556CCB8), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1117[2] =
{
ServerObjectReplySink_tE1CEF247A2AC5DFD53842706CFE097CE9556CCB8::get_offset_of__replySink_0(),
ServerObjectReplySink_tE1CEF247A2AC5DFD53842706CFE097CE9556CCB8::get_offset_of__identity_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1118 = { sizeof (StackBuilderSink_t312B8C166D43B3871C33905CA64E57520C479897), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1118[2] =
{
StackBuilderSink_t312B8C166D43B3871C33905CA64E57520C479897::get_offset_of__target_0(),
StackBuilderSink_t312B8C166D43B3871C33905CA64E57520C479897::get_offset_of__rp_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1119 = { sizeof (HandleProcessCorruptedStateExceptionsAttribute_tA72E0974E174E223166E56C7E2B20C319C322260), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1120 = { sizeof (FirstChanceExceptionEventArgs_t0FA7904C9F4BAA2FC640BE3E5AC348F153AD8B6D), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1121 = { sizeof (ExceptionDispatchInfo_t0C54083F3909DAF986A4DEAA7C047559531E0E2A), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1121[2] =
{
ExceptionDispatchInfo_t0C54083F3909DAF986A4DEAA7C047559531E0E2A::get_offset_of_m_Exception_0(),
ExceptionDispatchInfo_t0C54083F3909DAF986A4DEAA7C047559531E0E2A::get_offset_of_m_stackTrace_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1122 = { sizeof (CriticalFinalizerObject_t8B006E1DEE084E781F5C0F3283E9226E28894DD9), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1123 = { sizeof (Consistency_tDE0B5998ED48C4408C59644E7E13E309B2309729)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1123[5] =
{
Consistency_tDE0B5998ED48C4408C59644E7E13E309B2309729::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1124 = { sizeof (Cer_t26325DB2296A2720F6F7C6608A867BCCC7739807)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1124[4] =
{
Cer_t26325DB2296A2720F6F7C6608A867BCCC7739807::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1125 = { sizeof (ReliabilityContractAttribute_t784D3086C6F43192DE3A8676636DE98EE2CBEE45), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1125[2] =
{
ReliabilityContractAttribute_t784D3086C6F43192DE3A8676636DE98EE2CBEE45::get_offset_of__consistency_0(),
ReliabilityContractAttribute_t784D3086C6F43192DE3A8676636DE98EE2CBEE45::get_offset_of__cer_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1126 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1127 = { sizeof (IsReadOnlyAttribute_tD69A056AD347DF5A551044EAB596F41434DF462D), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1128 = { sizeof (AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF)+ sizeof (RuntimeObject), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1128[3] =
{
AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF::get_offset_of_m_synchronizationContext_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF::get_offset_of_m_coreState_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
AsyncVoidMethodBuilder_t44E3C9B52B019BB5BDCC0E1BB83188B536161CFF::get_offset_of_m_task_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1129 = { sizeof (AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487)+ sizeof (RuntimeObject), -1, sizeof(AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1129[2] =
{
AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487_StaticFields::get_offset_of_s_cachedCompleted_0(),
AsyncTaskMethodBuilder_t0CD1893D670405BED201BE8CA6F2E811F2C0F487::get_offset_of_m_builder_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1130 = { 0, 0, 0, 0 };
extern const int32_t g_FieldOffsetTable1130[3] =
{
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1131 = { sizeof (AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF), -1, sizeof(AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1131[3] =
{
AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields::get_offset_of_TrueTask_0(),
AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields::get_offset_of_FalseTask_1(),
AsyncTaskCache_t34A97832FCD6948CE68777740FA37AEAB550E6CF_StaticFields::get_offset_of_Int32Tasks_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1132 = { sizeof (AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01)+ sizeof (RuntimeObject), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1132[2] =
{
AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01::get_offset_of_m_stateMachine_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
AsyncMethodBuilderCore_t4CE6C1E4B0621A6EC45CF6E0E8F1F633FFF9FF01::get_offset_of_m_defaultContextAction_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1133 = { sizeof (MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A), -1, sizeof(MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1133[3] =
{
MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A::get_offset_of_m_context_0(),
MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A::get_offset_of_m_stateMachine_1(),
MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_StaticFields::get_offset_of_s_invokeMoveNext_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1134 = { sizeof (ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1134[3] =
{
ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201::get_offset_of_m_continuation_0(),
ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201::get_offset_of_m_invokeAction_1(),
ContinuationWrapper_tCC429E05B578FB77DAD5970B18B3DD07748DB201::get_offset_of_m_innerTask_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1135 = { sizeof (U3CU3Ec__DisplayClass4_0_t91BE7D82E3148DC17AD2CF3AFA190EE3018F2368), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1135[2] =
{
U3CU3Ec__DisplayClass4_0_t91BE7D82E3148DC17AD2CF3AFA190EE3018F2368::get_offset_of_innerTask_0(),
U3CU3Ec__DisplayClass4_0_t91BE7D82E3148DC17AD2CF3AFA190EE3018F2368::get_offset_of_continuation_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1136 = { sizeof (U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079), -1, sizeof(U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1136[3] =
{
U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields::get_offset_of_U3CU3E9_0(),
U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields::get_offset_of_U3CU3E9__6_0_1(),
U3CU3Ec_tFBB9560424DFB5E39123CDE092BE03875E657079_StaticFields::get_offset_of_U3CU3E9__6_1_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1137 = { sizeof (AsyncStateMachineAttribute_t71790D316286529022E8E3342C82150023358A00), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1138 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1139 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1140 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1141 = { sizeof (IteratorStateMachineAttribute_tECB2E5CA9F79A291BC0E217CD60F706C5AFC563E), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1142 = { sizeof (RuntimeCompatibilityAttribute_tF386C60D3DD4A0E1759F1D8F76841FC4522A6126), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1142[1] =
{
RuntimeCompatibilityAttribute_tF386C60D3DD4A0E1759F1D8F76841FC4522A6126::get_offset_of_m_wrapNonExceptionThrows_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1143 = { sizeof (RuntimeWrappedException_t5E7538D9FD99A8A0FB32B396776E294A29866C0D), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1143[1] =
{
RuntimeWrappedException_t5E7538D9FD99A8A0FB32B396776E294A29866C0D::get_offset_of_m_wrappedException_17(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1144 = { sizeof (StateMachineAttribute_t0F08DD69D5AB4A30C6A13E245143DD5335A4DA93), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1144[1] =
{
StateMachineAttribute_t0F08DD69D5AB4A30C6A13E245143DD5335A4DA93::get_offset_of_U3CStateMachineTypeU3Ek__BackingField_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1145 = { sizeof (TaskAwaiter_t0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F)+ sizeof (RuntimeObject), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1145[1] =
{
TaskAwaiter_t0CDE8DBB564F0A0EA55FA6B3D43EEF96BC26252F::get_offset_of_m_task_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1146 = { 0, 0, 0, 0 };
extern const int32_t g_FieldOffsetTable1146[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1147 = { sizeof (ConfiguredTaskAwaitable_t24DE1415466EE20060BE5AD528DC5C812CFA53A9)+ sizeof (RuntimeObject), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1147[1] =
{
ConfiguredTaskAwaitable_t24DE1415466EE20060BE5AD528DC5C812CFA53A9::get_offset_of_m_configuredTaskAwaiter_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1148 = { sizeof (ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874)+ sizeof (RuntimeObject), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1148[2] =
{
ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874::get_offset_of_m_task_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
ConfiguredTaskAwaiter_tF1AAA16B8A1250CA037E32157A3424CD2BA47874::get_offset_of_m_continueOnCapturedContext_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1149 = { 0, 0, 0, 0 };
extern const int32_t g_FieldOffsetTable1149[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1150 = { 0, 0, 0, 0 };
extern const int32_t g_FieldOffsetTable1150[2] =
{
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1151 = { sizeof (TypeForwardedFromAttribute_tEE8D8DA95C9112F53D8E66EA00F476C923A003E2), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1151[1] =
{
TypeForwardedFromAttribute_tEE8D8DA95C9112F53D8E66EA00F476C923A003E2::get_offset_of_assemblyFullName_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1152 = { sizeof (YieldAwaitable_t5A938EAA492F9B8ABA2EEFF16C7A83EA606B9911)+ sizeof (RuntimeObject), sizeof(YieldAwaitable_t5A938EAA492F9B8ABA2EEFF16C7A83EA606B9911 ), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1153 = { sizeof (YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B)+ sizeof (RuntimeObject), sizeof(YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B ), sizeof(YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable1153[2] =
{
YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_StaticFields::get_offset_of_s_waitCallbackRunAction_0(),
YieldAwaiter_tB7F5AF2447B8FF2021CAD11FFA95F095CE2C2C3B_StaticFields::get_offset_of_s_sendOrPostCallbackRunAction_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1154 = { sizeof (LoadHint_tAD3279A5DC1810A6D778793F6D5D2B52F8E7D4AF)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1154[4] =
{
LoadHint_tAD3279A5DC1810A6D778793F6D5D2B52F8E7D4AF::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1155 = { sizeof (DefaultDependencyAttribute_t5401DA33101638B630ABCB8C22120ABDB29FE191), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1155[1] =
{
DefaultDependencyAttribute_t5401DA33101638B630ABCB8C22120ABDB29FE191::get_offset_of_loadHint_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1156 = { sizeof (DependencyAttribute_tA90C07E3131623E3AEA30E4DDF8F6B188985EA57), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1156[2] =
{
DependencyAttribute_tA90C07E3131623E3AEA30E4DDF8F6B188985EA57::get_offset_of_dependentAssembly_0(),
DependencyAttribute_tA90C07E3131623E3AEA30E4DDF8F6B188985EA57::get_offset_of_loadHint_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1157 = { sizeof (CompilationRelaxations_tCFC58143CB8E81E1E407EEA8FF9C9DF876F0750B)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1157[2] =
{
CompilationRelaxations_tCFC58143CB8E81E1E407EEA8FF9C9DF876F0750B::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1158 = { sizeof (CompilationRelaxationsAttribute_t0067C359924196418CFB0DE4C07C5F4C4BCD54FF), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1158[1] =
{
CompilationRelaxationsAttribute_t0067C359924196418CFB0DE4C07C5F4C4BCD54FF::get_offset_of_m_relaxations_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1159 = { sizeof (CompilerGeneratedAttribute_t29C03D4EB4F2193B5BF85D03923EA47423C946FC), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1160 = { sizeof (CustomConstantAttribute_tBAC64D25BCB4BE5CAC32AC430CA8BEF070923191), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1161 = { sizeof (DateTimeConstantAttribute_t4E7414CDD051958BEA1F01140F38441AA442D9BE), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1161[1] =
{
DateTimeConstantAttribute_t4E7414CDD051958BEA1F01140F38441AA442D9BE::get_offset_of_date_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1162 = { sizeof (DecimalConstantAttribute_t3DFC057911F4AF28AD6A0472300EBE4C038BD9B5), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1162[1] =
{
DecimalConstantAttribute_t3DFC057911F4AF28AD6A0472300EBE4C038BD9B5::get_offset_of_dec_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1163 = { sizeof (ExtensionAttribute_t34A17741DB6F2A390F30532BD50B269ECDB8F124), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1164 = { sizeof (FixedBufferAttribute_tF3065E17C7BDDEAEDC5D80CED0509DB83C558743), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1164[2] =
{
FixedBufferAttribute_tF3065E17C7BDDEAEDC5D80CED0509DB83C558743::get_offset_of_elementType_0(),
FixedBufferAttribute_tF3065E17C7BDDEAEDC5D80CED0509DB83C558743::get_offset_of_length_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1165 = { sizeof (InternalsVisibleToAttribute_t3AEE3C8B7B894E54091E79A5A1C570B6DBB82767), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1165[2] =
{
InternalsVisibleToAttribute_t3AEE3C8B7B894E54091E79A5A1C570B6DBB82767::get_offset_of__assemblyName_0(),
InternalsVisibleToAttribute_t3AEE3C8B7B894E54091E79A5A1C570B6DBB82767::get_offset_of__allInternalsVisible_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1166 = { sizeof (FriendAccessAllowedAttribute_t7924C8657D64E9FCB405FD7457DDF6EFA131BE96), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1167 = { sizeof (IsVolatile_tF1A54712356B3B8EABAFA930B5C9372D27A18AEC), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1168 = { sizeof (TypeDependencyAttribute_tD04CE2948B22A3881F260D03D1440D7678A0EEBE), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1168[1] =
{
TypeDependencyAttribute_tD04CE2948B22A3881F260D03D1440D7678A0EEBE::get_offset_of_typeName_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1169 = { sizeof (UnsafeValueTypeAttribute_t9ADB28EC5F3BD460026EA31456FBBAF7C27B8EE1), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1170 = { sizeof (StringFreezingAttribute_t7ECA21C06003DECA46ECDD205612C746907ECA7C), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1171 = { sizeof (JitHelpers_t6BCD6CAFCA9C54EDD15CC80B7D7416E8711E8AAB), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1172 = { sizeof (Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA)+ sizeof (RuntimeObject), sizeof(Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA_marshaled_pinvoke), 0, 0 };
extern const int32_t g_FieldOffsetTable1172[2] =
{
Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA::get_offset_of_key_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
Ephemeron_t6F0B12401657FF132AB44052E5BCD06D358FF1BA::get_offset_of_value_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1173 = { 0, 0, 0, 0 };
extern const int32_t g_FieldOffsetTable1173[3] =
{
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1174 = { 0, 0, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1175 = { sizeof (RuntimeHelpers_tB6CD53A56BCACB431A632ACD2709F245DBE3FA2E), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1176 = { sizeof (UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1176[5] =
{
UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F::get_offset_of_m_callingConvention_0(),
UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F::get_offset_of_CharSet_1(),
UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F::get_offset_of_BestFitMapping_2(),
UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F::get_offset_of_ThrowOnUnmappableChar_3(),
UnmanagedFunctionPointerAttribute_tC8718CB0B83BA5FA2F5BD5E9C7F2C67D59ED532F::get_offset_of_SetLastError_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1177 = { sizeof (DispIdAttribute_tCA8BD48980DDAABEEB1213041A0B83FFAA8A16C3), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1177[1] =
{
DispIdAttribute_tCA8BD48980DDAABEEB1213041A0B83FFAA8A16C3::get_offset_of__val_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1178 = { sizeof (ComInterfaceType_t06F9ED45C423386837E822765B7A00AC4A2EE607)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1178[5] =
{
ComInterfaceType_t06F9ED45C423386837E822765B7A00AC4A2EE607::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1179 = { sizeof (InterfaceTypeAttribute_t4FD9BC97FD0CCFF82FA0562D6F897A54C00F9BEF), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1179[1] =
{
InterfaceTypeAttribute_t4FD9BC97FD0CCFF82FA0562D6F897A54C00F9BEF::get_offset_of__val_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1180 = { sizeof (ComDefaultInterfaceAttribute_tBBC585373029E9376B0BBA3472A3EC7372F79C2A), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1180[1] =
{
ComDefaultInterfaceAttribute_tBBC585373029E9376B0BBA3472A3EC7372F79C2A::get_offset_of__val_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1181 = { sizeof (ClassInterfaceType_tC166DABAA0841D0021D87E2F422AC8110E7601FB)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1181[4] =
{
ClassInterfaceType_tC166DABAA0841D0021D87E2F422AC8110E7601FB::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1182 = { sizeof (ClassInterfaceAttribute_tC3F85A84242581EC37E2682E71720E10AC189154), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1182[1] =
{
ClassInterfaceAttribute_tC3F85A84242581EC37E2682E71720E10AC189154::get_offset_of__val_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1183 = { sizeof (ComVisibleAttribute_t3815D768D1DE3E84BAF7FC90E9F2F283FB1C74B3), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1183[1] =
{
ComVisibleAttribute_t3815D768D1DE3E84BAF7FC90E9F2F283FB1C74B3::get_offset_of__val_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1184 = { sizeof (TypeLibImportClassAttribute_tF096AB90A395D44FFFC7AAEDBFC5D8DD85EA74C1), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1184[1] =
{
TypeLibImportClassAttribute_tF096AB90A395D44FFFC7AAEDBFC5D8DD85EA74C1::get_offset_of__importClassName_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1185 = { sizeof (VarEnum_tBFABAADE217FFEE0854CF0555E8A719CC5E0BDA0)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1185[45] =
{
VarEnum_tBFABAADE217FFEE0854CF0555E8A719CC5E0BDA0::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1186 = { sizeof (UnmanagedType_t87C9136E3089DE290F40B9993907743F4E3102E3)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1186[39] =
{
UnmanagedType_t87C9136E3089DE290F40B9993907743F4E3102E3::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1187 = { sizeof (ComImportAttribute_t274D44BA1076F587D6AC97C2AFBA0A7B25EFDF40), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1188 = { sizeof (GuidAttribute_t12D6C9EA1C65F4B67401C657AB97CD253FC09D34), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1188[1] =
{
GuidAttribute_t12D6C9EA1C65F4B67401C657AB97CD253FC09D34::get_offset_of__val_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1189 = { sizeof (PreserveSigAttribute_t60367CFFE2AFD385EAC54659911B50279DFFA576), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1190 = { sizeof (InAttribute_t753C98BE87DB84ECCEEB09841007A0D30C8B8A91), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1191 = { sizeof (OutAttribute_t171E39DD5144590B737DC30724E1886B20B1E94D), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1192 = { sizeof (OptionalAttribute_t9C49E42A48E6C513B8CFB077C07C7AEF7AF96113), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1193 = { sizeof (DllImportSearchPath_t87FBB9B032F725A0F0850D3506147F8479C6C962)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1193[8] =
{
DllImportSearchPath_t87FBB9B032F725A0F0850D3506147F8479C6C962::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1194 = { sizeof (DefaultDllImportSearchPathsAttribute_t78F841C413557838706F822862BAE029C8CF9B87), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1194[1] =
{
DefaultDllImportSearchPathsAttribute_t78F841C413557838706F822862BAE029C8CF9B87::get_offset_of__paths_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1195 = { sizeof (DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1195[9] =
{
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of__val_0(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_EntryPoint_1(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_CharSet_2(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_SetLastError_3(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_ExactSpelling_4(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_PreserveSig_5(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_CallingConvention_6(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_BestFitMapping_7(),
DllImportAttribute_t75AED23F20C2D5E5D64417CAF2E886FC827D2048::get_offset_of_ThrowOnUnmappableChar_8(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1196 = { sizeof (FieldOffsetAttribute_t0DC41E3845F489E8751A1087AE893D8F5A9ABA49), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1196[1] =
{
FieldOffsetAttribute_t0DC41E3845F489E8751A1087AE893D8F5A9ABA49::get_offset_of__val_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1197 = { sizeof (ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable1197[4] =
{
ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2::get_offset_of__major_0(),
ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2::get_offset_of__minor_1(),
ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2::get_offset_of__build_2(),
ComCompatibleVersionAttribute_t8D9E26E5596ECAF4286A2E3FBAC2753AFBE825D2::get_offset_of__revision_3(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1198 = { sizeof (CallingConvention_t1CA20C42BA91F62017CDE4192C0FF930E81A1193)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1198[6] =
{
CallingConvention_t1CA20C42BA91F62017CDE4192C0FF930E81A1193::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1199 = { sizeof (CharSet_t2DEB2DA03477AAFC8FD2E1EC33F49904F85632A5)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable1199[5] =
{
CharSet_t2DEB2DA03477AAFC8FD2E1EC33F49904F85632A5::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"16102434@brookes.ac.uk"
] | 16102434@brookes.ac.uk |
8e785d2d0721bac054f5ebf5511239d5b0fe0294 | 5deef214a2ca0b10472431b577dd933e23f19fc5 | /duilib/DuiLib/UICommonControls.cpp | 91e3b476846d1342679a2507173c4878d6482237 | [
"BSD-2-Clause"
] | permissive | zephyrer/my-duilibex-soc | ea03582b8c10174eae9c54d3c25a70893e2f7241 | 319dc238ce1cc0d3ba267b859c4d7b898617027b | refs/heads/master | 2020-06-06T09:18:09.734253 | 2012-06-10T07:11:16 | 2012-06-10T07:11:16 | 40,067,659 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 97,263 | cpp | #include "StdAfx.h"
namespace DuiLib {
/////////////////////////////////////////////////////////////////////////////////////
//
//
CLabelUI::CLabelUI() : m_uTextStyle(DT_VCENTER), m_dwTextColor(0),
m_dwDisabledTextColor(0), m_iFont(-1), m_bShowHtml(false)
{
::ZeroMemory(&m_rcTextPadding, sizeof(m_rcTextPadding));
}
LPCTSTR CLabelUI::GetClass() const
{
return _T("LabelUI");
}
LPVOID CLabelUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("Label")) == 0 ) return static_cast<CLabelUI*>(this);
return CControlUI::GetInterface(pstrName);
}
void CLabelUI::SetTextStyle(UINT uStyle)
{
m_uTextStyle = uStyle;
Invalidate();
}
UINT CLabelUI::GetTextStyle() const
{
return m_uTextStyle;
}
void CLabelUI::SetTextColor(DWORD dwTextColor)
{
m_dwTextColor = dwTextColor;
Invalidate();
}
DWORD CLabelUI::GetTextColor() const
{
return m_dwTextColor;
}
void CLabelUI::SetDisabledTextColor(DWORD dwTextColor)
{
m_dwDisabledTextColor = dwTextColor;
Invalidate();
}
DWORD CLabelUI::GetDisabledTextColor() const
{
return m_dwDisabledTextColor;
}
void CLabelUI::SetFont(int index)
{
m_iFont = index;
Invalidate();
}
int CLabelUI::GetFont() const
{
return m_iFont;
}
RECT CLabelUI::GetTextPadding() const
{
return m_rcTextPadding;
}
void CLabelUI::SetTextPadding(RECT rc)
{
m_rcTextPadding = rc;
Invalidate();
}
bool CLabelUI::IsShowHtml()
{
return m_bShowHtml;
}
void CLabelUI::SetShowHtml(bool bShowHtml)
{
if( m_bShowHtml == bShowHtml ) return;
m_bShowHtml = bShowHtml;
Invalidate();
}
SIZE CLabelUI::EstimateSize(SIZE szAvailable)
{
if( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont())->tm.tmHeight + 4);
return CControlUI::EstimateSize(szAvailable);
}
void CLabelUI::DoEvent(TEventUI& event)
{
if( event.Type == UIEVENT_SETFOCUS )
{
m_bFocused = true;
return;
}
if( event.Type == UIEVENT_KILLFOCUS )
{
m_bFocused = false;
return;
}
if( event.Type == UIEVENT_MOUSEENTER )
{
return;
}
if( event.Type == UIEVENT_MOUSELEAVE )
{
return;
}
CControlUI::DoEvent(event);
}
void CLabelUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if( _tcscmp(pstrName, _T("align")) == 0 ) {
if( _tcsstr(pstrValue, _T("left")) != NULL ) {
m_uTextStyle &= ~(DT_CENTER | DT_RIGHT);
m_uTextStyle |= DT_LEFT;
}
if( _tcsstr(pstrValue, _T("center")) != NULL ) {
m_uTextStyle &= ~(DT_LEFT | DT_RIGHT);
m_uTextStyle |= DT_CENTER;
}
if( _tcsstr(pstrValue, _T("right")) != NULL ) {
m_uTextStyle &= ~(DT_LEFT | DT_CENTER);
m_uTextStyle |= DT_RIGHT;
}
if( _tcsstr(pstrValue, _T("top")) != NULL ) {
m_uTextStyle &= ~(DT_BOTTOM | DT_VCENTER);
m_uTextStyle |= DT_TOP;
}
if( _tcsstr(pstrValue, _T("vcenter")) != NULL ) {
m_uTextStyle &= ~(DT_TOP | DT_BOTTOM);
m_uTextStyle |= DT_VCENTER;
}
if( _tcsstr(pstrValue, _T("bottom")) != NULL ) {
m_uTextStyle &= ~(DT_TOP | DT_VCENTER);
m_uTextStyle |= DT_BOTTOM;
}
}
else if( _tcscmp(pstrName, _T("endellipsis")) == 0 ) {
if( _tcscmp(pstrValue, _T("true")) == 0 ) m_uTextStyle |= DT_END_ELLIPSIS;
else m_uTextStyle &= ~DT_END_ELLIPSIS;
}
else if( _tcscmp(pstrName, _T("font")) == 0 ) SetFont(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("textcolor")) == 0 ) {
if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);
LPTSTR pstr = NULL;
DWORD clrColor = _tcstoul(pstrValue, &pstr, 16);
SetTextColor(clrColor);
}
else if( _tcscmp(pstrName, _T("disabledtextcolor")) == 0 ) {
if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);
LPTSTR pstr = NULL;
DWORD clrColor = _tcstoul(pstrValue, &pstr, 16);
SetDisabledTextColor(clrColor);
}
else if( _tcscmp(pstrName, _T("textpadding")) == 0 ) {
RECT rcTextPadding = { 0 };
LPTSTR pstr = NULL;
rcTextPadding.left = _tcstol(pstrValue, &pstr, 10); ASSERT(pstr);
rcTextPadding.top = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);
rcTextPadding.right = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);
rcTextPadding.bottom = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);
SetTextPadding(rcTextPadding);
}
else if( _tcscmp(pstrName, _T("showhtml")) == 0 ) SetShowHtml(_tcscmp(pstrValue, _T("true")) == 0);
else CControlUI::SetAttribute(pstrName, pstrValue);
}
void CLabelUI::PaintText(HDC hDC)
{
if( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();
if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();
if( m_sText.IsEmpty() ) return;
int nLinks = 0;
RECT rc = m_rcItem;
rc.left += m_rcTextPadding.left;
rc.right -= m_rcTextPadding.right;
rc.top += m_rcTextPadding.top;
rc.bottom -= m_rcTextPadding.bottom;
if( IsEnabled() ) {
if( m_bShowHtml )
CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \
NULL, NULL, nLinks, DT_SINGLELINE | m_uTextStyle);
else
CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \
m_iFont, DT_SINGLELINE | m_uTextStyle);
}
else {
if( m_bShowHtml )
CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \
NULL, NULL, nLinks, DT_SINGLELINE | m_uTextStyle);
else
CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \
m_iFont, DT_SINGLELINE | m_uTextStyle);
}
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
CButtonUI::CButtonUI() : m_uButtonState(0), m_dwHotTextColor(0), m_dwPushedTextColor(0), m_dwFocusedTextColor(0)
{
m_uTextStyle = DT_SINGLELINE | DT_VCENTER | DT_CENTER;
}
LPCTSTR CButtonUI::GetClass() const
{
return _T("ButtonUI");
}
LPVOID CButtonUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("Button")) == 0 ) return static_cast<CButtonUI*>(this);
return CLabelUI::GetInterface(pstrName);
}
UINT CButtonUI::GetControlFlags() const
{
return (IsKeyboardEnabled() ? UIFLAG_TABSTOP : 0) | (IsEnabled() ? UIFLAG_SETCURSOR : 0);
}
void CButtonUI::DoEvent(TEventUI& event)
{
if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
if( m_pParent != NULL ) m_pParent->DoEvent(event);
else CLabelUI::DoEvent(event);
return;
}
if( event.Type == UIEVENT_SETFOCUS )
{
Invalidate();
}
if( event.Type == UIEVENT_KILLFOCUS )
{
Invalidate();
}
if( event.Type == UIEVENT_KEYDOWN )
{
if (IsKeyboardEnabled()) {
if( event.chKey == VK_SPACE || event.chKey == VK_RETURN ) {
Activate();
return;
}
}
}
if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK )
{
if( ::PtInRect(&m_rcItem, event.ptMouse) && IsEnabled() ) {
m_uButtonState |= UISTATE_PUSHED | UISTATE_CAPTURED;
Invalidate();
}
//wcy
if(m_pParent)
m_pParent->DoEvent(event);
return;
}
if( event.Type == UIEVENT_MOUSEMOVE )
{
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
if( ::PtInRect(&m_rcItem, event.ptMouse) ) m_uButtonState |= UISTATE_PUSHED;
else m_uButtonState &= ~UISTATE_PUSHED;
Invalidate();
}
return;
}
if( event.Type == UIEVENT_BUTTONUP )
{
//wcy
if(m_pParent)
m_pParent->DoEvent(event);
//end
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
if( ::PtInRect(&m_rcItem, event.ptMouse) ) Activate();
m_uButtonState &= ~(UISTATE_PUSHED | UISTATE_CAPTURED);
Invalidate();
}
return;
}
if( event.Type == UIEVENT_CONTEXTMENU )
{
if( IsContextMenuUsed() ) {
m_pManager->SendNotify(this, _T("menu"), event.wParam, event.lParam);
}
return;
}
if( event.Type == UIEVENT_MOUSEENTER )
{
if( IsEnabled() ) {
m_uButtonState |= UISTATE_HOT;
Invalidate();
}
return;
}
if( event.Type == UIEVENT_MOUSELEAVE )
{
if( IsEnabled() ) {
m_uButtonState &= ~UISTATE_HOT;
Invalidate();
}
return;
}
if( event.Type == UIEVENT_SETCURSOR ) {
::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));
return;
}
CLabelUI::DoEvent(event);
}
bool CButtonUI::Activate()
{
if( !CControlUI::Activate() ) return false;
if( m_pManager != NULL ) m_pManager->SendNotify(this, _T("click"));
return true;
}
void CButtonUI::SetEnabled(bool bEnable)
{
CControlUI::SetEnabled(bEnable);
if( !IsEnabled() ) {
m_uButtonState = 0;
}
}
void CButtonUI::SetHotTextColor(DWORD dwColor)
{
m_dwHotTextColor = dwColor;
}
DWORD CButtonUI::GetHotTextColor() const
{
return m_dwHotTextColor;
}
void CButtonUI::SetPushedTextColor(DWORD dwColor)
{
m_dwPushedTextColor = dwColor;
}
DWORD CButtonUI::GetPushedTextColor() const
{
return m_dwPushedTextColor;
}
void CButtonUI::SetFocusedTextColor(DWORD dwColor)
{
m_dwFocusedTextColor = dwColor;
}
DWORD CButtonUI::GetFocusedTextColor() const
{
return m_dwFocusedTextColor;
}
LPCTSTR CButtonUI::GetNormalImage()
{
return m_sNormalImage;
}
void CButtonUI::SetNormalImage(LPCTSTR pStrImage)
{
m_sNormalImage = pStrImage;
Invalidate();
}
LPCTSTR CButtonUI::GetHotImage()
{
return m_sHotImage;
}
void CButtonUI::SetHotImage(LPCTSTR pStrImage)
{
m_sHotImage = pStrImage;
Invalidate();
}
LPCTSTR CButtonUI::GetPushedImage()
{
return m_sPushedImage;
}
void CButtonUI::SetPushedImage(LPCTSTR pStrImage)
{
m_sPushedImage = pStrImage;
Invalidate();
}
LPCTSTR CButtonUI::GetFocusedImage()
{
return m_sFocusedImage;
}
void CButtonUI::SetFocusedImage(LPCTSTR pStrImage)
{
m_sFocusedImage = pStrImage;
Invalidate();
}
LPCTSTR CButtonUI::GetDisabledImage()
{
return m_sDisabledImage;
}
void CButtonUI::SetDisabledImage(LPCTSTR pStrImage)
{
m_sDisabledImage = pStrImage;
Invalidate();
}
SIZE CButtonUI::EstimateSize(SIZE szAvailable)
{
if( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont())->tm.tmHeight + 8);
return CControlUI::EstimateSize(szAvailable);
}
void CButtonUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if( _tcscmp(pstrName, _T("normalimage")) == 0 ) SetNormalImage(pstrValue);
else if( _tcscmp(pstrName, _T("hotimage")) == 0 ) SetHotImage(pstrValue);
else if( _tcscmp(pstrName, _T("pushedimage")) == 0 ) SetPushedImage(pstrValue);
else if( _tcscmp(pstrName, _T("focusedimage")) == 0 ) SetFocusedImage(pstrValue);
else if( _tcscmp(pstrName, _T("disabledimage")) == 0 ) SetDisabledImage(pstrValue);
else if( _tcscmp(pstrName, _T("hottextcolor")) == 0 ) {
if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);
LPTSTR pstr = NULL;
DWORD clrColor = _tcstoul(pstrValue, &pstr, 16);
SetHotTextColor(clrColor);
}
else if( _tcscmp(pstrName, _T("pushedtextcolor")) == 0 ) {
if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);
LPTSTR pstr = NULL;
DWORD clrColor = _tcstoul(pstrValue, &pstr, 16);
SetPushedTextColor(clrColor);
}
else if( _tcscmp(pstrName, _T("focusedtextcolor")) == 0 ) {
if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);
LPTSTR pstr = NULL;
DWORD clrColor = _tcstoul(pstrValue, &pstr, 16);
SetFocusedTextColor(clrColor);
}
else CLabelUI::SetAttribute(pstrName, pstrValue);
}
void CButtonUI::PaintText(HDC hDC)
{
if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
else m_uButtonState &= ~ UISTATE_FOCUSED;
if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
else m_uButtonState &= ~ UISTATE_DISABLED;
if( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();
if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();
if( m_sText.IsEmpty() ) return;
int nLinks = 0;
RECT rc = m_rcItem;
rc.left += m_rcTextPadding.left;
rc.right -= m_rcTextPadding.right;
rc.top += m_rcTextPadding.top;
rc.bottom -= m_rcTextPadding.bottom;
DWORD clrColor = IsEnabled()?m_dwTextColor:m_dwDisabledTextColor;
if( ((m_uButtonState & UISTATE_PUSHED) != 0) && (GetPushedTextColor() != 0) )
clrColor = GetPushedTextColor();
else if( ((m_uButtonState & UISTATE_HOT) != 0) && (GetHotTextColor() != 0) )
clrColor = GetHotTextColor();
else if( ((m_uButtonState & UISTATE_FOCUSED) != 0) && (GetFocusedTextColor() != 0) )
clrColor = GetFocusedTextColor();
if( m_bShowHtml )
CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, clrColor, \
NULL, NULL, nLinks, m_uTextStyle);
else
CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, clrColor, \
m_iFont, m_uTextStyle);
}
void CButtonUI::PaintStatusImage(HDC hDC)
{
if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
else m_uButtonState &= ~ UISTATE_FOCUSED;
if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
else m_uButtonState &= ~ UISTATE_DISABLED;
if( (m_uButtonState & UISTATE_DISABLED) != 0 ) {
if( !m_sDisabledImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sDisabledImage) ) m_sDisabledImage.Empty();
else return;
}
}
else if( (m_uButtonState & UISTATE_PUSHED) != 0 ) {
if( !m_sPushedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sPushedImage) ) m_sPushedImage.Empty();
else return;
}
}
else if( (m_uButtonState & UISTATE_HOT) != 0 ) {
if( !m_sHotImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sHotImage) ) m_sHotImage.Empty();
else return;
}
}
else if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {
if( !m_sFocusedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();
else return;
}
}
if( !m_sNormalImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) m_sNormalImage.Empty();
else return;
}
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
COptionUI::COptionUI() : m_bSelected(false), m_dwSelectedTextColor(0)
{
}
COptionUI::~COptionUI()
{
if( !m_sGroupName.IsEmpty() && m_pManager ) m_pManager->RemoveOptionGroup(m_sGroupName, this);
}
LPCTSTR COptionUI::GetClass() const
{
return _T("OptionUI");
}
LPVOID COptionUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("Option")) == 0 ) return static_cast<COptionUI*>(this);
return CButtonUI::GetInterface(pstrName);
}
void COptionUI::SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit)
{
CControlUI::SetManager(pManager, pParent, bInit);
if( bInit && !m_sGroupName.IsEmpty() ) {
if (m_pManager) m_pManager->AddOptionGroup(m_sGroupName, this);
}
}
LPCTSTR COptionUI::GetGroup() const
{
return m_sGroupName;
}
void COptionUI::SetGroup(LPCTSTR pStrGroupName)
{
if( pStrGroupName == NULL ) {
if( m_sGroupName.IsEmpty() ) return;
m_sGroupName.Empty();
}
else {
if( m_sGroupName == pStrGroupName ) return;
if (!m_sGroupName.IsEmpty() && m_pManager) m_pManager->RemoveOptionGroup(m_sGroupName, this);
m_sGroupName = pStrGroupName;
}
if( !m_sGroupName.IsEmpty() ) {
if (m_pManager) m_pManager->AddOptionGroup(m_sGroupName, this);
}
else {
if (m_pManager) m_pManager->RemoveOptionGroup(m_sGroupName, this);
}
Selected(m_bSelected);
}
bool COptionUI::IsSelected() const
{
return m_bSelected;
}
void COptionUI::Selected(bool bSelected)
{
if( m_bSelected == bSelected ) return;
m_bSelected = bSelected;
if( m_bSelected ) m_uButtonState |= UISTATE_SELECTED;
else m_uButtonState &= ~UISTATE_SELECTED;
if( m_pManager != NULL ) {
if( !m_sGroupName.IsEmpty() ) {
if( m_bSelected ) {
CStdPtrArray* aOptionGroup = m_pManager->GetOptionGroup(m_sGroupName);
for( int i = 0; i < aOptionGroup->GetSize(); i++ ) {
COptionUI* pControl = static_cast<COptionUI*>(aOptionGroup->GetAt(i));
if( pControl != this ) {
pControl->Selected(false);
}
}
m_pManager->SendNotify(this, _T("selectchanged"));
}
}
else {
m_pManager->SendNotify(this, _T("selectchanged"));
}
}
Invalidate();
}
bool COptionUI::Activate()
{
if( !CButtonUI::Activate() ) return false;
if( !m_sGroupName.IsEmpty() ) Selected(true);
else Selected(!m_bSelected);
return true;
}
void COptionUI::SetEnabled(bool bEnable)
{
CControlUI::SetEnabled(bEnable);
if( !IsEnabled() ) {
if( m_bSelected ) m_uButtonState = UISTATE_SELECTED;
else m_uButtonState = 0;
}
}
LPCTSTR COptionUI::GetSelectedImage()
{
return m_sSelectedImage;
}
void COptionUI::SetSelectedImage(LPCTSTR pStrImage)
{
m_sSelectedImage = pStrImage;
Invalidate();
}
void COptionUI::SetSelectedTextColor(DWORD dwTextColor)
{
m_dwSelectedTextColor = dwTextColor;
}
DWORD COptionUI::GetSelectedTextColor()
{
if (m_dwSelectedTextColor == 0) m_dwSelectedTextColor = m_pManager->GetDefaultFontColor();
return m_dwSelectedTextColor;
}
LPCTSTR COptionUI::GetForeImage()
{
return m_sForeImage;
}
void COptionUI::SetForeImage(LPCTSTR pStrImage)
{
m_sForeImage = pStrImage;
Invalidate();
}
SIZE COptionUI::EstimateSize(SIZE szAvailable)
{
if( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont())->tm.tmHeight + 8);
return CControlUI::EstimateSize(szAvailable);
}
void COptionUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if( _tcscmp(pstrName, _T("group")) == 0 ) SetGroup(pstrValue);
else if( _tcscmp(pstrName, _T("selected")) == 0 ) Selected(_tcscmp(pstrValue, _T("true")) == 0);
else if( _tcscmp(pstrName, _T("selectedimage")) == 0 ) SetSelectedImage(pstrValue);
else if( _tcscmp(pstrName, _T("foreimage")) == 0 ) SetForeImage(pstrValue);
else if( _tcscmp(pstrName, _T("selectedtextcolor")) == 0 ) {
if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);
LPTSTR pstr = NULL;
DWORD clrColor = _tcstoul(pstrValue, &pstr, 16);
SetSelectedTextColor(clrColor);
}
else CButtonUI::SetAttribute(pstrName, pstrValue);
}
void COptionUI::PaintStatusImage(HDC hDC)
{
m_uButtonState &= ~UISTATE_PUSHED;
if( (m_uButtonState & UISTATE_SELECTED) != 0 ) {
if( !m_sSelectedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sSelectedImage) ) m_sSelectedImage.Empty();
else goto Label_ForeImage;
}
}
CButtonUI::PaintStatusImage(hDC);
Label_ForeImage:
if( !m_sForeImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sForeImage) ) m_sForeImage.Empty();
}
}
void COptionUI::PaintText(HDC hDC)
{
if( (m_uButtonState & UISTATE_SELECTED) != 0 )
{
DWORD oldTextColor = m_dwTextColor;
if( m_dwSelectedTextColor != 0 ) m_dwTextColor = m_dwSelectedTextColor;
if( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();
if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();
if( m_sText.IsEmpty() ) return;
int nLinks = 0;
RECT rc = m_rcItem;
rc.left += m_rcTextPadding.left;
rc.right -= m_rcTextPadding.right;
rc.top += m_rcTextPadding.top;
rc.bottom -= m_rcTextPadding.bottom;
if( m_bShowHtml )
CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, IsEnabled()?m_dwTextColor:m_dwDisabledTextColor, \
NULL, NULL, nLinks, m_uTextStyle);
else
CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, IsEnabled()?m_dwTextColor:m_dwDisabledTextColor, \
m_iFont, m_uTextStyle);
m_dwTextColor = oldTextColor;
}
else
CButtonUI::PaintText(hDC);
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
CTextUI::CTextUI() : m_nLinks(0), m_nHoverLink(-1)
{
m_uTextStyle = DT_WORDBREAK;
m_rcTextPadding.left = 2;
m_rcTextPadding.right = 2;
::ZeroMemory(m_rcLinks, sizeof(m_rcLinks));
}
CTextUI::~CTextUI()
{
}
LPCTSTR CTextUI::GetClass() const
{
return _T("TextUI");
}
LPVOID CTextUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("Text")) == 0 ) return static_cast<CTextUI*>(this);
return CLabelUI::GetInterface(pstrName);
}
UINT CTextUI::GetControlFlags() const
{
if( IsEnabled() && m_nLinks > 0 ) return UIFLAG_SETCURSOR;
else return 0;
}
CStdString* CTextUI::GetLinkContent(int iIndex)
{
if( iIndex >= 0 && iIndex < m_nLinks ) return &m_sLinks[iIndex];
return NULL;
}
void CTextUI::DoEvent(TEventUI& event)
{
if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
if( m_pParent != NULL ) m_pParent->DoEvent(event);
else CLabelUI::DoEvent(event);
return;
}
if( event.Type == UIEVENT_SETCURSOR ) {
for( int i = 0; i < m_nLinks; i++ ) {
if( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {
::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));
return;
}
}
}
if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK && IsEnabled() ) {
for( int i = 0; i < m_nLinks; i++ ) {
if( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {
Invalidate();
return;
}
}
}
if( event.Type == UIEVENT_BUTTONUP && IsEnabled() ) {
for( int i = 0; i < m_nLinks; i++ ) {
if( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {
m_pManager->SendNotify(this, _T("link"), i);
return;
}
}
}
if( event.Type == UIEVENT_CONTEXTMENU )
{
return;
}
// When you move over a link
if( m_nLinks > 0 && event.Type == UIEVENT_MOUSEMOVE && IsEnabled() ) {
int nHoverLink = -1;
for( int i = 0; i < m_nLinks; i++ ) {
if( ::PtInRect(&m_rcLinks[i], event.ptMouse) ) {
nHoverLink = i;
break;
}
}
if(m_nHoverLink != nHoverLink) {
m_nHoverLink = nHoverLink;
Invalidate();
return;
}
}
if( event.Type == UIEVENT_MOUSELEAVE ) {
if( m_nLinks > 0 && IsEnabled() ) {
if(m_nHoverLink != -1) {
m_nHoverLink = -1;
Invalidate();
return;
}
}
}
CLabelUI::DoEvent(event);
}
SIZE CTextUI::EstimateSize(SIZE szAvailable)
{
RECT rcText = { 0, 0, MAX(szAvailable.cx, m_cxyFixed.cx), 9999 };
rcText.left += m_rcTextPadding.left;
rcText.right -= m_rcTextPadding.right;
if( m_bShowHtml ) {
int nLinks = 0;
CRenderEngine::DrawHtmlText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, NULL, NULL, nLinks, DT_CALCRECT | m_uTextStyle);
}
else {
CRenderEngine::DrawText(m_pManager->GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, m_iFont, DT_CALCRECT | m_uTextStyle);
}
SIZE cXY = {rcText.right - rcText.left + m_rcTextPadding.left + m_rcTextPadding.right,
rcText.bottom - rcText.top + m_rcTextPadding.top + m_rcTextPadding.bottom};
if( m_cxyFixed.cy != 0 ) cXY.cy = m_cxyFixed.cy;
return cXY;
}
void CTextUI::PaintText(HDC hDC)
{
if( m_sText.IsEmpty() ) {
m_nLinks = 0;
return;
}
if( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();
if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();
if( m_sText.IsEmpty() ) return;
m_nLinks = lengthof(m_rcLinks);
RECT rc = m_rcItem;
rc.left += m_rcTextPadding.left;
rc.right -= m_rcTextPadding.right;
rc.top += m_rcTextPadding.top;
rc.bottom -= m_rcTextPadding.bottom;
if( IsEnabled() ) {
if( m_bShowHtml )
CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \
m_rcLinks, m_sLinks, m_nLinks, m_uTextStyle);
else
CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwTextColor, \
m_iFont, m_uTextStyle);
}
else {
if( m_bShowHtml )
CRenderEngine::DrawHtmlText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \
m_rcLinks, m_sLinks, m_nLinks, m_uTextStyle);
else
CRenderEngine::DrawText(hDC, m_pManager, rc, m_sText, m_dwDisabledTextColor, \
m_iFont, m_uTextStyle);
}
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
CProgressUI::CProgressUI() : m_bHorizontal(true), m_nMin(0), m_nMax(100), m_nValue(0), m_bStretchForeImage(true)
{
m_uTextStyle = DT_SINGLELINE | DT_CENTER;
SetFixedHeight(12);
}
LPCTSTR CProgressUI::GetClass() const
{
return _T("ProgressUI");
}
LPVOID CProgressUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("Progress")) == 0 ) return static_cast<CProgressUI*>(this);
return CLabelUI::GetInterface(pstrName);
}
bool CProgressUI::IsHorizontal()
{
return m_bHorizontal;
}
void CProgressUI::SetHorizontal(bool bHorizontal)
{
if( m_bHorizontal == bHorizontal ) return;
m_bHorizontal = bHorizontal;
Invalidate();
}
int CProgressUI::GetMinValue() const
{
return m_nMin;
}
void CProgressUI::SetMinValue(int nMin)
{
m_nMin = nMin;
Invalidate();
}
int CProgressUI::GetMaxValue() const
{
return m_nMax;
}
void CProgressUI::SetMaxValue(int nMax)
{
m_nMax = nMax;
Invalidate();
}
int CProgressUI::GetValue() const
{
return m_nValue;
}
void CProgressUI::SetValue(int nValue)
{
m_nValue = nValue;
Invalidate();
}
LPCTSTR CProgressUI::GetForeImage() const
{
return m_sForeImage;
}
void CProgressUI::SetForeImage(LPCTSTR pStrImage)
{
if( m_sForeImage == pStrImage ) return;
m_sForeImage = pStrImage;
Invalidate();
}
void CProgressUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if( _tcscmp(pstrName, _T("foreimage")) == 0 ) SetForeImage(pstrValue);
else if( _tcscmp(pstrName, _T("hor")) == 0 ) SetHorizontal(_tcscmp(pstrValue, _T("true")) == 0);
else if( _tcscmp(pstrName, _T("min")) == 0 ) SetMinValue(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("max")) == 0 ) SetMaxValue(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("value")) == 0 ) SetValue(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("isstretchfore"))==0) SetStretchForeImage(_tcscmp(pstrValue, _T("true")) == 0? true : false);
else CLabelUI::SetAttribute(pstrName, pstrValue);
}
void CProgressUI::PaintStatusImage(HDC hDC)
{
if( m_nMax <= m_nMin ) m_nMax = m_nMin + 1;
if( m_nValue > m_nMax ) m_nValue = m_nMax;
if( m_nValue < m_nMin ) m_nValue = m_nMin;
RECT rc = {0};
if( m_bHorizontal ) {
rc.right = (m_nValue - m_nMin) * (m_rcItem.right - m_rcItem.left) / (m_nMax - m_nMin);
rc.bottom = m_rcItem.bottom - m_rcItem.top;
}
else {
rc.top = (m_rcItem.bottom - m_rcItem.top) * (m_nMax - m_nValue) / (m_nMax - m_nMin);
rc.right = m_rcItem.right - m_rcItem.left;
rc.bottom = m_rcItem.bottom - m_rcItem.top;
}
if( !m_sForeImage.IsEmpty() ) {
m_sForeImageModify.Empty();
if (m_bStretchForeImage)
m_sForeImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), rc.left, rc.top, rc.right, rc.bottom);
else
m_sForeImageModify.SmallFormat(_T("dest='%d,%d,%d,%d' source='%d,%d,%d,%d'")
, rc.left, rc.top, rc.right, rc.bottom
, rc.left, rc.top, rc.right, rc.bottom);
if( !DrawImage(hDC, (LPCTSTR)m_sForeImage, (LPCTSTR)m_sForeImageModify) ) m_sForeImage.Empty();
else return;
}
}
bool CProgressUI::IsStretchForeImage()
{
return m_bStretchForeImage;
}
void CProgressUI::SetStretchForeImage( bool bStretchForeImage /*= true*/ )
{
if (m_bStretchForeImage==bStretchForeImage) return;
m_bStretchForeImage=bStretchForeImage;
Invalidate();
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
CSliderUI::CSliderUI() : m_uButtonState(0), m_nStep(1)
{
m_uTextStyle = DT_SINGLELINE | DT_CENTER;
m_szThumb.cx = m_szThumb.cy = 10;
}
LPCTSTR CSliderUI::GetClass() const
{
return _T("SliderUI");
}
UINT CSliderUI::GetControlFlags() const
{
if( IsEnabled() ) return UIFLAG_SETCURSOR;
else return 0;
}
LPVOID CSliderUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("Slider")) == 0 ) return static_cast<CSliderUI*>(this);
return CProgressUI::GetInterface(pstrName);
}
void CSliderUI::SetEnabled(bool bEnable)
{
CControlUI::SetEnabled(bEnable);
if( !IsEnabled() ) {
m_uButtonState = 0;
}
}
int CSliderUI::GetChangeStep()
{
return m_nStep;
}
void CSliderUI::SetChangeStep(int step)
{
m_nStep = step;
}
void CSliderUI::SetThumbSize(SIZE szXY)
{
m_szThumb = szXY;
}
RECT CSliderUI::GetThumbRect() const
{
if( m_bHorizontal ) {
int left = m_rcItem.left + (m_rcItem.right - m_rcItem.left - m_szThumb.cx) * (m_nValue - m_nMin) / (m_nMax - m_nMin);
int top = (m_rcItem.bottom + m_rcItem.top - m_szThumb.cy) / 2;
return CRect(left, top, left + m_szThumb.cx, top + m_szThumb.cy);
}
else {
int left = (m_rcItem.right + m_rcItem.left - m_szThumb.cx) / 2;
int top = m_rcItem.bottom - m_szThumb.cy - (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy) * (m_nValue - m_nMin) / (m_nMax - m_nMin);
return CRect(left, top, left + m_szThumb.cx, top + m_szThumb.cy);
}
}
LPCTSTR CSliderUI::GetThumbImage() const
{
return m_sThumbImage;
}
void CSliderUI::SetThumbImage(LPCTSTR pStrImage)
{
m_sThumbImage = pStrImage;
Invalidate();
}
LPCTSTR CSliderUI::GetThumbHotImage() const
{
return m_sThumbHotImage;
}
void CSliderUI::SetThumbHotImage(LPCTSTR pStrImage)
{
m_sThumbHotImage = pStrImage;
Invalidate();
}
LPCTSTR CSliderUI::GetThumbPushedImage() const
{
return m_sThumbPushedImage;
}
void CSliderUI::SetThumbPushedImage(LPCTSTR pStrImage)
{
m_sThumbPushedImage = pStrImage;
Invalidate();
}
void CSliderUI::DoEvent(TEventUI& event)
{
if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
if( m_pParent != NULL ) m_pParent->DoEvent(event);
else CProgressUI::DoEvent(event);
return;
}
if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK )
{
if( IsEnabled() ) {
RECT rcThumb = GetThumbRect();
if( ::PtInRect(&rcThumb, event.ptMouse) ) {
m_uButtonState |= UISTATE_CAPTURED;
}
}
return;
}
if( event.Type == UIEVENT_BUTTONUP )
{
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
m_uButtonState &= ~UISTATE_CAPTURED;
}
if( m_bHorizontal ) {
if( event.ptMouse.x >= m_rcItem.right - m_szThumb.cx / 2 ) m_nValue = m_nMax;
else if( event.ptMouse.x <= m_rcItem.left + m_szThumb.cx / 2 ) m_nValue = m_nMin;
else m_nValue = m_nMin + (m_nMax - m_nMin) * (event.ptMouse.x - m_rcItem.left - m_szThumb.cx / 2 ) / (m_rcItem.right - m_rcItem.left - m_szThumb.cx);
}
else {
if( event.ptMouse.y >= m_rcItem.bottom - m_szThumb.cy / 2 ) m_nValue = m_nMin;
else if( event.ptMouse.y <= m_rcItem.top + m_szThumb.cy / 2 ) m_nValue = m_nMax;
else m_nValue = m_nMin + (m_nMax - m_nMin) * (m_rcItem.bottom - event.ptMouse.y - m_szThumb.cy / 2 ) / (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy);
}
m_pManager->SendNotify(this, _T("valuechanged"));
Invalidate();
return;
}
if( event.Type == UIEVENT_CONTEXTMENU )
{
return;
}
if( event.Type == UIEVENT_SCROLLWHEEL )
{
switch( LOWORD(event.wParam) ) {
case SB_LINEUP:
SetValue(GetValue() + GetChangeStep());
m_pManager->SendNotify(this, _T("valuechanged"));
return;
case SB_LINEDOWN:
SetValue(GetValue() - GetChangeStep());
m_pManager->SendNotify(this, _T("valuechanged"));
return;
}
}
if( event.Type == UIEVENT_MOUSEMOVE )
{
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
if( m_bHorizontal ) {
if( event.ptMouse.x >= m_rcItem.right - m_szThumb.cx / 2 ) m_nValue = m_nMax;
else if( event.ptMouse.x <= m_rcItem.left + m_szThumb.cx / 2 ) m_nValue = m_nMin;
else m_nValue = m_nMin + (m_nMax - m_nMin) * (event.ptMouse.x - m_rcItem.left - m_szThumb.cx / 2 ) / (m_rcItem.right - m_rcItem.left - m_szThumb.cx);
}
else {
if( event.ptMouse.y >= m_rcItem.bottom - m_szThumb.cy / 2 ) m_nValue = m_nMin;
else if( event.ptMouse.y <= m_rcItem.top + m_szThumb.cy / 2 ) m_nValue = m_nMax;
else m_nValue = m_nMin + (m_nMax - m_nMin) * (m_rcItem.bottom - event.ptMouse.y - m_szThumb.cy / 2 ) / (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy);
}
Invalidate();
}
return;
}
if( event.Type == UIEVENT_SETCURSOR )
{
RECT rcThumb = GetThumbRect();
if( IsEnabled() && ::PtInRect(&rcThumb, event.ptMouse) ) {
::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));
return;
}
}
if( event.Type == UIEVENT_MOUSEENTER )
{
if( IsEnabled() ) {
m_uButtonState |= UISTATE_HOT;
Invalidate();
}
return;
}
if( event.Type == UIEVENT_MOUSELEAVE )
{
if( IsEnabled() ) {
m_uButtonState &= ~UISTATE_HOT;
Invalidate();
}
return;
}
CControlUI::DoEvent(event);
}
void CSliderUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if( _tcscmp(pstrName, _T("thumbimage")) == 0 ) SetThumbImage(pstrValue);
else if( _tcscmp(pstrName, _T("thumbhotimage")) == 0 ) SetThumbHotImage(pstrValue);
else if( _tcscmp(pstrName, _T("thumbpushedimage")) == 0 ) SetThumbPushedImage(pstrValue);
else if( _tcscmp(pstrName, _T("thumbsize")) == 0 ) {
SIZE szXY = {0};
LPTSTR pstr = NULL;
szXY.cx = _tcstol(pstrValue, &pstr, 10); ASSERT(pstr);
szXY.cy = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr);
SetThumbSize(szXY);
}
else if( _tcscmp(pstrName, _T("step")) == 0 ) {
SetChangeStep(_ttoi(pstrValue));
}
else CProgressUI::SetAttribute(pstrName, pstrValue);
}
void CSliderUI::PaintStatusImage(HDC hDC)
{
CProgressUI::PaintStatusImage(hDC);
RECT rcThumb = GetThumbRect();
rcThumb.left -= m_rcItem.left;
rcThumb.top -= m_rcItem.top;
rcThumb.right -= m_rcItem.left;
rcThumb.bottom -= m_rcItem.top;
if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
if( !m_sThumbPushedImage.IsEmpty() ) {
m_sImageModify.Empty();
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), rcThumb.left, rcThumb.top, rcThumb.right, rcThumb.bottom);
if( !DrawImage(hDC, (LPCTSTR)m_sThumbPushedImage, (LPCTSTR)m_sImageModify) ) m_sThumbPushedImage.Empty();
else return;
}
}
else if( (m_uButtonState & UISTATE_HOT) != 0 ) {
if( !m_sThumbHotImage.IsEmpty() ) {
m_sImageModify.Empty();
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), rcThumb.left, rcThumb.top, rcThumb.right, rcThumb.bottom);
if( !DrawImage(hDC, (LPCTSTR)m_sThumbHotImage, (LPCTSTR)m_sImageModify) ) m_sThumbHotImage.Empty();
else return;
}
}
if( !m_sThumbImage.IsEmpty() ) {
m_sImageModify.Empty();
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), rcThumb.left, rcThumb.top, rcThumb.right, rcThumb.bottom);
if( !DrawImage(hDC, (LPCTSTR)m_sThumbImage, (LPCTSTR)m_sImageModify) ) m_sThumbImage.Empty();
else return;
}
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
class CEditWnd : public CWindowWnd
{
public:
CEditWnd();
void Init(CEditUI* pOwner);
RECT CalPos();
LPCTSTR GetWindowClassName() const;
LPCTSTR GetSuperClassName() const;
void OnFinalMessage(HWND hWnd);
LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnEditChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
protected:
CEditUI* m_pOwner;
HBRUSH m_hBkBrush;
bool m_bInit;
};
CEditWnd::CEditWnd() : m_pOwner(NULL), m_hBkBrush(NULL), m_bInit(false)
{
}
void CEditWnd::Init(CEditUI* pOwner)
{
m_pOwner = pOwner;
RECT rcPos = CalPos();
UINT uStyle = WS_CHILD | ES_AUTOHSCROLL;
if( m_pOwner->IsPasswordMode() ) uStyle |= ES_PASSWORD;
Create(m_pOwner->GetManager()->GetPaintWindow(), NULL, uStyle, 0, rcPos);
SetWindowFont(m_hWnd, m_pOwner->GetManager()->GetFontInfo(m_pOwner->GetFont())->hFont, TRUE);
Edit_LimitText(m_hWnd, m_pOwner->GetMaxChar());
if( m_pOwner->IsPasswordMode() ) Edit_SetPasswordChar(m_hWnd, m_pOwner->GetPasswordChar());
Edit_SetText(m_hWnd, m_pOwner->GetText());
Edit_SetModify(m_hWnd, FALSE);
SendMessage(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELPARAM(0, 0));
Edit_Enable(m_hWnd, m_pOwner->IsEnabled() == true);
Edit_SetReadOnly(m_hWnd, m_pOwner->IsReadOnly() == true);
//Styls
LONG styleValue = ::GetWindowLong(m_hWnd, GWL_STYLE);
styleValue |= pOwner->GetWindowStyls();
::SetWindowLong(GetHWND(), GWL_STYLE, styleValue);
::ShowWindow(m_hWnd, SW_SHOWNOACTIVATE);
::SetFocus(m_hWnd);
m_bInit = true;
}
RECT CEditWnd::CalPos()
{
CRect rcPos = m_pOwner->GetPos();
RECT rcInset = m_pOwner->GetTextPadding();
rcPos.left += rcInset.left;
rcPos.top += rcInset.top;
rcPos.right -= rcInset.right;
rcPos.bottom -= rcInset.bottom;
LONG lEditHeight = m_pOwner->GetManager()->GetFontInfo(m_pOwner->GetFont())->tm.tmHeight;
if( lEditHeight < rcPos.GetHeight() ) {
rcPos.top += (rcPos.GetHeight() - lEditHeight) / 2;
rcPos.bottom = rcPos.top + lEditHeight;
}
return rcPos;
}
LPCTSTR CEditWnd::GetWindowClassName() const
{
return _T("EditWnd");
}
LPCTSTR CEditWnd::GetSuperClassName() const
{
return WC_EDIT;
}
void CEditWnd::OnFinalMessage(HWND /*hWnd*/)
{
// Clear reference and die
if( m_hBkBrush != NULL ) ::DeleteObject(m_hBkBrush);
m_pOwner->m_pWindow = NULL;
delete this;
}
LRESULT CEditWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
LRESULT lRes = 0;
BOOL bHandled = TRUE;
if( uMsg == WM_KILLFOCUS ) lRes = OnKillFocus(uMsg, wParam, lParam, bHandled);
else if( uMsg == OCM_COMMAND ) {
if( GET_WM_COMMAND_CMD(wParam, lParam) == EN_CHANGE ) lRes = OnEditChanged(uMsg, wParam, lParam, bHandled);
else if( GET_WM_COMMAND_CMD(wParam, lParam) == EN_UPDATE ) {
RECT rcClient;
::GetClientRect(m_hWnd, &rcClient);
::InvalidateRect(m_hWnd, &rcClient, FALSE);
}
}
else if( uMsg == WM_KEYDOWN && TCHAR(wParam) == VK_RETURN ) {
m_pOwner->GetManager()->SendNotify(m_pOwner, _T("return"));
}
else if( uMsg == OCM__BASE + WM_CTLCOLOREDIT || uMsg == OCM__BASE + WM_CTLCOLORSTATIC ) {
if( m_pOwner->GetNativeEditBkColor() == 0xFFFFFFFF ) return NULL;
::SetBkMode((HDC)wParam, TRANSPARENT);
DWORD dwTextColor = m_pOwner->GetTextColor();
::SetTextColor((HDC)wParam, RGB(GetBValue(dwTextColor),GetGValue(dwTextColor),GetRValue(dwTextColor)));
if( m_hBkBrush == NULL ) {
DWORD clrColor = m_pOwner->GetNativeEditBkColor();
m_hBkBrush = ::CreateSolidBrush(RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));
}
return (LRESULT)m_hBkBrush;
}
else bHandled = FALSE;
if( !bHandled ) return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
return lRes;
}
LRESULT CEditWnd::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
LRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);
PostMessage(WM_CLOSE);
return lRes;
}
LRESULT CEditWnd::OnEditChanged(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
if( !m_bInit ) return 0;
if( m_pOwner == NULL ) return 0;
// Copy text back
int cchLen = ::GetWindowTextLength(m_hWnd) + 1;
LPTSTR pstr = static_cast<LPTSTR>(_alloca(cchLen * sizeof(TCHAR)));
ASSERT(pstr);
if( pstr == NULL ) return 0;
::GetWindowText(m_hWnd, pstr, cchLen);
m_pOwner->m_sText = pstr;
m_pOwner->GetManager()->SendNotify(m_pOwner, _T("textchanged"));
return 0;
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
CEditUI::CEditUI() : m_pWindow(NULL), m_uMaxChar(255), m_bReadOnly(false),
m_bPasswordMode(false), m_cPasswordChar(_T('*')), m_uButtonState(0),
m_dwEditbkColor(0xFFFFFFFF), m_iWindowStyls(0)
{
SetTextPadding(CRect(4, 3, 4, 3));
SetBkColor(0xFFFFFFFF);
}
LPCTSTR CEditUI::GetClass() const
{
return _T("EditUI");
}
LPVOID CEditUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("Edit")) == 0 ) return static_cast<CEditUI*>(this);
return CLabelUI::GetInterface(pstrName);
}
UINT CEditUI::GetControlFlags() const
{
if( !IsEnabled() ) return CControlUI::GetControlFlags();
return UIFLAG_SETCURSOR | UIFLAG_TABSTOP;
}
void CEditUI::DoEvent(TEventUI& event)
{
if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
if( m_pParent != NULL ) m_pParent->DoEvent(event);
else CLabelUI::DoEvent(event);
return;
}
if( event.Type == UIEVENT_SETCURSOR && IsEnabled() )
{
::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM)));
return;
}
if( event.Type == UIEVENT_WINDOWSIZE )
{
if( m_pWindow != NULL ) m_pManager->SetFocusNeeded(this);
}
if( event.Type == UIEVENT_SCROLLWHEEL )
{
if( m_pWindow != NULL ) return;
}
if( event.Type == UIEVENT_SETFOCUS && IsEnabled() )
{
if( m_pWindow ) return;
m_pWindow = new CEditWnd();
ASSERT(m_pWindow);
m_pWindow->Init(this);
Invalidate();
}
if( event.Type == UIEVENT_KILLFOCUS && IsEnabled() )
{
Invalidate();
}
if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK || event.Type == UIEVENT_RBUTTONDOWN)
{
if( IsEnabled() ) {
GetManager()->ReleaseCapture();
if( IsFocused() && m_pWindow == NULL )
{
m_pWindow = new CEditWnd();
ASSERT(m_pWindow);
m_pWindow->Init(this);
if( PtInRect(&m_rcItem, event.ptMouse) )
{
int nSize = GetWindowTextLength(*m_pWindow);
if( nSize == 0 )
nSize = 1;
Edit_SetSel(*m_pWindow, 0, nSize);
}
}
else if( m_pWindow != NULL )
{
#if 1
int nSize = GetWindowTextLength(*m_pWindow);
if( nSize == 0 )
nSize = 1;
Edit_SetSel(*m_pWindow, 0, nSize);
#else
POINT pt = event.ptMouse;
pt.x -= m_rcItem.left + m_rcTextPadding.left;
pt.y -= m_rcItem.top + m_rcTextPadding.top;
::SendMessage(*m_pWindow, WM_LBUTTONDOWN, event.wParam, MAKELPARAM(pt.x, pt.y));
#endif
}
}
return;
}
if( event.Type == UIEVENT_MOUSEMOVE )
{
return;
}
if( event.Type == UIEVENT_BUTTONUP )
{
return;
}
if( event.Type == UIEVENT_CONTEXTMENU )
{
return;
}
if( event.Type == UIEVENT_MOUSEENTER )
{
if( IsEnabled() ) {
m_uButtonState |= UISTATE_HOT;
Invalidate();
}
return;
}
if( event.Type == UIEVENT_MOUSELEAVE )
{
if( IsEnabled() ) {
m_uButtonState &= ~UISTATE_HOT;
Invalidate();
}
return;
}
CLabelUI::DoEvent(event);
}
void CEditUI::SetEnabled(bool bEnable)
{
CControlUI::SetEnabled(bEnable);
if( !IsEnabled() ) {
m_uButtonState = 0;
}
}
void CEditUI::SetText(LPCTSTR pstrText)
{
m_sText = pstrText;
if( m_pWindow != NULL ) Edit_SetText(*m_pWindow, m_sText);
Invalidate();
}
void CEditUI::SetMaxChar(UINT uMax)
{
m_uMaxChar = uMax;
if( m_pWindow != NULL ) Edit_LimitText(*m_pWindow, m_uMaxChar);
}
UINT CEditUI::GetMaxChar()
{
return m_uMaxChar;
}
void CEditUI::SetReadOnly(bool bReadOnly)
{
if( m_bReadOnly == bReadOnly ) return;
m_bReadOnly = bReadOnly;
if( m_pWindow != NULL ) Edit_SetReadOnly(*m_pWindow, m_bReadOnly);
Invalidate();
}
bool CEditUI::IsReadOnly() const
{
return m_bReadOnly;
}
void CEditUI::SetNumberOnly(bool bNumberOnly)
{
if( bNumberOnly )
{
m_iWindowStyls |= ES_NUMBER;
}
else
{
m_iWindowStyls |= ~ES_NUMBER;
}
}
bool CEditUI::IsNumberOnly() const
{
return m_iWindowStyls&ES_NUMBER ? true:false;
}
int CEditUI::GetWindowStyls() const
{
return m_iWindowStyls;
}
void CEditUI::SetPasswordMode(bool bPasswordMode)
{
if( m_bPasswordMode == bPasswordMode ) return;
m_bPasswordMode = bPasswordMode;
Invalidate();
}
bool CEditUI::IsPasswordMode() const
{
return m_bPasswordMode;
}
void CEditUI::SetPasswordChar(TCHAR cPasswordChar)
{
if( m_cPasswordChar == cPasswordChar ) return;
m_cPasswordChar = cPasswordChar;
if( m_pWindow != NULL ) Edit_SetPasswordChar(*m_pWindow, m_cPasswordChar);
Invalidate();
}
TCHAR CEditUI::GetPasswordChar() const
{
return m_cPasswordChar;
}
LPCTSTR CEditUI::GetNormalImage()
{
return m_sNormalImage;
}
void CEditUI::SetNormalImage(LPCTSTR pStrImage)
{
m_sNormalImage = pStrImage;
Invalidate();
}
LPCTSTR CEditUI::GetHotImage()
{
return m_sHotImage;
}
void CEditUI::SetHotImage(LPCTSTR pStrImage)
{
m_sHotImage = pStrImage;
Invalidate();
}
LPCTSTR CEditUI::GetFocusedImage()
{
return m_sFocusedImage;
}
void CEditUI::SetFocusedImage(LPCTSTR pStrImage)
{
m_sFocusedImage = pStrImage;
Invalidate();
}
LPCTSTR CEditUI::GetDisabledImage()
{
return m_sDisabledImage;
}
void CEditUI::SetDisabledImage(LPCTSTR pStrImage)
{
m_sDisabledImage = pStrImage;
Invalidate();
}
void CEditUI::SetNativeEditBkColor(DWORD dwBkColor)
{
m_dwEditbkColor = dwBkColor;
}
DWORD CEditUI::GetNativeEditBkColor() const
{
return m_dwEditbkColor;
}
void CEditUI::SetSel(long nStartChar, long nEndChar)
{
if( m_pWindow != NULL ) Edit_SetSel(*m_pWindow, nStartChar,nEndChar);
}
void CEditUI::SetSelAll()
{
SetSel(0,-1);
}
void CEditUI::SetReplaceSel(LPCTSTR lpszReplace)
{
if( m_pWindow != NULL ) Edit_ReplaceSel(*m_pWindow, lpszReplace);
}
void CEditUI::SetPos(RECT rc)
{
CControlUI::SetPos(rc);
if( m_pWindow != NULL ) {
RECT rcPos = m_pWindow->CalPos();
::SetWindowPos(m_pWindow->GetHWND(), NULL, rcPos.left, rcPos.top, rcPos.right - rcPos.left,
rcPos.bottom - rcPos.top, SWP_NOZORDER | SWP_NOACTIVATE);
}
}
void CEditUI::SetVisible(bool bVisible)
{
CControlUI::SetVisible(bVisible);
if( !IsVisible() && m_pWindow != NULL ) m_pManager->SetFocus(NULL);
}
void CEditUI::SetInternVisible(bool bVisible)
{
if( !IsVisible() && m_pWindow != NULL ) m_pManager->SetFocus(NULL);
}
SIZE CEditUI::EstimateSize(SIZE szAvailable)
{
if( m_cxyFixed.cy == 0 ) return CSize(m_cxyFixed.cx, m_pManager->GetFontInfo(GetFont())->tm.tmHeight + 6);
return CControlUI::EstimateSize(szAvailable);
}
void CEditUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if( _tcscmp(pstrName, _T("readonly")) == 0 ) SetReadOnly(_tcscmp(pstrValue, _T("true")) == 0);
else if( _tcscmp(pstrName, _T("numberonly")) == 0 ) SetNumberOnly(_tcscmp(pstrValue, _T("true")) == 0);
else if( _tcscmp(pstrName, _T("password")) == 0 ) SetPasswordMode(_tcscmp(pstrValue, _T("true")) == 0);
else if( _tcscmp(pstrName, _T("maxchar")) == 0 ) SetMaxChar(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("normalimage")) == 0 ) SetNormalImage(pstrValue);
else if( _tcscmp(pstrName, _T("hotimage")) == 0 ) SetHotImage(pstrValue);
else if( _tcscmp(pstrName, _T("focusedimage")) == 0 ) SetFocusedImage(pstrValue);
else if( _tcscmp(pstrName, _T("disabledimage")) == 0 ) SetDisabledImage(pstrValue);
else if( _tcscmp(pstrName, _T("nativebkcolor")) == 0 ) {
if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue);
LPTSTR pstr = NULL;
DWORD clrColor = _tcstoul(pstrValue, &pstr, 16);
SetNativeEditBkColor(clrColor);
}
else CLabelUI::SetAttribute(pstrName, pstrValue);
}
void CEditUI::PaintStatusImage(HDC hDC)
{
if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
else m_uButtonState &= ~ UISTATE_FOCUSED;
if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
else m_uButtonState &= ~ UISTATE_DISABLED;
if( (m_uButtonState & UISTATE_DISABLED) != 0 ) {
if( !m_sDisabledImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sDisabledImage) ) m_sDisabledImage.Empty();
else return;
}
}
else if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {
if( !m_sFocusedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();
else return;
}
}
else if( (m_uButtonState & UISTATE_HOT) != 0 ) {
if( !m_sHotImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sHotImage) ) m_sHotImage.Empty();
else return;
}
}
if( !m_sNormalImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) m_sNormalImage.Empty();
else return;
}
}
void CEditUI::PaintText(HDC hDC)
{
if( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor();
if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor();
if( m_sText.IsEmpty() ) return;
CStdString sText = m_sText;
if( m_bPasswordMode ) {
sText.Empty();
LPCTSTR p = m_sText.GetData();
while( *p != _T('\0') ) {
sText += m_cPasswordChar;
p = ::CharNext(p);
}
}
RECT rc = m_rcItem;
rc.left += m_rcTextPadding.left;
rc.right -= m_rcTextPadding.right;
rc.top += m_rcTextPadding.top;
rc.bottom -= m_rcTextPadding.bottom;
if( IsEnabled() ) {
CRenderEngine::DrawText(hDC, m_pManager, rc, sText, m_dwTextColor, \
m_iFont, DT_SINGLELINE | m_uTextStyle);
}
else {
CRenderEngine::DrawText(hDC, m_pManager, rc, sText, m_dwDisabledTextColor, \
m_iFont, DT_SINGLELINE | m_uTextStyle);
}
}
/////////////////////////////////////////////////////////////////////////////////////
//
//
CScrollBarUI::CScrollBarUI() : m_bHorizontal(false), m_nRange(100), m_nScrollPos(0), m_nLineSize(8),
m_pOwner(NULL), m_nLastScrollPos(0), m_nLastScrollOffset(0), m_nScrollRepeatDelay(0), m_uButton1State(0), \
m_uButton2State(0), m_uThumbState(0), m_bShowButton1(true), m_bShowButton2(true)
{
m_cxyFixed.cx = DEFAULT_SCROLLBAR_SIZE;
ptLastMouse.x = ptLastMouse.y = 0;
::ZeroMemory(&m_rcThumb, sizeof(m_rcThumb));
::ZeroMemory(&m_rcButton1, sizeof(m_rcButton1));
::ZeroMemory(&m_rcButton2, sizeof(m_rcButton2));
}
LPCTSTR CScrollBarUI::GetClass() const
{
return _T("ScrollBarUI");
}
LPVOID CScrollBarUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("ScrollBar")) == 0 ) return static_cast<CScrollBarUI*>(this);
return CControlUI::GetInterface(pstrName);
}
CContainerUI* CScrollBarUI::GetOwner() const
{
return m_pOwner;
}
void CScrollBarUI::SetOwner(CContainerUI* pOwner)
{
m_pOwner = pOwner;
}
void CScrollBarUI::SetVisible(bool bVisible)
{
if( m_bVisible == bVisible ) return;
bool v = IsVisible();
m_bVisible = bVisible;
if( m_bFocused ) m_bFocused = false;
}
void CScrollBarUI::SetEnabled(bool bEnable)
{
CControlUI::SetEnabled(bEnable);
if( !IsEnabled() ) {
m_uButton1State = 0;
m_uButton2State = 0;
m_uThumbState = 0;
}
}
void CScrollBarUI::SetFocus()
{
if( m_pOwner != NULL ) m_pOwner->SetFocus();
else CControlUI::SetFocus();
}
bool CScrollBarUI::IsHorizontal()
{
return m_bHorizontal;
}
void CScrollBarUI::SetHorizontal(bool bHorizontal)
{
if( m_bHorizontal == bHorizontal ) return;
m_bHorizontal = bHorizontal;
if( m_bHorizontal ) {
if( m_cxyFixed.cy == 0 ) {
m_cxyFixed.cx = 0;
m_cxyFixed.cy = DEFAULT_SCROLLBAR_SIZE;
}
}
else {
if( m_cxyFixed.cx == 0 ) {
m_cxyFixed.cx = DEFAULT_SCROLLBAR_SIZE;
m_cxyFixed.cy = 0;
}
}
if( m_pOwner != NULL ) m_pOwner->NeedUpdate(); else NeedParentUpdate();
}
int CScrollBarUI::GetScrollRange() const
{
return m_nRange;
}
void CScrollBarUI::SetScrollRange(int nRange)
{
if( m_nRange == nRange ) return;
m_nRange = nRange;
if( m_nRange < 0 ) m_nRange = 0;
if( m_nScrollPos > m_nRange ) m_nScrollPos = m_nRange;
SetPos(m_rcItem);
}
int CScrollBarUI::GetScrollPos() const
{
return m_nScrollPos;
}
void CScrollBarUI::SetScrollPos(int nPos)
{
if( m_nScrollPos == nPos ) return;
m_nScrollPos = nPos;
if( m_nScrollPos < 0 ) m_nScrollPos = 0;
if( m_nScrollPos > m_nRange ) m_nScrollPos = m_nRange;
SetPos(m_rcItem);
}
int CScrollBarUI::GetLineSize() const
{
return m_nLineSize;
}
void CScrollBarUI::SetLineSize(int nSize)
{
m_nLineSize = nSize;
}
bool CScrollBarUI::GetShowButton1()
{
return m_bShowButton1;
}
void CScrollBarUI::SetShowButton1(bool bShow)
{
m_bShowButton1 = bShow;
SetPos(m_rcItem);
}
LPCTSTR CScrollBarUI::GetButton1NormalImage()
{
return m_sButton1NormalImage;
}
void CScrollBarUI::SetButton1NormalImage(LPCTSTR pStrImage)
{
m_sButton1NormalImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetButton1HotImage()
{
return m_sButton1HotImage;
}
void CScrollBarUI::SetButton1HotImage(LPCTSTR pStrImage)
{
m_sButton1HotImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetButton1PushedImage()
{
return m_sButton1PushedImage;
}
void CScrollBarUI::SetButton1PushedImage(LPCTSTR pStrImage)
{
m_sButton1PushedImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetButton1DisabledImage()
{
return m_sButton1DisabledImage;
}
void CScrollBarUI::SetButton1DisabledImage(LPCTSTR pStrImage)
{
m_sButton1DisabledImage = pStrImage;
Invalidate();
}
bool CScrollBarUI::GetShowButton2()
{
return m_bShowButton2;
}
void CScrollBarUI::SetShowButton2(bool bShow)
{
m_bShowButton2 = bShow;
SetPos(m_rcItem);
}
LPCTSTR CScrollBarUI::GetButton2NormalImage()
{
return m_sButton2NormalImage;
}
void CScrollBarUI::SetButton2NormalImage(LPCTSTR pStrImage)
{
m_sButton2NormalImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetButton2HotImage()
{
return m_sButton2HotImage;
}
void CScrollBarUI::SetButton2HotImage(LPCTSTR pStrImage)
{
m_sButton2HotImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetButton2PushedImage()
{
return m_sButton2PushedImage;
}
void CScrollBarUI::SetButton2PushedImage(LPCTSTR pStrImage)
{
m_sButton2PushedImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetButton2DisabledImage()
{
return m_sButton2DisabledImage;
}
void CScrollBarUI::SetButton2DisabledImage(LPCTSTR pStrImage)
{
m_sButton2DisabledImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetThumbNormalImage()
{
return m_sThumbNormalImage;
}
void CScrollBarUI::SetThumbNormalImage(LPCTSTR pStrImage)
{
m_sThumbNormalImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetThumbHotImage()
{
return m_sThumbHotImage;
}
void CScrollBarUI::SetThumbHotImage(LPCTSTR pStrImage)
{
m_sThumbHotImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetThumbPushedImage()
{
return m_sThumbPushedImage;
}
void CScrollBarUI::SetThumbPushedImage(LPCTSTR pStrImage)
{
m_sThumbPushedImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetThumbDisabledImage()
{
return m_sThumbDisabledImage;
}
void CScrollBarUI::SetThumbDisabledImage(LPCTSTR pStrImage)
{
m_sThumbDisabledImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetRailNormalImage()
{
return m_sRailNormalImage;
}
void CScrollBarUI::SetRailNormalImage(LPCTSTR pStrImage)
{
m_sRailNormalImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetRailHotImage()
{
return m_sRailHotImage;
}
void CScrollBarUI::SetRailHotImage(LPCTSTR pStrImage)
{
m_sRailHotImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetRailPushedImage()
{
return m_sRailPushedImage;
}
void CScrollBarUI::SetRailPushedImage(LPCTSTR pStrImage)
{
m_sRailPushedImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetRailDisabledImage()
{
return m_sRailDisabledImage;
}
void CScrollBarUI::SetRailDisabledImage(LPCTSTR pStrImage)
{
m_sRailDisabledImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetBkNormalImage()
{
return m_sBkNormalImage;
}
void CScrollBarUI::SetBkNormalImage(LPCTSTR pStrImage)
{
m_sBkNormalImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetBkHotImage()
{
return m_sBkHotImage;
}
void CScrollBarUI::SetBkHotImage(LPCTSTR pStrImage)
{
m_sBkHotImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetBkPushedImage()
{
return m_sBkPushedImage;
}
void CScrollBarUI::SetBkPushedImage(LPCTSTR pStrImage)
{
m_sBkPushedImage = pStrImage;
Invalidate();
}
LPCTSTR CScrollBarUI::GetBkDisabledImage()
{
return m_sBkDisabledImage;
}
void CScrollBarUI::SetBkDisabledImage(LPCTSTR pStrImage)
{
m_sBkDisabledImage = pStrImage;
Invalidate();
}
void CScrollBarUI::SetPos(RECT rc)
{
CControlUI::SetPos(rc);
rc = m_rcItem;
if( m_bHorizontal ) {
int cx = rc.right - rc.left;
if( m_bShowButton1 ) cx -= m_cxyFixed.cy;
if( m_bShowButton2 ) cx -= m_cxyFixed.cy;
if( cx > m_cxyFixed.cy ) {
m_rcButton1.left = rc.left;
m_rcButton1.top = rc.top;
if( m_bShowButton1 ) {
m_rcButton1.right = rc.left + m_cxyFixed.cy;
m_rcButton1.bottom = rc.top + m_cxyFixed.cy;
}
else {
m_rcButton1.right = m_rcButton1.left;
m_rcButton1.bottom = m_rcButton1.top;
}
m_rcButton2.top = rc.top;
m_rcButton2.right = rc.right;
if( m_bShowButton2 ) {
m_rcButton2.left = rc.right - m_cxyFixed.cy;
m_rcButton2.bottom = rc.top + m_cxyFixed.cy;
}
else {
m_rcButton2.left = m_rcButton2.right;
m_rcButton2.bottom = m_rcButton2.top;
}
m_rcThumb.top = rc.top;
m_rcThumb.bottom = rc.top + m_cxyFixed.cy;
if( m_nRange > 0 ) {
int cxThumb = cx * (rc.right - rc.left) / (m_nRange + rc.right - rc.left);
if( cxThumb < m_cxyFixed.cy ) cxThumb = m_cxyFixed.cy;
m_rcThumb.left = m_nScrollPos * (cx - cxThumb) / m_nRange + m_rcButton1.right;
m_rcThumb.right = m_rcThumb.left + cxThumb;
if( m_rcThumb.right > m_rcButton2.left ) {
m_rcThumb.left = m_rcButton2.left - cxThumb;
m_rcThumb.right = m_rcButton2.left;
}
}
else {
m_rcThumb.left = m_rcButton1.right;
m_rcThumb.right = m_rcButton2.left;
}
}
else {
int cxButton = (rc.right - rc.left) / 2;
if( cxButton > m_cxyFixed.cy ) cxButton = m_cxyFixed.cy;
m_rcButton1.left = rc.left;
m_rcButton1.top = rc.top;
if( m_bShowButton1 ) {
m_rcButton1.right = rc.left + cxButton;
m_rcButton1.bottom = rc.top + m_cxyFixed.cy;
}
else {
m_rcButton1.right = m_rcButton1.left;
m_rcButton1.bottom = m_rcButton1.top;
}
m_rcButton2.top = rc.top;
m_rcButton2.right = rc.right;
if( m_bShowButton2 ) {
m_rcButton2.left = rc.right - cxButton;
m_rcButton2.bottom = rc.top + m_cxyFixed.cy;
}
else {
m_rcButton2.left = m_rcButton2.right;
m_rcButton2.bottom = m_rcButton2.top;
}
::ZeroMemory(&m_rcThumb, sizeof(m_rcThumb));
}
}
else {
int cy = rc.bottom - rc.top;
if( m_bShowButton1 ) cy -= m_cxyFixed.cx;
if( m_bShowButton2 ) cy -= m_cxyFixed.cx;
if( cy > m_cxyFixed.cx ) {
m_rcButton1.left = rc.left;
m_rcButton1.top = rc.top;
if( m_bShowButton1 ) {
m_rcButton1.right = rc.left + m_cxyFixed.cx;
m_rcButton1.bottom = rc.top + m_cxyFixed.cx;
}
else {
m_rcButton1.right = m_rcButton1.left;
m_rcButton1.bottom = m_rcButton1.top;
}
m_rcButton2.left = rc.left;
m_rcButton2.bottom = rc.bottom;
if( m_bShowButton2 ) {
m_rcButton2.top = rc.bottom - m_cxyFixed.cx;
m_rcButton2.right = rc.left + m_cxyFixed.cx;
}
else {
m_rcButton2.top = m_rcButton2.bottom;
m_rcButton2.right = m_rcButton2.left;
}
m_rcThumb.left = rc.left;
m_rcThumb.right = rc.left + m_cxyFixed.cx;
if( m_nRange > 0 ) {
int cyThumb = cy * (rc.bottom - rc.top) / (m_nRange + rc.bottom - rc.top);
if( cyThumb < m_cxyFixed.cx ) cyThumb = m_cxyFixed.cx;
m_rcThumb.top = m_nScrollPos * (cy - cyThumb) / m_nRange + m_rcButton1.bottom;
m_rcThumb.bottom = m_rcThumb.top + cyThumb;
if( m_rcThumb.bottom > m_rcButton2.top ) {
m_rcThumb.top = m_rcButton2.top - cyThumb;
m_rcThumb.bottom = m_rcButton2.top;
}
}
else {
m_rcThumb.top = m_rcButton1.bottom;
m_rcThumb.bottom = m_rcButton2.top;
}
}
else {
int cyButton = (rc.bottom - rc.top) / 2;
if( cyButton > m_cxyFixed.cx ) cyButton = m_cxyFixed.cx;
m_rcButton1.left = rc.left;
m_rcButton1.top = rc.top;
if( m_bShowButton1 ) {
m_rcButton1.right = rc.left + m_cxyFixed.cx;
m_rcButton1.bottom = rc.top + cyButton;
}
else {
m_rcButton1.right = m_rcButton1.left;
m_rcButton1.bottom = m_rcButton1.top;
}
m_rcButton2.left = rc.left;
m_rcButton2.bottom = rc.bottom;
if( m_bShowButton2 ) {
m_rcButton2.top = rc.bottom - cyButton;
m_rcButton2.right = rc.left + m_cxyFixed.cx;
}
else {
m_rcButton2.top = m_rcButton2.bottom;
m_rcButton2.right = m_rcButton2.left;
}
::ZeroMemory(&m_rcThumb, sizeof(m_rcThumb));
}
}
}
void CScrollBarUI::DoEvent(TEventUI& event)
{
if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
if( m_pOwner != NULL ) m_pOwner->DoEvent(event);
else CControlUI::DoEvent(event);
return;
}
if( event.Type == UIEVENT_SETFOCUS )
{
return;
}
if( event.Type == UIEVENT_KILLFOCUS )
{
return;
}
if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK )
{
if( !IsEnabled() ) return;
m_nLastScrollOffset = 0;
m_nScrollRepeatDelay = 0;
m_pManager->SetTimer(this, DEFAULT_TIMERID, 50U);
if( ::PtInRect(&m_rcButton1, event.ptMouse) ) {
m_uButton1State |= UISTATE_PUSHED;
if( !m_bHorizontal ) {
if( m_pOwner != NULL ) m_pOwner->LineUp();
else SetScrollPos(m_nScrollPos - m_nLineSize);
}
else {
if( m_pOwner != NULL ) m_pOwner->LineLeft();
else SetScrollPos(m_nScrollPos - m_nLineSize);
}
}
else if( ::PtInRect(&m_rcButton2, event.ptMouse) ) {
m_uButton2State |= UISTATE_PUSHED;
if( !m_bHorizontal ) {
if( m_pOwner != NULL ) m_pOwner->LineDown();
else SetScrollPos(m_nScrollPos + m_nLineSize);
}
else {
if( m_pOwner != NULL ) m_pOwner->LineRight();
else SetScrollPos(m_nScrollPos + m_nLineSize);
}
}
else if( ::PtInRect(&m_rcThumb, event.ptMouse) ) {
m_uThumbState |= UISTATE_CAPTURED | UISTATE_PUSHED;
ptLastMouse = event.ptMouse;
m_nLastScrollPos = m_nScrollPos;
}
else {
if( !m_bHorizontal ) {
if( event.ptMouse.y < m_rcThumb.top ) {
if( m_pOwner != NULL ) m_pOwner->PageUp();
else SetScrollPos(m_nScrollPos + m_rcItem.top - m_rcItem.bottom);
}
else if ( event.ptMouse.y > m_rcThumb.bottom ){
if( m_pOwner != NULL ) m_pOwner->PageDown();
else SetScrollPos(m_nScrollPos - m_rcItem.top + m_rcItem.bottom);
}
}
else {
if( event.ptMouse.x < m_rcThumb.left ) {
if( m_pOwner != NULL ) m_pOwner->PageLeft();
else SetScrollPos(m_nScrollPos + m_rcItem.left - m_rcItem.right);
}
else if ( event.ptMouse.x > m_rcThumb.right ){
if( m_pOwner != NULL ) m_pOwner->PageRight();
else SetScrollPos(m_nScrollPos - m_rcItem.left + m_rcItem.right);
}
}
}
if( m_pManager != NULL && m_pOwner == NULL ) m_pManager->SendNotify(this, _T("scroll"));
return;
}
if( event.Type == UIEVENT_BUTTONUP )
{
m_nScrollRepeatDelay = 0;
m_nLastScrollOffset = 0;
m_pManager->KillTimer(this, DEFAULT_TIMERID);
if( (m_uThumbState & UISTATE_CAPTURED) != 0 ) {
m_uThumbState &= ~( UISTATE_CAPTURED | UISTATE_PUSHED );
Invalidate();
}
else if( (m_uButton1State & UISTATE_PUSHED) != 0 ) {
m_uButton1State &= ~UISTATE_PUSHED;
Invalidate();
}
else if( (m_uButton2State & UISTATE_PUSHED) != 0 ) {
m_uButton2State &= ~UISTATE_PUSHED;
Invalidate();
}
return;
}
if( event.Type == UIEVENT_MOUSEMOVE )
{
if( (m_uThumbState & UISTATE_CAPTURED) != 0 ) {
if( !m_bHorizontal ) {
m_nLastScrollOffset = (event.ptMouse.y - ptLastMouse.y) * m_nRange / \
(m_rcItem.bottom - m_rcItem.top - m_rcThumb.bottom + m_rcThumb.top - 2 * m_cxyFixed.cx);
}
else {
m_nLastScrollOffset = (event.ptMouse.x - ptLastMouse.x) * m_nRange / \
(m_rcItem.right - m_rcItem.left - m_rcThumb.right + m_rcThumb.left - 2 * m_cxyFixed.cy);
}
}
else {
if( (m_uThumbState & UISTATE_HOT) != 0 ) {
if( !::PtInRect(&m_rcThumb, event.ptMouse) ) {
m_uThumbState &= ~UISTATE_HOT;
Invalidate();
}
}
else {
if( !IsEnabled() ) return;
if( ::PtInRect(&m_rcThumb, event.ptMouse) ) {
m_uThumbState |= UISTATE_HOT;
Invalidate();
}
}
}
return;
}
if( event.Type == UIEVENT_CONTEXTMENU )
{
return;
}
if( event.Type == UIEVENT_TIMER && event.wParam == DEFAULT_TIMERID )
{
++m_nScrollRepeatDelay;
if( (m_uThumbState & UISTATE_CAPTURED) != 0 ) {
if( !m_bHorizontal ) {
if( m_pOwner != NULL ) m_pOwner->SetScrollPos(CSize(m_pOwner->GetScrollPos().cx, \
m_nLastScrollPos + m_nLastScrollOffset));
else SetScrollPos(m_nLastScrollPos + m_nLastScrollOffset);
}
else {
if( m_pOwner != NULL ) m_pOwner->SetScrollPos(CSize(m_nLastScrollPos + m_nLastScrollOffset, \
m_pOwner->GetScrollPos().cy));
else SetScrollPos(m_nLastScrollPos + m_nLastScrollOffset);
}
Invalidate();
}
else if( (m_uButton1State & UISTATE_PUSHED) != 0 ) {
if( m_nScrollRepeatDelay <= 5 ) return;
if( !m_bHorizontal ) {
if( m_pOwner != NULL ) m_pOwner->LineUp();
else SetScrollPos(m_nScrollPos - m_nLineSize);
}
else {
if( m_pOwner != NULL ) m_pOwner->LineLeft();
else SetScrollPos(m_nScrollPos - m_nLineSize);
}
}
else if( (m_uButton2State & UISTATE_PUSHED) != 0 ) {
if( m_nScrollRepeatDelay <= 5 ) return;
if( !m_bHorizontal ) {
if( m_pOwner != NULL ) m_pOwner->LineDown();
else SetScrollPos(m_nScrollPos + m_nLineSize);
}
else {
if( m_pOwner != NULL ) m_pOwner->LineRight();
else SetScrollPos(m_nScrollPos + m_nLineSize);
}
}
else {
if( m_nScrollRepeatDelay <= 5 ) return;
POINT pt = { 0 };
::GetCursorPos(&pt);
::ScreenToClient(m_pManager->GetPaintWindow(), &pt);
if( !m_bHorizontal ) {
if( pt.y < m_rcThumb.top ) {
if( m_pOwner != NULL ) m_pOwner->PageUp();
else SetScrollPos(m_nScrollPos + m_rcItem.top - m_rcItem.bottom);
}
else if ( pt.y > m_rcThumb.bottom ){
if( m_pOwner != NULL ) m_pOwner->PageDown();
else SetScrollPos(m_nScrollPos - m_rcItem.top + m_rcItem.bottom);
}
}
else {
if( pt.x < m_rcThumb.left ) {
if( m_pOwner != NULL ) m_pOwner->PageLeft();
else SetScrollPos(m_nScrollPos + m_rcItem.left - m_rcItem.right);
}
else if ( pt.x > m_rcThumb.right ){
if( m_pOwner != NULL ) m_pOwner->PageRight();
else SetScrollPos(m_nScrollPos - m_rcItem.left + m_rcItem.right);
}
}
}
if( m_pManager != NULL && m_pOwner == NULL ) m_pManager->SendNotify(this, _T("scroll"));
return;
}
if( event.Type == UIEVENT_MOUSEENTER )
{
if( IsEnabled() ) {
m_uButton1State |= UISTATE_HOT;
m_uButton2State |= UISTATE_HOT;
if( ::PtInRect(&m_rcThumb, event.ptMouse) ) m_uThumbState |= UISTATE_HOT;
Invalidate();
}
return;
}
if( event.Type == UIEVENT_MOUSELEAVE )
{
if( IsEnabled() ) {
m_uButton1State &= ~UISTATE_HOT;
m_uButton2State &= ~UISTATE_HOT;
m_uThumbState &= ~UISTATE_HOT;
Invalidate();
}
return;
}
if( m_pOwner != NULL ) m_pOwner->DoEvent(event); else CControlUI::DoEvent(event);
}
void CScrollBarUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if( _tcscmp(pstrName, _T("button1normalimage")) == 0 ) SetButton1NormalImage(pstrValue);
else if( _tcscmp(pstrName, _T("button1hotimage")) == 0 ) SetButton1HotImage(pstrValue);
else if( _tcscmp(pstrName, _T("button1pushedimage")) == 0 ) SetButton1PushedImage(pstrValue);
else if( _tcscmp(pstrName, _T("button1disabledimage")) == 0 ) SetButton1DisabledImage(pstrValue);
else if( _tcscmp(pstrName, _T("button2normalimage")) == 0 ) SetButton2NormalImage(pstrValue);
else if( _tcscmp(pstrName, _T("button2hotimage")) == 0 ) SetButton2HotImage(pstrValue);
else if( _tcscmp(pstrName, _T("button2pushedimage")) == 0 ) SetButton2PushedImage(pstrValue);
else if( _tcscmp(pstrName, _T("button2disabledimage")) == 0 ) SetButton2DisabledImage(pstrValue);
else if( _tcscmp(pstrName, _T("thumbnormalimage")) == 0 ) SetThumbNormalImage(pstrValue);
else if( _tcscmp(pstrName, _T("thumbhotimage")) == 0 ) SetThumbHotImage(pstrValue);
else if( _tcscmp(pstrName, _T("thumbpushedimage")) == 0 ) SetThumbPushedImage(pstrValue);
else if( _tcscmp(pstrName, _T("thumbdisabledimage")) == 0 ) SetThumbDisabledImage(pstrValue);
else if( _tcscmp(pstrName, _T("railnormalimage")) == 0 ) SetRailNormalImage(pstrValue);
else if( _tcscmp(pstrName, _T("railhotimage")) == 0 ) SetRailHotImage(pstrValue);
else if( _tcscmp(pstrName, _T("railpushedimage")) == 0 ) SetRailPushedImage(pstrValue);
else if( _tcscmp(pstrName, _T("raildisabledimage")) == 0 ) SetRailDisabledImage(pstrValue);
else if( _tcscmp(pstrName, _T("bknormalimage")) == 0 ) SetBkNormalImage(pstrValue);
else if( _tcscmp(pstrName, _T("bkhotimage")) == 0 ) SetBkHotImage(pstrValue);
else if( _tcscmp(pstrName, _T("bkpushedimage")) == 0 ) SetBkPushedImage(pstrValue);
else if( _tcscmp(pstrName, _T("bkdisabledimage")) == 0 ) SetBkDisabledImage(pstrValue);
else if( _tcscmp(pstrName, _T("hor")) == 0 ) SetHorizontal(_tcscmp(pstrValue, _T("true")) == 0);
else if( _tcscmp(pstrName, _T("linesize")) == 0 ) SetLineSize(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("range")) == 0 ) SetScrollRange(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("value")) == 0 ) SetScrollPos(_ttoi(pstrValue));
else if( _tcscmp(pstrName, _T("showbutton1")) == 0 ) SetShowButton1(_tcscmp(pstrValue, _T("true")) == 0);
else if( _tcscmp(pstrName, _T("showbutton2")) == 0 ) SetShowButton2(_tcscmp(pstrValue, _T("true")) == 0);
else CControlUI::SetAttribute(pstrName, pstrValue);
}
void CScrollBarUI::DoPaint(HDC hDC, const RECT& rcPaint)
{
if( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return;
PaintBk(hDC);
PaintButton1(hDC);
PaintButton2(hDC);
PaintThumb(hDC);
PaintRail(hDC);
}
void CScrollBarUI::PaintBk(HDC hDC)
{
if( !IsEnabled() ) m_uThumbState |= UISTATE_DISABLED;
else m_uThumbState &= ~ UISTATE_DISABLED;
if( (m_uThumbState & UISTATE_DISABLED) != 0 ) {
if( !m_sBkDisabledImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sBkDisabledImage) ) m_sBkDisabledImage.Empty();
else return;
}
}
else if( (m_uThumbState & UISTATE_PUSHED) != 0 ) {
if( !m_sBkPushedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sBkPushedImage) ) m_sBkPushedImage.Empty();
else return;
}
}
else if( (m_uThumbState & UISTATE_HOT) != 0 ) {
if( !m_sBkHotImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sBkHotImage) ) m_sBkHotImage.Empty();
else return;
}
}
if( !m_sBkNormalImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sBkNormalImage) ) m_sBkNormalImage.Empty();
else return;
}
}
void CScrollBarUI::PaintButton1(HDC hDC)
{
if( !m_bShowButton1 ) return;
if( !IsEnabled() ) m_uButton1State |= UISTATE_DISABLED;
else m_uButton1State &= ~ UISTATE_DISABLED;
m_sImageModify.Empty();
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), m_rcButton1.left - m_rcItem.left, \
m_rcButton1.top - m_rcItem.top, m_rcButton1.right - m_rcItem.left, m_rcButton1.bottom - m_rcItem.top);
if( (m_uButton1State & UISTATE_DISABLED) != 0 ) {
if( !m_sButton1DisabledImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton1DisabledImage, (LPCTSTR)m_sImageModify) ) m_sButton1DisabledImage.Empty();
else return;
}
}
else if( (m_uButton1State & UISTATE_PUSHED) != 0 ) {
if( !m_sButton1PushedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton1PushedImage, (LPCTSTR)m_sImageModify) ) m_sButton1PushedImage.Empty();
else return;
}
}
else if( (m_uButton1State & UISTATE_HOT) != 0 ) {
if( !m_sButton1HotImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton1HotImage, (LPCTSTR)m_sImageModify) ) m_sButton1HotImage.Empty();
else return;
}
}
if( !m_sButton1NormalImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton1NormalImage, (LPCTSTR)m_sImageModify) ) m_sButton1NormalImage.Empty();
else return;
}
DWORD dwBorderColor = 0xFF85E4FF;
int nBorderSize = 2;
CRenderEngine::DrawRect(hDC, m_rcButton1, nBorderSize, dwBorderColor);
}
void CScrollBarUI::PaintButton2(HDC hDC)
{
if( !m_bShowButton2 ) return;
if( !IsEnabled() ) m_uButton2State |= UISTATE_DISABLED;
else m_uButton2State &= ~ UISTATE_DISABLED;
m_sImageModify.Empty();
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), m_rcButton2.left - m_rcItem.left, \
m_rcButton2.top - m_rcItem.top, m_rcButton2.right - m_rcItem.left, m_rcButton2.bottom - m_rcItem.top);
if( (m_uButton2State & UISTATE_DISABLED) != 0 ) {
if( !m_sButton2DisabledImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton2DisabledImage, (LPCTSTR)m_sImageModify) ) m_sButton2DisabledImage.Empty();
else return;
}
}
else if( (m_uButton2State & UISTATE_PUSHED) != 0 ) {
if( !m_sButton2PushedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton2PushedImage, (LPCTSTR)m_sImageModify) ) m_sButton2PushedImage.Empty();
else return;
}
}
else if( (m_uButton2State & UISTATE_HOT) != 0 ) {
if( !m_sButton2HotImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton2HotImage, (LPCTSTR)m_sImageModify) ) m_sButton2HotImage.Empty();
else return;
}
}
if( !m_sButton2NormalImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sButton2NormalImage, (LPCTSTR)m_sImageModify) ) m_sButton2NormalImage.Empty();
else return;
}
DWORD dwBorderColor = 0xFF85E4FF;
int nBorderSize = 2;
CRenderEngine::DrawRect(hDC, m_rcButton2, nBorderSize, dwBorderColor);
}
void CScrollBarUI::PaintThumb(HDC hDC)
{
if( m_rcThumb.left == 0 && m_rcThumb.top == 0 && m_rcThumb.right == 0 && m_rcThumb.bottom == 0 ) return;
if( !IsEnabled() ) m_uThumbState |= UISTATE_DISABLED;
else m_uThumbState &= ~ UISTATE_DISABLED;
m_sImageModify.Empty();
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), m_rcThumb.left - m_rcItem.left, \
m_rcThumb.top - m_rcItem.top, m_rcThumb.right - m_rcItem.left, m_rcThumb.bottom - m_rcItem.top);
if( (m_uThumbState & UISTATE_DISABLED) != 0 ) {
if( !m_sThumbDisabledImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sThumbDisabledImage, (LPCTSTR)m_sImageModify) ) m_sThumbDisabledImage.Empty();
else return;
}
}
else if( (m_uThumbState & UISTATE_PUSHED) != 0 ) {
if( !m_sThumbPushedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sThumbPushedImage, (LPCTSTR)m_sImageModify) ) m_sThumbPushedImage.Empty();
else return;
}
}
else if( (m_uThumbState & UISTATE_HOT) != 0 ) {
if( !m_sThumbHotImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sThumbHotImage, (LPCTSTR)m_sImageModify) ) m_sThumbHotImage.Empty();
else return;
}
}
if( !m_sThumbNormalImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sThumbNormalImage, (LPCTSTR)m_sImageModify) ) m_sThumbNormalImage.Empty();
else return;
}
DWORD dwBorderColor = 0xFF85E4FF;
int nBorderSize = 2;
CRenderEngine::DrawRect(hDC, m_rcThumb, nBorderSize, dwBorderColor);
}
void CScrollBarUI::PaintRail(HDC hDC)
{
if( m_rcThumb.left == 0 && m_rcThumb.top == 0 && m_rcThumb.right == 0 && m_rcThumb.bottom == 0 ) return;
if( !IsEnabled() ) m_uThumbState |= UISTATE_DISABLED;
else m_uThumbState &= ~ UISTATE_DISABLED;
m_sImageModify.Empty();
if( !m_bHorizontal ) {
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), m_rcThumb.left - m_rcItem.left, \
(m_rcThumb.top + m_rcThumb.bottom) / 2 - m_rcItem.top - m_cxyFixed.cx / 2, \
m_rcThumb.right - m_rcItem.left, \
(m_rcThumb.top + m_rcThumb.bottom) / 2 - m_rcItem.top + m_cxyFixed.cx - m_cxyFixed.cx / 2);
}
else {
m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), \
(m_rcThumb.left + m_rcThumb.right) / 2 - m_rcItem.left - m_cxyFixed.cy / 2, \
m_rcThumb.top - m_rcItem.top, \
(m_rcThumb.left + m_rcThumb.right) / 2 - m_rcItem.left + m_cxyFixed.cy - m_cxyFixed.cy / 2, \
m_rcThumb.bottom - m_rcItem.top);
}
if( (m_uThumbState & UISTATE_DISABLED) != 0 ) {
if( !m_sRailDisabledImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sRailDisabledImage, (LPCTSTR)m_sImageModify) ) m_sRailDisabledImage.Empty();
else return;
}
}
else if( (m_uThumbState & UISTATE_PUSHED) != 0 ) {
if( !m_sRailPushedImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sRailPushedImage, (LPCTSTR)m_sImageModify) ) m_sRailPushedImage.Empty();
else return;
}
}
else if( (m_uThumbState & UISTATE_HOT) != 0 ) {
if( !m_sRailHotImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sRailHotImage, (LPCTSTR)m_sImageModify) ) m_sRailHotImage.Empty();
else return;
}
}
if( !m_sRailNormalImage.IsEmpty() ) {
if( !DrawImage(hDC, (LPCTSTR)m_sRailNormalImage, (LPCTSTR)m_sImageModify) ) m_sRailNormalImage.Empty();
else return;
}
}
//////////////////////////////////////////////////////////////////////////
//
LPCTSTR CCheckBoxUI::GetClass() const
{
return _T("CheckBoxUI");
}
void CCheckBoxUI::SetCheck(bool bCheck)
{
Selected(bCheck);
}
bool CCheckBoxUI::GetCheck() const
{
return IsSelected();
}
//////////////////////////////////////////////////////////////////////////
//
CComboBoxUI::CComboBoxUI()
{
m_nArrowWidth = 0;
}
LPCTSTR CComboBoxUI::GetClass() const
{
return _T("ComboBoxUI");
}
void CComboBoxUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
{
if (_tcscmp(pstrName, _T("arrowimage")) == 0)
m_sArrowImage = pstrValue;
else
CComboUI::SetAttribute(pstrName, pstrValue);
}
void CComboBoxUI::PaintStatusImage(HDC hDC)
{
if (m_sArrowImage.IsEmpty())
CComboUI::PaintStatusImage(hDC);
else
{
// get index
if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
else m_uButtonState &= ~ UISTATE_FOCUSED;
if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
else m_uButtonState &= ~ UISTATE_DISABLED;
int nIndex = 0;
if ((m_uButtonState & UISTATE_DISABLED) != 0)
nIndex = 4;
else if ((m_uButtonState & UISTATE_PUSHED) != 0)
nIndex = 2;
else if ((m_uButtonState & UISTATE_HOT) != 0)
nIndex = 1;
else if ((m_uButtonState & UISTATE_FOCUSED) != 0)
nIndex = 3;
// make modify string
CStdString sModify = m_sArrowImage;
int nPos1 = sModify.Find(_T("source"));
int nPos2 = sModify.Find(_T("'"), nPos1 + 7);
if (nPos2 == -1) return; //first
int nPos3 = sModify.Find(_T("'"), nPos2 + 1);
if (nPos3 == -1) return; //second
CRect rcBmpPart;
LPTSTR lpszValue = NULL;
rcBmpPart.left = _tcstol(sModify.GetData() + nPos2 + 1, &lpszValue, 10); ASSERT(lpszValue);
rcBmpPart.top = _tcstol(lpszValue + 1, &lpszValue, 10); ASSERT(lpszValue);
rcBmpPart.right = _tcstol(lpszValue + 1, &lpszValue, 10); ASSERT(lpszValue);
rcBmpPart.bottom = _tcstol(lpszValue + 1, &lpszValue, 10); ASSERT(lpszValue);
m_nArrowWidth = rcBmpPart.GetWidth() / 5;
rcBmpPart.left += nIndex * m_nArrowWidth;
rcBmpPart.right = rcBmpPart.left + m_nArrowWidth;
CRect rcDest(0, 0, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top);
rcDest.Deflate(GetBorderSize(), GetBorderSize());
rcDest.left = rcDest.right - m_nArrowWidth;
CStdString sSource = sModify.Mid(nPos1, nPos3 + 1 - nPos1);
CStdString sReplace;
sReplace.SmallFormat(_T("source='%d,%d,%d,%d' dest='%d,%d,%d,%d'"),
rcBmpPart.left, rcBmpPart.top, rcBmpPart.right, rcBmpPart.bottom,
rcDest.left, rcDest.top, rcDest.right, rcDest.bottom);
sModify.Replace(sSource, sReplace);
// draw image
if (!DrawImage(hDC, m_sArrowImage, sModify))
m_sNormalImage.Empty();
}
}
void CComboBoxUI::PaintText(HDC hDC)
{
RECT rcText = m_rcItem;
rcText.left += m_rcTextPadding.left;
rcText.right -= m_rcTextPadding.right;
rcText.top += m_rcTextPadding.top;
rcText.bottom -= m_rcTextPadding.bottom;
rcText.right -= m_nArrowWidth; // add this line than CComboUI::PaintText(HDC hDC)
if( m_iCurSel >= 0 ) {
CControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]);
IListItemUI* pElement = static_cast<IListItemUI*>(pControl->GetInterface(_T("ListItem")));
if( pElement != NULL ) {
pElement->DrawItemText(hDC, rcText);
}
else {
RECT rcOldPos = pControl->GetPos();
pControl->SetPos(rcText);
pControl->DoPaint(hDC, rcText);
pControl->SetPos(rcOldPos);
}
}
}
//////////////////////////////////////////////////////////////////////////
//
//CDateTimeUI::m_nDTUpdateFlag
#define DT_NONE 0
#define DT_UPDATE 1
#define DT_DELETE 2
#define DT_KEEP 3
class CDateTimeWnd : public CWindowWnd
{
public:
CDateTimeWnd();
void Init(CDateTimeUI* pOwner);
RECT CalPos();
LPCTSTR GetWindowClassName() const;
LPCTSTR GetSuperClassName() const;
void OnFinalMessage(HWND hWnd);
LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
//LRESULT OnEditChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
protected:
CDateTimeUI* m_pOwner;
HBRUSH m_hBkBrush;
bool m_bInit;
};
CDateTimeWnd::CDateTimeWnd() : m_pOwner(NULL), m_hBkBrush(NULL), m_bInit(false)
{
}
void CDateTimeWnd::Init(CDateTimeUI* pOwner)
{
m_pOwner = pOwner;
m_pOwner->m_nDTUpdateFlag = DT_NONE;
if (m_hWnd == NULL)
{
RECT rcPos = CalPos();
UINT uStyle = WS_CHILD;
Create(m_pOwner->GetManager()->GetPaintWindow(), NULL, uStyle, 0, rcPos);
SetWindowFont(m_hWnd, m_pOwner->GetManager()->GetFontInfo(m_pOwner->GetFont())->hFont, TRUE);
}
if (m_pOwner->GetText().IsEmpty())
::GetLocalTime(&m_pOwner->m_sysTime);
::SendMessage(m_hWnd, DTM_SETSYSTEMTIME, 0, (LPARAM)&m_pOwner->m_sysTime);
::ShowWindow(m_hWnd, SW_SHOWNOACTIVATE);
::SetFocus(m_hWnd);
m_bInit = true;
}
RECT CDateTimeWnd::CalPos()
{
CRect rcPos = m_pOwner->GetPos();
return rcPos;
}
LPCTSTR CDateTimeWnd::GetWindowClassName() const
{
return _T("DateTimeWnd");
}
LPCTSTR CDateTimeWnd::GetSuperClassName() const
{
return DATETIMEPICK_CLASS;
}
void CDateTimeWnd::OnFinalMessage(HWND /*hWnd*/)
{
// Clear reference and die
if( m_hBkBrush != NULL ) ::DeleteObject(m_hBkBrush);
m_pOwner->m_pWindow = NULL;
delete this;
}
LRESULT CDateTimeWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
LRESULT lRes = 0;
BOOL bHandled = TRUE;
if( uMsg == WM_KILLFOCUS )
{
lRes = OnKillFocus(uMsg, wParam, lParam, bHandled);
}
else if (uMsg == WM_KEYUP && (wParam == VK_DELETE || wParam == VK_BACK))
{
LRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);
m_pOwner->m_nDTUpdateFlag = DT_DELETE;
m_pOwner->UpdateText();
PostMessage(WM_CLOSE);
return lRes;
}
else if (uMsg == WM_KEYUP && wParam == VK_ESCAPE)
{
LRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);
m_pOwner->m_nDTUpdateFlag = DT_KEEP;
PostMessage(WM_CLOSE);
return lRes;
}
// else if( uMsg == OCM_COMMAND ) {
// if( GET_WM_COMMAND_CMD(wParam, lParam) == EN_CHANGE ) lRes = OnEditChanged(uMsg, wParam, lParam, bHandled);
// else if( GET_WM_COMMAND_CMD(wParam, lParam) == EN_UPDATE ) {
// RECT rcClient;
// ::GetClientRect(m_hWnd, &rcClient);
// ::InvalidateRect(m_hWnd, &rcClient, FALSE);
// }
// }
// else if( uMsg == WM_KEYDOWN && TCHAR(wParam) == VK_RETURN ) {
// m_pOwner->GetManager()->SendNotify(m_pOwner, _T("return"));
// }
// else if( uMsg == OCM__BASE + WM_CTLCOLOREDIT || uMsg == OCM__BASE + WM_CTLCOLORSTATIC ) {
// if( m_pOwner->GetNativeEditBkColor() == 0xFFFFFFFF ) return NULL;
// ::SetBkMode((HDC)wParam, TRANSPARENT);
// DWORD dwTextColor = m_pOwner->GetTextColor();
// ::SetTextColor((HDC)wParam, RGB(GetBValue(dwTextColor),GetGValue(dwTextColor),GetRValue(dwTextColor)));
// if( m_hBkBrush == NULL ) {
// DWORD clrColor = m_pOwner->GetNativeEditBkColor();
// m_hBkBrush = ::CreateSolidBrush(RGB(GetBValue(clrColor), GetGValue(clrColor), GetRValue(clrColor)));
// }
// return (LRESULT)m_hBkBrush;
// }
else bHandled = FALSE;
if( !bHandled ) return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
return lRes;
}
LRESULT CDateTimeWnd::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
LRESULT lRes = ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);
if (m_pOwner->m_nDTUpdateFlag == DT_NONE)
{
::SendMessage(m_hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&m_pOwner->m_sysTime);
m_pOwner->m_nDTUpdateFlag = DT_UPDATE;
m_pOwner->UpdateText();
}
PostMessage(WM_CLOSE);
return lRes;
}
// LRESULT CDateTimeWnd::OnEditChanged(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
// {
// if( !m_bInit ) return 0;
// if( m_pOwner == NULL ) return 0;
// // Copy text back
// int cchLen = ::GetWindowTextLength(m_hWnd) + 1;
// LPTSTR pstr = static_cast<LPTSTR>(_alloca(cchLen * sizeof(TCHAR)));
// ASSERT(pstr);
// if( pstr == NULL ) return 0;
// ::GetWindowText(m_hWnd, pstr, cchLen);
// m_pOwner->m_sText = pstr;
// m_pOwner->GetManager()->SendNotify(m_pOwner, _T("textchanged"));
// return 0;
// }
//////////////////////////////////////////////////////////////////////////
//
CDateTimeUI::CDateTimeUI()
{
::GetLocalTime(&m_sysTime);
m_bReadOnly = false;
m_pWindow = NULL;
m_nDTUpdateFlag=DT_UPDATE;
UpdateText(); // add by:daviyang35 初始化界面时显示时间
m_nDTUpdateFlag = DT_NONE;
}
LPCTSTR CDateTimeUI::GetClass() const
{
return _T("DateTimeUI");
}
LPVOID CDateTimeUI::GetInterface(LPCTSTR pstrName)
{
if( _tcscmp(pstrName, _T("DateTime")) == 0 ) return static_cast<CDateTimeUI*>(this);
return CLabelUI::GetInterface(pstrName);
}
SYSTEMTIME& CDateTimeUI::GetTime()
{
return m_sysTime;
}
void CDateTimeUI::SetTime(SYSTEMTIME* pst)
{
m_sysTime = *pst;
Invalidate();
}
void CDateTimeUI::SetReadOnly(bool bReadOnly)
{
m_bReadOnly = bReadOnly;
Invalidate();
}
bool CDateTimeUI::IsReadOnly() const
{
return m_bReadOnly;
}
void CDateTimeUI::UpdateText()
{
if (m_nDTUpdateFlag == DT_DELETE)
SetText(_T(""));
else if (m_nDTUpdateFlag == DT_UPDATE)
{
CStdString sText;
sText.SmallFormat(_T("%4d-%02d-%02d"),
m_sysTime.wYear, m_sysTime.wMonth, m_sysTime.wDay, m_sysTime.wHour, m_sysTime.wMinute);
SetText(sText);
}
}
void CDateTimeUI::DoEvent(TEventUI& event)
{
if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
if( m_pParent != NULL ) m_pParent->DoEvent(event);
else CLabelUI::DoEvent(event);
return;
}
if( event.Type == UIEVENT_SETCURSOR && IsEnabled() )
{
::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM)));
return;
}
if( event.Type == UIEVENT_WINDOWSIZE )
{
if( m_pWindow != NULL ) m_pManager->SetFocusNeeded(this);
}
if( event.Type == UIEVENT_SCROLLWHEEL )
{
if( m_pWindow != NULL ) return;
}
if( event.Type == UIEVENT_SETFOCUS && IsEnabled() )
{
if( m_pWindow ) return;
m_pWindow = new CDateTimeWnd();
ASSERT(m_pWindow);
m_pWindow->Init(this);
m_pWindow->ShowWindow();
}
if( event.Type == UIEVENT_KILLFOCUS && IsEnabled() )
{
Invalidate();
}
if( event.Type == UIEVENT_BUTTONDOWN || event.Type == UIEVENT_DBLCLICK || event.Type == UIEVENT_RBUTTONDOWN)
{
if( IsEnabled() ) {
GetManager()->ReleaseCapture();
if( IsFocused() && m_pWindow == NULL )
{
m_pWindow = new CDateTimeWnd();
ASSERT(m_pWindow);
}
if( m_pWindow != NULL )
{
m_pWindow->Init(this);
m_pWindow->ShowWindow();
}
}
return;
}
if( event.Type == UIEVENT_MOUSEMOVE )
{
return;
}
if( event.Type == UIEVENT_BUTTONUP )
{
return;
}
if( event.Type == UIEVENT_CONTEXTMENU )
{
return;
}
if( event.Type == UIEVENT_MOUSEENTER )
{
return;
}
if( event.Type == UIEVENT_MOUSELEAVE )
{
return;
}
CLabelUI::DoEvent(event);
}
} // namespace DuiLib
| [
"8304432@qq.com"
] | 8304432@qq.com |
401816c69fa4e8e54f57edf94f338e8580f522a3 | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/CMake/CMake-gumtree/Kitware_CMake_repos_basic_block_block_21404.cpp | 5ccfe9cfcb3bace430e813a23455b8ea60ffc8c2 | [] | no_license | niuxu18/logTracker-old | 97543445ea7e414ed40bdc681239365d33418975 | f2b060f13a0295387fe02187543db124916eb446 | refs/heads/master | 2021-09-13T21:39:37.686481 | 2017-12-11T03:36:34 | 2017-12-11T03:36:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,551 | cpp | {
struct sockaddr* sa;
ULONG prefix_len;
sa = unicast_address->Address.lpSockaddr;
/* XP has no OnLinkPrefixLength field. */
if (is_vista_or_greater) {
prefix_len =
((IP_ADAPTER_UNICAST_ADDRESS_LH*) unicast_address)->OnLinkPrefixLength;
} else {
/* Prior to Windows Vista the FirstPrefix pointed to the list with
* single prefix for each IP address assigned to the adapter.
* Order of FirstPrefix does not match order of FirstUnicastAddress,
* so we need to find corresponding prefix.
*/
IP_ADAPTER_PREFIX* prefix;
prefix_len = 0;
for (prefix = adapter->FirstPrefix; prefix; prefix = prefix->Next) {
/* We want the longest matching prefix. */
if (prefix->Address.lpSockaddr->sa_family != sa->sa_family ||
prefix->PrefixLength <= prefix_len)
continue;
if (address_prefix_match(sa->sa_family, sa,
prefix->Address.lpSockaddr, prefix->PrefixLength)) {
prefix_len = prefix->PrefixLength;
}
}
/* If there is no matching prefix information, return a single-host
* subnet mask (e.g. 255.255.255.255 for IPv4).
*/
if (!prefix_len)
prefix_len = (sa->sa_family == AF_INET6) ? 128 : 32;
}
memset(uv_address, 0, sizeof *uv_address);
uv_address->name = name_buf;
if (adapter->PhysicalAddressLength == sizeof(uv_address->phys_addr)) {
memcpy(uv_address->phys_addr,
adapter->PhysicalAddress,
sizeof(uv_address->phys_addr));
}
uv_address->is_internal =
(adapter->IfType == IF_TYPE_SOFTWARE_LOOPBACK);
if (sa->sa_family == AF_INET6) {
uv_address->address.address6 = *((struct sockaddr_in6 *) sa);
uv_address->netmask.netmask6.sin6_family = AF_INET6;
memset(uv_address->netmask.netmask6.sin6_addr.s6_addr, 0xff, prefix_len >> 3);
/* This check ensures that we don't write past the size of the data. */
if (prefix_len % 8) {
uv_address->netmask.netmask6.sin6_addr.s6_addr[prefix_len >> 3] =
0xff << (8 - prefix_len % 8);
}
} else {
uv_address->address.address4 = *((struct sockaddr_in *) sa);
uv_address->netmask.netmask4.sin_family = AF_INET;
uv_address->netmask.netmask4.sin_addr.s_addr = (prefix_len > 0) ?
htonl(0xffffffff << (32 - prefix_len)) : 0;
}
uv_address++;
} | [
"993273596@qq.com"
] | 993273596@qq.com |
aeb49ac3fee6b6c4d8da6f47c77a9bdddc0d236c | e6d4a87dcf98e93bab92faa03f1b16253b728ac9 | /algorithms/cpp/replaceAllDigitswithCharacters/replaceAllDigitswithCharacters.cpp | 5a99275dbded2be1b049fd96fa53cf853eb3c7fb | [] | no_license | MichelleZ/leetcode | b5a58e1822e3f6ef8021b29d9bc9aca3fd3d416f | a390adeeb71e997b3c1a56c479825d4adda07ef9 | refs/heads/main | 2023-03-06T08:16:54.891699 | 2023-02-26T07:17:47 | 2023-02-26T07:17:47 | 326,904,500 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 313 | cpp | // Source: https://leetcode.com/problems/replace-all-digits-with-characters/
// Author: Miao Zhang
// Date: 2021-06-11
class Solution {
public:
string replaceDigits(string s) {
for (int i = 1; i < s.length(); i += 2) {
s[i] = s[i - 1] + s[i] - '0';
}
return s;
}
};
| [
"zhangdaxiaomiao@163.com"
] | zhangdaxiaomiao@163.com |
4637844147a133dd437e352bd07a8c5a4d094edd | fa163d6c7d04c9d5558ad082465e3642b48a0064 | /Monopoly/building.cc | 65713d25df7801a1c7385a19aaf45f0036e38aa9 | [] | no_license | kajan-v/Monopoly-Clone | f3fb3f872b11b0e6d9d73f120a37d3a2bee8095c | ecdb47126b21038fe16c394018565ff7954fe9dd | refs/heads/master | 2021-06-03T18:06:51.531877 | 2016-06-04T04:30:55 | 2016-06-04T04:30:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,105 | cc | #include "building.h"
#include "ownable.h"
using namespace std;
Building::Building(int purchCost, int improveCost, int t[], string monopolyBlock, string name){
this->purchCost = purchCost;
this->improveCost = improveCost;
for (int i = 0; i < 6; i++){
this->tuition[i] = t[i];
}
this->monopolyBlock = monopolyBlock;
this->buildingSize = 0;
this->name = name;
this->isOwnable = true;
this->owner = -1;
}
void Building::improve(Player *p){
if(!this->mortgaged && this->buildingSize < 5 && p->money >= this->improveCost){
p->money -= this->improveCost;
this->buildingSize++;
cout << "improve to size: " << this->buildingSize << endl;
}
else if(p->money < this->improveCost){
cout << "Not enough moeny to improve, cost: " << this->improveCost << " current balance " << p->money << endl;
}
}
void Building::unimprove(Player *p){
if(this->buildingSize > 0 && p->id == this->owner){
this->buildingSize--;
p->money += this->improveCost/2;
cout << "unimprove to size: " << this->buildingSize << endl;
}
}
int Building::rent(){
return this->tuition[this->buildingSize];
}
| [
"kajan_v_24@hotmail.com"
] | kajan_v_24@hotmail.com |
b87bae8f4e6b9e66226b18a30791f763ad0c1f7a | 772d932a0e5f6849227a38cf4b154fdc21741c6b | /CPP_Joc_Windows_Android/SH_Client_Win_Cpp_Cmake/App/src/sh/scenarios/randDungeons_a_v1/gw/zoneCommon/gw/view/mainui/IMainInGameUIView.cpp | 1fc8994d3069d2b841b7f7791dbf504f0baeb8bf | [] | no_license | AdrianNostromo/CodeSamples | 1a7b30fb6874f2059b7d03951dfe529f2464a3c0 | a0307a4b896ba722dd520f49d74c0f08c0e0042c | refs/heads/main | 2023-02-16T04:18:32.176006 | 2021-01-11T17:47:45 | 2021-01-11T17:47:45 | 328,739,437 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 108 | cpp | #include "IMainInGameUIView.h"
using namespace randDungeons_a_v1;
int IMainInGameUIView::ID = GetNewID();
| [
"adriannostromo@gmail.com"
] | adriannostromo@gmail.com |
9dafe06089f1d6ddad88a1ca518d8b005c6f0db5 | acb594d6abc0cf81b3d82c8210a76bc1825ca475 | /sources/cs/gtl/intrusive_default_functionality.h | 0e0bdede49dedb41af4aa2172e8b88511f2a845e | [] | no_license | cyberjois/xray-2-2011 | 0917503e4a3189838a422a7f14eceeb704445b7f | 1795aa33a51fdde2ff5ea10627fc6d0b2b755c56 | refs/heads/main | 2023-05-27T19:36:05.573135 | 2021-06-02T18:07:53 | 2021-06-02T18:07:53 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 793 | h | ////////////////////////////////////////////////////////////////////////////
// Module : intrusive_default_functionality.h
// Created : 30.06.2005
// Modified : 28.05.2007
// Author : Dmitriy Iassenev
// Description : intrusive pointer default functionality template class
////////////////////////////////////////////////////////////////////////////
#ifndef CS_GTL_INTRUSIVE_DEFAULT_FUNCTIONALITY_H_INCLUDED
#define CS_GTL_INTRUSIVE_DEFAULT_FUNCTIONALITY_H_INCLUDED
namespace gtl {
template <typename ChildType>
class intrusive_default_functionality {
protected:
inline ChildType& self ();
inline ChildType const& self () const;
};
} // namespace gtl
#include <cs/gtl/intrusive_default_functionality_inline.h>
#endif // #ifndef CS_GTL_INTRUSIVE_DEFAULT_FUNCTIONALITY_H_INCLUDED | [
"TheStalkerNest@gmail.com"
] | TheStalkerNest@gmail.com |
4e8628b4edb98424681ce01255f1569f05db4712 | fc70282a7bd0251e0db16afba771b565115a1774 | /beginner/basic2.cpp | ee5b66930d6e96002275a64c251b57a3b858d971 | [] | no_license | brunoricardojava/Maratona | 64dc8ab39074d81fa8d85ebcece113b5d93f1ecd | 8aa538155e7f66e939cda8cce49a0113cf9045db | refs/heads/master | 2020-12-25T06:12:59.609975 | 2016-07-07T19:09:45 | 2016-07-07T19:09:45 | 62,831,668 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 331 | cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
/**
* Escreva a sua solução aqui
* Code your solution here
* Escriba su solución aquí
*/
double R;
cin >> R;
cout << fixed;
cout << "A=" << setprecision(4) << (3.14159*R*R) << '\n';
return 0;
}
| [
"brunoricardojava@gmail.com"
] | brunoricardojava@gmail.com |
2842212c6c5089ad743ce841534bfeaff4275b3c | 6753dba9d4b225770f5e641cf38c2998f19d2f73 | /Source1/Utility/Serialization/LSMemorySerializer.h | b516743c0307243ce9ffb3bfb6c4657807320da6 | [] | no_license | iTShun/Vision | b9ea51033a97518b5befd4b98f1f3d376a55d10c | 2ed766060c52736e9386ff249f3a18c0b698d81a | refs/heads/master | 2020-03-24T06:22:06.426801 | 2019-01-18T13:30:39 | 2019-01-18T13:30:39 | 142,525,122 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,842 | h | #pragma once
#include "Prerequisites/LSPrerequisitesUtil.h"
namespace ls
{
struct SerializationContext;
/** @addtogroup Serialization
* @{
*/
/** Encodes/decodes an IReflectable object from/to memory. */
class LS_UTILITY_EXPORT MemorySerializer
{
struct BufferPiece
{
UINT8* buffer;
UINT32 size;
};
public:
MemorySerializer() = default;
~MemorySerializer() = default;
/**
* Parses the provided object, serializes all of its data as specified by its RTTIType and returns the data in the
* form of raw memory.
*
* @param[in] object Object to encode.
* @param[in] bytesWritten Output value containing the total number of bytes it took to encode the object.
* @param[in] allocator Determines how is memory allocated. If not specified the default allocator is used.
* @param[in] shallow Determines how to handle referenced objects. If true then references will not be
* encoded and will be set to null. If false then references will be encoded as well
* and restored upon decoding.
* @param[in] context Optional object that will be passed along to all serialized objects through
* their serialization callbacks. Can be used for controlling serialization,
* maintaining state or sharing information between objects during
* serialization.
*
* @return A buffer containing the encoded object. It is up to the user to release the buffer
* memory when no longer needed.
*/
UINT8* encode(IReflectable* object, UINT32& bytesWritten, std::function<void*(UINT32)> allocator = nullptr,
bool shallow = false, SerializationContext* context = nullptr);
/**
* Deserializes an IReflectable object by reading the binary data from the provided memory location.
*
* @param[in] buffer Previously allocated buffer to store the data in.
* @param[in] bufferSize Size of the @p buffer in bytes.
* @param[in] context Optional object that will be passed along to all deserialized objects through
* their deserialization callbacks. Can be used for controlling deserialization,
* maintaining state or sharing information between objects during
* deserialization.
*/
SPtr<IReflectable> decode(UINT8* buffer, UINT32 bufferSize, SerializationContext* context = nullptr);
private:
Vector<BufferPiece> mBufferPieces;
/** Called by the binary serializer whenever the buffer gets full. */
UINT8* flushBuffer(UINT8* bufferStart, UINT32 bytesWritten, UINT32& newBufferSize);
/************************************************************************/
/* CONSTANTS */
/************************************************************************/
private:
static constexpr const UINT32 WRITE_BUFFER_SIZE = 16384;
};
/** @} */
}
| [
"289588408@qq.com"
] | 289588408@qq.com |
66ec4589074fa480315a01ec8f11beed87e2ad28 | ba340e016af7a03c403c82d543408d6ca2493795 | /AergiaX/src/graphics/rendering/Shader.cpp | e47b006eeb6c7a3c1174e1afcc9a9d53aac05324 | [] | no_license | filipecn/Direct3D | 3c3a1dc34381d07a8fb31cb1900fd4177c89de39 | 15b5e2fd5f43dd74739a3b80faae1266195da25e | refs/heads/master | 2021-01-16T18:29:17.791159 | 2015-10-03T05:06:12 | 2015-10-03T05:06:12 | 42,746,039 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 913 | cpp | #include "Shader.h"
#include "utils/DebugMessage.hpp"
#include "utils/CheckDxError.hpp"
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
#pragma warning(disable:4996)
#include "utils\debug\Console.h"
#include <d3dcompiler.h>
#include <cstdio>
namespace aergiaX {
Shader::Shader() {}
Shader::~Shader() {}
void Shader::init(Microsoft::WRL::ComPtr<ID3D11Device> d3dDevice) {
// init vertex shader
CHECK_DX_ERROR(
D3DReadFileToBlob(L"Build/Debug/VertexShader.cso", &vsBlob);
)
CHECK_DX_ERROR(
d3dDevice->CreateVertexShader(vsBlob->GetBufferPointer(),
vsBlob->GetBufferSize(), nullptr, vertexShader.GetAddressOf());
)
// init pixel shader
CHECK_DX_ERROR(
D3DReadFileToBlob(L"Build/Debug/PixelShader.cso", &psBlob);
)
CHECK_DX_ERROR(
d3dDevice->CreatePixelShader(psBlob->GetBufferPointer(),
psBlob->GetBufferSize(), nullptr, pixelShader.GetAddressOf());
)
}
} | [
"fuiripecn@gmail.com"
] | fuiripecn@gmail.com |
bc97c33de9dbd6293e68568421f85646053efd25 | 965e051ceb8edb6011ef65fba84f6a6c878991f3 | /V8SVGPathSegList.h | a101c906fff848d49869bfbea003033c5dce5ef3 | [] | no_license | Treeeater/chromium_webkit_bindings | adee51482f143328a7410e8bb5ea29323f4eb8f1 | aedbff3ba8aa839b4884929fdde38ef9d5dd02fa | refs/heads/master | 2016-09-05T16:49:28.487428 | 2010-10-14T01:51:28 | 2010-10-14T01:51:28 | 985,747 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,790 | h | /*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#if ENABLE(SVG)
#ifndef V8SVGPathSegList_h
#define V8SVGPathSegList_h
#include "SVGPathSegList.h"
#include "WrapperTypeInfo.h"
#include "wtf/text/StringHash.h"
#include <v8.h>
#include <wtf/HashMap.h>
namespace WebCore {
class V8SVGPathSegList {
public:
static bool HasInstance(v8::Handle<v8::Value> value);
static v8::Persistent<v8::FunctionTemplate> GetRawTemplate();
static v8::Persistent<v8::FunctionTemplate> GetTemplate();
static SVGPathSegList* toNative(v8::Handle<v8::Object>);
static v8::Handle<v8::Object> wrap(SVGPathSegList*);
static void derefObject(void*);
static WrapperTypeInfo info;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
};
v8::Handle<v8::Value> toV8(SVGPathSegList*);
v8::Handle<v8::Value> toV8(PassRefPtr<SVGPathSegList >);
}
#endif // V8SVGPathSegList_h
#endif // ENABLE(SVG)
| [
"pinkforpeace@.(none)"
] | pinkforpeace@.(none) |
a03302f51b479492cbe67be2e3a11f145ae518dd | f8ff09623e40660a91bebec6bb45f29bf464dd9a | /Assembly.cc | 34ede7e72fd6a58a546e29f08be7df12e7b8b4ed | [] | no_license | slmtpz/Basic-compiler | f15c4d7197ba598eda7af55cbd894e5b4460f356 | 849c16c62a33b350f98351539111a92db8b96d56 | refs/heads/master | 2021-01-09T06:28:08.788434 | 2017-02-05T12:24:35 | 2017-02-05T12:24:35 | 80,990,988 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,740 | cc | #include "Assembly.h"
//Constructs Assembly object.
Assembly::Assembly(){
write = "";
is_printed = 0;
is_read = 0;
}
//Returns the Assembly code.
string Assembly::getCode(){
return write;
}
/********************CODE GENERATING*********************/
//Starts to write the code with segment opening "code segment".
void Assembly::begin(){
write.append("code segment\n");
}
//Ends to write the code with segment closeing "code ends".
//Also, adds read or print functions to the Assembly code if used.
void Assembly::end(){
write.append(" int 20h\n");
if(is_read)
call_myread();
if(is_printed)
call_myprint();
add_variables();
write.append("code ends");
}
void Assembly::push_add_var(string var){
variables.insert("v"+var);
write.append(" push offset v"+var+"\n");
}
void Assembly::push_num(string num){
write.append(" push "+num+"\n");
}
void Assembly::push_val_var(string var){
variables.insert("v"+var);
write.append(" push v"+var+" w\n");
}
void Assembly::mul(){
write.append(" pop cx\n"
" pop ax\n"
" mul cx\n"
" push ax\n");
}
void Assembly::div(){
write.append(" mov dx,0\n"
" pop cx\n"
" pop ax\n"
" div cx\n"
" push ax\n");
}
void Assembly::add(){
write.append(" pop cx\n"
" pop ax\n"
" add ax,cx\n"
" push ax\n");
}
void Assembly::sub(){
write.append(" pop cx\n"
" pop ax\n"
" sub ax,cx\n"
" push ax\n");
}
void Assembly::mod(){
write.append(" mov dx,0\n"
" pop cx\n"
" pop ax\n"
" div cx\n"
" push dx\n");
}
void Assembly::assign(){
write.append(" pop ax\n"
" pop bx\n"
" mov [bx],ax\n");
}
void Assembly::print(){
is_printed = 1;
write.append(" pop ax\n"
" call myprint\n");
}
void Assembly::call_myprint(){
write.append("myprint:\n"
" mov si,10d\n"
" xor dx,dx\n"
" push 0Ah\n"
" mov cx,1d\n"
"nonzero:\n"
" div si\n"
" add dx,48d\n"
" push dx\n"
" inc cx\n"
" xor dx,dx\n"
" cmp ax,0h\n"
" jne nonzero\n"
"writeloop:\n"
" pop dx\n"
" mov ah,02h\n"
" int 21h\n"
" dec cx\n"
" jnz writeloop\n"
" ret\n");
}
void Assembly::read(string id){
variables.insert("v"+id);
is_read = 1;
write.append("call myread\n"
" mov v"+id+",cx\n");
}
void Assembly::call_myread(){
write.append("myread:\n"
" mov cx,0\n"
"morechar:\n"
" mov ah,01h\n"
" int 21h\n"
" mov dx,0\n"
" mov dl,al\n"
" mov ax,cx\n"
" cmp dl,0d\n"
" je myret\n"
" sub dx,48d\n"
" mov bp,dx\n"
" mov ax,cx\n"
" mov cx,10d\n"
" mul cx\n"
" add ax,bp\n"
" mov cx,ax\n"
" jmp morechar\n"
"myret:\n"
" ret\n");
}
void Assembly::add_variables(){
for(set<string>::iterator it=variables.begin(); it!=variables.end(); ++it){
write.append(*it+" dw ?\n");
}
}
void Assembly::ifFirst(int i){
ss<<i;
write.append(" pop ax\n"
" if z jmp label"+ss.str()+"\n");
ss.str(string());
}
void Assembly::ifSecond(int i){
ss<<i;
write.append("label"+ss.str()+":\n");
ss.str(string());
}
void Assembly::whileFirst(int i){
ss<<i;
write.append("label"+ss.str()+":\n");
ss.str(string());
}
void Assembly::whileSecond(int i){
ss<<i;
write.append(" pop ax\n"
" cmp ax,0\n"
" if z jmp label"+ss.str()+"\n");
ss.str(string());
}
void Assembly::whileThird(int i){
ss<<(i);
write.append(" jmp label"+ss.str()+"\n");
ss.str(string());
ss<<(i+1);
write.append("label"+ss.str()+":\n");
ss.str(string());
}
| [
"seleme94@hotmail.com"
] | seleme94@hotmail.com |
9ff92a97abb3db888a48186eaedcb7f86f41b4e1 | 0463a132ec0dc22542785392976e6785181f38f9 | /src/ESP_Weather_OLED_main.cpp | 37faa34757db5ee519ab1b764cc035edaaa6d752 | [] | no_license | Abhi0803/ESP8266_OLED_Weather_API | 4f914c67c9ffc28fc0214bdac56e2a022bfa6911 | 3f51ac25d7129915def4685ddac42855afd96179 | refs/heads/master | 2022-12-28T08:26:25.802028 | 2020-10-16T05:17:03 | 2020-10-16T05:17:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,387 | cpp | /*
Libraries Required and Includes Used
*/
// I2C and SPI Libraries
#include <Wire.h>
#include <SPI.h>
// ESP8266 Related Libraries
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WebServer.h>
// JSON Parsing Library
#include <ArduinoJson.h>
// OLED Display Libraries
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
/*
Global Variables & Object Declarations and Defines for the Functions
*/
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
// Define these MACROS You want Data of
#define CITY "ENTER YOUR CITY HERE"
#define API_KEY "ENTER YOUR API KEY HERE + #" // (If the Does Not have the "#" int rnd add it)
#define SSID "ENTER YOUR SSID HERE"
#define PASS "ENTER YOUR PASSWORD HERE"
// Weather API Data Variables
float main_temp, humidity, pressure, wind_speed;
int main_pressure, main_humidity, visibility, timezone;
long dt, sys_sunrise, sys_sunset;
const char *City, *Description;
// Size of the Document Used for JSON Parsing(Can be found in the ArduinoJSOn website)
const size_t capacity = JSON_ARRAY_SIZE(1) + JSON_OBJECT_SIZE(1) + 2 * JSON_OBJECT_SIZE(2) + JSON_OBJECT_SIZE(3) + JSON_OBJECT_SIZE(4) + JSON_OBJECT_SIZE(8) + JSON_OBJECT_SIZE(13) + 280;
DynamicJsonDocument doc(capacity);
/*Put your SSID & Password*/
const char *ssid = "Enter SSID here"; // Enter SSID here
const char *password = "Enter Password here"; //Enter Password here
// Objects
ESP8266WebServer server(80); //Object of class ESP8266WebServer
HTTPClient http; //Object of class HTTPClient
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
/*
Declarations for the Functions Used
*/
void Wifi_Init(void);
void API_Init(void);
void Display_Init(void);
/*
Declarations for the Private Functions Used
*/
String SendHTML(float temperature, float humidity, float pressure, float visibility);
void handle_OnConnect(void);
void handle_NotFound(void);
void setup()
{
Serial.begin(9600);
delay(100);
Wifi_Init();
API_Init();
Display_Init();
}
void loop()
{
server.handleClient();
}
/*
Definitions for the Functions Used
*/
void Wifi_Init(void)
{
Serial.begin(9600);
delay(100);
Serial.println("Connecting to ");
Serial.println(ssid);
//connect to your local wi-fi network
WiFi.begin(ssid, password);
//check wi-fi is connected to wi-fi network
while (WiFi.status() != WL_CONNECTED)
{
delay(1000);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected..!");
Serial.print("Got IP: ");
Serial.println(WiFi.localIP());
}
void API_Init(void)
{
// API Link
String LinkInit = "http://api.openweathermap.org/data/2.5/weather?q=";
String CityName = CITY;
String EndLink = "&units=metric&appid=";
String API_Key = API_KEY;
String Link = LinkInit + CityName + EndLink + API_Key;
// Check WiFi Status
if (WiFi.status() == WL_CONNECTED)
{
HTTPClient http; //Object of class HTTPClient
http.begin(Link);
int httpCode = http.GET();
//Check the returning code
if (httpCode > 0)
{
String json = http.getString();
deserializeJson(doc, json);
JsonObject weather_0 = doc["weather"][0];
// @Abhi0803_DataStructure - Consider The Readme Document for Changes In this Part of Code
const char *weather_0_description = weather_0["description"]; // "clear sky"
Description = weather_0["description"];
JsonObject main = doc["main"];
main_temp = main["temp"]; // 301.03
main_pressure = main["pressure"]; // 1007
main_humidity = main["humidity"]; // 70
visibility = doc["visibility"]; // 10000
wind_speed = doc["wind"]["speed"]; // 3.24
dt = doc["dt"]; // 1602772377
JsonObject sys = doc["sys"];
const char *sys_country = sys["country"]; // "IN"
sys_sunrise = sys["sunrise"]; // 1602721950
sys_sunset = sys["sunset"]; // 1602763695
int timezone = doc["timezone"]; // 19800
long id = doc["id"]; // 1258182
const char *name = doc["name"]; // "Rewa"
City = doc["name"];
}
http.end(); //Close connection
}
}
void Display_Init(void)
{
server.on("/", handle_OnConnect);
server.onNotFound(handle_NotFound);
server.begin();
Serial.println("HTTP server started at http://172.20.10.3/");
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C))
{ // Address 0x3C for 128x64
Serial.println(F("SSD1306 allocation failed"));
for (;;)
; // Don't proceed, loop forever
}
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setTextSize(2);
display.setCursor(10, 0);
display.println(City);
display.setTextSize(1);
display.setCursor(45, 20);
display.print(main_temp);
display.write(248);
display.println("c");
display.setCursor(15, 30);
display.println(Description);
display.setCursor(0, 45);
display.println("Pressure");
display.setCursor(0, 54);
display.print(main_pressure, DEC);
display.println(" hPa");
display.setCursor(70, 45);
display.print("Humidity");
display.setCursor(90, 54);
display.print(main_humidity, DEC);
display.print(" ");
display.write(37);
display.display();
delay(2000);
}
/*
Definitions for the Private Functions Used
*/
String SendHTML(float temperature, float humidity, float pressure, float visibility)
{
String ptr = "<!DOCTYPE html>";
ptr += "<html>";
ptr += "<head>";
ptr += "<title>ESP8266 Weather Station</title>";
ptr += "<meta name='viewport' content='width=device-width, initial-scale=1.0'>";
ptr += "<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600' rel='stylesheet'>";
ptr += "<style>";
ptr += "html { font-family: 'Open Sans', sans-serif; display: block; margin: 0px auto; text-align: center;color: #444444;}";
ptr += "body{margin: 0px;} ";
ptr += "h1 {margin: 50px auto 30px;} ";
ptr += ".side-by-side{display: table-cell;vertical-align: middle;position: relative;}";
ptr += ".text{font-weight: 600;font-size: 19px;width: 200px;}";
ptr += ".reading{font-weight: 300;font-size: 50px;padding-right: 25px;}";
ptr += ".temperature .reading{color: #F29C1F;}";
ptr += ".humidity .reading{color: #3B97D3;}";
ptr += ".pressure .reading{color: #26B99A;}";
ptr += ".altitude .reading{color: #955BA5;}";
ptr += ".superscript{font-size: 17px;font-weight: 600;position: absolute;top: 10px;}";
ptr += ".data{padding: 10px;}";
ptr += ".container{display: table;margin: 0 auto;}";
ptr += ".icon{width:65px}";
ptr += "</style>";
ptr += "</head>";
ptr += "<body>";
ptr += "<h1>ESP8266 Weather Station</h1>";
ptr += "<div class='container'>";
ptr += "<div class='data temperature'>";
ptr += "<div class='side-by-side icon'>";
ptr += "<svg enable-background='new 0 0 19.438 54.003'height=54.003px id=Layer_1 version=1.1 viewBox='0 0 19.438 54.003'width=19.438px x=0px xml:space=preserve xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink y=0px><g><path d='M11.976,8.82v-2h4.084V6.063C16.06,2.715,13.345,0,9.996,0H9.313C5.965,0,3.252,2.715,3.252,6.063v30.982";
ptr += "C1.261,38.825,0,41.403,0,44.286c0,5.367,4.351,9.718,9.719,9.718c5.368,0,9.719-4.351,9.719-9.718";
ptr += "c0-2.943-1.312-5.574-3.378-7.355V18.436h-3.914v-2h3.914v-2.808h-4.084v-2h4.084V8.82H11.976z M15.302,44.833";
ptr += "c0,3.083-2.5,5.583-5.583,5.583s-5.583-2.5-5.583-5.583c0-2.279,1.368-4.236,3.326-5.104V24.257C7.462,23.01,8.472,22,9.719,22";
ptr += "s2.257,1.01,2.257,2.257V39.73C13.934,40.597,15.302,42.554,15.302,44.833z'fill=#F29C21 /></g></svg>";
ptr += "</div>";
ptr += "<div class='side-by-side text'>Temperature</div>";
ptr += "<div class='side-by-side reading'>";
ptr += (float)temperature;
ptr += "<span class='superscript'>°C</span></div>";
ptr += "</div>";
ptr += "<div class='data humidity'>";
ptr += "<div class='side-by-side icon'>";
ptr += "<svg enable-background='new 0 0 29.235 40.64'height=40.64px id=Layer_1 version=1.1 viewBox='0 0 29.235 40.64'width=29.235px x=0px xml:space=preserve xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink y=0px><path d='M14.618,0C14.618,0,0,17.95,0,26.022C0,34.096,6.544,40.64,14.618,40.64s14.617-6.544,14.617-14.617";
ptr += "C29.235,17.95,14.618,0,14.618,0z M13.667,37.135c-5.604,0-10.162-4.56-10.162-10.162c0-0.787,0.638-1.426,1.426-1.426";
ptr += "c0.787,0,1.425,0.639,1.425,1.426c0,4.031,3.28,7.312,7.311,7.312c0.787,0,1.425,0.638,1.425,1.425";
ptr += "C15.093,36.497,14.455,37.135,13.667,37.135z'fill=#3C97D3 /></svg>";
ptr += "</div>";
ptr += "<div class='side-by-side text'>Humidity</div>";
ptr += "<div class='side-by-side reading'>";
ptr += (int)humidity;
ptr += "<span class='superscript'>%</span></div>";
ptr += "</div>";
ptr += "<div class='data pressure'>";
ptr += "<div class='side-by-side icon'>";
ptr += "<svg enable-background='new 0 0 40.542 40.541'height=40.541px id=Layer_1 version=1.1 viewBox='0 0 40.542 40.541'width=40.542px x=0px xml:space=preserve xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink y=0px><g><path d='M34.313,20.271c0-0.552,0.447-1,1-1h5.178c-0.236-4.841-2.163-9.228-5.214-12.593l-3.425,3.424";
ptr += "c-0.195,0.195-0.451,0.293-0.707,0.293s-0.512-0.098-0.707-0.293c-0.391-0.391-0.391-1.023,0-1.414l3.425-3.424";
ptr += "c-3.375-3.059-7.776-4.987-12.634-5.215c0.015,0.067,0.041,0.13,0.041,0.202v4.687c0,0.552-0.447,1-1,1s-1-0.448-1-1V0.25";
ptr += "c0-0.071,0.026-0.134,0.041-0.202C14.39,0.279,9.936,2.256,6.544,5.385l3.576,3.577c0.391,0.391,0.391,1.024,0,1.414";
ptr += "c-0.195,0.195-0.451,0.293-0.707,0.293s-0.512-0.098-0.707-0.293L5.142,6.812c-2.98,3.348-4.858,7.682-5.092,12.459h4.804";
ptr += "c0.552,0,1,0.448,1,1s-0.448,1-1,1H0.05c0.525,10.728,9.362,19.271,20.22,19.271c10.857,0,19.696-8.543,20.22-19.271h-5.178";
ptr += "C34.76,21.271,34.313,20.823,34.313,20.271z M23.084,22.037c-0.559,1.561-2.274,2.372-3.833,1.814";
ptr += "c-1.561-0.557-2.373-2.272-1.815-3.833c0.372-1.041,1.263-1.737,2.277-1.928L25.2,7.202L22.497,19.05";
ptr += "C23.196,19.843,23.464,20.973,23.084,22.037z'fill=#26B999 /></g></svg>";
ptr += "</div>";
ptr += "<div class='side-by-side text'>Pressure</div>";
ptr += "<div class='side-by-side reading'>";
ptr += (int)pressure;
ptr += "<span class='superscript'>hPa</span></div>";
ptr += "</div>";
ptr += "<div class='data altitude'>";
ptr += "<div class='side-by-side icon'>";
ptr += "<svg enable-background='new 0 0 58.422 40.639'height=40.639px id=Layer_1 version=1.1 viewBox='0 0 58.422 40.639'width=58.422px x=0px xml:space=preserve xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink y=0px><g><path d='M58.203,37.754l0.007-0.004L42.09,9.935l-0.001,0.001c-0.356-0.543-0.969-0.902-1.667-0.902";
ptr += "c-0.655,0-1.231,0.32-1.595,0.808l-0.011-0.007l-0.039,0.067c-0.021,0.03-0.035,0.063-0.054,0.094L22.78,37.692l0.008,0.004";
ptr += "c-0.149,0.28-0.242,0.594-0.242,0.934c0,1.102,0.894,1.995,1.994,1.995v0.015h31.888c1.101,0,1.994-0.893,1.994-1.994";
ptr += "C58.422,38.323,58.339,38.024,58.203,37.754z'fill=#955BA5 /><path d='M19.704,38.674l-0.013-0.004l13.544-23.522L25.13,1.156l-0.002,0.001C24.671,0.459,23.885,0,22.985,0";
ptr += "c-0.84,0-1.582,0.41-2.051,1.038l-0.016-0.01L20.87,1.114c-0.025,0.039-0.046,0.082-0.068,0.124L0.299,36.851l0.013,0.004";
ptr += "C0.117,37.215,0,37.62,0,38.059c0,1.412,1.147,2.565,2.565,2.565v0.015h16.989c-0.091-0.256-0.149-0.526-0.149-0.813";
ptr += "C19.405,39.407,19.518,39.019,19.704,38.674z'fill=#955BA5 /></g></svg>";
ptr += "</div>";
ptr += "<div class='side-by-side text'>Visibility</div>";
ptr += "<div class='side-by-side reading'>";
ptr += (int)(visibility / 1000);
ptr += "<span class='superscript'>Km</span></div>";
ptr += "</div>";
ptr += "</div>";
ptr += "</body>";
ptr += "</html>";
return ptr;
}
void handle_OnConnect()
{
server.send(200, "text/html", SendHTML(main_temp, main_humidity, main_pressure, visibility));
}
void handle_NotFound()
{
server.send(404, "text/plain", "Not found");
} | [
"Abhi0803@github.com"
] | Abhi0803@github.com |
7e99763a7936b6828c47844508cf805df03e583f | 534414b49d65e40ceab9044b749365252583869c | /xspydll/mfc_class.h | 5f33132cefdf099b2f46c5d0a0ab26f9ef9f9ea1 | [] | no_license | zhuhuibeishadiao/xspy | 0f7a1a9a6b416d6977d81c8209470d8ecd37b926 | df22380314623da7e92b421dfaa6143dbe8dd3cf | refs/heads/master | 2020-04-07T22:46:55.701900 | 2018-10-26T03:30:24 | 2018-10-26T03:30:24 | 158,784,609 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 13,571 | h | /*
*
* This file is part of xspy
* By lynnux <lynnux@qq.com>
* Copyright 2013 lynnux
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
/************************************************************************/
/* 查看MFC虚函数的方法:
/d1reportAllClassLayout
*/
/************************************************************************/
#pragma once
#include <boost/format.hpp>
#define MAKE_VFN(x) \
virtual const char* x() \
{ \
return #x; \
}
typedef size_t* PVFN;
#define PRINT_VFN(x) \
result += boost::str(boost::format("[vtbl+0x%02X]%-24s= %s\r\n") % index % #x % GetCodes((LPVOID)*pStart)); \
++pStart; \
++index;
struct AFX_MSGMAP_ENTRY
{
UINT nMessage; // windows message
UINT nCode; // control code or WM_NOTIFY code
UINT nID; // control ID (or 0 for windows messages)
UINT nLastID; // used for entries specifying a range of control id's
UINT_PTR nSig; // signature type (action) or pointer to message #
//AFX_PMSG pfn; // routine to call (or special value)
LPVOID pfn;
};
struct AFX_MSGMAP
{
LPVOID pfnGetBaseMap;
//const AFX_MSGMAP* (PASCAL* pfnGetBaseMap)();
const AFX_MSGMAP_ENTRY* lpEntries;
};
struct CRuntimeClass
{
// Attributes
LPCSTR m_lpszClassName;
int m_nObjectSize;
UINT m_wSchema; // schema number of the loaded class
//CObject* (PASCAL* m_pfnCreateObject)(); // NULL => abstract class
LPVOID m_pfnCreateObject;
//#ifdef _AFXDLL
CRuntimeClass* (PASCAL* m_pfnGetBaseClass)();
//#else
// CRuntimeClass* m_pBaseClass;
//#endif
//
};
class CObject
{
public:
// 该函数可以获取类名和类大小
virtual CRuntimeClass* GetRuntimeClass() const{return 0;};
MAKE_VFN(dtor);
MAKE_VFN(Serialize);
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
index = 0;
PRINT_VFN(GetRuntimeClass);
PRINT_VFN(dtor);
PRINT_VFN(Serialize);
}
};
class CObject_dbg
{
public:
virtual CRuntimeClass* GetRuntimeClass() const {return 0;};
MAKE_VFN(dtor);
MAKE_VFN(Serialize);
MAKE_VFN(AssertValid);
MAKE_VFN(Dump);
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
index = 0;
PRINT_VFN(GetRuntimeClass);
PRINT_VFN(dtor);
PRINT_VFN(Serialize);
PRINT_VFN(AssertValid);
PRINT_VFN(Dump);
}
};
template<class T>
class CCmdTarget : public T
{
public:
MAKE_VFN(OnCmdMsg);
MAKE_VFN(OnFinalRelease);
MAKE_VFN(IsInvokeAllowed);
MAKE_VFN(GetDispatchIID);
MAKE_VFN(GetTypeInfoCount);
MAKE_VFN(GetTypeLibCache);
MAKE_VFN(GetTypeLib);
virtual const AFX_MSGMAP* GetMessageMap(){return 0;}
// 不调用的虚函数就没必要MAKE_VFN了
//#define MAKE_MEMBER(x,fmt) sTemp.Format( "[+%02X]" #x "=" fmt "\r\n",(PBYTE)&(x) - (PBYTE)this,x);str += sTemp;
// sTemp.Format( "[+%02X]vtbl address=%s\r\n",0,(LPCSTR)GetMods(vtbl));str += sTemp;
void get_member(PVFN& pStart, DWORD& index, std::string& result)
{
PDWORD pBegin = (PDWORD)pStart;
#define PRINT_MEMBER(x) \
result += boost::str(boost::format("[+0x%02X]" #x " = 0x%p\r\n") % index % ); \
++pStart; \
++index;
PRINT_MEMBER(CCmdTarget::m_dwRef); // 64位分布不知道是什么样的
PRINT_MEMBER(CCmdTarget::m_pOuterUnknown);
PRINT_MEMBER(CCmdTarget::m_xInnerUnknown);
PRINT_MEMBER(CCmdTarget::m_xDispatch.m_vtbl);
// MAKE_MEMBER(CCmdTarget::m_xDispatch.m_nOffset);
PRINT_MEMBER(CCmdTarget::m_bResultExpected);
PRINT_MEMBER(CCmdTarget::m_xConnPtContainer.m_vtbl);
// MAKE_MEMBER(CCmdTarget::m_xConnPtContainer.m_nOffset,"%p");
}
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
T::get_vfn_string(pStart, index, result);
PRINT_VFN(OnCmdMsg);
PRINT_VFN(OnFinalRelease);
PRINT_VFN(IsInvokeAllowed);
PRINT_VFN(GetDispatchIID);
PRINT_VFN(GetTypeInfoCount);
PRINT_VFN(GetTypeLibCache);
PRINT_VFN(GetTypeLib);
PRINT_VFN(GetMessageMap);
PRINT_VFN(GetCommandMap);
PRINT_VFN(GetDispatchMap);
PRINT_VFN(GetConnectionMap);
PRINT_VFN(GetInterfaceMap);
PRINT_VFN(GetEventSinkMap);
PRINT_VFN(OnCreateAggregates);
PRINT_VFN(GetInterfaceHook);
PRINT_VFN(GetExtraConnectionPoints);
PRINT_VFN(GetConnectionHook);
}
};
template<class dbg>
class CWnd42X : public CCmdTarget<dbg>
{
public:
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
CCmdTarget<dbg>::get_vfn_string(pStart, index, result);
PRINT_VFN(PreSubclassWindow);
PRINT_VFN(Create);
PRINT_VFN(DestroyWindow);
PRINT_VFN(PreCreateWindow);
PRINT_VFN(CalcWindowRect);
PRINT_VFN(OnToolHitTest);
PRINT_VFN(GetScrollBarCtrl);
PRINT_VFN(WinHelpA);
PRINT_VFN(ContinueModal);
PRINT_VFN(EndModalLoop);
PRINT_VFN(OnCommand);
PRINT_VFN(OnNotify);
PRINT_VFN(GetSuperWndProcAddr);
PRINT_VFN(DoDataExchange);
PRINT_VFN(BeginModalState);
PRINT_VFN(EndModalState);
PRINT_VFN(PreTranslateMessage);
PRINT_VFN(OnAmbientProperty);
PRINT_VFN(WindowProc);
PRINT_VFN(OnWndMsg);
PRINT_VFN(DefWindowProcA);
PRINT_VFN(PostNcDestroy);
PRINT_VFN(OnChildNotify);
PRINT_VFN(CheckAutoCenter);
PRINT_VFN(IsFrameWnd);
PRINT_VFN(SetOccDialogInfo);
}
};
template <class dbg>
class CDialog42X : public dbg
{
public:
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
dbg::get_vfn_string(pStart, index, result);
PRINT_VFN(DoModal);
PRINT_VFN(OnInitDialog);
PRINT_VFN(OnSetFont);
PRINT_VFN(OnOK);
PRINT_VFN(OnCancel);
PRINT_VFN(PreInitDialog);
}
};
template <class dbg>
class CWnd90X : public CCmdTarget<dbg>
{
public:
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
CCmdTarget<dbg>::get_vfn_string(pStart, index, result);
PRINT_VFN(PreSubclassWindow);
PRINT_VFN(Create);
PRINT_VFN(CreateEx);
PRINT_VFN(CreateEx);
PRINT_VFN(DestroyWindow);
PRINT_VFN(PreCreateWindow);
PRINT_VFN(CalcWindowRect);
PRINT_VFN(GetMenu);
PRINT_VFN(SetMenu);
PRINT_VFN(OnToolHitTest);
PRINT_VFN(GetScrollBarCtrl);
PRINT_VFN(WinHelpA);
PRINT_VFN(HtmlHelpA);
PRINT_VFN(WinHelpInternal);
PRINT_VFN(ContinueModal);
PRINT_VFN(EndModalLoop);
PRINT_VFN(EnsureStdObj);
PRINT_VFN(get_accParent);
PRINT_VFN(get_accChildCount);
PRINT_VFN(get_accChild);
PRINT_VFN(get_accName);
PRINT_VFN(get_accValue);
PRINT_VFN(get_accDescription);
PRINT_VFN(get_accRole);
PRINT_VFN(get_accState);
PRINT_VFN(get_accHelp);
PRINT_VFN(get_accHelpTopic);
PRINT_VFN(get_accKeyboardShortcut);
PRINT_VFN(get_accFocus);
PRINT_VFN(get_accSelection);
PRINT_VFN(get_accDefaultAction);
PRINT_VFN(accSelect);
PRINT_VFN(accLocation);
PRINT_VFN(accNavigate);
PRINT_VFN(accHitTest);
PRINT_VFN(accDoDefaultAction);
PRINT_VFN(put_accName);
PRINT_VFN(put_accValue);
PRINT_VFN(SetProxy);
PRINT_VFN(CreateAccessibleProxy);
PRINT_VFN(OnCommand);
PRINT_VFN(OnNotify);
PRINT_VFN(GetSuperWndProcAddr);
PRINT_VFN(DoDataExchange);
PRINT_VFN(BeginModalState);
PRINT_VFN(EndModalState);
PRINT_VFN(PreTranslateMessage);
PRINT_VFN(OnAmbientProperty);
PRINT_VFN(WindowProc);
PRINT_VFN(OnWndMsg);
PRINT_VFN(DefWindowProcA);
PRINT_VFN(PostNcDestroy);
PRINT_VFN(OnChildNotify);
PRINT_VFN(CheckAutoCenter);
PRINT_VFN(IsFrameWnd);
PRINT_VFN(CreateControlContainer);
PRINT_VFN(CreateControlSite);
PRINT_VFN(SetOccDialogInfo);
PRINT_VFN(GetOccDialogInfo);
}
};
template<class dbg>
class CDialog90X : public dbg
{
public:
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
dbg::get_vfn_string(pStart, index, result);
PRINT_VFN(Create);
PRINT_VFN(Create);
PRINT_VFN(CreateIndirect);
PRINT_VFN(CreateIndirect);
PRINT_VFN(DoModal);
PRINT_VFN(OnInitDialog);
PRINT_VFN(OnSetFont);
PRINT_VFN(OnOK);
PRINT_VFN(OnCancel);
PRINT_VFN(PreInitDialog);
}
};
// mfc 110 (test on vs2012)
template <class dbg>
class CWnd110X : public CCmdTarget<dbg>
{
public:
void get_vfn_string(PVFN& pStart, DWORD& index, std::string& result)
{
CCmdTarget<dbg>::get_vfn_string(pStart, index, result);
PRINT_VFN(PreSubclassWindow);
PRINT_VFN(Create);
PRINT_VFN(CreateEx);
PRINT_VFN(CreateEx);
PRINT_VFN(DestroyWindow);
PRINT_VFN(PreCreateWindow);
PRINT_VFN(CalcWindowRect);
PRINT_VFN(GetMenu);
PRINT_VFN(SetMenu);
PRINT_VFN(OnToolHitTest);
PRINT_VFN(GetScrollBarCtrl);
PRINT_VFN(WinHelpA);
PRINT_VFN(HtmlHelpA);
PRINT_VFN(WinHelpInternal);
PRINT_VFN(ContinueModal);
PRINT_VFN(EndModalLoop);
PRINT_VFN(OnDrawIconicThumbnailOrLivePreview); // new
PRINT_VFN(EnsureStdObj);
PRINT_VFN(get_accParent);
PRINT_VFN(get_accChildCount);
PRINT_VFN(get_accChild);
PRINT_VFN(get_accName);
PRINT_VFN(get_accValue);
PRINT_VFN(get_accDescription);
PRINT_VFN(get_accRole);
PRINT_VFN(get_accState);
PRINT_VFN(get_accHelp);
PRINT_VFN(get_accHelpTopic);
PRINT_VFN(get_accKeyboardShortcut);
PRINT_VFN(get_accFocus);
PRINT_VFN(get_accSelection);
PRINT_VFN(get_accDefaultAction);
PRINT_VFN(accSelect);
PRINT_VFN(accLocation);
PRINT_VFN(accNavigate);
PRINT_VFN(accHitTest);
PRINT_VFN(accDoDefaultAction);
PRINT_VFN(put_accName);
PRINT_VFN(put_accValue);
PRINT_VFN(SetProxy);
PRINT_VFN(CreateAccessibleProxy);
PRINT_VFN(OnCommand);
PRINT_VFN(OnNotify);
PRINT_VFN(GetSuperWndProcAddr);
PRINT_VFN(DoDataExchange);
PRINT_VFN(BeginModalState);
PRINT_VFN(EndModalState);
PRINT_VFN(PreTranslateMessage);
PRINT_VFN(OnAmbientProperty);
PRINT_VFN(WindowProc);
PRINT_VFN(OnWndMsg);
PRINT_VFN(DefWindowProcA);
PRINT_VFN(PostNcDestroy);
PRINT_VFN(OnChildNotify);
PRINT_VFN(OnTouchInputs); // new begin
PRINT_VFN(OnTouchInput);
PRINT_VFN(GetGestureStatus);
PRINT_VFN(OnGestureZoom);
PRINT_VFN(OnGesturePan);
PRINT_VFN(OnGestureRotate);
PRINT_VFN(OnGestureTwoFingerTap);
PRINT_VFN(OnGesturePressAndTap); // new end
PRINT_VFN(CheckAutoCenter);
PRINT_VFN(IsFrameWnd);
PRINT_VFN(CreateControlContainer);
PRINT_VFN(CreateControlSite);
PRINT_VFN(SetOccDialogInfo);
PRINT_VFN(GetOccDialogInfo);
}
};
// CDialog110X same as CDialog90X
// vc60到vs2008,CCmdTarget的虚函数表都是一样,vs2008的CWnd类虚函数表就多很多函数了
template <class dbg>
class CWndX : public CCmdTarget<dbg>
{
public:
};
template <class dbg>
class CDialogX : public CWndX<dbg>
{
public:
};
// 通用版本,不需要判断具体是哪个MFC版本,比如调用GetRuntimeClass的时候
typedef CWndX<CObject_dbg> CWndd;
typedef CWndX<CObject> CWnd;
typedef CDialogX<CObject_dbg> CDialogd;
typedef CDialogX<CObject> CDialog;
// 默认,对不支持的版本,至少可以显示到CCmdTarget的虚函数表
typedef CWnd CWnd00;
typedef CWndd CWnd00d;
typedef CDialog CDialog00;
typedef CDialogd CDialog00d;
// mfc42
typedef CWnd42X<CObject> CWnd42;
typedef CWnd42X<CObject_dbg> CWnd42d;
typedef CDialog42X<CWnd42> CDialog42;
typedef CDialog42X<CWnd42d> CDialog42d;
// mfc90
typedef CWnd90X<CObject> CWnd90;
typedef CWnd90X<CObject_dbg> CWnd90d;
typedef CDialog90X<CWnd90> CDialog90;
typedef CDialog90X<CWnd90d> CDialog90d;
// mfc110
typedef CWnd110X<CObject> CWnd110;
typedef CWnd110X<CObject_dbg> CWnd110d;
typedef CDialog90X<CWnd110> CDialog110;
typedef CDialog90X<CWnd110d> CDialog110d;
// mfc100
typedef CWnd110 CWnd100;
typedef CWnd110d CWnd100d;
typedef CDialog110 CDialog100;
typedef CDialog110d CDialog100d;
// mfc120
typedef CWnd110 CWnd120;
typedef CWnd110d CWnd120d;
typedef CDialog110 CDialog120;
typedef CDialog110d CDialog120d; | [
"lynnux@qq.com"
] | lynnux@qq.com |
2ec9199112a6d0fcf1713d923e914be49e3f9a03 | 9a784fdd879c26984ec996d39ba1bc277e54073b | /s814/dataDump/3200000.0_A6.5.cp | 9e96ab49d6cabc369732576b41b36c46244de7ac | [] | no_license | ChrisLangel/Xfoil_PyWrap | bf46eaaf27005d3b6d87e9e1bbeb53c60e6b98c5 | b3f686d780a16af2bb577c5d104559b501a1df39 | refs/heads/master | 2020-04-06T03:42:15.280513 | 2017-01-09T20:43:31 | 2017-01-09T20:43:31 | 42,878,655 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,199 | cp | # x Cp
1.00000 0.14413
0.99901 0.14299
0.99796 0.14179
0.99684 0.14047
0.99565 0.13903
0.99439 0.13746
0.99304 0.13570
0.99161 0.13376
0.99008 0.13161
0.98846 0.12921
0.98673 0.12652
0.98489 0.12355
0.98294 0.12022
0.98085 0.11647
0.97864 0.11229
0.97628 0.10761
0.97377 0.10238
0.97109 0.09649
0.96825 0.08989
0.96521 0.08252
0.96199 0.07431
0.95855 0.06503
0.95489 0.05484
0.95099 0.04336
0.94683 0.03075
0.94240 0.01677
0.93769 0.00143
0.93266 -0.01534
0.92730 -0.03358
0.92159 -0.05311
0.91550 -0.07406
0.90901 -0.09619
0.90209 -0.11947
0.89471 -0.14355
0.88684 -0.16830
0.87845 -0.19329
0.86950 -0.21852
0.85996 -0.24361
0.84979 -0.26821
0.83960 -0.29101
0.82939 -0.31207
0.81917 -0.33143
0.80893 -0.34969
0.79869 -0.36674
0.78843 -0.38290
0.77817 -0.39849
0.76789 -0.41359
0.75762 -0.42816
0.74733 -0.44294
0.73704 -0.45761
0.72674 -0.47251
0.71644 -0.48763
0.70614 -0.50318
0.69583 -0.51937
0.68552 -0.53599
0.67521 -0.55339
0.66489 -0.57157
0.65457 -0.59039
0.64425 -0.61027
0.63392 -0.63065
0.62359 -0.65235
0.61326 -0.67472
0.60292 -0.69841
0.59258 -0.72299
0.58224 -0.74802
0.57189 -0.77478
0.56153 -0.80214
0.55117 -0.83019
0.54081 -0.85920
0.53044 -0.88986
0.52006 -0.92030
0.50968 -0.95141
0.49929 -0.98424
0.48889 -1.01636
0.47849 -1.05079
0.46808 -1.08355
0.45766 -1.11874
0.44723 -1.15146
0.43680 -1.18708
0.42636 -1.22101
0.41592 -1.25569
0.40547 -1.28967
0.39502 -1.32223
0.38456 -1.35701
0.37410 -1.38780
0.36364 -1.42093
0.35317 -1.45150
0.34271 -1.48155
0.33225 -1.51015
0.32179 -1.53857
0.31134 -1.56275
0.30089 -1.59023
0.29045 -1.61370
0.28002 -1.63526
0.26960 -1.65534
0.25920 -1.67651
0.24881 -1.69366
0.23844 -1.70957
0.22809 -1.72311
0.21776 -1.73883
0.20746 -1.74813
0.19719 -1.76129
0.18695 -1.77051
0.17674 -1.77501
0.16657 -1.78554
0.15644 -1.78935
0.14636 -1.79706
0.13632 -1.79589
0.12634 -1.79939
0.11697 -1.79806
0.10819 -1.80372
0.09996 -1.84392
0.09225 -1.86879
0.08503 -1.87544
0.07826 -1.88192
0.07193 -1.89679
0.06600 -1.90976
0.06045 -1.92867
0.05527 -1.95046
0.05042 -1.96810
0.04590 -1.98969
0.04168 -2.02229
0.03774 -2.04593
0.03408 -2.06961
0.03067 -2.10619
0.02750 -2.13464
0.02457 -2.16841
0.02185 -2.20402
0.01933 -2.23610
0.01702 -2.26993
0.01489 -2.30237
0.01294 -2.33759
0.01115 -2.35586
0.00953 -2.38582
0.00807 -2.40622
0.00675 -2.40325
0.00557 -2.41797
0.00453 -2.41320
0.00361 -2.37539
0.00282 -2.33903
0.00215 -2.28040
0.00158 -2.20506
0.00111 -2.12073
0.00074 -2.01383
0.00045 -1.86735
0.00024 -1.77947
0.00010 -1.57156
0.00002 -1.48929
0.00000 -1.30031
0.00002 -1.14742
0.00009 -0.96084
0.00021 -0.79396
0.00039 -0.60670
0.00063 -0.41190
0.00095 -0.25343
0.00133 -0.07912
0.00180 0.07183
0.00236 0.21462
0.00300 0.35889
0.00374 0.46949
0.00458 0.56997
0.00553 0.66392
0.00659 0.73701
0.00778 0.80953
0.00908 0.85786
0.01053 0.90994
0.01211 0.94077
0.01384 0.97160
0.01572 0.98910
0.01778 1.00250
0.02001 1.00920
0.02242 1.00987
0.02504 1.00495
0.02786 0.99628
0.03091 0.98101
0.03419 0.96360
0.03773 0.94003
0.04154 0.91345
0.04564 0.88302
0.05004 0.84878
0.05478 0.81061
0.05987 0.76742
0.06534 0.72077
0.07121 0.67036
0.07752 0.61242
0.08430 0.55458
0.09159 0.48774
0.09942 0.41495
0.10784 0.33990
0.11689 0.25469
0.12662 0.16735
0.13649 0.07954
0.14649 -0.00932
0.15660 -0.09139
0.16683 -0.17179
0.17716 -0.24695
0.18758 -0.31588
0.19807 -0.37226
0.20863 -0.41925
0.21923 -0.46100
0.22986 -0.48245
0.24051 -0.49681
0.25115 -0.50070
0.26179 -0.49316
0.27240 -0.47886
0.28299 -0.45381
0.29354 -0.42711
0.30405 -0.39868
0.31451 -0.37098
0.32493 -0.34866
0.33531 -0.31266
0.34566 -0.21335
0.35596 -0.17504
0.36623 -0.14194
0.37648 -0.10795
0.38670 -0.07519
0.39689 -0.04320
0.40708 -0.01139
0.41724 0.01777
0.42740 0.04615
0.43756 0.07268
0.44771 0.09690
0.45786 0.12020
0.46802 0.14218
0.47818 0.16204
0.48834 0.18101
0.49852 0.19817
0.50870 0.21478
0.51890 0.22962
0.52910 0.24423
0.53932 0.25700
0.54955 0.26977
0.55980 0.28100
0.57005 0.29215
0.58032 0.30225
0.59061 0.31211
0.60090 0.32113
0.61121 0.33000
0.62154 0.33833
0.63187 0.34623
0.64222 0.35426
0.65258 0.36179
0.66295 0.36901
0.67334 0.37628
0.68373 0.38339
0.69414 0.39045
0.70457 0.39720
0.71500 0.40402
0.72545 0.41104
0.73590 0.41775
0.74638 0.42442
0.75686 0.43117
0.76736 0.43771
0.77787 0.44420
0.78839 0.45062
0.79893 0.45676
0.80948 0.46267
0.82005 0.46822
0.83063 0.47347
0.84123 0.47816
0.85184 0.48226
0.86181 0.48563
0.87118 0.48787
0.87999 0.48931
0.88827 0.49006
0.89605 0.48989
0.90335 0.48907
0.91021 0.48730
0.91665 0.48525
0.92269 0.48221
0.92837 0.47877
0.93369 0.47465
0.93869 0.47003
0.94337 0.46482
0.94777 0.45935
0.95190 0.45324
0.95577 0.44676
0.95940 0.43977
0.96280 0.43246
0.96599 0.42495
0.96899 0.41680
0.97180 0.40825
0.97443 0.39955
0.97690 0.39048
0.97922 0.38094
0.98140 0.37094
0.98344 0.36082
0.98535 0.35003
0.98715 0.33917
0.98883 0.32750
0.99041 0.31523
0.99189 0.30225
0.99328 0.28842
0.99459 0.27301
0.99581 0.25642
0.99696 0.23732
0.99804 0.21427
0.99905 0.18636
1.00000 0.14413
| [
"cmlangel@ucdavis.edu"
] | cmlangel@ucdavis.edu |
311c8cb7e9098fcfc1554a563b48c4ef03a27529 | 07306d96ba61d744cb54293d75ed2e9a09228916 | /External/NaturalMotion/morpheme/utils/gameManagement/include/GameManagement/PhysX3/GameCharacterManagerPhysX3Threaded.h | 602e69a1cba81e0129cf26381cc3a70e4a7b87ef | [] | no_license | D34Dspy/warz-client | e57783a7c8adab1654f347f389c1dace35b81158 | 5262ea65e0baaf3f37ffaede5f41c9b7eafee7c1 | refs/heads/master | 2023-03-17T00:56:46.602407 | 2015-12-20T16:43:00 | 2015-12-20T16:43:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,189 | h | // Copyright (c) 2012 NaturalMotion. All Rights Reserved.
// Not to be copied, adapted, modified, used, distributed, sold,
// licensed or commercially exploited in any manner without the
// written consent of NaturalMotion.
//
// All non public elements of this software are the confidential
// information of NaturalMotion and may not be disclosed to any
// person nor used for any purpose not expressly approved by
// NaturalMotion in writing.
//----------------------------------------------------------------------------------------------------------------------
#ifdef _MSC_VER
#pragma once
#endif
#ifndef GAME_CHARACTER_MANAGER_PHYSX3_THREADED_H
#define GAME_CHARACTER_MANAGER_PHYSX3_THREADED_H
//----------------------------------------------------------------------------------------------------------------------
#include "GameManagement/GameThreadScheduler.h"
#include "GameManagement/PhysX3/GameCharacterPhysX3.h"
#include "GameManagement/PhysX3/GameCharacterManagerPhysX3.h"
//----------------------------------------------------------------------------------------------------------------------
namespace Game
{
//----------------------------------------------------------------------------------------------------------------------
/// \class MorphemeTaskUpdateToPreCharacterController
//----------------------------------------------------------------------------------------------------------------------
class MorphemeTaskPhysX3UpdatePreCharacterController : public MorphemeBucketTask
{
public:
void run() NM_OVERRIDE;
};
//----------------------------------------------------------------------------------------------------------------------
/// \class MorphemeTaskPhysX3UpdatePostCharacterController
//----------------------------------------------------------------------------------------------------------------------
class MorphemeTaskPhysX3UpdatePostCharacterController : public MorphemeBucketTask
{
public:
void run() NM_OVERRIDE;
};
//----------------------------------------------------------------------------------------------------------------------
/// \class MorphemeTaskUpdatePostPhysics
//----------------------------------------------------------------------------------------------------------------------
class MorphemeTaskPhysX3UpdateFinalise : public MorphemeBucketTask
{
public:
void run() NM_OVERRIDE;
};
//----------------------------------------------------------------------------------------------------------------------
/// \class MorphemeBucketPhysX3
//----------------------------------------------------------------------------------------------------------------------
class MorphemeBucketPhysX3 : public MorphemeBucket
{
public:
MorphemeBucketPhysX3() :
MorphemeBucket(NULL)
{
m_preCharacterControllerTask.setBucket(this);
m_postCharacterControllerTask.setBucket(this);
m_finaliseTask.setBucket(this);
}
MorphemeTaskPhysX3UpdatePreCharacterController* getPreCharacterControllerTask()
{
return &m_preCharacterControllerTask;
}
MorphemeTaskPhysX3UpdatePostCharacterController* getPostCharacterControllerTask()
{
return &m_postCharacterControllerTask;
}
MorphemeTaskPhysX3UpdateFinalise* getFinaliseTask()
{
return &m_finaliseTask;
}
protected:
MorphemeTaskPhysX3UpdatePreCharacterController m_preCharacterControllerTask;
MorphemeTaskPhysX3UpdatePostCharacterController m_postCharacterControllerTask;
MorphemeTaskPhysX3UpdateFinalise m_finaliseTask;
};
//----------------------------------------------------------------------------------------------------------------------
/// \class CharacterManagerPhysX3Threaded
/// \brief Provides a simplified interface to managing and updating a set of PhysX3 morpheme characters
/// across multiple threads.
//----------------------------------------------------------------------------------------------------------------------
class CharacterManagerPhysX3Threaded : public CharacterManagerPhysX3
{
public:
CharacterManagerPhysX3Threaded();
virtual ~CharacterManagerPhysX3Threaded();
/// \brief Allocate required memory and initialise.
virtual void init() NM_OVERRIDE;
void init(uint32_t numBuckets);
/// \brief Free allocated memory and shutdown.
virtual void term() NM_OVERRIDE;
/// \brief Create a CharacterPhysX3 and register it with this manager.
///
/// Characters that are created via the Manager are automatically registered with the manager
/// and the memory management of the Character remains the responsibility of the Manager.
/// The manager must already have been attached to a PhysX scene.
CharacterPhysX3* createCharacterMultiThreaded(
CharacterDef* characterDef, ///< Must have been registered with this manager.
uint32_t bucketIndex, ///< Which bucket to put this character in to.
MR::PhysicsRigPhysX3::Type physicsRigType = MR::PhysicsRigPhysX3::TYPE_ARTICULATED, ///< The type of physics rig to create,
///< MR::PhysicsRigPhysX3::TYPE_ARTICULATED or
///< MR::PhysicsRigPhysX3::TYPE_JOINTED.
physx::PxMaterial* characterControllerMaterial = NULL, ///< The material to use for the character controller we create
///< (a default will be created if one is not provided).
const NMP::Vector3& initialPosition = NMP::Vector3::InitZero,
const NMP::Quat& initialOrientation = NMP::Quat::kIdentity,
MR::AnimSetIndex initialAnimSetIndex = 0,
const char* name = "");
/// \brief How many buckets does this manager have.
uint32_t getNumBuckets() { return ((uint32_t) m_bucketsVector.size()); }
/// \brief
MorphemeBucketPhysX3* getBucket(uint32_t bucketIndex);
/// \brief Starts the specified number of threads. Each thread starts to poll the ThreadScheduler for tasks to process.
void startThreadScheduler(uint32_t numThreads);
/// \brief Stops the threads that the ThreadScheduler has active.
void stopThreadScheduler();
/// \brief Help process any remaining tasks on the queue then when it is empty
/// wait for all threads to finish any remaining task execution.
void waitForAllScheduledTasks();
/// \brief
void registerCharacter(CharacterPhysX3* character, uint32_t bucketIndex);
/// \brief
void unregisterCharacter(CharacterPhysX3* character);
/// \brief
void destroyCharacter(CharacterPhysX3* character);
//----------------------------
// Update functions.
//----------------------------
/// \brief
void schedulePreCharacterControllerTasks(float deltaTime);
/// \brief
void schedulePostCharacterControllerTasks(float deltaTime);
/// \brief
void scheduleFinaliseTasks(float deltaTime);
/// \brief
void resetBucketTemporaryMemoryAllocators();
protected:
/// \brief Initialise buckets to support multi-threaded update of characters.
void initBucketsVector(uint32_t numBuckets);
/// \brief Destroy buckets.
void termBucketsVector();
/// A vector of buckets, each one containing a set of characters that share the same temporary memory allocator.
/// Each bucket can be updated independently on a separate thread.
typedef std::vector<MorphemeBucketPhysX3*> BucketsVectorPhysX3;
BucketsVectorPhysX3 m_bucketsVector;
/// Simple scheduler to load-balance the update of networks on several threads.
ThreadScheduler m_threadScheduler;
/// Records which bucket each character has been put in to.
/// Each entry corresponds to an entry in m_characterList.
typedef std::list<uint32_t> BucketIndexList;
BucketIndexList m_characterBucketIndexList;
};
} // namespace Game
//----------------------------------------------------------------------------------------------------------------------
#endif // GAME_CHARACTER_MANAGER_PHYSX3_THREADED_H
//----------------------------------------------------------------------------------------------------------------------
| [
"hasan@openkod.com"
] | hasan@openkod.com |
ca1592fad894c31ed42cc81e074a2c2136363227 | 6d1ea03becb18944e6dae48db076e519cb8ca328 | /day04/ex03/ClassCharacter.hpp | 77edc7e1b4b50d5ae1a087f73ae8003670336c09 | [] | no_license | ltouret/cpp | d1c4aa2263f71d4d6ed6f8d9d818a5e617ad055a | 979c6837452399e5fa4b0a3e18db3213d42b2132 | refs/heads/master | 2023-08-11T11:20:41.681021 | 2021-09-20T23:33:03 | 2021-09-20T23:33:03 | 339,862,544 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,478 | hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ClassCharacter.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ltouret <ltouret@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/06/20 22:26:07 by ltouret #+# #+# */
/* Updated: 2021/08/03 18:18:56 by ltouret ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CLASSCHARACTER_HPP
# define CLASSCHARACTER_HPP
# include "ClassAMateria.hpp"
# include "ClassICharacter.hpp"
class Character : public ICharacter
{
private:
AMateria *inventory[4];
std::string name;
public:
Character(void);
Character(std::string const &name);
Character(Character const &to_cpy);
virtual ~Character(void);
virtual Character &operator=(Character const &to_cpy);
virtual std::string const &getName(void) const;
virtual void equip(AMateria *m);
virtual void unequip(int idx);
virtual void use(int idx, ICharacter &target);
};
#endif
| [
"jiloh55@gmail.com"
] | jiloh55@gmail.com |
749bdbacd1dc7341396e2f370224db2d9d422890 | ce9777fe1253d5db769903b7a0afc87abec5f7ed | /practice/p1/allocator.h | 9d468069eba5971c22ca90d7295da2669e5d1d4e | [] | no_license | Zhiganoff/sfera-mail-mt | 8c1dee1f2fca63f6fccd2b0d9f6ee13362e18a80 | e1bac60676bb387676af0381cdcbc9d448902c31 | refs/heads/master | 2021-01-12T21:09:38.826894 | 2017-01-18T01:39:43 | 2017-01-18T01:39:43 | 68,546,100 | 1 | 0 | null | 2016-09-18T20:40:52 | 2016-09-18T20:40:52 | null | UTF-8 | C++ | false | false | 1,923 | h | #include <stdexcept>
#include <string>
#include <list>
#include <vector>
#include <cstring>
#include <iostream>
enum class AllocErrorType {
InvalidFree,
NoMemory,
};
class AllocError: std::runtime_error {
private:
AllocErrorType type;
public:
AllocError(AllocErrorType _type, std::string message):
runtime_error(message),
type(_type)
{}
AllocErrorType getType() const { return type; }
};
class Allocator;
class Pointer {
public:
int idx;
size_t size_;
static std::vector<void*> pointers;
friend Allocator;
Pointer(void *p = nullptr, size_t new_size = 0): size_(new_size) {
pointers.push_back(p);
idx = pointers.size() - 1;
}
void *get() const { return pointers[idx]; }
void *set(void *p) { pointers[idx] = p; }
};
struct memBlock {
void *pointer_;
size_t size_;
size_t used_;
int idx_;
memBlock(void *pointer, size_t size, size_t used, int idx): pointer_(pointer),
size_(size),
used_(used),
idx_(idx) {}
};
class Allocator {
void *base_;
size_t size_;
std::list<memBlock> blocks;
public:
Allocator(void *base, size_t size): base_(base), size_(size) {}
Pointer alloc(size_t N);
void realloc(Pointer &p, size_t N);
void free(Pointer &p);
void defrag();
void dump() {
std::list< memBlock >::iterator it = blocks.begin();
std::cout << std::endl;
while (it != blocks.cend()) {
std::cout << "pointer: " << (*it).pointer_ << " idx: " << it->idx_ << " size: " << (*it).size_ << " used: " << (*it).used_ << std::endl;
it++;
}
}
void moveMem(void * destptr, void * srcptr, size_t num);
};
| [
"zhiganoff.rd@yandex.ru"
] | zhiganoff.rd@yandex.ru |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.