blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
986 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
23 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
145 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
122 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
fa3544fb48cb3f5c2edf55fa302c9b1eee1fea95
b8dbb9de51e58afb0dd81f14a302c1b7d4e9a80a
/src/TileLayer.cpp
8f07676ac3cc4827c3754c913a704b83f2d36ed0
[]
no_license
tonyellis69/3DEngine
a78425cecf6f0228d6bdc5cfcdf455f00edceefd
927954300136e67a7fa120d4c5922fe212c07ff6
refs/heads/master
2023-07-19T20:07:05.971617
2023-07-10T15:01:04
2023-07-10T15:01:04
41,534,907
0
0
null
null
null
null
UTF-8
C++
false
false
13,625
cpp
#include "TileLayer.h" #include <iostream> //cout #include <fstream> //ifstream #include "Config.h" using namespace std; void CSceneLayer::SetParallax(float val) { Parallax = val; } CTileLayer::CTileLayer(void) { ViewOrigin.x = 0; ViewOrigin.y = 0; LeftmostViewCol = 1; BottomVisibleRow = 1; Repeats = false;//true; drawableTiles = noTile -1; } CTileLayer::~CTileLayer(void){ //if (TileData != NULL) //;// delete TileData; } /** Prepare this layer for drawing. */ void CTileLayer::InitialiseDrawing() { Drawn = false; CurrentDrawCol = 0; //LeftmostViewCol; CurrentDrawRow = 0;//BottomVisibleRow; } /** Calculates how many rows and columns of tiles are needed to fill a view of the current size.*/ void CTileLayer::Resize(float ViewWidth,float ViewHeight) { ViewTotalCols = (int) (ViewWidth/TileSheet->TileWidth)+2; ViewTotalRows = (int)(ViewHeight/TileSheet->TileHeight)+2; CalcDrawExtents(); } void CTileLayer::CalcDrawExtents() { if (ViewOrigin.x < 0) { LeftmostViewCol = (int) abs(ViewOrigin.x) / TileSheet->TileWidth; xStart = 0 - (abs(ViewOrigin.x) - (LeftmostViewCol * TileSheet->TileWidth ) ); } else { xStart = ViewOrigin.x; LeftmostViewCol = 0; } if (ViewOrigin.y < 0) { BottomVisibleRow = (int)abs(ViewOrigin.y) / TileSheet->TileHeight; yStart = 0 - (abs(ViewOrigin.y) - (BottomVisibleRow * TileSheet->TileHeight ) ); } else { yStart = ViewOrigin.y; BottomVisibleRow = 0; } if (occlusionOn) { TopmostDrawRow = BottomVisibleRow + ViewTotalRows; if (TopmostDrawRow > TotalRows) TopmostDrawRow = TotalRows; RightmostDrawCol = LeftmostViewCol + ViewTotalCols; if (RightmostDrawCol > TotalCols) RightmostDrawCol = TotalCols; } else { TopmostDrawRow = TotalRows - BottomVisibleRow; RightmostDrawCol = TotalCols -LeftmostViewCol ; } } /** Sets the position within the tile layer of the bottom-left corner of the screen. */ void CTileLayer::SetViewOffset(int x, int y) { ViewOrigin.set((float) x, (float) y); // SubTileOffset.set(fmod(ViewOrigin.x, (float)TileSheet->TileWidth), fmod(ViewOrigin.y, (float)TileSheet->TileHeight)); CalcDrawExtents(); } /** Moves the relative view position within this tile layer. */ void CTileLayer::Scroll(float x, float y) { ViewOrigin.x += (x*Parallax); ViewOrigin.y += (y*Parallax); CalcDrawExtents(); //SubTileOffset.set(fmod(-ViewOrigin.x, (float)TileSheet->TileWidth), fmod(-ViewOrigin.y, (float) TileSheet->TileHeight)); } /** Returns the tile to be found at the given row and column of this layer. */ int CTileLayer::GetTile(int col, int row) { //row = TotalRows - row; /* if (Repeats) { //TO DO: probably just get rid of this if (col < 0) col = TotalCols + (col % TotalCols)-1; else if (col >= TotalCols) col = col % TotalCols; if (row < 0 ) row = TotalRows + (row % TotalRows) - 1; else if (row >= TotalRows) row = row % TotalRows; } else */ if ((col < 0)||(row < 0) || (col >= TotalCols) || (row >= TotalRows)) return noTile; int Pos = (row * TotalCols) + col; return (unsigned char)TileData[Pos]; } /** Return the tile at the given row and column of the current view.*/ int CTileLayer::GetVisibleTile(int ViewCol, int ViewRow) { int row = TotalRows - (ViewRow+1+BottomVisibleRow); int col = ViewCol;// + LeftmostViewCol; return GetTile(col,row); } /** Return the row and column at the given point on the screen. */ void CTileLayer::getRowCol(float screenX,float screenY,int& col, int& row) { float fcol = (screenX - ViewOrigin.x ) / TileSheet->TileWidth; float frow = (screenY - ViewOrigin.y ) / TileSheet->TileWidth; col = (int)fcol; row = (int) frow; } /** Return the tile at the give screen coordinates.*/ int CTileLayer::getTileXY(float x, float y) { int row, col; getRowCol(x,y,col,row); return GetTile(col,row); } /** Set the given tile to the given value. */ void CTileLayer::setTile(int col, int row, char value) { TileData[(row * TotalCols) + col] = value; } /** Set this tile layer to use the given tilesheet. */ void CTileLayer::SetSheet( TSpriteSheet* Sheet) { TileSheet = Sheet; CalcDrawExtents(); } /** Returns data to draw a visible tile in this layer. Call this function repeatedly to draw all the visible tiles in the current view. */ void CTileLayer::GetDrawData(TRect& Rect, int& textureNo,float& x, float& y) { unsigned char Tile; do { //goes up in cols then rows, eg 1,0 2,0 3,0 ... 0,1 1,1 2,1... //TO DO: goes too far, beyond final row, check why Tile = GetTile(CurrentDrawCol +LeftmostViewCol ,CurrentDrawRow + BottomVisibleRow); if (Tile <= drawableTiles) { //textureHandle = TileSheet->textureHandle; textureNo = TileSheet->textureNo; Rect.Map = TileSheet->Tiles[Tile]; //Rect.XOff = (float)TileSheet->TileHalfWidth; //Rect.YOff = (float)TileSheet->TileHalfHeight; Rect.originX = (float)TileSheet->TileHalfWidth; Rect.originY = (float)TileSheet->TileHalfHeight; Rect.width = (float)TileSheet->TileWidth; Rect.height = (float)TileSheet->TileHeight; //calculate screen coords at which to draw tile: // x = (TileSheet->TileWidth * (CurrentDrawCol + LeftmostViewCol)) - SubTileOffset.x; x = (xStart ) + (TileSheet->TileWidth * CurrentDrawCol);// - SubTileOffset.x ; //y = ((CurrentDrawRow + BottomVisibleRow) * TileSheet->TileHeight) + SubTileOffset.y; y = (yStart ) + (TileSheet->TileHeight * CurrentDrawRow); x += TileSheet->TileHalfWidth; y += TileSheet->TileHalfHeight; } CurrentDrawCol++; //find next tile to draw, if any if (CurrentDrawCol > RightmostDrawCol) { CurrentDrawCol = 0;// LeftmostViewCol; CurrentDrawRow++; } if (CurrentDrawRow >= TopmostDrawRow) { Drawn = true; //break; } } while ((Tile > drawableTiles) && !Drawn); } /** Change the total number of rows and columns. Tile data is lost if it falls outside the new dimensions of the layer. */ void CTileLayer::resizeRowCol(int newCols, int newRows) { unsigned char* newTileData = new unsigned char[newCols * newRows]; std::fill_n(newTileData,newCols * newRows,noTile); for (int r=0;r<newRows && r<TotalRows;r++) { for (int c=0;c<newCols && c<TotalCols;c++) { newTileData[(r*newCols)+c] = TileData[(r*TotalCols)+c]; } } delete[] TileData; TileData = newTileData; TotalRows = newRows; TotalCols = newCols; CalcDrawExtents(); } /** Add the given image to this image layer. */ void CImageLayer::AddImage(int texture, float x, float y,int width, int height) { CSceneImage Image; Image.tileOrTexture = texture; Image.PosX = x; Image.PosY = y; Image.Rect.width = (float)width; Image.Rect.height = (float)height; Image.Rect.originX = (float)width/2; Image.Rect.originY = (float)height/2; ImageList.push_back(Image); } /** Add the given image tile to this image layer. */ void CImageLayer::addImageTile(int tileNo, float x, float y,int width, int height) { CSceneImage Image; Image.tileOrTexture = tileNo; Image.PosX = x; Image.PosY = y; Image.Rect.width = (float)width; Image.Rect.height = (float)height; Image.Rect.originX = (float)imageSheet->TileWidth/2; Image.Rect.originY = (float)imageSheet->TileHeight/2; ImageList.push_back(Image); } /** Prepare this layer for drawing. */ void CImageLayer::InitialiseDrawing() { DrawNext = 0; Drawn = false; } /** Provide drawing data for a rectangular element of this layer. Call this function repeatedly to iterate through all the elements of this layer. */ void CImageLayer::GetDrawData(TRect& Rect,int& TextureNo, float& x, float& y) { //find the next image in this layer to draw... if (DrawNext < ImageList.size()) { if (ImageList[DrawNext].Visible) { x = ImageList[DrawNext].PosX + ViewOrigin.x; y = ImageList[DrawNext].PosY + ViewOrigin.y; Rect = ImageList[DrawNext].Rect; if (imageSheet == NULL) { TextureNo = ImageList[DrawNext].tileOrTexture; } else { Rect.Map = imageSheet->Tiles[ImageList[DrawNext].tileOrTexture]; TextureNo = imageSheet->textureNo; } } DrawNext++; return; } //nothing left to draw? Declare this layer 'drawn'. Drawn = true; } /** Scrolls the relative screen position within this image layer. */ void CImageLayer::Scroll(float x, float y) { ViewOrigin.x += (x*Parallax); ViewOrigin.y += (y*Parallax); } /** Remove the given image from this layer. */ void CImageLayer::removeItem(int itemNo) { ImageList.erase(ImageList.begin() + itemNo); } CImageLayer::~CImageLayer() { //for (int i=0;i<ImageList.size();i++) // ;//delete (ImageList[i]); } #define _SCL_SECURE_NO_WARNINGS 1 /** Create a scrollable tiled backdrop that is empty of tiles. */ CTileLayer* CSceneObj::createEmptyTileLayer(int totalCols, int totalRows) { unsigned char* tileData = new unsigned char[totalCols * totalRows]; std::fill_n(tileData,totalCols * totalRows,noTile); CTileLayer* result = CreateTileLayer(tileData,totalCols,totalRows); delete[] tileData; return result; } /** Create a scrollable tiled backdrop using the given tile data. */ CTileLayer* CSceneObj::CreateTileLayer(unsigned char* TileData, int TotalCols, int TotalRows) { CTileLayer* NewLayer = new CTileLayer; NewLayer->TileData = new unsigned char [TotalCols*TotalRows]; memcpy(NewLayer->TileData,TileData,TotalCols*TotalRows); NewLayer->TotalCols = TotalCols; NewLayer->TotalRows = TotalRows; NewLayer->Type = TILE_LAYER; LayerList.push_back(NewLayer); return (CTileLayer*) LayerList.back(); } /** Create an image layer and add it to the scene's list of layers. */ CImageLayer* CSceneObj::CreateImageLayer() { CImageLayer* ImageLayer = new CImageLayer; ImageLayer->Type = IMAGE_LAYER; LayerList.push_back(ImageLayer); return ImageLayer; } /** Return the position and dimensions of the given image. */ CRect CImageLayer::getElementDimensions(int item) { CRect image; image.x = ImageList[item].PosX - ImageList[item].Rect.originX; image.y = ImageList[item].PosY - ImageList[item].Rect.originY; image.width = ImageList[item].Rect.width; image.height = ImageList[item].Rect.height; return image; } /** Ensure the backdrop layer's images fill the current view. */ void CBackdropLayer::Resize(float ViewWidth,float ViewHeight) { for (size_t i=0;i<ImageList.size();i++) { ImageList[i].PosX = ViewWidth/2; ImageList[i].PosY = ViewHeight/2; ImageList[i].Rect.originX = ViewWidth/2; ImageList[i].Rect.originY = ViewHeight/2; ImageList[i].Rect.width = ViewWidth; ImageList[i].Rect.height = ViewHeight; } } void CSceneObj::CreateBackdropLayer(int Texture) { CBackdropLayer* BackLayer; CSceneLayer* FrontLayer = NULL; if (LayerList.size()){ //if list contains layers FrontLayer = LayerList[0]; if (FrontLayer->Type != BACKDROP_LAYER) { //does a backdrop layer already exist? BackLayer = new CBackdropLayer; //no BackLayer->Type = BACKDROP_LAYER; } else //yes BackLayer = (CBackdropLayer*)FrontLayer; } else { //no layers? BackLayer = new CBackdropLayer; BackLayer->Type = BACKDROP_LAYER; } BackLayer->AddImage(Texture,0,0,100,100); LayerList.insert(LayerList.begin(),BackLayer); //ensure it goes at the front of the list BackLayer->CurrentImage = 0; } void CSceneObj::Resize(float ViewWidth, float ViewHeight) { for (size_t l=0;l<LayerList.size();l++) { LayerList[l]->Resize(ViewWidth, ViewHeight); } } /** Scroll the layers of the scene object by the given amount. */ C2DVector CSceneObj::Scroll(float x, float y) { C2DVector result(0,0); for (size_t l=0;l<LayerList.size();l++) LayerList[l]->Scroll(x,y); return result; //TO DO: put some kind of boundary check here? } /** Prepare to draw all the visible layers of this object. Call this every frame before Draw. */ void CSceneObj::InitialiseDrawing() { for (size_t l=0;l<LayerList.size();l++) LayerList[l]->InitialiseDrawing(); } /** Provide data for drawing a rectangular element of this scene. Call this function repeatedly to iterate through all the elements of all its layers. */ bool CSceneObj::GetDrawData(TRect& Rect,int& TextureNo, float& x, float& y, rgba& drawColour) { int size = LayerList.size(); for (int l=0;l<size;l++) { if (!LayerList[l]->visible) continue; LayerList[l]->GetDrawData(Rect,TextureNo,x,y); drawColour = LayerList[l]->drawColour; if (!LayerList[l]->Drawn) { return true; } } return false; } void CSceneObj::setBackdropLayer(int Texture) { if (!LayerList.size()) return; //get a handle on the backdrop layer CSceneLayer* Layer = LayerList.front(); if (Layer->Type != BACKDROP_LAYER) return; CBackdropLayer* BackLayer = (CBackdropLayer*)Layer; BackLayer->ImageList[BackLayer->CurrentImage].tileOrTexture = Texture; } void CSceneObj::setBackdropTiling( float u, float v, float s, float t) { //get a handle on the backdrop layer CSceneLayer* Layer = LayerList.front(); if (Layer->Type != BACKDROP_LAYER) return; CBackdropLayer* BackLayer = (CBackdropLayer*)Layer; BackLayer->ImageList[BackLayer->CurrentImage].Rect.Map.u = u; BackLayer->ImageList[BackLayer->CurrentImage].Rect.Map.v = v; BackLayer->ImageList[BackLayer->CurrentImage].Rect.Map.s = s; BackLayer->ImageList[BackLayer->CurrentImage].Rect.Map.t = t; } void CSceneObj::deleteLayer(int layerNo) { if (LayerList[layerNo]->Type == TILE_LAYER) { delete[] ( ((CTileLayer*)LayerList[layerNo])->TileData ); delete LayerList[layerNo]; } if (LayerList[layerNo]->Type == IMAGE_LAYER) delete( (CImageLayer*)LayerList[layerNo] ); if (LayerList[layerNo]->Type == BACKDROP_LAYER) delete( (CBackdropLayer*)LayerList[layerNo] ); } CSceneObj::~CSceneObj() { int size = LayerList.size(); for (int l=0;l<size;l++) { deleteLayer(l); } }
[ "tonyellis69@gmail.com" ]
tonyellis69@gmail.com
3c543e257bd4ba8741f8f7fe4dabcfe2f68056fc
03b5b626962b6c62fc3215154b44bbc663a44cf6
/src/instruction/KXORW.cpp
5a834ac449502fc204d5c2c6d801b2220b8dcc43
[]
no_license
haochenprophet/iwant
8b1f9df8ee428148549253ce1c5d821ece0a4b4c
1c9bd95280216ee8cd7892a10a7355f03d77d340
refs/heads/master
2023-06-09T11:10:27.232304
2023-05-31T02:41:18
2023-05-31T02:41:18
67,756,957
17
5
null
2018-08-11T16:37:37
2016-09-09T02:08:46
C++
UTF-8
C++
false
false
175
cpp
#include "KXORW.h" int CKXORW::my_init(void *p) { this->name = "CKXORW"; this->alias = "KXORW"; return 0; } CKXORW::CKXORW() { this->my_init(); } CKXORW::~CKXORW() { }
[ "hao__chen@sina.com" ]
hao__chen@sina.com
cdce78f8804a9228c349c17aa8ba4fe8c9442860
4bb6812401469f028f337634bdaecd902248fc8d
/1402.cpp
1a5c228cc029aa108351cf77e002bf737f9848d9
[]
no_license
wldn143/fri_study
027409686695818009bac5176cef5da19b134ac5
3a55e6fe479e465a38d619c313f68bfa52ce1346
refs/heads/main
2023-04-23T10:35:12.995753
2021-05-11T16:08:54
2021-05-11T16:08:54
349,405,958
0
0
null
null
null
null
UTF-8
C++
false
false
304
cpp
#include <iostream> using namespace std; int main(void) { int test_case; cin >> test_case; for (int i = 0; i < test_case; i++) { int multiple, add; cin >> multiple >> add; cout << "yes" << endl; } }
[ "noreply@github.com" ]
wldn143.noreply@github.com
42775ed50fe5656f0fd32c16d9e4b0f3f646fc85
c845d539ce0cbe4d6b0f1e9bac5cb66697253e06
/protos/combat/src/monster.h
4b28b1a8ca6d71a4ad77b6a859e77f596a57b653
[]
no_license
supermuumi/nultima
ea096cc56cc13263ba8cc8794d1f472695237752
6bb6fa9144932f5bac29661fd39b288d4a57144f
refs/heads/master
2018-12-28T23:03:05.918638
2013-10-12T21:27:02
2013-10-12T21:27:02
12,048,244
0
1
null
null
null
null
UTF-8
C++
false
false
1,016
h
#include "vec3.h" typedef struct { int x; int y; } Vec2; class Player; class Monster { public: enum Stage { UNDECIDED, WAITING, MOVING, MELEE_ATTACK, END }; typedef struct { Monster::Stage stage; float duration; } Strategy; Monster(Vec2 position); ~Monster() {}; void render(bool isActive); void tick(); void prepare(); void move(); void attack(); bool isActive() { return (m_stage != END); } bool isAlive() { return m_hp > 0; } Vec2 getPosition() { return m_position; } private: Player* findClosestPlayer(int& distance); Vec2 m_position; Vec3 m_color; double m_lastColorChange; int m_stage; Strategy const* m_strategy; double m_lastStageChange; int m_strategyStep; int m_hp; Player* m_targetPlayer; };
[ "sampo@umbrasoftware.com" ]
sampo@umbrasoftware.com
d722a4d7f890f2ae38bf79dde5ac0c3209af1306
274855d775a0a6ed8227ce0dfb36f84bb9acfa83
/h5pp/include/h5pp/details/h5ppHdf5.h
273640b8466ac3351a01e72e1ac3720b6916960f
[ "MIT" ]
permissive
sbreuils/h5pp
a8632278e0bbff498642e98c345a5ee3c959f6f1
33eede09f9b76e0163b38f0976747e74e3207260
refs/heads/master
2023-03-12T03:04:31.990324
2021-02-24T09:29:26
2021-02-24T09:44:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
179,176
h
#pragma once #include "h5ppEigen.h" #include "h5ppEnums.h" #include "h5ppFilesystem.h" #include "h5ppHyperslab.h" #include "h5ppInfo.h" #include "h5ppLogger.h" #include "h5ppPropertyLists.h" #include "h5ppTypeSfinae.h" #include "h5ppUtils.h" #include <hdf5.h> #include <map> #include <typeindex> #include <utility> /*! * \brief A collection of functions to create (or get information about) datasets and attributes in HDF5 files */ namespace h5pp::hdf5 { [[nodiscard]] inline std::vector<std::string_view> pathCumulativeSplit(std::string_view path, std::string_view delim) { // Here the resulting vector "output" will contain increasingly longer string_views, that are subsets of the path. // Note that no string data is allocated here, these are simply views into a string allocated elsewhere. // For example if path is "this/is/a/long/path, the vector will contain the following views // [0]: this // [1]: this/is // [2]: this/is/a // [3]: this/is/a/long // [4]: this/is/a/long/path // It is very important to note that the resulting views are not null terminate. Therefore, these vector elements // **must not** be used as c-style arrays using their .data() member functions. std::vector<std::string_view> output; size_t currentPosition = 0; while(currentPosition < path.size()) { const auto foundPosition = path.find_first_of(delim, currentPosition); if(currentPosition != foundPosition) { output.emplace_back(path.substr(0, foundPosition)); } if(foundPosition == std::string_view::npos) break; currentPosition = foundPosition + 1; } return output; } template<typename h5x, typename = std::enable_if_t<std::is_base_of_v<hid::hid_base<h5x>, h5x>>> [[nodiscard]] std::string getName(const h5x &object) { // Read about the buffer size inconsistency here // http://hdf-forum.184993.n3.nabble.com/H5Iget-name-inconsistency-td193143.html std::string buf; ssize_t bufSize = H5Iget_name(object, nullptr, 0); // Size in bytes of the object name (NOT including \0) if(bufSize > 0) { buf.resize(static_cast<size_t>(bufSize) + 1); // We allocate space for the null terminator H5Iget_name(object, buf.data(), bufSize); } return buf.c_str(); // Use .c_str() to get a "standard" std::string, i.e. one where .size() does not include \0 } [[nodiscard]] inline int getRank(const hid::h5s &space) { return H5Sget_simple_extent_ndims(space); } [[nodiscard]] inline int getRank(const hid::h5d &dset) { hid::h5s space = H5Dget_space(dset); return getRank(space); } [[nodiscard]] inline int getRank(const hid::h5a &attr) { hid::h5s space = H5Aget_space(attr); return getRank(space); } [[nodiscard]] inline hsize_t getSize(const hid::h5s &space) { return static_cast<hsize_t>(H5Sget_simple_extent_npoints(space)); } [[nodiscard]] inline hsize_t getSize(const hid::h5d &dataset) { hid::h5s space = H5Dget_space(dataset); return getSize(space); } [[nodiscard]] inline hsize_t getSize(const hid::h5a &attribute) { hid::h5s space = H5Aget_space(attribute); return getSize(space); } [[nodiscard]] inline hsize_t getSizeSelected(const hid::h5s &space) { return static_cast<hsize_t>(H5Sget_select_npoints(space)); } [[nodiscard]] inline std::vector<hsize_t> getDimensions(const hid::h5s &space) { int ndims = H5Sget_simple_extent_ndims(space); if(ndims < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to get dimensions"); } std::vector<hsize_t> dims(static_cast<size_t>(ndims)); H5Sget_simple_extent_dims(space, dims.data(), nullptr); return dims; } [[nodiscard]] inline std::vector<hsize_t> getDimensions(const hid::h5d &dataset) { hid::h5s space = H5Dget_space(dataset); return getDimensions(space); } [[nodiscard]] inline std::vector<hsize_t> getDimensions(const hid::h5a &attribute) { hid::h5s space = H5Aget_space(attribute); return getDimensions(space); } [[nodiscard]] inline H5D_layout_t getLayout(const hid::h5p &dataset_creation_property_list) { return H5Pget_layout(dataset_creation_property_list); } [[nodiscard]] inline H5D_layout_t getLayout(const hid::h5d &dataset) { hid::h5p dcpl = H5Dget_create_plist(dataset); return H5Pget_layout(dcpl); } [[nodiscard]] inline std::optional<std::vector<hsize_t>> getChunkDimensions(const hid::h5p &dsetCreatePropertyList) { auto layout = H5Pget_layout(dsetCreatePropertyList); if(layout != H5D_CHUNKED) return std::nullopt; auto ndims = H5Pget_chunk(dsetCreatePropertyList, 0, nullptr); if(ndims < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to get chunk dimensions"); } else if(ndims > 0) { std::vector<hsize_t> chunkDims(static_cast<size_t>(ndims)); H5Pget_chunk(dsetCreatePropertyList, ndims, chunkDims.data()); return chunkDims; } else return {}; } [[nodiscard]] inline std::optional<std::vector<hsize_t>> getChunkDimensions(const hid::h5d &dataset) { hid::h5p dcpl = H5Dget_create_plist(dataset); return getChunkDimensions(dcpl); } [[nodiscard]] inline int getCompressionLevel(const hid::h5p &dsetCreatePropertyList) { auto nfilter = H5Pget_nfilters(dsetCreatePropertyList); H5Z_filter_t filter = H5Z_FILTER_NONE; std::array<unsigned int, 1> cdval = {0}; std::array<size_t, 1> cdelm = {0}; for(int idx = 0; idx < nfilter; idx++) { constexpr size_t size = 10; filter = H5Pget_filter(dsetCreatePropertyList, idx, nullptr, cdelm.data(), cdval.data(), 0, nullptr, nullptr); if(filter != H5Z_FILTER_DEFLATE) continue; H5Pget_filter_by_id(dsetCreatePropertyList, filter, nullptr, cdelm.data(), cdval.data(), 0, nullptr, nullptr); } return cdval[0]; } [[nodiscard]] inline std::optional<std::vector<hsize_t>> getMaxDimensions(const hid::h5s &space, H5D_layout_t layout) { if(layout != H5D_CHUNKED) return std::nullopt; if(H5Sget_simple_extent_type(space) != H5S_SIMPLE) return std::nullopt; int rank = H5Sget_simple_extent_ndims(space); if(rank < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to get dimensions"); } std::vector<hsize_t> dimsMax(static_cast<size_t>(rank)); H5Sget_simple_extent_dims(space, nullptr, dimsMax.data()); return dimsMax; } [[nodiscard]] inline std::optional<std::vector<hsize_t>> getMaxDimensions(const hid::h5d &dataset) { hid::h5s space = H5Dget_space(dataset); hid::h5p dcpl = H5Dget_create_plist(dataset); return getMaxDimensions(space, getLayout(dcpl)); } inline herr_t H5Dvlen_get_buf_size_safe(const hid::h5d &dset, const hid::h5t &type, const hid::h5s &space, hsize_t *vlen) { *vlen = 0; if(H5Tis_variable_str(type) <= 0) return -1; if(H5Sget_simple_extent_type(space) != H5S_SCALAR) { herr_t retval = H5Dvlen_get_buf_size(dset, type, space, vlen); if(retval >= 0) return retval; } if(H5Dget_storage_size(dset) <= 0) return 0; auto size = H5Sget_simple_extent_npoints(space); std::vector<const char *> vdata{static_cast<size_t>(size)}; // Allocate for pointers for "size" number of strings // HDF5 allocates space for each string herr_t retval = H5Dread(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, vdata.data()); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); return 0; } // Sum up the number of bytes size_t maxLen = h5pp::constants::maxSizeCompact; for(auto elem : vdata) { if(elem == nullptr) continue; *vlen += static_cast<hsize_t>(std::min(std::string_view(elem).size(), maxLen) + 1); // Add null-terminator } H5Dvlen_reclaim(type, space, H5P_DEFAULT, vdata.data()); return 1; } inline herr_t H5Avlen_get_buf_size_safe(const hid::h5a &attr, const hid::h5t &type, const hid::h5s &space, hsize_t *vlen) { *vlen = 0; if(H5Tis_variable_str(type) <= 0) return -1; if(H5Aget_storage_size(attr) <= 0) return 0; auto size = H5Sget_simple_extent_npoints(space); std::vector<const char *> vdata{static_cast<size_t>(size)}; // Allocate pointers for "size" number of strings // HDF5 allocates space for each string herr_t retval = H5Aread(attr, type, vdata.data()); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); return 0; } // Sum up the number of bytes size_t maxLen = h5pp::constants::maxSizeCompact; for(auto elem : vdata) { if(elem == nullptr) continue; *vlen += static_cast<hsize_t>(std::min(std::string_view(elem).size(), maxLen) + 1); // Add null-terminator } H5Dvlen_reclaim(type, space, H5P_DEFAULT, vdata.data()); return 1; } [[nodiscard]] inline size_t getBytesPerElem(const hid::h5t &h5Type) { return H5Tget_size(h5Type); } [[nodiscard]] inline size_t getBytesTotal(const hid::h5s &space, const hid::h5t &type) { return getBytesPerElem(type) * getSize(space); } [[nodiscard]] inline size_t getBytesTotal(const hid::h5d &dset, std::optional<hid::h5s> space, std::optional<hid::h5t> type) { if(not type) type = H5Dget_type(dset); if(not space) space = H5Dget_space(dset); if(H5Tis_variable_str(type.value()) > 0) { hsize_t vlen = 0; herr_t err = H5Dvlen_get_buf_size_safe(dset, type.value(), space.value(), &vlen); if(err >= 0) return vlen; // Returns the total number of bytes required to store the dataset else return getBytesTotal(space.value(), type.value()); } return getBytesTotal(space.value(), type.value()); } [[nodiscard]] inline size_t getBytesTotal(const hid::h5a &attr, std::optional<hid::h5s> space, std::optional<hid::h5t> type) { if(not type) type = H5Aget_type(attr); if(not space) space = H5Aget_space(attr); if(H5Tis_variable_str(type.value()) > 0) { hsize_t vlen = 0; herr_t err = H5Avlen_get_buf_size_safe(attr, type.value(), space.value(), &vlen); if(err >= 0) return vlen; // Returns the total number of bytes required to store the dataset else return getBytesTotal(space.value(), type.value()); } return getBytesTotal(space.value(), type.value()); } [[nodiscard]] inline size_t getBytesSelected(const hid::h5s &space, const hid::h5t &type) { return getBytesPerElem(type) * getSizeSelected(space); } template<typename DataType> void assertWriteBufferIsLargeEnough(const DataType &data, const hid::h5s &space, const hid::h5t &type) { if(H5Tget_class(type) == H5T_STRING) { if(H5Tis_variable_str(type)) return; // This transfers the string from memory until finding a null terminator if constexpr(h5pp::type::sfinae::is_text_v<DataType>) { auto hdf5Byte = H5Tget_size(type); // Chars including null-terminator. The memory buffer must fit this size. Also, these // many bytes will participate in IO auto hdf5Size = getSizeSelected(space); auto dataByte = h5pp::util::getCharArraySize(data, false); // Allocated chars including null terminator auto dataSize = h5pp::util::getSize(data); if(dataByte < hdf5Byte) throw std::runtime_error( h5pp::format("The text buffer given for this write operation is smaller than the selected space in memory.\n" "\t Data transfer would read from memory out of bounds\n" "\t given : num strings {} | bytes {} = {} chars + '\\0'\n" "\t selected : num strings {} | bytes {} = {} chars + '\\0'\n" "\t type : [{}]", dataSize, dataByte, dataByte - 1, hdf5Size, hdf5Byte, hdf5Byte - 1, h5pp::type::sfinae::type_name<DataType>())); } } else { if constexpr(std::is_pointer_v<DataType>) return; if constexpr(not h5pp::type::sfinae::has_size_v<DataType>) return; auto hdf5Size = getSizeSelected(space); auto hdf5Byte = h5pp::util::getBytesPerElem<DataType>() * hdf5Size; auto dataByte = h5pp::util::getBytesTotal(data); auto dataSize = h5pp::util::getSize(data); if(dataByte < hdf5Byte) throw std::runtime_error( h5pp::format("The buffer given for this write operation is smaller than the selected space in memory.\n" "\t Data transfer would read from memory out of bounds\n" "\t given : size {} | bytes {}\n" "\t selected: size {} | bytes {}\n" "\t type : [{}]", dataSize, dataByte, hdf5Size, hdf5Byte, h5pp::type::sfinae::type_name<DataType>())); } } template<typename DataType> void assertReadSpaceIsLargeEnough(const DataType &data, const hid::h5s &space, const hid::h5t &type) { if(H5Tget_class(type) == H5T_STRING) { if(H5Tis_variable_str(type)) return; // These are resized on the fly if constexpr(h5pp::type::sfinae::is_text_v<DataType>) { // The memory buffer must fit hdf5Byte: that's how many bytes will participate in IO auto hdf5Byte = H5Tget_size(type); // Chars including null-terminator. auto hdf5Size = getSizeSelected(space); auto dataByte = h5pp::util::getCharArraySize(data) + 1; // Chars including null terminator auto dataSize = h5pp::util::getSize(data); if(dataByte < hdf5Byte) throw std::runtime_error(h5pp::format( "The text buffer allocated for this read operation is smaller than the string buffer found on the dataset.\n" "\t Data transfer would write into memory out of bounds\n" "\t allocated buffer: num strings {} | bytes {} = {} chars + '\\0'\n" "\t selected buffer: num strings {} | bytes {} = {} chars + '\\0'\n" "\t type : [{}]", dataSize, dataByte, dataByte - 1, hdf5Size, hdf5Byte, hdf5Byte - 1, h5pp::type::sfinae::type_name<DataType>())); } } else { if constexpr(std::is_pointer_v<DataType>) return; if constexpr(not h5pp::type::sfinae::has_size_v<DataType>) return; auto hdf5Size = getSizeSelected(space); auto hdf5Byte = h5pp::util::getBytesPerElem<DataType>() * hdf5Size; auto dataByte = h5pp::util::getBytesTotal(data); auto dataSize = h5pp::util::getSize(data); if(dataByte < hdf5Byte) throw std::runtime_error( h5pp::format("The buffer allocated for this read operation is smaller than the selected space in memory.\n" "\t Data transfer would write into memory out of bounds\n" "\t allocated : size {} | bytes {}\n" "\t selected : size {} | bytes {}\n" "\t type : [{}]", dataSize, dataByte, hdf5Size, hdf5Byte, h5pp::type::sfinae::type_name<DataType>())); } } template<typename userDataType> [[nodiscard]] bool checkBytesPerElemMatch(const hid::h5t &h5Type) { size_t dsetTypeSize = h5pp::hdf5::getBytesPerElem(h5Type); size_t dataTypeSize = h5pp::util::getBytesPerElem<userDataType>(); if(H5Tget_class(h5Type) == H5T_STRING) dsetTypeSize = H5Tget_size(H5T_C_S1); if(dataTypeSize != dsetTypeSize) { // The dsetType may have been generated by H5Tpack, in which case we should check against the native type size_t packedTypesize = dsetTypeSize; hid::h5t nativetype = H5Tget_native_type(h5Type, H5T_DIR_ASCEND); dsetTypeSize = h5pp::hdf5::getBytesPerElem(nativetype); if(dataTypeSize != dsetTypeSize) h5pp::logger::log->debug("Type size mismatch: dataset type {} bytes | given type {} bytes", dsetTypeSize, dataTypeSize); else h5pp::logger::log->warn( "Detected packed HDF5 type: packed size {} bytes | native size {} bytes. This is not supported by h5pp yet!", packedTypesize, dataTypeSize); } return dataTypeSize == dsetTypeSize; } template<typename DataType, typename = std::enable_if_t<not std::is_base_of_v<hid::hid_base<DataType>, DataType>>> void assertBytesPerElemMatch(const hid::h5t &h5Type) { size_t dsetTypeSize = h5pp::hdf5::getBytesPerElem(h5Type); size_t dataTypeSize = h5pp::util::getBytesPerElem<DataType>(); if(H5Tget_class(h5Type) == H5T_STRING) dsetTypeSize = H5Tget_size(H5T_C_S1); if(dataTypeSize != dsetTypeSize) { // The dsetType may have been generated by H5Tpack, in which case we should check against the native type size_t packedTypesize = dsetTypeSize; hid::h5t nativetype = H5Tget_native_type(h5Type, H5T_DIR_ASCEND); dsetTypeSize = h5pp::hdf5::getBytesPerElem(nativetype); if(dataTypeSize != dsetTypeSize) throw std::runtime_error(h5pp::format( "Type size mismatch: dataset type is [{}] bytes | Type of given data is [{}] bytes", dsetTypeSize, dataTypeSize)); else h5pp::logger::log->warn( "Detected packed HDF5 type: packed size {} bytes | native size {} bytes. This is not supported by h5pp yet!", packedTypesize, dataTypeSize); } } template<typename DataType, typename = std::enable_if_t<not std::is_base_of_v<hid::hid_base<DataType>, DataType>>> void assertReadTypeIsLargeEnough(const hid::h5t &h5Type) { size_t dsetTypeSize = h5pp::hdf5::getBytesPerElem(h5Type); size_t dataTypeSize = h5pp::util::getBytesPerElem<DataType>(); if(H5Tget_class(h5Type) == H5T_STRING) dsetTypeSize = H5Tget_size(H5T_C_S1); if(dataTypeSize != dsetTypeSize) { // The dsetType may have been generated by H5Tpack, in which case we should check against the native type size_t packedTypesize = dsetTypeSize; hid::h5t nativetype = H5Tget_native_type(h5Type, H5T_DIR_ASCEND); dsetTypeSize = h5pp::hdf5::getBytesPerElem(nativetype); if(dataTypeSize > dsetTypeSize) h5pp::logger::log->debug( "Given data-type is too large: elements of type [{}] are [{}] bytes (each) | target HDF5 type is [{}] bytes", h5pp::type::sfinae::type_name<DataType>(), dataTypeSize, dsetTypeSize); else if(dataTypeSize < dsetTypeSize) throw std::runtime_error(h5pp::format( "Given data-type is too small: elements of type [{}] are [{}] bytes (each) | target HDF5 type is [{}] bytes", h5pp::type::sfinae::type_name<DataType>(), dataTypeSize, dsetTypeSize)); else h5pp::logger::log->warn( "Detected packed HDF5 type: packed size {} bytes | native size {} bytes. This is not supported by h5pp yet!", packedTypesize, dataTypeSize); } } template<typename DataType> inline void setStringSize(const DataType &data, hid::h5t &type, hsize_t &size, size_t &bytes, std::vector<hsize_t> &dims) { H5T_class_t dataClass = H5Tget_class(type); if(dataClass == H5T_STRING) { // The datatype may either be text or a container of text. // Examples of pure text are std::string or char[] // Example of a container of text is std::vector<std::string> // When // 1) it is pure text and dimensions are {} // * Space is H5S_SCALAR because dimensions are {} // * Rank is 0 because dimensions are {} // * Size is 1 because size = prod 1*dim(i) * dim(j)... // * We set size H5T_VARIABLE // 2) it is pure text and dimensions were specified other than {} // * Space is H5S_SIMPLE // * Rank is 1 or more because dimensions were given as {i,j,k...} // * Size is n, because size = prod 1*dim(i) * dim(j)... // * Here n is number of chars to get from the string buffer // * We set the string size to n because each element is a char. // * We set the dimension to {1} // 3) it is a container of text // * Space is H5S_SIMPLE // * The rank is 1 or more // * The space size is the number of strings in the container // * We set size H5T_VARIABLE // * The dimensions remain the size of the container if(H5Tget_size(type) != 1) return; // String properties have already been set, probably by the user herr_t retval = 0; if constexpr(h5pp::type::sfinae::is_text_v<DataType>) { if(dims.empty()) { // Case 1 retval = H5Tset_size(type, H5T_VARIABLE); bytes = h5pp::util::getBytesTotal(data); } else { // Case 2 hsize_t desiredSize = h5pp::util::getSizeFromDimensions(dims); // Consider a case where the text is "this is a text" // but the desired size is 12. // The resulting string should be "this is a t'\0'", // with 12 characters in total including the null terminator. // HDF5 seems to do this automatically. From the manual: // "If the short string is H5T_STR_NULLTERM, it is truncated // and a null terminator is appended." // Furthermore // "The size set for a string datatype should include space for // the null-terminator character, otherwise it will not be // stored on (or retrieved from) disk" retval = H5Tset_size(type, desiredSize); // Desired size should be num chars + null terminator dims = {}; size = 1; bytes = desiredSize; } } else if(h5pp::type::sfinae::has_text_v<DataType>) { // Case 3 retval = H5Tset_size(type, H5T_VARIABLE); bytes = h5pp::util::getBytesTotal(data); } if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to set size on string"); } // The following makes sure there is a single "\0" at the end of the string when written to file. // Note however that bytes here is supposed to be the number of characters including null terminator. retval = H5Tset_strpad(type, H5T_STR_NULLTERM); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to set strpad"); } // Sets the character set to UTF-8 retval = H5Tset_cset(type, H5T_cset_t::H5T_CSET_UTF8); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to set char-set UTF-8"); } } } template<typename h5x> [[nodiscard]] inline bool checkIfLinkExists(const h5x &loc, std::string_view linkPath, const hid::h5p &linkAccess = H5P_DEFAULT) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x>, "Template function [h5pp::hdf5::checkIfLinkExists<h5x>(const h5x & loc, ...)] requires type h5x to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); for(const auto &subPath : pathCumulativeSplit(linkPath, "/")) { int exists = H5Lexists(loc, util::safe_str(subPath).c_str(), linkAccess); if(exists == 0) { h5pp::logger::log->trace("Checking if link exists [{}] ... false", linkPath); return false; } if(exists < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to check if link exists [{}]", linkPath)); } } h5pp::logger::log->trace("Checking if link exists [{}] ... true", linkPath); return true; } template<typename h5x, typename h5x_loc> [[nodiscard]] h5x openLink(const h5x_loc & loc, std::string_view linkPath, std::optional<bool> linkExists = std::nullopt, const hid::h5p & linkAccess = H5P_DEFAULT) { static_assert(h5pp::type::sfinae::is_h5_link_v<h5x>, "Template function [h5pp::hdf5::openLink<h5x>(...)] requires type h5x to be: " "[h5pp::hid::h5d], [h5pp::hid::h5g] or [h5pp::hid::h5o]"); static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x_loc>, "Template function [h5pp::hdf5::openLink<h5x>(const h5x_loc & loc, ...)] requires type h5x_loc to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); if(not linkExists) linkExists = checkIfLinkExists(loc, linkPath, linkAccess); if(linkExists.value()) { if constexpr(std::is_same_v<h5x, hid::h5d>) h5pp::logger::log->trace("Opening dataset [{}]", linkPath); if constexpr(std::is_same_v<h5x, hid::h5g>) h5pp::logger::log->trace("Opening group [{}]", linkPath); if constexpr(std::is_same_v<h5x, hid::h5o>) h5pp::logger::log->trace("Opening object [{}]", linkPath); hid_t link; if constexpr(std::is_same_v<h5x, hid::h5d>) link = H5Dopen(loc, util::safe_str(linkPath).c_str(), linkAccess); if constexpr(std::is_same_v<h5x, hid::h5g>) link = H5Gopen(loc, util::safe_str(linkPath).c_str(), linkAccess); if constexpr(std::is_same_v<h5x, hid::h5o>) link = H5Oopen(loc, util::safe_str(linkPath).c_str(), linkAccess); if(link < 0) { H5Eprint(H5E_DEFAULT, stderr); if constexpr(std::is_same_v<h5x, hid::h5d>) throw std::runtime_error(h5pp::format("Failed to open dataset [{}]", linkPath)); if constexpr(std::is_same_v<h5x, hid::h5g>) throw std::runtime_error(h5pp::format("Failed to open group [{}]", linkPath)); if constexpr(std::is_same_v<h5x, hid::h5o>) throw std::runtime_error(h5pp::format("Failed to open object [{}]", linkPath)); } else { return link; } } else { throw std::runtime_error(h5pp::format("Link does not exist [{}]", linkPath)); } } template<typename h5x> [[nodiscard]] inline bool checkIfAttrExists(const h5x &link, std::string_view attrName, const hid::h5p &linkAccess = H5P_DEFAULT) { static_assert(h5pp::type::sfinae::is_h5_link_or_hid_v<h5x>, "Template function [h5pp::hdf5::checkIfAttrExists<h5x>(const h5x & link, ...) requires type h5x to be: " "[h5pp::hid::h5d], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); // if(attrExists and attrExists.value()) return true; h5pp::logger::log->trace("Checking if attribute [{}] exitst in link ...", attrName); bool exists = H5Aexists_by_name(link, std::string(".").c_str(), util::safe_str(attrName).c_str(), linkAccess) > 0; h5pp::logger::log->trace("Checking if attribute [{}] exitst in link ... {}", attrName, exists); return exists; } template<typename h5x> [[nodiscard]] inline bool checkIfAttrExists(const h5x & loc, std::string_view linkPath, std::string_view attrName, std::optional<bool> linkExists = std::nullopt, const hid::h5p & linkAccess = H5P_DEFAULT) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x>, "Template function [h5pp::hdf5::checkIfAttrExists<h5x>(const h5x & loc, ..., ...)] requires type h5x to be: " "[h5pp::hid::h5d], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); if(not linkExists) linkExists = checkIfLinkExists(loc, linkPath, linkAccess); // If the link does not exist the attribute doesn't exist either if(not linkExists.value()) return false; // Otherwise we open the link and check auto link = openLink<hid::h5o>(loc, linkPath, linkExists, linkAccess); h5pp::logger::log->trace("Checking if attribute [{}] exitst in link [{}] ...", attrName, linkPath); bool exists = H5Aexists_by_name(link, std::string(".").c_str(), util::safe_str(attrName).c_str(), linkAccess) > 0; h5pp::logger::log->trace("Checking if attribute [{}] exitst in link [{}] ... {}", attrName, linkPath, exists); return exists; } [[nodiscard]] inline bool H5Tequal_recurse(const hid::h5t &type1, const hid::h5t &type2) { // If types are compound, check recursively that all members have equal types and names H5T_class_t dataClass1 = H5Tget_class(type1); H5T_class_t dataClass2 = H5Tget_class(type1); if(dataClass1 == H5T_COMPOUND and dataClass2 == H5T_COMPOUND) { size_t sizeType1 = H5Tget_size(type1); size_t sizeType2 = H5Tget_size(type2); if(sizeType1 != sizeType2) return false; auto nMembers1 = H5Tget_nmembers(type1); auto nMembers2 = H5Tget_nmembers(type2); if(nMembers1 != nMembers2) return false; for(auto idx = 0; idx < nMembers1; idx++) { hid::h5t t1 = H5Tget_member_type(type1, static_cast<unsigned int>(idx)); hid::h5t t2 = H5Tget_member_type(type2, static_cast<unsigned int>(idx)); char * mem1 = H5Tget_member_name(type1, static_cast<unsigned int>(idx)); char * mem2 = H5Tget_member_name(type2, static_cast<unsigned int>(idx)); std::string_view n1 = mem1; std::string_view n2 = mem2; bool equal = n1 == n2; H5free_memory(mem1); H5free_memory(mem2); if(not equal) return false; if(not H5Tequal_recurse(t1, t2)) return false; } return true; } else if(dataClass1 == dataClass2) { if(dataClass1 == H5T_STRING) return true; else return type1 == type2; } else return false; } [[nodiscard]] inline bool checkIfCompressionIsAvailable() { /* * Check if zlib compression is available and can be used for both * compression and decompression. We do not throw errors because this * filter is an optional part of the hdf5 library. */ htri_t zlibAvail = H5Zfilter_avail(H5Z_FILTER_DEFLATE); if(zlibAvail) { unsigned int filterInfo; H5Zget_filter_info(H5Z_FILTER_DEFLATE, &filterInfo); bool zlib_encode = (filterInfo & H5Z_FILTER_CONFIG_ENCODE_ENABLED); bool zlib_decode = (filterInfo & H5Z_FILTER_CONFIG_DECODE_ENABLED); return zlibAvail and zlib_encode and zlib_decode; } else { return false; } } [[nodiscard]] inline unsigned int getValidCompressionLevel(std::optional<unsigned int> compressionLevel = std::nullopt) { if(checkIfCompressionIsAvailable()) { if(compressionLevel) { if(compressionLevel.value() < 10) { return compressionLevel.value(); } else { h5pp::logger::log->debug("Given compression level {} is too high. Expected value 0 (min) to 9 (max). Returning 9"); return 9; } } else { return 0; } } else { h5pp::logger::log->debug("Compression is not available with this HDF5 library"); return 0; } } [[nodiscard]] inline std::string getAttributeName(const hid::h5a &attribute) { std::string buf; ssize_t bufSize = H5Aget_name(attribute, 0ul, nullptr); // Returns number of chars excluding \0 if(bufSize >= 0) { buf.resize(bufSize); H5Aget_name(attribute, static_cast<size_t>(bufSize) + 1, buf.data()); // buf is guaranteed to have \0 at the end } else { H5Eprint(H5E_DEFAULT, stderr); h5pp::logger::log->debug("Failed to get attribute names"); } return buf.c_str(); } template<typename h5x> [[nodiscard]] inline std::vector<std::string> getAttributeNames(const h5x &link) { static_assert(h5pp::type::sfinae::is_h5_link_or_hid_v<h5x>, "Template function [h5pp::hdf5::getAttributeNames(const h5x & link, ...)] requires type h5x to be: " "[h5pp::hid::h5d], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); auto numAttrs = H5Aget_num_attrs(link); std::vector<std::string> attrNames; std::string buf; for(auto i = 0; i < numAttrs; i++) { hid::h5a attrId = H5Aopen_idx(link, static_cast<unsigned int>(i)); attrNames.emplace_back(getAttributeName(attrId)); } return attrNames; } template<typename h5x> [[nodiscard]] inline std::vector<std::string> getAttributeNames(const h5x & loc, std::string_view linkPath, std::optional<bool> linkExists = std::nullopt, const hid::h5p & linkAccess = H5P_DEFAULT) { static_assert( h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x>, "Template function [h5pp::hdf5::getAttributeNames(const h5x & link, std::string_view linkPath)] requires type h5x to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); auto link = openLink<hid::h5o>(loc, linkPath, linkExists, linkAccess); return getAttributeNames(link); } template<typename T> [[nodiscard]] std::tuple<std::type_index, std::string, size_t> getCppType() { return {typeid(T), std::string(h5pp::type::sfinae::type_name<T>()), sizeof(T)}; } [[nodiscard]] inline std::tuple<std::type_index, std::string, size_t> getCppType(const hid::h5t &type) { using namespace h5pp::type::compound; /* clang-format off */ if(H5Tequal(type, H5T_NATIVE_SHORT)) return getCppType<short>(); if(H5Tequal(type, H5T_NATIVE_INT)) return getCppType<int>(); if(H5Tequal(type, H5T_NATIVE_LONG)) return getCppType<long>(); if(H5Tequal(type, H5T_NATIVE_LLONG)) return getCppType<long long>(); if(H5Tequal(type, H5T_NATIVE_USHORT)) return getCppType<unsigned short>(); if(H5Tequal(type, H5T_NATIVE_UINT)) return getCppType<unsigned int>(); if(H5Tequal(type, H5T_NATIVE_ULONG)) return getCppType<unsigned long>(); if(H5Tequal(type, H5T_NATIVE_ULLONG)) return getCppType<unsigned long long>(); if(H5Tequal(type, H5T_NATIVE_DOUBLE)) return getCppType<double>(); if(H5Tequal(type, H5T_NATIVE_LDOUBLE)) return getCppType<long double>(); if(H5Tequal(type, H5T_NATIVE_FLOAT)) return getCppType<float>(); if(H5Tequal(type, H5T_NATIVE_HBOOL)) return getCppType<bool>(); if(H5Tequal(type, H5T_NATIVE_CHAR)) return getCppType<char>(); if(H5Tequal_recurse(type, H5Tcopy(H5T_C_S1))) return getCppType<std::string>(); if(H5Tequal_recurse(type, H5T_COMPLEX_SHORT)) return getCppType<std::complex<short>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_INT)) return getCppType<std::complex<int>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_LONG)) return getCppType<std::complex<long>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_LLONG)) return getCppType<std::complex<long long>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_USHORT)) return getCppType<std::complex<unsigned short>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_UINT)) return getCppType<std::complex<unsigned int>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_ULONG)) return getCppType<std::complex<unsigned long>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_ULLONG)) return getCppType<std::complex<unsigned long long>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_DOUBLE)) return getCppType<std::complex<double>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_LDOUBLE)) return getCppType<std::complex<long double>>(); if(H5Tequal_recurse(type, H5T_COMPLEX_FLOAT)) return getCppType<std::complex<float>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_SHORT)) return getCppType<H5T_SCALAR2<short>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_INT)) return getCppType<H5T_SCALAR2<int>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_LONG)) return getCppType<H5T_SCALAR2<long>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_LLONG)) return getCppType<H5T_SCALAR2<long long>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_USHORT)) return getCppType<H5T_SCALAR2<unsigned short>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_UINT)) return getCppType<H5T_SCALAR2<unsigned int>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_ULONG)) return getCppType<H5T_SCALAR2<unsigned long>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_ULLONG)) return getCppType<H5T_SCALAR2<unsigned long long>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_DOUBLE)) return getCppType<H5T_SCALAR2<double>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_LDOUBLE)) return getCppType<H5T_SCALAR2<long double>>(); if(H5Tequal_recurse(type, H5T_SCALAR2_FLOAT)) return getCppType<H5T_SCALAR2<float>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_SHORT)) return getCppType<H5T_SCALAR3<short>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_INT)) return getCppType<H5T_SCALAR3<int>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_LONG)) return getCppType<H5T_SCALAR3<long>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_LLONG)) return getCppType<H5T_SCALAR3<long long>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_USHORT)) return getCppType<H5T_SCALAR3<unsigned short>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_UINT)) return getCppType<H5T_SCALAR3<unsigned int>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_ULONG)) return getCppType<H5T_SCALAR3<unsigned long>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_ULLONG)) return getCppType<H5T_SCALAR3<unsigned long long>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_DOUBLE)) return getCppType<H5T_SCALAR3<double>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_LDOUBLE)) return getCppType<H5T_SCALAR3<long double>>(); if(H5Tequal_recurse(type, H5T_SCALAR3_FLOAT)) return getCppType<H5T_SCALAR3<float>>(); /* clang-format on */ if(H5Tcommitted(type) > 0) { H5Eprint(H5E_DEFAULT, stderr); h5pp::logger::log->debug("No C++ type match for HDF5 type [{}]", getName(type)); } else { h5pp::logger::log->debug("No C++ type match for non-committed HDF5 type"); } std::string name = "UNKNOWN TYPE"; if(H5Tget_class(type) == H5T_class_t::H5T_INTEGER) name ="H5T_INTEGER"; else if(H5Tget_class(type) == H5T_class_t::H5T_FLOAT) name ="H5T_FLOAT"; else if(H5Tget_class(type) == H5T_class_t::H5T_TIME) name ="H5T_TIME"; else if(H5Tget_class(type) == H5T_class_t::H5T_STRING) name ="H5T_STRING"; else if(H5Tget_class(type) == H5T_class_t::H5T_BITFIELD) name ="H5T_BITFIELD"; else if(H5Tget_class(type) == H5T_class_t::H5T_OPAQUE) name ="H5T_OPAQUE"; else if(H5Tget_class(type) == H5T_class_t::H5T_COMPOUND) name ="H5T_COMPOUND"; else if(H5Tget_class(type) == H5T_class_t::H5T_REFERENCE) name ="H5T_REFERENCE"; else if(H5Tget_class(type) == H5T_class_t::H5T_ENUM) name ="H5T_ENUM"; else if(H5Tget_class(type) == H5T_class_t::H5T_VLEN) name ="H5T_VLEN"; else if(H5Tget_class(type) == H5T_class_t::H5T_ARRAY) name ="H5T_ARRAY"; return {typeid(nullptr), name, getBytesPerElem(type)}; } [[nodiscard]] inline TypeInfo getTypeInfo(std::optional<std::string> objectPath, std::optional<std::string> objectName, const hid::h5s & h5Space, const hid::h5t & h5Type) { TypeInfo typeInfo; typeInfo.h5Name = std::move(objectName); typeInfo.h5Path = std::move(objectPath); typeInfo.h5Type = h5Type; typeInfo.h5Rank = h5pp::hdf5::getRank(h5Space); typeInfo.h5Size = h5pp::hdf5::getSize(h5Space); typeInfo.h5Dims = h5pp::hdf5::getDimensions(h5Space); std::tie(typeInfo.cppTypeIndex, typeInfo.cppTypeName, typeInfo.cppTypeBytes) = getCppType(typeInfo.h5Type.value()); return typeInfo; } [[nodiscard]] inline TypeInfo getTypeInfo(const hid::h5d &dataset) { auto dsetPath = h5pp::hdf5::getName(dataset); h5pp::logger::log->trace("Collecting type info about dataset [{}]", dsetPath); return getTypeInfo(dsetPath, std::nullopt, H5Dget_space(dataset), H5Dget_type(dataset)); } template<typename h5x, typename = h5pp::type::sfinae::enable_if_is_h5_loc_or_hid_t<h5x>> // enable_if so the compiler doesn't think it can use overload with std::string on first argument [[nodiscard]] inline TypeInfo getTypeInfo(const h5x & loc, std::string_view dsetName, std::optional<bool> dsetExists = std::nullopt, const hid::h5p & dsetAccess = H5P_DEFAULT) { auto dataset = openLink<hid::h5d>(loc, dsetName, dsetExists, dsetAccess); return getTypeInfo(dataset); } [[nodiscard]] inline TypeInfo getTypeInfo(const hid::h5a &attribute) { auto attrName = getAttributeName(attribute); auto linkPath = getName(attribute); // Returns the name of the link which has the attribute h5pp::logger::log->trace("Collecting type info about attribute [{}] in link [{}]", attrName, linkPath); return getTypeInfo(linkPath, attrName, H5Aget_space(attribute), H5Aget_type(attribute)); } template<typename h5x> [[nodiscard]] inline TypeInfo getTypeInfo(const h5x & loc, std::string_view linkPath, std::string_view attrName, std::optional<bool> linkExists = std::nullopt, std::optional<bool> attrExists = std::nullopt, const hid::h5p & linkAccess = H5P_DEFAULT) { if(not linkExists) linkExists = checkIfLinkExists(loc, linkPath, linkAccess); if(not linkExists.value()) throw std::runtime_error( h5pp::format("Attribute [{}] does not exist because its link does not exist: [{}]", attrName, linkPath)); auto link = openLink<hid::h5o>(loc, linkPath, linkExists, linkAccess); if(not attrExists) attrExists = checkIfAttrExists(link, attrName, linkAccess); if(attrExists.value()) { hid::h5a attribute = H5Aopen_name(link, util::safe_str(attrName).c_str()); return getTypeInfo(attribute); } else { throw std::runtime_error(h5pp::format("Attribute [{}] does not exist in link [{}]", attrName, linkPath)); } } template<typename h5x> [[nodiscard]] std::vector<TypeInfo> getTypeInfo_allAttributes(const h5x &link) { static_assert(h5pp::type::sfinae::is_h5_link_or_hid_v<h5x>, "Template function [h5pp::hdf5::getTypeInfo_allAttributes(const h5x & link)] requires type h5x to be: " "[h5pp::hid::h5d], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); std::vector<TypeInfo> allAttrInfo; int num_attrs = H5Aget_num_attrs(link); if(num_attrs < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to get number of attributes in link"); } for(int idx = 0; idx < num_attrs; idx++) { hid::h5a attribute = H5Aopen_idx(link, static_cast<unsigned int>(idx)); allAttrInfo.emplace_back(getTypeInfo(attribute)); } return allAttrInfo; } template<typename h5x> [[nodiscard]] inline std::vector<TypeInfo> getTypeInfo_allAttributes(const h5x & loc, std::string_view linkPath, std::optional<bool> linkExists = std::nullopt, const hid::h5p & linkAccess = H5P_DEFAULT) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x>, "Template function [h5pp::hdf5::getTypeInfo_allAttributes(const h5x & loc, ...)] requires type h5x to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); auto link = openLink<hid::h5o>(loc, linkPath, linkExists, linkAccess); return getTypeInfo_allAttributes(link); } template<typename h5x> inline void createGroup(const h5x & loc, std::string_view groupName, std::optional<bool> linkExists = std::nullopt, const PropertyLists &plists = PropertyLists()) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x>, "Template function [h5pp::hdf5::createGroup(const h5x & loc, ...)] requires type h5x to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); // Check if group exists already if(not linkExists) linkExists = checkIfLinkExists(loc, groupName, plists.linkAccess); if(not linkExists.value()) { h5pp::logger::log->trace("Creating group link [{}]", groupName); hid_t gid = H5Gcreate(loc, util::safe_str(groupName).c_str(), plists.linkCreate, plists.groupCreate, plists.groupAccess); if(gid < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to create group link [{}]", groupName)); } H5Gclose(gid); } else h5pp::logger::log->trace("Group exists already: [{}]", groupName); } template<typename h5x> inline void writeSymbolicLink(const h5x & loc, std::string_view srcPath, std::string_view tgtPath, std::optional<bool> linkExists = std::nullopt, const PropertyLists &plists = PropertyLists()) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x>, "Template function [h5pp::hdf5::writeSymbolicLink(const h5x & loc, ...)] requires type h5x to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); if(not linkExists) linkExists = checkIfLinkExists(loc, srcPath, plists.linkAccess); if(not linkExists.value()) { h5pp::logger::log->trace("Creating symbolic link [{}] --> [{}]", srcPath, tgtPath); herr_t retval = H5Lcreate_soft(util::safe_str(srcPath).c_str(), loc, util::safe_str(tgtPath).c_str(), plists.linkCreate, plists.linkAccess); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to write symbolic link [{}] ", srcPath)); } } else { throw std::runtime_error(h5pp::format("Tried to write soft link to non-existing path [{}]", srcPath)); } } inline void setProperty_layout(DsetInfo &dsetInfo) { if(not dsetInfo.h5PlistDsetCreate) throw std::logic_error("Could not configure the H5D layout: the dataset creation property list has not been initialized"); if(not dsetInfo.h5Layout) throw std::logic_error("Could not configure the H5D layout: the H5D layout parameter has not been initialized"); switch(dsetInfo.h5Layout.value()) { case H5D_CHUNKED: h5pp::logger::log->trace("Setting layout H5D_CHUNKED"); break; case H5D_COMPACT: h5pp::logger::log->trace("Setting layout H5D_COMPACT"); break; case H5D_CONTIGUOUS: h5pp::logger::log->trace("Setting layout H5D_CONTIGUOUS"); break; default: throw std::runtime_error( "Given invalid layout when creating dataset property list. Choose one of H5D_COMPACT,H5D_CONTIGUOUS,H5D_CHUNKED"); } herr_t err = H5Pset_layout(dsetInfo.h5PlistDsetCreate.value(), dsetInfo.h5Layout.value()); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Could not set layout"); } } inline void setProperty_chunkDims(DsetInfo &dsetInfo) { if(dsetInfo.h5Layout != H5D_CHUNKED and not dsetInfo.dsetChunk) return; if(dsetInfo.h5Layout != H5D_CHUNKED and dsetInfo.dsetChunk) { h5pp::logger::log->warn("Chunk dimensions {} ignored: The given dataset layout is not H5D_CHUNKED", dsetInfo.dsetChunk.value()); dsetInfo.dsetChunk = std::nullopt; return; } if(H5Sget_simple_extent_type(dsetInfo.h5Space.value()) == H5S_SCALAR) { h5pp::logger::log->warn("Chunk dimensions ignored: Space is H5S_SCALAR"); dsetInfo.dsetChunk = std::nullopt; dsetInfo.dsetDimsMax = std::nullopt; dsetInfo.h5Layout = H5D_CONTIGUOUS; // In case it's a big text dsetInfo.resizePolicy = h5pp::ResizePolicy::DO_NOT_RESIZE; setProperty_layout(dsetInfo); return; } if(not dsetInfo.h5PlistDsetCreate) throw std::logic_error("Could not configure chunk dimensions: the dataset creation property list has not been initialized"); if(not dsetInfo.dsetRank) throw std::logic_error("Could not configure chunk dimensions: the dataset rank (n dims) has not been initialized"); if(not dsetInfo.dsetDims) throw std::logic_error("Could not configure chunk dimensions: the dataset dimensions have not been initialized"); if(dsetInfo.dsetRank.value() != static_cast<int>(dsetInfo.dsetDims->size())) throw std::logic_error(h5pp::format("Could not set chunk dimensions properties: Rank mismatch: dataset dimensions {} has " "different number of elements than reported rank {}", dsetInfo.dsetDims.value(), dsetInfo.dsetRank.value())); if(dsetInfo.dsetDims->size() != dsetInfo.dsetChunk->size()) throw std::logic_error(h5pp::format("Could not configure chunk dimensions: Rank mismatch: dataset dimensions {} and chunk " "dimensions {} do not have the same number of elements", dsetInfo.dsetDims->size(), dsetInfo.dsetChunk->size())); h5pp::logger::log->trace("Setting chunk dimensions {}", dsetInfo.dsetChunk.value()); herr_t err = H5Pset_chunk(dsetInfo.h5PlistDsetCreate.value(), static_cast<int>(dsetInfo.dsetChunk->size()), dsetInfo.dsetChunk->data()); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Could not set chunk dimensions"); } } inline void setProperty_compression(DsetInfo &dsetInfo) { if(not dsetInfo.compression) return; if(not checkIfCompressionIsAvailable()) return; if(not dsetInfo.h5PlistDsetCreate) throw std::runtime_error("Could not configure compression: field h5_plist_dset_create has not been initialized"); if(not dsetInfo.h5Layout) throw std::logic_error("Could not configure compression: field h5_layout has not been initialized"); if(dsetInfo.h5Layout.value() != H5D_CHUNKED) { h5pp::logger::log->trace("Compression ignored: Layout is not H5D_CHUNKED"); dsetInfo.compression = std::nullopt; return; } if(dsetInfo.compression and dsetInfo.compression.value() > 9) { h5pp::logger::log->warn("Compression level too high: [{}]. Reducing to [9]", dsetInfo.compression.value()); dsetInfo.compression = 9; } h5pp::logger::log->trace("Setting compression level {}", dsetInfo.compression.value()); herr_t err = H5Pset_deflate(dsetInfo.h5PlistDsetCreate.value(), dsetInfo.compression.value()); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error("Failed to set compression level. Check that your HDF5 version has zlib enabled."); } } inline void selectHyperslab(hid::h5s &space, const Hyperslab &hyperSlab, std::optional<H5S_seloper_t> select_op_override = std::nullopt) { if(hyperSlab.empty()) return; int rank = H5Sget_simple_extent_ndims(space); if(rank < 0) throw std::runtime_error("Failed to read space rank"); std::vector<hsize_t> dims(static_cast<size_t>(rank)); H5Sget_simple_extent_dims(space, dims.data(), nullptr); // If one of slabOffset or slabExtent is given, then the other must also be given if(hyperSlab.offset and not hyperSlab.extent) throw std::logic_error("Could not setup hyperslab metadata: Given hyperslab offset but not extent"); if(not hyperSlab.offset and hyperSlab.extent) throw std::logic_error("Could not setup hyperslab metadata: Given hyperslab extent but not offset"); // If given, ranks of slabOffset and slabExtent must be identical to each other and to the rank of the existing dataset if(hyperSlab.offset and hyperSlab.extent and (hyperSlab.offset.value().size() != hyperSlab.extent.value().size())) throw std::logic_error( h5pp::format("Could not setup hyperslab metadata: Size mismatch in given hyperslab arrays: offset {} | extent {}", hyperSlab.offset.value(), hyperSlab.extent.value())); if(hyperSlab.offset and hyperSlab.offset.value().size() != static_cast<size_t>(rank)) throw std::logic_error( h5pp::format("Could not setup hyperslab metadata: Hyperslab arrays have different rank compared to the given space: " "offset {} | extent {} | space dims {}", hyperSlab.offset.value(), hyperSlab.extent.value(), dims)); // If given, slabStride must have the same rank as the dataset if(hyperSlab.stride and hyperSlab.stride.value().size() != static_cast<size_t>(rank)) throw std::logic_error( h5pp::format("Could not setup hyperslab metadata: Hyperslab stride has a different rank compared to the dataset: " "stride {} | dataset dims {}", hyperSlab.stride.value(), dims)); // If given, slabBlock must have the same rank as the dataset if(hyperSlab.blocks and hyperSlab.blocks.value().size() != static_cast<size_t>(rank)) throw std::logic_error( h5pp::format("Could not setup hyperslab metadata: Hyperslab blocks has a different rank compared to the dataset: " "blocks {} | dataset dims {}", hyperSlab.blocks.value(), dims)); if(not select_op_override) select_op_override = hyperSlab.select_oper; if(H5Sget_select_type(space) != H5S_SEL_HYPERSLABS and select_op_override != H5S_SELECT_SET) select_op_override = H5S_SELECT_SET; // First hyperslab selection must be H5S_SELECT_SET herr_t retval = 0; /* clang-format off */ if(hyperSlab.offset and hyperSlab.extent and hyperSlab.stride and hyperSlab.blocks) retval = H5Sselect_hyperslab(space, select_op_override.value(), hyperSlab.offset.value().data(), hyperSlab.stride.value().data(), hyperSlab.extent.value().data(), hyperSlab.blocks.value().data()); else if (hyperSlab.offset and hyperSlab.extent and hyperSlab.stride) retval = H5Sselect_hyperslab(space, select_op_override.value(), hyperSlab.offset.value().data(), hyperSlab.stride.value().data(), hyperSlab.extent.value().data(), nullptr); else if (hyperSlab.offset and hyperSlab.extent and hyperSlab.blocks) retval = H5Sselect_hyperslab(space, select_op_override.value(), hyperSlab.offset.value().data(), nullptr, hyperSlab.extent.value().data(), hyperSlab.blocks.value().data()); else if (hyperSlab.offset and hyperSlab.extent) retval = H5Sselect_hyperslab(space, select_op_override.value(), hyperSlab.offset.value().data(), nullptr, hyperSlab.extent.value().data(), nullptr); /* clang-format on */ if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to select hyperslab")); } #if H5_VERSION_GE(1, 10, 0) htri_t is_regular = H5Sis_regular_hyperslab(space); if(is_regular < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to check if Hyperslab selection is regular (non-rectangular)")); } else if(is_regular == 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Hyperslab selection is irregular (non-rectangular).\n" "This is not yet supported by h5pp")); } #endif htri_t valid = H5Sselect_valid(space); if(valid < 0) { H5Eprint(H5E_DEFAULT, stderr); Hyperslab slab(space); throw std::runtime_error( h5pp::format("Hyperslab selection is invalid. {} | space dims {}", getDimensions(space), slab.string())); } else if(valid == 0) { H5Eprint(H5E_DEFAULT, stderr); Hyperslab slab(space); throw std::runtime_error(h5pp::format( "Hyperslab selection is not contained in the given space. {} | space dims {}", getDimensions(space), slab.string())); } } inline void selectHyperslabs(hid::h5s & space, const std::vector<Hyperslab> & hyperSlabs, std::optional<std::vector<H5S_seloper_t>> hyperSlabSelectOps = std::nullopt) { if(hyperSlabSelectOps and not hyperSlabSelectOps->empty()) { if(hyperSlabs.size() != hyperSlabSelectOps->size()) for(const auto &slab : hyperSlabs) selectHyperslab(space, slab, hyperSlabSelectOps->at(0)); else for(size_t num = 0; num < hyperSlabs.size(); num++) selectHyperslab(space, hyperSlabs[num], hyperSlabSelectOps->at(num)); } else for(const auto &slab : hyperSlabs) selectHyperslab(space, slab, H5S_seloper_t::H5S_SELECT_OR); } inline void setSpaceExtent(const hid::h5s & h5Space, const std::vector<hsize_t> & dims, std::optional<std::vector<hsize_t>> dimsMax = std::nullopt) { if(H5Sget_simple_extent_type(h5Space) == H5S_SCALAR) return; if(dims.empty()) return; herr_t err; if(dimsMax) { // Here dimsMax was given by the user and we have to do some sanity checks // Check that the ranks match if(dims.size() != dimsMax->size()) throw std::runtime_error(h5pp::format("Number of dimensions (rank) mismatch: dims {} | max dims {}\n" "\t Hint: Dimension lists must have the same number of elements", dims, dimsMax.value())); std::vector<long> dimsMaxPretty; for(auto &dim : dimsMax.value()) { if(dim == H5S_UNLIMITED) dimsMaxPretty.emplace_back(-1); else dimsMaxPretty.emplace_back(static_cast<long>(dim)); } h5pp::logger::log->trace("Setting dataspace extents: dims {} | max dims {}", dims, dimsMaxPretty); err = H5Sset_extent_simple(h5Space, static_cast<int>(dims.size()), dims.data(), dimsMax->data()); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to set extents on space: dims {} | max dims {}", dims, dimsMax.value())); } } else { h5pp::logger::log->trace("Setting dataspace extents: dims {}", dims); err = H5Sset_extent_simple(h5Space, static_cast<int>(dims.size()), dims.data(), nullptr); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to set extents on space. Dims {}", dims)); } } } inline void setSpaceExtent(DsetInfo &dsetInfo) { if(not dsetInfo.h5Space) throw std::logic_error("Could not set space extent: the space is not initialized"); if(not dsetInfo.h5Space->valid()) throw std::runtime_error("Could not set space extent. Space is not valid"); if(H5Sget_simple_extent_type(dsetInfo.h5Space.value()) == H5S_SCALAR) return; if(not dsetInfo.dsetDims) throw std::runtime_error("Could not set space extent: dataset dimensions are not defined"); if(dsetInfo.h5Layout and dsetInfo.h5Layout.value() == H5D_CHUNKED and not dsetInfo.dsetDimsMax) { // Chunked datasets are unlimited unless told explicitly otherwise dsetInfo.dsetDimsMax = std::vector<hsize_t>(static_cast<size_t>(dsetInfo.dsetRank.value()), 0); std::fill_n(dsetInfo.dsetDimsMax->begin(), dsetInfo.dsetDimsMax->size(), H5S_UNLIMITED); } try { setSpaceExtent(dsetInfo.h5Space.value(), dsetInfo.dsetDims.value(), dsetInfo.dsetDimsMax); } catch(const std::exception &err) { throw std::runtime_error(h5pp::format("Failed to set extent on dataset {} \n Reason {}", dsetInfo.string(), err.what())); } } inline void extendSpace(const hid::h5s &space, const int dim, const hsize_t extent) { h5pp::logger::log->trace("Extending space dimension [{}] to extent [{}]", dim, extent); // Retrieve the current extent of this space const int oldRank = H5Sget_simple_extent_ndims(space); std::vector<hsize_t> oldDims(static_cast<size_t>(oldRank)); H5Sget_simple_extent_dims(space, oldDims.data(), nullptr); // We may need to change the rank, for instance, if we are appending a new column // to a vector of size n, so it becomes an (n x 2) "matrix". const int newRank = std::max(dim + 1, oldRank); std::vector<hsize_t> newDims(static_cast<size_t>(newRank), 1); std::copy(oldDims.begin(), oldDims.end(), newDims.begin()); newDims[static_cast<size_t>(dim)] = extent; setSpaceExtent(space, newDims); // H5Sset_extent_simple(space,newRank,newDims.data(),nullptr); } inline void extendDataset(const hid::h5d &dataset, const int dim, const hsize_t extent) { // Retrieve the current size of the memSpace (act as if you don't know its size and want to append) hid::h5s space = H5Dget_space(dataset); extendSpace(space, dim, extent); } inline void extendDataset(const hid::h5d &dataset, const std::vector<hsize_t> &dims) { if(H5Dset_extent(dataset, dims.data()) < 0) throw std::runtime_error("Failed to set extent on dataset"); } template<typename h5x> inline void extendDataset(const h5x & loc, std::string_view datasetRelativeName, const int dim, const hsize_t extent, std::optional<bool> linkExists = std::nullopt, const hid::h5p & dsetAccess = H5P_DEFAULT) { auto dataset = openLink<hid::h5d>(loc, datasetRelativeName, linkExists, dsetAccess); extendDataset(dataset, dim, extent); } template<typename h5x, typename DataType> void extendDataset(const h5x &loc, const DataType &data, std::string_view dsetPath) { #ifdef H5PP_EIGEN3 if constexpr(h5pp::type::sfinae::is_eigen_core_v<DataType>) { extendDataset(loc, dsetPath, 0, data.rows()); hid::h5d dataSet = openLink<hid::h5d>(loc, dsetPath); hid::h5s fileSpace = H5Dget_space(dataSet); int ndims = H5Sget_simple_extent_ndims(fileSpace); std::vector<hsize_t> dims(static_cast<size_t>(ndims)); H5Sget_simple_extent_dims(fileSpace, dims.data(), nullptr); H5Sclose(fileSpace); if(dims[1] < static_cast<hsize_t>(data.cols())) extendDataset(loc, dsetPath, 1, data.cols()); } else #endif { extendDataset(loc, dsetPath, 0, h5pp::util::getSize(data)); } } inline void extendDataset(DsetInfo &info, const std::vector<hsize_t> &appDimensions, size_t axis) { // We use this function to EXTEND the dataset to APPEND given data info.assertResizeReady(); int appRank = static_cast<int>(appDimensions.size()); if(H5Tis_variable_str(info.h5Type.value()) > 0) { // These are resized on the fly return; } else { // Sanity checks if(info.dsetRank.value() <= static_cast<int>(axis)) throw std::runtime_error(h5pp::format( "Could not append to dataset [{}] along axis {}: Dataset rank ({}) must be strictly larger than the given axis ({})", info.dsetPath.value(), axis, info.dsetRank.value(), axis)); if(info.dsetRank.value() < appRank) throw std::runtime_error(h5pp::format("Cannot append to dataset [{}] along axis {}: Dataset rank {} < appended rank {}", info.dsetPath.value(), axis, info.dsetRank.value(), appRank)); // If we have a dataset with dimensions ijkl and we want to append along j, say, then the remaining // ikl should be at least as large as the corresponding dimensions on the given data. for(size_t idx = 0; idx < appDimensions.size(); idx++) if(idx != axis and appDimensions[idx] > info.dsetDims.value()[idx]) throw std::runtime_error( h5pp::format("Could not append to dataset [{}] along axis {}: Dimension {} size mismatch: data {} | dset {}", info.dsetPath.value(), axis, idx, appDimensions, info.dsetDims.value())); // Compute the new dset dimension. Note that dataRank <= dsetRank, // For instance when we add a column to a matrix, the column may be an nx1 vector. // Therefore we embed the data dimensions in a (possibly) higher-dimensional space auto embeddedDims = std::vector<hsize_t>(static_cast<size_t>(info.dsetRank.value()), 1); std::copy(appDimensions.begin(), appDimensions.end(), embeddedDims.begin()); // In the example above, we get nx1 auto oldAxisSize = info.dsetDims.value()[axis]; // Will need this later when drawing the hyperspace auto newAxisSize = embeddedDims[axis]; // Will need this later when drawing the hyperspace auto newDsetDims = info.dsetDims.value(); newDsetDims[axis] = oldAxisSize + newAxisSize; // Set the new dimensions std::string oldInfoStr = info.string(h5pp::logger::logIf(1)); herr_t err = H5Dset_extent(info.h5Dset.value(), newDsetDims.data()); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to set extent {} on dataset [{}]", newDsetDims, info.dsetPath.value())); } // By default, all the space (old and new) is selected info.dsetDims = newDsetDims; info.h5Space = H5Dget_space(info.h5Dset->value()); // Needs to be refreshed after H5Dset_extent info.dsetByte = h5pp::hdf5::getBytesTotal(info.h5Dset.value(), info.h5Space, info.h5Type); info.dsetSize = h5pp::hdf5::getSize(info.h5Space.value()); info.dsetRank = h5pp::hdf5::getRank(info.h5Space.value()); // Now se select the space on the extended dataset where the given data will fit // Draw the target space on a hyperslab Hyperslab slab; slab.extent = embeddedDims; slab.offset = std::vector<hsize_t>(static_cast<size_t>(info.dsetRank.value()), 0); slab.offset.value()[axis] = oldAxisSize; h5pp::hdf5::selectHyperslab(info.h5Space.value(), slab); h5pp::logger::log->debug("Extended dataset \n \t old: {} \n \t new: {}", oldInfoStr, info.string(h5pp::logger::logIf(1))); } } inline void extendDataset(DsetInfo &dsetInfo, const DataInfo &dataInfo, size_t axis) { // We use this function to EXTEND the dataset to APPEND given data dataInfo.assertWriteReady(); extendDataset(dsetInfo, dataInfo.dataDims.value(), axis); } inline void resizeDataset(DsetInfo &info, const std::vector<hsize_t> &newDimensions, std::optional<h5pp::ResizePolicy> policy = std::nullopt) { if(info.resizePolicy == h5pp::ResizePolicy::DO_NOT_RESIZE) return; if(not policy) policy = info.resizePolicy; if(not policy and info.dsetSlab) policy = h5pp::ResizePolicy::INCREASE_ONLY; // A hyperslab selection on the dataset has been made. Let's not shrink! if(not policy) policy = h5pp::ResizePolicy::RESIZE_TO_FIT; if(policy == h5pp::ResizePolicy::DO_NOT_RESIZE) return; if(policy == h5pp::ResizePolicy::RESIZE_TO_FIT and info.dsetSlab){ bool outofbounds = false; for(size_t idx = 0; idx < newDimensions.size(); idx++){ if(info.dsetSlab->extent and newDimensions[idx] < info.dsetSlab->extent->at(idx)){ outofbounds = true; break;} if(info.dsetSlab->offset and newDimensions[idx] <= info.dsetSlab->offset->at(idx)){ outofbounds = true; break;} } if(outofbounds) h5pp::logger::log->warn("A hyperslab selection was made on the dataset [{}{}]. " "However, resize policy [RESIZE_TO_FIT] will resize this dataset to dimensions {}. " "This is likely an error.", info.dsetPath.value(),info.dsetSlab->string(),newDimensions); } if(info.h5Layout and info.h5Layout.value() != H5D_CHUNKED) switch(info.h5Layout.value()) { case H5D_COMPACT: throw std::runtime_error("Datasets with H5D_COMPACT layout cannot be resized"); case H5D_CONTIGUOUS: throw std::runtime_error("Datasets with H5D_CONTIGUOUS layout cannot be resized"); default: break; } if(not info.dsetPath) throw std::runtime_error("Could not resize dataset: Path undefined"); if(not info.h5Space) throw std::runtime_error(h5pp::format("Could not resize dataset [{}]: info.h5Space undefined", info.dsetPath.value())); if(not info.h5Type) throw std::runtime_error(h5pp::format("Could not resize dataset [{}]: info.h5Type undefined", info.dsetPath.value())); if(H5Sget_simple_extent_type(info.h5Space.value()) == H5S_SCALAR) return; // These are not supposed to be resized. Typically strings if(H5Tis_variable_str(info.h5Type.value()) > 0) return; // These are resized on the fly info.assertResizeReady(); // Return if there is no change compared to the current dimensions if(info.dsetDims.value() == newDimensions) return; // Compare ranks if(info.dsetDims->size() != newDimensions.size()) throw std::runtime_error( h5pp::format("Could not resize dataset [{}]: " "Rank mismatch: " "The given dimensions {} must have the same number of elements as the target dimensions {}", info.dsetPath.value(), info.dsetDims.value(), newDimensions)); if(policy == h5pp::ResizePolicy::INCREASE_ONLY) { bool allDimsAreSmaller = true; for(size_t idx = 0; idx < newDimensions.size(); idx++) if(newDimensions[idx] > info.dsetDims.value()[idx]) allDimsAreSmaller = false; if(allDimsAreSmaller) return; } std::string oldInfoStr = info.string(h5pp::logger::logIf(1)); // Chunked datasets can shrink and grow in any direction // Non-chunked datasets can't be resized at all for(size_t idx = 0; idx < newDimensions.size(); idx++) { if(newDimensions[idx] > info.dsetDimsMax.value()[idx]) throw std::runtime_error(h5pp::format( "Could not resize dataset [{}]: " "Dimension size error: " "The target dimensions {} are larger than the maximum dimensions {} for this dataset. " "Consider creating the dataset with larger maximum dimensions or use H5D_CHUNKED layout to enable unlimited resizing", info.dsetPath.value(), newDimensions, info.dsetDimsMax.value())); } herr_t err = H5Dset_extent(info.h5Dset.value(), newDimensions.data()); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format( "Failed to resize dataset [{}] from dimensions {} to {}", info.dsetPath.value(), info.dsetDims.value(), newDimensions)); } // By default, all the space (old and new) is selected info.dsetDims = newDimensions; info.h5Space = H5Dget_space(info.h5Dset->value()); // Needs to be refreshed after H5Dset_extent info.dsetByte = h5pp::hdf5::getBytesTotal(info.h5Dset.value(), info.h5Space, info.h5Type); info.dsetSize = h5pp::hdf5::getSize(info.h5Space.value()); h5pp::logger::log->debug("Resized dataset \n \t old: {} \n \t new: {}", oldInfoStr, info.string(h5pp::logger::logIf(1))); } inline void resizeDataset(DsetInfo &dsetInfo, const DataInfo &dataInfo) { // We use this function when writing to a dataset on file. // Then we RESIZE the dataset to FIT given data. // If there is a hyperslab selection on given data, we only need to take that into account. // The new dataset dimensions should be dataInfo.dataDims, unless dataInfo.dataSlab.extent exists, which has priority. // Note that the final dataset size is then determined by dsetInfo.resizePolicy dataInfo.assertWriteReady(); if(dataInfo.dataSlab and dataInfo.dataSlab->extent) resizeDataset(dsetInfo, dataInfo.dataSlab->extent.value()); else resizeDataset(dsetInfo, dataInfo.dataDims.value()); } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> inline void resizeData(DataType &data, const hid::h5s &space, const hid::h5t &type, size_t bytes) { // This function is used when reading data from file into memory. // It resizes the data so the space in memory can fit the data read from file. // Note that this resizes the data to fit the bounding box of the data selected in the fileSpace. // A selection of elements in memory space must occurr after calling this function. if constexpr(std::is_pointer_v<DataType> or std::is_array_v<DataType>) return; // h5pp never uses malloc if(bytes == 0) return; if(H5Tget_class(type) == H5T_STRING) { if constexpr(h5pp::type::sfinae::is_text_v<DataType>) // Minus one: String resize allocates the null-terminator automatically, and bytes is the number of characters including // null-terminator h5pp::util::resizeData(data, {static_cast<hsize_t>(bytes) - 1}); else if constexpr(h5pp::type::sfinae::has_text_v<DataType> and h5pp::type::sfinae::is_iterable_v<DataType>) { // We have a container such as std::vector<std::string> here, and the dataset may have multiple string elements auto size = getSizeSelected(space); h5pp::util::resizeData(data, {static_cast<hsize_t>(size)}); // In variable length arrays each string element is dynamically resized when read. // For fixed-size we can resize already. if(not H5Tis_variable_str(type)) { auto fixedStringSize = H5Tget_size(type) - 1; // Subtract null terminator for(auto &str : data) h5pp::util::resizeData(str, {static_cast<hsize_t>(fixedStringSize)}); } } else { throw std::runtime_error(h5pp::format("Could not resize given container for text data: Unrecognized type for text [{}]", h5pp::type::sfinae::type_name<DataType>())); } } else if(H5Sget_simple_extent_type(space) == H5S_SCALAR) h5pp::util::resizeData(data, {static_cast<hsize_t>(1)}); else { int rank = H5Sget_simple_extent_ndims(space); std::vector<hsize_t> extent(static_cast<size_t>(rank), 0); // This will have the bounding box containing the current selection H5S_sel_type select_type = H5Sget_select_type(space); if(select_type == H5S_sel_type::H5S_SEL_HYPERSLABS){ std::vector<hsize_t> start(static_cast<size_t>(rank), 0); std::vector<hsize_t> end(static_cast<size_t>(rank), 0); H5Sget_select_bounds(space,start.data(),end.data()); for(size_t idx = 0; idx < extent.size(); idx++) extent[idx] = std::max<hsize_t>(0,1 + end[idx] - start[idx]); }else{ H5Sget_simple_extent_dims(space, extent.data(), nullptr); } h5pp::util::resizeData(data, extent); if(bytes != h5pp::util::getBytesTotal(data)) h5pp::logger::log->debug( "Size mismatch after resize: data [{}] bytes | dset [{}] bytes ", h5pp::util::getBytesTotal(data), bytes); } } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> inline void resizeData(DataType &data, DataInfo & dataInfo, const DsetInfo &info) { if constexpr(std::is_pointer_v<DataType> or std::is_array_v<DataType>) return; // h5pp never uses malloc if(not info.h5Space) throw std::runtime_error(h5pp::format("Could not resize given data container: DsetInfo field [h5Space] is not defined")); if(not info.h5Type) throw std::runtime_error(h5pp::format("Could not resize given data container: DsetInfo field [h5Type] is not defined")); if(not info.dsetByte) throw std::runtime_error(h5pp::format("Could not resize given data container: DsetInfo field [dsetByte] is not defined")); auto oldDims = h5pp::util::getDimensions(data); // Store the old dimensions resizeData(data, info.h5Space.value(), info.h5Type.value(), info.dsetByte.value()); // Resize the container auto newDims = h5pp::util::getDimensions(data); if(oldDims != newDims){ // Update the metadata dataInfo.dataDims = h5pp::util::getDimensions(data); // Will fail if no dataDims passed on a pointer dataInfo.dataSize = h5pp::util::getSizeFromDimensions(dataInfo.dataDims.value()); dataInfo.dataRank = h5pp::util::getRankFromDimensions(dataInfo.dataDims.value()); dataInfo.dataByte = dataInfo.dataSize.value() * h5pp::util::getBytesPerElem<DataType>(); dataInfo.h5Space = h5pp::util::getMemSpace(dataInfo.dataSize.value(), dataInfo.dataDims.value()); // Apply hyperslab selection if there is any if(dataInfo.dataSlab) h5pp::hdf5::selectHyperslab(dataInfo.h5Space.value(), dataInfo.dataSlab.value()); } } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> inline void resizeData(DataType &data, DataInfo & dataInfo, const AttrInfo &attrInfo) { if constexpr(std::is_pointer_v<DataType> or std::is_array_v<DataType>) return; // h5pp never uses malloc if(not attrInfo.h5Space) throw std::runtime_error(h5pp::format("Could not resize given data container: AttrInfo field [h5Space] is not defined")); if(not attrInfo.h5Type) throw std::runtime_error(h5pp::format("Could not resize given data container: AttrInfo field [h5Type] is not defined")); if(not attrInfo.attrByte) throw std::runtime_error(h5pp::format("Could not resize given data container: AttrInfo field [attrByte] is not defined")); auto oldDims = h5pp::util::getDimensions(data); // Store the old dimensions resizeData(data, attrInfo.h5Space.value(), attrInfo.h5Type.value(), attrInfo.attrByte.value()); // Resize the container auto newDims = h5pp::util::getDimensions(data); if(oldDims != newDims){ // Update the metadata dataInfo.dataDims = h5pp::util::getDimensions(data); // Will fail if no dataDims passed on a pointer dataInfo.dataSize = h5pp::util::getSizeFromDimensions(dataInfo.dataDims.value()); dataInfo.dataRank = h5pp::util::getRankFromDimensions(dataInfo.dataDims.value()); dataInfo.dataByte = dataInfo.dataSize.value() * h5pp::util::getBytesPerElem<DataType>(); dataInfo.h5Space = h5pp::util::getMemSpace(dataInfo.dataSize.value(), dataInfo.dataDims.value()); // Apply hyperslab selection if there is any if(dataInfo.dataSlab) h5pp::hdf5::selectHyperslab(dataInfo.h5Space.value(), dataInfo.dataSlab.value()); } } inline std::string getSpaceString(const hid::h5s &space, bool enable = true) { std::string msg; if(not enable) return msg; msg.append(h5pp::format(" | size {}", H5Sget_simple_extent_npoints(space))); int rank = H5Sget_simple_extent_ndims(space); std::vector<hsize_t> dims(static_cast<size_t>(rank), 0); H5Sget_simple_extent_dims(space, dims.data(), nullptr); msg.append(h5pp::format(" | rank {}", rank)); msg.append(h5pp::format(" | dims {}", dims)); if(H5Sget_select_type(space) == H5S_SEL_HYPERSLABS) { Hyperslab slab(space); msg.append(slab.string()); } return msg; } inline void assertSpacesEqual(const hid::h5s &dataSpace, const hid::h5s &dsetSpace, const hid::h5t &h5Type) { if(H5Tis_variable_str(h5Type) or H5Tget_class(h5Type) == H5T_STRING) { // Strings are a special case, e.g. we can write multiple string elements into just one. // Also space is allocated on the fly during read by HDF5.. so size comparisons are useless here. return; } // if(h5_layout == H5D_CHUNKED) return; // Chunked layouts are allowed to differ htri_t equal = H5Sextent_equal(dataSpace, dsetSpace); if(equal == 0) { H5S_sel_type dataSelType = H5Sget_select_type(dataSpace); H5S_sel_type dsetSelType = H5Sget_select_type(dsetSpace); if(dataSelType == H5S_sel_type::H5S_SEL_HYPERSLABS or dsetSelType == H5S_sel_type::H5S_SEL_HYPERSLABS) { auto dataSelectedSize = getSizeSelected(dataSpace); auto dsetSelectedSize = getSizeSelected(dsetSpace); if(getSizeSelected(dataSpace) != getSizeSelected(dsetSpace)) { auto msg1 = getSpaceString(dataSpace); auto msg2 = getSpaceString(dsetSpace); throw std::runtime_error( h5pp::format("Hyperslab selections are not equal size. Selected elements: Data {} | Dataset {}" "\n\t data space \t {} \n\t dset space \t {}",dataSelectedSize,dsetSelectedSize, msg1, msg2)); } } else { // Compare the dimensions if(getDimensions(dataSpace) == getDimensions(dsetSpace)) return; if(getSize(dataSpace) != getSize(dsetSpace)) { auto msg1 = getSpaceString(dataSpace); auto msg2 = getSpaceString(dsetSpace); throw std::runtime_error( h5pp::format("Spaces are not equal size \n\t data space \t {} \n\t dset space \t {}", msg1, msg2)); } else if(getDimensions(dataSpace) != getDimensions(dsetSpace)) { h5pp::logger::log->debug("Spaces have different shape:"); h5pp::logger::log->debug(" data space {}", getSpaceString(dataSpace, h5pp::logger::logIf(1))); h5pp::logger::log->debug(" dset space {}", getSpaceString(dsetSpace, h5pp::logger::logIf(1))); } } } else if(equal < 0) { throw std::runtime_error("Failed to compare space extents"); } } namespace internal { inline long maxHits = -1; inline long maxDepth = -1; inline std::string searchKey; template<H5O_type_t ObjType, typename InfoType> inline herr_t matcher([[maybe_unused]] hid_t id, const char *name, [[maybe_unused]] const InfoType *info, void *opdata) { // If object type is the one requested, and name matches the search key, then add it to the match list (a vector<string>) // If the search depth is passed the depth specified, return immediately // Return 0 to continue searching // Return 1 to finish the search. Normally when we've reached max search hits. std::string_view nameView(name); if(maxDepth >= 0 and std::count(nameView.begin(), nameView.end(), '/') > maxDepth) return 0; auto matchList = reinterpret_cast<std::vector<std::string> *>(opdata); try { if constexpr(std::is_same_v<InfoType, H5O_info_t>) { if(info->type == ObjType or ObjType == H5O_TYPE_UNKNOWN) { if(searchKey.empty() or nameView.find(searchKey) != std::string::npos) matchList->push_back(name); } } else if constexpr(std::is_same_v<InfoType, H5L_info_t>) { /* clang-format off */ // It is expensive to use H5Oopen to peek H5O_info_t::type. // It is faster to populate H5O_info_t using H5O_info_t oInfo; #if defined(H5Oget_info_vers) && H5Oget_info_vers >= 2 H5Oget_info_by_name(id, name, &oInfo, H5O_INFO_BASIC, H5P_DEFAULT); #else H5Oget_info_by_name(id,name, &oInfo,H5P_DEFAULT); #endif /* clang-format on */ if(oInfo.type == ObjType or ObjType == H5O_TYPE_UNKNOWN) { if(searchKey.empty() or nameView.find(searchKey) != std::string::npos) matchList->push_back(name); } } else { if(searchKey.empty() or nameView.find(searchKey) != std::string::npos) { matchList->push_back(name); } } if(maxHits > 0 and static_cast<long>(matchList->size()) >= maxHits) return 1; else return 0; } catch(...) { throw std::logic_error(h5pp::format("Could not match object [{}] | loc_id [{}]", name, id)); } } template<H5O_type_t ObjType> [[nodiscard]] inline constexpr std::string_view getObjTypeName() { if constexpr(ObjType == H5O_type_t::H5O_TYPE_DATASET) return "dataset"; else if constexpr(ObjType == H5O_type_t::H5O_TYPE_GROUP) return "group"; else if constexpr(ObjType == H5O_type_t::H5O_TYPE_UNKNOWN) return "unknown"; else if constexpr(ObjType == H5O_type_t::H5O_TYPE_NAMED_DATATYPE) return "named datatype"; else if constexpr(ObjType == H5O_type_t::H5O_TYPE_NTYPES) return "ntypes"; else return "map"; // Only in HDF5 v 1.12 } template<H5O_type_t ObjType, typename h5x> herr_t H5L_custom_iterate_by_name(const h5x & loc, std::string_view root, std::vector<std::string> &matchList, const hid::h5p & linkAccess = H5P_DEFAULT) { H5Eset_auto(H5E_DEFAULT, nullptr, nullptr); // Silence the error we get from using index directly constexpr size_t maxsize = 512; char linkname[maxsize] = {}; H5O_info_t oInfo; /* clang-format off */ for(hsize_t idx = 0; idx < 100000000; idx++) { ssize_t namesize = H5Lget_name_by_idx(loc, util::safe_str(root).c_str(), H5_index_t::H5_INDEX_NAME, H5_iter_order_t::H5_ITER_NATIVE, idx,linkname,maxsize,linkAccess); if(namesize <= 0) { H5Eclear(H5E_DEFAULT); break; } std::string_view nameView(linkname, static_cast<size_t>(namesize)); if(ObjType == H5O_TYPE_UNKNOWN) { // Accept based on name if(searchKey.empty() or nameView.find(searchKey) != std::string::npos) matchList.emplace_back(linkname); if(maxHits > 0 and static_cast<long>(matchList.size()) >= maxHits) return 0; } else { // Name is not enough to establish a match. Check type. #if defined(H5Oget_info_by_idx_vers) && H5Oget_info_by_idx_vers >= 2 herr_t res = H5Oget_info_by_idx(loc, util::safe_str(root).c_str(), H5_index_t::H5_INDEX_NAME, H5_iter_order_t::H5_ITER_NATIVE, idx, &oInfo, H5O_INFO_BASIC,linkAccess ); #else herr_t res = H5Oget_info_by_idx(loc, util::safe_str(root).c_str(), H5_index_t::H5_INDEX_NAME, H5_iter_order_t::H5_ITER_NATIVE, idx, &oInfo, linkAccess ); #endif if(res < 0) { H5Eclear(H5E_DEFAULT); break; } if(oInfo.type == ObjType and (searchKey.empty() or nameView.find(searchKey) != std::string::npos)) matchList.emplace_back(linkname); if(maxHits > 0 and static_cast<long>(matchList.size()) >= maxHits) return 0; } } /* clang-format on */ return 0; } template<H5O_type_t ObjType, typename h5x> inline herr_t visit_by_name(const h5x & loc, std::string_view root, std::vector<std::string> &matchList, const hid::h5p & linkAccess = H5P_DEFAULT) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x>, "Template function [h5pp::hdf5::visit_by_name(const h5x & loc, ...)] requires type h5x to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); if(internal::maxDepth == 0) // Faster when we don't need to iterate recursively return H5L_custom_iterate_by_name<ObjType>(loc, root, matchList, linkAccess); // return H5Literate_by_name(loc, // util::safe_str(root).c_str(), // H5_index_t::H5_INDEX_NAME, // H5_iter_order_t::H5_ITER_NATIVE, // nullptr, // internal::matcher<ObjType>, // &matchList, // linkAccess); #if defined(H5Ovisit_by_name_vers) && H5Ovisit_by_name_vers >= 2 return H5Ovisit_by_name(loc, util::safe_str(root).c_str(), H5_INDEX_NAME, H5_ITER_NATIVE, internal::matcher<ObjType>, &matchList, H5O_INFO_BASIC, linkAccess); #else return H5Ovisit_by_name( loc, util::safe_str(root).c_str(), H5_INDEX_NAME, H5_ITER_NATIVE, internal::matcher<ObjType>, &matchList, linkAccess); #endif } } template<H5O_type_t ObjType, typename h5x> [[nodiscard]] inline std::vector<std::string> findLinks(const h5x & loc, std::string_view searchKey = "", std::string_view searchRoot = "/", long maxHits = -1, long maxDepth = -1, const hid::h5p & linkAccess = H5P_DEFAULT) { h5pp::logger::log->trace("Search key: {} | target type: {} | search root: {} | max search hits {}", searchKey, internal::getObjTypeName<ObjType>(), searchRoot, maxHits); std::vector<std::string> matchList; internal::maxHits = maxHits; internal::maxDepth = maxDepth; internal::searchKey = searchKey; herr_t err = internal::visit_by_name<ObjType>(loc, searchRoot, matchList, linkAccess); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format( "Failed to find links of type [{}] while iterating from root [{}]", internal::getObjTypeName<ObjType>(), searchRoot)); } return matchList; } template<H5O_type_t ObjType, typename h5x> [[nodiscard]] inline std::vector<std::string> getContentsOfLink(const h5x &loc, std::string_view linkPath, long maxDepth = 1, const hid::h5p &linkAccess = H5P_DEFAULT) { std::vector<std::string> contents; internal::maxHits = -1; internal::maxDepth = maxDepth; internal::searchKey.clear(); herr_t err = internal::visit_by_name<ObjType>(loc, linkPath, contents, linkAccess); if(err < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Failed to iterate link [{}] of type [{}]", linkPath, internal::getObjTypeName<ObjType>())); } return contents; } inline void createDataset(h5pp::DsetInfo &dsetInfo, const PropertyLists &plists = PropertyLists()) { // Here we create, the dataset id and set its properties before writing data to it. dsetInfo.assertCreateReady(); if(dsetInfo.dsetExists and dsetInfo.dsetExists.value()) { h5pp::logger::log->trace("No need to create dataset [{}]: exists already", dsetInfo.dsetPath.value()); return; } h5pp::logger::log->debug("Creating dataset {}", dsetInfo.string(h5pp::logger::logIf(1))); hid_t dsetId = H5Dcreate(dsetInfo.getLocId(), util::safe_str(dsetInfo.dsetPath.value()).c_str(), dsetInfo.h5Type.value(), dsetInfo.h5Space.value(), plists.linkCreate, dsetInfo.h5PlistDsetCreate.value(), dsetInfo.h5PlistDsetAccess.value()); if(dsetId <= 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to create dataset {}", dsetInfo.string())); } dsetInfo.h5Dset = dsetId; dsetInfo.dsetExists = true; } inline void createAttribute(AttrInfo &attrInfo) { // Here we create, or register, the attribute id and set its properties before writing data to it. attrInfo.assertCreateReady(); if(attrInfo.attrExists and attrInfo.attrExists.value()) { h5pp::logger::log->trace( "No need to create attribute [{}] in link [{}]: exists already", attrInfo.attrName.value(), attrInfo.linkPath.value()); return; } h5pp::logger::log->trace("Creating attribute {}", attrInfo.string(h5pp::logger::logIf(0))); hid_t attrId = H5Acreate(attrInfo.h5Link.value(), util::safe_str(attrInfo.attrName.value()).c_str(), attrInfo.h5Type.value(), attrInfo.h5Space.value(), attrInfo.h5PlistAttrCreate.value(), attrInfo.h5PlistAttrAccess.value()); if(attrId <= 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Failed to create attribute [{}] for link [{}]", attrInfo.attrName.value(), attrInfo.linkPath.value())); } attrInfo.h5Attr = attrId; attrInfo.attrExists = true; } template<typename DataType> [[nodiscard]] std::vector<const char *> getCharPtrVector(const DataType &data) { std::vector<const char *> sv; if constexpr(h5pp::type::sfinae::is_text_v<DataType> and h5pp::type::sfinae::has_data_v<DataType>) // Takes care of std::string sv.push_back(data.data()); else if constexpr(h5pp::type::sfinae::is_text_v<DataType>) // Takes care of char pointers and arrays sv.push_back(data); else if constexpr(h5pp::type::sfinae::is_iterable_v<DataType>) // Takes care of containers with text for(auto &elem : data) { if constexpr(h5pp::type::sfinae::is_text_v<decltype(elem)> and h5pp::type::sfinae::has_data_v<decltype(elem)>) // Takes care of containers with std::string sv.push_back(elem.data()); else if constexpr(h5pp::type::sfinae::is_text_v<decltype(elem)>) // Takes care of containers of char pointers and arrays sv.push_back(elem); else sv.push_back(&elem); // Takes care of other things? } else throw std::runtime_error( h5pp::format("Failed to get char pointer of datatype [{}]", h5pp::type::sfinae::type_name<DataType>())); return sv; } template<typename DataType> void writeDataset(const DataType & data, const DataInfo & dataInfo, const DsetInfo & dsetInfo, const PropertyLists &plists = PropertyLists()) { #ifdef H5PP_EIGEN3 if constexpr(h5pp::type::sfinae::is_eigen_colmajor_v<DataType> and not h5pp::type::sfinae::is_eigen_1d_v<DataType>) { h5pp::logger::log->debug("Converting data to row-major storage order"); const auto tempRowm = eigen::to_RowMajor(data); // Convert to Row Major first; h5pp::hdf5::writeDataset(tempRowm, dataInfo, dsetInfo, plists); return; } #endif dsetInfo.assertWriteReady(); dataInfo.assertWriteReady(); h5pp::logger::log->debug("Writing from memory {}", dataInfo.string(h5pp::logger::logIf(1))); h5pp::logger::log->debug("Writing into dataset {}", dsetInfo.string(h5pp::logger::logIf(1))); h5pp::hdf5::assertWriteBufferIsLargeEnough(data, dataInfo.h5Space.value(), dsetInfo.h5Type.value()); h5pp::hdf5::assertBytesPerElemMatch<DataType>(dsetInfo.h5Type.value()); h5pp::hdf5::assertSpacesEqual(dataInfo.h5Space.value(), dsetInfo.h5Space.value(), dsetInfo.h5Type.value()); herr_t retval = 0; // Get the memory address to the data buffer auto dataPtr = h5pp::util::getVoidPointer<const void *>(data); if constexpr(h5pp::type::sfinae::is_text_v<DataType> or h5pp::type::sfinae::has_text_v<DataType>) { auto vec = getCharPtrVector(data); // When H5T_VARIABLE, this function expects [const char **], which is what we get from vec.data() if(H5Tis_variable_str(dsetInfo.h5Type->value()) > 0) retval = H5Dwrite(dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), dataInfo.h5Space.value(), dsetInfo.h5Space.value(), plists.dsetXfer, vec.data()); else { if(vec.size() == 1) { retval = H5Dwrite(dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), dataInfo.h5Space.value(), dsetInfo.h5Space.value(), plists.dsetXfer, *vec.data()); } else { if constexpr(h5pp::type::sfinae::has_text_v<DataType> and h5pp::type::sfinae::is_iterable_v<DataType>) { // We have a fixed-size string array now. We have to copy the strings to a contiguous array. // vdata already contains the pointer to each string, and bytes should be the size of the whole array // including null terminators. so std::string strContiguous; size_t bytesPerStr = H5Tget_size(dsetInfo.h5Type.value()); // Includes null term strContiguous.resize(bytesPerStr * vec.size()); for(size_t i = 0; i < vec.size(); i++) { auto start_src = strContiguous.data() + static_cast<long>(i * bytesPerStr); // Construct a view of the null-terminated character string, not including the null character. auto view = std::string_view(vec[i]); // view.size() will not include null term here! std::copy_n(std::begin(view), std::min(view.size(),bytesPerStr - 1),start_src); // Do not copy null character } retval = H5Dwrite(dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), dataInfo.h5Space.value(), dsetInfo.h5Space.value(), plists.dsetXfer, strContiguous.data()); } else { // Assume contigous array and hope for the best retval = H5Dwrite(dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), dataInfo.h5Space.value(), dsetInfo.h5Space.value(), plists.dsetXfer, dataPtr); } } } } else retval = H5Dwrite(dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), dataInfo.h5Space.value(), dsetInfo.h5Space.value(), plists.dsetXfer, dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Failed to write into dataset \n\t {} \n from memory \n\t {}", dsetInfo.string(), dataInfo.string())); } } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> void readDataset(DataType &data, const DataInfo &dataInfo, const DsetInfo &dsetInfo, const PropertyLists &plists = PropertyLists()) { // Transpose the data container before reading #ifdef H5PP_EIGEN3 if constexpr(h5pp::type::sfinae::is_eigen_colmajor_v<DataType> and not h5pp::type::sfinae::is_eigen_1d_v<DataType>) { h5pp::logger::log->debug("Converting data to row-major storage order"); auto tempRowMajor = eigen::to_RowMajor(data); // Convert to Row Major first; h5pp::hdf5::readDataset(tempRowMajor, dataInfo, dsetInfo, plists); data = eigen::to_ColMajor(tempRowMajor); return; } #endif dsetInfo.assertReadReady(); dataInfo.assertReadReady(); h5pp::logger::log->debug("Reading into memory {}", dataInfo.string(h5pp::logger::logIf(1))); h5pp::logger::log->debug("Reading from dataset {}", dsetInfo.string(h5pp::logger::logIf(1))); h5pp::hdf5::assertReadTypeIsLargeEnough<DataType>(dsetInfo.h5Type.value()); h5pp::hdf5::assertReadSpaceIsLargeEnough(data, dataInfo.h5Space.value(), dsetInfo.h5Type.value()); h5pp::hdf5::assertSpacesEqual(dataInfo.h5Space.value(), dsetInfo.h5Space.value(), dsetInfo.h5Type.value()); // h5pp::hdf5::assertBytesPerElemMatch<DataType>(dsetInfo.h5Type.value()); herr_t retval = 0; // Get the memory address to the data buffer [[maybe_unused]] auto dataPtr = h5pp::util::getVoidPointer<void *>(data); // Read the data if constexpr(h5pp::type::sfinae::is_text_v<DataType> or h5pp::type::sfinae::has_text_v<DataType>) { // When H5T_VARIABLE, // 1) H5Dread expects [const char **], which is what we get from vdata.data(). // 2) H5Dread allocates memory on each const char * which has to be reclaimed later. // Otherwise, // 1) H5Dread expects [char *], i.e. *vdata.data() // 2) Allocation on char * must be done before reading. if(H5Tis_variable_str(dsetInfo.h5Type.value())) { auto size = H5Sget_select_npoints(dsetInfo.h5Space.value()); std::vector<char *> vdata(static_cast<size_t>(size)); // Allocate pointers for "size" number of strings // HDF5 allocates space for each string in vdata retval = H5Dread( dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), H5S_ALL, dsetInfo.h5Space.value(), plists.dsetXfer, vdata.data()); // Now vdata contains the whole dataset and we need to put the data into the user-given container. if constexpr(std::is_same_v<DataType, std::string>) { // A vector of strings (vdata) can be put into a single string (data) with entries separated by new-lines data.clear(); for(size_t i = 0; i < vdata.size(); i++) { if(!vdata.empty() and vdata[i] != nullptr) data.append(vdata[i]); if(i < vdata.size() - 1) data.append("\n"); } } else if constexpr(h5pp::type::sfinae::is_container_of_v<DataType, std::string> and h5pp::type::sfinae::has_resize_v<DataType>) { data.clear(); data.resize(vdata.size()); for(size_t i = 0; i < data.size(); i++) data[i] = std::string(vdata[i]); } else { throw std::runtime_error( "To read text-data, please use std::string or a container of std::string like std::vector<std::string>"); } // Free memory allocated by HDF5 H5Dvlen_reclaim(dsetInfo.h5Type.value(), dsetInfo.h5Space.value(), plists.dsetXfer, vdata.data()); } else { // All the elements in the dataset have the same string size // The whole dataset is read into a contiguous block of memory. size_t bytesPerString = H5Tget_size(dsetInfo.h5Type.value()); // Includes null terminator auto size = H5Sget_select_npoints(dsetInfo.h5Space.value()); std::string fdata; fdata.resize(static_cast<size_t>(size) * bytesPerString); retval = H5Dread(dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), dataInfo.h5Space.value(), dsetInfo.h5Space.value(), plists.dsetXfer, fdata.data()); // Now fdata contains the whole dataset and we need to put the data into the user-given container. if constexpr(std::is_same_v<DataType, std::string>) { // A vector of strings (fdata) can be put into a single string (data) with entries separated by new-lines data.clear(); for(size_t i = 0; i < static_cast<size_t>(size); i++) { data.append(fdata.substr(i * bytesPerString, bytesPerString)); if(data.size() < fdata.size() - 1) data.append("\n"); } data.erase(std::find(data.begin(), data.end(), '\0'), data.end()); // Prune all but the last null terminator } else if constexpr(h5pp::type::sfinae::is_container_of_v<DataType, std::string> and h5pp::type::sfinae::has_resize_v<DataType>) { if(data.size() != static_cast<size_t>(size)) throw std::runtime_error(h5pp::format( "Given container of strings has the wrong size: dset size {} | container size {}", size, data.size())); for(size_t i = 0; i < static_cast<size_t>(size); i++) { // Each data[i] has type std::string, so we can use the std::string constructor to copy data data[i] = std::string(fdata.data()+i*bytesPerString,bytesPerString); // Prune away all null terminators except the last one data[i].erase(std::find(data[i].begin(), data[i].end(), '\0'), data[i].end()); } } else { throw std::runtime_error( "To read text-data, please use std::string or a container of std::string like std::vector<std::string>"); } } } else retval = H5Dread(dsetInfo.h5Dset.value(), dsetInfo.h5Type.value(), dataInfo.h5Space.value(), dsetInfo.h5Space.value(), plists.dsetXfer, dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Failed to read from dataset \n\t {} \n into memory \n\t {}", dsetInfo.string(), dataInfo.string())); } } template<typename DataType> void writeAttribute(const DataType &data, const DataInfo &dataInfo, const AttrInfo &attrInfo) { #ifdef H5PP_EIGEN3 if constexpr(h5pp::type::sfinae::is_eigen_colmajor_v<DataType> and not h5pp::type::sfinae::is_eigen_1d_v<DataType>) { h5pp::logger::log->debug("Converting attribute data to row-major storage order"); const auto tempRowm = eigen::to_RowMajor(data); // Convert to Row Major first; h5pp::hdf5::writeAttribute(tempRowm, dataInfo, attrInfo); return; } #endif dataInfo.assertWriteReady(); attrInfo.assertWriteReady(); h5pp::logger::log->debug("Writing from memory {}", dataInfo.string(h5pp::logger::logIf(1))); h5pp::logger::log->debug("Writing into attribute {}", attrInfo.string(h5pp::logger::logIf(1))); h5pp::hdf5::assertWriteBufferIsLargeEnough(data, dataInfo.h5Space.value(), attrInfo.h5Type.value()); h5pp::hdf5::assertBytesPerElemMatch<DataType>(attrInfo.h5Type.value()); h5pp::hdf5::assertSpacesEqual(dataInfo.h5Space.value(), attrInfo.h5Space.value(), attrInfo.h5Type.value()); herr_t retval = 0; // Get the memory address to the data buffer [[maybe_unused]] auto dataPtr = h5pp::util::getVoidPointer<const void *>(data); if constexpr(h5pp::type::sfinae::is_text_v<DataType> or h5pp::type::sfinae::has_text_v<DataType>) { auto vec = getCharPtrVector(data); if(H5Tis_variable_str(attrInfo.h5Type->value()) > 0) retval = H5Awrite(attrInfo.h5Attr.value(), attrInfo.h5Type.value(), vec.data()); else retval = H5Awrite(attrInfo.h5Attr.value(), attrInfo.h5Type.value(), *vec.data()); } else retval = H5Awrite(attrInfo.h5Attr.value(), attrInfo.h5Type.value(), dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Failed to write into attribute \n\t {} \n from memory \n\t {}", attrInfo.string(), dataInfo.string())); } } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> void readAttribute(DataType &data, const DataInfo &dataInfo, const AttrInfo &attrInfo) { // Transpose the data container before reading #ifdef H5PP_EIGEN3 if constexpr(h5pp::type::sfinae::is_eigen_colmajor_v<DataType> and not h5pp::type::sfinae::is_eigen_1d_v<DataType>) { h5pp::logger::log->debug("Converting data to row-major storage order"); auto tempRowMajor = eigen::to_RowMajor(data); // Convert to Row Major first; h5pp::hdf5::readAttribute(tempRowMajor, dataInfo, attrInfo); data = eigen::to_ColMajor(tempRowMajor); return; } #endif dataInfo.assertReadReady(); attrInfo.assertReadReady(); h5pp::logger::log->debug("Reading into memory {}", dataInfo.string(h5pp::logger::logIf(1))); h5pp::logger::log->debug("Reading from file {}", attrInfo.string(h5pp::logger::logIf(1))); h5pp::hdf5::assertReadSpaceIsLargeEnough(data, dataInfo.h5Space.value(), attrInfo.h5Type.value()); h5pp::hdf5::assertBytesPerElemMatch<DataType>(attrInfo.h5Type.value()); h5pp::hdf5::assertSpacesEqual(dataInfo.h5Space.value(), attrInfo.h5Space.value(), attrInfo.h5Type.value()); herr_t retval = 0; // Get the memory address to the data buffer [[maybe_unused]] auto dataPtr = h5pp::util::getVoidPointer<void *>(data); // Read the data if constexpr(h5pp::type::sfinae::is_text_v<DataType> or h5pp::type::sfinae::has_text_v<DataType>) { // When H5T_VARIABLE, // 1) H5Aread expects [const char **], which is what we get from vdata.data(). // 2) H5Aread allocates memory on each const char * which has to be reclaimed later. // Otherwise, // 1) H5Aread expects [char *], i.e. *vdata.data() // 2) Allocation on char * must be done before reading. if(H5Tis_variable_str(attrInfo.h5Type.value()) > 0) { auto size = H5Sget_select_npoints(attrInfo.h5Space.value()); std::vector<char *> vdata(static_cast<size_t>(size)); // Allocate pointers for "size" number of strings // HDF5 allocates space for each string retval = H5Aread(attrInfo.h5Attr.value(), attrInfo.h5Type.value(), vdata.data()); // Now vdata contains the whole dataset and we need to put the data into the user-given container. if constexpr(std::is_same_v<DataType, std::string>) { // A vector of strings (vdata) can be put into a single string (data) with entries separated by new-lines data.clear(); for(size_t i = 0; i < vdata.size(); i++) { if(!vdata.empty() and vdata[i] != nullptr) data.append(vdata[i]); if(i < vdata.size() - 1) data.append("\n"); } } else if constexpr(h5pp::type::sfinae::is_container_of_v<DataType, std::string> and h5pp::type::sfinae::has_resize_v<DataType>) { data.clear(); data.resize(vdata.size()); for(size_t i = 0; i < data.size(); i++) data[i] = std::string(vdata[i]); } else { throw std::runtime_error( "To read text-data, please use std::string or a container of std::string like std::vector<std::string>"); } // Free memory allocated by HDF5 H5Dvlen_reclaim(attrInfo.h5Type.value(), attrInfo.h5Space.value(), H5P_DEFAULT, vdata.data()); } else { // All the elements in the dataset have the same string size // The whole dataset is read into a contiguous block of memory. size_t bytesPerString = H5Tget_size(attrInfo.h5Type.value()); // Includes null terminator auto size = H5Sget_select_npoints(attrInfo.h5Space.value()); std::string fdata; fdata.resize(static_cast<size_t>(size) * bytesPerString); retval = H5Aread(attrInfo.h5Attr.value(), attrInfo.h5Type.value(), fdata.data()); // Now fdata contains the whole dataset and we need to put the data into the user-given container. if constexpr(std::is_same_v<DataType, std::string>) { // A vector of strings (fdata) can be put into a single string (data) with entries separated by new-lines data.clear(); for(size_t i = 0; i < static_cast<size_t>(size); i++) { data.append(fdata.substr(i * bytesPerString, bytesPerString)); if(data.size() < fdata.size() - 1) data.append("\n"); } } else if constexpr(h5pp::type::sfinae::is_container_of_v<DataType, std::string> and h5pp::type::sfinae::has_resize_v<DataType>) { data.clear(); data.resize(static_cast<size_t>(size)); for(size_t i = 0; i < static_cast<size_t>(size); i++) data[i] = fdata.substr(i * bytesPerString, bytesPerString); } else { throw std::runtime_error( "To read text-data, please use std::string or a container of std::string like std::vector<std::string>"); } } if constexpr(std::is_same_v<DataType, std::string>) { data.erase(std::find(data.begin(), data.end(), '\0'), data.end()); // Prune all but the last null terminator } } else retval = H5Aread(attrInfo.h5Attr.value(), attrInfo.h5Type.value(), dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Failed to read from attribute \n\t {} \n into memory \n\t {}", attrInfo.string(), dataInfo.string())); } } [[nodiscard]] inline bool fileIsValid(const fs::path &filePath) { return fs::exists(filePath) and H5Fis_hdf5(filePath.string().c_str()) > 0; } [[nodiscard]] inline fs::path getAvailableFileName(const fs::path &filePath) { int i = 1; fs::path newFileName = filePath; while(fs::exists(newFileName)) { newFileName.replace_filename(filePath.stem().string() + "-" + std::to_string(i++) + filePath.extension().string()); } return newFileName; } [[nodiscard]] inline fs::path getBackupFileName(const fs::path &filePath) { int i = 1; fs::path newFilePath = filePath; while(fs::exists(newFilePath)) { newFilePath.replace_extension(filePath.extension().string() + ".bak_" + std::to_string(i++)); } return newFilePath; } [[nodiscard]] inline h5pp::FilePermission convertFileAccessFlags(unsigned int H5F_ACC_FLAGS) { h5pp::FilePermission permission = h5pp::FilePermission::RENAME; if((H5F_ACC_FLAGS & (H5F_ACC_TRUNC | H5F_ACC_EXCL)) == (H5F_ACC_TRUNC | H5F_ACC_EXCL)) throw std::runtime_error("File access modes H5F_ACC_EXCL and H5F_ACC_TRUNC are mutually exclusive"); if((H5F_ACC_FLAGS & H5F_ACC_RDONLY) == H5F_ACC_RDONLY) permission = h5pp::FilePermission::READONLY; if((H5F_ACC_FLAGS & H5F_ACC_RDWR) == H5F_ACC_RDWR) permission = h5pp::FilePermission::READWRITE; if((H5F_ACC_FLAGS & H5F_ACC_EXCL) == H5F_ACC_EXCL) permission = h5pp::FilePermission::COLLISION_FAIL; if((H5F_ACC_FLAGS & H5F_ACC_TRUNC) == H5F_ACC_TRUNC) permission = h5pp::FilePermission::REPLACE; return permission; } [[nodiscard]] inline unsigned int convertFileAccessFlags(h5pp::FilePermission permission) { unsigned int H5F_ACC_MODE = H5F_ACC_RDONLY; if(permission == h5pp::FilePermission::COLLISION_FAIL) H5F_ACC_MODE |= H5F_ACC_EXCL; if(permission == h5pp::FilePermission::REPLACE) H5F_ACC_MODE |= H5F_ACC_TRUNC; if(permission == h5pp::FilePermission::RENAME) H5F_ACC_MODE |= H5F_ACC_TRUNC; if(permission == h5pp::FilePermission::READONLY) H5F_ACC_MODE |= H5F_ACC_RDONLY; if(permission == h5pp::FilePermission::READWRITE) H5F_ACC_MODE |= H5F_ACC_RDWR; return H5F_ACC_MODE; } [[nodiscard]] inline fs::path createFile(const h5pp::fs::path &filePath_, const h5pp::FilePermission &permission, const PropertyLists &plists = PropertyLists()) { fs::path filePath = fs::absolute(filePath_); fs::path fileName = filePath_.filename(); if(fs::exists(filePath)) { if(not fileIsValid(filePath)) h5pp::logger::log->debug("Pre-existing file may be corrupted [{}]", filePath.string()); if(permission == h5pp::FilePermission::READONLY) return filePath; if(permission == h5pp::FilePermission::COLLISION_FAIL) throw std::runtime_error(h5pp::format("[COLLISION_FAIL]: Previous file exists with the same name [{}]", filePath.string())); if(permission == h5pp::FilePermission::RENAME) { auto newFilePath = getAvailableFileName(filePath); h5pp::logger::log->info("[RENAME]: Previous file exists. Choosing a new file name [{}] --> [{}]", filePath.filename().string(), newFilePath.filename().string()); filePath = newFilePath; fileName = filePath.filename(); } if(permission == h5pp::FilePermission::READWRITE) return filePath; if(permission == h5pp::FilePermission::BACKUP) { auto backupPath = getBackupFileName(filePath); h5pp::logger::log->info( "[BACKUP]: Backing up existing file [{}] --> [{}]", filePath.filename().string(), backupPath.filename().string()); fs::rename(filePath, backupPath); } if(permission == h5pp::FilePermission::REPLACE) {} // Do nothing } else { if(permission == h5pp::FilePermission::READONLY) throw std::runtime_error(h5pp::format("[READONLY]: File does not exist [{}]", filePath.string())); if(permission == h5pp::FilePermission::COLLISION_FAIL) {} // Do nothing if(permission == h5pp::FilePermission::RENAME) {} // Do nothing if(permission == h5pp::FilePermission::READWRITE) {} // Do nothing; if(permission == h5pp::FilePermission::BACKUP) {} // Do nothing if(permission == h5pp::FilePermission::REPLACE) {} // Do nothing try { if(fs::create_directories(filePath.parent_path())) h5pp::logger::log->trace("Created directory: {}", filePath.parent_path().string()); else h5pp::logger::log->trace("Directory already exists: {}", filePath.parent_path().string()); } catch(std::exception &ex) { throw std::runtime_error(h5pp::format("Failed to create directory: {}", ex.what())); } } // One last sanity check if(permission == h5pp::FilePermission::READONLY) throw std::logic_error("About to create/truncate a file even though READONLY was specified. This is a programming error!"); // Go ahead hid_t file = H5Fcreate(filePath.string().c_str(), H5F_ACC_TRUNC, plists.fileCreate, plists.fileAccess); if(file < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to create file [{}]\n\t\t Check that you have the right permissions and that the " "file is not locked by another program", filePath.string())); } H5Fclose(file); return fs::canonical(filePath); } inline void createTable(TableInfo &info, const PropertyLists &plists = PropertyLists()) { info.assertCreateReady(); h5pp::logger::log->debug("Creating table [{}] | num fields {} | record size {} bytes", info.tablePath.value(), info.numFields.value(), info.recordBytes.value()); if(not info.tableExists) info.tableExists = checkIfLinkExists(info.getLocId(), info.tablePath.value(), plists.linkAccess); if(info.tableExists.value()) { h5pp::logger::log->debug("Table [{}] already exists", info.tablePath.value()); return; } createGroup(info.getLocId(), info.tableGroupName.value(), std::nullopt, plists); // The existence of the group has to be checked, unfortunately // Copy member type data to a vector of hid_t for compatibility. // Note that there is no need to close thes hid_t since info will close them. std::vector<hid_t> fieldTypesHidT(info.fieldTypes.value().begin(), info.fieldTypes.value().end()); // Copy member name data to a vector of const char * for compatibility std::vector<const char *> fieldNames; for(auto &name : info.fieldNames.value()) fieldNames.push_back(name.c_str()); int compression = info.compressionLevel.value() == 0 ? 0 : 1; // Only true/false (1/0). Is set to level 6 in HDF5 sources herr_t retval = H5TBmake_table(util::safe_str(info.tableTitle.value()).c_str(), info.getLocId(), util::safe_str(info.tablePath.value()).c_str(), info.numFields.value(), info.numRecords.value(), info.recordBytes.value(), fieldNames.data(), info.fieldOffsets.value().data(), fieldTypesHidT.data(), info.chunkSize.value(), nullptr, compression, nullptr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Could not create table [{}]", info.tablePath.value())); } h5pp::logger::log->trace("Successfully created table [{}]", info.tablePath.value()); info.tableExists = true; } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> inline void readTableRecords(DataType & data, const TableInfo & info, std::optional<size_t> startIdx = std::nullopt, std::optional<size_t> numReadRecords = std::nullopt) { /* * This function replaces H5TBread_records() and avoids creating expensive temporaries for the dataset id and type id for the * compound table type. * */ // If none of startIdx or numReadRecords are given: // If data resizeable: startIdx = 0, numReadRecords = totalRecords // If data not resizeable: startIdx = last record, numReadRecords = 1. // If startIdx given but numReadRecords is not: // If data resizeable -> read from startIdx to the end // If data not resizeable -> read a single record starting from startIdx // If numReadRecords given but startIdx is not -> read the last numReadRecords records info.assertReadReady(); if constexpr(std::is_same_v<DataType, std::vector<std::byte>>) { if(not numReadRecords) throw std::runtime_error("Optional argument [numReadRecords] is required when reading std::vector<std::byte> from table"); } if(not startIdx and not numReadRecords) { if constexpr(h5pp::type::sfinae::has_resize_v<DataType>) { startIdx = 0; numReadRecords = info.numRecords.value(); } else { startIdx = info.numRecords.value() - 1; numReadRecords = 1; } } else if(startIdx and not numReadRecords) { if(startIdx.value() > info.numRecords.value() - 1) throw std::runtime_error(h5pp::format("Invalid start index {} for table [{}] | total records {}", startIdx.value(), info.tablePath.value(), info.numRecords.value())); if constexpr(h5pp::type::sfinae::has_resize_v<DataType>) { numReadRecords = info.numRecords.value() - startIdx.value(); } else { numReadRecords = 1; } } else if(numReadRecords and not startIdx) { if(numReadRecords.value() > info.numRecords.value()) throw std::logic_error(h5pp::format("Cannot read {} records from table [{}] which only has {} records", numReadRecords.value(), info.tablePath.value(), info.numRecords.value())); startIdx = info.numRecords.value() - numReadRecords.value(); } // Sanity check if(numReadRecords.value() > info.numRecords.value()) throw std::logic_error(h5pp::format("Cannot read {} records from table [{}] which only has {} records", numReadRecords.value(), info.tablePath.value(), info.numRecords.value())); if(startIdx.value() + numReadRecords.value() > info.numRecords.value()) throw std::logic_error(h5pp::format("Cannot read {} records starting from index {} from table [{}] which only has {} records", numReadRecords.value(), startIdx.value(), info.tablePath.value(), info.numRecords.value())); h5pp::logger::log->debug("Reading table [{}] | read from record {} | records to read {} | total records {} | record size {} bytes", info.tablePath.value(), startIdx.value(), numReadRecords.value(), info.numRecords.value(), info.recordBytes.value()); if constexpr(not std::is_same_v<DataType, std::vector<std::byte>>) { // Make sure the given container and the registered table record type have the same size. // If there is a mismatch here it can cause horrible bugs/segfaults size_t dataSize = 0; if constexpr(h5pp::type::sfinae::has_value_type_v<DataType>) dataSize = sizeof(typename DataType::value_type); else if constexpr(h5pp::type::sfinae::has_data_v<DataType> and h5pp::type::sfinae::is_iterable_v<DataType>) dataSize = sizeof(&data.data()); else dataSize = sizeof(DataType); if(dataSize != info.recordBytes.value()) throw std::runtime_error(h5pp::format("Could not read from table [{}]: " "Size mismatch: " "Given data container size is {} bytes per element | " "Table is {} bytes per record", info.tablePath.value(), dataSize, info.recordBytes.value())); h5pp::util::resizeData(data, {numReadRecords.value()}); } // Last sanity check. If there are no records to read, just return; if(numReadRecords.value() == 0) return; if(info.numRecords.value() == 0) return; /* Step 1: Get the dataset and memory spaces */ hid::h5s dsetSpace = H5Dget_space(info.h5Dset.value()); /* get a copy of the new file data space for writing */ hid::h5s dataSpace = util::getMemSpace(numReadRecords.value(), {numReadRecords.value()}); /* create a simple memory data space */ /* Step 2: draw a hyperslab in the dataset */ h5pp::Hyperslab slab; slab.offset = {startIdx.value()}; slab.extent = {numReadRecords.value()}; selectHyperslab(dsetSpace, slab, H5S_SELECT_SET); /* Step 3: read the records */ // Get the memory address to the data buffer auto dataPtr = h5pp::util::getVoidPointer<void *>(data); herr_t retval = H5Dread(info.h5Dset.value(), info.h5Type.value(), dataSpace, dsetSpace, H5P_DEFAULT, dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to read data from table [{}]", info.tablePath.value())); } } template<typename DataType> inline void appendTableRecords(const DataType &data, TableInfo &info, std::optional<size_t> numNewRecords = std::nullopt) { /* * This function replaces H5TBappend_records() and avoids creating expensive temporaries for the dataset id and type id for the * compound table type. * */ if constexpr(std::is_same_v<DataType, std::vector<std::byte>>) if(not numNewRecords) throw std::runtime_error("Optional argument [numNewRecords] is required when appending std::vector<std::byte> to table"); if(not numNewRecords) numNewRecords = h5pp::util::getSize(data); if(numNewRecords.value() == 0) h5pp::logger::log->warn("Given 0 records to write to table [{}]. This is likely an error.", info.tablePath.value()); h5pp::logger::log->debug("Appending {} records to table [{}] | current num records {} | record size {} bytes", numNewRecords.value(), info.tablePath.value(), info.numRecords.value(), info.recordBytes.value()); info.assertWriteReady(); if constexpr(not std::is_same_v<DataType, std::vector<std::byte>>) { // Make sure the given container and the registered table entry have the same size. // If there is a mismatch here it can cause horrible bugs/segfaults if constexpr(h5pp::type::sfinae::has_value_type_v<DataType>) { if(sizeof(typename DataType::value_type) != info.recordBytes.value()) throw std::runtime_error(h5pp::format("Size mismatch: Given container of type {} has elements of {} bytes, but the " "table records on file are {} bytes each ", h5pp::type::sfinae::type_name<DataType>(), sizeof(typename DataType::value_type), info.recordBytes.value())); } else if constexpr(h5pp::type::sfinae::has_data_v<DataType> and h5pp::type::sfinae::is_iterable_v<DataType>) { if(sizeof(&data.data()) != info.recordBytes.value()) throw std::runtime_error(h5pp::format("Size mismatch: Given container of type {} has elements of {} bytes, but the " "table records on file are {} bytes each ", h5pp::type::sfinae::type_name<DataType>(), sizeof(&data.data()), info.recordBytes.value())); } else { if(sizeof(DataType) != info.recordBytes.value()) throw std::runtime_error( h5pp::format("Size mismatch: Given data type {} is of {} bytes, but the table records on file are {} bytes each ", h5pp::type::sfinae::type_name<DataType>(), sizeof(DataType), info.recordBytes.value())); } } /* Step 1: extend the dataset */ extendDataset(info.h5Dset.value(), {numNewRecords.value() + info.numRecords.value()}); /* Step 2: Get the dataset and memory spaces */ hid::h5s dsetSpace = H5Dget_space(info.h5Dset.value()); /* get a copy of the new file data space for writing */ hid::h5s dataSpace = util::getMemSpace(numNewRecords.value(), {numNewRecords.value()}); /* create a simple memory data space */ /* Step 3: draw a hyperslab in the dataset */ h5pp::Hyperslab slab; slab.offset = {info.numRecords.value()}; slab.extent = {numNewRecords.value()}; selectHyperslab(dsetSpace, slab, H5S_SELECT_SET); /* Step 4: write the records */ // Get the memory address to the data buffer auto dataPtr = h5pp::util::getVoidPointer<const void *>(data); herr_t retval = H5Dwrite(info.h5Dset.value(), info.h5Type.value(), dataSpace, dsetSpace, H5P_DEFAULT, dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to append data to table [{}]", info.tablePath.value())); } /* Step 5: increment the number of records in the table */ info.numRecords.value() += numNewRecords.value(); } template<typename DataType> inline void writeTableRecords(const DataType & data, TableInfo & info, size_t startIdx = 0, std::optional<size_t> numRecordsToWrite = std::nullopt) { /* * This function replaces H5TBwrite_records() and avoids creating expensive temporaries for the dataset id and type id for the * compound table type. In addition, it has the ability to extend the existing the dataset if the incoming data larger than the * current bound */ if constexpr(std::is_same_v<DataType, std::vector<std::byte>>) { if(not numRecordsToWrite) throw std::runtime_error( "Optional argument [numRecordsToWrite] is required when writing std::vector<std::byte> into table"); } if(not numRecordsToWrite) numRecordsToWrite = h5pp::util::getSize(data); if(numRecordsToWrite.value() == 0) h5pp::logger::log->warn("Given 0 records to write to table [{}]. This is likely an error.", info.tablePath.value()); info.assertWriteReady(); // Check that startIdx is smaller than the number of records on file, otherwise append the data if(startIdx >= info.numRecords.value()) return h5pp::hdf5::appendTableRecords(data, info, numRecordsToWrite); // return appendTableRecords(data, info); h5pp::logger::log->debug("Writing {} records to table [{}] | start from {} | current num records {} | record size {} bytes", numRecordsToWrite.value(), info.tablePath.value(), startIdx, info.numRecords.value(), info.recordBytes.value()); if constexpr(not std::is_same_v<DataType, std::vector<std::byte>>) { // Make sure the given data type size matches the table record type size. // If there is a mismatch here it can cause horrible bugs/segfaults if constexpr(h5pp::type::sfinae::has_value_type_v<DataType>) { if(sizeof(typename DataType::value_type) != info.recordBytes.value()) throw std::runtime_error(h5pp::format("Size mismatch: Given container of type {} has elements of {} bytes, but the " "table records on file are {} bytes each ", h5pp::type::sfinae::type_name<DataType>(), sizeof(typename DataType::value_type), info.recordBytes.value())); } else if constexpr(h5pp::type::sfinae::has_data_v<DataType> and h5pp::type::sfinae::is_iterable_v<DataType>) { if(sizeof(&data.data()) != info.recordBytes.value()) throw std::runtime_error(h5pp::format("Size mismatch: Given container of type {} has elements of {} bytes, but the " "table records on file are {} bytes each ", h5pp::type::sfinae::type_name<DataType>(), sizeof(&data.data()), info.recordBytes.value())); } else { if(sizeof(DataType) != info.recordBytes.value()) throw std::runtime_error( h5pp::format("Size mismatch: Given data type {} is of {} bytes, but the table records on file are {} bytes each ", h5pp::type::sfinae::type_name<DataType>(), sizeof(DataType), info.recordBytes.value())); } } /* Step 1: extend the dataset if necessary */ if(startIdx + numRecordsToWrite.value() > info.numRecords.value()) extendDataset(info.h5Dset.value(), {startIdx + numRecordsToWrite.value()}); /* Step 2: Get the dataset and memory spaces */ hid::h5s dsetSpace = H5Dget_space(info.h5Dset.value()); /* get a copy of the new file data space for writing */ hid::h5s dataSpace = util::getMemSpace(numRecordsToWrite.value(), {numRecordsToWrite.value()}); /* create a simple memory data space */ /* Step 3: draw a hyperslab in the dataset */ h5pp::Hyperslab slab; slab.offset = {startIdx}; slab.extent = {numRecordsToWrite.value()}; selectHyperslab(dsetSpace, slab, H5S_SELECT_SET); /* Step 4: write the records */ // Get the memory address to the data buffer auto dataPtr = h5pp::util::getVoidPointer<const void *>(data); herr_t retval = H5Dwrite(info.h5Dset.value(), info.h5Type.value(), dataSpace, dsetSpace, H5P_DEFAULT, dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to append data to table [{}]", info.tablePath.value())); } info.numRecords.value() = std::max<size_t>(startIdx + numRecordsToWrite.value(), info.numRecords.value()); } inline void copyTableRecords(const h5pp::TableInfo &srcInfo, hsize_t srcStartIdx, hsize_t numRecordsToCopy, h5pp::TableInfo & tgtInfo, hsize_t tgtStartIdx) { srcInfo.assertReadReady(); tgtInfo.assertWriteReady(); // Sanity checks for table types if(srcInfo.h5Type.value() != tgtInfo.h5Type.value()) throw std::runtime_error(h5pp::format("Failed to add table records: table type mismatch")); if(srcInfo.recordBytes.value() != tgtInfo.recordBytes.value()) throw std::runtime_error(h5pp::format("Failed to copy table records: table record byte size mismatch src {} != tgt {}", srcInfo.recordBytes.value(), tgtInfo.recordBytes.value())); if(srcInfo.fieldSizes.value() != tgtInfo.fieldSizes.value()) throw std::runtime_error(h5pp::format("Failed to copy table records: table field sizes mismatch src {} != tgt {}", srcInfo.fieldSizes.value(), tgtInfo.fieldSizes.value())); if(srcInfo.fieldOffsets.value() != tgtInfo.fieldOffsets.value()) throw std::runtime_error(h5pp::format("Failed to copy table records: table field offsets mismatch src {} != tgt {}", srcInfo.fieldOffsets.value(), tgtInfo.fieldOffsets.value())); // Sanity check for record ranges if(srcInfo.numRecords.value() < srcStartIdx + numRecordsToCopy) throw std::runtime_error(h5pp::format("Failed to copy table records: Requested records out of bound: src table nrecords {} | " "src table start index {} | num records to copy {}", srcInfo.numRecords.value(), srcStartIdx, numRecordsToCopy)); std::string fileLogInfo; // TODO: this check is not very thorough, but checks with H5Iget_file_id are too expensive... if(srcInfo.h5File.value() != tgtInfo.h5File.value()) fileLogInfo = "on different files"; h5pp::logger::log->debug("Copying records from table [{}] to table [{}] {} | src start at record {} ({} total) | tgt start at " "record {} ({} total) | copy {} records | record size {} bytes", srcInfo.tablePath.value(), tgtInfo.tablePath.value(), fileLogInfo, srcStartIdx, srcInfo.numRecords.value(), tgtStartIdx, tgtInfo.numRecords.value(), numRecordsToCopy, tgtInfo.recordBytes.value()); std::vector<std::byte> data(numRecordsToCopy * tgtInfo.recordBytes.value()); data.resize(numRecordsToCopy * tgtInfo.recordBytes.value()); h5pp::hdf5::readTableRecords(data, srcInfo, srcStartIdx, numRecordsToCopy); h5pp::hdf5::writeTableRecords(data, tgtInfo, tgtStartIdx, numRecordsToCopy); } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> inline void readTableField(DataType & data, const TableInfo & info, const std::vector<size_t> &srcFieldIndices, // Field indices for the table on file std::optional<size_t> startIdx = std::nullopt, std::optional<size_t> numReadRecords = std::nullopt) { // If none of startIdx or numReadRecords are given: // If data resizeable: startIdx = 0, numReadRecords = totalRecords // If data not resizeable: startIdx = last record index, numReadRecords = 1. // If startIdx given but numReadRecords is not: // If data resizeable -> read from startIdx to the end // If data not resizeable -> read a single record starting from startIdx // If numReadRecords given but startIdx is not -> read the last numReadRecords records info.assertReadReady(); hsize_t totalRecords = info.numRecords.value(); if(not startIdx and not numReadRecords) { if constexpr(h5pp::type::sfinae::has_resize_v<DataType>) { startIdx = 0; numReadRecords = totalRecords; } else { startIdx = totalRecords - 1; numReadRecords = 1; } } else if(startIdx and not numReadRecords) { if(startIdx.value() > totalRecords - 1) throw std::runtime_error(h5pp::format( "Invalid start record {} for table [{}] | total records [{}]", startIdx.value(), info.tablePath.value(), totalRecords)); if constexpr(h5pp::type::sfinae::has_resize_v<DataType>) { numReadRecords = totalRecords - startIdx.value(); } else { numReadRecords = 1; } } else if(numReadRecords and not startIdx) { if(numReadRecords and numReadRecords.value() > totalRecords) throw std::logic_error(h5pp::format("Cannot read {} records from table [{}] which only has {} records", numReadRecords.value(), info.tablePath.value(), totalRecords)); startIdx = totalRecords - numReadRecords.value(); } // Sanity check if(numReadRecords.value() > totalRecords) throw std::logic_error(h5pp::format("Cannot read {} records from table [{}] which only has {} records", numReadRecords.value(), info.tablePath.value(), totalRecords)); if(startIdx.value() + numReadRecords.value() > totalRecords) throw std::logic_error(h5pp::format("Cannot read {} records starting from index {} from table [{}] which only has {} records", numReadRecords.value(), startIdx.value(), info.tablePath.value(), totalRecords)); // Build the field sizes and offsets of the given read buffer based on the corresponding quantities on file std::vector<size_t> srcFieldOffsets; std::vector<size_t> tgtFieldOffsets; std::vector<size_t> tgtFieldSizes; std::vector<std::string> tgtFieldNames; size_t tgtFieldSizeSum = 0; for(const auto &idx : srcFieldIndices) { srcFieldOffsets.emplace_back(info.fieldOffsets.value()[idx]); tgtFieldOffsets.emplace_back(tgtFieldSizeSum); tgtFieldSizes.emplace_back(info.fieldSizes.value()[idx]); tgtFieldNames.emplace_back(info.fieldNames.value()[idx]); tgtFieldSizeSum += tgtFieldSizes.back(); } // Make sure the data type of the given read buffer matches the size computed above. // If there is a mismatch here it can cause horrible bugs/segfaults size_t dataSize = 0; if constexpr(h5pp::type::sfinae::has_value_type_v<DataType>) dataSize = sizeof(typename DataType::value_type); else if constexpr(h5pp::type::sfinae::has_data_v<DataType> and h5pp::type::sfinae::is_iterable_v<DataType>) dataSize = sizeof(&data.data()); else dataSize = sizeof(DataType); if(dataSize != tgtFieldSizeSum) { std::string error_msg = h5pp::format("Could not read fields {} from table [{}]\n", tgtFieldNames, info.tablePath.value()); for(auto &idx : srcFieldIndices) error_msg += h5pp::format( "{:<10} Field index {:<6} {:<24} = {} bytes\n", " ", idx, info.fieldNames.value()[idx], info.fieldSizes.value()[idx]); std::string dataTypeName; if constexpr(h5pp::type::sfinae::has_value_type_v<DataType>) dataTypeName = h5pp::type::sfinae::type_name<typename DataType::value_type>(); else if constexpr(h5pp::type::sfinae::has_data_v<DataType> and h5pp::type::sfinae::is_iterable_v<DataType>) dataTypeName = h5pp::type::sfinae::type_name<decltype(&data.data())>(); else dataTypeName = h5pp::type::sfinae::type_name<DataType>(); error_msg += h5pp::format("{:<8} + {:-^60}\n", " ", ""); error_msg += h5pp::format("{:<10} Fields total = {} bytes per record\n", " ", tgtFieldSizeSum); error_msg += h5pp::format("{:<10} Given buffer = {} bytes per record <{}>\n", " ", dataSize, dataTypeName); error_msg += h5pp::format("{:<10} Size mismatch\n", " "); error_msg += h5pp::format("{:<10} Hint: The buffer type <{}> may have been padded by the compiler\n", " ", dataTypeName); error_msg += h5pp::format("{:<10} Consider declaring <{}> with __attribute__((packed, aligned(1)))\n", " ", dataTypeName); throw std::runtime_error(error_msg); } h5pp::util::resizeData(data, {numReadRecords.value()}); h5pp::logger::log->debug("Reading table [{}] | field names {} | read from " "record {} | read num records {} | available " "records {} | record size {} bytes", info.tablePath.value(), tgtFieldNames, startIdx.value(), numReadRecords.value(), info.numRecords.value(), info.recordBytes.value()); h5pp::logger::log->trace("Reading field indices {} sizes {} | offsets {} | offsets on dataset {}", srcFieldIndices, tgtFieldSizes, tgtFieldOffsets, srcFieldOffsets); // Get the memory address to the data buffer auto dataPtr = h5pp::util::getVoidPointer<void *>(data); /* Step 1: Get the dataset and memory spaces */ hid::h5s dsetSpace = H5Dget_space(info.h5Dset.value()); /* get a copy of the new file data space for writing */ hid::h5s dataSpace = util::getMemSpace(numReadRecords.value(), {numReadRecords.value()}); /* create a simple memory data space */ /* Step 2: draw a hyperslab in the dataset */ h5pp::Hyperslab slab; slab.offset = {startIdx.value()}; slab.extent = {numReadRecords.value()}; selectHyperslab(dsetSpace, slab, H5S_SELECT_SET); /* Step 3: Create a special tgtTypeId for reading a subset of the record with the following properties: * - tgtTypeId has the size of the given buffer type, i.e. dataSize. * - only the fields to read are defined in it * - the defined fields are converted to native types * Then H5Dread will take care of only reading the relevant components of the record */ hid::h5t tgtTypeId = H5Tcreate(H5T_COMPOUND, dataSize); for(size_t tgtIdx = 0; tgtIdx < srcFieldIndices.size(); tgtIdx++) { size_t srcIdx = srcFieldIndices[tgtIdx]; hid::h5t temp_member_id = H5Tget_native_type(info.fieldTypes.value()[srcIdx], H5T_DIR_DEFAULT); size_t temp_member_size = H5Tget_size(temp_member_id); if(tgtFieldSizes[tgtIdx] != temp_member_size) H5Tset_size(temp_member_id, tgtFieldSizes[tgtIdx]); H5Tinsert(tgtTypeId, tgtFieldNames[tgtIdx].c_str(), tgtFieldOffsets[tgtIdx], temp_member_id); } /* Read data */ herr_t retval = H5Dread(info.h5Dset.value(), tgtTypeId, dataSpace, dsetSpace, H5P_DEFAULT, dataPtr); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Could not read table fields {} on table [{}]", tgtFieldNames, info.tablePath.value())); } } template<typename DataType, typename = std::enable_if_t<not std::is_const_v<DataType>>> inline void readTableField(DataType & data, const TableInfo & info, const std::vector<std::string> &fieldNames, std::optional<size_t> startIdx = std::nullopt, std::optional<size_t> numReadRecords = std::nullopt) { // Compute the field indices std::vector<size_t> fieldIndices; for(const auto &fieldName : fieldNames) { auto it = std::find(info.fieldNames->begin(), info.fieldNames->end(), fieldName); if(it == info.fieldNames->end()) throw std::runtime_error(h5pp::format("Could not find field [{}] in table [{}]: " "Available field names are {}", fieldName, info.tablePath.value(), info.fieldNames.value())); else fieldIndices.emplace_back(static_cast<size_t>(std::distance(info.fieldNames->begin(), it))); } readTableField(data, info, fieldIndices, startIdx, numReadRecords); } template<typename h5x_src, typename h5x_tgt, // enable_if so the compiler doesn't think it can use overload with std::string those arguments typename = h5pp::type::sfinae::enable_if_is_h5_loc_or_hid_t<h5x_src>, typename = h5pp::type::sfinae::enable_if_is_h5_loc_or_hid_t<h5x_tgt>> inline void copyLink(const h5x_src & srcLocId, std::string_view srcLinkPath, const h5x_tgt & tgtLocId, std::string_view tgtLinkPath, const PropertyLists &plists = PropertyLists()) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x_src>, "Template function [h5pp::hdf5::copyLink(const h5x_src & srcLocId, ...)] requires type h5x_src to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x_tgt>, "Template function [h5pp::hdf5::copyLink(..., ..., const h5x_tgt & tgtLocId, ...)] requires type h5x_tgt to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); h5pp::logger::log->trace("Copying link [{}] --> [{}]", srcLinkPath, tgtLinkPath); // Copy the link srcLinkPath to tgtLinkPath. Note that H5Ocopy does this recursively, so we don't need // to iterate links recursively here. auto retval = H5Ocopy( srcLocId, util::safe_str(srcLinkPath).c_str(), tgtLocId, util::safe_str(tgtLinkPath).c_str(), H5P_DEFAULT, plists.linkCreate); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Could not copy link [{}] --> [{}]", srcLinkPath, tgtLinkPath)); } } template<typename h5x_src, typename h5x_tgt, // enable_if so the compiler doesn't think it can use overload with fs::path those arguments typename = h5pp::type::sfinae::enable_if_is_h5_loc_or_hid_t<h5x_src>, typename = h5pp::type::sfinae::enable_if_is_h5_loc_or_hid_t<h5x_tgt>> inline void moveLink(const h5x_src & srcLocId, std::string_view srcLinkPath, const h5x_tgt & tgtLocId, std::string_view tgtLinkPath, LocationMode locationMode = LocationMode::DETECT, const PropertyLists &plists = PropertyLists()) { static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x_src>, "Template function [h5pp::hdf5::moveLink(const h5x_src & srcLocId, ...)] requires type h5x_src to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); static_assert(h5pp::type::sfinae::is_h5_loc_or_hid_v<h5x_tgt>, "Template function [h5pp::hdf5::moveLink(..., ..., const h5x_tgt & tgtLocId, ...)] requires type h5x_tgt to be: " "[h5pp::hid::h5f], [h5pp::hid::h5g], [h5pp::hid::h5o] or [hid_t]"); h5pp::logger::log->trace("Moving link [{}] --> [{}]", srcLinkPath, tgtLinkPath); // Move the link srcLinkPath to tgtLinkPath. Note that H5Lmove only works inside a single file. // For different files we should do H5Ocopy followed by H5Ldelete bool sameFile = h5pp::util::onSameFile(srcLocId, tgtLocId, locationMode); if(sameFile) { // Same file auto retval = H5Lmove(srcLocId, util::safe_str(srcLinkPath).c_str(), tgtLocId, util::safe_str(tgtLinkPath).c_str(), plists.linkCreate, plists.linkAccess); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Could not copy link [{}] --> [{}]", srcLinkPath, tgtLinkPath)); } } else { // Different files auto retval = H5Ocopy(srcLocId, util::safe_str(srcLinkPath).c_str(), tgtLocId, util::safe_str(tgtLinkPath).c_str(), H5P_DEFAULT, plists.linkCreate); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Could not copy link [{}] --> [{}]", srcLinkPath, tgtLinkPath)); } retval = H5Ldelete(srcLocId, util::safe_str(srcLinkPath).c_str(), plists.linkAccess); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Could not delete link after move [{}]", srcLinkPath)); } } } inline void copyLink(const h5pp::fs::path &srcFilePath, std::string_view srcLinkPath, const h5pp::fs::path &tgtFilePath, std::string_view tgtLinkPath, FilePermission targetFileCreatePermission = FilePermission::READWRITE, const PropertyLists & plists = PropertyLists()) { h5pp::logger::log->trace("Copying link: source link [{}] | source file [{}] --> target link [{}] | target file [{}]", srcLinkPath, srcFilePath.string(), tgtLinkPath, tgtFilePath.string()); try { auto srcPath = fs::absolute(srcFilePath); if(not fs::exists(srcPath)) throw std::runtime_error(h5pp::format("Could not copy link [{}] from file [{}]: source file does not exist [{}]", srcLinkPath, srcFilePath.string(), srcPath.string())); auto tgtPath = h5pp::hdf5::createFile(tgtFilePath, targetFileCreatePermission, plists); hid_t hidSrc = H5Fopen(srcPath.string().c_str(), H5F_ACC_RDONLY, plists.fileAccess); hid_t hidTgt = H5Fopen(tgtPath.string().c_str(), H5F_ACC_RDWR, plists.fileAccess); if(hidSrc < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to open source file [{}] in read-only mode", srcPath.string())); } if(hidTgt < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to open target file [{}] in read-write mode", tgtPath.string())); } hid::h5f srcFile = hidSrc; hid::h5f tgtFile = hidTgt; copyLink(srcFile, srcLinkPath, tgtFile, tgtLinkPath); } catch(const std::exception &ex) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Could not copy link [{}] from file [{}]: {}", srcLinkPath, srcFilePath.string(), ex.what())); } } inline fs::path copyFile(const h5pp::fs::path &srcFilePath, const h5pp::fs::path &tgtFilePath, FilePermission permission = FilePermission::COLLISION_FAIL, const PropertyLists & plists = PropertyLists()) { h5pp::logger::log->trace("Copying file [{}] --> [{}]", srcFilePath.string(), tgtFilePath.string()); auto tgtPath = h5pp::hdf5::createFile(tgtFilePath, permission, plists); auto srcPath = fs::absolute(srcFilePath); try { if(not fs::exists(srcPath)) throw std::runtime_error(h5pp::format("Could not copy file [{}] --> [{}]: source file does not exist [{}]", srcFilePath.string(), tgtFilePath.string(), srcPath.string())); if(tgtPath == srcPath) h5pp::logger::log->debug("Skipped copying file: source and target files have the same path [{}]", srcPath.string()); hid_t hidSrc = H5Fopen(srcPath.string().c_str(), H5F_ACC_RDONLY, plists.fileAccess); hid_t hidTgt = H5Fopen(tgtPath.string().c_str(), H5F_ACC_RDWR, plists.fileAccess); if(hidSrc < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to open source file [{}] in read-only mode", srcPath.string())); } if(hidTgt < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to open target file [{}] in read-write mode", tgtPath.string())); } hid::h5f srcFile = hidSrc; hid::h5f tgtFile = hidTgt; // Copy all the groups in the file root recursively. Note that H5Ocopy does this recursively, so we don't need // to iterate links recursively here. Therefore maxDepth = 0 long maxDepth = 0; for(const auto &link : getContentsOfLink<H5O_TYPE_UNKNOWN>(srcFile, "/", maxDepth, plists.linkAccess)) { if(link == ".") continue; h5pp::logger::log->trace("Copying recursively: [{}]", link); auto retval = H5Ocopy(srcFile, link.c_str(), tgtFile, link.c_str(), H5P_DEFAULT, plists.linkCreate); if(retval < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format( "Failed to copy file contents with H5Ocopy(srcFile,{},tgtFile,{},H5P_DEFAULT,link_create_propery_list)", link, link)); } } // ... Find out how to copy attributes that are written on the root itself return tgtPath; } catch(const std::exception &ex) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Could not copy file [{}] --> [{}]: ", srcFilePath.string(), tgtFilePath.string(), ex.what())); } } inline void moveLink(const h5pp::fs::path &srcFilePath, std::string_view srcLinkPath, const h5pp::fs::path &tgtFilePath, std::string_view tgtLinkPath, FilePermission targetFileCreatePermission = FilePermission::READWRITE, const PropertyLists & plists = PropertyLists()) { h5pp::logger::log->trace("Moving link: source link [{}] | source file [{}] --> target link [{}] | target file [{}]", srcLinkPath, srcFilePath.string(), tgtLinkPath, tgtFilePath.string()); try { auto srcPath = fs::absolute(srcFilePath); if(not fs::exists(srcPath)) throw std::runtime_error( h5pp::format("Could not move link [{}] from file [{}]:\n\t source file with absolute path [{}] does not exist", srcLinkPath, srcFilePath.string(), srcPath.string())); auto tgtPath = h5pp::hdf5::createFile(tgtFilePath, targetFileCreatePermission, plists); hid_t hidSrc = H5Fopen(srcPath.string().c_str(), H5F_ACC_RDWR, plists.fileAccess); hid_t hidTgt = H5Fopen(tgtPath.string().c_str(), H5F_ACC_RDWR, plists.fileAccess); if(hidSrc < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to open source file [{}] in read-only mode", srcPath.string())); } if(hidTgt < 0) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error(h5pp::format("Failed to open target file [{}] in read-write mode", tgtPath.string())); } hid::h5f srcFile = hidSrc; hid::h5f tgtFile = hidTgt; auto locMode = h5pp::util::getLocationMode(srcFilePath, tgtFilePath); moveLink(srcFile, srcLinkPath, tgtFile, tgtLinkPath, locMode); } catch(const std::exception &ex) { H5Eprint(H5E_DEFAULT, stderr); throw std::runtime_error( h5pp::format("Could not move link [{}] from file [{}]: {}", srcLinkPath, srcFilePath.string(), ex.what())); } } inline fs::path moveFile(const h5pp::fs::path &src, const h5pp::fs::path &tgt, FilePermission permission = FilePermission::COLLISION_FAIL, const PropertyLists & plists = PropertyLists()) { h5pp::logger::log->trace("Moving file by copy+remove: [{}] --> [{}]", src.string(), tgt.string()); auto tgtPath = copyFile(src, tgt, permission, plists); // Returns the path to the newly created file auto srcPath = fs::absolute(src); if(fs::exists(tgtPath)) { h5pp::logger::log->trace("Removing file [{}]", srcPath.string()); try { fs::remove(srcPath); } catch(const std::exception &err) { throw std::runtime_error( h5pp::format("Remove failed. File may be locked [{}] | what(): {} ", srcPath.string(), err.what())); } return tgtPath; } else throw std::runtime_error(h5pp::format("Could not copy file [{}] to target [{}]", srcPath.string(), tgt.string())); return tgtPath; } }
[ "aceituno@kth.se" ]
aceituno@kth.se
46f770e2934fb79593e6ba638e8f4d9670bf6d7e
06a7f45d1bea8ccbc358ee7e9c8a1c517666975b
/eviction.cc
5bcbd992614b32c6ed124b34315870e93ec04b1b
[]
no_license
ezraschwaa/CS389-hw2
0d93703bf5ff0b3fb544de992150e4e679cd95e2
dd8c178f620a136f77b73e384f544b5e8a7d6789
refs/heads/master
2020-04-08T23:21:25.251567
2018-12-02T07:57:33
2018-12-02T07:57:33
159,821,423
0
1
null
2018-12-02T04:13:14
2018-11-30T12:37:21
C++
UTF-8
C++
false
false
8,410
cc
//By Monica Moniot and Alyssa Riceman #include <stdlib.h> #include "eviction.h" #include "book.h" #include "types.h" constexpr Bookmark INVALID_NODE = -1; inline Evict_item* get_evict_item(Book* book, Bookmark item_i) { return &read_book(book, item_i)->evict_item; } Node* get_node(Book* book, Bookmark item_i) { return &get_evict_item(book, item_i)->node; } void remove (DLL* list, Bookmark item_i, Node* node, Book* book) { auto next_i = node->next; auto pre_i = node->pre; if(list->head == item_i) { if(next_i == item_i) {//all items have been removed list->head = INVALID_NODE; return; } list->head = next_i; } get_node(book, pre_i)->next = next_i; get_node(book, next_i)->pre = pre_i; } void append (DLL* list, Bookmark item_i, Node* node, Book* book) { auto head = list->head; if(head == INVALID_NODE) { list->head = item_i; node->next = item_i; node->pre = item_i; } else { Node* head_node = get_node(book, head); auto last = head_node->pre; Node* last_node = get_node(book, last); last_node->next = item_i; head_node->pre = item_i; node->next = head; node->pre = last; } } void prepend (DLL* list, Bookmark item_i, Node* node, Book* book) { auto head = list->head; list->head = item_i; if(head == INVALID_NODE) { node->next = item_i; node->pre = item_i; } else { Node* head_node = get_node(book, head); auto first = head_node->next; Node* first_node = get_node(book, first); first_node->pre = item_i; head_node->next = item_i; node->next = first; node->pre = head; } } void set_last (DLL* list, Bookmark item_i, Node* node, Book* book) { auto head = list->head; auto head_node = get_node(book, head); auto last = head_node->pre; auto last_node = get_node(book, last); auto next_i = node->next; auto pre_i = node->pre; if(item_i == head) { list->head = head_node->next; return; } else if(item_i == last) { return; } last_node->next = item_i; head_node->pre = item_i; node->next = head; node->pre = last; get_node(book, pre_i)->next = next_i; get_node(book, next_i)->pre = pre_i; } void set_first(DLL* list, Bookmark item_i, Node* node, Book* book) { auto head = list->head; auto head_node = get_node(book, head); list->head = item_i; if(item_i == head) { return; } auto first = head_node->next; auto first_node = get_node(book, first); auto next_i = node->next; auto pre_i = node->pre; first_node->pre = item_i; head_node->next = item_i; node->next = first; node->pre = head; get_node(book, pre_i)->next = next_i; get_node(book, next_i)->pre = pre_i; } void create_evictor(Evictor* evictor, evictor_type policy) { evictor->policy = policy; if(policy == FIFO or policy == LIFO or policy == LRU or policy == MRU or policy == CLOCK) { auto list = &evictor->data.list; list->head = INVALID_NODE; } else if(policy == SLRU) { auto dlist = &evictor->data.dlist; auto protect = &evictor->data.dlist.protect; auto prohibate = &evictor->data.dlist.prohibate; protect->head = INVALID_NODE; prohibate->head = INVALID_NODE; dlist->pp_delta = 0; } else {//RANDOM evictor->data.rand_data.total_items = 0; } } void add_evict_item (Evictor* evictor, Bookmark item_i, Evict_item* item, Book* book) { //item was created //we must init "item" auto policy = evictor->policy; if(policy == FIFO or policy == LRU) { auto node = &item->node; append(&evictor->data.list, item_i, node, book); } else if(policy == LIFO or policy == MRU) { auto node = &item->node; prepend(&evictor->data.list, item_i, node, book); } else if(policy == CLOCK) { auto node = &item->node; node->rf_bit = false; append(&evictor->data.list, item_i, node, book); } else if(policy == SLRU) { auto dlist = &evictor->data.dlist; auto prohibate = &evictor->data.dlist.prohibate; auto node = &item->node; node->rf_bit = false; dlist->pp_delta += 1; append(prohibate, item_i, node, book); } else {//RANDOM auto data = &evictor->data.rand_data; auto rand_items = static_cast<Bookmark*>(evictor->mem_arena); item->rand_i = data->total_items; rand_items[data->total_items] = item_i; data->total_items += 1; } } void remove_evict_item (Evictor* evictor, Bookmark item_i, Evict_item* item, Book* book) { //item was removed auto policy = evictor->policy; if(policy == FIFO or policy == LIFO or policy == LRU or policy == MRU or policy == CLOCK) { auto node = &item->node; remove(&evictor->data.list, item_i, node, book); } else if(policy == SLRU) { auto dlist = &evictor->data.dlist; auto protect = &evictor->data.dlist.protect; auto prohibate = &evictor->data.dlist.prohibate; auto node = &item->node; if(node->rf_bit) { dlist->pp_delta += 1; remove(protect, item_i, node, book); } else { if(dlist->pp_delta == 0) {//evict from protected auto p_item = protect->head; auto p_node = get_node(book, p_item); remove(protect, p_item, p_node, book); append(prohibate, p_item, p_node, book); dlist->pp_delta += 1; } else { dlist->pp_delta -= 1; } remove(prohibate, item_i, node, book); } } else {//RANDOM auto data = &evictor->data.rand_data; auto rand_items = static_cast<Bookmark*>(evictor->mem_arena); //We need to delete from rand_items in place //this requires us to relink some data objects Bookmark rand_i0 = item->rand_i; auto rand_i1 = data->total_items - 1; data->total_items = rand_i1; auto item_i1 = get_evict_item(book, rand_items[rand_i1]); rand_items[rand_i0] = rand_items[rand_i1]; item_i1->rand_i = rand_i0; } } void touch_evict_item (Evictor* evictor, Bookmark item_i, Evict_item* item, Book* book) { //item was touched auto policy = evictor->policy; if(policy == FIFO or policy == LIFO) { } else if(policy == LRU) { auto node = &item->node; set_last(&evictor->data.list, item_i, node, book); } else if(policy == MRU) { auto node = &item->node; set_first(&evictor->data.list, item_i, node, book); } else if(policy == CLOCK) { auto node = &item->node; node->rf_bit = true; set_last(&evictor->data.list, item_i, node, book); } else if(policy == SLRU) { auto dlist = &evictor->data.dlist; auto protect = &evictor->data.dlist.protect; auto prohibate = &evictor->data.dlist.prohibate; auto node = &item->node; if(node->rf_bit) { set_last(protect, item_i, node, book); } else { node->rf_bit = true; remove(prohibate, item_i, node, book); append(protect, item_i, node, book); if(dlist->pp_delta <= 1) {//evict from protected auto p_item = protect->head; auto p_node = get_node(book, p_item); remove(protect, p_item, p_node, book); append(prohibate, p_item, p_node, book); } else { dlist->pp_delta -= 2; } } } else {//RANDOM } } Bookmark get_evict_item(Evictor* evictor, Book* book) { //return item to evict auto policy = evictor->policy; Bookmark item_i = 0; if(policy == FIFO or policy == LIFO or policy == LRU or policy == MRU) { auto list = &evictor->data.list; item_i = list->head; remove(list, item_i, get_node(book, item_i), book); } else if(policy == CLOCK) { auto list = &evictor->data.list; item_i = list->head; auto node = get_node(book, item_i); while(node->rf_bit) { node->rf_bit = false; item_i = get_node(book, item_i)->next; list->head = item_i; } remove(list, item_i, node, book); } else if(policy == SLRU) { auto dlist = &evictor->data.dlist; auto protect = &evictor->data.dlist.protect; auto prohibate = &evictor->data.dlist.prohibate; item_i = prohibate->head; if(dlist->pp_delta == 0) {//evict from protected auto p_item = protect->head; auto p_node = get_node(book, p_item); remove(protect, p_item, p_node, book); append(prohibate, p_item, p_node, book); dlist->pp_delta += 1; } else { dlist->pp_delta -= 1; } auto node = get_node(book, item_i); remove(prohibate, item_i, node, book); } else {//RANDOM auto data = &evictor->data.rand_data; auto rand_items = static_cast<Bookmark*>(evictor->mem_arena); auto rand_i0 = rand()%data->total_items; item_i = rand_items[rand_i0]; //We need to delete rand_i0 from rand_items in place //this requires us to relink some data objects auto rand_i1 = data->total_items - 1; data->total_items = rand_i1; auto item_i1 = get_evict_item(book, rand_items[rand_i1]); rand_items[rand_i0] = rand_items[rand_i1]; item_i1->rand_i = rand_i0; } return item_i; }
[ "mmoniot2@gmail.com" ]
mmoniot2@gmail.com
f5da90390f903fabf34f7f523b438d3ffedca1f4
88e378f925bbd8dddd271e19a51477a5201c32eb
/GRMFixes/ZenGin/Gothic_II_Addon/API/oViewDialogInventory.h
e89463977aa635383dd245309847dbc9f583725b
[ "MIT" ]
permissive
ThielHater/GRMFixes_Union
d71dcc71f77082feaf4036785acc32255fbeaaa9
4cfff09b5e7b1ecdbc13d903d44727eab52703ff
refs/heads/master
2022-11-26T21:41:37.680547
2022-11-06T16:30:08
2022-11-06T16:30:08
240,788,948
0
1
null
null
null
null
UTF-8
C++
false
false
2,121
h
// Supported with union (c) 2018 Union team #ifndef __OVIEW_DIALOG_INVENTORY_H__VER3__ #define __OVIEW_DIALOG_INVENTORY_H__VER3__ namespace Gothic_II_Addon { class oCViewDialogInventory : public zCViewDialog { public: zCLASS_DECLARATION( oCViewDialogInventory ) enum oEInventoryAlignment { oEInventoryAlignment_Left, oEInventoryAlignment_Right }; oEInventoryAlignment oTInventoryAlignment; oEInventoryAlignment oTAlignmentInventory; oCNpcInventory* Inventory; oEInventoryAlignment Alignment; void oCViewDialogInventory_OnInit() zCall( 0x00689020 ); oCViewDialogInventory() zInit( oCViewDialogInventory_OnInit() ); void __fastcall SetInventory( oCNpcInventory* ) zCall( 0x006890D0 ); void __fastcall SetAlignment( oEInventoryAlignment ) zCall( 0x00689100 ); oCItem* __fastcall GetSelectedItem() zCall( 0x00689110 ); int __fastcall GetSelectedItemCount() zCall( 0x00689130 ); oCItem* __fastcall RemoveSelectedItem() zCall( 0x00689150 ); void __fastcall InsertItem( oCItem* ) zCall( 0x006891E0 ); int __fastcall CanHandleLeft() zCall( 0x00689200 ); int __fastcall CanHandleRight() zCall( 0x00689210 ); static zCObject* _CreateNewInstance() zCall( 0x00688F30 ); /* for zCObject num : 15*/ virtual zCClassDef* _GetClassDef() const zCall( 0x00689010 ); virtual ~oCViewDialogInventory() zCall( 0x00689090 ); virtual void __fastcall Activate( int ) zCall( 0x006890B0 ); virtual void __fastcall StartSelection() zCall( 0x00689270 ); virtual void __fastcall StopSelection() zCall( 0x006892D0 ); /* for zCViewBase num : 9*/ /* for oCViewDialogInventory num : 1*/ virtual int HandleEvent( int ) zCall( 0x00689220 ); }; } // namespace Gothic_II_Addon #endif // __OVIEW_DIALOG_INVENTORY_H__VER3__
[ "pierre.beckmann@yahoo.de" ]
pierre.beckmann@yahoo.de
6e2e578b567ffb054e6353663991f748dfefa7e5
b978831035e277137e807c522e9d300d802ca2df
/MARIO/Camera.cpp
71aa011b2b5195f08d60b5a69aa55ae2383926e2
[]
no_license
CathanBertram/SDLProject
fbb73857a4e4895b5e32fce3fa400e715829c5b4
688f36c6b357e02ce98bd42b5ea12a6b56f8331a
refs/heads/master
2021-01-30T12:18:53.350154
2020-04-28T17:17:27
2020-04-28T17:17:27
243,498,874
0
0
null
null
null
null
UTF-8
C++
false
false
597
cpp
#include "Camera.h" Camera::Camera(Rect2D startRect) { mRect = startRect; } Camera::~Camera() { } void Camera::SetPosition(Rect2D rect) { mRect.x = (rect.x + rect.w / 2) - SCREEN_WIDTH / 2; mRect.y = (rect.y + rect.h / 2) - SCREEN_WIDTH / 2; } void Camera::SetLevelDimensions(int w, int h) { levelWidth = w; levelHeight = h; } void Camera::Update() { if (mRect.x < 0) { mRect.x = 0; } if (mRect.y < 0) { mRect.y = 0; } if (mRect.x > levelWidth - mRect.w) { mRect.x = levelWidth - mRect.w; } if (mRect.y > levelHeight - mRect.h) { mRect.y = levelHeight - mRect.h; } }
[ "55544660+CathanBertram@users.noreply.github.com" ]
55544660+CathanBertram@users.noreply.github.com
aa279ae62b91140b13d05d86a2341a63a4dfc139
ea4396937e4786340cf1ba67dfadd89599b09a3b
/EVENTS/GeoClawOpenFOAM/floatingbds.h
82e01b8678accb01180ca78e3f5056f6e5e3825e
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
NHERI-SimCenter/HydroUQ
aca37869aba6d37b79b533bab36066a4ff8be163
d4cbaed1a6f76057cb851a09e0e8996caa02e806
refs/heads/master
2023-08-30T08:21:21.471683
2023-08-23T06:58:32
2023-08-23T06:58:32
264,027,881
4
15
NOASSERTION
2023-08-22T21:50:41
2020-05-14T21:21:22
C++
UTF-8
C++
false
false
403
h
#ifndef FLOATINGBDS_H #define FLOATINGBDS_H #include <QFrame> namespace Ui { class floatingbds; } class floatingbds : public QFrame { Q_OBJECT public: explicit floatingbds(int, QWidget *parent = nullptr); ~floatingbds(); bool getData(QMap<QString, QString>&,int); void refreshData(int); private: void hideshowelems(int); Ui::floatingbds *ui; }; #endif // FLOATINGBDS_H
[ "fmckenna@berkeley.edu" ]
fmckenna@berkeley.edu
49ac46ac43186db66e88cd234fd9e203d7e3de45
21bcedc4fa3f3b352f2a7952588d199a80f0d4a7
/example/socks4a/socks4a.cpp
7eccf7c6581e957df9a19f24af54b0acdafaf9fc
[ "BSD-3-Clause" ]
permissive
liyuan989/blink
c1a4ae4cb92a567ecdf4a12f1db0bec22a6f962a
7a0d1367d800df78a404aeea13527cd9508fbf4d
refs/heads/master
2016-09-05T11:13:37.503470
2015-04-14T11:35:40
2015-04-14T11:35:40
29,411,173
13
2
null
null
null
null
UTF-8
C++
false
false
4,424
cpp
#include <example/socks4a/tunnel.h> #include <blink/Endian.h> #include <netdb.h> #include <stdio.h> using namespace blink; EventLoop* g_loop = NULL; std::map<string, TunnelPtr> g_tunnels; void onServerConnection(const TcpConnectionPtr& connection) { LOG_DEBUG << connection->name() << (connection->connected() ? " UP" : " DOWN"); if (connection->connected()) { connection->setTcpNoDelay(true); } else { std::map<string, TunnelPtr>::iterator it = g_tunnels.find(connection->name()); if (it != g_tunnels.end()) { it->second->disconnect(); g_tunnels.erase(it); } } } void onServerMessage(const TcpConnectionPtr& connection, Buffer* buf, Timestamp receive_time) { LOG_DEBUG << connection->name() << " " << buf->readableSize(); if (g_tunnels.find(connection->name()) == g_tunnels.end()) { if (buf->readableSize() > 128) { connection->shutdown(); } else if (buf->readableSize() > 8) { const char* begin = buf->peek() + 8; const char* end = buf->peek() + buf->readableSize(); const char* where = std::find(begin, end, '\0'); if (where != end) { char ver = buf->peek()[0]; char cmd = buf->peek()[1]; const void* port = buf->peek() + 2; const void* ip = buf->peek() + 4; sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = *static_cast<const in_port_t*>(port); addr.sin_addr.s_addr = *static_cast<const uint32_t*>(ip); bool socks4a = sockets::networkToHost32(addr.sin_addr.s_addr) < 256; bool okay = false; if (socks4a) { const char* end_of_hostname = std::find(where + 1, end, '\0'); if (end_of_hostname != end) { string hostname = where + 1; where = end_of_hostname; LOG_INFO << "socks4a host name: " << hostname; InetAddress temp; if (InetAddress::resolve(hostname, &temp)) { addr.sin_addr.s_addr = temp.ipNetEndian(); okay = true; } } else { return; } } else { okay = true; } InetAddress server_addr(addr); if (ver == 4 && cmd == 1 && okay) { TunnelPtr tunnel(new Tunnel(g_loop, server_addr, connection)); tunnel->setup(); tunnel->connect(); g_tunnels[connection->name()] = tunnel; buf->resetUntil(where + 1); char response[] = "\000\x5aUVWXYZ"; memcpy(response + 2, &addr.sin_port, 2); memcpy(response + 4, &addr.sin_addr.s_addr, 4); connection->send(response, 8); } else { char response[] = "\000\x5bUVWXYZ"; connection->send(response, 8); connection->shutdown(); } } } } else if (!connection->getContext().empty()) { const TcpConnectionPtr& client_connection = boost::any_cast<TcpConnectionPtr>(connection->getContext()); client_connection->send(buf); } } int main(int argc, char* argv[]) { if (argc < 2) { fprintf(stderr, "Usage: %s <listen_port>\n", argv[0]); return 1; } LOG_INFO << "pid = " << getpid() << ", tid = " << current_thread::tid(); uint16_t port = static_cast<uint16_t>(atoi(argv[2])); InetAddress listen_addr(port); EventLoop loop; g_loop = &loop; TcpServer server(&loop, listen_addr, "Socks4a"); server.setConnectionCallback(onServerConnection); server.setMessageCallback(onServerMessage); server.start(); loop.loop(); return 0; }
[ "liyuan989@gmail.com" ]
liyuan989@gmail.com
7243f4c0c8d39b80454c5744141e3de515d27913
8739b721db20897c3729d3aa639f5d08e19b6a30
/Leetcode-cpp-solution/57.cpp
9f17e18ac8f0a5e4b486705f0d6493e2ead595fb
[]
no_license
Leetcode-W010/Answers
817414ca101f2d17050ebc471153fbed81f67cd0
b4fff77ff3093fab76534d96b40e6bf98bef42c5
refs/heads/master
2021-01-19T22:13:49.134513
2015-12-13T01:30:36
2015-12-13T01:30:36
40,616,166
0
1
null
null
null
null
UTF-8
C++
false
false
2,285
cpp
/* Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1: Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9]. Example 2: Given [1,2],[3,5],[6,7],[8,10],[12,16], insert and merge [4,9] in as [1,2],[3,10],[12,16]. This is because the new interval [4,9] overlaps with [3,5],[6,7],[8,10]. */ /** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int s, int e) : start(s), end(e) {} * }; */ class Solution { public: vector<Interval> insert(vector<Interval> &intervals, Interval newInterval) { vector<Interval> rst; int n = intervals.size(); int k = 0; while(k<n && intervals[k].end < newInterval.start) rst.push_back(intervals[k++]); if(k==n || newInterval.end < intervals[k].start) { rst.push_back(newInterval); rst.insert(rst.end(), intervals.begin()+k, intervals.end()); } else { rst.push_back(Interval(min(newInterval.start, intervals[k].start), max(newInterval.end, intervals[k].end))); int i = k+1; while(i < n) { if(intervals[i].start > rst.back().end) break; rst.back().end = max(rst.back().end, intervals[i++].end); } rst.insert(rst.end(), intervals.begin()+i, intervals.end()); } return rst; } }; class Solution { public: vector<Interval> insert(vector<Interval> &intervals, Interval newInterval) { vector<Interval> rst; int n = intervals.size(); int k = 0; while(k<n && intervals[k].end < newInterval.start) rst.push_back(intervals[k++]); if(k<n) newInterval.start = min(newInterval.start, intervals[k].start); while(k<n && intervals[k].start <= newInterval.end) newInterval.end = max(newInterval.end, intervals[k++].end); rst.push_back(newInterval); while(k<n) rst.push_back(intervals[k++]); return rst; } };
[ "vincent.zhang.us@gmail.com" ]
vincent.zhang.us@gmail.com
ee458e9dfe3a5a4b32ca25aa8eee3348a21a77cf
8dd39b654dde37c6cbde38a7e3a5c9838a237b51
/Tiles/main.cpp
a47dca7498b5e5057a888a402a92e24d42e8476e
[]
no_license
Taohid0/C-and-C-Plus-Plus
43726bdaa0dc74860c4170b729e34cea268008fd
d38fd51851cc489302ad4ef6725f1d19f7e72ec2
refs/heads/master
2021-07-19T17:30:26.875749
2017-10-28T09:49:51
2017-10-28T09:49:51
108,636,340
2
0
null
null
null
null
UTF-8
C++
false
false
375
cpp
#include <bits/stdc++.h> using namespace std; int main() { long long l,w,a,row = 0,col = 0; scanf("%lld%lld%lld",&l,&w,&a); if(l%a==0){ row = l/a; } else { row = l/a; row++; } if(w%a==0){ col = w/a; } else { col = w/a; col++; } printf("%lld\n",row*col); return 0; }
[ "taohidulii@gmail.com" ]
taohidulii@gmail.com
e497dd29d2cdc8b67fb0273183975269144dd415
5053643ca7238f10af0e37db9d576816cbf6f3a2
/Pkg/Pkg.HC
84e7e2f32d5ccc4a3c4ac6edb877b23001fa472c
[]
no_license
K1ish/ReggieOS2
13de45f5d5b03cc5a31cb018200b2f9304cb699d
123429de1941780de9f97884c7dd216a9eab5089
refs/heads/master
2020-04-14T12:53:45.369076
2019-01-02T16:16:18
2019-01-02T16:16:18
163,853,668
4
2
null
null
null
null
UTF-8
C++
false
false
11,227
hc
// vim: set ft=cpp: #include "::/Adam/Net/Url" #define PKG_EURL (-20001) #define PKG_EMOUNT (-20002) #define PKG_EMANIFEST (-20003) #define PKG_EVERSION (-20004) #define PKG_EOSVERSION (-20005) #define PKG_EUNSUITABLE (-20006) #define PKG_VERSION 11 static U8* PKG_BASE_URL = "http://shrineupd.clanweb.eu/packages"; static U8* PKG_LOCAL_REPO = "::/Misc/Packages"; static U8* PKG_TMP_DIR = "::/Tmp/PkgTmp"; class CPkgInfo { U8* package_name; I32 pkgmin; I32 release; I32 osmin; I32 osmax; I64 size; U8* version; U8* installdir; U8* iso_c; U8* post_install_doc; }; // TODO: Is there a built-in for this? static U8* StripDir(U8* file_path) { U8* slash = StrLastOcc(file_path, "/"); if (slash) return slash + 1; else return file_path; } U0 PkgInfoInit(CPkgInfo* pinf) { pinf->package_name = 0; pinf->pkgmin = 0x7fffffff; pinf->release = 0; pinf->osmin = 0; pinf->osmax = 0x7fffffff; pinf->size = 0; pinf->version = 0; pinf->installdir = 0; pinf->iso_c = 0; pinf->post_install_doc = 0; } U0 PkgInfoFree(CPkgInfo* pinf) { Free(pinf->package_name); Free(pinf->version); Free(pinf->installdir); Free(pinf->iso_c); Free(pinf->post_install_doc); PkgInfoInit(pinf); } // Returns 0 or error code I64 PkgParseManifest(CPkgInfo* pinf, U8* manifest) { U8* key = manifest; while (*key) { //"?%s", key; U8* end = StrFirstOcc(key, "\n"); if (end) { *end = 0; end++; } else end = key + StrLen(key); U8* value = StrFirstOcc(key, "\t"); if (!value) return PKG_EMANIFEST; *value = 0; value++; //"%s=%s;\n", key, value; if (0) {} else if (!StrCmp(key, "name")) { Free(pinf->package_name); pinf->package_name = StrNew(value); } else if (!StrCmp(key, "pkgmin")) { pinf->pkgmin = Str2I64(value); } else if (!StrCmp(key, "release")) { pinf->release = Str2I64(value); } else if (!StrCmp(key, "osmin")) { pinf->osmin = Str2I64(value); } else if (!StrCmp(key, "osmax")) { pinf->osmax = Str2I64(value); } else if (!StrCmp(key, "size")) { pinf->size = Str2I64(value); } else if (!StrCmp(key, "version")) { Free(pinf->version); pinf->version = StrNew(value); } else if (!StrCmp(key, "installdir")) { Free(pinf->installdir); pinf->installdir = StrNew(value); } else if (!StrCmp(key, "iso.c")) { Free(pinf->iso_c); pinf->iso_c = StrNew(value); } else if (!StrCmp(key, "post-install-doc")) { Free(pinf->post_install_doc); pinf->post_install_doc = StrNew(value); } else { /* unrecognized keys are simply ignored */ } key = end; } return 0; } I64 PkgWriteManifest(CPkgInfo* pinf, U8* path) { // TODO: implement no_warn pinf; FileWrite(path, "", 0); return 0; } // Downloads a package info from the repository. // Returns 0 or error code I64 PkgFetchManifest(CPkgInfo* pinf, U8* package_name) { // Old packages didn't have to specify a name, so we'll keep this for now pinf->package_name = StrNew(package_name); U8* url = MStrPrint("%s/%s", PKG_BASE_URL, package_name); U8* manifest = 0; I64 size = 0; I64 error = UrlGet(url, &manifest, &size); if (error == 0) error = PkgParseManifest(pinf, manifest); Free(manifest); Free(url); return error; } // Get the URL of the package's ISO.C download. // Returns NULL if N/A, otherwise must be Free()d. U8* PkgAllocISOCUrl(CPkgInfo* pinf) { if (!pinf->iso_c) return NULL; // A bit hacky, but will probably always work if (StrFind("//", pinf->iso_c)) return StrNew(pinf->iso_c); else return MStrPrint("%s/%s", PKG_BASE_URL, pinf->iso_c); } // Check if the package metadata makes it viable for installation. // You still need to do PkgCheckCompatibility, dependency resolution, // and check for a suitable installable format. Bool PkgIsInstallable(CPkgInfo* pinf) { return pinf->package_name != NULL && pinf->version != NULL && pinf->installdir != NULL; } // Check if the package is compatible with this OS & Pkg version I64 PkgCheckCompatibility(CPkgInfo* pinf) { if (pinf->pkgmin > PKG_VERSION) { "$FG,6$This package requires a more recent version of $FG,5$Pkg\n"; "$FG$Please update.\n"; return PKG_EVERSION; } I64 osver = ToI64(sys_os_version * 100); if (osver < pinf->osmin) { "$FG,6$This package requires a more recent system version.\n"; "$FG$Please update. (need %d, have %d)\n", pinf->osmin, osver; return PKG_EOSVERSION; } if (osver > pinf->osmax) { "$FG,6$This package is not compatible with your system version.\n"; "$FG$Last supported version is %d, you have %d.\n", pinf->osmax, osver; return PKG_EOSVERSION; } return 0; } I64 PkgRegister(CPkgInfo* pinf) { // TODO: this is very preliminary if (pinf->package_name == NULL) return PKG_EUNSUITABLE; U8* path = MStrPrint("%s/%s", PKG_LOCAL_REPO, pinf->package_name); PkgWriteManifest(pinf, path); return 0; } // Install a package, using the provided ISO.C file. // This will also register the package as installed. I64 PkgInstallISOC(CPkgInfo* pinf, U8* iso_c) { if (pinf->package_name == NULL || pinf->installdir == NULL) return PKG_EUNSUITABLE; I64 error = 0; "Installing %s\n$FG,7$", pinf->package_name; I64 letter = MountFile(iso_c); if (letter) { U8 src_path[8]; StrPrint(src_path, "%c:/", letter); // StrLen check is a temporary hack to not complain about MkDir("::/"); if (StrLen(pinf->installdir) > 3) DirMk(pinf->installdir); CopyTree(src_path, pinf->installdir); // Register package as installed error = PkgRegister(pinf); // Display post-install doc if (pinf->post_install_doc) { Ed(pinf->post_install_doc); } } else error = PKG_EMOUNT; Unmount(letter); "$FG$"; return error; } // Verify, download & install a single package // All dependencies must have been installed at this point. I64 PkgDownloadAndInstall(CPkgInfo* pinf) { I64 error = PkgCheckCompatibility(pinf); if (error) { return error; } U8* iso_c_url = PkgAllocISOCUrl(pinf); if (iso_c_url) { U8* iso_data = 0; I64 iso_size = 0; "Downloading %s...\n", pinf->package_name; error = UrlGetWithProgress(iso_c_url, &iso_data, &iso_size); if (error == 0) { U8* tmppath = "::/Tmp/Package.ISO.C"; FileWrite(tmppath, iso_data, iso_size); error = PkgInstallISOC(pinf, tmppath); } Free(iso_data); Free(iso_c_url); } else { "$FG,6$No suitable download address. Package broken?\n"; error = PKG_EUNSUITABLE; } return error; } // Expected max length: 5 ("1023k") static U8* FormatSize(I64 size) { static U8 buf[16]; if (size > 0x40000000) StrPrint(buf, "%dG", (size + 0x3fffffff) / 0x40000000); else if (size > 0x100000) StrPrint(buf, "%dM", (size + 0xfffff) / 0x100000); else if (size > 0x400) StrPrint(buf, "%dk", (size + 0x3ff) / 0x400); else StrPrint(buf, "%d", size); return buf; } // Install a package using a local manifest file public I64 PkgInstallFromFile(U8* manifest_path) { DirMk(PKG_LOCAL_REPO); CPkgInfo pinf; PkgInfoInit(&pinf); // Parse manifest I64 manifest_size; U8* manifest_file = FileRead(manifest_path, &manifest_size); // This relies on FileRead returning a 0-terminated buffer. // As of v502, this happens for all file systems I64 error = PkgParseManifest(&pinf, manifest_file); if (error == 0) { error = PkgCheckCompatibility(&pinf); if (!error) { if (pinf.iso_c) { PkgInstallISOC(&pinf, pinf.iso_c); } else { "$FG,6$No suitable installable file. Package broken?\n"; error = PKG_EUNSUITABLE; } } else { "$FG,4$PkgCheckCompatibility error: %d\n$FG$", error; } } else { "$FG,4$PkgParseManifest error: %d\n$FG$", error; } PkgInfoFree(&pinf); return error; } // Install a package from the repository public I64 PkgInstall(U8* package_name) { SocketInit(); DirMk(PKG_LOCAL_REPO); CPkgInfo pinf; PkgInfoInit(&pinf); I64 error = PkgFetchManifest(&pinf, package_name); if (error == 0) { if (PkgIsInstallable(&pinf)) { "$FG,8$ Package Ver \n" "$FG,8$ Dir Size \n" "$FG,8$============================\n" "$FG,2$+ %-20s %-6s\n", package_name, pinf.version; "$FG,2$ %-20s %-6s\n", pinf.installdir, FormatSize(pinf.size); "\n" "$FG$Is this ok? (y/n) "; I64 ok = GetKey(NULL, TRUE); "\n"; // TODO: verify all packages before we start downloading if (ok == 'y') { error = PkgDownloadAndInstall(&pinf); if (error == 0) { "$FG,2$Installed 1 package(s)\n"; } else { "$FG,4$PkgDownloadAndInstall error: %d\n$FG$", error; } } } else { "$FG,4$PkgInstall: %s is not installable\n$FG$", package_name; error = PKG_EUNSUITABLE; } } else { "$FG,4$PkgFetchManifest error: %d\n$FG$", error; } PkgInfoFree(&pinf); return error; } // List packages available in the repository public I64 PkgList() { SocketInit(); U8* url = MStrPrint("%s/packages.list", PKG_BASE_URL); U8* list = 0; I64 size = 0; I64 error = UrlGet(url, &list, &size); if (error == 0) { "$FG,2$%s\n", list; /*U8* entry = list; while (*entry) { U8* end = StrFirstOcc(entry, "\n"); if (end) { *end = 0; end++; } else end = value + StrLen(value); "$FG,2$%s\n", entry; entry = end; }*/ } else { "$FG,4$UrlGet error: %d\n$FG$", error; } Free(list); Free(url); return error; } // Build a package from directory contents public I64 PkgMakeFromDir(U8* manifest_path, U8* src_dir) { CPkgInfo pinf; PkgInfoInit(&pinf); // Parse manifest I64 manifest_size; U8* manifest_file = FileRead(manifest_path, &manifest_size); // This relies on FileRead returning a 0-terminated buffer. // As of v502, this happens for all file systems I64 error = PkgParseManifest(&pinf, manifest_file); if (error == 0) { // Build RedSea ISO if (pinf.iso_c) { U8* iso_path = pinf.iso_c; // RedSeaISO doesn't return a proper error code RedSeaISO(iso_path, src_dir); // TODO: update & save manifest /*CDirEntry* de; if (FileFind(iso_path, &de)) { pinf.size = de.size; // Save updated manifest PkgWriteManifest(&pinf, manifest_path); Free(de->full_name); } else { "$FG,6$Something went wrong, can't stat %s.\n", iso_path; error = PKG_EMOUNT; }*/ } else { "$FG,6$No output file defined.\n"; error = PKG_EUNSUITABLE; } } else { "$FG,4$PkgParseManifest error: %d\n$FG$", error; } PkgInfoFree(&pinf); return error; } // Build a package using a single file I64 PkgMakeFromFile(U8* manifest_path, U8* file_path) { DelTree(PKG_TMP_DIR); DirMk(PKG_TMP_DIR); U8* tmppath = MStrPrint("%s/%s", PKG_TMP_DIR, StripDir(file_path)); Copy(file_path, tmppath); I64 error = PkgMakeFromDir(manifest_path, PKG_TMP_DIR); Free(tmppath); return error; }
[ "minexew@gmail.com" ]
minexew@gmail.com
63d4eab90765c1f9c1449ae613d7be8e9b3e2534
0f5f4d0c33e752a35fc71a7762ad7aa904d16c27
/dcmsign/libsrc/sicertvf.cxx
5065c7b680ca2fce8a8b3b81742d4bfdcba347ac
[ "LicenseRef-scancode-warranty-disclaimer", "IJG", "BSD-4.3TAHOE", "LicenseRef-scancode-other-permissive", "xlock", "OFFIS", "BSD-3-Clause", "JasPer-2.0" ]
permissive
trabs/DCMTK
158b945f3740806d6a128d7f4d0a059997d3bacb
d6c163e4c2dcf1831c2efa20aa7752d15b61e67e
refs/heads/master
2021-01-18T06:18:08.748952
2010-03-09T21:36:11
2010-06-14T08:19:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,446
cxx
/* * * Copyright (C) 1998-2005, OFFIS * * This software and supporting documentation were developed by * * Kuratorium OFFIS e.V. * Healthcare Information and Communication Systems * Escherweg 2 * D-26121 Oldenburg, Germany * * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. * * Module: dcmsign * * Author: Marco Eichelberg * * Purpose: * classes: SiCertificateVerifier * * Last Update: $Author: meichel $ * Update Date: $Date: 2005-12-08 15:47:21 $ * CVS/RCS Revision: $Revision: 1.5 $ * Status: $State: Exp $ * * CVS/RCS Log at end of file * */ #include "dcmtk/config/osconfig.h" #ifdef WITH_OPENSSL #include "dcmtk/dcmsign/sicert.h" #include "dcmtk/dcmsign/sicertvf.h" BEGIN_EXTERN_C #include <openssl/pem.h> #include <openssl/x509.h> END_EXTERN_C SiCertificateVerifier::SiCertificateVerifier() : x509store(NULL) , errorCode(0) { x509store = X509_STORE_new(); } SiCertificateVerifier::~SiCertificateVerifier() { if (x509store) X509_STORE_free(x509store); } OFCondition SiCertificateVerifier::addTrustedCertificateFile(const char *fileName, int fileType) { /* fileType should be X509_FILETYPE_PEM or X509_FILETYPE_ASN1 */ X509_LOOKUP *x509_lookup = X509_STORE_add_lookup(x509store, X509_LOOKUP_file()); if (x509_lookup == NULL) return SI_EC_OpenSSLFailure; if (! X509_LOOKUP_load_file(x509_lookup, fileName, fileType)) return SI_EC_CannotRead; return EC_Normal; } OFCondition SiCertificateVerifier::addTrustedCertificateDir(const char *pathName, int fileType) { /* fileType should be X509_FILETYPE_PEM or X509_FILETYPE_ASN1 */ X509_LOOKUP *x509_lookup = X509_STORE_add_lookup(x509store, X509_LOOKUP_hash_dir()); if (x509_lookup == NULL) return SI_EC_OpenSSLFailure; if (! X509_LOOKUP_add_dir(x509_lookup, pathName, fileType)) return SI_EC_CannotRead; return EC_Normal; } OFCondition SiCertificateVerifier::addCertificateRevocationList(const char *fileName, int fileType) { OFCondition result = SI_EC_CannotRead; X509_CRL *x509crl = NULL; if (fileName) { BIO *in = BIO_new(BIO_s_file_internal()); if (in) { if (BIO_read_filename(in, fileName) > 0) { if (fileType == X509_FILETYPE_ASN1) { x509crl = d2i_X509_CRL_bio(in, NULL); if (x509crl) { X509_STORE_add_crl(x509store, x509crl); result = EC_Normal; } } else { x509crl = PEM_read_bio_X509_CRL(in, NULL, NULL, NULL); if (x509crl) { X509_STORE_add_crl(x509store, x509crl); result = EC_Normal; } } } BIO_free(in); } } return result; } OFCondition SiCertificateVerifier::verifyCertificate(SiCertificate& certificate) { errorCode = 0; X509 *rawcert = certificate.getRawCertificate(); if (rawcert == NULL) return SI_EC_VerificationFailed_NoCertificate; X509_STORE_CTX ctx; X509_STORE_CTX_init(&ctx, x509store, rawcert, NULL); int ok = X509_verify_cert(&ctx); /* returns nonzero if successful */ errorCode = X509_STORE_CTX_get_error(&ctx); X509_STORE_CTX_cleanup(&ctx); if (ok) return EC_Normal; else return SI_EC_VerificationFailed_NoTrust; } const char *SiCertificateVerifier::lastError() const { return X509_verify_cert_error_string(errorCode); } #else /* WITH_OPENSSL */ int sicertvf_cc_dummy_to_keep_linker_from_moaning = 0; #endif /* * $Log: sicertvf.cc,v $ * Revision 1.5 2005-12-08 15:47:21 meichel * Changed include path schema for all DCMTK header files * * Revision 1.4 2002/12/16 12:57:50 meichel * Minor modification to shut up linker on MacOS X when compiling * without OpenSSL support * * Revision 1.3 2001/09/26 14:30:24 meichel * Adapted dcmsign to class OFCondition * * Revision 1.2 2001/06/01 15:50:53 meichel * Updated copyright header * * Revision 1.1 2001/01/25 15:11:47 meichel * Added class SiCertificateVerifier in dcmsign which allows to check * whether a certificate from a digital signature is trusted, i.e. issued * by a known CA and not contained in a CRL. * * */
[ "jchris.fillionr@kitware.com" ]
jchris.fillionr@kitware.com
04fa135aab04185ae3f948be8be1d5f43a514754
bb6ebff7a7f6140903d37905c350954ff6599091
/components/plugins/renderer/webview_plugin.cc
1e8399560f09b767cfc76cfb3f69ac336a70d1ae
[ "BSD-3-Clause" ]
permissive
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
faa6602bd6bfd9b9b6277ce3cd16df0bd26e7f2f
ccadf4e63dd34be157281f53fe213d09a8c66d2c
refs/heads/master
2022-12-23T18:07:04.568931
2016-04-11T16:03:36
2016-04-11T16:03:36
53,677,925
0
1
BSD-3-Clause
2022-12-09T23:46:46
2016-03-11T15:49:07
C++
UTF-8
C++
false
false
7,773
cc
// Copyright 2013 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 "components/plugins/renderer/webview_plugin.h" #include "base/message_loop/message_loop.h" #include "base/metrics/histogram.h" #include "base/numerics/safe_conversions.h" #include "content/public/renderer/web_preferences.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/public/platform/WebSize.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" #include "third_party/WebKit/public/web/WebInputEvent.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebPluginContainer.h" #include "third_party/WebKit/public/web/WebView.h" #include "webkit/common/webpreferences.h" using blink::WebCanvas; using blink::WebCursorInfo; using blink::WebDragData; using blink::WebDragOperationsMask; using blink::WebImage; using blink::WebInputEvent; using blink::WebLocalFrame; using blink::WebMouseEvent; using blink::WebPlugin; using blink::WebPluginContainer; using blink::WebPoint; using blink::WebRect; using blink::WebSize; using blink::WebString; using blink::WebURLError; using blink::WebURLRequest; using blink::WebURLResponse; using blink::WebVector; using blink::WebView; WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate, const WebPreferences& preferences) : delegate_(delegate), container_(NULL), web_view_(WebView::create(this)), finished_loading_(false), focused_(false) { // ApplyWebPreferences before making a WebLocalFrame so that the frame sees a // consistent view of our preferences. content::ApplyWebPreferences(preferences, web_view_); web_frame_ = WebLocalFrame::create(this); web_view_->setMainFrame(web_frame_); } // static WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate, const WebPreferences& preferences, const std::string& html_data, const GURL& url) { WebViewPlugin* plugin = new WebViewPlugin(delegate, preferences); plugin->web_view()->mainFrame()->loadHTMLString(html_data, url); return plugin; } WebViewPlugin::~WebViewPlugin() { web_view_->close(); web_frame_->close(); } void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) { if (!response_.isNull()) { plugin->didReceiveResponse(response_); size_t total_bytes = 0; for (std::list<std::string>::iterator it = data_.begin(); it != data_.end(); ++it) { plugin->didReceiveData( it->c_str(), base::checked_cast<int, size_t>(it->length())); total_bytes += it->length(); } UMA_HISTOGRAM_MEMORY_KB( "PluginDocument.Memory", (base::checked_cast<int, size_t>(total_bytes / 1024))); UMA_HISTOGRAM_COUNTS( "PluginDocument.NumChunks", (base::checked_cast<int, size_t>(data_.size()))); } // We need to transfer the |focused_| to new plugin after it loaded. if (focused_) { plugin->updateFocus(true); } if (finished_loading_) { plugin->didFinishLoading(); } if (error_) { plugin->didFailLoading(*error_); } } void WebViewPlugin::RestoreTitleText() { if (container_) container_->element().setAttribute("title", old_title_); } WebPluginContainer* WebViewPlugin::container() const { return container_; } bool WebViewPlugin::initialize(WebPluginContainer* container) { container_ = container; if (container_) old_title_ = container_->element().getAttribute("title"); return true; } void WebViewPlugin::destroy() { if (delegate_) { delegate_->PluginDestroyed(); delegate_ = NULL; } container_ = NULL; base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); } NPObject* WebViewPlugin::scriptableObject() { return NULL; } struct _NPP* WebViewPlugin::pluginNPP() { return NULL; } bool WebViewPlugin::getFormValue(WebString& value) { return false; } void WebViewPlugin::paint(WebCanvas* canvas, const WebRect& rect) { gfx::Rect paint_rect = gfx::IntersectRects(rect_, rect); if (paint_rect.IsEmpty()) return; paint_rect.Offset(-rect_.x(), -rect_.y()); canvas->translate(SkIntToScalar(rect_.x()), SkIntToScalar(rect_.y())); canvas->save(); web_view_->layout(); web_view_->paint(canvas, paint_rect); canvas->restore(); } // Coordinates are relative to the containing window. void WebViewPlugin::updateGeometry(const WebRect& frame_rect, const WebRect& clip_rect, const WebVector<WebRect>& cut_out_rects, bool is_visible) { if (static_cast<gfx::Rect>(frame_rect) != rect_) { rect_ = frame_rect; WebSize newSize(frame_rect.width, frame_rect.height); web_view_->setFixedLayoutSize(newSize); web_view_->resize(newSize); } } void WebViewPlugin::updateFocus(bool focused) { focused_ = focused; } bool WebViewPlugin::acceptsInputEvents() { return true; } bool WebViewPlugin::handleInputEvent(const WebInputEvent& event, WebCursorInfo& cursor) { // For tap events, don't handle them. They will be converted to // mouse events later and passed to here. if (event.type == WebInputEvent::GestureTap) return false; if (event.type == WebInputEvent::ContextMenu) { if (delegate_) { const WebMouseEvent& mouse_event = reinterpret_cast<const WebMouseEvent&>(event); delegate_->ShowContextMenu(mouse_event); } return true; } current_cursor_ = cursor; bool handled = web_view_->handleInputEvent(event); cursor = current_cursor_; return handled; } void WebViewPlugin::didReceiveResponse(const WebURLResponse& response) { DCHECK(response_.isNull()); response_ = response; } void WebViewPlugin::didReceiveData(const char* data, int data_length) { data_.push_back(std::string(data, data_length)); } void WebViewPlugin::didFinishLoading() { DCHECK(!finished_loading_); finished_loading_ = true; } void WebViewPlugin::didFailLoading(const WebURLError& error) { DCHECK(!error_.get()); error_.reset(new WebURLError(error)); } bool WebViewPlugin::acceptsLoadDrops() { return false; } void WebViewPlugin::setToolTipText(const WebString& text, blink::WebTextDirection hint) { if (container_) container_->element().setAttribute("title", text); } void WebViewPlugin::startDragging(WebLocalFrame*, const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint&) { // Immediately stop dragging. web_view_->dragSourceSystemDragEnded(); } bool WebViewPlugin::allowsBrokenNullLayerTreeView() const { return true; } void WebViewPlugin::didInvalidateRect(const WebRect& rect) { if (container_) container_->invalidateRect(rect); } void WebViewPlugin::didChangeCursor(const WebCursorInfo& cursor) { current_cursor_ = cursor; } void WebViewPlugin::didClearWindowObject(WebLocalFrame* frame) { if (delegate_) delegate_->BindWebFrame(frame); } void WebViewPlugin::didReceiveResponse(WebLocalFrame* frame, unsigned identifier, const WebURLResponse& response) { WebFrameClient::didReceiveResponse(frame, identifier, response); }
[ "mrobbeloth@pdiarm.com" ]
mrobbeloth@pdiarm.com
3d18f64fb5d59efd4dec079acec1f5568223df5d
04c6d6a2534fa2e63aba918f2c038f45915ff828
/动态规划/1692. Count Ways to Distribute Candies.cpp
0bbae857363e0f2dce3f38ac449e717dac8e8c62
[]
no_license
ttzztztz/leetcodeAlgorithms
7fdc15267ba9e1304f7c817ea9d3f1bd881b004b
d2ee1c8fecb8fc07e3c7d67dc20b964a606e065c
refs/heads/master
2023-08-19T10:50:40.340415
2023-08-02T03:00:38
2023-08-02T03:00:38
206,009,736
17
3
null
null
null
null
UTF-8
C++
false
false
587
cpp
class Solution { public: int waysToDistribute(int n, int k) { memset(f, 0xff, sizeof f); this->n = n, this->k = k; return dfs(1, 1); } private: const int mod = 1e9+7; typedef long long ll; ll f[1005][1005]; int n, k; ll dfs(int i, int j) { if (i == n) return (j == k) ? 1 : 0; ll& val = f[i][j]; if (val != -1) return val; ll ans = 0; ans = (ans + j * dfs(i + 1, j)) % mod; if (j + 1 <= k) ans = (ans + dfs(i + 1, j + 1)) % mod; return val = ans; } };
[ "ttzztztz@outlook.com" ]
ttzztztz@outlook.com
0fe6e67180977feb868005c20c1a31f3355aaed8
3813382c4d9c2b252c3e3091d281c4fba900323f
/boost_asio/timer/using_a_timer_synchronously.cpp
d3e03cf504dea562605d18b97c8c82c522b554d5
[]
no_license
sunooms/learn
0f0073b7f7225232b3e300389fabeb5c3c4ed6e3
514bb14025d1865977254148d3571ce6bec01fab
refs/heads/master
2021-01-17T18:35:50.774426
2018-01-30T04:33:03
2018-01-30T04:33:03
71,538,410
0
0
null
null
null
null
UTF-8
C++
false
false
378
cpp
#include <iostream> #include <boost/asio.hpp> #include <boost/date_time/posix_time/posix_time.hpp> int main() { boost::asio::io_service io; //boost::asio::deadline_timer t(io, boost::posix_time::second(2)); boost::asio::deadline_timer t(io, boost::posix_time::milliseconds(600)); t.wait(); std::cout << "Hello, world, xgm!" << std::endl; return 0; }
[ "xgmlovebee@126.com" ]
xgmlovebee@126.com
63892ce09de071b7d33fe9ee9d3dee112eaa43f5
d73e4912c604f8073364df416f347f9f2c7a4775
/acm/20180505/h.cpp
fe9fcf2cc4c2321ff93e5ac016d784590436df69
[]
no_license
TachoMex/club-algoritmia-cutonala
9a2efc2c19eae790558940759ba21e970a963752
ddd28a22b127cda609310b429a3466795f970212
refs/heads/master
2020-03-15T17:34:56.771129
2018-05-06T18:08:03
2018-05-06T18:08:03
132,264,864
0
0
null
null
null
null
UTF-8
C++
false
false
492
cpp
#include <iostream> #include <string> using namespace std; char cypher(char c, int k){ if(c >= 'A' && c <= 'Z'){ return ((c - 'A') + k) % 26 + 'A'; } return c; } int main(){ cin.tie(0); cin.sync_with_stdio(0); int t; cin >> t; while(t--){ int n, k; cin >> n >> k; string s; cin.ignore(); for(int i = 0; i < n; i++){ getline(cin, s); for(char c: s){ cout << cypher(c, k); } cout << '\n'; } } return 0; }
[ "tachoguitar@gmail.com" ]
tachoguitar@gmail.com
47415f8da5c54b2ce37b4ba79be2e2db7b8487ac
77444adf8e53fd71923f946864307664e61d8066
/src_/SphMutexLock.cc
f3fe4ffc30b0088d5549dc635eff042ef633764b
[]
no_license
zhanMingming/MiniCacheServer
17f1918fba8ec84649e3307ea1496516413d16e0
5b3a3480706760f27e11380d12a0e8f625d63323
refs/heads/master
2021-06-18T03:23:49.652665
2017-06-13T13:38:01
2017-06-13T13:38:01
94,216,047
2
0
null
null
null
null
UTF-8
C++
false
false
677
cc
#include"SphMutexLock.h" #include"common.h" namespace zhanmm { SphMutexLock::SphMutexLock() { int ret = pthread_mutex_init(&m_mutex, NULL); CHECK((ret == -1),"pthread_mutex_init"); } void SphMutexLock::lock() { int ret = pthread_mutex_lock(&m_mutex); CHECK((ret == -1),"pthread_mutex_lock"); } void SphMutexLock::unlock() { int ret = pthread_mutex_unlock(&m_mutex); CHECK((ret == -1), "pthread_mutex_unlock"); } pthread_mutex_t* SphMutexLock::getMutexPtr() { return &m_mutex; } SphMutexLock::~SphMutexLock() { int ret = pthread_mutex_destroy(&m_mutex); CHECK((ret == -1),"pthread_mutex_destroy"); } } // namespace zhanmm
[ "1358732502@qq.com" ]
1358732502@qq.com
d23426c998deaf612703c933ecd393d84b43be60
de8525032ab89b4f7d5e6ad8b4db396d02cff421
/cpp(还没清理)/P1469 找筷子.cpp
4765f21419e3fcbab8f6852886462cbaf7112d38
[]
no_license
1753262762/CPP
a99c0a714f707dd9e87ebdb8f6242cef2d878d30
fa1505ac30027006114aa54e4b49226e035f7ca0
refs/heads/master
2020-06-04T21:10:56.605120
2019-06-16T13:53:37
2019-06-16T13:53:37
192,193,445
1
0
null
null
null
null
UTF-8
C++
false
false
269
cpp
#include<bits/stdc++.h> using namespace std; int x[100000000]; int main() { int n,sum; cin>>n; for(int i=1;i<=n;i++) { cin>>sum; x[sum]++; } for(int i=1;i<=100000000;i++) { if(x[i]%2!=0) { cout<<i; break; } } return 0; }
[ "noreply@github.com" ]
1753262762.noreply@github.com
528422c0f4913fa1c0d31a565704bb0ac5a7feb0
bc893922087e0894dbe3f0963fbda231c6b7af61
/Monitor/widget.h
903c005d8f2ef40403c238a1a73e228fc9a710c9
[]
no_license
FreiheitZZ/BusLogTool
1946e3eb74e15804f0a02a9f7d0b0a0953a38e4f
8b5c85b23b39a09f641f4d82215e563da813bb62
refs/heads/master
2021-01-09T14:13:37.592845
2020-02-22T12:16:03
2020-02-22T12:16:03
242,331,759
0
0
null
null
null
null
UTF-8
C++
false
false
1,152
h
#ifndef WIDGET_H #define WIDGET_H #include <QWidget> #include <QSerialPort> #include <QSerialPortInfo> #include <QComboBox> #include <QPushButton> #include <QTextEdit> #include <QTextCursor> #include <QTextCharFormat> #include <QTimer> #define USB_VAL_DLE 0x9F #define USB_VAL_STX 0x02 #define USB_VAL_ETX 0x03 namespace Ui { class Widget; } class Widget : public QWidget { Q_OBJECT public: explicit Widget(QWidget *parent = 0); ~Widget(); void initUI(); void USB_sendData(unsigned char * pData, unsigned char size); QStringList getPortNameList();//获取所有可用的串口列表 void openPort();//打开串口 void update_com_num(); public slots: void receiveInfo(); // void BaudRateChange(); void timerUpDate(); private: Ui::Widget *ui; QSerialPort* m_serialPort; //串口类 QStringList m_portNameList; QComboBox* m_PortNameComboBox; QComboBox* m_BaudRateComboBox; QComboBox* m_StopBitsComboBox; QComboBox* m_ParityComboBox; QComboBox* m_DataBitsComboBox; QPushButton* m_OpenPortButton; QTextEdit *textEdit; QTimer *timer; }; #endif // WIDGET_H
[ "791326847@qq.com" ]
791326847@qq.com
4255b2c9baa386543a7999f37be09b3fa9328a8f
27f523d6a32be8ad2f1a60bb1d7c48c96ef66627
/sudoku.cpp
bcb587d7cc3be71053f51a2a4da3aed9fb2db606
[]
no_license
thariqabdul018/Undo-Sudoku
6a75f731ded359f41c3a2e5434eeaa739ae9a004
bfd1967cc5d60bc860af46d38013bfaeee6bc29c
refs/heads/master
2020-03-11T23:07:54.989110
2018-04-20T05:27:05
2018-04-20T05:27:05
130,313,030
0
0
null
null
null
null
UTF-8
C++
false
false
1,595
cpp
#include<iostream> #include"sudoku.h" using namespace std; int main(int argc, char* argv[]){ int row, column, number; string filename; vector<vector<int>>theBoard(BoardSize, vector<int>(BoardSize)); vector<vector<int>>originalBoard(BoardSize,vector<int>(BoardSIze)); switch(){ case 1: cout<<"Pastikan berikan parameter pada program\n"; exit(1); case 2: filename = argv[1]; break; default: cout<<"Pastikan berikan parameter pada program\n"; exit(1); } createBoard(theBoard); populateBoardFromFile(theBoard, filename); createBoard(originalBoard); populateBoardFromFile(originalBoard,filename); cout<<"Selamat bermain sudoku\n"; string userChoice = ""; do{ cout<<"Masukkan Pilihanmu (print, write, erase, quit): "; cin>> userChoice; if(userChoice == "print"){ printBoard(theBoard); continue; } if(userChoice == "write"){ cout<<"Input Row: "; cin>>row; cout<<"Input Column: "; cin>>column; cout<<"Input Number: "; cin>>number; if(fixedValues(theBoard, row, column)==false && CheckRow(theBoard, row, number) == false){ theBoard[(row-1)][(column-1)]=number; printBoard(theBoard); }else{ cout<<"\n"; } continue; } if(userChoice=="erase"){ cout<<"Input Row: "; cin>>row; cout<<"Input Column: "; cin>>column; if(erase(originalBoard, row, column) == false){ theBoard[(row-1)][(column-1)]=Empty; printBoard(theBoard); }else{ cout<<"Error: Mencoba menghapus angka\n"; } continue; } } }
[ "noreply@github.com" ]
thariqabdul018.noreply@github.com
66dd1063c993c3e46e269a0e9f36e6a12314d1fe
594b8ec2e0f3f088c8c77da2cd339e9d7c6b012c
/software/test_dir/teensy_test/src/main.cpp
96249a59fc0a36cabebffcec7c2b30badb6146ca
[ "MIT" ]
permissive
benoitlx/SpotAI
7f820bb90c6544637b3a02b1335ebcff07e8db54
2b546c1f341a32519a21befc6eec43932fc85d36
refs/heads/main
2023-07-06T09:53:25.716792
2021-08-10T13:21:56
2021-08-10T13:21:56
384,997,174
0
0
null
null
null
null
UTF-8
C++
false
false
2,011
cpp
#include <Arduino.h> #include <ArduinoJson.h> #include "Wire.h" #include <Adafruit_PWMServoDriver.h> #include <MPU6050_light.h> #include <tof10120.h> #include <servos.h> /* I2C adresses */ #define LID_ADR 0x52 #define LID1_ADR 0x54 #define DRV_ADR 0x40 #define PWM_FREQ 50.0 /* Instanciation */ MPU6050 mpu(Wire); TOF10120 lid(Wire, LID_ADR); TOF10120 lid1(Wire, LID1_ADR); Adafruit_PWMServoDriver driver = Adafruit_PWMServoDriver(DRV_ADR, Wire); Servos servo(driver, PWM_FREQ); long timer = 0; void sendSerial(){ StaticJsonDocument<192> data; data[F("dist0")] = lid.getDistance(); data[F("dist1")] = lid1.getDistance(); data["temp"] = mpu.getTemp(); JsonObject acc = data.createNestedObject("acc"); acc["x"] = mpu.getAccX(); acc["y"] = mpu.getAccY(); acc["z"] = mpu.getAccZ(); JsonObject gyro = data.createNestedObject("gyro"); gyro["x"] = mpu.getGyroX(); gyro["y"] = mpu.getGyroY(); gyro["z"] = mpu.getGyroZ(); JsonObject acc_angle = data.createNestedObject("acc_angle"); acc_angle["x"] = mpu.getAccAngleX(); acc_angle["y"] = mpu.getAccAngleY(); JsonObject angle = data.createNestedObject("angle"); angle["x"] = mpu.getAngleX(); angle["y"] = mpu.getAngleY(); angle["z"] = mpu.getAngleZ(); serializeJson(data, Serial); } /* Setup */ void setup() { // Initialize Serial Serial.begin(9600); while(!Serial){;} // wait for usb to be connected // Initialize I2C Wire.begin(); // Initialize Accelerometer and gyroscope byte status = mpu.begin(); // while(status!=0){ } // stop everything if could not connect to MPU6050 delay(1000); mpu.calcOffsets(true,true); // gyro and accelero // Initialize Servo Driver servo.begin(); // start servo driver } /* Loop */ void loop() { //9.3% if(millis() - timer > 250){ // print data every second mpu.update(); lid.update(); lid1.update(); sendSerial(); timer = millis(); } // loop to run neural network (every 1ms) and apply changes on the servos }
[ "benoitleroux41@gmail.com" ]
benoitleroux41@gmail.com
dff6015562e22292dcb10e954ff9fd59171e3596
75b2c819261dc7e2ba6cc094da670bcf18d804e8
/Perfect Squares Solution.cpp
6dfb42f768310a5b9d6f65b8cb5265ea41322ae6
[]
no_license
Rakshana0802/June-Leetcode-Challenge
a9bae8f24e3889a198012c4f6beeab77d541cf0c
cde9fd257d637b2e51d113578e9ed78093f7d333
refs/heads/master
2022-11-08T23:59:24.011587
2020-06-30T16:36:50
2020-06-30T16:36:50
268,893,190
1
0
null
null
null
null
UTF-8
C++
false
false
319
cpp
#define INF 1e9 class Solution { public: int numSquares(int n) { vector < int > dp(n+1,INF); dp[0] = 0; for(int i =1;i*i<=n;i++) { int x = i*i; for(int j = x;j<=n;j++) { dp[j] = min(dp[j],1+dp[j-x]); } } return dp[n]; } };
[ "noreply@github.com" ]
Rakshana0802.noreply@github.com
3575c98b38fed5aa22f0a31add46d666c419fe6c
f78fe5ddcad822fb7e484cc3ffa5df6b9305cb6c
/src/Nodes/Dynamics/Shaper.h
b2e6d8190493d098525d2e10cdc06216b46f9e4b
[ "MIT" ]
permissive
potrepka/DSP
5c993fda13f0a28aa8debca1930771bdecaa2ac8
0ffe314196efcd016cdb4ffff27ada0f326e50c3
refs/heads/master
2023-05-28T01:49:34.453472
2021-06-20T05:36:52
2021-06-20T05:36:52
270,168,511
0
1
null
null
null
null
UTF-8
C++
false
false
732
h
#pragma once #include "../Core/Transformer.h" namespace dsp { class Shaper : public Transformer { public: struct Mode { static const int MIN = 0; static const int MAX = 1; static const int HYPERBOLIC = 0; static const int RATIONAL = 1; }; Shaper(Space space = Space::TIME); std::shared_ptr<Input> getDrive() const; std::shared_ptr<Input> getMode() const; Sample getOutputSignal(size_t channel, Sample input); protected: void processNoLock() override; private: const std::shared_ptr<Input> drive; const std::shared_ptr<Input> mode; static Sample getOutputSignal(const Sample &input, const Sample &drive, const Sample &mode); }; } // namespace dsp
[ "nspotrepka@gmail.com" ]
nspotrepka@gmail.com
da76f577d2d38a868eb4ec05d51ffb01f4fc2103
902e56e5eb4dcf96da2b8c926c63e9a0cc30bf96
/LibsExternes/Includes/boost/iostreams/detail/adapter/range_adapter.hpp
e7f2874dc2a3c0b10a37e90e2a0c7be6b8f64fe6
[ "BSD-3-Clause" ]
permissive
benkaraban/anima-games-engine
d4e26c80f1025dcef05418a071c0c9cbd18a5670
8aa7a5368933f1b82c90f24814f1447119346c3b
refs/heads/master
2016-08-04T18:31:46.790039
2015-03-22T08:13:55
2015-03-22T08:13:55
32,633,432
2
0
null
null
null
null
UTF-8
C++
false
false
6,603
hpp
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2003-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for documentation. #ifndef BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED #define BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include <algorithm> // min. #include <cassert> #include <cstddef> // ptrdiff_t. #include <iosfwd> // streamsize, streamoff. #include <boost/detail/iterator.hpp> // boost::iterator_traits. #include <boost/iostreams/categories.hpp> #include <boost/iostreams/detail/error.hpp> #include <boost/iostreams/positioning.hpp> #include <boost/mpl/if.hpp> #include <boost/throw_exception.hpp> #include <boost/type_traits/is_convertible.hpp> #include <boost/utility/enable_if.hpp> // Must come last. #include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC. namespace boost { namespace iostreams { namespace detail { // Used for simulated tag dispatch. template<typename Traversal> struct range_adapter_impl; // // Template name: range_adapter // Description: Device based on an instance of boost::iterator_range. // Template paramters: // Mode - A mode tag. // Range - An instance of iterator_range. // template<typename Mode, typename Range> class range_adapter { private: typedef typename Range::iterator iterator; typedef boost::detail::iterator_traits<iterator> iter_traits; typedef typename iter_traits::iterator_category iter_cat; public: typedef typename Range::value_type char_type; struct category : Mode, device_tag { }; typedef typename mpl::if_< is_convertible< iter_cat, std::random_access_iterator_tag >, std::random_access_iterator_tag, std::forward_iterator_tag >::type tag; typedef range_adapter_impl<tag> impl; explicit range_adapter(const Range& rng); range_adapter(iterator first, iterator last); std::streamsize read(char_type* s, std::streamsize n); std::streamsize write(const char_type* s, std::streamsize n); std::streampos seek(stream_offset off, BOOST_IOS::seekdir way); private: iterator first_, cur_, last_; }; //------------------Implementation of range_adapter---------------------------// template<typename Mode, typename Range> range_adapter<Mode, Range>::range_adapter(const Range& rng) : first_(rng.begin()), cur_(rng.begin()), last_(rng.end()) { } template<typename Mode, typename Range> range_adapter<Mode, Range>::range_adapter(iterator first, iterator last) : first_(first), cur_(first), last_(last) { } template<typename Mode, typename Range> inline std::streamsize range_adapter<Mode, Range>::read (char_type* s, std::streamsize n) { return impl::read(cur_, last_, s, n); } template<typename Mode, typename Range> inline std::streamsize range_adapter<Mode, Range>::write (const char_type* s, std::streamsize n) { return impl::write(cur_, last_, s, n); } template<typename Mode, typename Range> std::streampos range_adapter<Mode, Range>::seek (stream_offset off, BOOST_IOS::seekdir way) { impl::seek(first_, cur_, last_, off, way); return offset_to_position(cur_ - first_); } //------------------Implementation of range_adapter_impl----------------------// template<> struct range_adapter_impl<std::forward_iterator_tag> { template<typename Iter, typename Ch> static std::streamsize read (Iter& cur, Iter& last, Ch* s,std::streamsize n) { std::streamsize rem = n; // No. of chars remaining. while (cur != last && rem-- > 0) *s++ = *cur++; return n - rem != 0 ? n - rem : -1; } template<typename Iter, typename Ch> static std::streamsize write (Iter& cur, Iter& last, const Ch* s, std::streamsize n) { while (cur != last && n-- > 0) *cur++ = *s++; if (cur == last && n > 0) boost::throw_exception(write_area_exhausted()); return n; } }; template<> struct range_adapter_impl<std::random_access_iterator_tag> { template<typename Iter, typename Ch> static std::streamsize read (Iter& cur, Iter& last, Ch* s,std::streamsize n) { std::streamsize result = (std::min)(static_cast<std::streamsize>(last - cur), n); if (result) std::copy(cur, cur + result, s); cur += result; return result != 0 ? result : -1; } template<typename Iter, typename Ch> static std::streamsize write (Iter& cur, Iter& last, const Ch* s, std::streamsize n) { std::streamsize count = (std::min)(static_cast<std::streamsize>(last - cur), n); std::copy(s, s + count, cur); cur += count; if (count < n) boost::throw_exception(write_area_exhausted()); return n; } template<typename Iter> static void seek ( Iter& first, Iter& cur, Iter& last, stream_offset off, BOOST_IOS::seekdir way ) { using namespace std; switch (way) { case BOOST_IOS::beg: if (off > last - first || off < 0) boost::throw_exception(bad_seek()); cur = first + off; break; case BOOST_IOS::cur: { std::ptrdiff_t newoff = cur - first + off; if (newoff > last - first || newoff < 0) boost::throw_exception(bad_seek()); cur += off; break; } case BOOST_IOS::end: if (last - first + off < 0 || off > 0) boost::throw_exception(bad_seek()); cur = last + off; break; default: assert(0); } } }; } } } // End namespaces detail, iostreams, boost. #include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC. #endif // #ifndef BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED //---------------//
[ "contact@anima-games.com@bd273c4a-bd8d-77bb-0e36-6aa87360798c" ]
contact@anima-games.com@bd273c4a-bd8d-77bb-0e36-6aa87360798c
8ec3ae167cb5d310cef5847acafb6e790ba793ee
181841bfa62a45d123db5696913ed9ae62c17998
/C06/ex01/main.cpp
aaff0b56d57fb98fe36d2b2ee408fd663b276f4c
[]
no_license
PennyBlack2008/CPP_Practice
fadaaaa9f28abe5bfc673de88b47a1940a3b6378
ee2a7fe13f97427645061ab8fe35cab0f95121f5
refs/heads/master
2023-04-03T11:30:33.525216
2021-04-20T11:20:02
2021-04-20T11:20:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,053
cpp
#include <string> #include <iostream> struct Data { std::string s1; int n; std::string s2; }; // 8글자인 랜덤 문자열(알파벳or숫자) + 랜덤 int형 변수+ 8글자인 랜덤 문자열(알파벳or숫자) // 데이터를 직렬화함 void *serialize(void) { std::string s1 = ""; std::string s2 = ""; char *ptr; char alphanum[] = "0123456789abcdefghijklmnopqrstuvwxyz"; int integer; srand(clock()); // 난수를 위해 사용하는 함수 for (int i = 0; i < 8; i++) { s1 += alphanum[rand() % 35]; // 8글자의 랜덤 문자열(알파벳or숫자) s2 += alphanum[rand() % 35]; // 8글자의 랜덤 문자열(알파벳or숫자) } integer = rand(); // 랜덤 int형변수를 반환하는 함수 ptr = new char[sizeof(s1) + sizeof(integer) + sizeof(s2)]; // 문자열2개의 크기와 int형변수의 크기만큼 메모리 할당 std::cout<<"s1 : "<<s1<<'\n'; std::cout<<"integer : "<<integer<<'\n'; std::cout<<"s2 : "<<s2<<'\n'; memcpy(ptr, &s1, 24); // ptr = s1 memcpy(ptr + 24, &integer, 4); // ptr = s1 + integer memcpy(ptr + 28, &s2, 24); // ptr = s1 + integer + s2 return (ptr); } // 데이터를 역직렬화함 Data *deserialize(void *raw) { Data *dd = new Data; // reinterpret_cast<char*>(raw) 해도됨 dd->s1 = static_cast<char*>(raw); // raw 가리키기 // 8byte만큼 이동하기위해 먼저 static_cast<char*>(raw) // dd->n = *static_cast<int*>(static_cast<char*>(raw) + 24); // 에러 dd->n = *reinterpret_cast<int*>(static_cast<char*>(raw) + 24); // raw+24 이후로 int 크기만큼 데이터 담기 dd->s2 = static_cast<char*>(raw) + 28; // raw+28 가리키기 return (dd); } int main(void) { char *ptr = static_cast<char*>(serialize()); // 랜덤데이터의 직렬화 Data *des = deserialize(ptr); // 랜덤데이터를 역직렬화 std::cout << des->s1 << std::endl; std::cout << des->n << std::endl; std::cout << des->s2 << std::endl; delete des; }
[ "jikang@c6r10s6.42seoul.kr" ]
jikang@c6r10s6.42seoul.kr
eff5a5c9a919bd99db0e2bb30be0cb2060033c79
9f6bcff0c65df44a6ba3a31b852b8446edc01d96
/code/cpp/engine/system/TouchDefines.h
50cdd409d3ba56065d6e4b0820badf9aaa6b3d30
[]
no_license
eddietree/FunkEngine-Public
15cdf6b50d610c6f476df97449cc9282df790117
ed1401c77a4696843ea2abcd5a49c2ceac644f8f
refs/heads/master
2021-03-12T22:44:18.187011
2014-01-05T05:04:58
2014-01-05T05:04:58
15,035,148
21
2
null
2014-01-05T05:04:59
2013-12-09T01:26:30
C
UTF-8
C++
false
false
1,967
h
#pragma once #include <math/v2.h> #include <math/v3.h> #include <math/v4.h> #include <math/matrix.h> #include <math/Box3.h> #include <gm/gmVariable.h> #include <stdint.h> namespace funk { enum TouchEventType { TOUCHEVENT_BEGIN, TOUCHEVENT_MOVE, TOUCHEVENT_STATIONARY, TOUCHEVENT_END, TOUCHEVENT_CANCEL, // used for counting TOUCHEVENT_COUNT, }; enum TouchCollisionType { COLLISIONTYPE_BOX, COLLISIONTYPE_SPHERE, COLLISIONTYPE_PLANE, COLLISIONTYPE_TRIANGLE, COLLISIONTYPE_DISK, COLLISIONTYPE_QUAD, // used for counting COLLISIONTYPE_COUNT, }; enum TouchLayer { TOUCHLAYER_HUD, TOUCHLAYER_SCENE, TOUCHLAYER_BG, // used for counting TOUCHLAYER_COUNT, }; struct TouchInput { uint32_t id; float timestamp_begin; float timestamp; TouchEventType state; int tap_count; v2 pos; // current position v2 pos_prev; // previous movement (not previous frame) v2 pos_start; // on touch start }; // users must register callbacks and provide collision data struct TouchListenerCallBack { // callback: obj_this:callback(intersect_pt, callback_param) gmVariable callback_obj; gmVariable callback_func; gmVariable callback_param; TouchLayer layer; TouchEventType event; // collision union CollisionDataUnion { struct { v3 box_center; v3 box_dimen; }; struct // Plane (Ax+By+Cz+D=0) { v4 plane; }; struct // Sphere { v3 sphere_center; float sphere_radius; }; struct // Disk { v3 disk_center; v3 disk_normal; float disk_radius; }; struct // Triangle { v3 tri_pt0; v3 tri_pt1; v3 tri_pt2; }; struct // Quad { v3 quad_pt0; v3 quad_pt1; v3 quad_pt2; v3 quad_pt3; }; CollisionDataUnion(){} } collision_data; TouchCollisionType collision_type; // no scaling!! matrix collision_model_matrix; }; }
[ "eddie@illogictree.com" ]
eddie@illogictree.com
ad9b21017a47f197801482d82b3f0ae22887270f
c7120eeec717341240624c7b8a731553494ef439
/src/cplusplus/freezone-samp/src/npc_dev.cpp
82131045a610163017c7ffb65507a1f5fabfeaad
[]
no_license
neverm1ndo/gta-paradise-sa
d564c1ed661090336621af1dfd04879a9c7db62d
730a89eaa6e8e4afc3395744227527748048c46d
refs/heads/master
2020-04-27T22:00:22.221323
2010-09-04T19:02:28
2010-09-04T19:02:28
174,719,907
1
0
null
2019-03-09T16:44:43
2019-03-09T16:44:43
null
WINDOWS-1251
C++
false
false
16,350
cpp
#include "config.hpp" #include "npc_dev.hpp" #include "core/module_c.hpp" #include "core/npcs.hpp" #include "vehicles.hpp" #include "weapons.hpp" #include "player_money.hpp" #include <fstream> #include <boost/filesystem.hpp> REGISTER_IN_APPLICATION(npc_dev); npc_dev::npc_dev() :play_npc_name("npc_dev_play") ,play_record_vehicle_id(0) { } npc_dev::~npc_dev() { } void npc_dev::create() { command_add("npc_dev_record", std::tr1::bind(&npc_dev::cmd_record, this, std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3, std::tr1::placeholders::_4, std::tr1::placeholders::_5), cmd_game, std::tr1::bind(&npc_dev::access_checker, this, std::tr1::placeholders::_1, std::tr1::placeholders::_2)); command_add("npc_dev_play", std::tr1::bind(&npc_dev::cmd_play, this, std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3, std::tr1::placeholders::_4, std::tr1::placeholders::_5), cmd_game, std::tr1::bind(&npc_dev::access_checker, this, std::tr1::placeholders::_1, std::tr1::placeholders::_2)); command_add("npc_dev_create_vehicle", std::tr1::bind(&npc_dev::cmd_create_vehicle, this, std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3, std::tr1::placeholders::_4, std::tr1::placeholders::_5), cmd_game, std::tr1::bind(&npc_dev::access_checker, this, std::tr1::placeholders::_1, std::tr1::placeholders::_2)); } void npc_dev::configure_pre() { is_enable = false; recording_vehicle_health = 1000.0f; acceleration_multiplier = 1.2f; deceleration_multiplier = 0.8f; } void npc_dev::configure(buffer::ptr const& buff, def_t const& def) { SERIALIZE_ITEM(is_enable); SERIALIZE_ITEM(recording_vehicle_health); SERIALIZE_ITEM(acceleration_multiplier); SERIALIZE_ITEM(deceleration_multiplier); } void npc_dev::configure_post() { } void npc_dev::on_connect(player_ptr_t const& player_ptr) { npc_dev_player_item::ptr item(new npc_dev_player_item(*this), &player_item::do_delete); player_ptr->add_item(item); } void npc_dev::on_npc_connect(npc_ptr_t const& npc_ptr) { if (play_npc_name == npc_ptr->name_get()) { // Это наш бот для проигрования :) npc_dev_npc_item::ptr item(new npc_dev_npc_item(*this), &npc_item::do_delete); npc_ptr->add_item(item); } } bool npc_dev::access_checker(player_ptr_t const& player_ptr, std::string const& cmd_name) { return is_enable; } command_arguments_rezult npc_dev::cmd_record(player_ptr_t const& player_ptr, std::string const& arguments, messages_pager& pager, messages_sender const& sender, messages_params& params) { npc_dev_player_item::ptr npc_dev_player_item_ptr = player_ptr->get_item<npc_dev_player_item>(); npc_dev_player_item_ptr->is_wait_recording = !npc_dev_player_item_ptr->is_wait_recording; if (npc_dev_player_item_ptr->is_wait_recording) { if (arguments.empty()) { npc_dev_player_item_ptr->recording_prefix = "record"; } else { npc_dev_player_item_ptr->recording_prefix = arguments; } player_ptr->get_item<weapons_item>()->weapon_reset(); player_ptr->get_item<player_money_item>()->reset(); params("prefix", npc_dev_player_item_ptr->recording_prefix); pager("$(cmd_npc_dev_record_on_player)"); sender("$(cmd_npc_dev_record_on_log)", msg_log); } else { if (npc_dev_player_item_ptr->is_recording) { npc_dev_player_item_ptr->recording_stop(); } pager("$(cmd_npc_dev_record_off_player)"); sender("$(cmd_npc_dev_record_off_log)", msg_log); } return cmd_arg_ok; } command_arguments_rezult npc_dev::cmd_play(player_ptr_t const& player_ptr, std::string const& arguments, messages_pager& pager, messages_sender const& sender, messages_params& params) { if (arguments.empty()) { return cmd_arg_syntax_error; } { int vehicle_id; int model_id; bool is_driver; if (player_ptr->get_vehicle(vehicle_id, model_id, is_driver)) { play_record_vehicle_id = vehicle_id; } else { play_record_vehicle_id = 0; } } play_record_name = arguments; npcs::instance()->add_npc(play_npc_name); params("record_name", play_record_name); pager("$(cmd_npc_dev_play_player)"); sender("$(cmd_npc_dev_play_log)", msg_log); return cmd_arg_ok; } command_arguments_rezult npc_dev::cmd_create_vehicle(player_ptr_t const& player_ptr, std::string const& arguments, messages_pager& pager, messages_sender const& sender, messages_params& params) { int model_id; { // Парсинг if (!vehicles::instance()->get_model_id_by_name(arguments, model_id)) { std::istringstream iss(arguments); iss>>model_id; if (iss.fail() || !iss.eof()) { return cmd_arg_syntax_error; } } } { // Проверяем, находится ли игрок в транспорте int vehicle_id = samp::api::instance()->get_player_vehicle_id(player_ptr->get_id()); int model_id = samp::api::instance()->get_vehicle_model(vehicle_id); if (0 != model_id) { pager("$(npc_dev_create_vehicle_error_invehicle)"); return cmd_arg_process_error; } } pos4 pos = player_ptr->get_item<player_position_item>()->pos_get(); int vehicle_id = vehicles::instance()->vehicle_create(pos_vehicle(model_id, pos.x, pos.y, pos.z + 1.5f, pos.interior, pos.world, pos.rz, -1, -1)); samp::api::instance()->put_player_in_vehicle(player_ptr->get_id(), vehicle_id, 0); params ("model_id", model_id) ("vehicle_id", vehicle_id) ; pager("$(npc_dev_create_vehicle_done_player)"); sender("$(npc_dev_create_vehicle_done_log)", msg_log); return cmd_arg_ok; } npc_dev_player_item::npc_dev_player_item(npc_dev& manager) :manager(manager) ,is_wait_recording(false) ,is_recording(false) ,recording_vehicle_id(-1) ,recording_time_start(0) ,is_accelerate(false) { } npc_dev_player_item::~npc_dev_player_item() { } void npc_dev_player_item::on_timer250() { if (!is_recording || 0 == recording_vehicle_id || !is_accelerate) { return; } int vehicle_id; int model_id; bool is_driver; if (get_root()->get_vehicle(vehicle_id, model_id, is_driver) && is_driver) { samp::api::ptr api_ptr = samp::api::instance(); float x, y, z; int keys; int updown; int leftright; api_ptr->get_vehicle_velocity(vehicle_id, x, y, z); api_ptr->get_player_keys(get_root()->get_id(), keys, updown, leftright); if (keys & vehicle_accelerate) { api_ptr->set_vehicle_velocity(vehicle_id, accelerate(x), accelerate(y), accelerate(z)); } else if (keys & vehicle_decelerate) { api_ptr->set_vehicle_velocity(vehicle_id, decelerate(x), decelerate(y), decelerate(z)); } } } void npc_dev_player_item::on_keystate_change(int keys_new, int keys_old) { if (!is_wait_recording) { return; } if (is_recording && 0 != recording_vehicle_id) { if (recording_is_can_use_nitro) { if (is_key_just_down(mouse_lbutton, keys_new, keys_old)) { if (vehicle_ptr_t vehicle_ptr = vehicles::instance()->get_vehicle(recording_vehicle_id)) { // Можем поставить нитро :) vehicle_ptr->add_component("nto_b_tw"); } } else if (is_key_just_down(KEY_SUBMISSION, keys_new, keys_old)) { if (vehicle_ptr_t vehicle_ptr = vehicles::instance()->get_vehicle(recording_vehicle_id)) { // Убираем нитро vehicle_ptr->remove_component("nto_b_tw"); } } } if (is_key_just_down(KEY_ACTION, keys_new, keys_old)) { is_accelerate = true; } else if (is_key_just_up(KEY_ACTION, keys_new, keys_old)) { is_accelerate = false; } } if (is_key_just_down(KEY_LOOK_BEHIND, keys_new, keys_old) && !get_root()->vehicle_is_driver()) { // Запуск/остановка записи пешком if (is_recording) { recording_stop(); } else { recording_start(false); } } else if (is_key_just_down(KEY_LOOK_RIGHT | KEY_LOOK_LEFT, keys_new, keys_old) && get_root()->vehicle_is_driver()) { // Запуск/остановка записи на транспорте if (is_recording) { recording_stop(); } else { recording_start(true); } } } bool npc_dev_player_item::on_update() { if (is_recording) { samp::api::ptr api_ptr = samp::api::instance(); int vehicle_id; int model_id; bool is_driver; if (get_root()->get_vehicle(vehicle_id, model_id, is_driver) && is_driver) { if (manager.recording_vehicle_health != api_ptr->get_vehicle_health(vehicle_id)) { //api_ptr->set_vehicle_health(vehicle_id, manager.recording_vehicle_health); api_ptr->repair_vehicle(vehicle_id); } } else { } } return true; } void npc_dev_player_item::recording_start(bool is_vehicle) { if (is_recording) { assert(false); return; } recording_name = get_next_recording_filename(); recording_desc = npc_recording_desc_t(); recording_vehicle_id = 0; recording_is_can_use_nitro = false; is_accelerate = false; samp::api::ptr api_ptr = samp::api::instance(); recording_desc.skin_id = api_ptr->get_player_skin(get_root()->get_id()); if (is_vehicle) { bool is_driver; int model_id; get_root()->get_vehicle(recording_vehicle_id, model_id, is_driver); api_ptr->get_vehicle_pos(recording_vehicle_id, recording_desc.point_begin.x, recording_desc.point_begin.y, recording_desc.point_begin.z); recording_desc.point_begin.rz = api_ptr->get_vehicle_zangle(recording_vehicle_id); if (vehicle_ptr_t vehicle_ptr = vehicles::instance()->get_vehicle(recording_vehicle_id)) { if (vehicle_def_cptr_t vehicle_def_cptr = vehicle_ptr->get_def()) { recording_desc.model_name = vehicle_def_cptr->sys_name; } recording_is_can_use_nitro = vehicle_ptr->is_valid_component("nto_b_tw"); } api_ptr->repair_vehicle(recording_vehicle_id); } else { int player_id = get_root()->get_id(); api_ptr->get_player_pos(player_id, recording_desc.point_begin.x, recording_desc.point_begin.y, recording_desc.point_begin.z); recording_desc.point_begin.rz = api_ptr->get_player_facing_angle(player_id); } recording_desc.point_begin.interior = api_ptr->get_player_interior(get_root()->get_id()); messages_item msg_item; msg_item.get_params() ("player_name", get_root()->name_get_full()) ("recording_name", recording_name) ; if (is_vehicle) { if (recording_is_can_use_nitro) { msg_item.get_sender() ("$(npc_dev_recordind_vehicle_nitro_start_player)", msg_player(get_root())) ("$(npc_dev_recordind_vehicle_nitro_start_log)", msg_log); } else { msg_item.get_sender() ("$(npc_dev_recordind_vehicle_start_player)", msg_player(get_root())) ("$(npc_dev_recordind_vehicle_start_log)", msg_log); } api_ptr->start_recording_player_data(get_root()->get_id(), samp::api::PLAYER_RECORDING_TYPE_DRIVER, recording_name); } else { msg_item.get_sender() ("$(npc_dev_recordind_onfoot_start_player)", msg_player(get_root())) ("$(npc_dev_recordind_onfoot_start_log)", msg_log); api_ptr->start_recording_player_data(get_root()->get_id(), samp::api::PLAYER_RECORDING_TYPE_ONFOOT, recording_name); } recording_time_start = time_base::tick_count_milliseconds(); is_recording = true; } void npc_dev_player_item::recording_stop() { if (!is_recording) { assert(false); return; } samp::api::ptr api_ptr = samp::api::instance(); time_base::millisecond_t recording_time_stop = time_base::tick_count_milliseconds(); api_ptr->stop_recording_player_data(get_root()->get_id()); is_recording = false; if (recording_desc.is_on_vehicle()) { api_ptr->get_vehicle_pos(recording_vehicle_id, recording_desc.point_end.x, recording_desc.point_end.y, recording_desc.point_end.z); recording_desc.point_end.rz = api_ptr->get_vehicle_zangle(recording_vehicle_id); } else { int player_id = get_root()->get_id(); api_ptr->get_player_pos(player_id, recording_desc.point_end.x, recording_desc.point_end.y, recording_desc.point_end.z); recording_desc.point_end.rz = api_ptr->get_player_facing_angle(player_id); } recording_desc.duration = (recording_time_stop - recording_time_start); { // Сохраняем файл с методанными std::ofstream meta_file(recording_get_meta_filename(recording_name).c_str()); if (meta_file) { meta_file << recording_desc; } } messages_item msg_item; msg_item.get_params() ("player_name", get_root()->name_get_full()) ("recording_name", recording_name) ("recording_desc", boost::format("%1%") % recording_desc) ; msg_item.get_sender() ("$(npc_dev_recordind_stop_player)", msg_player(get_root())) ("$(npc_dev_recordind_stop_log)", msg_log); } std::string npc_dev_player_item::get_next_recording_filename() const { /* if (!boost::filesystem::exists(recording_get_rec_filename(recording_prefix))) { // В начале пытаемся имя без цифрового суфикса return recording_prefix; } */ for (int i = 0; i < 1000; ++i) { std::string name = (boost::format("%1%%2$02d") % recording_prefix % i).str(); if (!boost::filesystem::exists(recording_get_rec_filename(name))) { return name; } } assert(false); return "fuck"; } std::string npc_dev_player_item::recording_get_meta_filename(std::string const& recording_name) { return "scriptfiles/" + recording_name + ".meta"; } std::string npc_dev_player_item::recording_get_rec_filename(std::string const& recording_name) { return "scriptfiles/" + recording_name + ".rec"; } float npc_dev_player_item::accelerate(float val) const { return val * manager.acceleration_multiplier; } float npc_dev_player_item::decelerate(float val) const { return val * manager.deceleration_multiplier; } npc_dev_npc_item::npc_dev_npc_item(npc_dev& manager) :manager(manager) { } npc_dev_npc_item::~npc_dev_npc_item() { } void npc_dev_npc_item::on_connect() { get_root()->set_spawn_info(11, pos4(1958.3783f, 1343.1572f, 15.3746f, 0, 0, 90.0f)); get_root()->set_color(0xff000020); } void npc_dev_npc_item::on_spawn() { if (manager.play_record_vehicle_id) { // Сажаем в транспорт get_root()->put_to_vehicle(manager.play_record_vehicle_id); } else { // Включаем запись просто get_root()->playback_start(npc::playback_type_onfoot, manager.play_record_name); } } void npc_dev_npc_item::on_enter_vehicle(int vehicle_id) { if (manager.play_record_vehicle_id) { get_root()->playback_start(npc::playback_type_driver, manager.play_record_name); } } void npc_dev_npc_item::on_playback_end() { get_root()->kick(); } void npc_dev_npc_item::on_disconnect(samp::player_disconnect_reason reason) { }
[ "dimonml@19848965-7475-ded4-60a4-26152d85fbc5" ]
dimonml@19848965-7475-ded4-60a4-26152d85fbc5
1d066af50a4e7613d294320c768eb77467e31cf9
2e313b54926cf2b4d00a8a2a035f9d1176118479
/Backtracking/nQueen/nQueen/nQueen.cpp
693b26017a1b8670e1b55cddbaac50a68f9cb42a
[]
no_license
nvthanh1994/Data-Structure-and-Algorithm-IT3010
8dccbad82dece9be417f3a7744cf0978a71b4e12
253a7ce7669aeb99c2b4da1b10cb64a1e305e8c2
refs/heads/master
2020-04-06T04:25:20.166477
2015-01-13T06:27:12
2015-01-13T06:27:12
29,175,743
0
0
null
null
null
null
UTF-8
C++
false
false
1,910
cpp
#include <iostream> #include <cstdio> #include <cmath> #include <ctime> using namespace std; #define MAX 10 int n; int numOfSolution; int x[MAX]; bool check(int row, int tempCol){ for(int prevRow=1;prevRow<row;prevRow++){ if(x[prevRow]==tempCol || (abs(tempCol-x[prevRow])==abs(row-prevRow))) return false; } return true; } void printSolution(){ printf("%-4d %d",numOfSolution,x[1]); for(int i=2;i<=n;i++){ printf(" %d",x[i]); } printf("\n"); } void Backtrack(int i){ if(numOfSolution>=1) return; for(int tempCol=1;tempCol<=n;tempCol++){ if(check(i,tempCol)){ x[i]=tempCol; if(i==n){ ++numOfSolution; printSolution(); return; } else Backtrack(i+1); } } } void BacktrackOne(int i){ if(numOfSolution>=1) return; for(int tempCol=1;tempCol<=n;tempCol++){ if(check(i,tempCol)){ x[i]=tempCol; if(i==n){ ++numOfSolution; printSolution(); return; } else BacktrackOne(i+1); } } } int main(){ //freopen("res.txt","r",stdout); cin >> n; numOfSolution=0; printf("SOL Position\n"); printf("# "); for(int i=1;i<=n;i++){ printf("%d ",i); if(i==n) printf("\n"); } printf("-----------------------\n"); clock_t timeStart=clock(); //Backtrack(1); BacktrackOne(1); printf("\nTotal solution found : %d\nTime taken : %.4f s\n",numOfSolution, (double)(clock()-timeStart)/CLOCKS_PER_SEC); return 0; } /** Người dùng nhập vào n, chương trình tính toán và in ra số lời giải + tất cả lời giải - n là số quân hậu - x_i là chỉ số cột của con hậu ở hàng i. x_i \in {1->8} */
[ "nvthanh1994@gmail.com" ]
nvthanh1994@gmail.com
698100eee7731580b8d5a8a7f8d44e42b45c2892
29871ec191cbbec8fe5ad4dc905dbbcef9484e9f
/C++/04042018/ex1.cpp
c333cdb8ae670122dfa01226608bd044b6e98762
[]
no_license
narosan/Algoritmo-UVA
03b4e37b48a38b5f6e75da659c10bd366d1bda6d
30caf6052c578f6f93aad149f2a463ef56142cd5
refs/heads/master
2020-03-10T14:55:43.362716
2018-06-21T21:07:37
2018-06-21T21:07:37
129,438,303
0
1
null
null
null
null
ISO-8859-1
C++
false
false
988
cpp
/* 1) Fazer um programa para que o usuário informe três palavras. As palavras não podem ser repetidas. Caso aconteça, mensagem de erro e retorna para nova digitação daquela informação. Ao final o programa deverá concatenar as três palavras e exibir para o usuário. */ #include <stdio.h> #include <stdlib.h> #include <string.h> main(){ char palavra1[20], palavra2[20], palavra3[20]; inicio: printf("Informe a primeira palavra: "); fflush(stdin); gets(palavra1); printf("Informe a segunda palavra: "); fflush(stdin); gets(palavra2); printf("Informe a terceira palavra: "); fflush(stdin); gets(palavra3); if(strcmp(palavra1,palavra2)==0 || strcmp(palavra1,palavra3)==0 || strcmp(palavra2,palavra3)==0){ printf("\nExistem palavra iguais !!\nInsira novamente as palavras.\n\n"); goto inicio; }else{ strcat(palavra1,palavra2); strcat(palavra1,palavra3); printf("%s", palavra1); } }
[ "noreply@github.com" ]
narosan.noreply@github.com
4a6434d982ea8b1e7f96e55ad195bd6a2baabf11
e112299d9dd49af971a95b65f84d3684c1b76beb
/4.1 Tree/33) createLevelLinkedList.cpp
b45bc2e4ef7e90e5098a2e28d17efb1a7f709e64
[]
no_license
kaili302/Leetcode-CPP-exercises
3c47be20bfc982ece07632b64e64d5e67e355a4c
4de5c5b5265fd1fdad2dfdad7120472cfcc0d269
refs/heads/master
2021-08-27T16:15:03.089910
2016-11-20T15:58:29
2016-11-20T15:58:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
509
cpp
struct TreeNode{ int val; TreeNode* left; TreeNode* right; }; void createLevelLinkedList(TreeNode* pNode, int level, vector<list<TreeNode>>& ret){ if (!pNode) return; while (ret.size() <= level) ret.push_back({}); ret[level].push_back(pNode); createLevelLinkedList(pNode->left, level + 1, ret); createLevelLinkedList(pNode->right, level + 1, ret); } vector<list<TreeNode>> createLevelLinkedList(TreeNode* pRoot){ vector<list<TreeNode>> ret; createLevelLinkedList(pRoot, 0, ret); return ret; }
[ "kai_li@outlook.com" ]
kai_li@outlook.com
4cb5e987f9ba79b363ca88f3f3e129a2a5532aa9
5088f525434b6fca617bccee472ac52cf5158ade
/Engine/Win32Project1/App.h
9b3233344fb5655e3bb592a7e2be315d7c9a038a
[]
no_license
GrooshBene/2015_GameProject
5f4112ddd84fd40d50a2c6d915952562eea46a8a
7a273bba9f7dd7a73a92ae6d85c8bf307717297d
refs/heads/master
2020-05-18T01:23:39.093389
2015-08-11T14:16:44
2015-08-11T14:16:44
40,545,679
0
1
null
null
null
null
UHC
C++
false
false
1,456
h
#pragma once #include "windows.h" #include "atlstr.h" #include <d3dx9.h> #include "SceneManager.h" #include "ResourceManager.h" #include "InputManager.h" class App { private: static LARGE_INTEGER LInterval, RInterval, Frequency; static App *instance; static void InitWindow(); // 윈도우를 초기화 static void FloatWindow(int nCmdShow); // 윈도우를 띄움 static void InitD3D(); // DX 장치설정 static CString title; public: App(); ~App(); static const int WIDTH = 800; static const int HEIGHT = 600; static HINSTANCE hInstance; static HWND hWnd; static LPDIRECT3D9 g_pD3D; // 그래픽카드를 생성 static LPDIRECT3DDEVICE9 g_pd3dDevice; // 생성한 그래픽카드 정보를 받아서 사용할 수 있게 해주는 변수 static LPD3DXSPRITE g_pSprite; // 그래픽카드와 연결해서 2D이미지를 출력할 수 있게 해줌 static D3DPRESENT_PARAMETERS d3dpp; // 화면출력의 세부사항을 담고있음 static CSceneManager *g_pSceneManager; static CResourceManager *g_pResourceManager; static CInputManager *g_pInputManager; static int DoLoop(); // 메시지를 처리하며 무한루프 static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); // 메시지 처리 프로시저 static void Initialize(HINSTANCE inst, int nCmdShow, CString str); static void Destroy(); static App* GetInstance(); static float GetElapsedTime(); };
[ "wltn000129@gmail.com" ]
wltn000129@gmail.com
7812743dbfc8bb589efd58f41925244eb9941427
a2ef78c8fdb96bb059e5cebe6a9a71531256f059
/widgetset/style.cpp
d82b1c559ebab51f97960bf6f20307226113b07b
[]
no_license
zsombi/kuemelappz
ed9151251525d520cf38bfb12372d7ac873873f3
3e695b3f89773755002dd60643287c081261df29
refs/heads/master
2021-01-22T02:34:19.001582
2012-06-04T18:59:08
2012-06-04T18:59:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,866
cpp
/** Style - non-visual element that defines the basic proeprties of a style element. The element serves as type identification helper. A style element is identified by a name and the layout type. The element can be used in defining component styles aswell as defining local styles (see StyledItem for local styles). Component style elements can define component specific proeprties, which will be passed to the components upon use. Properties: proeprty name: string Defines the style name. property type: StyleTypes Defines the style type. This can be a combination of the following values: Style.Normal - normal layout Style.Pressed - pressed layout Style.Dimmed - dimmed (disabled) layout Style.Highlighted - higlighted layout, e.g. used when mouse hovering over the component Style.Expanded - expanded layout, used in expand/collapse type components */ #include "style.h" #include "globaldefs.h" //#define TRACE_STYLE Style::Style(QObject *parent) : QObject(parent), m_name(""), m_type(Undefined) { } Style::~Style() { #ifdef TRACE_STYLE qDebug() << "clearing" << m_name << "type" << m_type; #endif } // name property getter/setter QString Style::name() const { return m_name; } void Style::setName(const QString &name) { if (name != m_name) { m_name = name; // set the type to Normal if it hasn't been set yet if (!m_name.isEmpty() && (m_type == Undefined)) m_type = Normal; emit nameChanged(); } } // type proeprty getter/setter Style::StyleTypes Style::type() const { return m_type; } void Style::setType(Style::StyleTypes set) { if (set != m_type) { m_type = set; emit typeChanged(); } }
[ "zsombor.egri@gmail.com" ]
zsombor.egri@gmail.com
242dd4c0996bf1cce1a9c1ef549f49d097cba497
bf45a308e128c876bce597e3b3bfd96c22e53d08
/src/config.hpp
8de11fa16750fb1757e7c84c77dfe77b970ebacd
[]
no_license
madmongo1/amytest
b5a23dfe1160add95e689145e308555f4341a84d
3791da905e9c469e61f40d31a28c4c11c3cab0c4
refs/heads/master
2021-01-19T21:24:47.319874
2017-04-21T14:40:45
2017-04-21T14:40:45
88,656,429
1
0
null
null
null
null
UTF-8
C++
false
false
177
hpp
#include <boost/asio.hpp> namespace amytest { namespace asio = boost::asio; using tcp_endpoint = asio::ip::tcp::endpoint; using ip_address = asio::ip::address; }
[ "hodges.r@gmail.com" ]
hodges.r@gmail.com
b04cf01b3fdc79d8ab0fbdf269f1f33a8814292e
6ab32e95c9a32b38fbd7564c2ac8884c31b67203
/include/savr/rfm69_const.h
68b8f0ae87c98f53a7771d170453da2cbfd1896f
[ "MIT" ]
permissive
srfilipek/savr
a3c10f8082d8daaa3abe41ae015c8f2843fd6785
8c6e461863373117f09fb2cdc3e60adc685761d9
refs/heads/master
2021-07-03T01:27:48.403569
2020-07-03T19:35:05
2020-07-03T19:35:05
32,104,735
1
0
null
null
null
null
UTF-8
C++
false
false
16,768
h
/******************************************************************************* Copyright (C) 2018 by Stefan Filipek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ #ifndef _savr_rfm69_const_h_included_ #define _savr_rfm69_const_h_included_ /** * @file rfm69_const.h */ #include <stdint.h> #include <stddef.h> #include <avr/sfr_defs.h> #include <savr/utils.h> namespace savr { namespace rfm69 { using savr::utils::Bitfield; /** * Constants regarding the external RFM69 module */ /// Oscillator frequency in Hz constexpr float F_XOSC = 32000000.0; /// Frequency granularity: F_XOSC / 2^19 constexpr float F_STEP = static_cast<float>(F_XOSC) / (static_cast<uint32_t>(1) << 19); /// Maximum frequency deviation setting (14bits x F_STEP) constexpr uint32_t F_DEV_MAX = static_cast<uint32_t>(F_STEP * 0x3FFF); /** * General register addresses */ enum Reg : uint8_t { REG_FIFO = 0x00, REG_OP_MODE = 0x01, REG_DATA_MODUL = 0X02, REG_BITRATE_MSB = 0x03, REG_BITRATE_LSB = 0x04, REG_FDEV_MSB = 0x05, REG_FDEV_LSB = 0x06, REG_FRF_MSB = 0x07, REG_FRF_MID = 0x08, REG_FRF_LSB = 0x09, REG_OSC_1 = 0x0a, REG_AFC_CTRL = 0x0b, REG_LISTEN_1 = 0x0d, REG_LISTEN_2 = 0x0e, REG_LISTEN_3 = 0x0f, REG_VERSION = 0x10, REG_PA_LEVEL = 0x11, REG_PA_RAMP = 0x12, REG_OCP = 0x13, REG_LNA = 0x18, REG_RX_BW = 0x19, REG_AFC_BW = 0x1a, REG_OOK_PEAK = 0x1b, REG_OOK_AVG = 0x1c, REG_OOK_FIX = 0x1d, REG_AFC_FEI = 0x1e, REG_AFC_MSB = 0x1f, REG_AFC_LSB = 0x20, REG_FEI_MSB = 0x21, REG_FEI_LSB = 0x22, REG_RSSI_CONFIG = 0x23, REG_RSSI_VALUE = 0x24, REG_DIO_MAP_1 = 0x25, REG_DIO_MAP_2 = 0x26, REG_IRQ_FLAGS_1 = 0x27, REG_IRQ_FLAGS_2 = 0x28, REG_RSSI_THRESH = 0x29, REG_RX_TIMEOUT_1 = 0x2a, REG_RX_TIMEOUT_2 = 0x2b, REG_PREAMBLE_MSB = 0x2c, REG_PREAMBLE_LSB = 0x2d, REG_SYNC_CONFIG = 0x2e, REG_SYNC_VALUE_1 = 0x2f, REG_SYNC_VALUE_2 = 0x30, REG_SYNC_VALUE_3 = 0x31, REG_SYNC_VALUE_4 = 0x32, REG_SYNC_VALUE_5 = 0x33, REG_SYNC_VALUE_6 = 0x34, REG_SYNC_VALUE_7 = 0x35, REG_SYNC_VALUE_8 = 0x36, REG_PACKET_CONFIG_1 = 0x37, REG_PAYLOAD_LENGTH = 0x38, REG_NODE_ADRS = 0x39, REG_BROADCAST_ADRS = 0x3a, REG_AUTO_MODES = 0x3b, REG_FIFO_THRESH = 0x3c, REG_PACKET_CONFIG_2 = 0x3d, REG_AES_KEY_1 = 0x3e, REG_AES_KEY_2 = 0x3f, REG_AES_KEY_3 = 0x40, REG_AES_KEY_4 = 0x41, REG_AES_KEY_5 = 0x42, REG_AES_KEY_6 = 0x43, REG_AES_KEY_7 = 0x44, REG_AES_KEY_8 = 0x45, REG_AES_KEY_9 = 0x46, REG_AES_KEY_11 = 0x47, REG_AES_KEY_12 = 0x48, REG_AES_KEY_13 = 0x4a, REG_AES_KEY_14 = 0x4b, REG_AES_KEY_15 = 0x4c, REG_AES_KEY_16 = 0x4d, REG_TEMP_1 = 0x4e, REG_TEMP_2 = 0x4f, REG_TEST_LNA = 0x58, REG_TEST_PA_1 = 0x5a, REG_TEST_PA_2 = 0x5c, REG_TEST_DAGC = 0x6f, REG_TEST_AFC = 0x71, }; const uint8_t REG_WRITE = _BV(7); /** * For REG_OP_MODE */ class SEQUENCER : public Bitfield<7, 1>{}; const uint8_t SEQUENCER_ON = SEQUENCER::set(0); const uint8_t SEQUENCER_OFF = SEQUENCER::set(1); class LISTEN : public Bitfield<6, 1>{}; const uint8_t LISTEN_ON = LISTEN::set(1); const uint8_t LISTEN_OFF = LISTEN::set(0); const uint8_t LISTEN_ABORT = _BV(5); class MODE : public Bitfield<2, 3>{}; const uint8_t MODE_SLEEP = MODE::set(0x00); const uint8_t MODE_STDBY = MODE::set(0x01); const uint8_t MODE_FS = MODE::set(0x02); const uint8_t MODE_TX = MODE::set(0x03); const uint8_t MODE_RX = MODE::set(0x04); /** * For REG_DATA_MODUL */ class DATA_MODE : public Bitfield<5, 2>{}; const uint8_t DATA_MODE_PACKET = DATA_MODE::set(0x00); const uint8_t DATA_MODE_CONT_SYNC = DATA_MODE::set(0x02); const uint8_t DATA_MODE_CONT_NO_SYNC = DATA_MODE::set(0x03); class MOD_TYPE : public Bitfield<3, 2>{}; const uint8_t MOD_TYPE_FSK = MOD_TYPE::set(0x00); const uint8_t MOD_TYPE_OOK = MOD_TYPE::set(0x01); class MOD_SHAPE : public Bitfield<0, 2>{}; const uint8_t MOD_SHAPE_FSK_NONE = MOD_SHAPE::set(0x00); const uint8_t MOD_SHAPE_FSK_GAUS_BT_10 = MOD_SHAPE::set(0x01); const uint8_t MOD_SHAPE_FSK_GAUS_BT_05 = MOD_SHAPE::set(0x02); const uint8_t MOD_SHAPE_FSK_GAUS_BT_03 = MOD_SHAPE::set(0x03); const uint8_t MOD_SHAPE_OOK_NONE = MOD_SHAPE::set(0x00); const uint8_t MOD_SHAPE_OOK_CUTOFF_BR = MOD_SHAPE::set(0x01); const uint8_t MOD_SHAPE_OOK_CUTOFF_2BR = MOD_SHAPE::set(0x02); /** * For REG_OSC_1 */ const uint8_t RC_CAL_START = _BV(7); const uint8_t RC_CAL_DONE = _BV(6); /** * For REG_AFC_CTRL */ const uint8_t AFC_LOW_BETA_ON = _BV(5); /** * For REG_LISTEN_1 */ class LISTEN_RESOL_IDLE : public Bitfield<6, 2>{}; const uint8_t LISTEN_RESOL_IDLE_64_US = LISTEN_RESOL_IDLE::set(0x01); const uint8_t LISTEN_RESOL_IDLE_4100_US = LISTEN_RESOL_IDLE::set(0x02); const uint8_t LISTEN_RESOL_IDLE_262000_US = LISTEN_RESOL_IDLE::set(0x03); class LISTEN_RESOL_RX : public Bitfield<4, 2>{}; const uint8_t LISTEN_RESOL_RX_64_US = LISTEN_RESOL_RX::set(0x01); const uint8_t LISTEN_RESOL_RX_4100_US = LISTEN_RESOL_RX::set(0x02); const uint8_t LISTEN_RESOL_RX_262000_US = LISTEN_RESOL_RX::set(0x03); class LISTEN_CRITERIA : public Bitfield<3, 1>{}; const uint8_t LISTEN_CRITERIA_RSSI = LISTEN_CRITERIA::set(0); const uint8_t LISTEN_CRITERIA_RSSI_ADDR = LISTEN_CRITERIA::set(1); class LISTEN_END : public Bitfield<0, 1>{}; const uint8_t LISTEN_END_TO_RX = LISTEN_END::set(0); const uint8_t LISTEN_END_TO_MODE = LISTEN_END::set(0x01); const uint8_t LISTEN_END_TO_IDLE = LISTEN_END::set(0x02); /** * For REG_PA_LEVEL */ class PA0_FIELD : public Bitfield<7, 1>{}; class PA1_FIELD : public Bitfield<6, 1>{}; class PA2_FIELD : public Bitfield<5, 1>{}; const uint8_t PA0_ON = _BV(7); const uint8_t PA0_OFF = 0; const uint8_t PA1_ON = _BV(6); const uint8_t PA1_OFF = 0; const uint8_t PA2_ON = _BV(5); const uint8_t PA2_OFF = 0; class OUTPUT_POWER : public Bitfield<0, 5>{}; /** * For REG_PA_RAMP */ class PA_RAMP : public Bitfield<0, 4>{}; const uint8_t PA_RAMP_3400_US = PA_RAMP::set(0x00); const uint8_t PA_RAMP_2000_US = PA_RAMP::set(0x01); const uint8_t PA_RAMP_1000_US = PA_RAMP::set(0x02); const uint8_t PA_RAMP_500_US = PA_RAMP::set(0x03); const uint8_t PA_RAMP_250_US = PA_RAMP::set(0x04); const uint8_t PA_RAMP_125_US = PA_RAMP::set(0x05); const uint8_t PA_RAMP_100_US = PA_RAMP::set(0x06); const uint8_t PA_RAMP_62_US = PA_RAMP::set(0x07); const uint8_t PA_RAMP_50_US = PA_RAMP::set(0x08); const uint8_t PA_RAMP_40_US = PA_RAMP::set(0x09); const uint8_t PA_RAMP_31_US = PA_RAMP::set(0x0a); const uint8_t PA_RAMP_25_US = PA_RAMP::set(0x0b); const uint8_t PA_RAMP_20_US = PA_RAMP::set(0x0c); const uint8_t PA_RAMP_15_US = PA_RAMP::set(0x0d); const uint8_t PA_RAMP_12_US = PA_RAMP::set(0x0e); const uint8_t PA_RAMP_10_US = PA_RAMP::set(0x0f); /** * For REG_OCP_ON */ class OCP : public Bitfield<4, 1>{}; const uint8_t OCP_ON = OCP::set(1); const uint8_t OCP_OFF = OCP::set(0); class OCP_TRIM : public Bitfield<0, 4>{}; /** * For REG_LNA */ class LNA_ZIN : public Bitfield<7, 1>{}; const uint8_t LNA_ZIN_50_OHM = LNA_ZIN::set(0); const uint8_t LNA_ZIN_200_OHM = LNA_ZIN::set(1); class LNA_CURRENT_GAIN : public Bitfield<3, 3>{}; class LNA_GAIN_SELECT : public Bitfield<0, 3>{}; const uint8_t LNA_GAIN_AUTO = LNA_GAIN_SELECT::set(0x00); const uint8_t LNA_GAIN_HIGH = LNA_GAIN_SELECT::set(0x01); const uint8_t LNA_GAIN_MINUS_6 = LNA_GAIN_SELECT::set(0x02); const uint8_t LNA_GAIN_MINUS_12 = LNA_GAIN_SELECT::set(0x03); const uint8_t LNA_GAIN_MINUS_24 = LNA_GAIN_SELECT::set(0x04); const uint8_t LNA_GAIN_MINUS_36 = LNA_GAIN_SELECT::set(0x05); const uint8_t LNA_GAIN_MINUS_48 = LNA_GAIN_SELECT::set(0x06); /** * For REG_RX_BW */ class DCC_FREQ : public Bitfield<5, 3>{}; const uint8_t DCC_FREQ_16 = DCC_FREQ::set(0x00); const uint8_t DCC_FREQ_8 = DCC_FREQ::set(0x01); const uint8_t DCC_FREQ_4 = DCC_FREQ::set(0x02); const uint8_t DCC_FREQ_2 = DCC_FREQ::set(0x03); const uint8_t DCC_FREQ_1 = DCC_FREQ::set(0x04); const uint8_t DCC_FREQ_0p5 = DCC_FREQ::set(0x05); const uint8_t DCC_FREQ_0p25 = DCC_FREQ::set(0x06); const uint8_t DCC_FREQ_0p125 = DCC_FREQ::set(0x07); class RX_BW_MANT : public Bitfield<3, 2>{}; const uint8_t RX_BW_MANT_16 = RX_BW_MANT::set(0x00); const uint8_t RX_BW_MANT_20 = RX_BW_MANT::set(0x01); const uint8_t RX_BW_MANT_24 = RX_BW_MANT::set(0x02); class RX_BW_EXP : public Bitfield<0, 3>{}; const uint8_t RX_BW_EXP_0 = RX_BW_EXP::set(0x00); const uint8_t RX_BW_EXP_1 = RX_BW_EXP::set(0x01); const uint8_t RX_BW_EXP_2 = RX_BW_EXP::set(0x02); const uint8_t RX_BW_EXP_3 = RX_BW_EXP::set(0x03); const uint8_t RX_BW_EXP_4 = RX_BW_EXP::set(0x04); const uint8_t RX_BW_EXP_5 = RX_BW_EXP::set(0x05); const uint8_t RX_BW_EXP_6 = RX_BW_EXP::set(0x06); const uint8_t RX_BW_EXP_7 = RX_BW_EXP::set(0x07); /** * For REG_AFC_BW */ class DCC_FREQ_AFC : public Bitfield<5, 3>{}; class RX_BW_MANT_AFC : public Bitfield<3, 2>{}; class RX_BW_EXP_AFC : public Bitfield<0, 3>{}; /** * For REG_AFC_FEI */ const uint8_t FEI_DONE = _BV(6); const uint8_t FEI_START = _BV(5); const uint8_t AFC_DONE = _BV(4); class AFC_AUTOCLEAR : public Bitfield<3, 1>{}; const uint8_t AFC_AUTOCLEAR_ON = AFC_AUTOCLEAR::set(1); const uint8_t AFC_AUTOCLEAR_OFF = AFC_AUTOCLEAR::set(0); class AFC_AUTO : public Bitfield<2, 1>{}; const uint8_t AFC_AUTO_ON = AFC_AUTO::set(1); const uint8_t AFC_AUTO_OFF = AFC_AUTO::set(0); const uint8_t AFC_CLEAR = _BV(1); const uint8_t AFC_START = _BV(0); /** * For REG_RSSI_CONFIG */ const uint8_t RSSI_DONE = _BV(1); const uint8_t RSSI_START = _BV(0); /** * For REG_DIO_MAP_1 */ class DIO0_MAPPING : public Bitfield<6, 2>{}; const uint8_t DIO0_CONT_ANY_MODE_READY = DIO0_MAPPING::set(0b11); const uint8_t DIO0_CONT_FS_PLL_LOCK = DIO0_MAPPING::set(0b00); const uint8_t DIO0_CONT_RX_SYNC_ADDRESS = DIO0_MAPPING::set(0b00); const uint8_t DIO0_CONT_RX_TIMEOUT = DIO0_MAPPING::set(0b01); const uint8_t DIO0_CONT_RX_RSSI = DIO0_MAPPING::set(0b10); const uint8_t DIO0_CONT_TX_PLL_LOCK = DIO0_MAPPING::set(0b00); const uint8_t DIO0_CONT_TX_TX_READY = DIO0_MAPPING::set(0b01); const uint8_t DIO0_PKT_FS_PLL_LOCK = DIO0_MAPPING::set(0b11); const uint8_t DIO0_PKT_RX_CRC_OK = DIO0_MAPPING::set(0b00); const uint8_t DIO0_PKT_RX_PAYLOAD_READY = DIO0_MAPPING::set(0b01); const uint8_t DIO0_PKT_RX_SYNC_ADDR = DIO0_MAPPING::set(0b10); const uint8_t DIO0_PKT_RX_RSSI = DIO0_MAPPING::set(0b11); const uint8_t DIO0_PKT_TX_PACKET_SENT = DIO0_MAPPING::set(0b00); const uint8_t DIO0_PKT_TX_TX_READY = DIO0_MAPPING::set(0b01); const uint8_t DIO0_PKT_TX_PLL_LOCK = DIO0_MAPPING::set(0b11); class DIO1_MAPPING : public Bitfield<4, 2>{}; class DIO2_MAPPING : public Bitfield<2, 2>{}; class DIO3_MAPPING : public Bitfield<0, 2>{}; /** * For REG_DIO_MAP_2 */ class DIO4_MAPPING : public Bitfield<6, 2>{}; class DIO5_MAPPING : public Bitfield<4, 2>{}; class CLK_OUT : public Bitfield<0, 3>{}; const uint8_t CLK_OUT_F_XOSC = CLK_OUT::set(0x00); const uint8_t CLK_OUT_F_XOSC_2 = CLK_OUT::set(0x01); const uint8_t CLK_OUT_F_XOSC_4 = CLK_OUT::set(0x02); const uint8_t CLK_OUT_F_XOSC_8 = CLK_OUT::set(0x03); const uint8_t CLK_OUT_F_XOSC_16 = CLK_OUT::set(0x04); const uint8_t CLK_OUT_F_XOSC_32 = CLK_OUT::set(0x05); const uint8_t CLK_OUT_RC = CLK_OUT::set(0x06); const uint8_t CLK_OUT_OFF = CLK_OUT::set(0x07); /** * For REG_IRQ_FLAGS_1 */ const uint8_t IRQ_1_MODE_READY = _BV(7); const uint8_t IRQ_1_RX_READY = _BV(6); const uint8_t IRQ_1_TX_READY = _BV(5); const uint8_t IRQ_1_PLL_LOCK = _BV(4); const uint8_t IRQ_1_RSSI = _BV(3); const uint8_t IRQ_1_TIMEOUT = _BV(2); const uint8_t IRQ_1_AUTO_MODE = _BV(1); const uint8_t IRQ_1_SYNC_ADDR_MATCH = _BV(0); /** * For REG_IRQ_FLAGS_2 */ const uint8_t IRQ_2_FIFO_FULL = _BV(7); const uint8_t IRQ_2_FIFO_NOT_EMPTY = _BV(6); const uint8_t IRQ_2_FIFO_LEVEL = _BV(5); const uint8_t IRQ_2_FIFO_OVERRUN = _BV(4); const uint8_t IRQ_2_PACKET_SENT = _BV(3); const uint8_t IRQ_2_PAYLOAD_READY = _BV(2); const uint8_t IRQ_2_CRC_OK = _BV(1); /** * For REG_SYNC_CONFIG */ class SYNC : public Bitfield<7, 1>{}; const uint8_t SYNC_ON = SYNC::set(1); const uint8_t SYNC_OFF = SYNC::set(0); class FIFO_FILL : public Bitfield<6, 1>{}; const uint8_t FIFO_FILL_IF_SYNC_ADDR = FIFO_FILL::set(0); const uint8_t FIFO_FILL_IF_FILL_COND = FIFO_FILL::set(1); class SYNC_SIZE : public Bitfield<3, 3>{}; class SYNC_ERROR_TOL : public Bitfield<0, 3>{}; /** * For REG_PACKET_CONFIG_1 */ class PACKET_LENGTH : public Bitfield<7, 1>{}; const uint8_t PACKET_LENGTH_FIXED = PACKET_LENGTH::set(0); const uint8_t PACKET_LENGTH_VARIABLE = PACKET_LENGTH::set(1); class PACKET_DC_FREE : public Bitfield<5, 2>{}; const uint8_t PACKET_DC_FREE_NONE = PACKET_DC_FREE::set(0x00); const uint8_t PACKET_DC_FREE_MANCHESTER = PACKET_DC_FREE::set(0x01); const uint8_t PACKET_DC_FREE_WHITENING = PACKET_DC_FREE::set(0x02); class PACKET_CRC : public Bitfield<4, 1>{}; const uint8_t PACKET_CRC_ON = PACKET_CRC::set(1); const uint8_t PACKET_CRC_OFF = PACKET_CRC::set(0); class PACKET_CRC_AUTO_CLEAR : public Bitfield<3, 1>{}; const uint8_t PACKET_CRC_AUTO_CLEAR_ON = PACKET_CRC_AUTO_CLEAR::set(0); const uint8_t PACKET_CRC_AUTO_CLEAR_OFF = PACKET_CRC_AUTO_CLEAR::set(1); class PACKET_ADDR_FILTER : public Bitfield<1, 2>{}; const uint8_t PACKET_ADDR_FILTER_OFF = PACKET_ADDR_FILTER::set(0x00); const uint8_t PACKET_ADDR_FILTER_NODE = PACKET_ADDR_FILTER::set(0x01); const uint8_t PACKET_ADDR_FILTER_NODE_BROADCAST = PACKET_ADDR_FILTER::set(0x02); /** * For REG_AUTO_MODES */ class ENTER_COND : public Bitfield<5, 3>{}; const uint8_t ENTER_COND_NONE = ENTER_COND::set(0x00); const uint8_t ENTER_COND_FIFO_NOT_EMPTY = ENTER_COND::set(0x01); const uint8_t ENTER_COND_FIFO_LEVEL = ENTER_COND::set(0x02); const uint8_t ENTER_COND_CRC_OK = ENTER_COND::set(0x03); const uint8_t ENTER_COND_PAYLOAD_READY = ENTER_COND::set(0x04); const uint8_t ENTER_COND_SYNC_ADDRESS = ENTER_COND::set(0x05); const uint8_t ENTER_COND_PACKET_SENT = ENTER_COND::set(0x06); const uint8_t ENTER_COND_FIFO_EMPTY = ENTER_COND::set(0x07); class EXIT_COND : public Bitfield<2, 3>{}; const uint8_t EXIT_COND_NONE = EXIT_COND::set(0x00); const uint8_t EXIT_COND_FIFO_NOT_EMPTY = EXIT_COND::set(0x01); const uint8_t EXIT_COND_FIFO_LEVEL = EXIT_COND::set(0x02); const uint8_t EXIT_COND_CRC_OK = EXIT_COND::set(0x03); const uint8_t EXIT_COND_PAYLOAD_READY = EXIT_COND::set(0x04); const uint8_t EXIT_COND_SYNC_ADDRESS = EXIT_COND::set(0x05); const uint8_t EXIT_COND_PACKET_SENT = EXIT_COND::set(0x06); const uint8_t EXIT_COND_FIFO_EMPTY = EXIT_COND::set(0x07); class INTER_MODE : public Bitfield<0, 2>{}; const uint8_t INTER_MODE_SLEEP = 0x00; const uint8_t INTER_MODE_STDBY = 0x01; const uint8_t INTER_MODE_RX = 0x02; const uint8_t INTER_MODE_TX = 0x03; /** * For REG_FIFO_THRESH */ const uint8_t TX_START_COND_FIFO_LEVEL = 0; const uint8_t TX_START_COND_FIFO_NOT_EMPTY = _BV(7); class FIFO_THRESH : public Bitfield<0, 7>{}; /** * For REG_PACKET_CONFIG_2 */ class INTER_PACKET_RX_DELAY : public Bitfield<4, 4>{}; const uint8_t RESTART_RX = _BV(2); class AUTO_RESTART_RX : public Bitfield<1, 1>{}; const uint8_t AUTO_RX_RESTART_ON = _BV(1); const uint8_t AUTO_RX_RESTART_OFF = 0; class AES : public Bitfield<0, 1>{}; const uint8_t AES_ON = _BV(0); const uint8_t AES_OFF = 0; } } #endif
[ "srfilipek@gmail.com" ]
srfilipek@gmail.com
ca8b5f046685d36bab5c498850fe5e4361eefc3c
8389913a078ce370f05624321b16bfe9c9f1febf
/C++/training.cpp
96e5a478b0fd9a94eb973dc3654c35b8da339e9e
[]
no_license
lvodoleyl/Algorithm_Rocchio
75ba09324e5709b98b2bb57d523b2bc295b89bda
2a23865f19bc2b4150ce390172d85cc17f6c4878
refs/heads/main
2023-02-10T12:51:53.654113
2021-01-06T19:21:24
2021-01-06T19:21:24
327,407,580
0
0
null
null
null
null
UTF-8
C++
false
false
5,309
cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> #include <string> #include <fstream> #include <vector> #include <sstream> #include <iterator> #include <cmath> #include <math.h> //#define TRAIN_CSV_PATH "D:\\Uchoba\\Kocheshkov\\Curs\\Data\\data_train.csv" #define TRAIN_CSV_PATH "D:\\Uchoba\\Kocheshkov\\Curs\\Data\\test_time.csv" #define ROCCHIO_CSV_PATH "D:\\Uchoba\\Kocheshkov\\Curs\\Data\\model_rocchio.csv" using namespace std; struct Document { public: vector<string> tokens; string _class; }; struct Tokens { public: string token; int count; }; struct Centroids { public: string _class; vector<double> centr; }; int main(int argc, char* argv[]) { // на какой выборке тестируемся? size_t train_doc; if (argc > 1) train_doc = atoi(argv[1]); else train_doc = -1; vector<Document> DOCS; vector<string> CLASSES; vector<Centroids> CENTR; vector<Tokens> TOKENS; bool flag; size_t count_doc; //vector<Centroids> result; ifstream csvFile; string file_name = TRAIN_CSV_PATH; string line, str; //Читаем файл, и считываем документы csvFile.open(file_name.c_str()); if (!csvFile.is_open()) { cout << "Error in PATH input file!" << endl; exit(1); } while(getline(csvFile, line)) { //считываем один документ if (line.empty()) continue; if (train_doc-- == 0) break; line.pop_back(); count_doc++; Document *d = new Document; stringstream lineStream(line); getline(lineStream,d->_class,','); while (getline(lineStream, str, ',')) { d->tokens.push_back(str); //Считаем df flag = true; for(size_t i = 0; i < d->tokens.size()-1; i++) { flag = flag && (d->tokens[i] != str); } for(size_t i = 0; i < TOKENS.size(); i++) { if ((TOKENS[i].token == str)&&(flag)) { TOKENS[i].count++; flag = false; break; } } if (flag) { Tokens tok; tok.token = str; tok.count = 1; TOKENS.push_back(tok); } } //есть ли там наш класс? flag = true; for(size_t i = 0; i < CLASSES.size(); i++) { if (CLASSES[i] == d->_class) flag = false; } if (flag) CLASSES.push_back(d->_class); DOCS.push_back(*d); } csvFile.close(); //Основные вычисления for (size_t _class = 0; _class < CLASSES.size(); _class++) { vector<double> sum_vector_class(TOKENS.size()); size_t num_doc_class = 0; for (size_t _doc = 0; _doc < DOCS.size(); _doc++) { if (DOCS[_doc]._class == CLASSES[_class]) { num_doc_class++; vector<double> vector_of_weights; for(size_t tok = 0; tok < TOKENS.size(); tok++) { size_t tf = 0; for(size_t i = 0; i < DOCS[_doc].tokens.size(); i++) { if (DOCS[_doc].tokens[i] ==TOKENS[tok].token) tf++; } double w = tf * log2(count_doc / TOKENS[tok].count); vector_of_weights.push_back(w); } double llwll = 0; for(size_t weight = 0; weight < vector_of_weights.size();weight++) { llwll += vector_of_weights[weight]*vector_of_weights[weight]; } llwll = sqrt(llwll); for(size_t weight = 0; weight < vector_of_weights.size();weight++) { sum_vector_class[weight] += vector_of_weights[weight] / llwll; } } } for(size_t i = 0; i < sum_vector_class.size();i++) { sum_vector_class[i] = sum_vector_class[i] / num_doc_class; } Centroids _centr; _centr._class = CLASSES[_class]; _centr.centr = sum_vector_class; CENTR.push_back(_centr); } //Осталось записать! fstream csvFile_model; string file_model = ROCCHIO_CSV_PATH; csvFile_model.open(file_model.c_str(), ios::out); if (!csvFile_model.is_open()) { ofstream ofs(ROCCHIO_CSV_PATH); csvFile.open(file_model.c_str()); } csvFile_model << count_doc << ','; for(size_t _tok = 0; _tok < TOKENS.size(); _tok++) csvFile_model << TOKENS[_tok].token << ','; csvFile_model << endl; for(size_t _tok = 0; _tok < TOKENS.size(); _tok++) csvFile_model << TOKENS[_tok].count << ','; csvFile_model << endl; for(size_t _c_ = 0; _c_ < CENTR.size(); _c_++) { csvFile_model << CENTR[_c_]._class << ','; for(size_t val = 0; val < CENTR[_c_].centr.size(); val++) csvFile_model << CENTR[_c_].centr[val] << ','; csvFile_model << endl; } csvFile_model.close(); }
[ "abrosimov.kirill.1999@mail.ru" ]
abrosimov.kirill.1999@mail.ru
2ec1d71fe12182de2b2fd18e5b30884cf49ff4a4
8d5923162f4ae0abf2dffca969a95dbd49e40220
/include/PoolObjectAuth.h
7141ce39302973d9d4dc88c022d43a87870d2512
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sutthipongl/one5.2.0
00a662d8372679b006d4cd30914d5772edeb4be2
ec756a13ced38f3b2ba70bae043dd1cc734b7a01
refs/heads/master
2021-04-26T13:10:30.964344
2017-05-18T21:34:35
2017-05-18T21:34:35
77,481,442
2
0
null
null
null
null
UTF-8
C++
false
false
2,805
h
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2016, OpenNebula Project, OpenNebula Systems */ /* */ /* 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 POOL_OBJECT_AUTH_H_ #define POOL_OBJECT_AUTH_H_ #include "PoolObjectSQL.h" class AclRule; /** * This class abstracts the authorization attributes of a PoolObject. It is * used to check permissions and access rights of requests */ class PoolObjectAuth { public: /* ------------------- Constructor and Methods -------------------------- */ PoolObjectAuth(): oid(-1), uid(-1), gid(-1), owner_u(1), owner_m(1), owner_a(0), group_u(0), group_m(0), group_a(0), other_u(0), other_m(0), other_a(0), disable_all_acl(false), disable_cluster_acl(false), disable_group_acl(false) {}; void get_acl_rules(AclRule& owner_rule, AclRule& group_rule, AclRule& other_rule, int zone_id) const; string type_to_str() const { return PoolObjectSQL::type_to_str(obj_type); }; /* --------------------------- Attributes ------------------------------- */ PoolObjectSQL::ObjectType obj_type; int oid; int uid; int gid; set<int> cids; int owner_u; int owner_m; int owner_a; int group_u; int group_m; int group_a; int other_u; int other_m; int other_a; bool disable_all_acl; // All objects of this type (e.g. NET/*) bool disable_cluster_acl; // All objects in a cluster (e.g. NET/%100) bool disable_group_acl; // All objects own by this group (e.g. NET/@101) }; #endif /*POOL_OBJECT_AUTH_H_*/
[ "Tor@Sutthipongs-MacBook-Pro.local" ]
Tor@Sutthipongs-MacBook-Pro.local
92a22f7be396fe88e37e1364e85918126aa7e497
99441588c7d6159064d9ce2b94d3743a37f85d33
/xsens_ros_mti_driver/lib/xspublic/xscontroller/xsscanner.h
0dead4fe10b69c345aca79ae1a27df2b0e09da96
[ "BSD-2-Clause" ]
permissive
YZT1997/robolab_project
2786f8983c4b02040da316cdd2c8f9bb73e2dd4c
a7edb588d3145356566e9dcc37b03f7429bcb7d6
refs/heads/master
2023-09-02T21:28:01.280464
2021-10-14T02:06:35
2021-10-14T02:06:35
369,128,037
0
0
null
null
null
null
UTF-8
C++
false
false
11,692
h
// Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions, and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions, and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // 3. Neither the names of the copyright holders nor the names of their 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 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES. // // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions, and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions, and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // 3. Neither the names of the copyright holders nor the names of their 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 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES. // #ifndef XSSCANNER_H #define XSSCANNER_H #include "xscontrollerconfig.h" #include <xstypes/xsbaud.h> //AUTO namespace xstypes { struct XsPortInfoArray; //AUTO } //AUTO namespace xscontroller { struct XsUsbHubInfo; //AUTO } #ifdef __cplusplus #include <xstypes/xsportinfoarray.h> #include <xstypes/xsintarray.h> #include <xstypes/xsstringarray.h> #include "xsusbhubinfo.h" #include <xstypes/xsstring.h> #include <sstream> extern "C" { #endif struct XsPortInfo; //! \brief Defines the callback type that can be supplied to XsScanner_setScanLogCallback typedef void (*XsScanLogCallbackFunc)(struct XsString const*); XDA_DLL_API void XsScanner_scanPorts(struct XsPortInfoArray* ports, XsBaudRate baudrate, int singleScanTimeout, int ignoreNonXsensDevices, int detectRs485); XDA_DLL_API int XsScanner_scanPort(struct XsPortInfo* port, XsBaudRate baudrate, int singleScanTimeout, int detectRs485); XDA_DLL_API void XsScanner_enumerateSerialPorts(struct XsPortInfoArray* ports, int ignoreNonXsensDevices); XDA_DLL_API void XsScanner_filterResponsiveDevices(struct XsPortInfoArray* ports, XsBaudRate baudrate, int singleScanTimeout, int detectRs485); XDA_DLL_API void XsScanner_enumerateUsbDevices(struct XsPortInfoArray* ports); XDA_DLL_API void XsScanner_scanUsbHub(struct XsUsbHubInfo* hub, const struct XsPortInfo* port); XDA_DLL_API void XsScanner_enumerateNetworkDevices(struct XsPortInfoArray* ports); XDA_DLL_API void XsScanner_abortScan(void); XDA_DLL_API void XsScanner_setScanLogCallback(XsScanLogCallbackFunc cb); #ifdef __cplusplus } // extern "C" class XsScanner { public: /*! \brief Scan all ports for Xsens devices. \param[in] baudrate The baudrate to scan at. When set to XBR_Invalid, all known baudrates are scanned. \param[in] singleScanTimeout The timeout of a scan of a single port at a single baud rate in ms. \param[in] ignoreNonXsensDevices When true (the default), only Xsens devices are returned. Otherwise other devices that comply with the Xsens message protocol will also be returned. \param[in] detectRs485 Enable more extended scan to detect rs485 devices \returns The list of detected ports. \sa XsScanner_scanPorts */ static inline XsPortInfoArray scanPorts(XsBaudRate baudrate = XBR_Invalid, int singleScanTimeout = 100, bool ignoreNonXsensDevices = true, bool detectRs485 = false) { XsPortInfoArray ports; XsScanner_scanPorts(&ports, baudrate, singleScanTimeout, ignoreNonXsensDevices?1:0, detectRs485?1:0); return ports; } //! \copydoc XsScanner_scanPort static inline bool XSNOCOMEXPORT scanPort(XsPortInfo& port, XsBaudRate baudrate = XBR_Invalid, int singleScanTimeout = 100, bool detectRs485 = false) { return 0 != XsScanner_scanPort(&port, baudrate, singleScanTimeout, detectRs485?1:0); } /*! \brief Scan a single port for Xsens devices. \param[in] portName The name of the port to scan. \param[in] baudrate The baudrate to scan at. When set to XBR_Invalid, all known baudrates are scanned. \param[in] singleScanTimeout The timeout of a scan at a single baud rate in ms. \param[in] detectRs485 Enable more extended scan to detect rs485 devices \returns An XsPortInfo structure with the results of the scan. \sa XsScanner_scanPort */ static inline XsPortInfo scanPort(const XsString& portName, XsBaudRate baudrate = XBR_Invalid, int singleScanTimeout = 100, bool detectRs485 = false) { XsPortInfo pi(portName, baudrate); if (scanPort(pi, baudrate, singleScanTimeout, detectRs485)) return pi; return XsPortInfo(); } /*! \brief Scan a list of Com ports for Xsens devices. \param[in] portList The list of port names to scan. \param[in] portLinesOptionsList The list of hardware flow control options for the ports to scan. \param[in] baudrate The baudrate to scan at. When set to XBR_Invalid, all known baudrates are scanned. \param[in] singleScanTimeout The timeout of a scan at a single baud rate in ms. \returns An array of XsPortInfo structures with the results of the scan. \sa XsScanner_scanCOMPortList */ static inline XsPortInfoArray scanComPortList(const XsStringArray& portList, const XsIntArray& portLinesOptionsList = XsIntArray(), XsBaudRate baudrate = XBR_Invalid, int singleScanTimeout = 100) { XsPortInfoArray pInfoArray; if (!portLinesOptionsList.empty() && (portLinesOptionsList.size() != portList.size())) return pInfoArray; for (XsIntArray::size_type idxPort = 0; idxPort < portList.size(); ++idxPort) { const XsPortLinesOptions portLinesOptions = portLinesOptionsList.empty() ? XPLO_All_Ignore : static_cast<XsPortLinesOptions>(portLinesOptionsList[idxPort]); XsPortInfo portInfo(portList[idxPort], baudrate, portLinesOptions); if (scanPort(portInfo, baudrate, singleScanTimeout, (portLinesOptions == XPLO_All_Clear))) // XPLO_All_Clear == both RTS/DTR to 0 (RS485). pInfoArray.push_back(portInfo); } return pInfoArray; } /*! \brief List all serial ports without scanning \param ignoreNonXsensDevices When true (the default), only Xsens ports are returned. \returns The list of detected ports. */ static inline XsPortInfoArray enumerateSerialPorts(bool ignoreNonXsensDevices = true) { XsPortInfoArray ports; XsScanner_enumerateSerialPorts(&ports, ignoreNonXsensDevices?1:0); return ports; } /*! \brief Scan the supplied ports for Xsens devices. \details This function does not modify the input list as opposed to XsScanner_filterResponsiveDevices \param[in] ports The list of ports to scan. \param[in] baudrate The baudrate to scan at. When set to XBR_Invalid, all known baudrates are scanned. \param[in] singleScanTimeout The timeout of a scan of a single port at a single baud rate in ms. \param[in] detectRs485 Enable more extended scan to detect rs485 devices \returns The list of ports that have responsive devices on them. \sa XsScanner_filterResponsiveDevices */ static inline XsPortInfoArray filterResponsiveDevices(const XsPortInfoArray& ports, XsBaudRate baudrate = XBR_Invalid, int singleScanTimeout = 100, bool detectRs485 = false) { XsPortInfoArray filtered(ports); XsScanner_filterResponsiveDevices(&filtered, baudrate, singleScanTimeout, detectRs485?1:0); return filtered; } /*! \brief List all compatible USB ports without scanning. \returns The list of detected usb devices. \sa XsScanner_enumerateUsbDevices */ static inline XsPortInfoArray enumerateUsbDevices(void) { XsPortInfoArray ports; XsScanner_enumerateUsbDevices(&ports); return ports; } /*! \brief Determine the USB hub that \a port is attached to \param port The port for which to determine the USB hub. \returns The identifier of the hub that \a port is attached to. \sa XsScanner_scanUsbHub */ static inline XsUsbHubInfo scanUsbHub(const XsPortInfo& port) { XsUsbHubInfo hub; XsScanner_scanUsbHub(&hub, &port); return hub; } /*! \brief List all compatible network devices without scanning. \returns The list of detected network services. \sa XsScanner_enumerateNetworkDevices */ static inline XsPortInfoArray enumerateNetworkDevices(void) { XsPortInfoArray ports; XsScanner_enumerateNetworkDevices(&ports); return ports; } /*! \brief Abort the currently running port scan(s) \sa XsScanner_abortScan */ static inline void abortScan(void) { XsScanner_abortScan(); } /*! \brief Set a callback function for scan log progress and problem reporting \details When set, any scan will use the provided callback function to report progress and failures. Normal operation is not affected, so all return values for the scan functions remain valid. \param cb The callback function to use. When set to NULL, no callbacks will be generated. \sa XsScanner_setScanLogCallback */ static inline void XSNOCOMEXPORT setScanLogCallback(XsScanLogCallbackFunc cb) { XsScanner_setScanLogCallback(cb); } }; #endif #endif
[ "yangzt_0943@163.com" ]
yangzt_0943@163.com
aa0a665b1e3a8c590c2af0cdb3112692c4a16ce5
1044aa34448f85f7b5075501297dd82bb1357266
/Room.hpp
dcd0979c589cd4fba28e7b95cd7be60b063d0585
[]
no_license
rustushki/lastdoor
347bb49079578612b713129bc63a308e92d10ff9
4a84f76a504ca5ca01f58c1b7631e77f812266f5
refs/heads/master
2021-01-23T01:46:41.043419
2017-05-01T01:52:45
2017-05-01T01:52:45
92,893,136
0
0
null
null
null
null
UTF-8
C++
false
false
310
hpp
#ifndef ROOM_HPP #define ROOM_HPP #include <string> #include <vector> #include "Inventory.hpp" class Room { private: std::string description; Inventory inventory; public: Room(std::string description, Inventory inventory); std::string getDescription(); Inventory& getInventory(); }; #endif//ROOM_HPP
[ "russ.adams@gmail.com" ]
russ.adams@gmail.com
346a45db8ee3c5a4b8c93ff00f64bc5445bb81d9
d7d66364f6e9867ba76bf2cbd7718def2644c4c2
/CodeMap/Code2Pos1.cpp
c9eca2ada17f8f8a79cf74c767b5e58d9bcc6757
[]
no_license
lwzswufe/CppCode
ca61b2f410cca758c8968359234ae28c559e9683
dc9ee87b573acba4f59d26ef1f52b2b92b0982c1
refs/heads/master
2023-07-06T22:36:10.692762
2023-06-22T15:09:02
2023-06-22T15:09:02
105,245,499
0
0
null
null
null
null
UTF-8
C++
false
false
1,768
cpp
#include <string.h> #include "Code2Pos1.h" namespace Code2Pos1 { int CODEARRSIZE{40000}; int CODESIZE{7}; int* CODEARR{nullptr}; } int Code2Pos1::FindCode(const char * code) { // 证券代码字符串转化为数组坐标 效率是map<string,int>的5倍 if (code == NULL || strlen(code) < CODESIZE - 1) return 0; int base, pos; // char s[LOGSIZE]; switch (code[0]) { case '0': // 00X if(code[1] == '0') base = 0; else return 0; break; case '3': // 30X if(code[1] == '0') base = 10000; else return 0; break; case '6': { switch (code[1]) { case '0': base = 20000; break; // 60X; case '8': base = 30000; break; // 68X; default: return 0; break; } break; } default: return 0; // 返回0表示未找到 // sprintf(s, "%s error code:%s out of range[0, %d]\n", __func__, code, CODEARRSIZE); // throw range_error(s); // printf(s); } pos = base + (code[2] - 48) * 1000 + (code[3] - 48) * 100 + (code[4] - 48) * 10 + (code[5] - 48); if (pos < 0 || pos > CODEARRSIZE) return 0; else return CODEARR[pos]; } void Code2Pos1::InitialSearchTable() { CODEARR = new int[CODEARRSIZE]; memset(CODEARR, 0, sizeof(int) * CODEARRSIZE); } void Code2Pos1::ReleaseSearchTable() { if (CODEARR != nullptr) { delete[] CODEARR; CODEARR = nullptr; } }
[ "lwzswufe@foxmail.com" ]
lwzswufe@foxmail.com
fb8adbc2e4613abdb5fcc5633423b485306ddcee
bc6cd18a13992f425bb97406c5c5e7e3b8d8cb03
/src/robot/motion_command_filter.h
91040da3ba22daaaba0f2978868f9926fcd4505d
[ "MIT" ]
permissive
collinej/Vulcan
4ef1e2fc1b383b2b3a9ee59d78dc3c027d4cae24
fa314bca7011d81b9b83f44edc5a51b617d68261
refs/heads/master
2022-09-19T01:59:45.905392
2022-09-18T02:41:22
2022-09-18T02:41:22
186,317,314
3
3
NOASSERTION
2022-04-29T02:06:12
2019-05-13T00:04:38
C++
UTF-8
C++
false
false
3,113
h
/* Copyright (C) 2010-2019, The Regents of The University of Michigan. All rights reserved. This software was developed as part of the The Vulcan project in the Intelligent Robotics Lab under the direction of Benjamin Kuipers, kuipers@umich.edu. Use of this code is governed by an MIT-style License that can be found at "https://github.com/h2ssh/Vulcan". */ /** * \file motion_command_validator.h * \author Jong Jin Park * * Declaration of MotionCommandFilter. */ #ifndef ROBOT_MOTION_COMMAND_FILTER_H #define ROBOT_MOTION_COMMAND_FILTER_H #include "robot/commands.h" #include "robot/params.h" namespace vulcan { namespace robot { /** * MotionCommandFilter is used to determine whether an incoming motion command is valid and can * be issued to the wheelchair. Each motion command has an associated source. A high-level arbiter * determines the active motion command based on user and control inputs. The filter then marks * as valid only those commands coming from the active source. * * An active source either latches for all time or has an associated timeout interval. A source times * out if it doesn't receive a command within the specified timeout interval. Once the active source * has timed out, then no commands are accepted. * * Currently, the timeout value is not being used. It may be added in the future, but its utility needs * to be thought through more carefully in the context of the full system. * * The MotionCommandFilter accepts change_command_source_message_t to determine the currently active * command. To check if a command is valid, use the validMotionCommand() method. * * Currently, the MotionCommandFilter acts as its own arbiter, determing who has command. Eventually, * this capability will be pulled out and placed in a separate arbiter module. Right now, the control * is determined by these rules: * * 0) Manual control immediately overrides all other controls. * 1) Manual control expires after a period of time, allowing any control method afterward. */ class MotionCommandFilter { public: /** * Constructor for MotionCommandFilter. * * \param params Parameters controlling the filter */ MotionCommandFilter(const command_filter_params_t& params); /** * validMotionCommand checks to see if a motion command is valid based on the currently active command source. * * \param command Command to be validated * \return True if the command is valid and should be issued to the wheelchair. */ bool validMotionCommand(const motion_command_t& command); private: void activateSource(command_source_t source, int64_t commandTime, int64_t timeout); void deactivateCurrentSource(void); bool hasSourceTimedOut(int64_t commandTime) const; bool isValidCommand(const motion_command_t& command) const; command_source_t activeSource; int64_t lastValidCommandTime; int64_t sourceTimeoutInterval; command_filter_params_t params; }; } // namespace robot } // namespace vulcan #endif // ROBOT_MOTION_COMMAND_VALIDATOR_H
[ "collinej@umich.edu" ]
collinej@umich.edu
8751752470b80f8013824afbf9a217aa8c7d8683
860fc0c4195dc36abd76919c2926a759aa7b69da
/Search Algorithms/binarysearch_recursive.cpp
83bc6ac3e14ac396e565112f59bbc0bcc2aaa903
[]
no_license
Ankush-Kamboj/Algorithms-Cpp
d9584695b645c68b70c4010a71ac4cce1fdcb457
9ee63f83445ab0b2c6d12a27cad0d0d28a728a87
refs/heads/master
2022-12-26T14:18:00.276464
2020-09-21T03:29:38
2020-09-21T03:29:38
296,233,965
1
0
null
null
null
null
UTF-8
C++
false
false
1,183
cpp
// Binary Search - Recursive #include <iostream> using namespace std; int binarySearch(int arr[], int low, int high, int ele) { if (high >= low){ int mid = low + (high - low)/2; // if element is at the middle if (arr[mid] == ele){ return mid+1; } // if element is smaller than mid, move to left subarray else if (arr[mid] > ele){ high = mid-1; return binarySearch(arr, low, high, ele); } // if element is larger than mid, move to right subarray else{ low = mid+1; return binarySearch(arr, low, high, ele); } } else{ return -1; } } int main(){ int arr[] = {18, 23, 56, 63, 78}; // Binary search takes sorted array int ele = 18; // element to search int size = sizeof(arr)/sizeof(arr[0]); // finding size of array int low = 0; int high = size - 1; int result = binarySearch(arr, low, high, ele); if (result != -1){ cout<<"Position of element is "<<result; } else{ cout<<"Element not present"; } return 0; }
[ "ankushak2000@gmail.com" ]
ankushak2000@gmail.com
db0d11ad1449cf81199940de47078a8305fee5e7
b024e7adc518f11913cbfefbd914ea912ffe6d29
/mymain06.cc
c671c48bea25f2a156fdacf0d58041373c740fde
[]
no_license
codybstrange/casimir-scaling
0cf0a9d1c4d8b31e678d068841d95de1cddb9598
986b7e802cae7cab2220747d5b7bbd9c00badd58
refs/heads/master
2021-05-07T22:31:18.513021
2017-10-18T00:00:59
2017-10-18T00:00:59
107,336,262
0
0
null
null
null
null
UTF-8
C++
false
false
1,956
cc
//Program designed to look at having multiple strings on top of each other //Cody Duncan #include <iostream> #include "Pythia8/Pythia.h" #include "TH1.h" #include "TVirtualPad.h" #include "TApplication.h" #include "TFile.h" #include "TCanvas.h" #include "TSystem.h" using namespace Pythia8; using namespace std; int main(int argc, char* argv[]){ TApplication theApp("hist", &argc, argv); Pythia pythia; Event& event = pythia.event; pythia.readFile("mymain06.cmnd"); ParticleData& pdt = pythia.particleData; int nEvents = 100000; pythia.init(); TH1D* pTNLam = new TH1D("ptNLam", "ratio of yields", 100, 1., 100.); TH1D* pTNPi = new TH1D("pTNPi","ratio of yields", 100, 1., 100.); int nCh, nchlessthan1,nFail; for (int iEvent = 0; iEvent < nEvents; ++iEvent) { event.reset(); nCh = 0; if ( !pythia.next() ) { cout << " error\n"; break; } for (int i = 0; i < event.size(); ++i){ if( abs(event[i].eta())<0.5 && (event[i].isFinal() && event[i].isCharged()) ){ nCh++; } } if (nCh < 1){ nchlessthan1++; pythia.next(); } for (int i = 0; i < event.size(); ++i){ if( abs(event[i].eta()) < 0.5 ){ int m1index = event[i].mother1(); int m2index = event[i].mother2(); int m1id = event[m1index].id(); int m2id = event[m2index].id(); if ( (abs(event[i].id()) == 211) && !((abs(m1id) == 211) || (abs(m2id) == 211))){ pTNPi->Fill(nCh); } else if ( (abs( event[i].id()) == 310) && !((abs(m1id) == 310) || (abs(m2id) == 3312))){ pTNLam->Fill(nCh); } } } } pTNLam->Divide(pTNPi); pTNLam->Draw(); gPad->SetLogy(); gPad->SetLogx(); std::cout << "\nDouble click on the histogram window to quit.\n"; gPad->WaitPrimitive(); cout<<"nCh "<<nCh<<endl; cout<<"nFail "<<nFail<<endl; cout<<"Mean charged multiplicity "<<nCh*1./nEvents<<endl; return 0; }
[ "noreply@github.com" ]
codybstrange.noreply@github.com
a0b2162a30a468ca1cf81448e8cf23bc6918f69c
872095f6ca1d7f252a1a3cb90ad73e84f01345a2
/mediatek/proprietary/hardware/mtkcam/middleware/common/include/v3/utils/streaminfo/IStreamInfoSetControl.h
c9c9ec50e3fc219616abcf99783ba9e1564d49d3
[]
no_license
colinovski/mt8163-vendor
724c49a47e1fa64540efe210d26e72c883ee591d
2006b5183be2fac6a82eff7d9ed09c2633acafcc
refs/heads/master
2020-07-04T12:39:09.679221
2018-01-20T09:11:52
2018-01-20T09:11:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,078
h
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ #ifndef _MTK_HARDWARE_INCLUDE_MTKCAM_V3_UTILS_STREAMINFO_ISTREAMINFOSETCONTROL_H_ #define _MTK_HARDWARE_INCLUDE_MTKCAM_V3_UTILS_STREAMINFO_ISTREAMINFOSETCONTROL_H_ // #include <utils/KeyedVector.h> #include <v3/stream/IStreamInfo.h> /****************************************************************************** * ******************************************************************************/ namespace NSCam { namespace v3 { namespace Utils { /** * An interface of stream info set control. */ class SimpleStreamInfoSetControl : public virtual IStreamInfoSet { //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Definitions. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public: //// template <class IStreamInfoT> struct Map : public IMap<IStreamInfoT> , public android::KeyedVector<StreamId_T, android::sp<IStreamInfoT> > { public: //// typedef android::KeyedVector<StreamId_T, android::sp<IStreamInfoT> > ParentT; typedef typename ParentT::key_type key_type; typedef typename ParentT::value_type value_type; public: //// Operations. virtual size_t size() const { return ParentT::size(); } virtual ssize_t indexOfKey(StreamId_T id) const { return ParentT::indexOfKey(id); } virtual android::sp<IStreamInfoT> valueFor(StreamId_T id) const { return ParentT::valueFor(id); } virtual android::sp<IStreamInfoT> valueAt(size_t index) const { return ParentT::valueAt(index); } ssize_t addStream(value_type const& p) { return ParentT::add(p->getStreamId(), p); } }; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Implementations. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ protected: //// Data Members. android::sp<Map<IMetaStreamInfo> > mpMeta; android::sp<Map<IImageStreamInfo> > mpImage; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Interface. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public: //// Operations. SimpleStreamInfoSetControl() : mpMeta(new Map<IMetaStreamInfo>) , mpImage(new Map<IImageStreamInfo>) { } virtual Map<IMetaStreamInfo> const& getMeta() const { return *mpMeta; } virtual Map<IImageStreamInfo>const& getImage()const { return *mpImage; } virtual Map<IMetaStreamInfo>& editMeta() { return *mpMeta; } virtual Map<IImageStreamInfo>& editImage() { return *mpImage; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // IStreamInfoSet Interface. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public: //// Operations. #define _IMPLEMENT_(_type_) \ virtual android::sp<IMap<I##_type_##StreamInfo> > \ get##_type_##InfoMap() const { return mp##_type_; } \ \ virtual size_t \ get##_type_##InfoNum() const { return mp##_type_->size(); } \ \ virtual android::sp<I##_type_##StreamInfo> \ get##_type_##InfoFor(StreamId_T id) const { return mp##_type_->valueFor(id); } \ \ virtual android::sp<I##_type_##StreamInfo> \ get##_type_##InfoAt(size_t index) const { return mp##_type_->valueAt(index); } _IMPLEMENT_(Meta) _IMPLEMENT_(Image) #undef _IMPLEMENT_ }; /** * An interface of stream info set control. */ class IStreamInfoSetControl : public IStreamInfoSet { //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // IStreamInfoSetControl Interface. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public: //// Definitions. template <class IStreamInfoT> struct Map : public android::KeyedVector<StreamId_T, android::sp<IStreamInfoT> > { public: //// typedef android::KeyedVector<StreamId_T, android::sp<IStreamInfoT> > ParentT; typedef typename ParentT::key_type key_type; typedef typename ParentT::value_type value_type; public: //// Operations. ssize_t addStream(value_type const& p) { return ParentT::add(p->getStreamId(), p); } }; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Implementations. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ protected: //// Definitions. template <class IStreamInfoT> struct Set : public IMap<IStreamInfoT> { typedef Map<IStreamInfoT> MapT; MapT mApp; MapT mHal; size_t size() const { return mApp.size() + mHal.size(); } virtual ssize_t indexOfKey(StreamId_T id) const { ssize_t index = 0; if ( 0 <= (index = mApp.indexOfKey(id)) ) return index; if ( 0 <= (index = mHal.indexOfKey(id)) ) return index + mApp.size(); return NAME_NOT_FOUND; } virtual android::sp<IStreamInfoT> valueFor(StreamId_T id) const { ssize_t index = 0; if ( 0 <= (index = mApp.indexOfKey(id)) ) return mApp.valueAt(index); if ( 0 <= (index = mHal.indexOfKey(id)) ) return mHal.valueAt(index); return NULL; } virtual android::sp<IStreamInfoT> valueAt(size_t index) const { if ( mApp.size() > index ) return mApp.valueAt(index); index -= mApp.size(); if ( mHal.size() > index ) return mHal.valueAt(index); return NULL; } }; protected: //// Data Members. android::sp<Set<IMetaStreamInfo> > mpSetMeta; android::sp<Set<IImageStreamInfo> > mpSetImage; protected: //// Operations. IStreamInfoSetControl() : mpSetMeta(new Set<IMetaStreamInfo>) , mpSetImage(new Set<IImageStreamInfo>) {} //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // IStreamInfoSetControl Interface. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public: //// Operations. static IStreamInfoSetControl* create() { return new IStreamInfoSetControl; } virtual Map<IMetaStreamInfo> const& getAppMeta() const { return mpSetMeta->mApp; } virtual Map<IMetaStreamInfo> const& getHalMeta() const { return mpSetMeta->mHal; } virtual Map<IImageStreamInfo>const& getAppImage()const { return mpSetImage->mApp; } virtual Map<IImageStreamInfo>const& getHalImage()const { return mpSetImage->mHal; } virtual Map<IMetaStreamInfo>& editAppMeta() { return mpSetMeta->mApp; } virtual Map<IMetaStreamInfo>& editHalMeta() { return mpSetMeta->mHal; } virtual Map<IImageStreamInfo>& editAppImage() { return mpSetImage->mApp; } virtual Map<IImageStreamInfo>& editHalImage() { return mpSetImage->mHal; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // IStreamInfoSet Interface. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public: //// Operations. #define _IMPLEMENT_(_type_) \ virtual android::sp<IMap<I##_type_##StreamInfo> > \ get##_type_##InfoMap() const { return mpSet##_type_; } \ \ virtual size_t \ get##_type_##InfoNum() const { return mpSet##_type_->size(); } \ \ virtual android::sp<I##_type_##StreamInfo> \ get##_type_##InfoFor(StreamId_T id) const { return mpSet##_type_->valueFor(id); } \ \ virtual android::sp<I##_type_##StreamInfo> \ get##_type_##InfoAt(size_t index) const { return mpSet##_type_->valueAt(index); } _IMPLEMENT_(Meta) // IMetaStreamInfo, mAppMeta, mHalMeta _IMPLEMENT_(Image) //IImageStreamInfo, mAppImage, mHalImage #undef _IMPLEMENT_ }; /****************************************************************************** * ******************************************************************************/ }; //namespace Utils }; //namespace v3 }; //namespace NSCam #endif //_MTK_HARDWARE_INCLUDE_MTKCAM_V3_UTILS_STREAMINFO_ISTREAMINFOSETCONTROL_H_
[ "peishengguo@yydrobot.com" ]
peishengguo@yydrobot.com
be53c3bc2aefec0466c8b4ae5f2ef87995b9b658
b3dfc1ccdbce9bcfd585b45d4bbdab09c91f4cd5
/200). Problem of the Day [14-09-2021]/GeekforGeeks - Remove loop in Linked List.cpp
a9997b358fb64cf8491c9f19dc22e9ca9bbd493e
[]
no_license
arun0808rana/365-Days-of-Code
2b107f5ccc6a8a775f77fa7674240bce64538059
7a5eafa9a819a1decdf0771bb919c0551e01af3e
refs/heads/master
2023-08-25T12:10:36.505506
2021-10-17T05:05:14
2021-10-17T05:05:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,384
cpp
#include <iostream> using namespace std; struct Node { int data; Node* next; Node(int val) { data = val; next = NULL; } }; void loopHere(Node* head, Node* tail, int position) { if(position==0) return; Node* walk = head; for(int i=1; i<position; i++) walk = walk->next; tail->next = walk; } bool isLoop(Node* head) { if(!head) return false; Node* fast = head->next; Node* slow = head; while( fast != slow) { if( !fast || !fast->next ) return false; fast=fast->next->next; slow=slow->next; } return true; } int length(Node* head) { int ret = 0; while(head) { ret++; head = head->next; } return ret; } class Solution { public: //Function to remove a loop in the linked list. void removeLoop(Node* head) { // code here // just remove the loop without losing any nodes if(head==NULL ||head->next==NULL) return; Node *s=head; Node *f=head; bool loop=false; while(f && f->next && s) { f=f->next->next; s=s->next; if(f==s) { loop=true; break; } } if(!loop) return; if(f==head) { while(f->next!=head) { f=f->next; } f->next=NULL; return; } else { s=head; while(f->next!=s->next) { f=f->next; s=s->next; } f->next=NULL; return; } } }; int main() { int t; cin>>t; while(t--) { int n, num; cin>>n; Node *head, *tail; cin>> num; head = tail = new Node(num); for(int i=0 ; i<n-1 ; i++) { cin>> num; tail->next = new Node(num); tail = tail->next; } int pos; cin>> pos; loopHere(head,tail,pos); Solution ob; ob.removeLoop(head); if( isLoop(head) || length(head)!=n ) cout<<"0\n"; else cout<<"1\n"; } return 0; }
[ "noreply@github.com" ]
arun0808rana.noreply@github.com
66550b521456b8c701c794fd3bb13bb216bb269f
619054eaea6b93fb3ad354606029363817088285
/rai/common/parameters.hpp
96c194dcaabdcd179d00ead1132780ca9858807b
[ "MIT" ]
permissive
raicoincommunity/Raicoin
e3d1047b30cde66706b994a3b31e0b541b07c79f
ebc480caca04caebdedbc3afb4a8a0f60a8c895f
refs/heads/master
2023-09-03T00:39:00.762688
2023-08-29T17:01:09
2023-08-29T17:01:09
210,498,091
99
16
MIT
2023-08-29T17:01:11
2019-09-24T02:52:27
C++
UTF-8
C++
false
false
5,261
hpp
#pragma once #include <string> #include <rai/common/numbers.hpp> #include <rai/common/chain.hpp> namespace rai { #define XSTR(x) VER_STR(x) #define VER_STR(x) #x const char * const RAI_VERSION_STRING = XSTR(TAG_VERSION_STRING); enum class RaiNetworks { // Low work parameters, publicly known genesis key, test IP ports TEST, // Normal work parameters, secret beta genesis key, beta IP ports BETA, // Normal work parameters, secret live key, live IP ports LIVE, }; rai::RaiNetworks constexpr RAI_NETWORK = rai::RaiNetworks::ACTIVE_NETWORK; std::string NetworkString(); uint64_t constexpr TEST_EPOCH_TIMESTAMP = 1577836800; uint64_t constexpr TEST_GENESIS_BALANCE = 10000000; //unit: RAI const std::string TEST_PRIVATE_KEY = "34F0A37AAD20F4A260F0A5B3CB3D7FB50673212263E58A380BC10474BB039CE4"; // rai_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpiij4txtdo const std::string TEST_PUBLIC_KEY = "B0311EA55708D6A53C75CDBF88300259C6D018522FE3D4D0A242E431F9E8B6D0"; const std::string TEST_GENESIS_BLOCK = R"%%%({ "type": "transaction", "opcode": "receive", "credit": "512", "counter": "1", "timestamp": "1577836800", "height": "0", "account": "rai_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpiij4txtdo", "previous": "0000000000000000000000000000000000000000000000000000000000000000", "representative": "rai_1nwbq4dzmo7oe8kzz6ox3bdp75n6chhfrd344yforc8bo4n9mbi66oswoac9", "balance": "10000000000000000", "link": "B0311EA55708D6A53C75CDBF88300259C6D018522FE3D4D0A242E431F9E8B6D0", "signature": "67DF01C204603C0715CAA3B1CB01B1CE1ED84E499F3432D85D01B1509DE9C51D4267FEAB2E376903A625B106818B0129FAC19B78C2F5631F8CAB48A7DF502602" })%%%"; uint64_t constexpr BETA_EPOCH_TIMESTAMP = 1585699200; uint64_t constexpr BETA_GENESIS_BALANCE = 10010000; //unit: RAI const std::string BETA_PUBLIC_KEY = "4681DC26DA5C34B59D5B320D8053D957D5FC824CE39B239B101892658F180F08"; const std::string BETA_GENESIS_BLOCK = R"%%%({ "type": "transaction", "opcode": "receive", "credit": "512", "counter": "1", "timestamp": "1585699200", "height": "0", "account": "rai_1jn3uimfnq3nppgopeifi3bxkoyozk36srwu6gfj186kep9ji5rawm6ok3rr", "previous": "0000000000000000000000000000000000000000000000000000000000000000", "representative": "rai_1jngsd4mnzfb4h5j8eji5ynqbigaz16dmjjdz8us6run1ziyzuqfhz8yz3uf", "balance": "10010000000000000", "link": "4681DC26DA5C34B59D5B320D8053D957D5FC824CE39B239B101892658F180F08", "signature": "D265320853B6D9533EEB48E857E0C68DF3E32C5CF1B1178236EB2E0453A68B8F927415ACE8FC1E5C16C8DEB7C11DD43EFD86CA3DDB826243400AAF85DCC8D506" })%%%"; uint64_t constexpr LIVE_EPOCH_TIMESTAMP = 1595894400; uint64_t constexpr LIVE_GENESIS_BALANCE = 10010000; //unit: RAI const std::string LIVE_PUBLIC_KEY = "0EF328F20F9B722A42A5A0873D7F4F05620E8E9D9C5BF0F61403B98022448828"; const std::string LIVE_GENESIS_BLOCK = R"%%%({ "type": "transaction", "opcode": "receive", "credit": "512", "counter": "1", "timestamp": "1595894400", "height": "0", "account": "rai_15qm75s1z8uk7b3cda699ozny3d43t9bu94uy5u3a1xsi1j6b43apftwsfs9", "previous": "0000000000000000000000000000000000000000000000000000000000000000", "representative": "rai_3h5s5bgaf1jp1rofe5umxan84kiwxj3ppeuyids7zzaxahsohzchcyxqzwp6", "balance": "10010000000000000", "link": "0EF328F20F9B722A42A5A0873D7F4F05620E8E9D9C5BF0F61403B98022448828", "signature": "ACA0AC37F02B2C9D40929EAD69FAE1828E89728896FB06EEA8274852CDA647E9F9AB9D5868DB379253CAD2E0D011BEC4EA4FF2BBC9A369354D4D8154C796920F" })%%%"; uint64_t constexpr MAX_TIMESTAMP_DIFF = 300; uint64_t constexpr MIN_CONFIRM_INTERVAL = 10; uint32_t constexpr TRANSACTIONS_PER_CREDIT = 20; uint32_t constexpr ORDERS_PER_CREDIT = 1; uint64_t constexpr SWAPS_PER_CREDIT = 1; uint64_t constexpr EXTRA_FORKS_PER_CREDIT = 1; uint16_t constexpr MAX_ACCOUNT_CREDIT = 65535; uint32_t constexpr MAX_ACCOUNT_DAILY_TRANSACTIONS = MAX_ACCOUNT_CREDIT * TRANSACTIONS_PER_CREDIT; uint32_t constexpr CONFIRM_WEIGHT_PERCENTAGE = 80; uint32_t constexpr FORK_ELECTION_ROUNDS_THRESHOLD = 5; uint32_t constexpr AIRDROP_ACCOUNTS = 10000; uint64_t constexpr AIRDROP_INVITED_ONLY_DURATION = 180 * 86400; uint64_t constexpr AIRDROP_DURATION = 4 * 360 * 86400; size_t constexpr MAX_EXTENSIONS_SIZE = 256; uint64_t constexpr SWAP_PING_PONG_INTERVAL = 60; uint64_t constexpr BASE_ALLOWED_BINDINGS = 16; uint64_t constexpr EXTRA_BINDINGS_PER_CREDIT = 1; uint32_t constexpr CROSS_CHAIN_EPOCH_INTERVAL = 3 * 24 * 60 * 60; // Votes from qualified representatives will be broadcasted const rai::Amount QUALIFIED_REP_WEIGHT = rai::Amount(256 * rai::RAI); uint64_t EpochTimestamp(); std::string GenesisPublicKey(); rai::Amount GenesisBalance(); std::string GenesisBlock(); rai::Amount CreditPrice(uint64_t); rai::Amount RewardRate(uint64_t); rai::Amount RewardAmount(const rai::Amount&, uint64_t, uint64_t); uint64_t RewardTimestamp(uint64_t, uint64_t); uint16_t BaseAllowedForks(uint64_t); uint64_t MaxAllowedForks(uint64_t, uint32_t); uint64_t AllowedBindings(uint32_t); rai::Chain CurrentChain(); uint32_t CrossChainEpoch(uint64_t); uint64_t CrossChainEpochTimestamp(uint32_t); } // namespace rai
[ "bitharu7@gmail.com" ]
bitharu7@gmail.com
3c121af99a4456b0a0c7a0589b6c145c89210a26
0651168677127e9c4ccbe185dc865227144bc825
/src/node_request.cpp
415d27d82e73cc443a4ca10d34b451ffc16e8044
[]
no_license
ezhangle/node-mapbox-gl-native
9f5904d8755d29bc54bd02f4a34d4625c5b661ac
ffc937b18476304a4833ba6728a94c5f6f178973
refs/heads/master
2021-01-17T04:23:39.769651
2015-03-15T03:25:46
2015-03-15T03:25:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,891
cpp
#include "node_request.hpp" #include "node_file_source.hpp" #include <mbgl/storage/default/request.hpp> #include <mbgl/storage/response.hpp> #include <cmath> namespace node_mbgl { //////////////////////////////////////////////////////////////////////////////////////////////// // Static Node Methods v8::Persistent<v8::FunctionTemplate> NodeRequest::constructorTemplate; void NodeRequest::Init(v8::Handle<v8::Object> target) { NanScope(); v8::Local<v8::FunctionTemplate> t = NanNew<v8::FunctionTemplate>(New); t->InstanceTemplate()->SetInternalFieldCount(1); t->SetClassName(NanNew("Request")); NODE_SET_PROTOTYPE_METHOD(t, "respond", Respond); NanAssignPersistent(constructorTemplate, t); target->Set(NanNew("Request"), t->GetFunction()); } NAN_METHOD(NodeRequest::New) { NanScope(); // Extract the pointer from the first argument if (args.Length() < 2 || !NanHasInstance(NodeFileSource::constructorTemplate, args[0]) || !args[1]->IsExternal()) { return NanThrowTypeError("Cannot create Request objects explicitly"); } auto source = v8::Persistent<v8::Object>::New(args[0]->ToObject()); auto request = reinterpret_cast<mbgl::Request *>(args[1].As<v8::External>()->Value()); auto req = new NodeRequest(source, request); req->Wrap(args.This()); NanReturnValue(args.This()); } v8::Handle<v8::Object> NodeRequest::Create(v8::Handle<v8::Object> source, mbgl::Request *request) { NanScope(); v8::Local<v8::Value> argv[] = { v8::Local<v8::Object>::New(source), NanNew<v8::External>(request) }; auto instance = constructorTemplate->GetFunction()->NewInstance(2, argv); instance->Set(NanNew("url"), NanNew(request->resource.url), v8::ReadOnly); instance->Set(NanNew("kind"), NanNew<v8::Integer>(int(request->resource.kind)), v8::ReadOnly); NanReturnValue(instance); } NAN_METHOD(NodeRequest::Respond) { NanScope(); auto nodeRequest = ObjectWrap::Unwrap<NodeRequest>(args.Holder()); if (!nodeRequest->request) { return NanThrowError("Request has already been responded to, or was canceled."); } auto source = ObjectWrap::Unwrap<NodeFileSource>(nodeRequest->source); auto request = nodeRequest->request; nodeRequest->request = nullptr; if (args.Length() < 1) { return NanThrowTypeError("First argument must be an error object"); } else if (args[0]->BooleanValue()) { auto response = std::make_shared<mbgl::Response>(); response->status = mbgl::Response::Error; // Store the error string. const NanUtf8String message { args[0]->ToString() }; response->message = std::string { *message, size_t(message.length()) }; source->notify(request, response); } else if (args.Length() < 2 || !args[1]->IsObject()) { return NanThrowTypeError("Second argument must be a response object"); } else { auto response = std::make_shared<mbgl::Response>(); auto res = args[1]->ToObject(); response->status = mbgl::Response::Successful; if (res->Has(NanNew("modified"))) { const double modified = res->Get(NanNew("modified"))->ToNumber()->Value(); if (!std::isnan(modified)) { response->modified = modified / 1000; // JS timestamps are milliseconds } } if (res->Has(NanNew("expires"))) { const double expires = res->Get(NanNew("expires"))->ToNumber()->Value(); if (!std::isnan(expires)) { response->expires = expires / 1000; // JS timestamps are milliseconds } } if (res->Has(NanNew("etag"))) { auto etagHandle = res->Get(NanNew("etag")); if (etagHandle->BooleanValue()) { const NanUtf8String etag { etagHandle->ToString() }; response->etag = std::string { *etag, size_t(etag.length()) }; } } if (res->Has(NanNew("data"))) { auto dataHandle = res->Get(NanNew("data")); if (node::Buffer::HasInstance(dataHandle)) { response->data = std::string { node::Buffer::Data(dataHandle), node::Buffer::Length(dataHandle) }; } else { return NanThrowTypeError("Response data must be a Buffer"); } } // Send the response object to the NodeFileSource object source->notify(request, response); } NanReturnUndefined(); } //////////////////////////////////////////////////////////////////////////////////////////////// // Instance NodeRequest::NodeRequest(v8::Persistent<v8::Object> source_, mbgl::Request *request_) : source(source_), request(request_) { } NodeRequest::~NodeRequest() { source.Dispose(); } void NodeRequest::cancel() { request = nullptr; } }
[ "mail@kkaefer.com" ]
mail@kkaefer.com
a03d1da25cad9370043a4f10dd68bf23a9a99f0d
6ff1a9ee8d6b360250da0760454725f256c0e0b8
/C++/GreedyCPP/minNumberofTaps.cpp
7c69feaf5b4fe5dd76ba365e5acbd0bd241cc247
[]
no_license
itsme-aparna/Coding-Notes
2e44df523548db9fa15c561fa0d5a8e060783acf
60cbb7d6aa61d50c44cdf022250b683118164a47
refs/heads/master
2023-08-21T15:31:02.898529
2021-10-06T07:57:28
2021-10-06T07:57:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
555
cpp
LEETCODE - 1326 class Solution { public: int minTaps(int n, vector<int>& ranges) { int min = 0; int max = 0; int open = 0; while(max < n){ for(int i = 0; i <= n; i++){ if((i - ranges[i]) <= min && (i + ranges[i]) > max){ max = i + ranges[i]; } } if(min == max) return -1; open++; min = max; } return open; } };
[ "noreply@github.com" ]
itsme-aparna.noreply@github.com
ddaf2cb7b649a003d371f109e0da829a4fc5d2ce
0e457eda72fe89e8690396734fbf12b5cea94e98
/DONE/CF 1181G.cpp
12a854d74c6a3706030c4e3f681079a72126cd34
[]
no_license
Li-Dicker/OI-Workspace
755f12b0383a41bfb92572b843e99ae27401891c
92e1385a7cffd465e8d01d03424307ac2767b200
refs/heads/master
2023-01-23T05:55:53.510072
2020-12-12T08:33:50
2020-12-12T08:33:50
305,936,883
0
0
null
null
null
null
UTF-8
C++
false
false
214
cpp
#include<bits/stdc++.h> #define int long long #define M (1<<20) #define INF 0x3f3f3f3f using namespace std; int T,n; signed main() { scanf("%lld %lld",&n,&T); for (int i=1;i<=n;i++) return 0; }
[ "Li_Dicker@qq.com" ]
Li_Dicker@qq.com
350b07954d3c0977fe4cabda40da3f64602f0601
e60c7658cd254538ecaed0d7a803ee58460c8f9b
/3scan-scope-master aux1.56/auxbox/BallValve.cpp
3dd3beb375178402fb796fdb501c79056c8550d6
[]
no_license
skolk/AUX
0915866108ddd905a4f57acba054b49ef3ffb25c
3e9ee60270c05f1459a0f54183e003dd93eb3140
refs/heads/master
2016-09-06T09:10:07.002305
2016-01-13T15:50:39
2016-01-13T15:50:39
30,661,533
0
0
null
null
null
null
UTF-8
C++
false
false
925
cpp
#include "BallValve.h" BallValve::BallValve(uint8_t pinOpen, uint8_t pinClose) { _pinOpen = pinOpen; _pinClose = pinClose; pinMode(_pinOpen, OUTPUT); pinMode(_pinClose, OUTPUT); // On startup, we don't know what the state of the system is. // We won't know until we call either open() or close(). _hasBeenSet = false; _isOpen = false; } void BallValve::open() { digitalWrite(_pinOpen, LOW); digitalWrite(_pinClose, HIGH); _hasBeenSet = true; _isOpen = true; } void BallValve::close() { digitalWrite(_pinOpen, HIGH); digitalWrite(_pinClose, LOW); _hasBeenSet = true; _isOpen = false; } void BallValve::setState(boolean _open) { if (_open) { open(); } else { close(); } } void BallValve::hold() { digitalWrite(_pinOpen, HIGH); digitalWrite(_pinClose, HIGH); } boolean BallValve::isOpen() { return _isOpen; } boolean BallValve::hasBeenSet() { return _hasBeenSet; }
[ "sean.kolk@gmail.com" ]
sean.kolk@gmail.com
f1c638fc4582256f865ff11fcb5d4398d527de12
3ad968797a01a4e4b9a87e2200eeb3fb47bf269a
/dsoundwc_src/Source/Sounder.h
a181d5ead0fadeacd660d6db160f7b75af7624fc
[]
no_license
LittleDrogon/MFC-Examples
403641a1ae9b90e67fe242da3af6d9285698f10b
1d8b5d19033409cd89da3aba3ec1695802c89a7a
refs/heads/main
2023-03-20T22:53:02.590825
2020-12-31T09:56:37
2020-12-31T09:56:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,286
h
// Sounder.h : main header file for the SOUNDER application // #if !defined(AFX_SOUNDER_H__A14C6329_9447_433F_B74D_0D8727A76C05__INCLUDED_) #define AFX_SOUNDER_H__A14C6329_9447_433F_B74D_0D8727A76C05__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CSounderApp: // See Sounder.cpp for the implementation of this class // class CSounderApp : public CWinApp { public: CSounderApp(); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSounderApp) public: virtual BOOL InitInstance(); //}}AFX_VIRTUAL // Implementation //{{AFX_MSG(CSounderApp) // NOTE - the ClassWizard will add and remove member functions here. // DO NOT EDIT what you see in these blocks of generated code ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SOUNDER_H__A14C6329_9447_433F_B74D_0D8727A76C05__INCLUDED_)
[ "pkedpekr@gmail.com" ]
pkedpekr@gmail.com
af69807ba13d1fc6914906571a7cabaf96f74e68
f9f8bd992dac718043a5e8c12deed3dd190c21d0
/Stacks-Queues/Balanced Parenthesis (Interesting).cpp
9ad1b4c8bbe9a958da6a9753bc0efc19db2f89cc
[]
no_license
sankalp163/CPP-codes
e51e920ac296aa3481edaa56566c9e63913550c7
1cc1a75311262b19fcab8086c58f7c68871100b8
refs/heads/main
2023-06-14T18:19:55.967344
2021-07-12T06:45:10
2021-07-12T06:45:10
338,971,480
1
0
null
null
null
null
UTF-8
C++
false
false
893
cpp
#include<stack> bool checkBalanced(char *exp) { // Write your code here int i=0; stack<char> s; while(exp[i]!='\0'){ if(exp[i]=='('||exp[i]=='{'||exp[i]=='['){ s.push(exp[i]); } else if(!s.empty() &&( exp[i]==')'||exp[i]=='}'||exp[i]==']')){ if(s.top()=='(' && exp[i]==')'){ s.pop(); } else if(s.top()=='{' && exp[i]=='}'){ s.pop(); } else if(s.top()=='[' && exp[i]==']'){ s.pop(); } else{ return false; } } else if(s.empty() && ( exp[i]==')'||exp[i]=='}'||exp[i]==']') ){ return false; } i++; } if(exp[i]=='\0' && s.empty()){ return true; } else{ return false; } }
[ "noreply@github.com" ]
sankalp163.noreply@github.com
af61b662e334a89d8cf1a3998d9cfb5493379851
338f43cebbc5876dbb0fb97f2fae0cd4445ac956
/c++程序设计作业11/concrete_subject3.h
8bd39b68b9507e4ebe012b1dc17c3a86941d0003
[]
no_license
LongJinhe-coder/cplusplus
09fa92b53598d071bde28f9ad73b2f146395061c
87e636b69c776cdae219fd0520eedede46021327
refs/heads/master
2020-09-22T01:49:18.064270
2020-08-02T08:28:51
2020-08-02T08:28:51
225,007,947
0
0
null
null
null
null
UTF-8
C++
false
false
316
h
#pragma once #include"subject.h" #include"concreteState3.h" #include<string> using std::string; class concreteSubject3 :public subject { public: concreteSubject3(const string & name,const concreteState3 s=NULL) :subject(name) {} state* getState() const { return _state; } void setState(state *s) { _state = s; } };
[ "[909642437@qq.com]" ]
[909642437@qq.com]
0a3a374837f95b1a2fe708fa347bff37196fdee5
7062b6bd0c8135632a96af162f8a0f4d344ff3c4
/MockCCC++/Mock CCC '20 Contest 2 S2 - 4D BBST on a DP.cpp
2b95afcf236d1985057883856d1a375cd70baca9
[]
no_license
ngc/CompetitiveProgramming
e2560127978bf67fe9452431bffcd8f4e99558d9
fab82b377c5f632135d15fc25b6a1130d800bbf2
refs/heads/master
2022-11-29T02:00:56.324832
2020-08-16T18:53:20
2020-08-16T18:53:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
878
cpp
#include <bits/stdc++.h> #include <cstdio> #include <iostream> using namespace std; typedef long long LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<LL> vl; typedef vector<vl> vvl; typedef queue<int> qi; typedef queue<char> qc; typedef stack<int> si; typedef stack<char> sc; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; string t; cin >> n >> t; qc q; for(int i = 0; i < n; i++){ q.push(t[i]); } string current = ""; current += q.front(); q.pop(); while(!q.empty()){ string temp = ""; if(q.front() < current[0] || q.front() == current[0]){ temp += q.front(); temp += current; current = temp; }else{ current += q.front(); } q.pop(); } cout << current << "\n"; return 0; }
[ "noreply@github.com" ]
ngc.noreply@github.com
17fa9e9dde6edf49bfd8be7dd109054fbda8cf89
b874278ed138a775e07712631f5f9b86858a730e
/Conntendo/Mappers/mapper69.h
8b5ac9836cf5946ab6e8595c9cf2922c8e8ad071
[]
no_license
cynicconn/Conntendo
a10f2f962bdb6b1a5376c3f0ec95d44c3b4feb0e
2203048033e6a5b2ded3a66dc1cddf85110f312e
refs/heads/master
2020-03-31T06:26:38.881777
2018-10-11T14:02:49
2018-10-11T14:02:49
151,982,409
2
0
null
null
null
null
UTF-8
C++
false
false
641
h
#pragma once #include "mapper.h" // Sunsoft FME-7 ROMs ( Batman Return of the Joker ) class Mapper69 : public Mapper { public: Mapper69(u8* rom); void SetBanks(); // Read-Write Functions u8 read8(u16 address); u8 write8(u16 address, u8 val); u8 chr_write8(u16 address, u8 val); // CPU IRQ void SignalCPU(); // SaveStates MAPPER::SaveData GrabSaveData(); void LoadSaveData(MAPPER::SaveData loadedData); private: u8 command; u8 parameter; u8 prgBank[4]; u8 chrBank[8]; u8 ntMirror; // IRQ Variables bool irqEnable; bool irqCounterEnable; int irqCounter; void Command(); };
[ "noreply@github.com" ]
cynicconn.noreply@github.com
bd7ba8597209563de38c009d59c5c3b6c07727c4
2ee949a4acaf752d1484ace8b4db4df1eef3efa9
/ass4/server/Server.cpp
140b097bc4f2d39c9f3b720bcad25b17f1bfecb9
[]
no_license
afekaoh/Anomaly-Detector-AP1
ade0f1fab782f79dcaa64b5eb14893ab953f049d
ebc2ac9f14145035d39e9db9e1026116d68986eb
refs/heads/master
2023-04-07T00:32:31.978682
2021-04-17T19:19:00
2021-04-17T19:19:00
304,866,653
0
0
null
null
null
null
UTF-8
C++
false
false
2,069
cpp
/* * Author: Adam Shapira; 3160044809 */ #include "Server.h" #include <thread> #include <netdb.h> Server::Server(int port) noexcept(false): socket_fd(-1) { // setting up the server socket struct sockaddr_in serverAdress{}; socket_fd = socket(AF_INET, SOCK_STREAM, 0); if (socket_fd < 0) { throw ("socket\n"); } // setting up the ip hostent* record = gethostbyname("localhost"); auto* address = (in_addr*) record->h_addr; string ip_address = inet_ntoa(*address); serverAdress.sin_family = AF_INET; serverAdress.sin_port = htons(port); if (inet_aton(ip_address.c_str(), &serverAdress.sin_addr) == 0) { throw ("IP Address is not valid\n"); } // binding the socket to the ip if (bind(socket_fd, (const sockaddr*) &serverAdress, sizeof(serverAdress)) < 0) throw ("Call to bind() failed\n"); } void Server::start(ClientHandler &ch) noexcept(false) { // creating a new thread for the listening t = std::unique_ptr<std::thread>(new thread(&Server::startServer, this, std::ref(ch))); } void Server::startServer(ClientHandler &ch) const noexcept(false) { // Listen for new connections if (listen(socket_fd, 1) < 0) { throw ("Error when listening to new connections\n"); } // setting the timeout for 1 sec struct timeval timeout{.tv_sec = 1, .tv_usec =0}; // setting up the socket int client_socket_fd; struct sockaddr_in clientAddress{}; socklen_t clientAddressLength = sizeof(clientAddress); size_t timeLen = sizeof(timeout); while (true) { // starting the timout if (setsockopt(socket_fd, SOL_SOCKET, SO_RCVTIMEO, (char*) &timeout, timeLen) < 0) throw ("setsockopt failed\n"); client_socket_fd = accept(socket_fd, (sockaddr*) &clientAddress, &clientAddressLength); if (client_socket_fd == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) //we got timeout break; else throw "Error in accept\n"; } // creating a new thread for every client thread(&ClientHandler::handle, &ch, client_socket_fd).detach(); } } void Server::stop() { t->join(); // do not delete this! } Server::~Server() { }
[ "50743751+afekaoh@users.noreply.github.com" ]
50743751+afekaoh@users.noreply.github.com
f0234c5d4642898f5e5233f27dfdb9acca9bd725
f12d70150e9255fd456517f3588850f9e4c24b02
/main.cpp
7ec7d6f8c579739eb16656a0e1c6840b7bc60667
[]
no_license
EX-Zhang/Snake
4ba72151b4871ffa67bb20d08c9d41a728bae547
0c5627877d3a4c71b9a66cdfd3aa9ce62e191c9c
refs/heads/master
2022-11-28T19:13:21.631686
2020-07-30T01:46:27
2020-07-30T01:46:27
282,340,796
0
0
null
null
null
null
UTF-8
C++
false
false
133
cpp
#include "game.h" int main(int argc, char** argv) { game game; game.game_start(); game.game_circle(); game.game_end(); }
[ "noreply@github.com" ]
EX-Zhang.noreply@github.com
98c52b8e605ccf1d5c4173847ef2fec5f804ea0e
ab2c6c1488074011d42a144e5c68fa8c6ad43bcf
/cforces/631B.cc
e33d3f1c371ef1e531517d562441ceb806859a96
[]
no_license
mtszkw/contests
491883aa9f596e6dbd213049baee3a5c58d4a492
5b66d26be114fe12e5c1bc102ae4c3bafbc764e9
refs/heads/master
2021-07-09T07:55:05.221632
2017-10-08T20:11:24
2017-10-08T20:11:24
101,620,189
0
0
null
null
null
null
UTF-8
C++
false
false
801
cc
#include <bits/stdc++.h> using namespace std; #define iosync ios_base::sync_with_stdio(0) struct Cell { int layer, colour; Cell() { layer=0; colour=0; } }; int main() { iosync; Cell rows[5001], cols[5001]; int n, m, queries, q_type, q_cells, q_colour; cin >> n >> m >> queries; for(int query=1; query<=queries; ++query) { cin >> q_type >> q_cells >> q_colour; if(q_type == 1) { //paint row 'q_cells' with 'q_colour' rows[q_cells].layer = query; rows[q_cells].colour = q_colour; } else { //paint col 'q_cells' with 'q_colour' cols[q_cells].layer = query; cols[q_cells].colour = q_colour; } } for(int i=1; i<=n; ++i) { for(int j=1; j<=m; ++j) { cout << (rows[i].layer > cols[j].layer ? rows[i].colour :cols[j].colour) << " \n"[j==m]; } } return 0; }
[ "kwasniak.mateusz@gmail.com" ]
kwasniak.mateusz@gmail.com
31445175d9276ad79aa652d8b9470ea07bea8e5a
d1166bb82217de1cd9a6d3d26db0a5c9943ba443
/src/main.cpp
ada71638bc0ff8c86767ec4db85b0e6cc6460b93
[]
no_license
Kuba-Wi/Szablon-uklad-rownan
9da48770ea2fb91ecc4be6fbbc2bf4192a9e9db7
89b7dd011203bcac9ae25a3859068c1dfb633983
refs/heads/master
2022-06-08T03:29:16.535588
2020-05-07T17:49:35
2020-05-07T17:49:35
257,581,216
0
0
null
null
null
null
UTF-8
C++
false
false
1,018
cpp
#include <iostream> #include "SWektor.hh" #include "SMacierz.hh" #include "SUkladRownanLiniowych.hh" #include "LZespolona.hh" #include "rozmiar.h" using namespace std; template<typename Typ, int Rozmiar> void uklad_rownan() { SMacierz<Typ, Rozmiar> A; SWektor<Typ, Rozmiar> b; SWektor<Typ, Rozmiar> Wynik; SWektor<Typ, Rozmiar> blad; SUkladRownanLiniowych<Typ, Rozmiar> UklRown; cin >> UklRown; cout << UklRown; A = UklRown.getMac(); b = UklRown.getWek(); Wynik = UklRown.policz_wynik(); cout << "Rozwiązanie x = (x1, x2, x3, x4, x5):\n\n\t"; cout << Wynik << endl; blad = A * Wynik - b; cout << "Wektor błędu Ax-b: "; cout << blad << endl; cout << "Dlugosc wektora błędu |Ax-b|: "; cout << blad.dlugosc() << endl; } int main() { char rodzaj_ukl; cin >> rodzaj_ukl; if(rodzaj_ukl == 'r') uklad_rownan<double, ROZMIAR>(); else if(rodzaj_ukl == 'z') uklad_rownan<LZespolona, ROZMIAR>(); else cout << "Zły identyfikator układu.\n"; }
[ "winczukjakub@gmail.com" ]
winczukjakub@gmail.com
dadf9d3cdde723a05b32aebbb5e4e148cdbebfd7
974389431527e451ce83049b11cd3dc42780108d
/phase_1/example/montague/variants/unpatched/src/mtl.cpp
99edd1ad9d1482002978e8a61e24b534e807af86
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
cromulencellc/chess-aces
21d8e70c8d9853a922ca0c90ffdd2c79ba390fb0
8ea5b0d75ddbf45fd74a7b8c5ca03fc4955eba8b
refs/heads/main
2023-05-24T01:13:07.917910
2022-11-02T00:56:52
2022-11-02T00:56:52
351,277,450
7
2
null
null
null
null
UTF-8
C++
false
false
2,068
cpp
#include "logger.hpp" #include "mtl.hpp" using namespace mtl; using hpt = std::shared_ptr<context::Hash>; using spt = std::shared_ptr<context::Scalar>; hpt hhh() { return std::make_shared<context::Hash>(); } spt sss(std::string v) { return std::make_shared<context::Scalar>(v); } std::shared_ptr<Context> mtl::make_context(Uuid tx_id, Request rq) { hpt txn = hhh(); txn->insert_or_assign("id", sss(to_string(tx_id))); hpt req = hhh(); for (request::Header h : rq.headers) { req->insert_or_assign(h.first, sss(h.second)); } req->insert_or_assign("_method", sss(to_string(rq.method))); req->insert_or_assign("_target", sss(to_string(rq.target))); req->insert_or_assign("_version", sss(to_string(rq.version))); req->insert_or_assign("_client_address", sss(to_string(rq.client_address))); hpt ctx = hhh(); ctx->insert_or_assign("transaction", txn); ctx->insert_or_assign("request", req); LLL.info() << txn->inspect(); return ctx; } std::shared_ptr<Context> mtl::fake_context() { hpt txn = hhh(); (*txn)["id"] = sss(to_string(Uuid{})); hpt req = hhh(); req->insert_or_assign( "Accept", sss("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")); req->insert_or_assign("Accept-Encoding", sss("gzip, deflate")); req->insert_or_assign("Accept-Language", sss("en-US,en;q=0.5")); req->insert_or_assign("Cache-Control", sss("max-age=0")); req->insert_or_assign("Connection", sss("keep-alive")); req->insert_or_assign("Host", sss("localhost:32768")); req->insert_or_assign("Upgrade-Insecure-Requests", sss("1")); req->insert_or_assign("User-Agent", sss("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; " "rv:69.0) Gecko/20100101 Firefox/69.0")); req->insert_or_assign("_method", sss("GET")); req->insert_or_assign("_target", sss("/asdf")); req->insert_or_assign("_version", sss("HTTP/1.1")); hpt ctx = hhh(); ctx->insert_or_assign("transaction", txn); ctx->insert_or_assign("request", req); LLL.info() << ctx->inspect(); return ctx; }
[ "bk@cromulence.com" ]
bk@cromulence.com
966e150cb7e7551bb5c655dd5159784d1b9da6b4
fb6d70a911d49440a056019acccd0434e7779eea
/Shake_Engine/src/Platform/OpenGL/OpenGLShader.cpp
8c566eb1d9eb470f2086ee5703202bc5b95c9486
[]
no_license
PizzaCutter/Shake_Engine_CPP
b29b566df369fa4eaad3cdbe08da916ff50caef1
9d479fd9ec600e4b271489c82ae4dd38b1666a34
refs/heads/master
2022-12-25T10:58:05.192374
2020-10-11T11:47:57
2020-10-11T11:47:57
268,881,248
0
0
null
null
null
null
UTF-8
C++
false
false
7,809
cpp
#include "sepch.h" #include "OpenGLShader.h" #include <fstream> #include <vector> #include "glad/glad.h" #include "glm/gtc/type_ptr.hpp" namespace Shake { OpenGLShader::OpenGLShader(const SString& filePath) { const SString fileAsString = ReadFile(filePath); const std::unordered_map<GLenum, SString> processedData = PreProcess(fileAsString); Compile(processedData); // Contents/Shaders/Texture.glsl extract name from this const size_t lastSlash = filePath.find_last_of("/"); const size_t lastDot = filePath.find_last_of("."); const size_t beginIndex = lastSlash + 1; m_name = filePath.substr(beginIndex, lastDot - beginIndex); } OpenGLShader::~OpenGLShader() { glDeleteProgram(m_ShaderId); } void OpenGLShader::Bind() const { glUseProgram(m_ShaderId); } void OpenGLShader::Unbind() const { glUseProgram(0); } void OpenGLShader::UploadUniformInt(const SString& name, const int value) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniform1i(uniformLocation, value); } void OpenGLShader::UploadUniformIntArray(const SString& name, int* values, uint32_t size) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniform1iv(uniformLocation, size, values); } void OpenGLShader::UploadUniformMat3(const SString& name, const SMat3& matrix) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniformMatrix3fv(uniformLocation, 1, GL_FALSE, glm::value_ptr(matrix)); } void OpenGLShader::UploadUniformMat4(const SString& name, const SMat4& matrix) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniformMatrix4fv(uniformLocation, 1, GL_FALSE, glm::value_ptr(matrix)); } void OpenGLShader::UploadUniformFloat(const SString& name, float value) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniform1f(uniformLocation, value); } void OpenGLShader::UploadUniformFloat2(const SString& name, const SVector2& data) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniform2f(uniformLocation, data.x, data.y); } void OpenGLShader::UploadUniformFloat3(const SString& name, const SVector3& data) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniform3f(uniformLocation, data.x, data.y, data.z); } void OpenGLShader::UploadUniformFloat4(const SString& name, const SVector4& vector) { GLint uniformLocation = glGetUniformLocation(m_ShaderId, name.c_str()); glUniform4f(uniformLocation, vector.x, vector.y, vector.z, vector.w); } SString OpenGLShader::ReadFile(const SString& filePath) { SString result; std::ifstream in(filePath, std::ios::in | std::ios::binary); if(in) { in.seekg(0, std::ios::end); result.resize(in.tellg()); in.seekg(0, std::ios::beg); in.read(&result[0], result.size()); in.close(); }else { SE_ENGINE_LOG(LogVerbosity::Error, "Could not open file '{0}'", filePath); } return result; } GLenum OpenGLShader::GetShaderTypeFromString(const SString& shaderTypeAsString) { if(shaderTypeAsString == "vertex") { return GL_VERTEX_SHADER; } if(shaderTypeAsString == "fragment" || shaderTypeAsString == "pixel") { return GL_FRAGMENT_SHADER; } return GL_VERTEX_SHADER; } std::unordered_map<GLenum, SString> OpenGLShader::PreProcess(const SString& source) { std::unordered_map<GLenum, SString> thing = {}; const SString typeThing = "#type"; size_t index = 0; while(index != SString::npos) { const SString::size_type foundIndex = source.find(typeThing, index) + typeThing.length(); const SString::size_type endOfTypeIndex = source.find("\r", index); const SString::size_type nextShaderIndex = source.find(typeThing, endOfTypeIndex); SString shaderTypeString = source.substr(foundIndex + 1, endOfTypeIndex - (foundIndex + 1)); const SString shaderSource = source.substr(endOfTypeIndex, nextShaderIndex - endOfTypeIndex); const GLenum shaderType = GetShaderTypeFromString(shaderTypeString); //TODO[rsmekens]: check shader types thing.emplace(shaderType, shaderSource); index = nextShaderIndex; } return thing; } void OpenGLShader::Compile(std::unordered_map<GLenum, SString> input) { GLuint program = glCreateProgram(); std::vector<GLuint> openGLShaders; openGLShaders.reserve(input.size()); for (auto& shaderInput: input) { // Create an empty vertex shader handle const GLuint openGLShader = glCreateShader(shaderInput.first); openGLShaders.push_back(openGLShader); // Send the vertex shader source code to GL // Note that SString's .c_str is NULL character terminated. const GLchar* source = shaderInput.second.c_str(); glShaderSource(openGLShader, 1, &source, 0); // Compile the vertex shader glCompileShader(openGLShader); GLint isCompiled = 0; glGetShaderiv(openGLShader, GL_COMPILE_STATUS, &isCompiled); if(isCompiled == GL_FALSE) { GLint maxLength = 0; glGetShaderiv(openGLShader, GL_INFO_LOG_LENGTH, &maxLength); // The maxLength includes the NULL character std::vector<GLchar> infoLog(maxLength); glGetShaderInfoLog(openGLShader, maxLength, &maxLength, &infoLog[0]); // We don't need the shader anymore. glDeleteShader(openGLShader); SE_ENGINE_LOG(LogVerbosity::Error,"{0}", infoLog.data()); SE_CORE_ASSERT(false, "Vertex shader compilation failure!"); return; } } // Only initialize this once compilation has succeeded m_ShaderId = program; // Attach our shaders to our program for (auto& element : openGLShaders) { glAttachShader(program, element); } // Link our program glLinkProgram(program); // Note the different functions here: glGetProgram* instead of glGetOpenGLShader*. GLint isLinked = 0; glGetProgramiv(program, GL_LINK_STATUS, (int*)&isLinked); if (isLinked == GL_FALSE) { GLint maxLength = 0; glGetProgramiv(program, GL_INFO_LOG_LENGTH, &maxLength); // The maxLength includes the NULL character std::vector<GLchar> infoLog(maxLength); glGetProgramInfoLog(program, maxLength, &maxLength, &infoLog[0]); // We don't need the program anymore. glDeleteProgram(program); // Don't leak shaders either. for (auto& element : openGLShaders) { glDeleteShader(element); } SE_ENGINE_LOG(LogVerbosity::Error,"{0}", infoLog.data()); SE_CORE_ASSERT(false, "OpenGLShader link failure!"); return; } // Always detach shaders after a successful link. for (auto& element : openGLShaders) { glDetachShader(program, element); } } }
[ "robin.smekens.930@gmail.com" ]
robin.smekens.930@gmail.com
20ffccd87e36baed4935962d63866943700ddcf8
de6128d5e4221677aef571a876df8b53a08b5cd3
/windows/pp/04-trianglePerspective/trianglePerspective.cpp
620e9a404096f3956e64936e2794e6bee7035bd0
[]
no_license
ssijonson/realTimeRendering
2d97fa7a20d94aae460a8496283247c1c5ad962f
d0a37138dbf8a618976ac292ee35e67382499601
refs/heads/master
2023-03-16T19:48:29.889647
2018-10-16T19:35:58
2018-10-16T19:35:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
15,885
cpp
#include <windows.h> #include <stdio.h> #include <gl/glew.h> #include <gl/gl.h> #include "resources/resource.h" #include "vmath.h" HWND hWnd = NULL; HDC hdc = NULL; HGLRC hrc = NULL; DWORD dwStyle; WINDOWPLACEMENT wpPrev = { sizeof(WINDOWPLACEMENT) }; RECT windowRect = {0, 0, 800, 600}; bool isFullscreen = false; bool isActive = false; bool isEscapeKeyPressed = false; enum { CG_ATTRIBUTE_VERTEX_POSITION = 0, CG_ATTRIBUTE_COLOR, CG_ATTRIBUTE_NORMAL, CG_ATTRIBUTE_TEXTURE, }; GLuint vertexShaderObject = 0; GLuint fragmentShaderObject = 0; GLuint shaderProgramObject = 0; GLuint vao = 0; GLuint vbo = 0; GLuint mvpUniform = 0; vmath::mat4 perspectiveProjectionMatrix; FILE *logFile = NULL; LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); void initialize(void); void listExtensions(void); void initializeVertexShader(void); void initializeFragmentShader(void); void initializeShaderProgram(void); void initializeBuffers(void); void cleanUp(void); void display(void); void resize(int width, int height); void toggleFullscreen(HWND hWnd, bool isFullscreen); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInsatnce, LPSTR lpszCmdLine, int nCmdShow) { WNDCLASSEX wndClassEx; MSG message; TCHAR szApplicationTitle[] = TEXT("CG - PP - Triangle Perspective"); TCHAR szApplicationClassName[] = TEXT("RTR_OPENGL_PP_TRIANGLE_PERSPECTIVE"); bool done = false; if (fopen_s(&logFile, "debug.log", "w") != 0) { MessageBox(NULL, TEXT("Unable to open log file."), TEXT("Error"), MB_OK | MB_TOPMOST | MB_ICONSTOP); exit(EXIT_FAILURE); } fprintf(logFile, "---------- CG: OpenGL Debug Logs Start ----------\n"); fflush(logFile); wndClassEx.cbSize = sizeof(WNDCLASSEX); wndClassEx.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; wndClassEx.cbClsExtra = 0; wndClassEx.cbWndExtra = 0; wndClassEx.lpfnWndProc = WndProc; wndClassEx.hInstance = hInstance; wndClassEx.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(CP_ICON)); wndClassEx.hIconSm = LoadIcon(hInstance, MAKEINTRESOURCE(CP_ICON_SMALL)); wndClassEx.hCursor = LoadCursor(NULL, IDC_ARROW); wndClassEx.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); wndClassEx.lpszClassName = szApplicationClassName; wndClassEx.lpszMenuName = NULL; if(!RegisterClassEx(&wndClassEx)) { MessageBox(NULL, TEXT("Cannot register class."), TEXT("Error"), MB_OK | MB_ICONERROR); exit(EXIT_FAILURE); } DWORD styleExtra = WS_EX_APPWINDOW; dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE; hWnd = CreateWindowEx(styleExtra, szApplicationClassName, szApplicationTitle, dwStyle, windowRect.left, windowRect.top, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top, NULL, NULL, hInstance, NULL); if(!hWnd) { MessageBox(NULL, TEXT("Cannot create windows."), TEXT("Error"), MB_OK | MB_ICONERROR); exit(EXIT_FAILURE); } initialize(); ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); SetForegroundWindow(hWnd); SetFocus(hWnd); while(!done) { if(PeekMessage(&message, NULL, 0, 0, PM_REMOVE)) { if(message.message == WM_QUIT) { done = true; } else { TranslateMessage(&message); DispatchMessage(&message); } } else { if(isActive) { if(isEscapeKeyPressed) { done = true; } else { display(); } } } } cleanUp(); fprintf(logFile, "---------- CG: OpenGL Debug Logs End ----------\n"); fflush(logFile); fclose(logFile); return (int)message.wParam; } LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { HDC hdc; RECT rect; switch(iMessage) { case WM_ACTIVATE: isActive = (HIWORD(wParam) == 0); break; case WM_SIZE: resize(LOWORD(lParam), HIWORD(lParam)); break; case WM_KEYDOWN: switch(wParam) { case VK_ESCAPE: isEscapeKeyPressed = true; break; // 0x46 is hex value for key 'F' or 'f' case 0x46: isFullscreen = !isFullscreen; toggleFullscreen(hWnd, isFullscreen); break; default: break; } break; case WM_CHAR: switch(wParam) { default: break; } break; case WM_LBUTTONDOWN: break; case WM_DESTROY: PostQuitMessage(0); break; default: break; } return DefWindowProc(hWnd, iMessage, wParam, lParam); } void initialize(void) { PIXELFORMATDESCRIPTOR pfd; int pixelFormatIndex = 0; ZeroMemory(&pfd, sizeof(PIXELFORMATDESCRIPTOR)); pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = 32; pfd.cRedBits = 8; pfd.cGreenBits = 8; pfd.cBlueBits = 8; pfd.cAlphaBits = 8; pfd.cDepthBits = 32; hdc = GetDC(hWnd); pixelFormatIndex = ChoosePixelFormat(hdc, &pfd); if(pixelFormatIndex == 0) { ReleaseDC(hWnd, hdc); hdc = NULL; } if(!SetPixelFormat(hdc, pixelFormatIndex, &pfd)) { ReleaseDC(hWnd, hdc); hdc = NULL; } hrc = wglCreateContext(hdc); if(hrc == NULL) { ReleaseDC(hWnd, hdc); hdc = NULL; } if(!wglMakeCurrent(hdc, hrc)) { wglDeleteContext(hrc); hrc = NULL; ReleaseDC(hWnd, hdc); hdc = NULL; } GLenum glewError = glewInit(); if (glewError != GLEW_OK) { fprintf(logFile, "Cannot initialize GLEW, Error: %d", glewError); fflush(logFile); cleanUp(); exit(EXIT_FAILURE); } listExtensions(); // Initialize the shaders and shader program object. initializeVertexShader(); initializeFragmentShader(); initializeShaderProgram(); initializeBuffers(); glClearColor(0.0f, 0.0f, 1.0f, 1.0f); glClearDepth(1.0f); glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE); glDepthFunc(GL_LEQUAL); glShadeModel(GL_SMOOTH); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); perspectiveProjectionMatrix = vmath::mat4::identity(); // This is required for DirectX resize(windowRect.right - windowRect.left, windowRect.bottom - windowRect.top); } void listExtensions() { GLint extensionCount = 0; glGetIntegerv(GL_NUM_EXTENSIONS, &extensionCount); fprintf(logFile, "Number of extensions: %d\n", extensionCount); fflush(logFile); for(int counter = 0; counter < extensionCount; ++counter) { fprintf(logFile, "%d] Extension name: %s\n", counter + 1, (const char*)glGetStringi(GL_EXTENSIONS, counter)); fflush(logFile); } } void initializeVertexShader() { vertexShaderObject = glCreateShader(GL_VERTEX_SHADER); const GLchar *vertexShaderCode = "#version 450 core" \ "\n" \ "in vec4 vertexPosition;" \ "uniform mat4 mvpMatrix;" \ "\n" \ "void main(void)" \ "{" \ " gl_Position = mvpMatrix * vertexPosition;" \ "}"; glShaderSource(vertexShaderObject, 1, (const char**)&vertexShaderCode, NULL); glCompileShader(vertexShaderObject); GLint infoLogLength = 0; GLint shaderCompileStatus = 0; char *infoLog = NULL; glGetShaderiv(vertexShaderObject, GL_COMPILE_STATUS, &shaderCompileStatus); if(shaderCompileStatus == GL_FALSE) { glGetShaderiv(vertexShaderObject, GL_INFO_LOG_LENGTH, &infoLogLength); if(infoLogLength > 0) { infoLog = (char *)malloc(infoLogLength); if(infoLog != NULL) { GLsizei written = 0; glGetShaderInfoLog(vertexShaderObject, infoLogLength, &written, infoLog); fprintf(logFile, "CG: Vertex shader compilation log: %s\n", infoLog); free(infoLog); cleanUp(); exit(EXIT_FAILURE); } } } } void initializeFragmentShader() { fragmentShaderObject = glCreateShader(GL_FRAGMENT_SHADER); const GLchar *fragmentShaderCode = "#version 450 core" \ "\n" \ "out vec4 fragmentColor;" \ "\n" \ "void main(void)" \ "{" \ " fragmentColor = vec4(1.0, 1.0, 1.0, 1.0);" \ "}"; glShaderSource(fragmentShaderObject, 1, (const char**)&fragmentShaderCode, NULL); glCompileShader(fragmentShaderObject); GLint infoLogLength = 0; GLint shaderCompileStatus = 0; char *infoLog = NULL; glGetShaderiv(fragmentShaderObject, GL_COMPILE_STATUS, &shaderCompileStatus); if(shaderCompileStatus == GL_FALSE) { glGetShaderiv(fragmentShaderObject, GL_INFO_LOG_LENGTH, &infoLogLength); if(infoLogLength > 0) { infoLog = (char *)malloc(infoLogLength); if(infoLog != NULL) { GLsizei written = 0; glGetShaderInfoLog(fragmentShaderObject, infoLogLength, &written, infoLog); fprintf(logFile, "CG: Fragment shader compilation log: %s\n", infoLog); free(infoLog); cleanUp(); exit(EXIT_FAILURE); } } } } void initializeShaderProgram() { shaderProgramObject = glCreateProgram(); glAttachShader(shaderProgramObject, vertexShaderObject); glAttachShader(shaderProgramObject, fragmentShaderObject); // Bind the position attribute location before linking. glBindAttribLocation(shaderProgramObject, CG_ATTRIBUTE_VERTEX_POSITION, "vertexPosition"); // Now link and check for error. glLinkProgram(shaderProgramObject); GLint infoLogLength = 0; GLint shaderProgramLinkStatus = 0; char *infoLog = NULL; glGetProgramiv(shaderProgramObject, GL_LINK_STATUS, &shaderProgramLinkStatus); if(shaderProgramLinkStatus == GL_FALSE) { glGetProgramiv(shaderProgramObject, GL_INFO_LOG_LENGTH, &infoLogLength); if(infoLogLength > 0) { infoLog = (char *)malloc(infoLogLength); if(infoLog != NULL) { GLsizei written = 0; glGetProgramInfoLog(shaderProgramObject, infoLogLength, &written, infoLog); fprintf(logFile, "CG: Shader program link log: %s\n", infoLog); free(infoLog); cleanUp(); exit(EXIT_FAILURE); } } } // After linking get the value of MVP uniform location from the shader program. mvpUniform = glGetUniformLocation(shaderProgramObject, "mvpMatrix"); } void initializeBuffers() { const GLfloat triangleVertices[] = { 0.0f, 1.0f, 0.0f, -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f }; glGenVertexArrays(1, &vao); glBindVertexArray(vao); glGenBuffers(1, &vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, sizeof(triangleVertices), triangleVertices, GL_STATIC_DRAW); glVertexAttribPointer(CG_ATTRIBUTE_VERTEX_POSITION, 3, GL_FLOAT, GL_FALSE, 0, NULL); glEnableVertexAttribArray(CG_ATTRIBUTE_VERTEX_POSITION); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); } void display(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); glUseProgram(shaderProgramObject); vmath::mat4 modelViewMatrix = vmath::mat4::identity(); vmath::mat4 modelViewProjectionMatrix = vmath::mat4::identity(); // Translate the modal view matrix. modelViewMatrix = vmath::translate(0.0f, 0.0f, -6.0f); // Multiply modelViewMatrix and perspectiveProjectionMatrix to get modelViewProjectionMatrix // Oder of multiplication is very important projectionMatrix * modelMatrix * viewMatrix // As we have model and view matrix combined, we just have to multiply projectionMatrix and modelViewMatrix modelViewProjectionMatrix = perspectiveProjectionMatrix * modelViewMatrix; // Pass modelViewProjectionMatrix to vertex shader in 'mvpMatrix' variable defined in shader. glUniformMatrix4fv(mvpUniform, 1, GL_FALSE, modelViewProjectionMatrix); // Now bind the VAO to which we want to use glBindVertexArray(vao); // Draw the triangle // 3 is number of vertices in the array i.e. element count in triangleVertices divide by 3 (x, y, z) component glDrawArrays(GL_TRIANGLES, 0, 3); // unbind the vao glBindVertexArray(0); glUseProgram(0); SwapBuffers(hdc); } void resize(int width, int height) { if(height == 0) { height = 1; } glViewport(0, 0, (GLsizei)width, (GLsizei)height); perspectiveProjectionMatrix = vmath::perspective(45.0f, (GLfloat)width / (GLfloat)height, 1.0f, 100.0f); } void toggleFullscreen(HWND hWnd, bool isFullscreen) { MONITORINFO monitorInfo; dwStyle = GetWindowLong(hWnd, GWL_STYLE); if(isFullscreen) { if(dwStyle & WS_OVERLAPPEDWINDOW) { monitorInfo = { sizeof(MONITORINFO) }; if(GetWindowPlacement(hWnd, &wpPrev) && GetMonitorInfo(MonitorFromWindow(hWnd, MONITORINFOF_PRIMARY), &monitorInfo)) { SetWindowLong(hWnd, GWL_STYLE, dwStyle & ~WS_OVERLAPPEDWINDOW); SetWindowPos(hWnd, HWND_TOP, monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.top, monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top, SWP_NOZORDER | SWP_FRAMECHANGED); } } ShowCursor(FALSE); } else { SetWindowLong(hWnd, GWL_STYLE, dwStyle | WS_OVERLAPPEDWINDOW); SetWindowPlacement(hWnd, &wpPrev); SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_FRAMECHANGED); ShowCursor(TRUE); } } void cleanUp(void) { if(isFullscreen) { dwStyle = GetWindowLong(hWnd, GWL_STYLE); SetWindowLong(hWnd, GWL_STYLE, dwStyle | WS_OVERLAPPEDWINDOW); SetWindowPlacement(hWnd, &wpPrev); SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_FRAMECHANGED); ShowCursor(TRUE); } if(vao) { glDeleteVertexArrays(1, &vao); vao = 0; } if(vbo) { glDeleteBuffers(1, &vbo); vbo = 0; } if(shaderProgramObject) { if(vertexShaderObject) { glDetachShader(shaderProgramObject, vertexShaderObject); } if(fragmentShaderObject) { glDetachShader(shaderProgramObject, fragmentShaderObject); } } if(vertexShaderObject) { glDeleteShader(vertexShaderObject); vertexShaderObject = 0; } if(fragmentShaderObject) { glDeleteShader(fragmentShaderObject); fragmentShaderObject = 0; } if(shaderProgramObject) { glDeleteProgram(shaderProgramObject); shaderProgramObject = 0; } glUseProgram(0); wglMakeCurrent(NULL, NULL); wglDeleteContext(hrc); hrc = NULL; ReleaseDC(hWnd, hdc); hdc = NULL; DestroyWindow(hWnd); hWnd = NULL; }
[ "projectchetan07@gmail.com" ]
projectchetan07@gmail.com
c316695368aabf5ebe7eec5b137c151a49550ee7
3fa1397b95e38fb04dac5e009d70c292deff09a9
/BaiTap_KTLT_0081_08/BaiTap_KTLT_0081_08.h
80b2683e901394a1f07d4d2ff0e94c38d03804d0
[]
no_license
nguyennhattruong96/BiboTraining_BaiTap_KTLT_Thay_NTTMKhang
61b396de5dc88cdad0021036c7db332eec26b5f3
1cac487672de9d3c881a8afdc410434a5042c128
refs/heads/master
2021-01-16T18:47:05.754323
2017-10-13T11:15:01
2017-10-13T11:15:01
100,113,344
0
0
null
null
null
null
UTF-8
C++
false
false
229
h
#ifndef __BaiTap_KTLT_0081_08_H__ #define __BaiTap_KTLT_0081_08_H__ #include <iostream> #include <string> using namespace std; #pragma once int Input(string sMessage); void Sum(int x); #endif // !__BaiTap_KTLT_0081_08_H__
[ "nguyennhattruong96@outlook.com.vn" ]
nguyennhattruong96@outlook.com.vn
227820ffb8de0967fa1d187ff9f3803907b8abcb
ec8ad01c26cdb5218ad70e8c73d139856b4753b7
/include/raptor-lite/utils/status.h
e1e745a6d20875704a55ab644692f51297b4e4d2
[ "Apache-2.0" ]
permissive
shadow-yuan/raptor-lite
6458a78bdcdec7ed4eaaba0629c496e21d75e47d
b5e3c558b8ff4657ecdf298ff7ffe39ff5be7822
refs/heads/master
2023-03-26T21:38:57.092999
2021-03-23T02:32:26
2021-03-23T02:32:26
333,269,167
1
0
null
null
null
null
UTF-8
C++
false
false
3,010
h
/* * * Copyright (c) 2020 The Raptor 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 __RAPTOR_LITE_UTILS_STATUS__ #define __RAPTOR_LITE_UTILS_STATUS__ #include <stdlib.h> #include <string> #include "raptor-lite/utils/ref_counted.h" #include "raptor-lite/utils/slice.h" #ifdef __cplusplus extern "C" { #endif int raptor_asprintf(char **strp, const char *format, ...); #ifdef __cplusplus } #endif namespace raptor { class Status final : public RefCounted<Status, NonPolymorphicRefCount> { public: Status(); Status(const std::string &msg); Status(int err_code, const std::string &err_msg); Status(const Status &oth); Status &operator=(const Status &oth); Status(Status &&other); Status &operator=(Status &&other); ~Status() = default; bool IsOK() const; int ErrorCode() const; std::string ToString() const; void AppendMessage(const std::string &msg); bool operator==(const Status &other) const; bool operator!=(const Status &other) const; private: // 0: no error int _error_code; Slice _message; friend RefCountedPtr<Status> MakeStatusFromStaticString(const char *msg); friend RefCountedPtr<Status> MakeStatusFromPosixError(const char *api); #ifdef _WIN32 friend RefCountedPtr<Status> MakeStatusFromWindowsError(int err, const char *api); #endif }; RefCountedPtr<Status> MakeStatusFromStaticString(const char *msg); RefCountedPtr<Status> MakeStatusFromPosixError(const char *api); #ifdef _WIN32 RefCountedPtr<Status> MakeStatusFromWindowsError(int err, const char *api); #endif template <typename... Args> inline RefCountedPtr<Status> MakeStatusFromFormat(Args &&... args) { char *message = nullptr; raptor_asprintf(&message, std::forward<Args>(args)...); if (!message) { return nullptr; } RefCountedPtr<Status> obj = MakeRefCounted<Status>(message); free(message); return obj; } } // namespace raptor #define RAPTOR_POSIX_ERROR(api_name) raptor::MakeStatusFromPosixError(api_name) #define RAPTOR_ERROR_FROM_STATIC_STRING(message) raptor::MakeStatusFromStaticString(message) #define RAPTOR_ERROR_FROM_FORMAT(FMT, ...) raptor::MakeStatusFromFormat(FMT, ##__VA_ARGS__) #ifdef _WIN32 #define RAPTOR_WINDOWS_ERROR(err, api_name) raptor::MakeStatusFromWindowsError(err, api_name) #endif using raptor_error = raptor::RefCountedPtr<raptor::Status>; #define RAPTOR_ERROR_NONE nullptr #endif // __RAPTOR_LITE_UTILS_STATUS__
[ "1092421495@qq.com" ]
1092421495@qq.com
954499c20a5c34e0e24febfebb2dbe1109dc9452
0bc4186fee113a3c9e740f47a82ddb79b8dbe7ad
/Weekly Assignments/Week3/Angry Birds Progress/src/SlingShot.h
fd68aa7b648be6046283300b32f15df8bfdd1c6c
[]
no_license
uhhgoat/AngryBirdsPrototype
8080db3f2115eff777c9a93b81c13c47dc9934ba
4c7ba585386da70a0fe3f6f2ceb9589828f5e184
refs/heads/master
2020-12-28T14:41:41.463088
2020-02-05T05:33:51
2020-02-05T05:33:51
238,374,827
0
0
null
null
null
null
UTF-8
C++
false
false
320
h
#pragma once #include "Includes.h" class SlingShot : public MultiFixtureObject { private: GameObject2D * slingRight; GameObject2D* slingLeft; public: SlingShot(float x, float y, float rot, b2World &world, bool showDebugShape = false); ~SlingShot() = default; void Update(); void UpdateRubber(GameObject2D* go); };
[ "matyas@fenyves.net" ]
matyas@fenyves.net
b22e5480efddcbdfe3e8e9b75e9acf09b2a2e69a
a4fb3c4abaa5f774ae222dc7ede7f57cc1fb3b70
/iOS/SMarket/Unity/Classes/Native/Il2CppCompilerCalculateTypeValues_3Table.cpp
87c99bbc862c735b4dd7806d92aa0d23755e9bb2
[]
no_license
vanessaaleung/SMarket
dbffe7a04f821f788fedda4e0f788e4e8cf95126
fa139dc7d370824ad7a86fe902a474e6f1205731
refs/heads/master
2022-11-01T08:47:20.022983
2020-06-21T23:33:34
2020-06-21T23:33:34
205,718,090
1
0
null
null
null
null
UTF-8
C++
false
false
333,146
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.AssemblyLoadEventArgs struct AssemblyLoadEventArgs_t51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8; // System.AssemblyLoadEventHandler struct AssemblyLoadEventHandler_t53F8340027F9EE67E8A22E7D8C1A3770345153C9; // System.AsyncCallback struct AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4; // System.AttributeUsageAttribute struct AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388; // System.ByteMatcher struct ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC; // System.Byte[] struct ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821; // System.Char struct Char_tBF22D9FC341BE970735250BB6FF1A4A92BBA58B9; // System.Char[] struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2; // System.Collections.Generic.Dictionary`2<System.String,System.Object> struct Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA; // System.Collections.Generic.Dictionary`2<System.Type,System.AttributeUsageAttribute> struct Dictionary_2_t10ABF562FF47B327563169FBB750047BF1341236; // System.Collections.Generic.List`1<System.ModifierSpec> struct List_1_tFD995FD9C5961BB4B415EE63B297C4B19643A3C2; // System.Collections.Generic.List`1<System.String> struct List_1_tE8032E48C661C350FF9550E9063D595C0AB25CD3; // System.Collections.Generic.List`1<System.TypeIdentifier> struct List_1_tB8129EB4ADDDECD38E3E178F0A902C921B575166; // System.Collections.Generic.List`1<System.TypeSpec> struct List_1_t8C8BF378AAB72B34B6EE63F686877AE7290ECFBA; // System.Collections.Hashtable struct Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9; // System.Console/InternalCancelHandler struct InternalCancelHandler_t2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A; // System.Console/WindowsConsole/WindowsCancelHandler struct WindowsCancelHandler_t1D05BCFB512603DCF87A126FE9969F1D876B9B51; // System.ConsoleCancelEventHandler struct ConsoleCancelEventHandler_t6F3B5D9C55C25FF6B53EFEDA9150EFE807311EB4; // System.Delegate struct Delegate_t; // System.DelegateData struct DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE; // System.Delegate[] struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86; // System.EventHandler struct EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C; // System.EventHandler`1<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs> struct EventHandler_1_t1E35ED2E29145994C6C03E57601C6D48C61083FF; // System.Globalization.NumberFormatInfo struct NumberFormatInfo_tFDF57037EBC5BC833D0A53EF0327B805994860A8; // System.IAsyncResult struct IAsyncResult_t8E194308510B375B42432981AE5E7488C458D598; // System.IConsoleDriver struct IConsoleDriver_t484163236D7810E338FC3D246EDF2DCAC42C0E37; // System.IO.CStreamWriter struct CStreamWriter_t6B662CA496662AF63D81722DCA99094893C80450; // System.IO.StreamReader struct StreamReader_t62E68063760DCD2FC036AE132DE69C24B7ED001E; // System.IO.TextReader struct TextReader_t7DF8314B601D202ECFEDF623093A87BFDAB58D0A; // System.IO.TextWriter struct TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0; // System.Int32 struct Int32_t585191389E07734F19F3156FF88FB3EF4800D102; // System.Int32[] struct Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83; // System.Int64 struct Int64_t7A386C2FF7B0280A0F516992401DDFCF0FF7B436; // System.MonoTypeInfo struct MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D; // System.OperatingSystem struct OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83; // System.ParameterizedStrings/FormatParam[] struct FormatParamU5BU5D_t2F95A3C5AF726E75A42BC28843BAD579B62199B5; // System.ParameterizedStrings/LowLevelStack struct LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2; // System.Reflection.Assembly struct Assembly_t; // System.Reflection.Binder struct Binder_t4D5CB06963501D32847C057B57157D6DC49CA759; // System.Reflection.MemberFilter struct MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381; // System.Reflection.MethodBase struct MethodBase_t; // System.Reflection.MethodInfo struct MethodInfo_t; // System.Reflection.MonoCMethod struct MonoCMethod_tFB85687BEF8202F8B3E77FE24BCC2E400EA4FC61; // System.Reflection.RuntimeConstructorInfo struct RuntimeConstructorInfo_tF21A59967629968D0BE5D0DAF677662824E9629D; // System.ResolveEventArgs struct ResolveEventArgs_t116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D; // System.ResolveEventHandler struct ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5; // System.String struct String_t; // System.String[] struct StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E; // System.TermInfoReader struct TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C; // System.Text.Encoding struct Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4; // System.TimeZoneInfo struct TimeZoneInfo_t46EF9BAEAA787846F1A1EC419BE75CFEFAFF6777; // System.Type struct Type_t; // System.TypeIdentifier struct TypeIdentifier_tEF8C0B5CA8B33CD2A732C822D0B9BD62B8DA2F12; // System.Type[] struct TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F; // System.UInt64 struct UInt64_tA02DF3B59C8FC4A849BD207DA11038CC64E4CB4E; // System.UnhandledExceptionEventArgs struct UnhandledExceptionEventArgs_t39DD47D43B0D764FE2C9847FBE760031FBEA0FD1; // System.UnhandledExceptionEventHandler struct UnhandledExceptionEventHandler_tB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE; // System.Version struct Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD; // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017; struct Delegate_t_marshaled_com; struct Delegate_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 APPDOMAINSETUP_T80DF2915BB100D4BD515920B49C959E9FA451306_H #define APPDOMAINSETUP_T80DF2915BB100D4BD515920B49C959E9FA451306_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.AppDomainSetup struct AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306 : public RuntimeObject { public: // System.String System.AppDomainSetup::application_base String_t* ___application_base_0; // System.String System.AppDomainSetup::application_name String_t* ___application_name_1; // System.String System.AppDomainSetup::cache_path String_t* ___cache_path_2; // System.String System.AppDomainSetup::configuration_file String_t* ___configuration_file_3; // System.String System.AppDomainSetup::dynamic_base String_t* ___dynamic_base_4; // System.String System.AppDomainSetup::license_file String_t* ___license_file_5; // System.String System.AppDomainSetup::private_bin_path String_t* ___private_bin_path_6; // System.String System.AppDomainSetup::private_bin_path_probe String_t* ___private_bin_path_probe_7; // System.String System.AppDomainSetup::shadow_copy_directories String_t* ___shadow_copy_directories_8; // System.String System.AppDomainSetup::shadow_copy_files String_t* ___shadow_copy_files_9; // System.Boolean System.AppDomainSetup::publisher_policy bool ___publisher_policy_10; // System.Boolean System.AppDomainSetup::path_changed bool ___path_changed_11; // System.Int32 System.AppDomainSetup::loader_optimization int32_t ___loader_optimization_12; // System.Boolean System.AppDomainSetup::disallow_binding_redirects bool ___disallow_binding_redirects_13; // System.Boolean System.AppDomainSetup::disallow_code_downloads bool ___disallow_code_downloads_14; // System.Object System.AppDomainSetup::_activationArguments RuntimeObject * ____activationArguments_15; // System.Object System.AppDomainSetup::domain_initializer RuntimeObject * ___domain_initializer_16; // System.Object System.AppDomainSetup::application_trust RuntimeObject * ___application_trust_17; // System.String[] System.AppDomainSetup::domain_initializer_args StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ___domain_initializer_args_18; // System.Boolean System.AppDomainSetup::disallow_appbase_probe bool ___disallow_appbase_probe_19; // System.Byte[] System.AppDomainSetup::configuration_bytes ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___configuration_bytes_20; // System.Byte[] System.AppDomainSetup::serialized_non_primitives ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___serialized_non_primitives_21; // System.String System.AppDomainSetup::<TargetFrameworkName>k__BackingField String_t* ___U3CTargetFrameworkNameU3Ek__BackingField_22; public: inline static int32_t get_offset_of_application_base_0() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___application_base_0)); } inline String_t* get_application_base_0() const { return ___application_base_0; } inline String_t** get_address_of_application_base_0() { return &___application_base_0; } inline void set_application_base_0(String_t* value) { ___application_base_0 = value; Il2CppCodeGenWriteBarrier((&___application_base_0), value); } inline static int32_t get_offset_of_application_name_1() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___application_name_1)); } inline String_t* get_application_name_1() const { return ___application_name_1; } inline String_t** get_address_of_application_name_1() { return &___application_name_1; } inline void set_application_name_1(String_t* value) { ___application_name_1 = value; Il2CppCodeGenWriteBarrier((&___application_name_1), value); } inline static int32_t get_offset_of_cache_path_2() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___cache_path_2)); } inline String_t* get_cache_path_2() const { return ___cache_path_2; } inline String_t** get_address_of_cache_path_2() { return &___cache_path_2; } inline void set_cache_path_2(String_t* value) { ___cache_path_2 = value; Il2CppCodeGenWriteBarrier((&___cache_path_2), value); } inline static int32_t get_offset_of_configuration_file_3() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___configuration_file_3)); } inline String_t* get_configuration_file_3() const { return ___configuration_file_3; } inline String_t** get_address_of_configuration_file_3() { return &___configuration_file_3; } inline void set_configuration_file_3(String_t* value) { ___configuration_file_3 = value; Il2CppCodeGenWriteBarrier((&___configuration_file_3), value); } inline static int32_t get_offset_of_dynamic_base_4() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___dynamic_base_4)); } inline String_t* get_dynamic_base_4() const { return ___dynamic_base_4; } inline String_t** get_address_of_dynamic_base_4() { return &___dynamic_base_4; } inline void set_dynamic_base_4(String_t* value) { ___dynamic_base_4 = value; Il2CppCodeGenWriteBarrier((&___dynamic_base_4), value); } inline static int32_t get_offset_of_license_file_5() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___license_file_5)); } inline String_t* get_license_file_5() const { return ___license_file_5; } inline String_t** get_address_of_license_file_5() { return &___license_file_5; } inline void set_license_file_5(String_t* value) { ___license_file_5 = value; Il2CppCodeGenWriteBarrier((&___license_file_5), value); } inline static int32_t get_offset_of_private_bin_path_6() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___private_bin_path_6)); } inline String_t* get_private_bin_path_6() const { return ___private_bin_path_6; } inline String_t** get_address_of_private_bin_path_6() { return &___private_bin_path_6; } inline void set_private_bin_path_6(String_t* value) { ___private_bin_path_6 = value; Il2CppCodeGenWriteBarrier((&___private_bin_path_6), value); } inline static int32_t get_offset_of_private_bin_path_probe_7() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___private_bin_path_probe_7)); } inline String_t* get_private_bin_path_probe_7() const { return ___private_bin_path_probe_7; } inline String_t** get_address_of_private_bin_path_probe_7() { return &___private_bin_path_probe_7; } inline void set_private_bin_path_probe_7(String_t* value) { ___private_bin_path_probe_7 = value; Il2CppCodeGenWriteBarrier((&___private_bin_path_probe_7), value); } inline static int32_t get_offset_of_shadow_copy_directories_8() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___shadow_copy_directories_8)); } inline String_t* get_shadow_copy_directories_8() const { return ___shadow_copy_directories_8; } inline String_t** get_address_of_shadow_copy_directories_8() { return &___shadow_copy_directories_8; } inline void set_shadow_copy_directories_8(String_t* value) { ___shadow_copy_directories_8 = value; Il2CppCodeGenWriteBarrier((&___shadow_copy_directories_8), value); } inline static int32_t get_offset_of_shadow_copy_files_9() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___shadow_copy_files_9)); } inline String_t* get_shadow_copy_files_9() const { return ___shadow_copy_files_9; } inline String_t** get_address_of_shadow_copy_files_9() { return &___shadow_copy_files_9; } inline void set_shadow_copy_files_9(String_t* value) { ___shadow_copy_files_9 = value; Il2CppCodeGenWriteBarrier((&___shadow_copy_files_9), value); } inline static int32_t get_offset_of_publisher_policy_10() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___publisher_policy_10)); } inline bool get_publisher_policy_10() const { return ___publisher_policy_10; } inline bool* get_address_of_publisher_policy_10() { return &___publisher_policy_10; } inline void set_publisher_policy_10(bool value) { ___publisher_policy_10 = value; } inline static int32_t get_offset_of_path_changed_11() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___path_changed_11)); } inline bool get_path_changed_11() const { return ___path_changed_11; } inline bool* get_address_of_path_changed_11() { return &___path_changed_11; } inline void set_path_changed_11(bool value) { ___path_changed_11 = value; } inline static int32_t get_offset_of_loader_optimization_12() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___loader_optimization_12)); } inline int32_t get_loader_optimization_12() const { return ___loader_optimization_12; } inline int32_t* get_address_of_loader_optimization_12() { return &___loader_optimization_12; } inline void set_loader_optimization_12(int32_t value) { ___loader_optimization_12 = value; } inline static int32_t get_offset_of_disallow_binding_redirects_13() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___disallow_binding_redirects_13)); } inline bool get_disallow_binding_redirects_13() const { return ___disallow_binding_redirects_13; } inline bool* get_address_of_disallow_binding_redirects_13() { return &___disallow_binding_redirects_13; } inline void set_disallow_binding_redirects_13(bool value) { ___disallow_binding_redirects_13 = value; } inline static int32_t get_offset_of_disallow_code_downloads_14() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___disallow_code_downloads_14)); } inline bool get_disallow_code_downloads_14() const { return ___disallow_code_downloads_14; } inline bool* get_address_of_disallow_code_downloads_14() { return &___disallow_code_downloads_14; } inline void set_disallow_code_downloads_14(bool value) { ___disallow_code_downloads_14 = value; } inline static int32_t get_offset_of__activationArguments_15() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ____activationArguments_15)); } inline RuntimeObject * get__activationArguments_15() const { return ____activationArguments_15; } inline RuntimeObject ** get_address_of__activationArguments_15() { return &____activationArguments_15; } inline void set__activationArguments_15(RuntimeObject * value) { ____activationArguments_15 = value; Il2CppCodeGenWriteBarrier((&____activationArguments_15), value); } inline static int32_t get_offset_of_domain_initializer_16() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___domain_initializer_16)); } inline RuntimeObject * get_domain_initializer_16() const { return ___domain_initializer_16; } inline RuntimeObject ** get_address_of_domain_initializer_16() { return &___domain_initializer_16; } inline void set_domain_initializer_16(RuntimeObject * value) { ___domain_initializer_16 = value; Il2CppCodeGenWriteBarrier((&___domain_initializer_16), value); } inline static int32_t get_offset_of_application_trust_17() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___application_trust_17)); } inline RuntimeObject * get_application_trust_17() const { return ___application_trust_17; } inline RuntimeObject ** get_address_of_application_trust_17() { return &___application_trust_17; } inline void set_application_trust_17(RuntimeObject * value) { ___application_trust_17 = value; Il2CppCodeGenWriteBarrier((&___application_trust_17), value); } inline static int32_t get_offset_of_domain_initializer_args_18() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___domain_initializer_args_18)); } inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get_domain_initializer_args_18() const { return ___domain_initializer_args_18; } inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of_domain_initializer_args_18() { return &___domain_initializer_args_18; } inline void set_domain_initializer_args_18(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value) { ___domain_initializer_args_18 = value; Il2CppCodeGenWriteBarrier((&___domain_initializer_args_18), value); } inline static int32_t get_offset_of_disallow_appbase_probe_19() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___disallow_appbase_probe_19)); } inline bool get_disallow_appbase_probe_19() const { return ___disallow_appbase_probe_19; } inline bool* get_address_of_disallow_appbase_probe_19() { return &___disallow_appbase_probe_19; } inline void set_disallow_appbase_probe_19(bool value) { ___disallow_appbase_probe_19 = value; } inline static int32_t get_offset_of_configuration_bytes_20() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___configuration_bytes_20)); } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* get_configuration_bytes_20() const { return ___configuration_bytes_20; } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821** get_address_of_configuration_bytes_20() { return &___configuration_bytes_20; } inline void set_configuration_bytes_20(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* value) { ___configuration_bytes_20 = value; Il2CppCodeGenWriteBarrier((&___configuration_bytes_20), value); } inline static int32_t get_offset_of_serialized_non_primitives_21() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___serialized_non_primitives_21)); } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* get_serialized_non_primitives_21() const { return ___serialized_non_primitives_21; } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821** get_address_of_serialized_non_primitives_21() { return &___serialized_non_primitives_21; } inline void set_serialized_non_primitives_21(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* value) { ___serialized_non_primitives_21 = value; Il2CppCodeGenWriteBarrier((&___serialized_non_primitives_21), value); } inline static int32_t get_offset_of_U3CTargetFrameworkNameU3Ek__BackingField_22() { return static_cast<int32_t>(offsetof(AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306, ___U3CTargetFrameworkNameU3Ek__BackingField_22)); } inline String_t* get_U3CTargetFrameworkNameU3Ek__BackingField_22() const { return ___U3CTargetFrameworkNameU3Ek__BackingField_22; } inline String_t** get_address_of_U3CTargetFrameworkNameU3Ek__BackingField_22() { return &___U3CTargetFrameworkNameU3Ek__BackingField_22; } inline void set_U3CTargetFrameworkNameU3Ek__BackingField_22(String_t* value) { ___U3CTargetFrameworkNameU3Ek__BackingField_22 = value; Il2CppCodeGenWriteBarrier((&___U3CTargetFrameworkNameU3Ek__BackingField_22), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.AppDomainSetup struct AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306_marshaled_pinvoke { char* ___application_base_0; char* ___application_name_1; char* ___cache_path_2; char* ___configuration_file_3; char* ___dynamic_base_4; char* ___license_file_5; char* ___private_bin_path_6; char* ___private_bin_path_probe_7; char* ___shadow_copy_directories_8; char* ___shadow_copy_files_9; int32_t ___publisher_policy_10; int32_t ___path_changed_11; int32_t ___loader_optimization_12; int32_t ___disallow_binding_redirects_13; int32_t ___disallow_code_downloads_14; Il2CppIUnknown* ____activationArguments_15; Il2CppIUnknown* ___domain_initializer_16; Il2CppIUnknown* ___application_trust_17; char** ___domain_initializer_args_18; int32_t ___disallow_appbase_probe_19; uint8_t* ___configuration_bytes_20; uint8_t* ___serialized_non_primitives_21; char* ___U3CTargetFrameworkNameU3Ek__BackingField_22; }; // Native definition for COM marshalling of System.AppDomainSetup struct AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306_marshaled_com { Il2CppChar* ___application_base_0; Il2CppChar* ___application_name_1; Il2CppChar* ___cache_path_2; Il2CppChar* ___configuration_file_3; Il2CppChar* ___dynamic_base_4; Il2CppChar* ___license_file_5; Il2CppChar* ___private_bin_path_6; Il2CppChar* ___private_bin_path_probe_7; Il2CppChar* ___shadow_copy_directories_8; Il2CppChar* ___shadow_copy_files_9; int32_t ___publisher_policy_10; int32_t ___path_changed_11; int32_t ___loader_optimization_12; int32_t ___disallow_binding_redirects_13; int32_t ___disallow_code_downloads_14; Il2CppIUnknown* ____activationArguments_15; Il2CppIUnknown* ___domain_initializer_16; Il2CppIUnknown* ___application_trust_17; Il2CppChar** ___domain_initializer_args_18; int32_t ___disallow_appbase_probe_19; uint8_t* ___configuration_bytes_20; uint8_t* ___serialized_non_primitives_21; Il2CppChar* ___U3CTargetFrameworkNameU3Ek__BackingField_22; }; #endif // APPDOMAINSETUP_T80DF2915BB100D4BD515920B49C959E9FA451306_H #ifndef ARRAYSPEC_TF374BB8994F7190916C6F14C7EA8FE6EFE017970_H #define ARRAYSPEC_TF374BB8994F7190916C6F14C7EA8FE6EFE017970_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ArraySpec struct ArraySpec_tF374BB8994F7190916C6F14C7EA8FE6EFE017970 : public RuntimeObject { public: // System.Int32 System.ArraySpec::dimensions int32_t ___dimensions_0; // System.Boolean System.ArraySpec::bound bool ___bound_1; public: inline static int32_t get_offset_of_dimensions_0() { return static_cast<int32_t>(offsetof(ArraySpec_tF374BB8994F7190916C6F14C7EA8FE6EFE017970, ___dimensions_0)); } inline int32_t get_dimensions_0() const { return ___dimensions_0; } inline int32_t* get_address_of_dimensions_0() { return &___dimensions_0; } inline void set_dimensions_0(int32_t value) { ___dimensions_0 = value; } inline static int32_t get_offset_of_bound_1() { return static_cast<int32_t>(offsetof(ArraySpec_tF374BB8994F7190916C6F14C7EA8FE6EFE017970, ___bound_1)); } inline bool get_bound_1() const { return ___bound_1; } inline bool* get_address_of_bound_1() { return &___bound_1; } inline void set_bound_1(bool value) { ___bound_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ARRAYSPEC_TF374BB8994F7190916C6F14C7EA8FE6EFE017970_H #ifndef BYTEMATCHER_TB199BDD35E2575B84D9FDED34954705653D241DC_H #define BYTEMATCHER_TB199BDD35E2575B84D9FDED34954705653D241DC_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ByteMatcher struct ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC : public RuntimeObject { public: // System.Collections.Hashtable System.ByteMatcher::map Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * ___map_0; // System.Collections.Hashtable System.ByteMatcher::starts Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * ___starts_1; public: inline static int32_t get_offset_of_map_0() { return static_cast<int32_t>(offsetof(ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC, ___map_0)); } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * get_map_0() const { return ___map_0; } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 ** get_address_of_map_0() { return &___map_0; } inline void set_map_0(Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * value) { ___map_0 = value; Il2CppCodeGenWriteBarrier((&___map_0), value); } inline static int32_t get_offset_of_starts_1() { return static_cast<int32_t>(offsetof(ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC, ___starts_1)); } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * get_starts_1() const { return ___starts_1; } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 ** get_address_of_starts_1() { return &___starts_1; } inline void set_starts_1(Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * value) { ___starts_1 = value; Il2CppCodeGenWriteBarrier((&___starts_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BYTEMATCHER_TB199BDD35E2575B84D9FDED34954705653D241DC_H #ifndef CLRCONFIG_T79EBAFC5FBCAC675B35CB93391030FABCA9A7B45_H #define CLRCONFIG_T79EBAFC5FBCAC675B35CB93391030FABCA9A7B45_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.CLRConfig struct CLRConfig_t79EBAFC5FBCAC675B35CB93391030FABCA9A7B45 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CLRCONFIG_T79EBAFC5FBCAC675B35CB93391030FABCA9A7B45_H #ifndef COMPATIBILITYSWITCHES_TC541F9F5404925C97741A0628E9B6D26C40CFA91_H #define COMPATIBILITYSWITCHES_TC541F9F5404925C97741A0628E9B6D26C40CFA91_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.CompatibilitySwitches struct CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91 : public RuntimeObject { public: public: }; struct CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91_StaticFields { public: // System.Boolean System.CompatibilitySwitches::IsAppEarlierThanSilverlight4 bool ___IsAppEarlierThanSilverlight4_0; // System.Boolean System.CompatibilitySwitches::IsAppEarlierThanWindowsPhone8 bool ___IsAppEarlierThanWindowsPhone8_1; public: inline static int32_t get_offset_of_IsAppEarlierThanSilverlight4_0() { return static_cast<int32_t>(offsetof(CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91_StaticFields, ___IsAppEarlierThanSilverlight4_0)); } inline bool get_IsAppEarlierThanSilverlight4_0() const { return ___IsAppEarlierThanSilverlight4_0; } inline bool* get_address_of_IsAppEarlierThanSilverlight4_0() { return &___IsAppEarlierThanSilverlight4_0; } inline void set_IsAppEarlierThanSilverlight4_0(bool value) { ___IsAppEarlierThanSilverlight4_0 = value; } inline static int32_t get_offset_of_IsAppEarlierThanWindowsPhone8_1() { return static_cast<int32_t>(offsetof(CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91_StaticFields, ___IsAppEarlierThanWindowsPhone8_1)); } inline bool get_IsAppEarlierThanWindowsPhone8_1() const { return ___IsAppEarlierThanWindowsPhone8_1; } inline bool* get_address_of_IsAppEarlierThanWindowsPhone8_1() { return &___IsAppEarlierThanWindowsPhone8_1; } inline void set_IsAppEarlierThanWindowsPhone8_1(bool value) { ___IsAppEarlierThanWindowsPhone8_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COMPATIBILITYSWITCHES_TC541F9F5404925C97741A0628E9B6D26C40CFA91_H #ifndef CONSOLE_T5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_H #define CONSOLE_T5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Console struct Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D : public RuntimeObject { public: public: }; struct Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields { public: // System.IO.TextWriter System.Console::stdout TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 * ___stdout_0; // System.IO.TextWriter System.Console::stderr TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 * ___stderr_1; // System.IO.TextReader System.Console::stdin TextReader_t7DF8314B601D202ECFEDF623093A87BFDAB58D0A * ___stdin_2; // System.Text.Encoding System.Console::inputEncoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___inputEncoding_3; // System.Text.Encoding System.Console::outputEncoding Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * ___outputEncoding_4; // System.ConsoleCancelEventHandler System.Console::cancel_event ConsoleCancelEventHandler_t6F3B5D9C55C25FF6B53EFEDA9150EFE807311EB4 * ___cancel_event_5; // System.Console_InternalCancelHandler System.Console::cancel_handler InternalCancelHandler_t2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A * ___cancel_handler_6; public: inline static int32_t get_offset_of_stdout_0() { return static_cast<int32_t>(offsetof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields, ___stdout_0)); } inline TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 * get_stdout_0() const { return ___stdout_0; } inline TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 ** get_address_of_stdout_0() { return &___stdout_0; } inline void set_stdout_0(TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 * value) { ___stdout_0 = value; Il2CppCodeGenWriteBarrier((&___stdout_0), value); } inline static int32_t get_offset_of_stderr_1() { return static_cast<int32_t>(offsetof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields, ___stderr_1)); } inline TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 * get_stderr_1() const { return ___stderr_1; } inline TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 ** get_address_of_stderr_1() { return &___stderr_1; } inline void set_stderr_1(TextWriter_t92451D929322093838C41489883D5B2D7ABAF3F0 * value) { ___stderr_1 = value; Il2CppCodeGenWriteBarrier((&___stderr_1), value); } inline static int32_t get_offset_of_stdin_2() { return static_cast<int32_t>(offsetof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields, ___stdin_2)); } inline TextReader_t7DF8314B601D202ECFEDF623093A87BFDAB58D0A * get_stdin_2() const { return ___stdin_2; } inline TextReader_t7DF8314B601D202ECFEDF623093A87BFDAB58D0A ** get_address_of_stdin_2() { return &___stdin_2; } inline void set_stdin_2(TextReader_t7DF8314B601D202ECFEDF623093A87BFDAB58D0A * value) { ___stdin_2 = value; Il2CppCodeGenWriteBarrier((&___stdin_2), value); } inline static int32_t get_offset_of_inputEncoding_3() { return static_cast<int32_t>(offsetof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields, ___inputEncoding_3)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_inputEncoding_3() const { return ___inputEncoding_3; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_inputEncoding_3() { return &___inputEncoding_3; } inline void set_inputEncoding_3(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___inputEncoding_3 = value; Il2CppCodeGenWriteBarrier((&___inputEncoding_3), value); } inline static int32_t get_offset_of_outputEncoding_4() { return static_cast<int32_t>(offsetof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields, ___outputEncoding_4)); } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * get_outputEncoding_4() const { return ___outputEncoding_4; } inline Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 ** get_address_of_outputEncoding_4() { return &___outputEncoding_4; } inline void set_outputEncoding_4(Encoding_t7837A3C0F55EAE0E3959A53C6D6E88B113ED78A4 * value) { ___outputEncoding_4 = value; Il2CppCodeGenWriteBarrier((&___outputEncoding_4), value); } inline static int32_t get_offset_of_cancel_event_5() { return static_cast<int32_t>(offsetof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields, ___cancel_event_5)); } inline ConsoleCancelEventHandler_t6F3B5D9C55C25FF6B53EFEDA9150EFE807311EB4 * get_cancel_event_5() const { return ___cancel_event_5; } inline ConsoleCancelEventHandler_t6F3B5D9C55C25FF6B53EFEDA9150EFE807311EB4 ** get_address_of_cancel_event_5() { return &___cancel_event_5; } inline void set_cancel_event_5(ConsoleCancelEventHandler_t6F3B5D9C55C25FF6B53EFEDA9150EFE807311EB4 * value) { ___cancel_event_5 = value; Il2CppCodeGenWriteBarrier((&___cancel_event_5), value); } inline static int32_t get_offset_of_cancel_handler_6() { return static_cast<int32_t>(offsetof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields, ___cancel_handler_6)); } inline InternalCancelHandler_t2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A * get_cancel_handler_6() const { return ___cancel_handler_6; } inline InternalCancelHandler_t2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A ** get_address_of_cancel_handler_6() { return &___cancel_handler_6; } inline void set_cancel_handler_6(InternalCancelHandler_t2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A * value) { ___cancel_handler_6 = value; Il2CppCodeGenWriteBarrier((&___cancel_handler_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CONSOLE_T5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_H #ifndef WINDOWSCONSOLE_TE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_H #define WINDOWSCONSOLE_TE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Console_WindowsConsole struct WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B : public RuntimeObject { public: public: }; struct WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_StaticFields { public: // System.Boolean System.Console_WindowsConsole::ctrlHandlerAdded bool ___ctrlHandlerAdded_0; // System.Console_WindowsConsole_WindowsCancelHandler System.Console_WindowsConsole::cancelHandler WindowsCancelHandler_t1D05BCFB512603DCF87A126FE9969F1D876B9B51 * ___cancelHandler_1; public: inline static int32_t get_offset_of_ctrlHandlerAdded_0() { return static_cast<int32_t>(offsetof(WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_StaticFields, ___ctrlHandlerAdded_0)); } inline bool get_ctrlHandlerAdded_0() const { return ___ctrlHandlerAdded_0; } inline bool* get_address_of_ctrlHandlerAdded_0() { return &___ctrlHandlerAdded_0; } inline void set_ctrlHandlerAdded_0(bool value) { ___ctrlHandlerAdded_0 = value; } inline static int32_t get_offset_of_cancelHandler_1() { return static_cast<int32_t>(offsetof(WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_StaticFields, ___cancelHandler_1)); } inline WindowsCancelHandler_t1D05BCFB512603DCF87A126FE9969F1D876B9B51 * get_cancelHandler_1() const { return ___cancelHandler_1; } inline WindowsCancelHandler_t1D05BCFB512603DCF87A126FE9969F1D876B9B51 ** get_address_of_cancelHandler_1() { return &___cancelHandler_1; } inline void set_cancelHandler_1(WindowsCancelHandler_t1D05BCFB512603DCF87A126FE9969F1D876B9B51 * value) { ___cancelHandler_1 = value; Il2CppCodeGenWriteBarrier((&___cancelHandler_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // WINDOWSCONSOLE_TE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_H #ifndef CONSOLEDRIVER_T4F24DB42600CA82912181D5D312902B8BEFEE101_H #define CONSOLEDRIVER_T4F24DB42600CA82912181D5D312902B8BEFEE101_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ConsoleDriver struct ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101 : public RuntimeObject { public: public: }; struct ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields { public: // System.IConsoleDriver System.ConsoleDriver::driver RuntimeObject* ___driver_0; // System.Boolean System.ConsoleDriver::is_console bool ___is_console_1; // System.Boolean System.ConsoleDriver::called_isatty bool ___called_isatty_2; public: inline static int32_t get_offset_of_driver_0() { return static_cast<int32_t>(offsetof(ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields, ___driver_0)); } inline RuntimeObject* get_driver_0() const { return ___driver_0; } inline RuntimeObject** get_address_of_driver_0() { return &___driver_0; } inline void set_driver_0(RuntimeObject* value) { ___driver_0 = value; Il2CppCodeGenWriteBarrier((&___driver_0), value); } inline static int32_t get_offset_of_is_console_1() { return static_cast<int32_t>(offsetof(ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields, ___is_console_1)); } inline bool get_is_console_1() const { return ___is_console_1; } inline bool* get_address_of_is_console_1() { return &___is_console_1; } inline void set_is_console_1(bool value) { ___is_console_1 = value; } inline static int32_t get_offset_of_called_isatty_2() { return static_cast<int32_t>(offsetof(ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields, ___called_isatty_2)); } inline bool get_called_isatty_2() const { return ___called_isatty_2; } inline bool* get_address_of_called_isatty_2() { return &___called_isatty_2; } inline void set_called_isatty_2(bool value) { ___called_isatty_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CONSOLEDRIVER_T4F24DB42600CA82912181D5D312902B8BEFEE101_H #ifndef DELEGATEDATA_T1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE_H #define DELEGATEDATA_T1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.DelegateData struct DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE : public RuntimeObject { public: // System.Type System.DelegateData::target_type Type_t * ___target_type_0; // System.String System.DelegateData::method_name String_t* ___method_name_1; // System.Boolean System.DelegateData::curried_first_arg bool ___curried_first_arg_2; public: inline static int32_t get_offset_of_target_type_0() { return static_cast<int32_t>(offsetof(DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE, ___target_type_0)); } inline Type_t * get_target_type_0() const { return ___target_type_0; } inline Type_t ** get_address_of_target_type_0() { return &___target_type_0; } inline void set_target_type_0(Type_t * value) { ___target_type_0 = value; Il2CppCodeGenWriteBarrier((&___target_type_0), value); } inline static int32_t get_offset_of_method_name_1() { return static_cast<int32_t>(offsetof(DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE, ___method_name_1)); } inline String_t* get_method_name_1() const { return ___method_name_1; } inline String_t** get_address_of_method_name_1() { return &___method_name_1; } inline void set_method_name_1(String_t* value) { ___method_name_1 = value; Il2CppCodeGenWriteBarrier((&___method_name_1), value); } inline static int32_t get_offset_of_curried_first_arg_2() { return static_cast<int32_t>(offsetof(DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE, ___curried_first_arg_2)); } inline bool get_curried_first_arg_2() const { return ___curried_first_arg_2; } inline bool* get_address_of_curried_first_arg_2() { return &___curried_first_arg_2; } inline void set_curried_first_arg_2(bool value) { ___curried_first_arg_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DELEGATEDATA_T1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE_H #ifndef DELEGATESERIALIZATIONHOLDER_TC720FD99D3C1B05B7558EF694ED42E57E64DD671_H #define DELEGATESERIALIZATIONHOLDER_TC720FD99D3C1B05B7558EF694ED42E57E64DD671_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.DelegateSerializationHolder struct DelegateSerializationHolder_tC720FD99D3C1B05B7558EF694ED42E57E64DD671 : public RuntimeObject { public: // System.Delegate System.DelegateSerializationHolder::_delegate Delegate_t * ____delegate_0; public: inline static int32_t get_offset_of__delegate_0() { return static_cast<int32_t>(offsetof(DelegateSerializationHolder_tC720FD99D3C1B05B7558EF694ED42E57E64DD671, ____delegate_0)); } inline Delegate_t * get__delegate_0() const { return ____delegate_0; } inline Delegate_t ** get_address_of__delegate_0() { return &____delegate_0; } inline void set__delegate_0(Delegate_t * value) { ____delegate_0 = value; Il2CppCodeGenWriteBarrier((&____delegate_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DELEGATESERIALIZATIONHOLDER_TC720FD99D3C1B05B7558EF694ED42E57E64DD671_H #ifndef DELEGATEENTRY_T2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E_H #define DELEGATEENTRY_T2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.DelegateSerializationHolder_DelegateEntry struct DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E : public RuntimeObject { public: // System.String System.DelegateSerializationHolder_DelegateEntry::type String_t* ___type_0; // System.String System.DelegateSerializationHolder_DelegateEntry::assembly String_t* ___assembly_1; // System.Object System.DelegateSerializationHolder_DelegateEntry::target RuntimeObject * ___target_2; // System.String System.DelegateSerializationHolder_DelegateEntry::targetTypeAssembly String_t* ___targetTypeAssembly_3; // System.String System.DelegateSerializationHolder_DelegateEntry::targetTypeName String_t* ___targetTypeName_4; // System.String System.DelegateSerializationHolder_DelegateEntry::methodName String_t* ___methodName_5; // System.DelegateSerializationHolder_DelegateEntry System.DelegateSerializationHolder_DelegateEntry::delegateEntry DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E * ___delegateEntry_6; public: inline static int32_t get_offset_of_type_0() { return static_cast<int32_t>(offsetof(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E, ___type_0)); } inline String_t* get_type_0() const { return ___type_0; } inline String_t** get_address_of_type_0() { return &___type_0; } inline void set_type_0(String_t* value) { ___type_0 = value; Il2CppCodeGenWriteBarrier((&___type_0), value); } inline static int32_t get_offset_of_assembly_1() { return static_cast<int32_t>(offsetof(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E, ___assembly_1)); } inline String_t* get_assembly_1() const { return ___assembly_1; } inline String_t** get_address_of_assembly_1() { return &___assembly_1; } inline void set_assembly_1(String_t* value) { ___assembly_1 = value; Il2CppCodeGenWriteBarrier((&___assembly_1), value); } inline static int32_t get_offset_of_target_2() { return static_cast<int32_t>(offsetof(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E, ___target_2)); } inline RuntimeObject * get_target_2() const { return ___target_2; } inline RuntimeObject ** get_address_of_target_2() { return &___target_2; } inline void set_target_2(RuntimeObject * value) { ___target_2 = value; Il2CppCodeGenWriteBarrier((&___target_2), value); } inline static int32_t get_offset_of_targetTypeAssembly_3() { return static_cast<int32_t>(offsetof(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E, ___targetTypeAssembly_3)); } inline String_t* get_targetTypeAssembly_3() const { return ___targetTypeAssembly_3; } inline String_t** get_address_of_targetTypeAssembly_3() { return &___targetTypeAssembly_3; } inline void set_targetTypeAssembly_3(String_t* value) { ___targetTypeAssembly_3 = value; Il2CppCodeGenWriteBarrier((&___targetTypeAssembly_3), value); } inline static int32_t get_offset_of_targetTypeName_4() { return static_cast<int32_t>(offsetof(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E, ___targetTypeName_4)); } inline String_t* get_targetTypeName_4() const { return ___targetTypeName_4; } inline String_t** get_address_of_targetTypeName_4() { return &___targetTypeName_4; } inline void set_targetTypeName_4(String_t* value) { ___targetTypeName_4 = value; Il2CppCodeGenWriteBarrier((&___targetTypeName_4), value); } inline static int32_t get_offset_of_methodName_5() { return static_cast<int32_t>(offsetof(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E, ___methodName_5)); } inline String_t* get_methodName_5() const { return ___methodName_5; } inline String_t** get_address_of_methodName_5() { return &___methodName_5; } inline void set_methodName_5(String_t* value) { ___methodName_5 = value; Il2CppCodeGenWriteBarrier((&___methodName_5), value); } inline static int32_t get_offset_of_delegateEntry_6() { return static_cast<int32_t>(offsetof(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E, ___delegateEntry_6)); } inline DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E * get_delegateEntry_6() const { return ___delegateEntry_6; } inline DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E ** get_address_of_delegateEntry_6() { return &___delegateEntry_6; } inline void set_delegateEntry_6(DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E * value) { ___delegateEntry_6 = value; Il2CppCodeGenWriteBarrier((&___delegateEntry_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DELEGATEENTRY_T2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E_H #ifndef ENVIRONMENT_TC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_H #define ENVIRONMENT_TC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Environment struct Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806 : public RuntimeObject { public: public: }; struct Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_StaticFields { public: // System.String System.Environment::nl String_t* ___nl_1; // System.OperatingSystem System.Environment::os OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83 * ___os_2; public: inline static int32_t get_offset_of_nl_1() { return static_cast<int32_t>(offsetof(Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_StaticFields, ___nl_1)); } inline String_t* get_nl_1() const { return ___nl_1; } inline String_t** get_address_of_nl_1() { return &___nl_1; } inline void set_nl_1(String_t* value) { ___nl_1 = value; Il2CppCodeGenWriteBarrier((&___nl_1), value); } inline static int32_t get_offset_of_os_2() { return static_cast<int32_t>(offsetof(Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_StaticFields, ___os_2)); } inline OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83 * get_os_2() const { return ___os_2; } inline OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83 ** get_address_of_os_2() { return &___os_2; } inline void set_os_2(OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83 * value) { ___os_2 = value; Il2CppCodeGenWriteBarrier((&___os_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ENVIRONMENT_TC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_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 KNOWNTERMINALS_TC33732356694467E5C41300FDB5A86143590F1AE_H #define KNOWNTERMINALS_TC33732356694467E5C41300FDB5A86143590F1AE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.KnownTerminals struct KnownTerminals_tC33732356694467E5C41300FDB5A86143590F1AE : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // KNOWNTERMINALS_TC33732356694467E5C41300FDB5A86143590F1AE_H #ifndef MARSHALBYREFOBJECT_TC4577953D0A44D0AB8597CFA868E01C858B1C9AF_H #define MARSHALBYREFOBJECT_TC4577953D0A44D0AB8597CFA868E01C858B1C9AF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MarshalByRefObject struct MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF : public RuntimeObject { public: // System.Object System.MarshalByRefObject::_identity RuntimeObject * ____identity_0; public: inline static int32_t get_offset_of__identity_0() { return static_cast<int32_t>(offsetof(MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF, ____identity_0)); } inline RuntimeObject * get__identity_0() const { return ____identity_0; } inline RuntimeObject ** get_address_of__identity_0() { return &____identity_0; } inline void set__identity_0(RuntimeObject * value) { ____identity_0 = value; Il2CppCodeGenWriteBarrier((&____identity_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.MarshalByRefObject struct MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF_marshaled_pinvoke { Il2CppIUnknown* ____identity_0; }; // Native definition for COM marshalling of System.MarshalByRefObject struct MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF_marshaled_com { Il2CppIUnknown* ____identity_0; }; #endif // MARSHALBYREFOBJECT_TC4577953D0A44D0AB8597CFA868E01C858B1C9AF_H #ifndef MONOCUSTOMATTRS_T9E88BD614E6A34BF71106F71D0524DBA27E7FA98_H #define MONOCUSTOMATTRS_T9E88BD614E6A34BF71106F71D0524DBA27E7FA98_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MonoCustomAttrs struct MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98 : public RuntimeObject { public: public: }; struct MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_StaticFields { public: // System.Reflection.Assembly System.MonoCustomAttrs::corlib Assembly_t * ___corlib_0; // System.AttributeUsageAttribute System.MonoCustomAttrs::DefaultAttributeUsage AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 * ___DefaultAttributeUsage_2; public: inline static int32_t get_offset_of_corlib_0() { return static_cast<int32_t>(offsetof(MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_StaticFields, ___corlib_0)); } inline Assembly_t * get_corlib_0() const { return ___corlib_0; } inline Assembly_t ** get_address_of_corlib_0() { return &___corlib_0; } inline void set_corlib_0(Assembly_t * value) { ___corlib_0 = value; Il2CppCodeGenWriteBarrier((&___corlib_0), value); } inline static int32_t get_offset_of_DefaultAttributeUsage_2() { return static_cast<int32_t>(offsetof(MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_StaticFields, ___DefaultAttributeUsage_2)); } inline AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 * get_DefaultAttributeUsage_2() const { return ___DefaultAttributeUsage_2; } inline AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 ** get_address_of_DefaultAttributeUsage_2() { return &___DefaultAttributeUsage_2; } inline void set_DefaultAttributeUsage_2(AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 * value) { ___DefaultAttributeUsage_2 = value; Il2CppCodeGenWriteBarrier((&___DefaultAttributeUsage_2), value); } }; struct MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_ThreadStaticFields { public: // System.Collections.Generic.Dictionary`2<System.Type,System.AttributeUsageAttribute> System.MonoCustomAttrs::usage_cache Dictionary_2_t10ABF562FF47B327563169FBB750047BF1341236 * ___usage_cache_1; public: inline static int32_t get_offset_of_usage_cache_1() { return static_cast<int32_t>(offsetof(MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_ThreadStaticFields, ___usage_cache_1)); } inline Dictionary_2_t10ABF562FF47B327563169FBB750047BF1341236 * get_usage_cache_1() const { return ___usage_cache_1; } inline Dictionary_2_t10ABF562FF47B327563169FBB750047BF1341236 ** get_address_of_usage_cache_1() { return &___usage_cache_1; } inline void set_usage_cache_1(Dictionary_2_t10ABF562FF47B327563169FBB750047BF1341236 * value) { ___usage_cache_1 = value; Il2CppCodeGenWriteBarrier((&___usage_cache_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MONOCUSTOMATTRS_T9E88BD614E6A34BF71106F71D0524DBA27E7FA98_H #ifndef ATTRIBUTEINFO_T03612660D52EF536A548174E3C1CC246B848E91A_H #define ATTRIBUTEINFO_T03612660D52EF536A548174E3C1CC246B848E91A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MonoCustomAttrs_AttributeInfo struct AttributeInfo_t03612660D52EF536A548174E3C1CC246B848E91A : public RuntimeObject { public: // System.AttributeUsageAttribute System.MonoCustomAttrs_AttributeInfo::_usage AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 * ____usage_0; // System.Int32 System.MonoCustomAttrs_AttributeInfo::_inheritanceLevel int32_t ____inheritanceLevel_1; public: inline static int32_t get_offset_of__usage_0() { return static_cast<int32_t>(offsetof(AttributeInfo_t03612660D52EF536A548174E3C1CC246B848E91A, ____usage_0)); } inline AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 * get__usage_0() const { return ____usage_0; } inline AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 ** get_address_of__usage_0() { return &____usage_0; } inline void set__usage_0(AttributeUsageAttribute_t1B765F643562D0CD97D0B6B34D121C6AD9CE2388 * value) { ____usage_0 = value; Il2CppCodeGenWriteBarrier((&____usage_0), value); } inline static int32_t get_offset_of__inheritanceLevel_1() { return static_cast<int32_t>(offsetof(AttributeInfo_t03612660D52EF536A548174E3C1CC246B848E91A, ____inheritanceLevel_1)); } inline int32_t get__inheritanceLevel_1() const { return ____inheritanceLevel_1; } inline int32_t* get_address_of__inheritanceLevel_1() { return &____inheritanceLevel_1; } inline void set__inheritanceLevel_1(int32_t value) { ____inheritanceLevel_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ATTRIBUTEINFO_T03612660D52EF536A548174E3C1CC246B848E91A_H #ifndef MONOLISTITEM_TF9FE02BB3D5D8507333C93F1AF79B60901947A64_H #define MONOLISTITEM_TF9FE02BB3D5D8507333C93F1AF79B60901947A64_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MonoListItem struct MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64 : public RuntimeObject { public: // System.MonoListItem System.MonoListItem::next MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64 * ___next_0; // System.Object System.MonoListItem::data RuntimeObject * ___data_1; public: inline static int32_t get_offset_of_next_0() { return static_cast<int32_t>(offsetof(MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64, ___next_0)); } inline MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64 * get_next_0() const { return ___next_0; } inline MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64 ** get_address_of_next_0() { return &___next_0; } inline void set_next_0(MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64 * value) { ___next_0 = value; Il2CppCodeGenWriteBarrier((&___next_0), value); } inline static int32_t get_offset_of_data_1() { return static_cast<int32_t>(offsetof(MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64, ___data_1)); } inline RuntimeObject * get_data_1() const { return ___data_1; } inline RuntimeObject ** get_address_of_data_1() { return &___data_1; } inline void set_data_1(RuntimeObject * value) { ___data_1 = value; Il2CppCodeGenWriteBarrier((&___data_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MONOLISTITEM_TF9FE02BB3D5D8507333C93F1AF79B60901947A64_H #ifndef MONOTYPEINFO_T9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D_H #define MONOTYPEINFO_T9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MonoTypeInfo struct MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D : public RuntimeObject { public: // System.String System.MonoTypeInfo::full_name String_t* ___full_name_0; // System.Reflection.MonoCMethod System.MonoTypeInfo::default_ctor MonoCMethod_tFB85687BEF8202F8B3E77FE24BCC2E400EA4FC61 * ___default_ctor_1; public: inline static int32_t get_offset_of_full_name_0() { return static_cast<int32_t>(offsetof(MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D, ___full_name_0)); } inline String_t* get_full_name_0() const { return ___full_name_0; } inline String_t** get_address_of_full_name_0() { return &___full_name_0; } inline void set_full_name_0(String_t* value) { ___full_name_0 = value; Il2CppCodeGenWriteBarrier((&___full_name_0), value); } inline static int32_t get_offset_of_default_ctor_1() { return static_cast<int32_t>(offsetof(MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D, ___default_ctor_1)); } inline MonoCMethod_tFB85687BEF8202F8B3E77FE24BCC2E400EA4FC61 * get_default_ctor_1() const { return ___default_ctor_1; } inline MonoCMethod_tFB85687BEF8202F8B3E77FE24BCC2E400EA4FC61 ** get_address_of_default_ctor_1() { return &___default_ctor_1; } inline void set_default_ctor_1(MonoCMethod_tFB85687BEF8202F8B3E77FE24BCC2E400EA4FC61 * value) { ___default_ctor_1 = value; Il2CppCodeGenWriteBarrier((&___default_ctor_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.MonoTypeInfo struct MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D_marshaled_pinvoke { char* ___full_name_0; MonoCMethod_tFB85687BEF8202F8B3E77FE24BCC2E400EA4FC61 * ___default_ctor_1; }; // Native definition for COM marshalling of System.MonoTypeInfo struct MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D_marshaled_com { Il2CppChar* ___full_name_0; MonoCMethod_tFB85687BEF8202F8B3E77FE24BCC2E400EA4FC61 * ___default_ctor_1; }; #endif // MONOTYPEINFO_T9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D_H #ifndef NULLABLE_T07CA5C3F88F56004BCB589DD7580798C66874C44_H #define NULLABLE_T07CA5C3F88F56004BCB589DD7580798C66874C44_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Nullable struct Nullable_t07CA5C3F88F56004BCB589DD7580798C66874C44 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // NULLABLE_T07CA5C3F88F56004BCB589DD7580798C66874C44_H #ifndef NUMBERFORMATTER_T73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_H #define NUMBERFORMATTER_T73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.NumberFormatter struct NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC : public RuntimeObject { public: // System.Globalization.NumberFormatInfo System.NumberFormatter::_nfi NumberFormatInfo_tFDF57037EBC5BC833D0A53EF0327B805994860A8 * ____nfi_6; // System.Char[] System.NumberFormatter::_cbuf CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ____cbuf_7; // System.Boolean System.NumberFormatter::_NaN bool ____NaN_8; // System.Boolean System.NumberFormatter::_infinity bool ____infinity_9; // System.Boolean System.NumberFormatter::_isCustomFormat bool ____isCustomFormat_10; // System.Boolean System.NumberFormatter::_specifierIsUpper bool ____specifierIsUpper_11; // System.Boolean System.NumberFormatter::_positive bool ____positive_12; // System.Char System.NumberFormatter::_specifier Il2CppChar ____specifier_13; // System.Int32 System.NumberFormatter::_precision int32_t ____precision_14; // System.Int32 System.NumberFormatter::_defPrecision int32_t ____defPrecision_15; // System.Int32 System.NumberFormatter::_digitsLen int32_t ____digitsLen_16; // System.Int32 System.NumberFormatter::_offset int32_t ____offset_17; // System.Int32 System.NumberFormatter::_decPointPos int32_t ____decPointPos_18; // System.UInt32 System.NumberFormatter::_val1 uint32_t ____val1_19; // System.UInt32 System.NumberFormatter::_val2 uint32_t ____val2_20; // System.UInt32 System.NumberFormatter::_val3 uint32_t ____val3_21; // System.UInt32 System.NumberFormatter::_val4 uint32_t ____val4_22; // System.Int32 System.NumberFormatter::_ind int32_t ____ind_23; public: inline static int32_t get_offset_of__nfi_6() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____nfi_6)); } inline NumberFormatInfo_tFDF57037EBC5BC833D0A53EF0327B805994860A8 * get__nfi_6() const { return ____nfi_6; } inline NumberFormatInfo_tFDF57037EBC5BC833D0A53EF0327B805994860A8 ** get_address_of__nfi_6() { return &____nfi_6; } inline void set__nfi_6(NumberFormatInfo_tFDF57037EBC5BC833D0A53EF0327B805994860A8 * value) { ____nfi_6 = value; Il2CppCodeGenWriteBarrier((&____nfi_6), value); } inline static int32_t get_offset_of__cbuf_7() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____cbuf_7)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get__cbuf_7() const { return ____cbuf_7; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of__cbuf_7() { return &____cbuf_7; } inline void set__cbuf_7(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ____cbuf_7 = value; Il2CppCodeGenWriteBarrier((&____cbuf_7), value); } inline static int32_t get_offset_of__NaN_8() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____NaN_8)); } inline bool get__NaN_8() const { return ____NaN_8; } inline bool* get_address_of__NaN_8() { return &____NaN_8; } inline void set__NaN_8(bool value) { ____NaN_8 = value; } inline static int32_t get_offset_of__infinity_9() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____infinity_9)); } inline bool get__infinity_9() const { return ____infinity_9; } inline bool* get_address_of__infinity_9() { return &____infinity_9; } inline void set__infinity_9(bool value) { ____infinity_9 = value; } inline static int32_t get_offset_of__isCustomFormat_10() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____isCustomFormat_10)); } inline bool get__isCustomFormat_10() const { return ____isCustomFormat_10; } inline bool* get_address_of__isCustomFormat_10() { return &____isCustomFormat_10; } inline void set__isCustomFormat_10(bool value) { ____isCustomFormat_10 = value; } inline static int32_t get_offset_of__specifierIsUpper_11() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____specifierIsUpper_11)); } inline bool get__specifierIsUpper_11() const { return ____specifierIsUpper_11; } inline bool* get_address_of__specifierIsUpper_11() { return &____specifierIsUpper_11; } inline void set__specifierIsUpper_11(bool value) { ____specifierIsUpper_11 = value; } inline static int32_t get_offset_of__positive_12() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____positive_12)); } inline bool get__positive_12() const { return ____positive_12; } inline bool* get_address_of__positive_12() { return &____positive_12; } inline void set__positive_12(bool value) { ____positive_12 = value; } inline static int32_t get_offset_of__specifier_13() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____specifier_13)); } inline Il2CppChar get__specifier_13() const { return ____specifier_13; } inline Il2CppChar* get_address_of__specifier_13() { return &____specifier_13; } inline void set__specifier_13(Il2CppChar value) { ____specifier_13 = value; } inline static int32_t get_offset_of__precision_14() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____precision_14)); } inline int32_t get__precision_14() const { return ____precision_14; } inline int32_t* get_address_of__precision_14() { return &____precision_14; } inline void set__precision_14(int32_t value) { ____precision_14 = value; } inline static int32_t get_offset_of__defPrecision_15() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____defPrecision_15)); } inline int32_t get__defPrecision_15() const { return ____defPrecision_15; } inline int32_t* get_address_of__defPrecision_15() { return &____defPrecision_15; } inline void set__defPrecision_15(int32_t value) { ____defPrecision_15 = value; } inline static int32_t get_offset_of__digitsLen_16() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____digitsLen_16)); } inline int32_t get__digitsLen_16() const { return ____digitsLen_16; } inline int32_t* get_address_of__digitsLen_16() { return &____digitsLen_16; } inline void set__digitsLen_16(int32_t value) { ____digitsLen_16 = value; } inline static int32_t get_offset_of__offset_17() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____offset_17)); } inline int32_t get__offset_17() const { return ____offset_17; } inline int32_t* get_address_of__offset_17() { return &____offset_17; } inline void set__offset_17(int32_t value) { ____offset_17 = value; } inline static int32_t get_offset_of__decPointPos_18() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____decPointPos_18)); } inline int32_t get__decPointPos_18() const { return ____decPointPos_18; } inline int32_t* get_address_of__decPointPos_18() { return &____decPointPos_18; } inline void set__decPointPos_18(int32_t value) { ____decPointPos_18 = value; } inline static int32_t get_offset_of__val1_19() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____val1_19)); } inline uint32_t get__val1_19() const { return ____val1_19; } inline uint32_t* get_address_of__val1_19() { return &____val1_19; } inline void set__val1_19(uint32_t value) { ____val1_19 = value; } inline static int32_t get_offset_of__val2_20() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____val2_20)); } inline uint32_t get__val2_20() const { return ____val2_20; } inline uint32_t* get_address_of__val2_20() { return &____val2_20; } inline void set__val2_20(uint32_t value) { ____val2_20 = value; } inline static int32_t get_offset_of__val3_21() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____val3_21)); } inline uint32_t get__val3_21() const { return ____val3_21; } inline uint32_t* get_address_of__val3_21() { return &____val3_21; } inline void set__val3_21(uint32_t value) { ____val3_21 = value; } inline static int32_t get_offset_of__val4_22() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____val4_22)); } inline uint32_t get__val4_22() const { return ____val4_22; } inline uint32_t* get_address_of__val4_22() { return &____val4_22; } inline void set__val4_22(uint32_t value) { ____val4_22 = value; } inline static int32_t get_offset_of__ind_23() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC, ____ind_23)); } inline int32_t get__ind_23() const { return ____ind_23; } inline int32_t* get_address_of__ind_23() { return &____ind_23; } inline void set__ind_23(int32_t value) { ____ind_23 = value; } }; struct NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields { public: // System.UInt64* System.NumberFormatter::MantissaBitsTable uint64_t* ___MantissaBitsTable_0; // System.Int32* System.NumberFormatter::TensExponentTable int32_t* ___TensExponentTable_1; // System.Char* System.NumberFormatter::DigitLowerTable Il2CppChar* ___DigitLowerTable_2; // System.Char* System.NumberFormatter::DigitUpperTable Il2CppChar* ___DigitUpperTable_3; // System.Int64* System.NumberFormatter::TenPowersList int64_t* ___TenPowersList_4; // System.Int32* System.NumberFormatter::DecHexDigits int32_t* ___DecHexDigits_5; public: inline static int32_t get_offset_of_MantissaBitsTable_0() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields, ___MantissaBitsTable_0)); } inline uint64_t* get_MantissaBitsTable_0() const { return ___MantissaBitsTable_0; } inline uint64_t** get_address_of_MantissaBitsTable_0() { return &___MantissaBitsTable_0; } inline void set_MantissaBitsTable_0(uint64_t* value) { ___MantissaBitsTable_0 = value; } inline static int32_t get_offset_of_TensExponentTable_1() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields, ___TensExponentTable_1)); } inline int32_t* get_TensExponentTable_1() const { return ___TensExponentTable_1; } inline int32_t** get_address_of_TensExponentTable_1() { return &___TensExponentTable_1; } inline void set_TensExponentTable_1(int32_t* value) { ___TensExponentTable_1 = value; } inline static int32_t get_offset_of_DigitLowerTable_2() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields, ___DigitLowerTable_2)); } inline Il2CppChar* get_DigitLowerTable_2() const { return ___DigitLowerTable_2; } inline Il2CppChar** get_address_of_DigitLowerTable_2() { return &___DigitLowerTable_2; } inline void set_DigitLowerTable_2(Il2CppChar* value) { ___DigitLowerTable_2 = value; } inline static int32_t get_offset_of_DigitUpperTable_3() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields, ___DigitUpperTable_3)); } inline Il2CppChar* get_DigitUpperTable_3() const { return ___DigitUpperTable_3; } inline Il2CppChar** get_address_of_DigitUpperTable_3() { return &___DigitUpperTable_3; } inline void set_DigitUpperTable_3(Il2CppChar* value) { ___DigitUpperTable_3 = value; } inline static int32_t get_offset_of_TenPowersList_4() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields, ___TenPowersList_4)); } inline int64_t* get_TenPowersList_4() const { return ___TenPowersList_4; } inline int64_t** get_address_of_TenPowersList_4() { return &___TenPowersList_4; } inline void set_TenPowersList_4(int64_t* value) { ___TenPowersList_4 = value; } inline static int32_t get_offset_of_DecHexDigits_5() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields, ___DecHexDigits_5)); } inline int32_t* get_DecHexDigits_5() const { return ___DecHexDigits_5; } inline int32_t** get_address_of_DecHexDigits_5() { return &___DecHexDigits_5; } inline void set_DecHexDigits_5(int32_t* value) { ___DecHexDigits_5 = value; } }; struct NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_ThreadStaticFields { public: // System.NumberFormatter System.NumberFormatter::threadNumberFormatter NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC * ___threadNumberFormatter_24; // System.NumberFormatter System.NumberFormatter::userFormatProvider NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC * ___userFormatProvider_25; public: inline static int32_t get_offset_of_threadNumberFormatter_24() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_ThreadStaticFields, ___threadNumberFormatter_24)); } inline NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC * get_threadNumberFormatter_24() const { return ___threadNumberFormatter_24; } inline NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC ** get_address_of_threadNumberFormatter_24() { return &___threadNumberFormatter_24; } inline void set_threadNumberFormatter_24(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC * value) { ___threadNumberFormatter_24 = value; Il2CppCodeGenWriteBarrier((&___threadNumberFormatter_24), value); } inline static int32_t get_offset_of_userFormatProvider_25() { return static_cast<int32_t>(offsetof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_ThreadStaticFields, ___userFormatProvider_25)); } inline NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC * get_userFormatProvider_25() const { return ___userFormatProvider_25; } inline NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC ** get_address_of_userFormatProvider_25() { return &___userFormatProvider_25; } inline void set_userFormatProvider_25(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC * value) { ___userFormatProvider_25 = value; Il2CppCodeGenWriteBarrier((&___userFormatProvider_25), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // NUMBERFORMATTER_T73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_H #ifndef CUSTOMINFO_T3C5397567D3BBF326ED9C3D9680AE658DE4612E1_H #define CUSTOMINFO_T3C5397567D3BBF326ED9C3D9680AE658DE4612E1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.NumberFormatter_CustomInfo struct CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1 : public RuntimeObject { public: // System.Boolean System.NumberFormatter_CustomInfo::UseGroup bool ___UseGroup_0; // System.Int32 System.NumberFormatter_CustomInfo::DecimalDigits int32_t ___DecimalDigits_1; // System.Int32 System.NumberFormatter_CustomInfo::DecimalPointPos int32_t ___DecimalPointPos_2; // System.Int32 System.NumberFormatter_CustomInfo::DecimalTailSharpDigits int32_t ___DecimalTailSharpDigits_3; // System.Int32 System.NumberFormatter_CustomInfo::IntegerDigits int32_t ___IntegerDigits_4; // System.Int32 System.NumberFormatter_CustomInfo::IntegerHeadSharpDigits int32_t ___IntegerHeadSharpDigits_5; // System.Int32 System.NumberFormatter_CustomInfo::IntegerHeadPos int32_t ___IntegerHeadPos_6; // System.Boolean System.NumberFormatter_CustomInfo::UseExponent bool ___UseExponent_7; // System.Int32 System.NumberFormatter_CustomInfo::ExponentDigits int32_t ___ExponentDigits_8; // System.Int32 System.NumberFormatter_CustomInfo::ExponentTailSharpDigits int32_t ___ExponentTailSharpDigits_9; // System.Boolean System.NumberFormatter_CustomInfo::ExponentNegativeSignOnly bool ___ExponentNegativeSignOnly_10; // System.Int32 System.NumberFormatter_CustomInfo::DividePlaces int32_t ___DividePlaces_11; // System.Int32 System.NumberFormatter_CustomInfo::Percents int32_t ___Percents_12; // System.Int32 System.NumberFormatter_CustomInfo::Permilles int32_t ___Permilles_13; public: inline static int32_t get_offset_of_UseGroup_0() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___UseGroup_0)); } inline bool get_UseGroup_0() const { return ___UseGroup_0; } inline bool* get_address_of_UseGroup_0() { return &___UseGroup_0; } inline void set_UseGroup_0(bool value) { ___UseGroup_0 = value; } inline static int32_t get_offset_of_DecimalDigits_1() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___DecimalDigits_1)); } inline int32_t get_DecimalDigits_1() const { return ___DecimalDigits_1; } inline int32_t* get_address_of_DecimalDigits_1() { return &___DecimalDigits_1; } inline void set_DecimalDigits_1(int32_t value) { ___DecimalDigits_1 = value; } inline static int32_t get_offset_of_DecimalPointPos_2() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___DecimalPointPos_2)); } inline int32_t get_DecimalPointPos_2() const { return ___DecimalPointPos_2; } inline int32_t* get_address_of_DecimalPointPos_2() { return &___DecimalPointPos_2; } inline void set_DecimalPointPos_2(int32_t value) { ___DecimalPointPos_2 = value; } inline static int32_t get_offset_of_DecimalTailSharpDigits_3() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___DecimalTailSharpDigits_3)); } inline int32_t get_DecimalTailSharpDigits_3() const { return ___DecimalTailSharpDigits_3; } inline int32_t* get_address_of_DecimalTailSharpDigits_3() { return &___DecimalTailSharpDigits_3; } inline void set_DecimalTailSharpDigits_3(int32_t value) { ___DecimalTailSharpDigits_3 = value; } inline static int32_t get_offset_of_IntegerDigits_4() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___IntegerDigits_4)); } inline int32_t get_IntegerDigits_4() const { return ___IntegerDigits_4; } inline int32_t* get_address_of_IntegerDigits_4() { return &___IntegerDigits_4; } inline void set_IntegerDigits_4(int32_t value) { ___IntegerDigits_4 = value; } inline static int32_t get_offset_of_IntegerHeadSharpDigits_5() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___IntegerHeadSharpDigits_5)); } inline int32_t get_IntegerHeadSharpDigits_5() const { return ___IntegerHeadSharpDigits_5; } inline int32_t* get_address_of_IntegerHeadSharpDigits_5() { return &___IntegerHeadSharpDigits_5; } inline void set_IntegerHeadSharpDigits_5(int32_t value) { ___IntegerHeadSharpDigits_5 = value; } inline static int32_t get_offset_of_IntegerHeadPos_6() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___IntegerHeadPos_6)); } inline int32_t get_IntegerHeadPos_6() const { return ___IntegerHeadPos_6; } inline int32_t* get_address_of_IntegerHeadPos_6() { return &___IntegerHeadPos_6; } inline void set_IntegerHeadPos_6(int32_t value) { ___IntegerHeadPos_6 = value; } inline static int32_t get_offset_of_UseExponent_7() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___UseExponent_7)); } inline bool get_UseExponent_7() const { return ___UseExponent_7; } inline bool* get_address_of_UseExponent_7() { return &___UseExponent_7; } inline void set_UseExponent_7(bool value) { ___UseExponent_7 = value; } inline static int32_t get_offset_of_ExponentDigits_8() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___ExponentDigits_8)); } inline int32_t get_ExponentDigits_8() const { return ___ExponentDigits_8; } inline int32_t* get_address_of_ExponentDigits_8() { return &___ExponentDigits_8; } inline void set_ExponentDigits_8(int32_t value) { ___ExponentDigits_8 = value; } inline static int32_t get_offset_of_ExponentTailSharpDigits_9() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___ExponentTailSharpDigits_9)); } inline int32_t get_ExponentTailSharpDigits_9() const { return ___ExponentTailSharpDigits_9; } inline int32_t* get_address_of_ExponentTailSharpDigits_9() { return &___ExponentTailSharpDigits_9; } inline void set_ExponentTailSharpDigits_9(int32_t value) { ___ExponentTailSharpDigits_9 = value; } inline static int32_t get_offset_of_ExponentNegativeSignOnly_10() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___ExponentNegativeSignOnly_10)); } inline bool get_ExponentNegativeSignOnly_10() const { return ___ExponentNegativeSignOnly_10; } inline bool* get_address_of_ExponentNegativeSignOnly_10() { return &___ExponentNegativeSignOnly_10; } inline void set_ExponentNegativeSignOnly_10(bool value) { ___ExponentNegativeSignOnly_10 = value; } inline static int32_t get_offset_of_DividePlaces_11() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___DividePlaces_11)); } inline int32_t get_DividePlaces_11() const { return ___DividePlaces_11; } inline int32_t* get_address_of_DividePlaces_11() { return &___DividePlaces_11; } inline void set_DividePlaces_11(int32_t value) { ___DividePlaces_11 = value; } inline static int32_t get_offset_of_Percents_12() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___Percents_12)); } inline int32_t get_Percents_12() const { return ___Percents_12; } inline int32_t* get_address_of_Percents_12() { return &___Percents_12; } inline void set_Percents_12(int32_t value) { ___Percents_12 = value; } inline static int32_t get_offset_of_Permilles_13() { return static_cast<int32_t>(offsetof(CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1, ___Permilles_13)); } inline int32_t get_Permilles_13() const { return ___Permilles_13; } inline int32_t* get_address_of_Permilles_13() { return &___Permilles_13; } inline void set_Permilles_13(int32_t value) { ___Permilles_13 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CUSTOMINFO_T3C5397567D3BBF326ED9C3D9680AE658DE4612E1_H #ifndef PARAMETERIZEDSTRINGS_T495ED7291D56B901CAA1F10EC25739C3C99DC923_H #define PARAMETERIZEDSTRINGS_T495ED7291D56B901CAA1F10EC25739C3C99DC923_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ParameterizedStrings struct ParameterizedStrings_t495ED7291D56B901CAA1F10EC25739C3C99DC923 : public RuntimeObject { public: public: }; struct ParameterizedStrings_t495ED7291D56B901CAA1F10EC25739C3C99DC923_ThreadStaticFields { public: // System.ParameterizedStrings_LowLevelStack System.ParameterizedStrings::_cachedStack LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2 * ____cachedStack_0; public: inline static int32_t get_offset_of__cachedStack_0() { return static_cast<int32_t>(offsetof(ParameterizedStrings_t495ED7291D56B901CAA1F10EC25739C3C99DC923_ThreadStaticFields, ____cachedStack_0)); } inline LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2 * get__cachedStack_0() const { return ____cachedStack_0; } inline LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2 ** get_address_of__cachedStack_0() { return &____cachedStack_0; } inline void set__cachedStack_0(LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2 * value) { ____cachedStack_0 = value; Il2CppCodeGenWriteBarrier((&____cachedStack_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PARAMETERIZEDSTRINGS_T495ED7291D56B901CAA1F10EC25739C3C99DC923_H #ifndef LOWLEVELSTACK_TAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2_H #define LOWLEVELSTACK_TAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ParameterizedStrings_LowLevelStack struct LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2 : public RuntimeObject { public: // System.ParameterizedStrings_FormatParam[] System.ParameterizedStrings_LowLevelStack::_arr FormatParamU5BU5D_t2F95A3C5AF726E75A42BC28843BAD579B62199B5* ____arr_0; // System.Int32 System.ParameterizedStrings_LowLevelStack::_count int32_t ____count_1; public: inline static int32_t get_offset_of__arr_0() { return static_cast<int32_t>(offsetof(LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2, ____arr_0)); } inline FormatParamU5BU5D_t2F95A3C5AF726E75A42BC28843BAD579B62199B5* get__arr_0() const { return ____arr_0; } inline FormatParamU5BU5D_t2F95A3C5AF726E75A42BC28843BAD579B62199B5** get_address_of__arr_0() { return &____arr_0; } inline void set__arr_0(FormatParamU5BU5D_t2F95A3C5AF726E75A42BC28843BAD579B62199B5* value) { ____arr_0 = value; Il2CppCodeGenWriteBarrier((&____arr_0), value); } inline static int32_t get_offset_of__count_1() { return static_cast<int32_t>(offsetof(LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2, ____count_1)); } inline int32_t get__count_1() const { return ____count_1; } inline int32_t* get_address_of__count_1() { return &____count_1; } inline void set__count_1(int32_t value) { ____count_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LOWLEVELSTACK_TAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2_H #ifndef PARSENUMBERS_TFCD9612B791F297E13D1D622F88219D9D471331A_H #define PARSENUMBERS_TFCD9612B791F297E13D1D622F88219D9D471331A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ParseNumbers struct ParseNumbers_tFCD9612B791F297E13D1D622F88219D9D471331A : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PARSENUMBERS_TFCD9612B791F297E13D1D622F88219D9D471331A_H #ifndef POINTERSPEC_TBCE1666DC24EC6E4E5376FEC214499984EC26892_H #define POINTERSPEC_TBCE1666DC24EC6E4E5376FEC214499984EC26892_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.PointerSpec struct PointerSpec_tBCE1666DC24EC6E4E5376FEC214499984EC26892 : public RuntimeObject { public: // System.Int32 System.PointerSpec::pointer_level int32_t ___pointer_level_0; public: inline static int32_t get_offset_of_pointer_level_0() { return static_cast<int32_t>(offsetof(PointerSpec_tBCE1666DC24EC6E4E5376FEC214499984EC26892, ___pointer_level_0)); } inline int32_t get_pointer_level_0() const { return ___pointer_level_0; } inline int32_t* get_address_of_pointer_level_0() { return &___pointer_level_0; } inline void set_pointer_level_0(int32_t value) { ___pointer_level_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // POINTERSPEC_TBCE1666DC24EC6E4E5376FEC214499984EC26892_H #ifndef MEMBERINFO_T_H #define MEMBERINFO_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Reflection.MemberInfo struct MemberInfo_t : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MEMBERINFO_T_H #ifndef TERMINFOREADER_TCAABF3484E6F0AA298F809766C52CA9DC4E6C55C_H #define TERMINFOREADER_TCAABF3484E6F0AA298F809766C52CA9DC4E6C55C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TermInfoReader struct TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C : public RuntimeObject { public: // System.Int16 System.TermInfoReader::boolSize int16_t ___boolSize_0; // System.Int16 System.TermInfoReader::numSize int16_t ___numSize_1; // System.Int16 System.TermInfoReader::strOffsets int16_t ___strOffsets_2; // System.Byte[] System.TermInfoReader::buffer ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___buffer_3; // System.Int32 System.TermInfoReader::booleansOffset int32_t ___booleansOffset_4; public: inline static int32_t get_offset_of_boolSize_0() { return static_cast<int32_t>(offsetof(TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C, ___boolSize_0)); } inline int16_t get_boolSize_0() const { return ___boolSize_0; } inline int16_t* get_address_of_boolSize_0() { return &___boolSize_0; } inline void set_boolSize_0(int16_t value) { ___boolSize_0 = value; } inline static int32_t get_offset_of_numSize_1() { return static_cast<int32_t>(offsetof(TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C, ___numSize_1)); } inline int16_t get_numSize_1() const { return ___numSize_1; } inline int16_t* get_address_of_numSize_1() { return &___numSize_1; } inline void set_numSize_1(int16_t value) { ___numSize_1 = value; } inline static int32_t get_offset_of_strOffsets_2() { return static_cast<int32_t>(offsetof(TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C, ___strOffsets_2)); } inline int16_t get_strOffsets_2() const { return ___strOffsets_2; } inline int16_t* get_address_of_strOffsets_2() { return &___strOffsets_2; } inline void set_strOffsets_2(int16_t value) { ___strOffsets_2 = value; } inline static int32_t get_offset_of_buffer_3() { return static_cast<int32_t>(offsetof(TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C, ___buffer_3)); } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* get_buffer_3() const { return ___buffer_3; } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821** get_address_of_buffer_3() { return &___buffer_3; } inline void set_buffer_3(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* value) { ___buffer_3 = value; Il2CppCodeGenWriteBarrier((&___buffer_3), value); } inline static int32_t get_offset_of_booleansOffset_4() { return static_cast<int32_t>(offsetof(TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C, ___booleansOffset_4)); } inline int32_t get_booleansOffset_4() const { return ___booleansOffset_4; } inline int32_t* get_address_of_booleansOffset_4() { return &___booleansOffset_4; } inline void set_booleansOffset_4(int32_t value) { ___booleansOffset_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TERMINFOREADER_TCAABF3484E6F0AA298F809766C52CA9DC4E6C55C_H #ifndef TIMETYPE_T1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9_H #define TIMETYPE_T1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TimeType struct TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9 : public RuntimeObject { public: // System.Int32 System.TimeType::Offset int32_t ___Offset_0; // System.Boolean System.TimeType::IsDst bool ___IsDst_1; // System.String System.TimeType::Name String_t* ___Name_2; public: inline static int32_t get_offset_of_Offset_0() { return static_cast<int32_t>(offsetof(TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9, ___Offset_0)); } inline int32_t get_Offset_0() const { return ___Offset_0; } inline int32_t* get_address_of_Offset_0() { return &___Offset_0; } inline void set_Offset_0(int32_t value) { ___Offset_0 = value; } inline static int32_t get_offset_of_IsDst_1() { return static_cast<int32_t>(offsetof(TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9, ___IsDst_1)); } inline bool get_IsDst_1() const { return ___IsDst_1; } inline bool* get_address_of_IsDst_1() { return &___IsDst_1; } inline void set_IsDst_1(bool value) { ___IsDst_1 = value; } inline static int32_t get_offset_of_Name_2() { return static_cast<int32_t>(offsetof(TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9, ___Name_2)); } inline String_t* get_Name_2() const { return ___Name_2; } inline String_t** get_address_of_Name_2() { return &___Name_2; } inline void set_Name_2(String_t* value) { ___Name_2 = value; Il2CppCodeGenWriteBarrier((&___Name_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TIMETYPE_T1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9_H #ifndef TIMEZONE_TA2DF435DA1A379978B885F0872A93774666B7454_H #define TIMEZONE_TA2DF435DA1A379978B885F0872A93774666B7454_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TimeZone struct TimeZone_tA2DF435DA1A379978B885F0872A93774666B7454 : public RuntimeObject { public: public: }; struct TimeZone_tA2DF435DA1A379978B885F0872A93774666B7454_StaticFields { public: // System.Object System.TimeZone::tz_lock RuntimeObject * ___tz_lock_0; public: inline static int32_t get_offset_of_tz_lock_0() { return static_cast<int32_t>(offsetof(TimeZone_tA2DF435DA1A379978B885F0872A93774666B7454_StaticFields, ___tz_lock_0)); } inline RuntimeObject * get_tz_lock_0() const { return ___tz_lock_0; } inline RuntimeObject ** get_address_of_tz_lock_0() { return &___tz_lock_0; } inline void set_tz_lock_0(RuntimeObject * value) { ___tz_lock_0 = value; Il2CppCodeGenWriteBarrier((&___tz_lock_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TIMEZONE_TA2DF435DA1A379978B885F0872A93774666B7454_H #ifndef TYPEIDENTIFIERS_TBC5BC4024D376DCB779D877A1616CF4D7DB809E6_H #define TYPEIDENTIFIERS_TBC5BC4024D376DCB779D877A1616CF4D7DB809E6_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeIdentifiers struct TypeIdentifiers_tBC5BC4024D376DCB779D877A1616CF4D7DB809E6 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPEIDENTIFIERS_TBC5BC4024D376DCB779D877A1616CF4D7DB809E6_H #ifndef TYPENAMEPARSER_TBEF78C9D6AEC3DE5E2993F6EDC24C06F7B713741_H #define TYPENAMEPARSER_TBEF78C9D6AEC3DE5E2993F6EDC24C06F7B713741_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeNameParser struct TypeNameParser_tBEF78C9D6AEC3DE5E2993F6EDC24C06F7B713741 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPENAMEPARSER_TBEF78C9D6AEC3DE5E2993F6EDC24C06F7B713741_H #ifndef TYPENAMES_T59FBD5EB0A62A2B3A8178016670631D61DEE00F9_H #define TYPENAMES_T59FBD5EB0A62A2B3A8178016670631D61DEE00F9_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeNames struct TypeNames_t59FBD5EB0A62A2B3A8178016670631D61DEE00F9 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPENAMES_T59FBD5EB0A62A2B3A8178016670631D61DEE00F9_H #ifndef ATYPENAME_T8FD4A465E3C2846D11FEAE25ED5BF3D67FF94421_H #define ATYPENAME_T8FD4A465E3C2846D11FEAE25ED5BF3D67FF94421_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeNames_ATypeName struct ATypeName_t8FD4A465E3C2846D11FEAE25ED5BF3D67FF94421 : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ATYPENAME_T8FD4A465E3C2846D11FEAE25ED5BF3D67FF94421_H #ifndef TYPESPEC_T943289F7C537252144A22588159B36C6B6759A7F_H #define TYPESPEC_T943289F7C537252144A22588159B36C6B6759A7F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeSpec struct TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F : public RuntimeObject { public: // System.TypeIdentifier System.TypeSpec::name RuntimeObject* ___name_0; // System.String System.TypeSpec::assembly_name String_t* ___assembly_name_1; // System.Collections.Generic.List`1<System.TypeIdentifier> System.TypeSpec::nested List_1_tB8129EB4ADDDECD38E3E178F0A902C921B575166 * ___nested_2; // System.Collections.Generic.List`1<System.TypeSpec> System.TypeSpec::generic_params List_1_t8C8BF378AAB72B34B6EE63F686877AE7290ECFBA * ___generic_params_3; // System.Collections.Generic.List`1<System.ModifierSpec> System.TypeSpec::modifier_spec List_1_tFD995FD9C5961BB4B415EE63B297C4B19643A3C2 * ___modifier_spec_4; // System.Boolean System.TypeSpec::is_byref bool ___is_byref_5; // System.String System.TypeSpec::display_fullname String_t* ___display_fullname_6; public: inline static int32_t get_offset_of_name_0() { return static_cast<int32_t>(offsetof(TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F, ___name_0)); } inline RuntimeObject* get_name_0() const { return ___name_0; } inline RuntimeObject** get_address_of_name_0() { return &___name_0; } inline void set_name_0(RuntimeObject* value) { ___name_0 = value; Il2CppCodeGenWriteBarrier((&___name_0), value); } inline static int32_t get_offset_of_assembly_name_1() { return static_cast<int32_t>(offsetof(TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F, ___assembly_name_1)); } inline String_t* get_assembly_name_1() const { return ___assembly_name_1; } inline String_t** get_address_of_assembly_name_1() { return &___assembly_name_1; } inline void set_assembly_name_1(String_t* value) { ___assembly_name_1 = value; Il2CppCodeGenWriteBarrier((&___assembly_name_1), value); } inline static int32_t get_offset_of_nested_2() { return static_cast<int32_t>(offsetof(TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F, ___nested_2)); } inline List_1_tB8129EB4ADDDECD38E3E178F0A902C921B575166 * get_nested_2() const { return ___nested_2; } inline List_1_tB8129EB4ADDDECD38E3E178F0A902C921B575166 ** get_address_of_nested_2() { return &___nested_2; } inline void set_nested_2(List_1_tB8129EB4ADDDECD38E3E178F0A902C921B575166 * value) { ___nested_2 = value; Il2CppCodeGenWriteBarrier((&___nested_2), value); } inline static int32_t get_offset_of_generic_params_3() { return static_cast<int32_t>(offsetof(TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F, ___generic_params_3)); } inline List_1_t8C8BF378AAB72B34B6EE63F686877AE7290ECFBA * get_generic_params_3() const { return ___generic_params_3; } inline List_1_t8C8BF378AAB72B34B6EE63F686877AE7290ECFBA ** get_address_of_generic_params_3() { return &___generic_params_3; } inline void set_generic_params_3(List_1_t8C8BF378AAB72B34B6EE63F686877AE7290ECFBA * value) { ___generic_params_3 = value; Il2CppCodeGenWriteBarrier((&___generic_params_3), value); } inline static int32_t get_offset_of_modifier_spec_4() { return static_cast<int32_t>(offsetof(TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F, ___modifier_spec_4)); } inline List_1_tFD995FD9C5961BB4B415EE63B297C4B19643A3C2 * get_modifier_spec_4() const { return ___modifier_spec_4; } inline List_1_tFD995FD9C5961BB4B415EE63B297C4B19643A3C2 ** get_address_of_modifier_spec_4() { return &___modifier_spec_4; } inline void set_modifier_spec_4(List_1_tFD995FD9C5961BB4B415EE63B297C4B19643A3C2 * value) { ___modifier_spec_4 = value; Il2CppCodeGenWriteBarrier((&___modifier_spec_4), value); } inline static int32_t get_offset_of_is_byref_5() { return static_cast<int32_t>(offsetof(TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F, ___is_byref_5)); } inline bool get_is_byref_5() const { return ___is_byref_5; } inline bool* get_address_of_is_byref_5() { return &___is_byref_5; } inline void set_is_byref_5(bool value) { ___is_byref_5 = value; } inline static int32_t get_offset_of_display_fullname_6() { return static_cast<int32_t>(offsetof(TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F, ___display_fullname_6)); } inline String_t* get_display_fullname_6() const { return ___display_fullname_6; } inline String_t** get_address_of_display_fullname_6() { return &___display_fullname_6; } inline void set_display_fullname_6(String_t* value) { ___display_fullname_6 = value; Il2CppCodeGenWriteBarrier((&___display_fullname_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPESPEC_T943289F7C537252144A22588159B36C6B6759A7F_H #ifndef UNITYSERIALIZATIONHOLDER_T6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC_H #define UNITYSERIALIZATIONHOLDER_T6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UnitySerializationHolder struct UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC : public RuntimeObject { public: // System.Type[] System.UnitySerializationHolder::m_instantiation TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___m_instantiation_0; // System.Int32[] System.UnitySerializationHolder::m_elementTypes Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* ___m_elementTypes_1; // System.Int32 System.UnitySerializationHolder::m_genericParameterPosition int32_t ___m_genericParameterPosition_2; // System.Type System.UnitySerializationHolder::m_declaringType Type_t * ___m_declaringType_3; // System.Reflection.MethodBase System.UnitySerializationHolder::m_declaringMethod MethodBase_t * ___m_declaringMethod_4; // System.String System.UnitySerializationHolder::m_data String_t* ___m_data_5; // System.String System.UnitySerializationHolder::m_assemblyName String_t* ___m_assemblyName_6; // System.Int32 System.UnitySerializationHolder::m_unityType int32_t ___m_unityType_7; public: inline static int32_t get_offset_of_m_instantiation_0() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_instantiation_0)); } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get_m_instantiation_0() const { return ___m_instantiation_0; } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of_m_instantiation_0() { return &___m_instantiation_0; } inline void set_m_instantiation_0(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value) { ___m_instantiation_0 = value; Il2CppCodeGenWriteBarrier((&___m_instantiation_0), value); } inline static int32_t get_offset_of_m_elementTypes_1() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_elementTypes_1)); } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* get_m_elementTypes_1() const { return ___m_elementTypes_1; } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83** get_address_of_m_elementTypes_1() { return &___m_elementTypes_1; } inline void set_m_elementTypes_1(Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* value) { ___m_elementTypes_1 = value; Il2CppCodeGenWriteBarrier((&___m_elementTypes_1), value); } inline static int32_t get_offset_of_m_genericParameterPosition_2() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_genericParameterPosition_2)); } inline int32_t get_m_genericParameterPosition_2() const { return ___m_genericParameterPosition_2; } inline int32_t* get_address_of_m_genericParameterPosition_2() { return &___m_genericParameterPosition_2; } inline void set_m_genericParameterPosition_2(int32_t value) { ___m_genericParameterPosition_2 = value; } inline static int32_t get_offset_of_m_declaringType_3() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_declaringType_3)); } inline Type_t * get_m_declaringType_3() const { return ___m_declaringType_3; } inline Type_t ** get_address_of_m_declaringType_3() { return &___m_declaringType_3; } inline void set_m_declaringType_3(Type_t * value) { ___m_declaringType_3 = value; Il2CppCodeGenWriteBarrier((&___m_declaringType_3), value); } inline static int32_t get_offset_of_m_declaringMethod_4() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_declaringMethod_4)); } inline MethodBase_t * get_m_declaringMethod_4() const { return ___m_declaringMethod_4; } inline MethodBase_t ** get_address_of_m_declaringMethod_4() { return &___m_declaringMethod_4; } inline void set_m_declaringMethod_4(MethodBase_t * value) { ___m_declaringMethod_4 = value; Il2CppCodeGenWriteBarrier((&___m_declaringMethod_4), value); } inline static int32_t get_offset_of_m_data_5() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_data_5)); } inline String_t* get_m_data_5() const { return ___m_data_5; } inline String_t** get_address_of_m_data_5() { return &___m_data_5; } inline void set_m_data_5(String_t* value) { ___m_data_5 = value; Il2CppCodeGenWriteBarrier((&___m_data_5), value); } inline static int32_t get_offset_of_m_assemblyName_6() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_assemblyName_6)); } inline String_t* get_m_assemblyName_6() const { return ___m_assemblyName_6; } inline String_t** get_address_of_m_assemblyName_6() { return &___m_assemblyName_6; } inline void set_m_assemblyName_6(String_t* value) { ___m_assemblyName_6 = value; Il2CppCodeGenWriteBarrier((&___m_assemblyName_6), value); } inline static int32_t get_offset_of_m_unityType_7() { return static_cast<int32_t>(offsetof(UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC, ___m_unityType_7)); } inline int32_t get_m_unityType_7() const { return ___m_unityType_7; } inline int32_t* get_address_of_m_unityType_7() { return &___m_unityType_7; } inline void set_m_unityType_7(int32_t value) { ___m_unityType_7 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UNITYSERIALIZATIONHOLDER_T6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC_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 VERSION_TDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD_H #define VERSION_TDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Version struct Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD : public RuntimeObject { public: // System.Int32 System.Version::_Major int32_t ____Major_0; // System.Int32 System.Version::_Minor int32_t ____Minor_1; // System.Int32 System.Version::_Build int32_t ____Build_2; // System.Int32 System.Version::_Revision int32_t ____Revision_3; public: inline static int32_t get_offset_of__Major_0() { return static_cast<int32_t>(offsetof(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD, ____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(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD, ____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(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD, ____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(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD, ____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; } }; struct Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD_StaticFields { public: // System.Char[] System.Version::SeparatorsArray CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___SeparatorsArray_4; public: inline static int32_t get_offset_of_SeparatorsArray_4() { return static_cast<int32_t>(offsetof(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD_StaticFields, ___SeparatorsArray_4)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_SeparatorsArray_4() const { return ___SeparatorsArray_4; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_SeparatorsArray_4() { return &___SeparatorsArray_4; } inline void set_SeparatorsArray_4(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___SeparatorsArray_4 = value; Il2CppCodeGenWriteBarrier((&___SeparatorsArray_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VERSION_TDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD_H #ifndef __COMOBJECT_T7C4C78B18A827C344A9826ECC7FCC40B7F6FD77C_H #define __COMOBJECT_T7C4C78B18A827C344A9826ECC7FCC40B7F6FD77C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.__ComObject struct __ComObject_t7C4C78B18A827C344A9826ECC7FCC40B7F6FD77C : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // __COMOBJECT_T7C4C78B18A827C344A9826ECC7FCC40B7F6FD77C_H #ifndef ASSEMBLYLOADEVENTARGS_T51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8_H #define ASSEMBLYLOADEVENTARGS_T51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.AssemblyLoadEventArgs struct AssemblyLoadEventArgs_t51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8 : public EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E { public: // System.Reflection.Assembly System.AssemblyLoadEventArgs::m_loadedAssembly Assembly_t * ___m_loadedAssembly_1; public: inline static int32_t get_offset_of_m_loadedAssembly_1() { return static_cast<int32_t>(offsetof(AssemblyLoadEventArgs_t51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8, ___m_loadedAssembly_1)); } inline Assembly_t * get_m_loadedAssembly_1() const { return ___m_loadedAssembly_1; } inline Assembly_t ** get_address_of_m_loadedAssembly_1() { return &___m_loadedAssembly_1; } inline void set_m_loadedAssembly_1(Assembly_t * value) { ___m_loadedAssembly_1 = value; Il2CppCodeGenWriteBarrier((&___m_loadedAssembly_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASSEMBLYLOADEVENTARGS_T51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8_H #ifndef COORD_T6CEFF682745DD47B1B4DA3ED268C0933021AC34A_H #define COORD_T6CEFF682745DD47B1B4DA3ED268C0933021AC34A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Coord struct Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A { public: // System.Int16 System.Coord::X int16_t ___X_0; // System.Int16 System.Coord::Y int16_t ___Y_1; public: inline static int32_t get_offset_of_X_0() { return static_cast<int32_t>(offsetof(Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A, ___X_0)); } inline int16_t get_X_0() const { return ___X_0; } inline int16_t* get_address_of_X_0() { return &___X_0; } inline void set_X_0(int16_t value) { ___X_0 = value; } inline static int32_t get_offset_of_Y_1() { return static_cast<int32_t>(offsetof(Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A, ___Y_1)); } inline int16_t get_Y_1() const { return ___Y_1; } inline int16_t* get_address_of_Y_1() { return &___Y_1; } inline void set_Y_1(int16_t value) { ___Y_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COORD_T6CEFF682745DD47B1B4DA3ED268C0933021AC34A_H #ifndef CURRENTSYSTEMTIMEZONE_T7689B8BF1C4A474BD3CFA5B8E89FA84A53D44171_H #define CURRENTSYSTEMTIMEZONE_T7689B8BF1C4A474BD3CFA5B8E89FA84A53D44171_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.CurrentSystemTimeZone struct CurrentSystemTimeZone_t7689B8BF1C4A474BD3CFA5B8E89FA84A53D44171 : public TimeZone_tA2DF435DA1A379978B885F0872A93774666B7454 { public: // System.TimeZoneInfo System.CurrentSystemTimeZone::LocalTimeZone TimeZoneInfo_t46EF9BAEAA787846F1A1EC419BE75CFEFAFF6777 * ___LocalTimeZone_1; public: inline static int32_t get_offset_of_LocalTimeZone_1() { return static_cast<int32_t>(offsetof(CurrentSystemTimeZone_t7689B8BF1C4A474BD3CFA5B8E89FA84A53D44171, ___LocalTimeZone_1)); } inline TimeZoneInfo_t46EF9BAEAA787846F1A1EC419BE75CFEFAFF6777 * get_LocalTimeZone_1() const { return ___LocalTimeZone_1; } inline TimeZoneInfo_t46EF9BAEAA787846F1A1EC419BE75CFEFAFF6777 ** get_address_of_LocalTimeZone_1() { return &___LocalTimeZone_1; } inline void set_LocalTimeZone_1(TimeZoneInfo_t46EF9BAEAA787846F1A1EC419BE75CFEFAFF6777 * value) { ___LocalTimeZone_1 = value; Il2CppCodeGenWriteBarrier((&___LocalTimeZone_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CURRENTSYSTEMTIMEZONE_T7689B8BF1C4A474BD3CFA5B8E89FA84A53D44171_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 INPUTRECORD_TAB007C739F339BE208F3C4796B53E9044ADF0A78_H #define INPUTRECORD_TAB007C739F339BE208F3C4796B53E9044ADF0A78_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.InputRecord struct InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78 { public: // System.Int16 System.InputRecord::EventType int16_t ___EventType_0; // System.Boolean System.InputRecord::KeyDown bool ___KeyDown_1; // System.Int16 System.InputRecord::RepeatCount int16_t ___RepeatCount_2; // System.Int16 System.InputRecord::VirtualKeyCode int16_t ___VirtualKeyCode_3; // System.Int16 System.InputRecord::VirtualScanCode int16_t ___VirtualScanCode_4; // System.Char System.InputRecord::Character Il2CppChar ___Character_5; // System.Int32 System.InputRecord::ControlKeyState int32_t ___ControlKeyState_6; // System.Int32 System.InputRecord::pad1 int32_t ___pad1_7; // System.Boolean System.InputRecord::pad2 bool ___pad2_8; public: inline static int32_t get_offset_of_EventType_0() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___EventType_0)); } inline int16_t get_EventType_0() const { return ___EventType_0; } inline int16_t* get_address_of_EventType_0() { return &___EventType_0; } inline void set_EventType_0(int16_t value) { ___EventType_0 = value; } inline static int32_t get_offset_of_KeyDown_1() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___KeyDown_1)); } inline bool get_KeyDown_1() const { return ___KeyDown_1; } inline bool* get_address_of_KeyDown_1() { return &___KeyDown_1; } inline void set_KeyDown_1(bool value) { ___KeyDown_1 = value; } inline static int32_t get_offset_of_RepeatCount_2() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___RepeatCount_2)); } inline int16_t get_RepeatCount_2() const { return ___RepeatCount_2; } inline int16_t* get_address_of_RepeatCount_2() { return &___RepeatCount_2; } inline void set_RepeatCount_2(int16_t value) { ___RepeatCount_2 = value; } inline static int32_t get_offset_of_VirtualKeyCode_3() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___VirtualKeyCode_3)); } inline int16_t get_VirtualKeyCode_3() const { return ___VirtualKeyCode_3; } inline int16_t* get_address_of_VirtualKeyCode_3() { return &___VirtualKeyCode_3; } inline void set_VirtualKeyCode_3(int16_t value) { ___VirtualKeyCode_3 = value; } inline static int32_t get_offset_of_VirtualScanCode_4() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___VirtualScanCode_4)); } inline int16_t get_VirtualScanCode_4() const { return ___VirtualScanCode_4; } inline int16_t* get_address_of_VirtualScanCode_4() { return &___VirtualScanCode_4; } inline void set_VirtualScanCode_4(int16_t value) { ___VirtualScanCode_4 = value; } inline static int32_t get_offset_of_Character_5() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___Character_5)); } inline Il2CppChar get_Character_5() const { return ___Character_5; } inline Il2CppChar* get_address_of_Character_5() { return &___Character_5; } inline void set_Character_5(Il2CppChar value) { ___Character_5 = value; } inline static int32_t get_offset_of_ControlKeyState_6() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___ControlKeyState_6)); } inline int32_t get_ControlKeyState_6() const { return ___ControlKeyState_6; } inline int32_t* get_address_of_ControlKeyState_6() { return &___ControlKeyState_6; } inline void set_ControlKeyState_6(int32_t value) { ___ControlKeyState_6 = value; } inline static int32_t get_offset_of_pad1_7() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___pad1_7)); } inline int32_t get_pad1_7() const { return ___pad1_7; } inline int32_t* get_address_of_pad1_7() { return &___pad1_7; } inline void set_pad1_7(int32_t value) { ___pad1_7 = value; } inline static int32_t get_offset_of_pad2_8() { return static_cast<int32_t>(offsetof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78, ___pad2_8)); } inline bool get_pad2_8() const { return ___pad2_8; } inline bool* get_address_of_pad2_8() { return &___pad2_8; } inline void set_pad2_8(bool value) { ___pad2_8 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.InputRecord struct InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78_marshaled_pinvoke { int16_t ___EventType_0; int32_t ___KeyDown_1; int16_t ___RepeatCount_2; int16_t ___VirtualKeyCode_3; int16_t ___VirtualScanCode_4; uint8_t ___Character_5; int32_t ___ControlKeyState_6; int32_t ___pad1_7; int32_t ___pad2_8; }; // Native definition for COM marshalling of System.InputRecord struct InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78_marshaled_com { int16_t ___EventType_0; int32_t ___KeyDown_1; int16_t ___RepeatCount_2; int16_t ___VirtualKeyCode_3; int16_t ___VirtualScanCode_4; uint8_t ___Character_5; int32_t ___ControlKeyState_6; int32_t ___pad1_7; int32_t ___pad2_8; }; #endif // INPUTRECORD_TAB007C739F339BE208F3C4796B53E9044ADF0A78_H #ifndef INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #define INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int32 struct Int32_t585191389E07734F19F3156FF88FB3EF4800D102 { public: // System.Int32 System.Int32::m_value int32_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int32_t585191389E07734F19F3156FF88FB3EF4800D102, ___m_value_0)); } inline int32_t get_m_value_0() const { return ___m_value_0; } inline int32_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(int32_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifndef INTPTR_T_H #define INTPTR_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.IntPtr struct IntPtr_t { public: // System.Void* System.IntPtr::m_value void* ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); } inline void* get_m_value_0() const { return ___m_value_0; } inline void** get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(void* value) { ___m_value_0 = value; } }; struct IntPtr_t_StaticFields { public: // System.IntPtr System.IntPtr::Zero intptr_t ___Zero_1; public: inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); } inline intptr_t get_Zero_1() const { return ___Zero_1; } inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; } inline void set_Zero_1(intptr_t value) { ___Zero_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INTPTR_T_H #ifndef FORMATPARAM_T1901DD0E7CD1B3A17B09040A6E2FCA5307328800_H #define FORMATPARAM_T1901DD0E7CD1B3A17B09040A6E2FCA5307328800_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ParameterizedStrings_FormatParam struct FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800 { public: // System.Int32 System.ParameterizedStrings_FormatParam::_int32 int32_t ____int32_0; // System.String System.ParameterizedStrings_FormatParam::_string String_t* ____string_1; public: inline static int32_t get_offset_of__int32_0() { return static_cast<int32_t>(offsetof(FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800, ____int32_0)); } inline int32_t get__int32_0() const { return ____int32_0; } inline int32_t* get_address_of__int32_0() { return &____int32_0; } inline void set__int32_0(int32_t value) { ____int32_0 = value; } inline static int32_t get_offset_of__string_1() { return static_cast<int32_t>(offsetof(FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800, ____string_1)); } inline String_t* get__string_1() const { return ____string_1; } inline String_t** get_address_of__string_1() { return &____string_1; } inline void set__string_1(String_t* value) { ____string_1 = value; Il2CppCodeGenWriteBarrier((&____string_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.ParameterizedStrings/FormatParam struct FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800_marshaled_pinvoke { int32_t ____int32_0; char* ____string_1; }; // Native definition for COM marshalling of System.ParameterizedStrings/FormatParam struct FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800_marshaled_com { int32_t ____int32_0; Il2CppChar* ____string_1; }; #endif // FORMATPARAM_T1901DD0E7CD1B3A17B09040A6E2FCA5307328800_H #ifndef RESOLVEEVENTARGS_T116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D_H #define RESOLVEEVENTARGS_T116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ResolveEventArgs struct ResolveEventArgs_t116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D : public EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E { public: // System.String System.ResolveEventArgs::m_Name String_t* ___m_Name_1; // System.Reflection.Assembly System.ResolveEventArgs::m_Requesting Assembly_t * ___m_Requesting_2; public: inline static int32_t get_offset_of_m_Name_1() { return static_cast<int32_t>(offsetof(ResolveEventArgs_t116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D, ___m_Name_1)); } inline String_t* get_m_Name_1() const { return ___m_Name_1; } inline String_t** get_address_of_m_Name_1() { return &___m_Name_1; } inline void set_m_Name_1(String_t* value) { ___m_Name_1 = value; Il2CppCodeGenWriteBarrier((&___m_Name_1), value); } inline static int32_t get_offset_of_m_Requesting_2() { return static_cast<int32_t>(offsetof(ResolveEventArgs_t116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D, ___m_Requesting_2)); } inline Assembly_t * get_m_Requesting_2() const { return ___m_Requesting_2; } inline Assembly_t ** get_address_of_m_Requesting_2() { return &___m_Requesting_2; } inline void set_m_Requesting_2(Assembly_t * value) { ___m_Requesting_2 = value; Il2CppCodeGenWriteBarrier((&___m_Requesting_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RESOLVEEVENTARGS_T116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D_H #ifndef GCHANDLE_T39FAEE3EA592432C93B574A31DD83B87F1847DE3_H #define GCHANDLE_T39FAEE3EA592432C93B574A31DD83B87F1847DE3_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Runtime.InteropServices.GCHandle struct GCHandle_t39FAEE3EA592432C93B574A31DD83B87F1847DE3 { public: // System.Int32 System.Runtime.InteropServices.GCHandle::handle int32_t ___handle_0; public: inline static int32_t get_offset_of_handle_0() { return static_cast<int32_t>(offsetof(GCHandle_t39FAEE3EA592432C93B574A31DD83B87F1847DE3, ___handle_0)); } inline int32_t get_handle_0() const { return ___handle_0; } inline int32_t* get_address_of_handle_0() { return &___handle_0; } inline void set_handle_0(int32_t value) { ___handle_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // GCHANDLE_T39FAEE3EA592432C93B574A31DD83B87F1847DE3_H #ifndef SMALLRECT_T18C271B0FF660F6ED4EC6D99B26C4D35F51CA532_H #define SMALLRECT_T18C271B0FF660F6ED4EC6D99B26C4D35F51CA532_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.SmallRect struct SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532 { public: // System.Int16 System.SmallRect::Left int16_t ___Left_0; // System.Int16 System.SmallRect::Top int16_t ___Top_1; // System.Int16 System.SmallRect::Right int16_t ___Right_2; // System.Int16 System.SmallRect::Bottom int16_t ___Bottom_3; public: inline static int32_t get_offset_of_Left_0() { return static_cast<int32_t>(offsetof(SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532, ___Left_0)); } inline int16_t get_Left_0() const { return ___Left_0; } inline int16_t* get_address_of_Left_0() { return &___Left_0; } inline void set_Left_0(int16_t value) { ___Left_0 = value; } inline static int32_t get_offset_of_Top_1() { return static_cast<int32_t>(offsetof(SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532, ___Top_1)); } inline int16_t get_Top_1() const { return ___Top_1; } inline int16_t* get_address_of_Top_1() { return &___Top_1; } inline void set_Top_1(int16_t value) { ___Top_1 = value; } inline static int32_t get_offset_of_Right_2() { return static_cast<int32_t>(offsetof(SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532, ___Right_2)); } inline int16_t get_Right_2() const { return ___Right_2; } inline int16_t* get_address_of_Right_2() { return &___Right_2; } inline void set_Right_2(int16_t value) { ___Right_2 = value; } inline static int32_t get_offset_of_Bottom_3() { return static_cast<int32_t>(offsetof(SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532, ___Bottom_3)); } inline int16_t get_Bottom_3() const { return ___Bottom_3; } inline int16_t* get_address_of_Bottom_3() { return &___Bottom_3; } inline void set_Bottom_3(int16_t value) { ___Bottom_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SMALLRECT_T18C271B0FF660F6ED4EC6D99B26C4D35F51CA532_H #ifndef DISPLAY_T0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5_H #define DISPLAY_T0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeIdentifiers_Display struct Display_t0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5 : public ATypeName_t8FD4A465E3C2846D11FEAE25ED5BF3D67FF94421 { public: // System.String System.TypeIdentifiers_Display::displayName String_t* ___displayName_0; // System.String System.TypeIdentifiers_Display::internal_name String_t* ___internal_name_1; public: inline static int32_t get_offset_of_displayName_0() { return static_cast<int32_t>(offsetof(Display_t0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5, ___displayName_0)); } inline String_t* get_displayName_0() const { return ___displayName_0; } inline String_t** get_address_of_displayName_0() { return &___displayName_0; } inline void set_displayName_0(String_t* value) { ___displayName_0 = value; Il2CppCodeGenWriteBarrier((&___displayName_0), value); } inline static int32_t get_offset_of_internal_name_1() { return static_cast<int32_t>(offsetof(Display_t0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5, ___internal_name_1)); } inline String_t* get_internal_name_1() const { return ___internal_name_1; } inline String_t** get_address_of_internal_name_1() { return &___internal_name_1; } inline void set_internal_name_1(String_t* value) { ___internal_name_1 = value; Il2CppCodeGenWriteBarrier((&___internal_name_1), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // DISPLAY_T0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5_H #ifndef UINTPTR_T_H #define UINTPTR_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UIntPtr struct UIntPtr_t { public: // System.Void* System.UIntPtr::_pointer void* ____pointer_1; public: inline static int32_t get_offset_of__pointer_1() { return static_cast<int32_t>(offsetof(UIntPtr_t, ____pointer_1)); } inline void* get__pointer_1() const { return ____pointer_1; } inline void** get_address_of__pointer_1() { return &____pointer_1; } inline void set__pointer_1(void* value) { ____pointer_1 = value; } }; struct UIntPtr_t_StaticFields { public: // System.UIntPtr System.UIntPtr::Zero uintptr_t ___Zero_0; public: inline static int32_t get_offset_of_Zero_0() { return static_cast<int32_t>(offsetof(UIntPtr_t_StaticFields, ___Zero_0)); } inline uintptr_t get_Zero_0() const { return ___Zero_0; } inline uintptr_t* get_address_of_Zero_0() { return &___Zero_0; } inline void set_Zero_0(uintptr_t value) { ___Zero_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UINTPTR_T_H #ifndef UNSAFECHARBUFFER_T99F0962CE65E71C4BA612D5434276C51AC33AF0C_H #define UNSAFECHARBUFFER_T99F0962CE65E71C4BA612D5434276C51AC33AF0C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UnSafeCharBuffer struct UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C { public: // System.Char* System.UnSafeCharBuffer::m_buffer Il2CppChar* ___m_buffer_0; // System.Int32 System.UnSafeCharBuffer::m_totalSize int32_t ___m_totalSize_1; // System.Int32 System.UnSafeCharBuffer::m_length int32_t ___m_length_2; public: inline static int32_t get_offset_of_m_buffer_0() { return static_cast<int32_t>(offsetof(UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C, ___m_buffer_0)); } inline Il2CppChar* get_m_buffer_0() const { return ___m_buffer_0; } inline Il2CppChar** get_address_of_m_buffer_0() { return &___m_buffer_0; } inline void set_m_buffer_0(Il2CppChar* value) { ___m_buffer_0 = value; } inline static int32_t get_offset_of_m_totalSize_1() { return static_cast<int32_t>(offsetof(UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C, ___m_totalSize_1)); } inline int32_t get_m_totalSize_1() const { return ___m_totalSize_1; } inline int32_t* get_address_of_m_totalSize_1() { return &___m_totalSize_1; } inline void set_m_totalSize_1(int32_t value) { ___m_totalSize_1 = value; } inline static int32_t get_offset_of_m_length_2() { return static_cast<int32_t>(offsetof(UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C, ___m_length_2)); } inline int32_t get_m_length_2() const { return ___m_length_2; } inline int32_t* get_address_of_m_length_2() { return &___m_length_2; } inline void set_m_length_2(int32_t value) { ___m_length_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.UnSafeCharBuffer struct UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C_marshaled_pinvoke { Il2CppChar* ___m_buffer_0; int32_t ___m_totalSize_1; int32_t ___m_length_2; }; // Native definition for COM marshalling of System.UnSafeCharBuffer struct UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C_marshaled_com { Il2CppChar* ___m_buffer_0; int32_t ___m_totalSize_1; int32_t ___m_length_2; }; #endif // UNSAFECHARBUFFER_T99F0962CE65E71C4BA612D5434276C51AC33AF0C_H #ifndef UNHANDLEDEXCEPTIONEVENTARGS_T39DD47D43B0D764FE2C9847FBE760031FBEA0FD1_H #define UNHANDLEDEXCEPTIONEVENTARGS_T39DD47D43B0D764FE2C9847FBE760031FBEA0FD1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UnhandledExceptionEventArgs struct UnhandledExceptionEventArgs_t39DD47D43B0D764FE2C9847FBE760031FBEA0FD1 : public EventArgs_t8E6CA180BE0E56674C6407011A94BAF7C757352E { public: // System.Object System.UnhandledExceptionEventArgs::_Exception RuntimeObject * ____Exception_1; // System.Boolean System.UnhandledExceptionEventArgs::_IsTerminating bool ____IsTerminating_2; public: inline static int32_t get_offset_of__Exception_1() { return static_cast<int32_t>(offsetof(UnhandledExceptionEventArgs_t39DD47D43B0D764FE2C9847FBE760031FBEA0FD1, ____Exception_1)); } inline RuntimeObject * get__Exception_1() const { return ____Exception_1; } inline RuntimeObject ** get_address_of__Exception_1() { return &____Exception_1; } inline void set__Exception_1(RuntimeObject * value) { ____Exception_1 = value; Il2CppCodeGenWriteBarrier((&____Exception_1), value); } inline static int32_t get_offset_of__IsTerminating_2() { return static_cast<int32_t>(offsetof(UnhandledExceptionEventArgs_t39DD47D43B0D764FE2C9847FBE760031FBEA0FD1, ____IsTerminating_2)); } inline bool get__IsTerminating_2() const { return ____IsTerminating_2; } inline bool* get_address_of__IsTerminating_2() { return &____IsTerminating_2; } inline void set__IsTerminating_2(bool value) { ____IsTerminating_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UNHANDLEDEXCEPTIONEVENTARGS_T39DD47D43B0D764FE2C9847FBE760031FBEA0FD1_H #ifndef VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #define VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017 { public: union { struct { }; uint8_t Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017__padding[1]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifndef APPDOMAIN_T1B59572328F60585904DF52A59FE47CF5B5FFFF8_H #define APPDOMAIN_T1B59572328F60585904DF52A59FE47CF5B5FFFF8_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.AppDomain struct AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8 : public MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF { public: // System.IntPtr System.AppDomain::_mono_app_domain intptr_t ____mono_app_domain_1; // System.Object System.AppDomain::_evidence RuntimeObject * ____evidence_6; // System.Object System.AppDomain::_granted RuntimeObject * ____granted_7; // System.Int32 System.AppDomain::_principalPolicy int32_t ____principalPolicy_8; // System.AssemblyLoadEventHandler System.AppDomain::AssemblyLoad AssemblyLoadEventHandler_t53F8340027F9EE67E8A22E7D8C1A3770345153C9 * ___AssemblyLoad_11; // System.ResolveEventHandler System.AppDomain::AssemblyResolve ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * ___AssemblyResolve_12; // System.EventHandler System.AppDomain::DomainUnload EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C * ___DomainUnload_13; // System.EventHandler System.AppDomain::ProcessExit EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C * ___ProcessExit_14; // System.ResolveEventHandler System.AppDomain::ResourceResolve ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * ___ResourceResolve_15; // System.ResolveEventHandler System.AppDomain::TypeResolve ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * ___TypeResolve_16; // System.UnhandledExceptionEventHandler System.AppDomain::UnhandledException UnhandledExceptionEventHandler_tB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE * ___UnhandledException_17; // System.EventHandler`1<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs> System.AppDomain::FirstChanceException EventHandler_1_t1E35ED2E29145994C6C03E57601C6D48C61083FF * ___FirstChanceException_18; // System.Object System.AppDomain::_domain_manager RuntimeObject * ____domain_manager_19; // System.ResolveEventHandler System.AppDomain::ReflectionOnlyAssemblyResolve ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * ___ReflectionOnlyAssemblyResolve_20; // System.Object System.AppDomain::_activation RuntimeObject * ____activation_21; // System.Object System.AppDomain::_applicationIdentity RuntimeObject * ____applicationIdentity_22; // System.Collections.Generic.List`1<System.String> System.AppDomain::compatibility_switch List_1_tE8032E48C661C350FF9550E9063D595C0AB25CD3 * ___compatibility_switch_23; public: inline static int32_t get_offset_of__mono_app_domain_1() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ____mono_app_domain_1)); } inline intptr_t get__mono_app_domain_1() const { return ____mono_app_domain_1; } inline intptr_t* get_address_of__mono_app_domain_1() { return &____mono_app_domain_1; } inline void set__mono_app_domain_1(intptr_t value) { ____mono_app_domain_1 = value; } inline static int32_t get_offset_of__evidence_6() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ____evidence_6)); } inline RuntimeObject * get__evidence_6() const { return ____evidence_6; } inline RuntimeObject ** get_address_of__evidence_6() { return &____evidence_6; } inline void set__evidence_6(RuntimeObject * value) { ____evidence_6 = value; Il2CppCodeGenWriteBarrier((&____evidence_6), value); } inline static int32_t get_offset_of__granted_7() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ____granted_7)); } inline RuntimeObject * get__granted_7() const { return ____granted_7; } inline RuntimeObject ** get_address_of__granted_7() { return &____granted_7; } inline void set__granted_7(RuntimeObject * value) { ____granted_7 = value; Il2CppCodeGenWriteBarrier((&____granted_7), value); } inline static int32_t get_offset_of__principalPolicy_8() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ____principalPolicy_8)); } inline int32_t get__principalPolicy_8() const { return ____principalPolicy_8; } inline int32_t* get_address_of__principalPolicy_8() { return &____principalPolicy_8; } inline void set__principalPolicy_8(int32_t value) { ____principalPolicy_8 = value; } inline static int32_t get_offset_of_AssemblyLoad_11() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___AssemblyLoad_11)); } inline AssemblyLoadEventHandler_t53F8340027F9EE67E8A22E7D8C1A3770345153C9 * get_AssemblyLoad_11() const { return ___AssemblyLoad_11; } inline AssemblyLoadEventHandler_t53F8340027F9EE67E8A22E7D8C1A3770345153C9 ** get_address_of_AssemblyLoad_11() { return &___AssemblyLoad_11; } inline void set_AssemblyLoad_11(AssemblyLoadEventHandler_t53F8340027F9EE67E8A22E7D8C1A3770345153C9 * value) { ___AssemblyLoad_11 = value; Il2CppCodeGenWriteBarrier((&___AssemblyLoad_11), value); } inline static int32_t get_offset_of_AssemblyResolve_12() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___AssemblyResolve_12)); } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * get_AssemblyResolve_12() const { return ___AssemblyResolve_12; } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 ** get_address_of_AssemblyResolve_12() { return &___AssemblyResolve_12; } inline void set_AssemblyResolve_12(ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * value) { ___AssemblyResolve_12 = value; Il2CppCodeGenWriteBarrier((&___AssemblyResolve_12), value); } inline static int32_t get_offset_of_DomainUnload_13() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___DomainUnload_13)); } inline EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C * get_DomainUnload_13() const { return ___DomainUnload_13; } inline EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C ** get_address_of_DomainUnload_13() { return &___DomainUnload_13; } inline void set_DomainUnload_13(EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C * value) { ___DomainUnload_13 = value; Il2CppCodeGenWriteBarrier((&___DomainUnload_13), value); } inline static int32_t get_offset_of_ProcessExit_14() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___ProcessExit_14)); } inline EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C * get_ProcessExit_14() const { return ___ProcessExit_14; } inline EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C ** get_address_of_ProcessExit_14() { return &___ProcessExit_14; } inline void set_ProcessExit_14(EventHandler_t2B84E745E28BA26C49C4E99A387FC3B534D1110C * value) { ___ProcessExit_14 = value; Il2CppCodeGenWriteBarrier((&___ProcessExit_14), value); } inline static int32_t get_offset_of_ResourceResolve_15() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___ResourceResolve_15)); } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * get_ResourceResolve_15() const { return ___ResourceResolve_15; } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 ** get_address_of_ResourceResolve_15() { return &___ResourceResolve_15; } inline void set_ResourceResolve_15(ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * value) { ___ResourceResolve_15 = value; Il2CppCodeGenWriteBarrier((&___ResourceResolve_15), value); } inline static int32_t get_offset_of_TypeResolve_16() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___TypeResolve_16)); } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * get_TypeResolve_16() const { return ___TypeResolve_16; } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 ** get_address_of_TypeResolve_16() { return &___TypeResolve_16; } inline void set_TypeResolve_16(ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * value) { ___TypeResolve_16 = value; Il2CppCodeGenWriteBarrier((&___TypeResolve_16), value); } inline static int32_t get_offset_of_UnhandledException_17() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___UnhandledException_17)); } inline UnhandledExceptionEventHandler_tB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE * get_UnhandledException_17() const { return ___UnhandledException_17; } inline UnhandledExceptionEventHandler_tB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE ** get_address_of_UnhandledException_17() { return &___UnhandledException_17; } inline void set_UnhandledException_17(UnhandledExceptionEventHandler_tB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE * value) { ___UnhandledException_17 = value; Il2CppCodeGenWriteBarrier((&___UnhandledException_17), value); } inline static int32_t get_offset_of_FirstChanceException_18() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___FirstChanceException_18)); } inline EventHandler_1_t1E35ED2E29145994C6C03E57601C6D48C61083FF * get_FirstChanceException_18() const { return ___FirstChanceException_18; } inline EventHandler_1_t1E35ED2E29145994C6C03E57601C6D48C61083FF ** get_address_of_FirstChanceException_18() { return &___FirstChanceException_18; } inline void set_FirstChanceException_18(EventHandler_1_t1E35ED2E29145994C6C03E57601C6D48C61083FF * value) { ___FirstChanceException_18 = value; Il2CppCodeGenWriteBarrier((&___FirstChanceException_18), value); } inline static int32_t get_offset_of__domain_manager_19() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ____domain_manager_19)); } inline RuntimeObject * get__domain_manager_19() const { return ____domain_manager_19; } inline RuntimeObject ** get_address_of__domain_manager_19() { return &____domain_manager_19; } inline void set__domain_manager_19(RuntimeObject * value) { ____domain_manager_19 = value; Il2CppCodeGenWriteBarrier((&____domain_manager_19), value); } inline static int32_t get_offset_of_ReflectionOnlyAssemblyResolve_20() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___ReflectionOnlyAssemblyResolve_20)); } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * get_ReflectionOnlyAssemblyResolve_20() const { return ___ReflectionOnlyAssemblyResolve_20; } inline ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 ** get_address_of_ReflectionOnlyAssemblyResolve_20() { return &___ReflectionOnlyAssemblyResolve_20; } inline void set_ReflectionOnlyAssemblyResolve_20(ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 * value) { ___ReflectionOnlyAssemblyResolve_20 = value; Il2CppCodeGenWriteBarrier((&___ReflectionOnlyAssemblyResolve_20), value); } inline static int32_t get_offset_of__activation_21() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ____activation_21)); } inline RuntimeObject * get__activation_21() const { return ____activation_21; } inline RuntimeObject ** get_address_of__activation_21() { return &____activation_21; } inline void set__activation_21(RuntimeObject * value) { ____activation_21 = value; Il2CppCodeGenWriteBarrier((&____activation_21), value); } inline static int32_t get_offset_of__applicationIdentity_22() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ____applicationIdentity_22)); } inline RuntimeObject * get__applicationIdentity_22() const { return ____applicationIdentity_22; } inline RuntimeObject ** get_address_of__applicationIdentity_22() { return &____applicationIdentity_22; } inline void set__applicationIdentity_22(RuntimeObject * value) { ____applicationIdentity_22 = value; Il2CppCodeGenWriteBarrier((&____applicationIdentity_22), value); } inline static int32_t get_offset_of_compatibility_switch_23() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8, ___compatibility_switch_23)); } inline List_1_tE8032E48C661C350FF9550E9063D595C0AB25CD3 * get_compatibility_switch_23() const { return ___compatibility_switch_23; } inline List_1_tE8032E48C661C350FF9550E9063D595C0AB25CD3 ** get_address_of_compatibility_switch_23() { return &___compatibility_switch_23; } inline void set_compatibility_switch_23(List_1_tE8032E48C661C350FF9550E9063D595C0AB25CD3 * value) { ___compatibility_switch_23 = value; Il2CppCodeGenWriteBarrier((&___compatibility_switch_23), value); } }; struct AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_StaticFields { public: // System.String System.AppDomain::_process_guid String_t* ____process_guid_2; // System.AppDomain System.AppDomain::default_domain AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8 * ___default_domain_10; public: inline static int32_t get_offset_of__process_guid_2() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_StaticFields, ____process_guid_2)); } inline String_t* get__process_guid_2() const { return ____process_guid_2; } inline String_t** get_address_of__process_guid_2() { return &____process_guid_2; } inline void set__process_guid_2(String_t* value) { ____process_guid_2 = value; Il2CppCodeGenWriteBarrier((&____process_guid_2), value); } inline static int32_t get_offset_of_default_domain_10() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_StaticFields, ___default_domain_10)); } inline AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8 * get_default_domain_10() const { return ___default_domain_10; } inline AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8 ** get_address_of_default_domain_10() { return &___default_domain_10; } inline void set_default_domain_10(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8 * value) { ___default_domain_10 = value; Il2CppCodeGenWriteBarrier((&___default_domain_10), value); } }; struct AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields { public: // System.Collections.Generic.Dictionary`2<System.String,System.Object> System.AppDomain::type_resolve_in_progress Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * ___type_resolve_in_progress_3; // System.Collections.Generic.Dictionary`2<System.String,System.Object> System.AppDomain::assembly_resolve_in_progress Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * ___assembly_resolve_in_progress_4; // System.Collections.Generic.Dictionary`2<System.String,System.Object> System.AppDomain::assembly_resolve_in_progress_refonly Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * ___assembly_resolve_in_progress_refonly_5; // System.Object System.AppDomain::_principal RuntimeObject * ____principal_9; public: inline static int32_t get_offset_of_type_resolve_in_progress_3() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields, ___type_resolve_in_progress_3)); } inline Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * get_type_resolve_in_progress_3() const { return ___type_resolve_in_progress_3; } inline Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA ** get_address_of_type_resolve_in_progress_3() { return &___type_resolve_in_progress_3; } inline void set_type_resolve_in_progress_3(Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * value) { ___type_resolve_in_progress_3 = value; Il2CppCodeGenWriteBarrier((&___type_resolve_in_progress_3), value); } inline static int32_t get_offset_of_assembly_resolve_in_progress_4() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields, ___assembly_resolve_in_progress_4)); } inline Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * get_assembly_resolve_in_progress_4() const { return ___assembly_resolve_in_progress_4; } inline Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA ** get_address_of_assembly_resolve_in_progress_4() { return &___assembly_resolve_in_progress_4; } inline void set_assembly_resolve_in_progress_4(Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * value) { ___assembly_resolve_in_progress_4 = value; Il2CppCodeGenWriteBarrier((&___assembly_resolve_in_progress_4), value); } inline static int32_t get_offset_of_assembly_resolve_in_progress_refonly_5() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields, ___assembly_resolve_in_progress_refonly_5)); } inline Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * get_assembly_resolve_in_progress_refonly_5() const { return ___assembly_resolve_in_progress_refonly_5; } inline Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA ** get_address_of_assembly_resolve_in_progress_refonly_5() { return &___assembly_resolve_in_progress_refonly_5; } inline void set_assembly_resolve_in_progress_refonly_5(Dictionary_2_t9140A71329927AE4FD0F3CF4D4D66668EBE151EA * value) { ___assembly_resolve_in_progress_refonly_5 = value; Il2CppCodeGenWriteBarrier((&___assembly_resolve_in_progress_refonly_5), value); } inline static int32_t get_offset_of__principal_9() { return static_cast<int32_t>(offsetof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields, ____principal_9)); } inline RuntimeObject * get__principal_9() const { return ____principal_9; } inline RuntimeObject ** get_address_of__principal_9() { return &____principal_9; } inline void set__principal_9(RuntimeObject * value) { ____principal_9 = value; Il2CppCodeGenWriteBarrier((&____principal_9), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.AppDomain struct AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_marshaled_pinvoke : public MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF_marshaled_pinvoke { intptr_t ____mono_app_domain_1; Il2CppIUnknown* ____evidence_6; Il2CppIUnknown* ____granted_7; int32_t ____principalPolicy_8; Il2CppMethodPointer ___AssemblyLoad_11; Il2CppMethodPointer ___AssemblyResolve_12; Il2CppMethodPointer ___DomainUnload_13; Il2CppMethodPointer ___ProcessExit_14; Il2CppMethodPointer ___ResourceResolve_15; Il2CppMethodPointer ___TypeResolve_16; Il2CppMethodPointer ___UnhandledException_17; Il2CppMethodPointer ___FirstChanceException_18; Il2CppIUnknown* ____domain_manager_19; Il2CppMethodPointer ___ReflectionOnlyAssemblyResolve_20; Il2CppIUnknown* ____activation_21; Il2CppIUnknown* ____applicationIdentity_22; List_1_tE8032E48C661C350FF9550E9063D595C0AB25CD3 * ___compatibility_switch_23; }; // Native definition for COM marshalling of System.AppDomain struct AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_marshaled_com : public MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF_marshaled_com { intptr_t ____mono_app_domain_1; Il2CppIUnknown* ____evidence_6; Il2CppIUnknown* ____granted_7; int32_t ____principalPolicy_8; Il2CppMethodPointer ___AssemblyLoad_11; Il2CppMethodPointer ___AssemblyResolve_12; Il2CppMethodPointer ___DomainUnload_13; Il2CppMethodPointer ___ProcessExit_14; Il2CppMethodPointer ___ResourceResolve_15; Il2CppMethodPointer ___TypeResolve_16; Il2CppMethodPointer ___UnhandledException_17; Il2CppMethodPointer ___FirstChanceException_18; Il2CppIUnknown* ____domain_manager_19; Il2CppMethodPointer ___ReflectionOnlyAssemblyResolve_20; Il2CppIUnknown* ____activation_21; Il2CppIUnknown* ____applicationIdentity_22; List_1_tE8032E48C661C350FF9550E9063D595C0AB25CD3 * ___compatibility_switch_23; }; #endif // APPDOMAIN_T1B59572328F60585904DF52A59FE47CF5B5FFFF8_H #ifndef ARGITERATOR_TCF0D2A1A1BD140821E37286E2D7AC6267479F855_H #define ARGITERATOR_TCF0D2A1A1BD140821E37286E2D7AC6267479F855_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ArgIterator struct ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855 { public: // System.IntPtr System.ArgIterator::sig intptr_t ___sig_0; // System.IntPtr System.ArgIterator::args intptr_t ___args_1; // System.Int32 System.ArgIterator::next_arg int32_t ___next_arg_2; // System.Int32 System.ArgIterator::num_args int32_t ___num_args_3; public: inline static int32_t get_offset_of_sig_0() { return static_cast<int32_t>(offsetof(ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855, ___sig_0)); } inline intptr_t get_sig_0() const { return ___sig_0; } inline intptr_t* get_address_of_sig_0() { return &___sig_0; } inline void set_sig_0(intptr_t value) { ___sig_0 = value; } inline static int32_t get_offset_of_args_1() { return static_cast<int32_t>(offsetof(ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855, ___args_1)); } inline intptr_t get_args_1() const { return ___args_1; } inline intptr_t* get_address_of_args_1() { return &___args_1; } inline void set_args_1(intptr_t value) { ___args_1 = value; } inline static int32_t get_offset_of_next_arg_2() { return static_cast<int32_t>(offsetof(ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855, ___next_arg_2)); } inline int32_t get_next_arg_2() const { return ___next_arg_2; } inline int32_t* get_address_of_next_arg_2() { return &___next_arg_2; } inline void set_next_arg_2(int32_t value) { ___next_arg_2 = value; } inline static int32_t get_offset_of_num_args_3() { return static_cast<int32_t>(offsetof(ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855, ___num_args_3)); } inline int32_t get_num_args_3() const { return ___num_args_3; } inline int32_t* get_address_of_num_args_3() { return &___num_args_3; } inline void set_num_args_3(int32_t value) { ___num_args_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ARGITERATOR_TCF0D2A1A1BD140821E37286E2D7AC6267479F855_H #ifndef BRECORD_TDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601_H #define BRECORD_TDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.BRECORD struct BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601 { public: // System.IntPtr System.BRECORD::pvRecord intptr_t ___pvRecord_0; // System.IntPtr System.BRECORD::pRecInfo intptr_t ___pRecInfo_1; public: inline static int32_t get_offset_of_pvRecord_0() { return static_cast<int32_t>(offsetof(BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601, ___pvRecord_0)); } inline intptr_t get_pvRecord_0() const { return ___pvRecord_0; } inline intptr_t* get_address_of_pvRecord_0() { return &___pvRecord_0; } inline void set_pvRecord_0(intptr_t value) { ___pvRecord_0 = value; } inline static int32_t get_offset_of_pRecInfo_1() { return static_cast<int32_t>(offsetof(BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601, ___pRecInfo_1)); } inline intptr_t get_pRecInfo_1() const { return ___pRecInfo_1; } inline intptr_t* get_address_of_pRecInfo_1() { return &___pRecInfo_1; } inline void set_pRecInfo_1(intptr_t value) { ___pRecInfo_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BRECORD_TDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601_H #ifndef BYTEENUM_T406C975039F6312CDE58A265A6ECFD861F8C06CD_H #define BYTEENUM_T406C975039F6312CDE58A265A6ECFD861F8C06CD_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ByteEnum struct ByteEnum_t406C975039F6312CDE58A265A6ECFD861F8C06CD { public: // System.Byte System.ByteEnum::value__ uint8_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ByteEnum_t406C975039F6312CDE58A265A6ECFD861F8C06CD, ___value___2)); } inline uint8_t get_value___2() const { return ___value___2; } inline uint8_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(uint8_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BYTEENUM_T406C975039F6312CDE58A265A6ECFD861F8C06CD_H #ifndef ASSEMBLYHASHALGORITHM_T31E4F1BC642CF668706C9D0FBD9DFDF5EE01CEB9_H #define ASSEMBLYHASHALGORITHM_T31E4F1BC642CF668706C9D0FBD9DFDF5EE01CEB9_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Configuration.Assemblies.AssemblyHashAlgorithm struct AssemblyHashAlgorithm_t31E4F1BC642CF668706C9D0FBD9DFDF5EE01CEB9 { public: // System.Int32 System.Configuration.Assemblies.AssemblyHashAlgorithm::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(AssemblyHashAlgorithm_t31E4F1BC642CF668706C9D0FBD9DFDF5EE01CEB9, ___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 // ASSEMBLYHASHALGORITHM_T31E4F1BC642CF668706C9D0FBD9DFDF5EE01CEB9_H #ifndef CONSOLECOLOR_T2E01225594844040BE12231E6A14F85FCB78C597_H #define CONSOLECOLOR_T2E01225594844040BE12231E6A14F85FCB78C597_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ConsoleColor struct ConsoleColor_t2E01225594844040BE12231E6A14F85FCB78C597 { public: // System.Int32 System.ConsoleColor::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ConsoleColor_t2E01225594844040BE12231E6A14F85FCB78C597, ___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 // CONSOLECOLOR_T2E01225594844040BE12231E6A14F85FCB78C597_H #ifndef CONSOLEKEY_T0196714F06D59B40580F7B85EA2663D81394682C_H #define CONSOLEKEY_T0196714F06D59B40580F7B85EA2663D81394682C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ConsoleKey struct ConsoleKey_t0196714F06D59B40580F7B85EA2663D81394682C { public: // System.Int32 System.ConsoleKey::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ConsoleKey_t0196714F06D59B40580F7B85EA2663D81394682C, ___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 // CONSOLEKEY_T0196714F06D59B40580F7B85EA2663D81394682C_H #ifndef CONSOLEMODIFIERS_TCB55098B71E4DCCEE972B1056E64D1B8AB9EAB34_H #define CONSOLEMODIFIERS_TCB55098B71E4DCCEE972B1056E64D1B8AB9EAB34_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ConsoleModifiers struct ConsoleModifiers_tCB55098B71E4DCCEE972B1056E64D1B8AB9EAB34 { public: // System.Int32 System.ConsoleModifiers::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ConsoleModifiers_tCB55098B71E4DCCEE972B1056E64D1B8AB9EAB34, ___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 // CONSOLEMODIFIERS_TCB55098B71E4DCCEE972B1056E64D1B8AB9EAB34_H #ifndef CONSOLESCREENBUFFERINFO_TA8045B7C44EF25956D3B0847F24465E9CF18954F_H #define CONSOLESCREENBUFFERINFO_TA8045B7C44EF25956D3B0847F24465E9CF18954F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ConsoleScreenBufferInfo struct ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F { public: // System.Coord System.ConsoleScreenBufferInfo::Size Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A ___Size_0; // System.Coord System.ConsoleScreenBufferInfo::CursorPosition Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A ___CursorPosition_1; // System.Int16 System.ConsoleScreenBufferInfo::Attribute int16_t ___Attribute_2; // System.SmallRect System.ConsoleScreenBufferInfo::Window SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532 ___Window_3; // System.Coord System.ConsoleScreenBufferInfo::MaxWindowSize Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A ___MaxWindowSize_4; public: inline static int32_t get_offset_of_Size_0() { return static_cast<int32_t>(offsetof(ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F, ___Size_0)); } inline Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A get_Size_0() const { return ___Size_0; } inline Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A * get_address_of_Size_0() { return &___Size_0; } inline void set_Size_0(Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A value) { ___Size_0 = value; } inline static int32_t get_offset_of_CursorPosition_1() { return static_cast<int32_t>(offsetof(ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F, ___CursorPosition_1)); } inline Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A get_CursorPosition_1() const { return ___CursorPosition_1; } inline Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A * get_address_of_CursorPosition_1() { return &___CursorPosition_1; } inline void set_CursorPosition_1(Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A value) { ___CursorPosition_1 = value; } inline static int32_t get_offset_of_Attribute_2() { return static_cast<int32_t>(offsetof(ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F, ___Attribute_2)); } inline int16_t get_Attribute_2() const { return ___Attribute_2; } inline int16_t* get_address_of_Attribute_2() { return &___Attribute_2; } inline void set_Attribute_2(int16_t value) { ___Attribute_2 = value; } inline static int32_t get_offset_of_Window_3() { return static_cast<int32_t>(offsetof(ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F, ___Window_3)); } inline SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532 get_Window_3() const { return ___Window_3; } inline SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532 * get_address_of_Window_3() { return &___Window_3; } inline void set_Window_3(SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532 value) { ___Window_3 = value; } inline static int32_t get_offset_of_MaxWindowSize_4() { return static_cast<int32_t>(offsetof(ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F, ___MaxWindowSize_4)); } inline Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A get_MaxWindowSize_4() const { return ___MaxWindowSize_4; } inline Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A * get_address_of_MaxWindowSize_4() { return &___MaxWindowSize_4; } inline void set_MaxWindowSize_4(Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A value) { ___MaxWindowSize_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CONSOLESCREENBUFFERINFO_TA8045B7C44EF25956D3B0847F24465E9CF18954F_H #ifndef DELEGATE_T_H #define DELEGATE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Delegate struct Delegate_t : public RuntimeObject { public: // System.IntPtr System.Delegate::method_ptr Il2CppMethodPointer ___method_ptr_0; // System.IntPtr System.Delegate::invoke_impl intptr_t ___invoke_impl_1; // System.Object System.Delegate::m_target RuntimeObject * ___m_target_2; // System.IntPtr System.Delegate::method intptr_t ___method_3; // System.IntPtr System.Delegate::delegate_trampoline intptr_t ___delegate_trampoline_4; // System.IntPtr System.Delegate::extra_arg intptr_t ___extra_arg_5; // System.IntPtr System.Delegate::method_code intptr_t ___method_code_6; // System.Reflection.MethodInfo System.Delegate::method_info MethodInfo_t * ___method_info_7; // System.Reflection.MethodInfo System.Delegate::original_method_info MethodInfo_t * ___original_method_info_8; // System.DelegateData System.Delegate::data DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; // System.Boolean System.Delegate::method_is_virtual bool ___method_is_virtual_10; public: inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_ptr_0)); } inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; } inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; } inline void set_method_ptr_0(Il2CppMethodPointer value) { ___method_ptr_0 = value; } inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t, ___invoke_impl_1)); } inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; } inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; } inline void set_invoke_impl_1(intptr_t value) { ___invoke_impl_1 = value; } inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t, ___m_target_2)); } inline RuntimeObject * get_m_target_2() const { return ___m_target_2; } inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; } inline void set_m_target_2(RuntimeObject * value) { ___m_target_2 = value; Il2CppCodeGenWriteBarrier((&___m_target_2), value); } inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_3)); } inline intptr_t get_method_3() const { return ___method_3; } inline intptr_t* get_address_of_method_3() { return &___method_3; } inline void set_method_3(intptr_t value) { ___method_3 = value; } inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t, ___delegate_trampoline_4)); } inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; } inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; } inline void set_delegate_trampoline_4(intptr_t value) { ___delegate_trampoline_4 = value; } inline static int32_t get_offset_of_extra_arg_5() { return static_cast<int32_t>(offsetof(Delegate_t, ___extra_arg_5)); } inline intptr_t get_extra_arg_5() const { return ___extra_arg_5; } inline intptr_t* get_address_of_extra_arg_5() { return &___extra_arg_5; } inline void set_extra_arg_5(intptr_t value) { ___extra_arg_5 = value; } inline static int32_t get_offset_of_method_code_6() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_code_6)); } inline intptr_t get_method_code_6() const { return ___method_code_6; } inline intptr_t* get_address_of_method_code_6() { return &___method_code_6; } inline void set_method_code_6(intptr_t value) { ___method_code_6 = value; } inline static int32_t get_offset_of_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_info_7)); } inline MethodInfo_t * get_method_info_7() const { return ___method_info_7; } inline MethodInfo_t ** get_address_of_method_info_7() { return &___method_info_7; } inline void set_method_info_7(MethodInfo_t * value) { ___method_info_7 = value; Il2CppCodeGenWriteBarrier((&___method_info_7), value); } inline static int32_t get_offset_of_original_method_info_8() { return static_cast<int32_t>(offsetof(Delegate_t, ___original_method_info_8)); } inline MethodInfo_t * get_original_method_info_8() const { return ___original_method_info_8; } inline MethodInfo_t ** get_address_of_original_method_info_8() { return &___original_method_info_8; } inline void set_original_method_info_8(MethodInfo_t * value) { ___original_method_info_8 = value; Il2CppCodeGenWriteBarrier((&___original_method_info_8), value); } inline static int32_t get_offset_of_data_9() { return static_cast<int32_t>(offsetof(Delegate_t, ___data_9)); } inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * get_data_9() const { return ___data_9; } inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE ** get_address_of_data_9() { return &___data_9; } inline void set_data_9(DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * value) { ___data_9 = value; Il2CppCodeGenWriteBarrier((&___data_9), value); } inline static int32_t get_offset_of_method_is_virtual_10() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_is_virtual_10)); } inline bool get_method_is_virtual_10() const { return ___method_is_virtual_10; } inline bool* get_address_of_method_is_virtual_10() { return &___method_is_virtual_10; } inline void set_method_is_virtual_10(bool value) { ___method_is_virtual_10 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Delegate struct Delegate_t_marshaled_pinvoke { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; int32_t ___method_is_virtual_10; }; // Native definition for COM marshalling of System.Delegate struct Delegate_t_marshaled_com { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; int32_t ___method_is_virtual_10; }; #endif // DELEGATE_T_H #ifndef SPECIALFOLDER_T5A2C2AE97BD6C2DF95061C8904B2225228AC9BA0_H #define SPECIALFOLDER_T5A2C2AE97BD6C2DF95061C8904B2225228AC9BA0_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Environment_SpecialFolder struct SpecialFolder_t5A2C2AE97BD6C2DF95061C8904B2225228AC9BA0 { public: // System.Int32 System.Environment_SpecialFolder::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(SpecialFolder_t5A2C2AE97BD6C2DF95061C8904B2225228AC9BA0, ___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 // SPECIALFOLDER_T5A2C2AE97BD6C2DF95061C8904B2225228AC9BA0_H #ifndef SPECIALFOLDEROPTION_TAF2DB60F447738C1E46C3D5660A0CBB0F4480470_H #define SPECIALFOLDEROPTION_TAF2DB60F447738C1E46C3D5660A0CBB0F4480470_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Environment_SpecialFolderOption struct SpecialFolderOption_tAF2DB60F447738C1E46C3D5660A0CBB0F4480470 { public: // System.Int32 System.Environment_SpecialFolderOption::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(SpecialFolderOption_tAF2DB60F447738C1E46C3D5660A0CBB0F4480470, ___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 // SPECIALFOLDEROPTION_TAF2DB60F447738C1E46C3D5660A0CBB0F4480470_H #ifndef HANDLES_TC13FB0F0810977450CE811097C1B15BCF5E4CAD7_H #define HANDLES_TC13FB0F0810977450CE811097C1B15BCF5E4CAD7_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Handles struct Handles_tC13FB0F0810977450CE811097C1B15BCF5E4CAD7 { public: // System.Int32 System.Handles::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Handles_tC13FB0F0810977450CE811097C1B15BCF5E4CAD7, ___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 // HANDLES_TC13FB0F0810977450CE811097C1B15BCF5E4CAD7_H #ifndef INT16ENUM_TF03C0C5772A892EB552607A1C0DEF122A930BE80_H #define INT16ENUM_TF03C0C5772A892EB552607A1C0DEF122A930BE80_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int16Enum struct Int16Enum_tF03C0C5772A892EB552607A1C0DEF122A930BE80 { public: // System.Int16 System.Int16Enum::value__ int16_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Int16Enum_tF03C0C5772A892EB552607A1C0DEF122A930BE80, ___value___2)); } inline int16_t get_value___2() const { return ___value___2; } inline int16_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int16_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INT16ENUM_TF03C0C5772A892EB552607A1C0DEF122A930BE80_H #ifndef INT32ENUM_T6312CE4586C17FE2E2E513D2E7655B574F10FDCD_H #define INT32ENUM_T6312CE4586C17FE2E2E513D2E7655B574F10FDCD_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int32Enum struct Int32Enum_t6312CE4586C17FE2E2E513D2E7655B574F10FDCD { public: // System.Int32 System.Int32Enum::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Int32Enum_t6312CE4586C17FE2E2E513D2E7655B574F10FDCD, ___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 // INT32ENUM_T6312CE4586C17FE2E2E513D2E7655B574F10FDCD_H #ifndef INT64ENUM_T7DD4BDEADB660E726D94B249B352C2E2ABC1E580_H #define INT64ENUM_T7DD4BDEADB660E726D94B249B352C2E2ABC1E580_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int64Enum struct Int64Enum_t7DD4BDEADB660E726D94B249B352C2E2ABC1E580 { public: // System.Int64 System.Int64Enum::value__ int64_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(Int64Enum_t7DD4BDEADB660E726D94B249B352C2E2ABC1E580, ___value___2)); } inline int64_t get_value___2() const { return ___value___2; } inline int64_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int64_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INT64ENUM_T7DD4BDEADB660E726D94B249B352C2E2ABC1E580_H #ifndef MONOASYNCCALL_T5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD_H #define MONOASYNCCALL_T5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MonoAsyncCall struct MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD : public RuntimeObject { public: // System.Object System.MonoAsyncCall::msg RuntimeObject * ___msg_0; // System.IntPtr System.MonoAsyncCall::cb_method intptr_t ___cb_method_1; // System.Object System.MonoAsyncCall::cb_target RuntimeObject * ___cb_target_2; // System.Object System.MonoAsyncCall::state RuntimeObject * ___state_3; // System.Object System.MonoAsyncCall::res RuntimeObject * ___res_4; // System.Object System.MonoAsyncCall::out_args RuntimeObject * ___out_args_5; public: inline static int32_t get_offset_of_msg_0() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD, ___msg_0)); } inline RuntimeObject * get_msg_0() const { return ___msg_0; } inline RuntimeObject ** get_address_of_msg_0() { return &___msg_0; } inline void set_msg_0(RuntimeObject * value) { ___msg_0 = value; Il2CppCodeGenWriteBarrier((&___msg_0), value); } inline static int32_t get_offset_of_cb_method_1() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD, ___cb_method_1)); } inline intptr_t get_cb_method_1() const { return ___cb_method_1; } inline intptr_t* get_address_of_cb_method_1() { return &___cb_method_1; } inline void set_cb_method_1(intptr_t value) { ___cb_method_1 = value; } inline static int32_t get_offset_of_cb_target_2() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD, ___cb_target_2)); } inline RuntimeObject * get_cb_target_2() const { return ___cb_target_2; } inline RuntimeObject ** get_address_of_cb_target_2() { return &___cb_target_2; } inline void set_cb_target_2(RuntimeObject * value) { ___cb_target_2 = value; Il2CppCodeGenWriteBarrier((&___cb_target_2), value); } inline static int32_t get_offset_of_state_3() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD, ___state_3)); } inline RuntimeObject * get_state_3() const { return ___state_3; } inline RuntimeObject ** get_address_of_state_3() { return &___state_3; } inline void set_state_3(RuntimeObject * value) { ___state_3 = value; Il2CppCodeGenWriteBarrier((&___state_3), value); } inline static int32_t get_offset_of_res_4() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD, ___res_4)); } inline RuntimeObject * get_res_4() const { return ___res_4; } inline RuntimeObject ** get_address_of_res_4() { return &___res_4; } inline void set_res_4(RuntimeObject * value) { ___res_4 = value; Il2CppCodeGenWriteBarrier((&___res_4), value); } inline static int32_t get_offset_of_out_args_5() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD, ___out_args_5)); } inline RuntimeObject * get_out_args_5() const { return ___out_args_5; } inline RuntimeObject ** get_address_of_out_args_5() { return &___out_args_5; } inline void set_out_args_5(RuntimeObject * value) { ___out_args_5 = value; Il2CppCodeGenWriteBarrier((&___out_args_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.MonoAsyncCall struct MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD_marshaled_pinvoke { Il2CppIUnknown* ___msg_0; intptr_t ___cb_method_1; Il2CppIUnknown* ___cb_target_2; Il2CppIUnknown* ___state_3; Il2CppIUnknown* ___res_4; Il2CppIUnknown* ___out_args_5; }; // Native definition for COM marshalling of System.MonoAsyncCall struct MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD_marshaled_com { Il2CppIUnknown* ___msg_0; intptr_t ___cb_method_1; Il2CppIUnknown* ___cb_target_2; Il2CppIUnknown* ___state_3; Il2CppIUnknown* ___res_4; Il2CppIUnknown* ___out_args_5; }; #endif // MONOASYNCCALL_T5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD_H #ifndef PLATFORMID_T7969561D329B66D3E609C70CA506A519E06F2776_H #define PLATFORMID_T7969561D329B66D3E609C70CA506A519E06F2776_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.PlatformID struct PlatformID_t7969561D329B66D3E609C70CA506A519E06F2776 { public: // System.Int32 System.PlatformID::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(PlatformID_t7969561D329B66D3E609C70CA506A519E06F2776, ___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 // PLATFORMID_T7969561D329B66D3E609C70CA506A519E06F2776_H #ifndef BINDINGFLAGS_TE35C91D046E63A1B92BB9AB909FCF9DA84379ED0_H #define BINDINGFLAGS_TE35C91D046E63A1B92BB9AB909FCF9DA84379ED0_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Reflection.BindingFlags struct BindingFlags_tE35C91D046E63A1B92BB9AB909FCF9DA84379ED0 { public: // System.Int32 System.Reflection.BindingFlags::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(BindingFlags_tE35C91D046E63A1B92BB9AB909FCF9DA84379ED0, ___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 // BINDINGFLAGS_TE35C91D046E63A1B92BB9AB909FCF9DA84379ED0_H #ifndef RUNTIMEARGUMENTHANDLE_T6118B2666F632AA0A554B476D9A447ACDBF08C46_H #define RUNTIMEARGUMENTHANDLE_T6118B2666F632AA0A554B476D9A447ACDBF08C46_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.RuntimeArgumentHandle struct RuntimeArgumentHandle_t6118B2666F632AA0A554B476D9A447ACDBF08C46 { public: // System.IntPtr System.RuntimeArgumentHandle::args intptr_t ___args_0; public: inline static int32_t get_offset_of_args_0() { return static_cast<int32_t>(offsetof(RuntimeArgumentHandle_t6118B2666F632AA0A554B476D9A447ACDBF08C46, ___args_0)); } inline intptr_t get_args_0() const { return ___args_0; } inline intptr_t* get_address_of_args_0() { return &___args_0; } inline void set_args_0(intptr_t value) { ___args_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEARGUMENTHANDLE_T6118B2666F632AA0A554B476D9A447ACDBF08C46_H #ifndef RUNTIMEFIELDHANDLE_T844BDF00E8E6FE69D9AEAA7657F09018B864F4EF_H #define RUNTIMEFIELDHANDLE_T844BDF00E8E6FE69D9AEAA7657F09018B864F4EF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.RuntimeFieldHandle struct RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF { public: // System.IntPtr System.RuntimeFieldHandle::value intptr_t ___value_0; public: inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF, ___value_0)); } inline intptr_t get_value_0() const { return ___value_0; } inline intptr_t* get_address_of_value_0() { return &___value_0; } inline void set_value_0(intptr_t value) { ___value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEFIELDHANDLE_T844BDF00E8E6FE69D9AEAA7657F09018B864F4EF_H #ifndef RUNTIMEMETHODHANDLE_T85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F_H #define RUNTIMEMETHODHANDLE_T85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.RuntimeMethodHandle struct RuntimeMethodHandle_t85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F { public: // System.IntPtr System.RuntimeMethodHandle::value intptr_t ___value_0; public: inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeMethodHandle_t85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F, ___value_0)); } inline intptr_t get_value_0() const { return ___value_0; } inline intptr_t* get_address_of_value_0() { return &___value_0; } inline void set_value_0(intptr_t value) { ___value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEMETHODHANDLE_T85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F_H #ifndef RUNTIMETYPEHANDLE_T7B542280A22F0EC4EAC2061C29178845847A8B2D_H #define RUNTIMETYPEHANDLE_T7B542280A22F0EC4EAC2061C29178845847A8B2D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.RuntimeTypeHandle struct RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D { public: // System.IntPtr System.RuntimeTypeHandle::value intptr_t ___value_0; public: inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D, ___value_0)); } inline intptr_t get_value_0() const { return ___value_0; } inline intptr_t* get_address_of_value_0() { return &___value_0; } inline void set_value_0(intptr_t value) { ___value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMETYPEHANDLE_T7B542280A22F0EC4EAC2061C29178845847A8B2D_H #ifndef SBYTEENUM_T0EC157A9E311E27D76141202576E15FA4E83E0EE_H #define SBYTEENUM_T0EC157A9E311E27D76141202576E15FA4E83E0EE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.SByteEnum struct SByteEnum_t0EC157A9E311E27D76141202576E15FA4E83E0EE { public: // System.SByte System.SByteEnum::value__ int8_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(SByteEnum_t0EC157A9E311E27D76141202576E15FA4E83E0EE, ___value___2)); } inline int8_t get_value___2() const { return ___value___2; } inline int8_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int8_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SBYTEENUM_T0EC157A9E311E27D76141202576E15FA4E83E0EE_H #ifndef STRINGCOMPARISON_T02BAA95468CE9E91115C604577611FDF58FEDCF0_H #define STRINGCOMPARISON_T02BAA95468CE9E91115C604577611FDF58FEDCF0_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.StringComparison struct StringComparison_t02BAA95468CE9E91115C604577611FDF58FEDCF0 { public: // System.Int32 System.StringComparison::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(StringComparison_t02BAA95468CE9E91115C604577611FDF58FEDCF0, ___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 // STRINGCOMPARISON_T02BAA95468CE9E91115C604577611FDF58FEDCF0_H #ifndef TERMINFONUMBERS_TE17C1E4A28232B0A786FAB261BD41BA350DF230B_H #define TERMINFONUMBERS_TE17C1E4A28232B0A786FAB261BD41BA350DF230B_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TermInfoNumbers struct TermInfoNumbers_tE17C1E4A28232B0A786FAB261BD41BA350DF230B { public: // System.Int32 System.TermInfoNumbers::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(TermInfoNumbers_tE17C1E4A28232B0A786FAB261BD41BA350DF230B, ___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 // TERMINFONUMBERS_TE17C1E4A28232B0A786FAB261BD41BA350DF230B_H #ifndef TERMINFOSTRINGS_TA50FD6AB2B4EFB66E90CD563942E0A664FD6022F_H #define TERMINFOSTRINGS_TA50FD6AB2B4EFB66E90CD563942E0A664FD6022F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TermInfoStrings struct TermInfoStrings_tA50FD6AB2B4EFB66E90CD563942E0A664FD6022F { public: // System.Int32 System.TermInfoStrings::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(TermInfoStrings_tA50FD6AB2B4EFB66E90CD563942E0A664FD6022F, ___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 // TERMINFOSTRINGS_TA50FD6AB2B4EFB66E90CD563942E0A664FD6022F_H #ifndef TYPECODE_T03ED52F888000DAF40C550C434F29F39A23D61C6_H #define TYPECODE_T03ED52F888000DAF40C550C434F29F39A23D61C6_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeCode struct TypeCode_t03ED52F888000DAF40C550C434F29F39A23D61C6 { public: // System.Int32 System.TypeCode::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(TypeCode_t03ED52F888000DAF40C550C434F29F39A23D61C6, ___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 // TYPECODE_T03ED52F888000DAF40C550C434F29F39A23D61C6_H #ifndef DISPLAYNAMEFORMAT_TFEA54E2FCA44D62D61CCCE98E4F02DE2D186DF47_H #define DISPLAYNAMEFORMAT_TFEA54E2FCA44D62D61CCCE98E4F02DE2D186DF47_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TypeSpec_DisplayNameFormat struct DisplayNameFormat_tFEA54E2FCA44D62D61CCCE98E4F02DE2D186DF47 { public: // System.Int32 System.TypeSpec_DisplayNameFormat::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(DisplayNameFormat_tFEA54E2FCA44D62D61CCCE98E4F02DE2D186DF47, ___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 // DISPLAYNAMEFORMAT_TFEA54E2FCA44D62D61CCCE98E4F02DE2D186DF47_H #ifndef UINT16ENUM_TB3380938EFBC6B524E2C8143A7982637F0EA4456_H #define UINT16ENUM_TB3380938EFBC6B524E2C8143A7982637F0EA4456_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UInt16Enum struct UInt16Enum_tB3380938EFBC6B524E2C8143A7982637F0EA4456 { public: // System.UInt16 System.UInt16Enum::value__ uint16_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UInt16Enum_tB3380938EFBC6B524E2C8143A7982637F0EA4456, ___value___2)); } inline uint16_t get_value___2() const { return ___value___2; } inline uint16_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(uint16_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UINT16ENUM_TB3380938EFBC6B524E2C8143A7982637F0EA4456_H #ifndef UINT32ENUM_TE44175EB3151A633676D60A642EDA3BD5C6760DA_H #define UINT32ENUM_TE44175EB3151A633676D60A642EDA3BD5C6760DA_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UInt32Enum struct UInt32Enum_tE44175EB3151A633676D60A642EDA3BD5C6760DA { public: // System.UInt32 System.UInt32Enum::value__ uint32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UInt32Enum_tE44175EB3151A633676D60A642EDA3BD5C6760DA, ___value___2)); } inline uint32_t get_value___2() const { return ___value___2; } inline uint32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(uint32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UINT32ENUM_TE44175EB3151A633676D60A642EDA3BD5C6760DA_H #ifndef UINT64ENUM_TEAD217F175F60689A664303784384DEF759D24C8_H #define UINT64ENUM_TEAD217F175F60689A664303784384DEF759D24C8_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UInt64Enum struct UInt64Enum_tEAD217F175F60689A664303784384DEF759D24C8 { public: // System.UInt64 System.UInt64Enum::value__ uint64_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(UInt64Enum_tEAD217F175F60689A664303784384DEF759D24C8, ___value___2)); } inline uint64_t get_value___2() const { return ___value___2; } inline uint64_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(uint64_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UINT64ENUM_TEAD217F175F60689A664303784384DEF759D24C8_H #ifndef PARSEFAILUREKIND_T0E37E87ACF3E01D5D2846A114AE9247C2C7DC3E8_H #define PARSEFAILUREKIND_T0E37E87ACF3E01D5D2846A114AE9247C2C7DC3E8_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Version_ParseFailureKind struct ParseFailureKind_t0E37E87ACF3E01D5D2846A114AE9247C2C7DC3E8 { public: // System.Int32 System.Version_ParseFailureKind::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ParseFailureKind_t0E37E87ACF3E01D5D2846A114AE9247C2C7DC3E8, ___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 // PARSEFAILUREKIND_T0E37E87ACF3E01D5D2846A114AE9247C2C7DC3E8_H #ifndef WEAKREFERENCE_T0495CC81CD6403E662B7700B802443F6F730E39D_H #define WEAKREFERENCE_T0495CC81CD6403E662B7700B802443F6F730E39D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.WeakReference struct WeakReference_t0495CC81CD6403E662B7700B802443F6F730E39D : public RuntimeObject { public: // System.Boolean System.WeakReference::isLongReference bool ___isLongReference_0; // System.Runtime.InteropServices.GCHandle System.WeakReference::gcHandle GCHandle_t39FAEE3EA592432C93B574A31DD83B87F1847DE3 ___gcHandle_1; public: inline static int32_t get_offset_of_isLongReference_0() { return static_cast<int32_t>(offsetof(WeakReference_t0495CC81CD6403E662B7700B802443F6F730E39D, ___isLongReference_0)); } inline bool get_isLongReference_0() const { return ___isLongReference_0; } inline bool* get_address_of_isLongReference_0() { return &___isLongReference_0; } inline void set_isLongReference_0(bool value) { ___isLongReference_0 = value; } inline static int32_t get_offset_of_gcHandle_1() { return static_cast<int32_t>(offsetof(WeakReference_t0495CC81CD6403E662B7700B802443F6F730E39D, ___gcHandle_1)); } inline GCHandle_t39FAEE3EA592432C93B574A31DD83B87F1847DE3 get_gcHandle_1() const { return ___gcHandle_1; } inline GCHandle_t39FAEE3EA592432C93B574A31DD83B87F1847DE3 * get_address_of_gcHandle_1() { return &___gcHandle_1; } inline void set_gcHandle_1(GCHandle_t39FAEE3EA592432C93B574A31DD83B87F1847DE3 value) { ___gcHandle_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // WEAKREFERENCE_T0495CC81CD6403E662B7700B802443F6F730E39D_H #ifndef WINDOWSCONSOLEDRIVER_T953AB92956013BD3ED7E260FEC4944E603008B42_H #define WINDOWSCONSOLEDRIVER_T953AB92956013BD3ED7E260FEC4944E603008B42_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.WindowsConsoleDriver struct WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42 : public RuntimeObject { public: // System.IntPtr System.WindowsConsoleDriver::inputHandle intptr_t ___inputHandle_0; // System.IntPtr System.WindowsConsoleDriver::outputHandle intptr_t ___outputHandle_1; // System.Int16 System.WindowsConsoleDriver::defaultAttribute int16_t ___defaultAttribute_2; public: inline static int32_t get_offset_of_inputHandle_0() { return static_cast<int32_t>(offsetof(WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42, ___inputHandle_0)); } inline intptr_t get_inputHandle_0() const { return ___inputHandle_0; } inline intptr_t* get_address_of_inputHandle_0() { return &___inputHandle_0; } inline void set_inputHandle_0(intptr_t value) { ___inputHandle_0 = value; } inline static int32_t get_offset_of_outputHandle_1() { return static_cast<int32_t>(offsetof(WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42, ___outputHandle_1)); } inline intptr_t get_outputHandle_1() const { return ___outputHandle_1; } inline intptr_t* get_address_of_outputHandle_1() { return &___outputHandle_1; } inline void set_outputHandle_1(intptr_t value) { ___outputHandle_1 = value; } inline static int32_t get_offset_of_defaultAttribute_2() { return static_cast<int32_t>(offsetof(WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42, ___defaultAttribute_2)); } inline int16_t get_defaultAttribute_2() const { return ___defaultAttribute_2; } inline int16_t* get_address_of_defaultAttribute_2() { return &___defaultAttribute_2; } inline void set_defaultAttribute_2(int16_t value) { ___defaultAttribute_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // WINDOWSCONSOLEDRIVER_T953AB92956013BD3ED7E260FEC4944E603008B42_H #ifndef CONSOLEKEYINFO_T5BE3CE05E8258CDB5404256E96AF7C22BC5DE768_H #define CONSOLEKEYINFO_T5BE3CE05E8258CDB5404256E96AF7C22BC5DE768_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ConsoleKeyInfo struct ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768 { public: // System.Char System.ConsoleKeyInfo::_keyChar Il2CppChar ____keyChar_0; // System.ConsoleKey System.ConsoleKeyInfo::_key int32_t ____key_1; // System.ConsoleModifiers System.ConsoleKeyInfo::_mods int32_t ____mods_2; public: inline static int32_t get_offset_of__keyChar_0() { return static_cast<int32_t>(offsetof(ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768, ____keyChar_0)); } inline Il2CppChar get__keyChar_0() const { return ____keyChar_0; } inline Il2CppChar* get_address_of__keyChar_0() { return &____keyChar_0; } inline void set__keyChar_0(Il2CppChar value) { ____keyChar_0 = value; } inline static int32_t get_offset_of__key_1() { return static_cast<int32_t>(offsetof(ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768, ____key_1)); } inline int32_t get__key_1() const { return ____key_1; } inline int32_t* get_address_of__key_1() { return &____key_1; } inline void set__key_1(int32_t value) { ____key_1 = value; } inline static int32_t get_offset_of__mods_2() { return static_cast<int32_t>(offsetof(ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768, ____mods_2)); } inline int32_t get__mods_2() const { return ____mods_2; } inline int32_t* get_address_of__mods_2() { return &____mods_2; } inline void set__mods_2(int32_t value) { ____mods_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.ConsoleKeyInfo struct ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768_marshaled_pinvoke { uint8_t ____keyChar_0; int32_t ____key_1; int32_t ____mods_2; }; // Native definition for COM marshalling of System.ConsoleKeyInfo struct ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768_marshaled_com { uint8_t ____keyChar_0; int32_t ____key_1; int32_t ____mods_2; }; #endif // CONSOLEKEYINFO_T5BE3CE05E8258CDB5404256E96AF7C22BC5DE768_H #ifndef MULTICASTDELEGATE_T_H #define MULTICASTDELEGATE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MulticastDelegate struct MulticastDelegate_t : public Delegate_t { public: // System.Delegate[] System.MulticastDelegate::delegates DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* ___delegates_11; public: inline static int32_t get_offset_of_delegates_11() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___delegates_11)); } inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* get_delegates_11() const { return ___delegates_11; } inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86** get_address_of_delegates_11() { return &___delegates_11; } inline void set_delegates_11(DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* value) { ___delegates_11 = value; Il2CppCodeGenWriteBarrier((&___delegates_11), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_pinvoke : public Delegate_t_marshaled_pinvoke { Delegate_t_marshaled_pinvoke** ___delegates_11; }; // Native definition for COM marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_com : public Delegate_t_marshaled_com { Delegate_t_marshaled_com** ___delegates_11; }; #endif // MULTICASTDELEGATE_T_H #ifndef OPERATINGSYSTEM_TBB05846D5AA6960FFEB42C59E5FE359255C2BE83_H #define OPERATINGSYSTEM_TBB05846D5AA6960FFEB42C59E5FE359255C2BE83_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.OperatingSystem struct OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83 : public RuntimeObject { public: // System.PlatformID System.OperatingSystem::_platform int32_t ____platform_0; // System.Version System.OperatingSystem::_version Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * ____version_1; // System.String System.OperatingSystem::_servicePack String_t* ____servicePack_2; public: inline static int32_t get_offset_of__platform_0() { return static_cast<int32_t>(offsetof(OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83, ____platform_0)); } inline int32_t get__platform_0() const { return ____platform_0; } inline int32_t* get_address_of__platform_0() { return &____platform_0; } inline void set__platform_0(int32_t value) { ____platform_0 = value; } inline static int32_t get_offset_of__version_1() { return static_cast<int32_t>(offsetof(OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83, ____version_1)); } inline Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * get__version_1() const { return ____version_1; } inline Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD ** get_address_of__version_1() { return &____version_1; } inline void set__version_1(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * value) { ____version_1 = value; Il2CppCodeGenWriteBarrier((&____version_1), value); } inline static int32_t get_offset_of__servicePack_2() { return static_cast<int32_t>(offsetof(OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83, ____servicePack_2)); } inline String_t* get__servicePack_2() const { return ____servicePack_2; } inline String_t** get_address_of__servicePack_2() { return &____servicePack_2; } inline void set__servicePack_2(String_t* value) { ____servicePack_2 = value; Il2CppCodeGenWriteBarrier((&____servicePack_2), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // OPERATINGSYSTEM_TBB05846D5AA6960FFEB42C59E5FE359255C2BE83_H #ifndef TERMINFODRIVER_T9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_H #define TERMINFODRIVER_T9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.TermInfoDriver struct TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653 : public RuntimeObject { public: // System.TermInfoReader System.TermInfoDriver::reader TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C * ___reader_3; // System.Int32 System.TermInfoDriver::cursorLeft int32_t ___cursorLeft_4; // System.Int32 System.TermInfoDriver::cursorTop int32_t ___cursorTop_5; // System.String System.TermInfoDriver::title String_t* ___title_6; // System.String System.TermInfoDriver::titleFormat String_t* ___titleFormat_7; // System.Boolean System.TermInfoDriver::cursorVisible bool ___cursorVisible_8; // System.String System.TermInfoDriver::csrVisible String_t* ___csrVisible_9; // System.String System.TermInfoDriver::csrInvisible String_t* ___csrInvisible_10; // System.String System.TermInfoDriver::clear String_t* ___clear_11; // System.String System.TermInfoDriver::bell String_t* ___bell_12; // System.String System.TermInfoDriver::term String_t* ___term_13; // System.IO.StreamReader System.TermInfoDriver::stdin StreamReader_t62E68063760DCD2FC036AE132DE69C24B7ED001E * ___stdin_14; // System.IO.CStreamWriter System.TermInfoDriver::stdout CStreamWriter_t6B662CA496662AF63D81722DCA99094893C80450 * ___stdout_15; // System.Int32 System.TermInfoDriver::windowWidth int32_t ___windowWidth_16; // System.Int32 System.TermInfoDriver::windowHeight int32_t ___windowHeight_17; // System.Int32 System.TermInfoDriver::bufferHeight int32_t ___bufferHeight_18; // System.Int32 System.TermInfoDriver::bufferWidth int32_t ___bufferWidth_19; // System.Char[] System.TermInfoDriver::buffer CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___buffer_20; // System.Int32 System.TermInfoDriver::readpos int32_t ___readpos_21; // System.Int32 System.TermInfoDriver::writepos int32_t ___writepos_22; // System.String System.TermInfoDriver::keypadXmit String_t* ___keypadXmit_23; // System.String System.TermInfoDriver::keypadLocal String_t* ___keypadLocal_24; // System.Boolean System.TermInfoDriver::inited bool ___inited_25; // System.Object System.TermInfoDriver::initLock RuntimeObject * ___initLock_26; // System.Boolean System.TermInfoDriver::initKeys bool ___initKeys_27; // System.String System.TermInfoDriver::origPair String_t* ___origPair_28; // System.String System.TermInfoDriver::origColors String_t* ___origColors_29; // System.String System.TermInfoDriver::cursorAddress String_t* ___cursorAddress_30; // System.ConsoleColor System.TermInfoDriver::fgcolor int32_t ___fgcolor_31; // System.String System.TermInfoDriver::setfgcolor String_t* ___setfgcolor_32; // System.String System.TermInfoDriver::setbgcolor String_t* ___setbgcolor_33; // System.Int32 System.TermInfoDriver::maxColors int32_t ___maxColors_34; // System.Boolean System.TermInfoDriver::noGetPosition bool ___noGetPosition_35; // System.Collections.Hashtable System.TermInfoDriver::keymap Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * ___keymap_36; // System.ByteMatcher System.TermInfoDriver::rootmap ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC * ___rootmap_37; // System.Int32 System.TermInfoDriver::rl_startx int32_t ___rl_startx_38; // System.Int32 System.TermInfoDriver::rl_starty int32_t ___rl_starty_39; // System.Byte[] System.TermInfoDriver::control_characters ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* ___control_characters_40; // System.Char[] System.TermInfoDriver::echobuf CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___echobuf_42; // System.Int32 System.TermInfoDriver::echon int32_t ___echon_43; public: inline static int32_t get_offset_of_reader_3() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___reader_3)); } inline TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C * get_reader_3() const { return ___reader_3; } inline TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C ** get_address_of_reader_3() { return &___reader_3; } inline void set_reader_3(TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C * value) { ___reader_3 = value; Il2CppCodeGenWriteBarrier((&___reader_3), value); } inline static int32_t get_offset_of_cursorLeft_4() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___cursorLeft_4)); } inline int32_t get_cursorLeft_4() const { return ___cursorLeft_4; } inline int32_t* get_address_of_cursorLeft_4() { return &___cursorLeft_4; } inline void set_cursorLeft_4(int32_t value) { ___cursorLeft_4 = value; } inline static int32_t get_offset_of_cursorTop_5() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___cursorTop_5)); } inline int32_t get_cursorTop_5() const { return ___cursorTop_5; } inline int32_t* get_address_of_cursorTop_5() { return &___cursorTop_5; } inline void set_cursorTop_5(int32_t value) { ___cursorTop_5 = value; } inline static int32_t get_offset_of_title_6() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___title_6)); } inline String_t* get_title_6() const { return ___title_6; } inline String_t** get_address_of_title_6() { return &___title_6; } inline void set_title_6(String_t* value) { ___title_6 = value; Il2CppCodeGenWriteBarrier((&___title_6), value); } inline static int32_t get_offset_of_titleFormat_7() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___titleFormat_7)); } inline String_t* get_titleFormat_7() const { return ___titleFormat_7; } inline String_t** get_address_of_titleFormat_7() { return &___titleFormat_7; } inline void set_titleFormat_7(String_t* value) { ___titleFormat_7 = value; Il2CppCodeGenWriteBarrier((&___titleFormat_7), value); } inline static int32_t get_offset_of_cursorVisible_8() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___cursorVisible_8)); } inline bool get_cursorVisible_8() const { return ___cursorVisible_8; } inline bool* get_address_of_cursorVisible_8() { return &___cursorVisible_8; } inline void set_cursorVisible_8(bool value) { ___cursorVisible_8 = value; } inline static int32_t get_offset_of_csrVisible_9() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___csrVisible_9)); } inline String_t* get_csrVisible_9() const { return ___csrVisible_9; } inline String_t** get_address_of_csrVisible_9() { return &___csrVisible_9; } inline void set_csrVisible_9(String_t* value) { ___csrVisible_9 = value; Il2CppCodeGenWriteBarrier((&___csrVisible_9), value); } inline static int32_t get_offset_of_csrInvisible_10() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___csrInvisible_10)); } inline String_t* get_csrInvisible_10() const { return ___csrInvisible_10; } inline String_t** get_address_of_csrInvisible_10() { return &___csrInvisible_10; } inline void set_csrInvisible_10(String_t* value) { ___csrInvisible_10 = value; Il2CppCodeGenWriteBarrier((&___csrInvisible_10), value); } inline static int32_t get_offset_of_clear_11() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___clear_11)); } inline String_t* get_clear_11() const { return ___clear_11; } inline String_t** get_address_of_clear_11() { return &___clear_11; } inline void set_clear_11(String_t* value) { ___clear_11 = value; Il2CppCodeGenWriteBarrier((&___clear_11), value); } inline static int32_t get_offset_of_bell_12() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___bell_12)); } inline String_t* get_bell_12() const { return ___bell_12; } inline String_t** get_address_of_bell_12() { return &___bell_12; } inline void set_bell_12(String_t* value) { ___bell_12 = value; Il2CppCodeGenWriteBarrier((&___bell_12), value); } inline static int32_t get_offset_of_term_13() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___term_13)); } inline String_t* get_term_13() const { return ___term_13; } inline String_t** get_address_of_term_13() { return &___term_13; } inline void set_term_13(String_t* value) { ___term_13 = value; Il2CppCodeGenWriteBarrier((&___term_13), value); } inline static int32_t get_offset_of_stdin_14() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___stdin_14)); } inline StreamReader_t62E68063760DCD2FC036AE132DE69C24B7ED001E * get_stdin_14() const { return ___stdin_14; } inline StreamReader_t62E68063760DCD2FC036AE132DE69C24B7ED001E ** get_address_of_stdin_14() { return &___stdin_14; } inline void set_stdin_14(StreamReader_t62E68063760DCD2FC036AE132DE69C24B7ED001E * value) { ___stdin_14 = value; Il2CppCodeGenWriteBarrier((&___stdin_14), value); } inline static int32_t get_offset_of_stdout_15() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___stdout_15)); } inline CStreamWriter_t6B662CA496662AF63D81722DCA99094893C80450 * get_stdout_15() const { return ___stdout_15; } inline CStreamWriter_t6B662CA496662AF63D81722DCA99094893C80450 ** get_address_of_stdout_15() { return &___stdout_15; } inline void set_stdout_15(CStreamWriter_t6B662CA496662AF63D81722DCA99094893C80450 * value) { ___stdout_15 = value; Il2CppCodeGenWriteBarrier((&___stdout_15), value); } inline static int32_t get_offset_of_windowWidth_16() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___windowWidth_16)); } inline int32_t get_windowWidth_16() const { return ___windowWidth_16; } inline int32_t* get_address_of_windowWidth_16() { return &___windowWidth_16; } inline void set_windowWidth_16(int32_t value) { ___windowWidth_16 = value; } inline static int32_t get_offset_of_windowHeight_17() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___windowHeight_17)); } inline int32_t get_windowHeight_17() const { return ___windowHeight_17; } inline int32_t* get_address_of_windowHeight_17() { return &___windowHeight_17; } inline void set_windowHeight_17(int32_t value) { ___windowHeight_17 = value; } inline static int32_t get_offset_of_bufferHeight_18() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___bufferHeight_18)); } inline int32_t get_bufferHeight_18() const { return ___bufferHeight_18; } inline int32_t* get_address_of_bufferHeight_18() { return &___bufferHeight_18; } inline void set_bufferHeight_18(int32_t value) { ___bufferHeight_18 = value; } inline static int32_t get_offset_of_bufferWidth_19() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___bufferWidth_19)); } inline int32_t get_bufferWidth_19() const { return ___bufferWidth_19; } inline int32_t* get_address_of_bufferWidth_19() { return &___bufferWidth_19; } inline void set_bufferWidth_19(int32_t value) { ___bufferWidth_19 = value; } inline static int32_t get_offset_of_buffer_20() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___buffer_20)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_buffer_20() const { return ___buffer_20; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_buffer_20() { return &___buffer_20; } inline void set_buffer_20(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___buffer_20 = value; Il2CppCodeGenWriteBarrier((&___buffer_20), value); } inline static int32_t get_offset_of_readpos_21() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___readpos_21)); } inline int32_t get_readpos_21() const { return ___readpos_21; } inline int32_t* get_address_of_readpos_21() { return &___readpos_21; } inline void set_readpos_21(int32_t value) { ___readpos_21 = value; } inline static int32_t get_offset_of_writepos_22() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___writepos_22)); } inline int32_t get_writepos_22() const { return ___writepos_22; } inline int32_t* get_address_of_writepos_22() { return &___writepos_22; } inline void set_writepos_22(int32_t value) { ___writepos_22 = value; } inline static int32_t get_offset_of_keypadXmit_23() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___keypadXmit_23)); } inline String_t* get_keypadXmit_23() const { return ___keypadXmit_23; } inline String_t** get_address_of_keypadXmit_23() { return &___keypadXmit_23; } inline void set_keypadXmit_23(String_t* value) { ___keypadXmit_23 = value; Il2CppCodeGenWriteBarrier((&___keypadXmit_23), value); } inline static int32_t get_offset_of_keypadLocal_24() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___keypadLocal_24)); } inline String_t* get_keypadLocal_24() const { return ___keypadLocal_24; } inline String_t** get_address_of_keypadLocal_24() { return &___keypadLocal_24; } inline void set_keypadLocal_24(String_t* value) { ___keypadLocal_24 = value; Il2CppCodeGenWriteBarrier((&___keypadLocal_24), value); } inline static int32_t get_offset_of_inited_25() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___inited_25)); } inline bool get_inited_25() const { return ___inited_25; } inline bool* get_address_of_inited_25() { return &___inited_25; } inline void set_inited_25(bool value) { ___inited_25 = value; } inline static int32_t get_offset_of_initLock_26() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___initLock_26)); } inline RuntimeObject * get_initLock_26() const { return ___initLock_26; } inline RuntimeObject ** get_address_of_initLock_26() { return &___initLock_26; } inline void set_initLock_26(RuntimeObject * value) { ___initLock_26 = value; Il2CppCodeGenWriteBarrier((&___initLock_26), value); } inline static int32_t get_offset_of_initKeys_27() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___initKeys_27)); } inline bool get_initKeys_27() const { return ___initKeys_27; } inline bool* get_address_of_initKeys_27() { return &___initKeys_27; } inline void set_initKeys_27(bool value) { ___initKeys_27 = value; } inline static int32_t get_offset_of_origPair_28() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___origPair_28)); } inline String_t* get_origPair_28() const { return ___origPair_28; } inline String_t** get_address_of_origPair_28() { return &___origPair_28; } inline void set_origPair_28(String_t* value) { ___origPair_28 = value; Il2CppCodeGenWriteBarrier((&___origPair_28), value); } inline static int32_t get_offset_of_origColors_29() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___origColors_29)); } inline String_t* get_origColors_29() const { return ___origColors_29; } inline String_t** get_address_of_origColors_29() { return &___origColors_29; } inline void set_origColors_29(String_t* value) { ___origColors_29 = value; Il2CppCodeGenWriteBarrier((&___origColors_29), value); } inline static int32_t get_offset_of_cursorAddress_30() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___cursorAddress_30)); } inline String_t* get_cursorAddress_30() const { return ___cursorAddress_30; } inline String_t** get_address_of_cursorAddress_30() { return &___cursorAddress_30; } inline void set_cursorAddress_30(String_t* value) { ___cursorAddress_30 = value; Il2CppCodeGenWriteBarrier((&___cursorAddress_30), value); } inline static int32_t get_offset_of_fgcolor_31() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___fgcolor_31)); } inline int32_t get_fgcolor_31() const { return ___fgcolor_31; } inline int32_t* get_address_of_fgcolor_31() { return &___fgcolor_31; } inline void set_fgcolor_31(int32_t value) { ___fgcolor_31 = value; } inline static int32_t get_offset_of_setfgcolor_32() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___setfgcolor_32)); } inline String_t* get_setfgcolor_32() const { return ___setfgcolor_32; } inline String_t** get_address_of_setfgcolor_32() { return &___setfgcolor_32; } inline void set_setfgcolor_32(String_t* value) { ___setfgcolor_32 = value; Il2CppCodeGenWriteBarrier((&___setfgcolor_32), value); } inline static int32_t get_offset_of_setbgcolor_33() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___setbgcolor_33)); } inline String_t* get_setbgcolor_33() const { return ___setbgcolor_33; } inline String_t** get_address_of_setbgcolor_33() { return &___setbgcolor_33; } inline void set_setbgcolor_33(String_t* value) { ___setbgcolor_33 = value; Il2CppCodeGenWriteBarrier((&___setbgcolor_33), value); } inline static int32_t get_offset_of_maxColors_34() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___maxColors_34)); } inline int32_t get_maxColors_34() const { return ___maxColors_34; } inline int32_t* get_address_of_maxColors_34() { return &___maxColors_34; } inline void set_maxColors_34(int32_t value) { ___maxColors_34 = value; } inline static int32_t get_offset_of_noGetPosition_35() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___noGetPosition_35)); } inline bool get_noGetPosition_35() const { return ___noGetPosition_35; } inline bool* get_address_of_noGetPosition_35() { return &___noGetPosition_35; } inline void set_noGetPosition_35(bool value) { ___noGetPosition_35 = value; } inline static int32_t get_offset_of_keymap_36() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___keymap_36)); } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * get_keymap_36() const { return ___keymap_36; } inline Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 ** get_address_of_keymap_36() { return &___keymap_36; } inline void set_keymap_36(Hashtable_t978F65B8006C8F5504B286526AEC6608FF983FC9 * value) { ___keymap_36 = value; Il2CppCodeGenWriteBarrier((&___keymap_36), value); } inline static int32_t get_offset_of_rootmap_37() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___rootmap_37)); } inline ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC * get_rootmap_37() const { return ___rootmap_37; } inline ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC ** get_address_of_rootmap_37() { return &___rootmap_37; } inline void set_rootmap_37(ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC * value) { ___rootmap_37 = value; Il2CppCodeGenWriteBarrier((&___rootmap_37), value); } inline static int32_t get_offset_of_rl_startx_38() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___rl_startx_38)); } inline int32_t get_rl_startx_38() const { return ___rl_startx_38; } inline int32_t* get_address_of_rl_startx_38() { return &___rl_startx_38; } inline void set_rl_startx_38(int32_t value) { ___rl_startx_38 = value; } inline static int32_t get_offset_of_rl_starty_39() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___rl_starty_39)); } inline int32_t get_rl_starty_39() const { return ___rl_starty_39; } inline int32_t* get_address_of_rl_starty_39() { return &___rl_starty_39; } inline void set_rl_starty_39(int32_t value) { ___rl_starty_39 = value; } inline static int32_t get_offset_of_control_characters_40() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___control_characters_40)); } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* get_control_characters_40() const { return ___control_characters_40; } inline ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821** get_address_of_control_characters_40() { return &___control_characters_40; } inline void set_control_characters_40(ByteU5BU5D_tD06FDBE8142446525DF1C40351D523A228373821* value) { ___control_characters_40 = value; Il2CppCodeGenWriteBarrier((&___control_characters_40), value); } inline static int32_t get_offset_of_echobuf_42() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___echobuf_42)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_echobuf_42() const { return ___echobuf_42; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_echobuf_42() { return &___echobuf_42; } inline void set_echobuf_42(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___echobuf_42 = value; Il2CppCodeGenWriteBarrier((&___echobuf_42), value); } inline static int32_t get_offset_of_echon_43() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653, ___echon_43)); } inline int32_t get_echon_43() const { return ___echon_43; } inline int32_t* get_address_of_echon_43() { return &___echon_43; } inline void set_echon_43(int32_t value) { ___echon_43 = value; } }; struct TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields { public: // System.Int32* System.TermInfoDriver::native_terminal_size int32_t* ___native_terminal_size_0; // System.Int32 System.TermInfoDriver::terminal_size int32_t ___terminal_size_1; // System.String[] System.TermInfoDriver::locations StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* ___locations_2; // System.Int32[] System.TermInfoDriver::_consoleColorToAnsiCode Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* ____consoleColorToAnsiCode_41; public: inline static int32_t get_offset_of_native_terminal_size_0() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields, ___native_terminal_size_0)); } inline int32_t* get_native_terminal_size_0() const { return ___native_terminal_size_0; } inline int32_t** get_address_of_native_terminal_size_0() { return &___native_terminal_size_0; } inline void set_native_terminal_size_0(int32_t* value) { ___native_terminal_size_0 = value; } inline static int32_t get_offset_of_terminal_size_1() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields, ___terminal_size_1)); } inline int32_t get_terminal_size_1() const { return ___terminal_size_1; } inline int32_t* get_address_of_terminal_size_1() { return &___terminal_size_1; } inline void set_terminal_size_1(int32_t value) { ___terminal_size_1 = value; } inline static int32_t get_offset_of_locations_2() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields, ___locations_2)); } inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* get_locations_2() const { return ___locations_2; } inline StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E** get_address_of_locations_2() { return &___locations_2; } inline void set_locations_2(StringU5BU5D_t933FB07893230EA91C40FF900D5400665E87B14E* value) { ___locations_2 = value; Il2CppCodeGenWriteBarrier((&___locations_2), value); } inline static int32_t get_offset_of__consoleColorToAnsiCode_41() { return static_cast<int32_t>(offsetof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields, ____consoleColorToAnsiCode_41)); } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* get__consoleColorToAnsiCode_41() const { return ____consoleColorToAnsiCode_41; } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83** get_address_of__consoleColorToAnsiCode_41() { return &____consoleColorToAnsiCode_41; } inline void set__consoleColorToAnsiCode_41(Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* value) { ____consoleColorToAnsiCode_41 = value; Il2CppCodeGenWriteBarrier((&____consoleColorToAnsiCode_41), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TERMINFODRIVER_T9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_H #ifndef TYPE_T_H #define TYPE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Type struct Type_t : public MemberInfo_t { public: // System.RuntimeTypeHandle System.Type::_impl RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D ____impl_9; public: inline static int32_t get_offset_of__impl_9() { return static_cast<int32_t>(offsetof(Type_t, ____impl_9)); } inline RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D get__impl_9() const { return ____impl_9; } inline RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D * get_address_of__impl_9() { return &____impl_9; } inline void set__impl_9(RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D value) { ____impl_9 = value; } }; struct Type_t_StaticFields { public: // System.Reflection.MemberFilter System.Type::FilterAttribute MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * ___FilterAttribute_0; // System.Reflection.MemberFilter System.Type::FilterName MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * ___FilterName_1; // System.Reflection.MemberFilter System.Type::FilterNameIgnoreCase MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * ___FilterNameIgnoreCase_2; // System.Object System.Type::Missing RuntimeObject * ___Missing_3; // System.Char System.Type::Delimiter Il2CppChar ___Delimiter_4; // System.Type[] System.Type::EmptyTypes TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___EmptyTypes_5; // System.Reflection.Binder System.Type::defaultBinder Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 * ___defaultBinder_6; public: inline static int32_t get_offset_of_FilterAttribute_0() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterAttribute_0)); } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * get_FilterAttribute_0() const { return ___FilterAttribute_0; } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 ** get_address_of_FilterAttribute_0() { return &___FilterAttribute_0; } inline void set_FilterAttribute_0(MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * value) { ___FilterAttribute_0 = value; Il2CppCodeGenWriteBarrier((&___FilterAttribute_0), value); } inline static int32_t get_offset_of_FilterName_1() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterName_1)); } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * get_FilterName_1() const { return ___FilterName_1; } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 ** get_address_of_FilterName_1() { return &___FilterName_1; } inline void set_FilterName_1(MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * value) { ___FilterName_1 = value; Il2CppCodeGenWriteBarrier((&___FilterName_1), value); } inline static int32_t get_offset_of_FilterNameIgnoreCase_2() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterNameIgnoreCase_2)); } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * get_FilterNameIgnoreCase_2() const { return ___FilterNameIgnoreCase_2; } inline MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 ** get_address_of_FilterNameIgnoreCase_2() { return &___FilterNameIgnoreCase_2; } inline void set_FilterNameIgnoreCase_2(MemberFilter_t25C1BD92C42BE94426E300787C13C452CB89B381 * value) { ___FilterNameIgnoreCase_2 = value; Il2CppCodeGenWriteBarrier((&___FilterNameIgnoreCase_2), value); } inline static int32_t get_offset_of_Missing_3() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Missing_3)); } inline RuntimeObject * get_Missing_3() const { return ___Missing_3; } inline RuntimeObject ** get_address_of_Missing_3() { return &___Missing_3; } inline void set_Missing_3(RuntimeObject * value) { ___Missing_3 = value; Il2CppCodeGenWriteBarrier((&___Missing_3), value); } inline static int32_t get_offset_of_Delimiter_4() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Delimiter_4)); } inline Il2CppChar get_Delimiter_4() const { return ___Delimiter_4; } inline Il2CppChar* get_address_of_Delimiter_4() { return &___Delimiter_4; } inline void set_Delimiter_4(Il2CppChar value) { ___Delimiter_4 = value; } inline static int32_t get_offset_of_EmptyTypes_5() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___EmptyTypes_5)); } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get_EmptyTypes_5() const { return ___EmptyTypes_5; } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of_EmptyTypes_5() { return &___EmptyTypes_5; } inline void set_EmptyTypes_5(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value) { ___EmptyTypes_5 = value; Il2CppCodeGenWriteBarrier((&___EmptyTypes_5), value); } inline static int32_t get_offset_of_defaultBinder_6() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___defaultBinder_6)); } inline Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 * get_defaultBinder_6() const { return ___defaultBinder_6; } inline Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 ** get_address_of_defaultBinder_6() { return &___defaultBinder_6; } inline void set_defaultBinder_6(Binder_t4D5CB06963501D32847C057B57157D6DC49CA759 * value) { ___defaultBinder_6 = value; Il2CppCodeGenWriteBarrier((&___defaultBinder_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPE_T_H #ifndef VARIANT_TBC94A369178CDE161E918F24FD18166A3DC58C18_H #define VARIANT_TBC94A369178CDE161E918F24FD18166A3DC58C18_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Variant struct Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18 { public: union { #pragma pack(push, tp, 1) struct { // System.Int16 System.Variant::vt int16_t ___vt_0; }; #pragma pack(pop, tp) struct { int16_t ___vt_0_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___wReserved1_1_OffsetPadding[2]; // System.UInt16 System.Variant::wReserved1 uint16_t ___wReserved1_1; }; #pragma pack(pop, tp) struct { char ___wReserved1_1_OffsetPadding_forAlignmentOnly[2]; uint16_t ___wReserved1_1_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___wReserved2_2_OffsetPadding[4]; // System.UInt16 System.Variant::wReserved2 uint16_t ___wReserved2_2; }; #pragma pack(pop, tp) struct { char ___wReserved2_2_OffsetPadding_forAlignmentOnly[4]; uint16_t ___wReserved2_2_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___wReserved3_3_OffsetPadding[6]; // System.UInt16 System.Variant::wReserved3 uint16_t ___wReserved3_3; }; #pragma pack(pop, tp) struct { char ___wReserved3_3_OffsetPadding_forAlignmentOnly[6]; uint16_t ___wReserved3_3_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___llVal_4_OffsetPadding[8]; // System.Int64 System.Variant::llVal int64_t ___llVal_4; }; #pragma pack(pop, tp) struct { char ___llVal_4_OffsetPadding_forAlignmentOnly[8]; int64_t ___llVal_4_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___lVal_5_OffsetPadding[8]; // System.Int32 System.Variant::lVal int32_t ___lVal_5; }; #pragma pack(pop, tp) struct { char ___lVal_5_OffsetPadding_forAlignmentOnly[8]; int32_t ___lVal_5_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___bVal_6_OffsetPadding[8]; // System.Byte System.Variant::bVal uint8_t ___bVal_6; }; #pragma pack(pop, tp) struct { char ___bVal_6_OffsetPadding_forAlignmentOnly[8]; uint8_t ___bVal_6_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___iVal_7_OffsetPadding[8]; // System.Int16 System.Variant::iVal int16_t ___iVal_7; }; #pragma pack(pop, tp) struct { char ___iVal_7_OffsetPadding_forAlignmentOnly[8]; int16_t ___iVal_7_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___fltVal_8_OffsetPadding[8]; // System.Single System.Variant::fltVal float ___fltVal_8; }; #pragma pack(pop, tp) struct { char ___fltVal_8_OffsetPadding_forAlignmentOnly[8]; float ___fltVal_8_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___dblVal_9_OffsetPadding[8]; // System.Double System.Variant::dblVal double ___dblVal_9; }; #pragma pack(pop, tp) struct { char ___dblVal_9_OffsetPadding_forAlignmentOnly[8]; double ___dblVal_9_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___boolVal_10_OffsetPadding[8]; // System.Int16 System.Variant::boolVal int16_t ___boolVal_10; }; #pragma pack(pop, tp) struct { char ___boolVal_10_OffsetPadding_forAlignmentOnly[8]; int16_t ___boolVal_10_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___bstrVal_11_OffsetPadding[8]; // System.IntPtr System.Variant::bstrVal intptr_t ___bstrVal_11; }; #pragma pack(pop, tp) struct { char ___bstrVal_11_OffsetPadding_forAlignmentOnly[8]; intptr_t ___bstrVal_11_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___cVal_12_OffsetPadding[8]; // System.SByte System.Variant::cVal int8_t ___cVal_12; }; #pragma pack(pop, tp) struct { char ___cVal_12_OffsetPadding_forAlignmentOnly[8]; int8_t ___cVal_12_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___uiVal_13_OffsetPadding[8]; // System.UInt16 System.Variant::uiVal uint16_t ___uiVal_13; }; #pragma pack(pop, tp) struct { char ___uiVal_13_OffsetPadding_forAlignmentOnly[8]; uint16_t ___uiVal_13_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___ulVal_14_OffsetPadding[8]; // System.UInt32 System.Variant::ulVal uint32_t ___ulVal_14; }; #pragma pack(pop, tp) struct { char ___ulVal_14_OffsetPadding_forAlignmentOnly[8]; uint32_t ___ulVal_14_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___ullVal_15_OffsetPadding[8]; // System.UInt64 System.Variant::ullVal uint64_t ___ullVal_15; }; #pragma pack(pop, tp) struct { char ___ullVal_15_OffsetPadding_forAlignmentOnly[8]; uint64_t ___ullVal_15_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___intVal_16_OffsetPadding[8]; // System.Int32 System.Variant::intVal int32_t ___intVal_16; }; #pragma pack(pop, tp) struct { char ___intVal_16_OffsetPadding_forAlignmentOnly[8]; int32_t ___intVal_16_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___uintVal_17_OffsetPadding[8]; // System.UInt32 System.Variant::uintVal uint32_t ___uintVal_17; }; #pragma pack(pop, tp) struct { char ___uintVal_17_OffsetPadding_forAlignmentOnly[8]; uint32_t ___uintVal_17_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___pdispVal_18_OffsetPadding[8]; // System.IntPtr System.Variant::pdispVal intptr_t ___pdispVal_18; }; #pragma pack(pop, tp) struct { char ___pdispVal_18_OffsetPadding_forAlignmentOnly[8]; intptr_t ___pdispVal_18_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { char ___bRecord_19_OffsetPadding[8]; // System.BRECORD System.Variant::bRecord BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601 ___bRecord_19; }; #pragma pack(pop, tp) struct { char ___bRecord_19_OffsetPadding_forAlignmentOnly[8]; BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601 ___bRecord_19_forAlignmentOnly; }; }; public: inline static int32_t get_offset_of_vt_0() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___vt_0)); } inline int16_t get_vt_0() const { return ___vt_0; } inline int16_t* get_address_of_vt_0() { return &___vt_0; } inline void set_vt_0(int16_t value) { ___vt_0 = value; } inline static int32_t get_offset_of_wReserved1_1() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___wReserved1_1)); } inline uint16_t get_wReserved1_1() const { return ___wReserved1_1; } inline uint16_t* get_address_of_wReserved1_1() { return &___wReserved1_1; } inline void set_wReserved1_1(uint16_t value) { ___wReserved1_1 = value; } inline static int32_t get_offset_of_wReserved2_2() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___wReserved2_2)); } inline uint16_t get_wReserved2_2() const { return ___wReserved2_2; } inline uint16_t* get_address_of_wReserved2_2() { return &___wReserved2_2; } inline void set_wReserved2_2(uint16_t value) { ___wReserved2_2 = value; } inline static int32_t get_offset_of_wReserved3_3() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___wReserved3_3)); } inline uint16_t get_wReserved3_3() const { return ___wReserved3_3; } inline uint16_t* get_address_of_wReserved3_3() { return &___wReserved3_3; } inline void set_wReserved3_3(uint16_t value) { ___wReserved3_3 = value; } inline static int32_t get_offset_of_llVal_4() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___llVal_4)); } inline int64_t get_llVal_4() const { return ___llVal_4; } inline int64_t* get_address_of_llVal_4() { return &___llVal_4; } inline void set_llVal_4(int64_t value) { ___llVal_4 = value; } inline static int32_t get_offset_of_lVal_5() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___lVal_5)); } inline int32_t get_lVal_5() const { return ___lVal_5; } inline int32_t* get_address_of_lVal_5() { return &___lVal_5; } inline void set_lVal_5(int32_t value) { ___lVal_5 = value; } inline static int32_t get_offset_of_bVal_6() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___bVal_6)); } inline uint8_t get_bVal_6() const { return ___bVal_6; } inline uint8_t* get_address_of_bVal_6() { return &___bVal_6; } inline void set_bVal_6(uint8_t value) { ___bVal_6 = value; } inline static int32_t get_offset_of_iVal_7() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___iVal_7)); } inline int16_t get_iVal_7() const { return ___iVal_7; } inline int16_t* get_address_of_iVal_7() { return &___iVal_7; } inline void set_iVal_7(int16_t value) { ___iVal_7 = value; } inline static int32_t get_offset_of_fltVal_8() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___fltVal_8)); } inline float get_fltVal_8() const { return ___fltVal_8; } inline float* get_address_of_fltVal_8() { return &___fltVal_8; } inline void set_fltVal_8(float value) { ___fltVal_8 = value; } inline static int32_t get_offset_of_dblVal_9() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___dblVal_9)); } inline double get_dblVal_9() const { return ___dblVal_9; } inline double* get_address_of_dblVal_9() { return &___dblVal_9; } inline void set_dblVal_9(double value) { ___dblVal_9 = value; } inline static int32_t get_offset_of_boolVal_10() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___boolVal_10)); } inline int16_t get_boolVal_10() const { return ___boolVal_10; } inline int16_t* get_address_of_boolVal_10() { return &___boolVal_10; } inline void set_boolVal_10(int16_t value) { ___boolVal_10 = value; } inline static int32_t get_offset_of_bstrVal_11() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___bstrVal_11)); } inline intptr_t get_bstrVal_11() const { return ___bstrVal_11; } inline intptr_t* get_address_of_bstrVal_11() { return &___bstrVal_11; } inline void set_bstrVal_11(intptr_t value) { ___bstrVal_11 = value; } inline static int32_t get_offset_of_cVal_12() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___cVal_12)); } inline int8_t get_cVal_12() const { return ___cVal_12; } inline int8_t* get_address_of_cVal_12() { return &___cVal_12; } inline void set_cVal_12(int8_t value) { ___cVal_12 = value; } inline static int32_t get_offset_of_uiVal_13() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___uiVal_13)); } inline uint16_t get_uiVal_13() const { return ___uiVal_13; } inline uint16_t* get_address_of_uiVal_13() { return &___uiVal_13; } inline void set_uiVal_13(uint16_t value) { ___uiVal_13 = value; } inline static int32_t get_offset_of_ulVal_14() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___ulVal_14)); } inline uint32_t get_ulVal_14() const { return ___ulVal_14; } inline uint32_t* get_address_of_ulVal_14() { return &___ulVal_14; } inline void set_ulVal_14(uint32_t value) { ___ulVal_14 = value; } inline static int32_t get_offset_of_ullVal_15() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___ullVal_15)); } inline uint64_t get_ullVal_15() const { return ___ullVal_15; } inline uint64_t* get_address_of_ullVal_15() { return &___ullVal_15; } inline void set_ullVal_15(uint64_t value) { ___ullVal_15 = value; } inline static int32_t get_offset_of_intVal_16() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___intVal_16)); } inline int32_t get_intVal_16() const { return ___intVal_16; } inline int32_t* get_address_of_intVal_16() { return &___intVal_16; } inline void set_intVal_16(int32_t value) { ___intVal_16 = value; } inline static int32_t get_offset_of_uintVal_17() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___uintVal_17)); } inline uint32_t get_uintVal_17() const { return ___uintVal_17; } inline uint32_t* get_address_of_uintVal_17() { return &___uintVal_17; } inline void set_uintVal_17(uint32_t value) { ___uintVal_17 = value; } inline static int32_t get_offset_of_pdispVal_18() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___pdispVal_18)); } inline intptr_t get_pdispVal_18() const { return ___pdispVal_18; } inline intptr_t* get_address_of_pdispVal_18() { return &___pdispVal_18; } inline void set_pdispVal_18(intptr_t value) { ___pdispVal_18 = value; } inline static int32_t get_offset_of_bRecord_19() { return static_cast<int32_t>(offsetof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18, ___bRecord_19)); } inline BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601 get_bRecord_19() const { return ___bRecord_19; } inline BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601 * get_address_of_bRecord_19() { return &___bRecord_19; } inline void set_bRecord_19(BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601 value) { ___bRecord_19 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VARIANT_TBC94A369178CDE161E918F24FD18166A3DC58C18_H #ifndef VERSIONRESULT_TA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE_H #define VERSIONRESULT_TA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Version_VersionResult struct VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE { public: // System.Version System.Version_VersionResult::m_parsedVersion Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * ___m_parsedVersion_0; // System.Version_ParseFailureKind System.Version_VersionResult::m_failure int32_t ___m_failure_1; // System.String System.Version_VersionResult::m_exceptionArgument String_t* ___m_exceptionArgument_2; // System.String System.Version_VersionResult::m_argumentName String_t* ___m_argumentName_3; // System.Boolean System.Version_VersionResult::m_canThrow bool ___m_canThrow_4; public: inline static int32_t get_offset_of_m_parsedVersion_0() { return static_cast<int32_t>(offsetof(VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE, ___m_parsedVersion_0)); } inline Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * get_m_parsedVersion_0() const { return ___m_parsedVersion_0; } inline Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD ** get_address_of_m_parsedVersion_0() { return &___m_parsedVersion_0; } inline void set_m_parsedVersion_0(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * value) { ___m_parsedVersion_0 = value; Il2CppCodeGenWriteBarrier((&___m_parsedVersion_0), value); } inline static int32_t get_offset_of_m_failure_1() { return static_cast<int32_t>(offsetof(VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE, ___m_failure_1)); } inline int32_t get_m_failure_1() const { return ___m_failure_1; } inline int32_t* get_address_of_m_failure_1() { return &___m_failure_1; } inline void set_m_failure_1(int32_t value) { ___m_failure_1 = value; } inline static int32_t get_offset_of_m_exceptionArgument_2() { return static_cast<int32_t>(offsetof(VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE, ___m_exceptionArgument_2)); } inline String_t* get_m_exceptionArgument_2() const { return ___m_exceptionArgument_2; } inline String_t** get_address_of_m_exceptionArgument_2() { return &___m_exceptionArgument_2; } inline void set_m_exceptionArgument_2(String_t* value) { ___m_exceptionArgument_2 = value; Il2CppCodeGenWriteBarrier((&___m_exceptionArgument_2), value); } inline static int32_t get_offset_of_m_argumentName_3() { return static_cast<int32_t>(offsetof(VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE, ___m_argumentName_3)); } inline String_t* get_m_argumentName_3() const { return ___m_argumentName_3; } inline String_t** get_address_of_m_argumentName_3() { return &___m_argumentName_3; } inline void set_m_argumentName_3(String_t* value) { ___m_argumentName_3 = value; Il2CppCodeGenWriteBarrier((&___m_argumentName_3), value); } inline static int32_t get_offset_of_m_canThrow_4() { return static_cast<int32_t>(offsetof(VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE, ___m_canThrow_4)); } inline bool get_m_canThrow_4() const { return ___m_canThrow_4; } inline bool* get_address_of_m_canThrow_4() { return &___m_canThrow_4; } inline void set_m_canThrow_4(bool value) { ___m_canThrow_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Version/VersionResult struct VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE_marshaled_pinvoke { Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * ___m_parsedVersion_0; int32_t ___m_failure_1; char* ___m_exceptionArgument_2; char* ___m_argumentName_3; int32_t ___m_canThrow_4; }; // Native definition for COM marshalling of System.Version/VersionResult struct VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE_marshaled_com { Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD * ___m_parsedVersion_0; int32_t ___m_failure_1; Il2CppChar* ___m_exceptionArgument_2; Il2CppChar* ___m_argumentName_3; int32_t ___m_canThrow_4; }; #endif // VERSIONRESULT_TA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE_H #ifndef ASSEMBLYLOADEVENTHANDLER_T53F8340027F9EE67E8A22E7D8C1A3770345153C9_H #define ASSEMBLYLOADEVENTHANDLER_T53F8340027F9EE67E8A22E7D8C1A3770345153C9_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.AssemblyLoadEventHandler struct AssemblyLoadEventHandler_t53F8340027F9EE67E8A22E7D8C1A3770345153C9 : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASSEMBLYLOADEVENTHANDLER_T53F8340027F9EE67E8A22E7D8C1A3770345153C9_H #ifndef INTERNALCANCELHANDLER_T2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A_H #define INTERNALCANCELHANDLER_T2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Console_InternalCancelHandler struct InternalCancelHandler_t2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INTERNALCANCELHANDLER_T2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A_H #ifndef WINDOWSCANCELHANDLER_T1D05BCFB512603DCF87A126FE9969F1D876B9B51_H #define WINDOWSCANCELHANDLER_T1D05BCFB512603DCF87A126FE9969F1D876B9B51_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Console_WindowsConsole_WindowsCancelHandler struct WindowsCancelHandler_t1D05BCFB512603DCF87A126FE9969F1D876B9B51 : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // WINDOWSCANCELHANDLER_T1D05BCFB512603DCF87A126FE9969F1D876B9B51_H #ifndef NULLCONSOLEDRIVER_T4608D1A2E1195946C2945E3459E15364CF4EC43D_H #define NULLCONSOLEDRIVER_T4608D1A2E1195946C2945E3459E15364CF4EC43D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.NullConsoleDriver struct NullConsoleDriver_t4608D1A2E1195946C2945E3459E15364CF4EC43D : public RuntimeObject { public: public: }; struct NullConsoleDriver_t4608D1A2E1195946C2945E3459E15364CF4EC43D_StaticFields { public: // System.ConsoleKeyInfo System.NullConsoleDriver::EmptyConsoleKeyInfo ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768 ___EmptyConsoleKeyInfo_0; public: inline static int32_t get_offset_of_EmptyConsoleKeyInfo_0() { return static_cast<int32_t>(offsetof(NullConsoleDriver_t4608D1A2E1195946C2945E3459E15364CF4EC43D_StaticFields, ___EmptyConsoleKeyInfo_0)); } inline ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768 get_EmptyConsoleKeyInfo_0() const { return ___EmptyConsoleKeyInfo_0; } inline ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768 * get_address_of_EmptyConsoleKeyInfo_0() { return &___EmptyConsoleKeyInfo_0; } inline void set_EmptyConsoleKeyInfo_0(ConsoleKeyInfo_t5BE3CE05E8258CDB5404256E96AF7C22BC5DE768 value) { ___EmptyConsoleKeyInfo_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // NULLCONSOLEDRIVER_T4608D1A2E1195946C2945E3459E15364CF4EC43D_H #ifndef TYPEINFO_T9D6F65801A41B97F36138B15FD270A1550DBB3FC_H #define TYPEINFO_T9D6F65801A41B97F36138B15FD270A1550DBB3FC_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Reflection.TypeInfo struct TypeInfo_t9D6F65801A41B97F36138B15FD270A1550DBB3FC : public Type_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TYPEINFO_T9D6F65801A41B97F36138B15FD270A1550DBB3FC_H #ifndef RESOLVEEVENTHANDLER_T045C469BEA8B632FA99FE8867C921BA8DAE0BEE5_H #define RESOLVEEVENTHANDLER_T045C469BEA8B632FA99FE8867C921BA8DAE0BEE5_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ResolveEventHandler struct ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5 : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RESOLVEEVENTHANDLER_T045C469BEA8B632FA99FE8867C921BA8DAE0BEE5_H #ifndef UNHANDLEDEXCEPTIONEVENTHANDLER_TB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE_H #define UNHANDLEDEXCEPTIONEVENTHANDLER_TB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.UnhandledExceptionEventHandler struct UnhandledExceptionEventHandler_tB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UNHANDLEDEXCEPTIONEVENTHANDLER_TB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE_H #ifndef RUNTIMETYPE_T40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_H #define RUNTIMETYPE_T40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.RuntimeType struct RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F : public TypeInfo_t9D6F65801A41B97F36138B15FD270A1550DBB3FC { public: // System.MonoTypeInfo System.RuntimeType::type_info MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D * ___type_info_26; // System.Object System.RuntimeType::GenericCache RuntimeObject * ___GenericCache_27; // System.Reflection.RuntimeConstructorInfo System.RuntimeType::m_serializationCtor RuntimeConstructorInfo_tF21A59967629968D0BE5D0DAF677662824E9629D * ___m_serializationCtor_28; public: inline static int32_t get_offset_of_type_info_26() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F, ___type_info_26)); } inline MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D * get_type_info_26() const { return ___type_info_26; } inline MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D ** get_address_of_type_info_26() { return &___type_info_26; } inline void set_type_info_26(MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D * value) { ___type_info_26 = value; Il2CppCodeGenWriteBarrier((&___type_info_26), value); } inline static int32_t get_offset_of_GenericCache_27() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F, ___GenericCache_27)); } inline RuntimeObject * get_GenericCache_27() const { return ___GenericCache_27; } inline RuntimeObject ** get_address_of_GenericCache_27() { return &___GenericCache_27; } inline void set_GenericCache_27(RuntimeObject * value) { ___GenericCache_27 = value; Il2CppCodeGenWriteBarrier((&___GenericCache_27), value); } inline static int32_t get_offset_of_m_serializationCtor_28() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F, ___m_serializationCtor_28)); } inline RuntimeConstructorInfo_tF21A59967629968D0BE5D0DAF677662824E9629D * get_m_serializationCtor_28() const { return ___m_serializationCtor_28; } inline RuntimeConstructorInfo_tF21A59967629968D0BE5D0DAF677662824E9629D ** get_address_of_m_serializationCtor_28() { return &___m_serializationCtor_28; } inline void set_m_serializationCtor_28(RuntimeConstructorInfo_tF21A59967629968D0BE5D0DAF677662824E9629D * value) { ___m_serializationCtor_28 = value; Il2CppCodeGenWriteBarrier((&___m_serializationCtor_28), value); } }; struct RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields { public: // System.RuntimeType System.RuntimeType::ValueType RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * ___ValueType_10; // System.RuntimeType System.RuntimeType::EnumType RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * ___EnumType_11; // System.RuntimeType System.RuntimeType::ObjectType RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * ___ObjectType_12; // System.RuntimeType System.RuntimeType::StringType RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * ___StringType_13; // System.RuntimeType System.RuntimeType::DelegateType RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * ___DelegateType_14; // System.Type[] System.RuntimeType::s_SICtorParamTypes TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* ___s_SICtorParamTypes_15; // System.RuntimeType System.RuntimeType::s_typedRef RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * ___s_typedRef_25; public: inline static int32_t get_offset_of_ValueType_10() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields, ___ValueType_10)); } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * get_ValueType_10() const { return ___ValueType_10; } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F ** get_address_of_ValueType_10() { return &___ValueType_10; } inline void set_ValueType_10(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * value) { ___ValueType_10 = value; Il2CppCodeGenWriteBarrier((&___ValueType_10), value); } inline static int32_t get_offset_of_EnumType_11() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields, ___EnumType_11)); } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * get_EnumType_11() const { return ___EnumType_11; } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F ** get_address_of_EnumType_11() { return &___EnumType_11; } inline void set_EnumType_11(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * value) { ___EnumType_11 = value; Il2CppCodeGenWriteBarrier((&___EnumType_11), value); } inline static int32_t get_offset_of_ObjectType_12() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields, ___ObjectType_12)); } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * get_ObjectType_12() const { return ___ObjectType_12; } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F ** get_address_of_ObjectType_12() { return &___ObjectType_12; } inline void set_ObjectType_12(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * value) { ___ObjectType_12 = value; Il2CppCodeGenWriteBarrier((&___ObjectType_12), value); } inline static int32_t get_offset_of_StringType_13() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields, ___StringType_13)); } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * get_StringType_13() const { return ___StringType_13; } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F ** get_address_of_StringType_13() { return &___StringType_13; } inline void set_StringType_13(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * value) { ___StringType_13 = value; Il2CppCodeGenWriteBarrier((&___StringType_13), value); } inline static int32_t get_offset_of_DelegateType_14() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields, ___DelegateType_14)); } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * get_DelegateType_14() const { return ___DelegateType_14; } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F ** get_address_of_DelegateType_14() { return &___DelegateType_14; } inline void set_DelegateType_14(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * value) { ___DelegateType_14 = value; Il2CppCodeGenWriteBarrier((&___DelegateType_14), value); } inline static int32_t get_offset_of_s_SICtorParamTypes_15() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields, ___s_SICtorParamTypes_15)); } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* get_s_SICtorParamTypes_15() const { return ___s_SICtorParamTypes_15; } inline TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F** get_address_of_s_SICtorParamTypes_15() { return &___s_SICtorParamTypes_15; } inline void set_s_SICtorParamTypes_15(TypeU5BU5D_t7FE623A666B49176DE123306221193E888A12F5F* value) { ___s_SICtorParamTypes_15 = value; Il2CppCodeGenWriteBarrier((&___s_SICtorParamTypes_15), value); } inline static int32_t get_offset_of_s_typedRef_25() { return static_cast<int32_t>(offsetof(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_StaticFields, ___s_typedRef_25)); } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * get_s_typedRef_25() const { return ___s_typedRef_25; } inline RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F ** get_address_of_s_typedRef_25() { return &___s_typedRef_25; } inline void set_s_typedRef_25(RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F * value) { ___s_typedRef_25 = value; Il2CppCodeGenWriteBarrier((&___s_typedRef_25), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMETYPE_T40F13BCEAD97478C72C4B40BFDC2A220161CDB8F_H #ifndef MONOTYPE_T_H #define MONOTYPE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MonoType struct MonoType_t : public RuntimeType_t40F13BCEAD97478C72C4B40BFDC2A220161CDB8F { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MONOTYPE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize300 = { sizeof (UnhandledExceptionEventArgs_t39DD47D43B0D764FE2C9847FBE760031FBEA0FD1), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable300[2] = { UnhandledExceptionEventArgs_t39DD47D43B0D764FE2C9847FBE760031FBEA0FD1::get_offset_of__Exception_1(), UnhandledExceptionEventArgs_t39DD47D43B0D764FE2C9847FBE760031FBEA0FD1::get_offset_of__IsTerminating_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize301 = { sizeof (UnhandledExceptionEventHandler_tB0DFF05ABF7A3A234C87D4F7A71F98E9AB2D91DE), sizeof(Il2CppMethodPointer), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize302 = { sizeof (UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable302[8] = { UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_instantiation_0(), UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_elementTypes_1(), UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_genericParameterPosition_2(), UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_declaringType_3(), UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_declaringMethod_4(), UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_data_5(), UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_assemblyName_6(), UnitySerializationHolder_t6B17ABB985ACD3F8D9F9E3C146DEA5F730E1CEAC::get_offset_of_m_unityType_7(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize303 = { sizeof (UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C)+ sizeof (RuntimeObject), sizeof(UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C_marshaled_pinvoke), 0, 0 }; extern const int32_t g_FieldOffsetTable303[3] = { UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C::get_offset_of_m_buffer_0() + static_cast<int32_t>(sizeof(RuntimeObject)), UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C::get_offset_of_m_totalSize_1() + static_cast<int32_t>(sizeof(RuntimeObject)), UnSafeCharBuffer_t99F0962CE65E71C4BA612D5434276C51AC33AF0C::get_offset_of_m_length_2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize304 = { sizeof (Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD), -1, sizeof(Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable304[6] = { Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD::get_offset_of__Major_0(), Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD::get_offset_of__Minor_1(), Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD::get_offset_of__Build_2(), Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD::get_offset_of__Revision_3(), Version_tDBE6876C59B6F56D4F8CAA03851177ABC6FE0DFD_StaticFields::get_offset_of_SeparatorsArray_4(), 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize305 = { sizeof (ParseFailureKind_t0E37E87ACF3E01D5D2846A114AE9247C2C7DC3E8)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable305[5] = { ParseFailureKind_t0E37E87ACF3E01D5D2846A114AE9247C2C7DC3E8::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize306 = { sizeof (VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE)+ sizeof (RuntimeObject), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable306[5] = { VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE::get_offset_of_m_parsedVersion_0() + static_cast<int32_t>(sizeof(RuntimeObject)), VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE::get_offset_of_m_failure_1() + static_cast<int32_t>(sizeof(RuntimeObject)), VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE::get_offset_of_m_exceptionArgument_2() + static_cast<int32_t>(sizeof(RuntimeObject)), VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE::get_offset_of_m_argumentName_3() + static_cast<int32_t>(sizeof(RuntimeObject)), VersionResult_tA97F3FDF3CF3FF5D0E43768C08D1C4D4568E88CE::get_offset_of_m_canThrow_4() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize307 = { sizeof (AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8), -1, sizeof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_StaticFields), sizeof(AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields) }; extern const int32_t g_FieldOffsetTable307[23] = { AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of__mono_app_domain_1(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_StaticFields::get_offset_of__process_guid_2(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields::get_offset_of_type_resolve_in_progress_3() | THREAD_LOCAL_STATIC_MASK, AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields::get_offset_of_assembly_resolve_in_progress_4() | THREAD_LOCAL_STATIC_MASK, AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields::get_offset_of_assembly_resolve_in_progress_refonly_5() | THREAD_LOCAL_STATIC_MASK, AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of__evidence_6(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of__granted_7(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of__principalPolicy_8(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_ThreadStaticFields::get_offset_of__principal_9() | THREAD_LOCAL_STATIC_MASK, AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8_StaticFields::get_offset_of_default_domain_10(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_AssemblyLoad_11(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_AssemblyResolve_12(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_DomainUnload_13(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_ProcessExit_14(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_ResourceResolve_15(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_TypeResolve_16(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_UnhandledException_17(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_FirstChanceException_18(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of__domain_manager_19(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_ReflectionOnlyAssemblyResolve_20(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of__activation_21(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of__applicationIdentity_22(), AppDomain_t1B59572328F60585904DF52A59FE47CF5B5FFFF8::get_offset_of_compatibility_switch_23(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize308 = { sizeof (CLRConfig_t79EBAFC5FBCAC675B35CB93391030FABCA9A7B45), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize309 = { sizeof (CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91), -1, sizeof(CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable309[2] = { CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91_StaticFields::get_offset_of_IsAppEarlierThanSilverlight4_0(), CompatibilitySwitches_tC541F9F5404925C97741A0628E9B6D26C40CFA91_StaticFields::get_offset_of_IsAppEarlierThanWindowsPhone8_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize310 = { sizeof (Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806), -1, sizeof(Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable310[3] = { 0, Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_StaticFields::get_offset_of_nl_1(), Environment_tC93BF7477A1AEA39D05EDFEBAFF62EE5353FF806_StaticFields::get_offset_of_os_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize311 = { sizeof (SpecialFolder_t5A2C2AE97BD6C2DF95061C8904B2225228AC9BA0)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable311[48] = { SpecialFolder_t5A2C2AE97BD6C2DF95061C8904B2225228AC9BA0::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, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize312 = { sizeof (SpecialFolderOption_tAF2DB60F447738C1E46C3D5660A0CBB0F4480470)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable312[4] = { SpecialFolderOption_tAF2DB60F447738C1E46C3D5660A0CBB0F4480470::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize313 = { sizeof (ParseNumbers_tFCD9612B791F297E13D1D622F88219D9D471331A), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize314 = { sizeof (MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable314[2] = { MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D::get_offset_of_full_name_0(), MonoTypeInfo_t9A65BA5324D14FDFEB7644EEE6E1BDF74B8A393D::get_offset_of_default_ctor_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize315 = { sizeof (TypeNameParser_tBEF78C9D6AEC3DE5E2993F6EDC24C06F7B713741), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize316 = { sizeof (AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable316[23] = { AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_application_base_0(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_application_name_1(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_cache_path_2(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_configuration_file_3(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_dynamic_base_4(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_license_file_5(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_private_bin_path_6(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_private_bin_path_probe_7(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_shadow_copy_directories_8(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_shadow_copy_files_9(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_publisher_policy_10(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_path_changed_11(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_loader_optimization_12(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_disallow_binding_redirects_13(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_disallow_code_downloads_14(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of__activationArguments_15(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_domain_initializer_16(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_application_trust_17(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_domain_initializer_args_18(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_disallow_appbase_probe_19(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_configuration_bytes_20(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_serialized_non_primitives_21(), AppDomainSetup_t80DF2915BB100D4BD515920B49C959E9FA451306::get_offset_of_U3CTargetFrameworkNameU3Ek__BackingField_22(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize317 = { sizeof (ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855)+ sizeof (RuntimeObject), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable317[4] = { ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855::get_offset_of_sig_0() + static_cast<int32_t>(sizeof(RuntimeObject)), ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855::get_offset_of_args_1() + static_cast<int32_t>(sizeof(RuntimeObject)), ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855::get_offset_of_next_arg_2() + static_cast<int32_t>(sizeof(RuntimeObject)), ArgIterator_tCF0D2A1A1BD140821E37286E2D7AC6267479F855::get_offset_of_num_args_3() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize318 = { sizeof (AssemblyLoadEventArgs_t51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable318[1] = { AssemblyLoadEventArgs_t51DAAB04039C3B2D8C3FBF65C13441BC6C6A7AE8::get_offset_of_m_loadedAssembly_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize319 = { sizeof (AssemblyLoadEventHandler_t53F8340027F9EE67E8A22E7D8C1A3770345153C9), sizeof(Il2CppMethodPointer), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize320 = { sizeof (Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D), -1, sizeof(Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable320[7] = { Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields::get_offset_of_stdout_0(), Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields::get_offset_of_stderr_1(), Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields::get_offset_of_stdin_2(), Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields::get_offset_of_inputEncoding_3(), Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields::get_offset_of_outputEncoding_4(), Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields::get_offset_of_cancel_event_5(), Console_t5C8E87BA271B0DECA837A3BF9093AC3560DB3D5D_StaticFields::get_offset_of_cancel_handler_6(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize321 = { sizeof (WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B), -1, sizeof(WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable321[2] = { WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_StaticFields::get_offset_of_ctrlHandlerAdded_0(), WindowsConsole_tE2543F6EAD1001D1F2DE2CC0A5495048EED8C21B_StaticFields::get_offset_of_cancelHandler_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize322 = { sizeof (WindowsCancelHandler_t1D05BCFB512603DCF87A126FE9969F1D876B9B51), sizeof(Il2CppMethodPointer), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize323 = { sizeof (InternalCancelHandler_t2DD134D8150B67E2F9FAD1BC2E6BE92EED57968A), sizeof(Il2CppMethodPointer), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize324 = { sizeof (ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101), -1, sizeof(ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable324[3] = { ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields::get_offset_of_driver_0(), ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields::get_offset_of_is_console_1(), ConsoleDriver_t4F24DB42600CA82912181D5D312902B8BEFEE101_StaticFields::get_offset_of_called_isatty_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize325 = { sizeof (DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable325[3] = { DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE::get_offset_of_target_type_0(), DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE::get_offset_of_method_name_1(), DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE::get_offset_of_curried_first_arg_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize326 = { sizeof (Delegate_t), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable326[11] = { Delegate_t::get_offset_of_method_ptr_0(), Delegate_t::get_offset_of_invoke_impl_1(), Delegate_t::get_offset_of_m_target_2(), Delegate_t::get_offset_of_method_3(), Delegate_t::get_offset_of_delegate_trampoline_4(), Delegate_t::get_offset_of_extra_arg_5(), Delegate_t::get_offset_of_method_code_6(), Delegate_t::get_offset_of_method_info_7(), Delegate_t::get_offset_of_original_method_info_8(), Delegate_t::get_offset_of_data_9(), Delegate_t::get_offset_of_method_is_virtual_10(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize327 = { sizeof (DelegateSerializationHolder_tC720FD99D3C1B05B7558EF694ED42E57E64DD671), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable327[1] = { DelegateSerializationHolder_tC720FD99D3C1B05B7558EF694ED42E57E64DD671::get_offset_of__delegate_0(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize328 = { sizeof (DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable328[7] = { DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E::get_offset_of_type_0(), DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E::get_offset_of_assembly_1(), DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E::get_offset_of_target_2(), DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E::get_offset_of_targetTypeAssembly_3(), DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E::get_offset_of_targetTypeName_4(), DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E::get_offset_of_methodName_5(), DelegateEntry_t2B3E5D8EF7A65CB12A8EF7621B40DC704402E88E::get_offset_of_delegateEntry_6(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize329 = { 0, 0, 0, 0 }; extern const int32_t g_FieldOffsetTable329[1] = { 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize330 = { sizeof (SByteEnum_t0EC157A9E311E27D76141202576E15FA4E83E0EE)+ sizeof (RuntimeObject), sizeof(int8_t), 0, 0 }; extern const int32_t g_FieldOffsetTable330[1] = { SByteEnum_t0EC157A9E311E27D76141202576E15FA4E83E0EE::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize331 = { sizeof (Int16Enum_tF03C0C5772A892EB552607A1C0DEF122A930BE80)+ sizeof (RuntimeObject), sizeof(int16_t), 0, 0 }; extern const int32_t g_FieldOffsetTable331[1] = { Int16Enum_tF03C0C5772A892EB552607A1C0DEF122A930BE80::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize332 = { sizeof (Int32Enum_t6312CE4586C17FE2E2E513D2E7655B574F10FDCD)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable332[1] = { Int32Enum_t6312CE4586C17FE2E2E513D2E7655B574F10FDCD::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize333 = { sizeof (Int64Enum_t7DD4BDEADB660E726D94B249B352C2E2ABC1E580)+ sizeof (RuntimeObject), sizeof(int64_t), 0, 0 }; extern const int32_t g_FieldOffsetTable333[1] = { Int64Enum_t7DD4BDEADB660E726D94B249B352C2E2ABC1E580::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize334 = { sizeof (ByteEnum_t406C975039F6312CDE58A265A6ECFD861F8C06CD)+ sizeof (RuntimeObject), sizeof(uint8_t), 0, 0 }; extern const int32_t g_FieldOffsetTable334[1] = { ByteEnum_t406C975039F6312CDE58A265A6ECFD861F8C06CD::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize335 = { sizeof (UInt16Enum_tB3380938EFBC6B524E2C8143A7982637F0EA4456)+ sizeof (RuntimeObject), sizeof(uint16_t), 0, 0 }; extern const int32_t g_FieldOffsetTable335[1] = { UInt16Enum_tB3380938EFBC6B524E2C8143A7982637F0EA4456::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize336 = { sizeof (UInt32Enum_tE44175EB3151A633676D60A642EDA3BD5C6760DA)+ sizeof (RuntimeObject), sizeof(uint32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable336[1] = { UInt32Enum_tE44175EB3151A633676D60A642EDA3BD5C6760DA::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize337 = { sizeof (UInt64Enum_tEAD217F175F60689A664303784384DEF759D24C8)+ sizeof (RuntimeObject), sizeof(uint64_t), 0, 0 }; extern const int32_t g_FieldOffsetTable337[1] = { UInt64Enum_tEAD217F175F60689A664303784384DEF759D24C8::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize338 = { 0, -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize339 = { sizeof (IntPtr_t)+ sizeof (RuntimeObject), sizeof(intptr_t), sizeof(IntPtr_t_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable339[2] = { IntPtr_t::get_offset_of_m_value_0() + static_cast<int32_t>(sizeof(RuntimeObject)), IntPtr_t_StaticFields::get_offset_of_Zero_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize340 = { sizeof (KnownTerminals_tC33732356694467E5C41300FDB5A86143590F1AE), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize341 = { sizeof (MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF), sizeof(MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF_marshaled_pinvoke), 0, 0 }; extern const int32_t g_FieldOffsetTable341[1] = { MarshalByRefObject_tC4577953D0A44D0AB8597CFA868E01C858B1C9AF::get_offset_of__identity_0(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize342 = { sizeof (MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD), sizeof(MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD_marshaled_pinvoke), 0, 0 }; extern const int32_t g_FieldOffsetTable342[6] = { MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD::get_offset_of_msg_0(), MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD::get_offset_of_cb_method_1(), MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD::get_offset_of_cb_target_2(), MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD::get_offset_of_state_3(), MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD::get_offset_of_res_4(), MonoAsyncCall_t5D4F895C7FEF7A36A60AFD3C64078A86BAF681FD::get_offset_of_out_args_5(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize343 = { sizeof (MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98), -1, sizeof(MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_StaticFields), sizeof(MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_ThreadStaticFields) }; extern const int32_t g_FieldOffsetTable343[3] = { MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_StaticFields::get_offset_of_corlib_0(), MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_ThreadStaticFields::get_offset_of_usage_cache_1() | THREAD_LOCAL_STATIC_MASK, MonoCustomAttrs_t9E88BD614E6A34BF71106F71D0524DBA27E7FA98_StaticFields::get_offset_of_DefaultAttributeUsage_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize344 = { sizeof (AttributeInfo_t03612660D52EF536A548174E3C1CC246B848E91A), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable344[2] = { AttributeInfo_t03612660D52EF536A548174E3C1CC246B848E91A::get_offset_of__usage_0(), AttributeInfo_t03612660D52EF536A548174E3C1CC246B848E91A::get_offset_of__inheritanceLevel_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize345 = { sizeof (MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable345[2] = { MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64::get_offset_of_next_0(), MonoListItem_tF9FE02BB3D5D8507333C93F1AF79B60901947A64::get_offset_of_data_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize346 = { sizeof (MonoType_t), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize347 = { sizeof (MulticastDelegate_t), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable347[1] = { MulticastDelegate_t::get_offset_of_delegates_11(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize348 = { sizeof (NullConsoleDriver_t4608D1A2E1195946C2945E3459E15364CF4EC43D), -1, sizeof(NullConsoleDriver_t4608D1A2E1195946C2945E3459E15364CF4EC43D_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable348[1] = { NullConsoleDriver_t4608D1A2E1195946C2945E3459E15364CF4EC43D_StaticFields::get_offset_of_EmptyConsoleKeyInfo_0(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize349 = { sizeof (Nullable_t07CA5C3F88F56004BCB589DD7580798C66874C44), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize350 = { 0, 0, 0, 0 }; extern const int32_t g_FieldOffsetTable350[2] = { 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize351 = { sizeof (NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC), -1, sizeof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields), sizeof(NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_ThreadStaticFields) }; extern const int32_t g_FieldOffsetTable351[26] = { NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields::get_offset_of_MantissaBitsTable_0(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields::get_offset_of_TensExponentTable_1(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields::get_offset_of_DigitLowerTable_2(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields::get_offset_of_DigitUpperTable_3(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields::get_offset_of_TenPowersList_4(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_StaticFields::get_offset_of_DecHexDigits_5(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__nfi_6(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__cbuf_7(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__NaN_8(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__infinity_9(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__isCustomFormat_10(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__specifierIsUpper_11(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__positive_12(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__specifier_13(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__precision_14(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__defPrecision_15(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__digitsLen_16(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__offset_17(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__decPointPos_18(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__val1_19(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__val2_20(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__val3_21(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__val4_22(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC::get_offset_of__ind_23(), NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_ThreadStaticFields::get_offset_of_threadNumberFormatter_24() | THREAD_LOCAL_STATIC_MASK, NumberFormatter_t73E68FC7EA017E5EEB4AB92AF2FD959466D1A4BC_ThreadStaticFields::get_offset_of_userFormatProvider_25() | THREAD_LOCAL_STATIC_MASK, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize352 = { sizeof (CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable352[14] = { CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_UseGroup_0(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_DecimalDigits_1(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_DecimalPointPos_2(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_DecimalTailSharpDigits_3(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_IntegerDigits_4(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_IntegerHeadSharpDigits_5(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_IntegerHeadPos_6(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_UseExponent_7(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_ExponentDigits_8(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_ExponentTailSharpDigits_9(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_ExponentNegativeSignOnly_10(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_DividePlaces_11(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_Percents_12(), CustomInfo_t3C5397567D3BBF326ED9C3D9680AE658DE4612E1::get_offset_of_Permilles_13(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize353 = { sizeof (RuntimeObject), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize354 = { sizeof (OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable354[3] = { OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83::get_offset_of__platform_0(), OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83::get_offset_of__version_1(), OperatingSystem_tBB05846D5AA6960FFEB42C59E5FE359255C2BE83::get_offset_of__servicePack_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize355 = { sizeof (PlatformID_t7969561D329B66D3E609C70CA506A519E06F2776)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable355[8] = { PlatformID_t7969561D329B66D3E609C70CA506A519E06F2776::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize356 = { sizeof (ResolveEventArgs_t116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable356[2] = { ResolveEventArgs_t116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D::get_offset_of_m_Name_1(), ResolveEventArgs_t116CF9DB06BCFEB8933CEAD4A35389A7CA9EB75D::get_offset_of_m_Requesting_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize357 = { sizeof (ResolveEventHandler_t045C469BEA8B632FA99FE8867C921BA8DAE0BEE5), sizeof(Il2CppMethodPointer), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize358 = { sizeof (RuntimeArgumentHandle_t6118B2666F632AA0A554B476D9A447ACDBF08C46)+ sizeof (RuntimeObject), sizeof(RuntimeArgumentHandle_t6118B2666F632AA0A554B476D9A447ACDBF08C46 ), 0, 0 }; extern const int32_t g_FieldOffsetTable358[1] = { RuntimeArgumentHandle_t6118B2666F632AA0A554B476D9A447ACDBF08C46::get_offset_of_args_0() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize359 = { sizeof (RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF)+ sizeof (RuntimeObject), sizeof(RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF ), 0, 0 }; extern const int32_t g_FieldOffsetTable359[1] = { RuntimeFieldHandle_t844BDF00E8E6FE69D9AEAA7657F09018B864F4EF::get_offset_of_value_0() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize360 = { sizeof (RuntimeMethodHandle_t85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F)+ sizeof (RuntimeObject), sizeof(RuntimeMethodHandle_t85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F ), 0, 0 }; extern const int32_t g_FieldOffsetTable360[1] = { RuntimeMethodHandle_t85058E06EFF8AE085FAB91CE2B9E28E7F6FAE33F::get_offset_of_value_0() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize361 = { sizeof (RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D)+ sizeof (RuntimeObject), sizeof(RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D ), 0, 0 }; extern const int32_t g_FieldOffsetTable361[1] = { RuntimeTypeHandle_t7B542280A22F0EC4EAC2061C29178845847A8B2D::get_offset_of_value_0() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize362 = { sizeof (StringComparison_t02BAA95468CE9E91115C604577611FDF58FEDCF0)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable362[7] = { StringComparison_t02BAA95468CE9E91115C604577611FDF58FEDCF0::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize363 = { sizeof (TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653), -1, sizeof(TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable363[44] = { TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields::get_offset_of_native_terminal_size_0(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields::get_offset_of_terminal_size_1(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields::get_offset_of_locations_2(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_reader_3(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_cursorLeft_4(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_cursorTop_5(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_title_6(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_titleFormat_7(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_cursorVisible_8(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_csrVisible_9(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_csrInvisible_10(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_clear_11(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_bell_12(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_term_13(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_stdin_14(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_stdout_15(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_windowWidth_16(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_windowHeight_17(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_bufferHeight_18(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_bufferWidth_19(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_buffer_20(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_readpos_21(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_writepos_22(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_keypadXmit_23(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_keypadLocal_24(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_inited_25(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_initLock_26(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_initKeys_27(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_origPair_28(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_origColors_29(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_cursorAddress_30(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_fgcolor_31(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_setfgcolor_32(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_setbgcolor_33(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_maxColors_34(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_noGetPosition_35(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_keymap_36(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_rootmap_37(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_rl_startx_38(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_rl_starty_39(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_control_characters_40(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653_StaticFields::get_offset_of__consoleColorToAnsiCode_41(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_echobuf_42(), TermInfoDriver_t9D1F8B74E923C24C63FBE861B6DDCE7CF05A3653::get_offset_of_echon_43(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize364 = { sizeof (ParameterizedStrings_t495ED7291D56B901CAA1F10EC25739C3C99DC923), -1, 0, sizeof(ParameterizedStrings_t495ED7291D56B901CAA1F10EC25739C3C99DC923_ThreadStaticFields) }; extern const int32_t g_FieldOffsetTable364[1] = { ParameterizedStrings_t495ED7291D56B901CAA1F10EC25739C3C99DC923_ThreadStaticFields::get_offset_of__cachedStack_0() | THREAD_LOCAL_STATIC_MASK, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize365 = { sizeof (FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800)+ sizeof (RuntimeObject), sizeof(FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800_marshaled_pinvoke), 0, 0 }; extern const int32_t g_FieldOffsetTable365[2] = { FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800::get_offset_of__int32_0() + static_cast<int32_t>(sizeof(RuntimeObject)), FormatParam_t1901DD0E7CD1B3A17B09040A6E2FCA5307328800::get_offset_of__string_1() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize366 = { sizeof (LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable366[2] = { LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2::get_offset_of__arr_0(), LowLevelStack_tAED9B2A5CEC7125CF57BEE067AC399CEE3510EC2::get_offset_of__count_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize367 = { sizeof (ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable367[2] = { ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC::get_offset_of_map_0(), ByteMatcher_tB199BDD35E2575B84D9FDED34954705653D241DC::get_offset_of_starts_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize368 = { sizeof (TermInfoNumbers_tE17C1E4A28232B0A786FAB261BD41BA350DF230B)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable368[35] = { TermInfoNumbers_tE17C1E4A28232B0A786FAB261BD41BA350DF230B::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, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize369 = { sizeof (TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable369[5] = { TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C::get_offset_of_boolSize_0(), TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C::get_offset_of_numSize_1(), TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C::get_offset_of_strOffsets_2(), TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C::get_offset_of_buffer_3(), TermInfoReader_tCAABF3484E6F0AA298F809766C52CA9DC4E6C55C::get_offset_of_booleansOffset_4(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize370 = { sizeof (TermInfoStrings_tA50FD6AB2B4EFB66E90CD563942E0A664FD6022F)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable370[396] = { TermInfoStrings_tA50FD6AB2B4EFB66E90CD563942E0A664FD6022F::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, 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, 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, 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, 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, 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, 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, 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, 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_typeDefinitionSize371 = { sizeof (TimeZone_tA2DF435DA1A379978B885F0872A93774666B7454), -1, sizeof(TimeZone_tA2DF435DA1A379978B885F0872A93774666B7454_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable371[1] = { TimeZone_tA2DF435DA1A379978B885F0872A93774666B7454_StaticFields::get_offset_of_tz_lock_0(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize372 = { sizeof (CurrentSystemTimeZone_t7689B8BF1C4A474BD3CFA5B8E89FA84A53D44171), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable372[1] = { CurrentSystemTimeZone_t7689B8BF1C4A474BD3CFA5B8E89FA84A53D44171::get_offset_of_LocalTimeZone_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize373 = { sizeof (TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable373[3] = { TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9::get_offset_of_Offset_0(), TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9::get_offset_of_IsDst_1(), TimeType_t1E0366D2FDDE13B93F6DFD1A2FB8645B76E9DDA9::get_offset_of_Name_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize374 = { sizeof (TypeCode_t03ED52F888000DAF40C550C434F29F39A23D61C6)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable374[19] = { TypeCode_t03ED52F888000DAF40C550C434F29F39A23D61C6::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, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize375 = { 0, -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize376 = { 0, -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize377 = { sizeof (TypeNames_t59FBD5EB0A62A2B3A8178016670631D61DEE00F9), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize378 = { sizeof (ATypeName_t8FD4A465E3C2846D11FEAE25ED5BF3D67FF94421), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize379 = { sizeof (TypeIdentifiers_tBC5BC4024D376DCB779D877A1616CF4D7DB809E6), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize380 = { sizeof (Display_t0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable380[2] = { Display_t0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5::get_offset_of_displayName_0(), Display_t0222D7CB4CF0F85131FC5E26328FE94E0A27F5E5::get_offset_of_internal_name_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize381 = { 0, -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize382 = { sizeof (ArraySpec_tF374BB8994F7190916C6F14C7EA8FE6EFE017970), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable382[2] = { ArraySpec_tF374BB8994F7190916C6F14C7EA8FE6EFE017970::get_offset_of_dimensions_0(), ArraySpec_tF374BB8994F7190916C6F14C7EA8FE6EFE017970::get_offset_of_bound_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize383 = { sizeof (PointerSpec_tBCE1666DC24EC6E4E5376FEC214499984EC26892), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable383[1] = { PointerSpec_tBCE1666DC24EC6E4E5376FEC214499984EC26892::get_offset_of_pointer_level_0(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize384 = { sizeof (TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable384[7] = { TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F::get_offset_of_name_0(), TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F::get_offset_of_assembly_name_1(), TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F::get_offset_of_nested_2(), TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F::get_offset_of_generic_params_3(), TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F::get_offset_of_modifier_spec_4(), TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F::get_offset_of_is_byref_5(), TypeSpec_t943289F7C537252144A22588159B36C6B6759A7F::get_offset_of_display_fullname_6(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize385 = { sizeof (DisplayNameFormat_tFEA54E2FCA44D62D61CCCE98E4F02DE2D186DF47)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable385[4] = { DisplayNameFormat_tFEA54E2FCA44D62D61CCCE98E4F02DE2D186DF47::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize386 = { sizeof (UIntPtr_t)+ sizeof (RuntimeObject), sizeof(uintptr_t), sizeof(UIntPtr_t_StaticFields), 0 }; extern const int32_t g_FieldOffsetTable386[2] = { UIntPtr_t_StaticFields::get_offset_of_Zero_0(), UIntPtr_t::get_offset_of__pointer_1() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize387 = { sizeof (ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF), sizeof(ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_pinvoke), 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize388 = { sizeof (Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18)+ sizeof (RuntimeObject), sizeof(Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18 ), 0, 0 }; extern const int32_t g_FieldOffsetTable388[20] = { Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_vt_0() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_wReserved1_1() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_wReserved2_2() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_wReserved3_3() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_llVal_4() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_lVal_5() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_bVal_6() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_iVal_7() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_fltVal_8() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_dblVal_9() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_boolVal_10() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_bstrVal_11() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_cVal_12() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_uiVal_13() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_ulVal_14() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_ullVal_15() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_intVal_16() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_uintVal_17() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_pdispVal_18() + static_cast<int32_t>(sizeof(RuntimeObject)), Variant_tBC94A369178CDE161E918F24FD18166A3DC58C18::get_offset_of_bRecord_19() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize389 = { sizeof (BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601)+ sizeof (RuntimeObject), sizeof(BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601 ), 0, 0 }; extern const int32_t g_FieldOffsetTable389[2] = { BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601::get_offset_of_pvRecord_0() + static_cast<int32_t>(sizeof(RuntimeObject)), BRECORD_tDDC5F1A5DC569C234C6141FCBA5F8DE8293BC601::get_offset_of_pRecInfo_1() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize390 = { sizeof (Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017)+ sizeof (RuntimeObject), 1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize391 = { sizeof (WeakReference_t0495CC81CD6403E662B7700B802443F6F730E39D), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable391[2] = { WeakReference_t0495CC81CD6403E662B7700B802443F6F730E39D::get_offset_of_isLongReference_0(), WeakReference_t0495CC81CD6403E662B7700B802443F6F730E39D::get_offset_of_gcHandle_1(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize392 = { sizeof (InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78)+ sizeof (RuntimeObject), sizeof(InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78_marshaled_pinvoke), 0, 0 }; extern const int32_t g_FieldOffsetTable392[9] = { InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_EventType_0() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_KeyDown_1() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_RepeatCount_2() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_VirtualKeyCode_3() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_VirtualScanCode_4() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_Character_5() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_ControlKeyState_6() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_pad1_7() + static_cast<int32_t>(sizeof(RuntimeObject)), InputRecord_tAB007C739F339BE208F3C4796B53E9044ADF0A78::get_offset_of_pad2_8() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize393 = { sizeof (Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A)+ sizeof (RuntimeObject), sizeof(Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A ), 0, 0 }; extern const int32_t g_FieldOffsetTable393[2] = { Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A::get_offset_of_X_0() + static_cast<int32_t>(sizeof(RuntimeObject)), Coord_t6CEFF682745DD47B1B4DA3ED268C0933021AC34A::get_offset_of_Y_1() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize394 = { sizeof (SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532)+ sizeof (RuntimeObject), sizeof(SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532 ), 0, 0 }; extern const int32_t g_FieldOffsetTable394[4] = { SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532::get_offset_of_Left_0() + static_cast<int32_t>(sizeof(RuntimeObject)), SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532::get_offset_of_Top_1() + static_cast<int32_t>(sizeof(RuntimeObject)), SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532::get_offset_of_Right_2() + static_cast<int32_t>(sizeof(RuntimeObject)), SmallRect_t18C271B0FF660F6ED4EC6D99B26C4D35F51CA532::get_offset_of_Bottom_3() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize395 = { sizeof (ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F)+ sizeof (RuntimeObject), sizeof(ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F ), 0, 0 }; extern const int32_t g_FieldOffsetTable395[5] = { ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F::get_offset_of_Size_0() + static_cast<int32_t>(sizeof(RuntimeObject)), ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F::get_offset_of_CursorPosition_1() + static_cast<int32_t>(sizeof(RuntimeObject)), ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F::get_offset_of_Attribute_2() + static_cast<int32_t>(sizeof(RuntimeObject)), ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F::get_offset_of_Window_3() + static_cast<int32_t>(sizeof(RuntimeObject)), ConsoleScreenBufferInfo_tA8045B7C44EF25956D3B0847F24465E9CF18954F::get_offset_of_MaxWindowSize_4() + static_cast<int32_t>(sizeof(RuntimeObject)), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize396 = { sizeof (Handles_tC13FB0F0810977450CE811097C1B15BCF5E4CAD7)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable396[4] = { Handles_tC13FB0F0810977450CE811097C1B15BCF5E4CAD7::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize397 = { sizeof (WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42), -1, 0, 0 }; extern const int32_t g_FieldOffsetTable397[3] = { WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42::get_offset_of_inputHandle_0(), WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42::get_offset_of_outputHandle_1(), WindowsConsoleDriver_t953AB92956013BD3ED7E260FEC4944E603008B42::get_offset_of_defaultAttribute_2(), }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize398 = { sizeof (__ComObject_t7C4C78B18A827C344A9826ECC7FCC40B7F6FD77C), -1, 0, 0 }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize399 = { sizeof (AssemblyHashAlgorithm_t31E4F1BC642CF668706C9D0FBD9DFDF5EE01CEB9)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 }; extern const int32_t g_FieldOffsetTable399[7] = { AssemblyHashAlgorithm_t31E4F1BC642CF668706C9D0FBD9DFDF5EE01CEB9::get_offset_of_value___2() + static_cast<int32_t>(sizeof(RuntimeObject)), 0, 0, 0, 0, 0, 0, }; #ifdef __clang__ #pragma clang diagnostic pop #endif
[ "leungkachiiiii@gmail.com" ]
leungkachiiiii@gmail.com
c49d8af418d00a8bb71ba1ac7703af326aa98e3b
74b5d3fa626c83846a5d2890671859bcbe9c3947
/MathWiz/source/Bootloader.cxx
e11d32edc957ad8faa5a63d52de29556050a39aa
[]
no_license
yash101/MathWiz
fc4181f72cd9680cc1b24643b0e5bd26ac2988fa
0ad35166c7043f6410be7942058e5caa4837a103
refs/heads/master
2021-01-10T21:11:58.746629
2015-04-30T03:45:56
2015-04-30T03:45:56
25,278,914
1
0
null
null
null
null
UTF-8
C++
false
false
726
cxx
#include "../include/Bootloader.hxx" void boot::generate_file_list() { if(!ramfs::stat_file(FILECACHE_LOCATION)) { if(DETAILED_DEBUG) { std::cout << "Warning: Unable to stat filecache.dat!" << std::endl; } } std::stringstream str; str << ramfs::read_file(FILECACHE_LOCATION); std::string buffer; std::vector<std::string> file_locations; while(std::getline(str, buffer)) { file_locations.push_back(buffer); } ramfs::filesystem.cache_list(file_locations); return; } void boot::boot() { std::thread(generate_file_list).detach(); global::MathWizServer.set_listening_port(SERVER_PORT); global::MathWizServer.start_async(); }
[ "dlodha@pvlearners.net" ]
dlodha@pvlearners.net
1371fd5fade49f3fec4110fc543dc977595fca2e
55ea2dcfa28691a058bf6e9b40dabc4cc7b895a8
/library/tree/treeCentroidDecompositionSolverDivideAndConquer_XorDistance.h
494ab63784741923bacccf8b4f6bc40aaf660257
[ "Unlicense" ]
permissive
yoonki-song/algorithm_study
02dba9904dec9b15b0cf78440d0b3add93da2380
ff98b083f8b4468afabc7dfe0a415c6e7c556f93
refs/heads/master
2023-02-06T11:55:16.945032
2020-12-15T13:33:12
2020-12-15T13:33:12
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,516
h
#pragma once // https://www.codechef.com/problems/MOVCOIN2 struct TreeCentroidDecompositionSolverDivideAndConquer_XorDistance { struct BitSetSimple64 { static int ctz(unsigned long long x) { #if defined(_M_X64) return int(_tzcnt_u64(x)); #elif defined(__GNUC__) return __builtin_ctzll(x); #else if ((x >> 32) != 0) return int(_tzcnt_u32(unsigned(x >> 32))); else return 32 + int(_tzcnt_u32(unsigned(x))); #endif } int N; vector<unsigned long long> values; BitSetSimple64() { } explicit BitSetSimple64(int n) { init(n); } void init(int n) { N = n; values = vector<unsigned long long>((N + 63) >> 6); } BitSetSimple64& flip(int pos) { int idx = pos >> 6; int off = pos & 0x3f; values[idx] ^= 1ull << off; return *this; } }; int N; vector<vector<int>> edges; vector<bool> values; // // find a center node in a tree vector<int> treeLevel; vector<int> treeSize; vector<bool> ctMarked; int currTime; vector<pair<int, int>> visitTime; vector<int> timeToNode; vector<int> answer; void init(int N) { this->N = N; edges = vector<vector<int>>(N); values = vector<bool>(N); treeLevel = vector<int>(N); treeSize = vector<int>(N); ctMarked = vector<bool>(N); //--- currTime = 0; visitTime = vector<pair<int, int>>(N); timeToNode = vector<int>(N); answer = vector<int>(N); } void addEdge(int u, int v) { edges[u].push_back(v); edges[v].push_back(u); } void setValue(int u, bool enable) { values[u] = enable; } //--- // O(N*(logN)^2) void solve() { dfsSize(0, -1); dfsSolve(0, -1); } private: static int clz(int x) { if (!x) return 32; #ifndef __GNUC__ return int(_lzcnt_u32((unsigned)x)); #else return __builtin_clz((unsigned)x); #endif } int dfsDist(int u, int parent, int depth, BitSetSimple64& all) { if (values[u]) all.flip(depth); treeSize[u] = 1; treeLevel[u] = depth; timeToNode[currTime] = u; visitTime[u].first = currTime++; int res = depth; for (int v : edges[u]) { if (v != parent && !ctMarked[v]) { res = max(res, dfsDist(v, u, depth + 1, all)); treeSize[u] += treeSize[v]; } } visitTime[u].second = currTime; return res; } void apply(int u, int parent, int size, int baseDepth = 0) { BitSetSimple64 all(size + baseDepth); currTime = 0; int maxDepth = dfsDist(u, parent, baseDepth, all); int logH = 32 - clz(maxDepth * 2); // max distance = maxDepth * 2 int cnt = 0; int xxor = 0; vector<vector<int>> dist(logH); for (int i = 0; i < logH; i++) dist[i].resize(1 << i); for (int j = 0, k = 0; j <= maxDepth; j += 64, k++) { auto bits = all.values[k]; while (bits) { int idx = j + BitSetSimple64::ctz(bits); cnt++; for (int k = 0, msb = 1; k < logH; k++, msb <<= 1) { dist[k][idx & (msb - 1)] ^= msb; xxor ^= idx & msb; } bits &= bits - 1; } } answer[u] ^= xxor; if (cnt > 0) { vector<int> X; X.push_back(xxor); for (int v : edges[u]) { if (ctMarked[v]) continue; for (int t = visitTime[v].first; t < visitTime[v].second; t++) { int vt = timeToNode[t]; int d = treeLevel[vt] - baseDepth; if (d >= X.size()) { for (int i = 0, size = 1; i < logH; i++, size <<= 1) xxor ^= dist[i][(size - d) & (size - 1)]; X.push_back(xxor); } answer[vt] ^= X[d]; } } } } void dfsSolve(int u, int parent) { int size = treeSize[u]; int root = findCentroid(u, parent, size); if (parent >= 0) apply(u, parent, size, 2); // subtract u = root; apply(u, -1, size, 0); // add ctMarked[u] = true; for (int v : edges[u]) { if (!ctMarked[v]) dfsSolve(v, u); } } //--- centroid void dfsSize(int u, int parent) { treeSize[u] = 1; for (int v : edges[u]) { if (v != parent && !ctMarked[v]) { dfsSize(v, u); treeSize[u] += treeSize[v]; } } } int findCentroid(int u, int parent, int size) { bool isMajor = true; for (int v : edges[u]) { if (v == parent || ctMarked[v]) continue; int res = findCentroid(v, u, size); if (res != -1) return res; if (treeSize[v] + treeSize[v] > size) isMajor = false; } if (isMajor && 2 * (size - treeSize[u]) <= size) return u; return -1; } };
[ "youngman.ro@gmail.com" ]
youngman.ro@gmail.com
ef5aa19bb57b0e99c1ca8291579368778456229f
7a0cf4e53c690f092c94f4c711919d70f0c03630
/src/armed/DocumentContainer.cpp
bf4e71fbad89ccccda5d93b29764d3f09231132e
[ "MIT" ]
permissive
retrodump/wme
d4d6718eabd285bc59473c0911055d83e8a9052d
54cf8905091736aef0a35fe6d3e05b818441f3c8
refs/heads/master
2021-09-21T02:19:06.317073
2012-07-08T16:09:56
2012-07-08T16:09:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,605
cpp
// This file is part of Wintermute Engine // For conditions of distribution and use, see copyright notice in license.txt #include "StdAfx.h" #include "DocumentContainer.h" #include "MainWindow.h" #include "Navigator.h" #include "PropWindow.h" #include "WmeWidget.h" #include "DocumentView.h" #include "ActionManager.h" #include "DocumentView.h" #include "CanCloseDialog.h" // temp #include "DocScript.h" #include "DocScene.h" namespace Armed { ////////////////////////////////////////////////////////////////////////// DocumentContainer::DocumentContainer(MainWindow* parent) : QWidget(parent) { QVBoxLayout* vboxLayout = new QVBoxLayout(this); vboxLayout->setMargin(0); m_TabWidget = new QTabWidget(this); #ifdef Q_OS_MAC m_TabWidget->setDocumentMode(true); #endif m_TabWidget->setMovable(true); vboxLayout->addWidget(m_TabWidget); connect(m_TabWidget, SIGNAL(currentChanged(int)), this, SLOT(OnDocumentChanged(int))); // close button QToolButton* m_TabCloseButton = new QToolButton(this); m_TabCloseButton->setEnabled(true); m_TabCloseButton->setAutoRaise(true); m_TabCloseButton->setToolTip(tr("Close")); m_TabCloseButton->setIcon(QIcon(":/icons/close.png")); m_TabWidget->setCornerWidget(m_TabCloseButton, Qt::TopRightCorner); connect(m_TabCloseButton, SIGNAL(clicked()), this, SLOT(OnCloseTab())); connect(m_TabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(OnCloseTab(int))); new QShortcut(QKeySequence::Close, this, SLOT(OnCloseTab())); // context menu QTabBar* tabBar = m_TabWidget->findChild<QTabBar*>(); if (tabBar) { tabBar->setContextMenuPolicy(Qt::CustomContextMenu); connect(tabBar, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(OnTabMenu(QPoint))); } } ////////////////////////////////////////////////////////////////////////// DocumentContainer::~DocumentContainer() { } ////////////////////////////////////////////////////////////////////////// void DocumentContainer::AddDocumentView(DocumentView* doc, bool activate) { int index = m_TabWidget->addTab(doc, doc->GetTitle()); m_TabWidget->setCurrentIndex(index); connect(doc, SIGNAL(TitleChanged(QString, QString)), this, SLOT(OnTitleChanged(QString, QString))); doc->OnDocumentAdded(); } ////////////////////////////////////////////////////////////////////////// void DocumentContainer::OnDocumentChanged(int index) { MainWindow::GetInstance()->GetNavigator()->SetNavigator(NULL); MainWindow::GetInstance()->GetPropWindow()->ClearProperties(); DocumentView* doc = qobject_cast<DocumentView*>(m_TabWidget->widget(index)); ActionManager::GetInstance()->SetContextObject(ActionContext::CONTEXT_DOC, doc); if (doc) doc->OnActivate(); } ////////////////////////////////////////////////////////////////////////// void DocumentContainer::OnTitleChanged(const QString& title, const QString& desc) { int index = m_TabWidget->indexOf(qobject_cast<QWidget*>(sender())); if (index >= 0) { m_TabWidget->setTabText(index, title); m_TabWidget->setTabToolTip(index, desc); } } ////////////////////////////////////////////////////////////////////////// void DocumentContainer::OnCloseTab() { OnCloseTab(m_TabWidget->currentIndex()); } ////////////////////////////////////////////////////////////////////////// void DocumentContainer::OnCloseTab(int index) { DocumentView* doc = qobject_cast<DocumentView*>(m_TabWidget->widget(index)); if (!doc) return; if (CanClose(doc)) { m_TabWidget->removeTab(m_TabWidget->indexOf(doc)); QTimer::singleShot(0, doc, SLOT(deleteLater())); } } ////////////////////////////////////////////////////////////////////////// bool DocumentContainer::CanClose(DocumentView* singleDoc) { QList<DocumentView*> dirtyDocs; if (singleDoc) { if (singleDoc->IsDirty()) dirtyDocs.append(singleDoc); } else { for (int i = 0; i < m_TabWidget->count(); i++) { DocumentView* doc = qobject_cast<DocumentView*>(m_TabWidget->widget(i)); if (doc && doc->IsDirty()) dirtyDocs.append(doc); } } if (dirtyDocs.empty()) return true; CanCloseDialog dlg(this); qforeach (DocumentView* doc, dirtyDocs) { dlg.AddFile(doc->GetTitle(false)); } if (!dlg.exec()) return false; if (dlg.GetSave()) { qforeach (DocumentView* doc, dirtyDocs) { if (!doc->Save()) return false; } } return true; } ////////////////////////////////////////////////////////////////////////// void DocumentContainer::OnTabMenu(QPoint point) { QTabBar* tabBar = m_TabWidget->findChild<QTabBar*>(); if (!tabBar) return; // find the tab / document we clicked DocumentView* doc = NULL; for (int i = 0; i < tabBar->count(); ++i) { if (tabBar->tabRect(i).contains(point)) { doc = qobject_cast<DocumentView*>(m_TabWidget->widget(i)); break; } } if (!doc) return; QMenu menu(QLatin1String(""), tabBar); QAction* closeTab = menu.addAction(tr("Close")); QAction* pickedAction = menu.exec(tabBar->mapToGlobal(point)); if (pickedAction == closeTab) { OnCloseTab(m_TabWidget->indexOf(doc)); } } ////////////////////////////////////////////////////////////////////////// void DocumentContainer::TestData() { // temp DocScene* scene = new DocScene(this); scene->BuildActions(); //scene->Load("F:\\aaa.scene"); AddDocumentView(scene); DocScript* doc = new DocScript(this); doc->BuildActions(); doc->Load("../data/test.script"); AddDocumentView(doc); m_TabWidget->setCurrentIndex(0); } } // namespace Armed
[ "Jan Nedoma@JNML.cust.nbox.cz" ]
Jan Nedoma@JNML.cust.nbox.cz
f472ce617416b8873ec71429471dfc93d4070f24
94d91fcfdc8e8726dd1014d55b72a14b7b641413
/Sensitivity Study/AA10 LP-102 PIE1/headers/Model.h
6168815982c1f8dd009a6c6dfecc510ca5bd76ed
[]
no_license
nicriz/dose-model-root
aeb510800d27e4bafc6215dfcfa6dd197f561daa
3e6f986a1b23ac21106bf801840776dfa263a3c3
refs/heads/master
2022-03-22T17:06:32.665394
2019-12-02T10:07:10
2019-12-02T10:07:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
269
h
#ifndef MODEL_H #define MODEL_H #include "Dispersion.h" #include <vector> class Model{ public: Model( vector<double> , bool = false); double getFinal_dose(); private: vector<double> par; double final_dose; }; #endif
[ "nrizzi95@gmail.com" ]
nrizzi95@gmail.com
72bb61e96126f9beffb90b0dd14fcbff5d30e6d3
3fa73b42bbac046eece9ce395eefd0a6d0c02779
/HackerRank/cpp/stl/vector-sort/main.cpp
c0cb8c32aae60115f7688b34069d29d9df66c58f
[]
no_license
edwinkepler/beats-and-pieces
6589387e881a1ac38fb908d5256bcf9e03b0e9e1
1649e569f51901b74f7f49e7e3288ef84b8879a8
refs/heads/master
2021-01-15T10:58:09.156069
2018-07-23T17:22:00
2018-07-23T17:22:00
99,605,068
0
0
null
null
null
null
UTF-8
C++
false
false
419
cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int size; vector<int> v; cin >> size; for(int i = 0; i < size; i++) { int number; cin >> number; v.push_back(number); } sort(v.begin(), v.end()); for(int i = 0; i < size; i++) { cout << v[i] << " "; } return 0; }
[ "edwinkepler@protonmail.com" ]
edwinkepler@protonmail.com
5318b72a7012b3aa62d5bf03ab56cefc6fa61b10
475e044ac657779d4a76f83ec7f7b6a73c589f2b
/level.h
5e100c093d3a25877362b75e19e1de5473c06aab
[]
no_license
1nikhil9/mage
6d87a93a7f616037b67073abcdad650f3b5711b2
a429a3cd93dd82c05281d142e2c29741305519d1
refs/heads/master
2021-01-19T00:52:40.005918
2020-09-21T04:44:01
2020-09-21T04:44:01
73,276,286
0
0
null
null
null
null
UTF-8
C++
false
false
538
h
#ifndef LEVEL_H #define LEVEL_H #include <vector> #include <glad/glad.h> #include <glm/glm.hpp> #include "entity.h" #include "sprite_renderer.h" #include "resource_manager.h" class Level { public: std::vector<Entity> Destructible, Enchanted; GLuint Cleared, Remaining, Tries; Level() { } void Load(const GLchar *file, GLuint levelWidth, GLuint levelHeight); void Draw(SpriteRenderer &renderer); private: void init(std::vector<std::vector<GLuint>> tileData, GLuint levelWidth, GLuint levelHeight); }; #endif
[ "1nikhil9@gmail.com" ]
1nikhil9@gmail.com
5416d43407c85209f8215aa4933637db22abbc3e
9ff35738af78a2a93741f33eeb639d22db461c5f
/.build/Android-Debug/include/app/Experimental.Http.Internal.DateUtil.h
0f79fe8e211c7fcde3d8be9b61439e0216e70bac
[]
no_license
shingyho4/FuseProject-Minerals
aca37fbeb733974c1f97b1b0c954f4f660399154
643b15996e0fa540efca271b1d56cfd8736e7456
refs/heads/master
2016-09-06T11:19:06.904784
2015-06-15T09:28:09
2015-06-15T09:28:09
37,452,199
0
0
null
null
null
null
UTF-8
C++
false
false
534
h
// This file was generated based on 'C:\ProgramData\Uno\Packages\Experimental.Http\0.1.0\Internal\$.uno'. // WARNING: Changes might be lost if you edit this file directly. #ifndef __APP_EXPERIMENTAL_HTTP_INTERNAL_DATE_UTIL_H__ #define __APP_EXPERIMENTAL_HTTP_INTERNAL_DATE_UTIL_H__ #include <Uno/Uno.h> namespace app { namespace Experimental { namespace Http { namespace Internal { struct DateUtil__uType : ::uClassType { }; DateUtil__uType* DateUtil__typeof(); int DateUtil__get_TimestampNow(::uStatic* __this); }}}} #endif
[ "hyl.hsy@gmail.com" ]
hyl.hsy@gmail.com
a17995455d7c644d5553fabc2ccc1843aab2f074
397f89a526c77c5e565e428076ec3c268e8e815d
/bildmischer/src/testApp.h
9272fb76bfc8c954ff702fde0df690d152e783d3
[]
no_license
fiezi/hfsTools
1b05ccee8cd3c8c9eb676ad196f0c66a4bbe9560
497797a66566c53161f63101e82d160f2a77896b
refs/heads/master
2021-01-23T03:53:31.845493
2014-05-11T01:42:21
2014-05-11T01:42:21
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,459
h
#ifndef _TEST_APP #define _TEST_APP #include "ofxOpenCv.h" #include "ofMain.h" #include "msbOFCore.h" #include "actor.h" #include "basicButton.h" #include "textInputButton.h" #include "assignButton.h" #include "sliderButton.h" #define SCREENRESX 1366+1280 #define SCREENRESY 768 struct actorID; struct memberID; class testApp : public ofBaseApp, public Actor{ public: testApp(); virtual ~testApp(); void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void windowResized(int w, int h); //from msbOFCore void msbSetup(); void interfaceSetup(); void registerProperties(); void trigger(Actor* other); void loadSettings(); void drawText(); string linebreak(string text); ofVideoGrabber vidGrabberOne; ofVideoGrabber vidGrabberTwo; ofVideoGrabber vidGrabberThree; ofVideoPlayer apolloMovie; unsigned char * videoInverted; ofTexture videoTextureOne; ofTexture videoTextureTwo; ofTexture videoTextureThree; int camWidth; int camHeight; int selectedCam; int projectorPos; BasicButton* myBut; ofTrueTypeFont myFont; string theText; }; #endif
[ "friedrich@moviesandbox.net" ]
friedrich@moviesandbox.net
6cfea740f4c51474f6f11f08413e3699aa90b916
b8d457b9ce160911e6eba460e69c72d9d31ed260
/ArxRle/Snoop/ArxRleUiTdmIdMap.cpp
3c536bb8e70b4beb45d0c0c0e0589ba2084ff5e5
[]
no_license
inbei/AutoDesk-ArxRle-2018
b91659a34a73727987513356bfcd1bff9fe09ee3
3c8d4a34f586467685c0f9bce7c3693233e43308
refs/heads/master
2023-01-19T08:27:38.231533
2020-11-25T00:52:13
2020-11-25T00:52:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,789
cpp
// ////////////////////////////////////////////////////////////////////////////// // // Copyright 2017 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // ////////////////////////////////////////////////////////////////////////////// // #include "StdAfx.h" #if defined(_DEBUG) && !defined(AC_FULL_DEBUG) #error _DEBUG should not be defined except in internal Adesk debug builds #endif #include "ArxRleUiTdmIdMap.h" #include "ArxRleUiTdcIdMap.h" #include "ArxRle.h" #include "AcadUtils/ArxRleSelSet.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif /**************************************************************************** ** ** ArxRleUiTdmIdMap::ArxRleUiTdmIdMap ** ** **jma ** *************************************/ ArxRleUiTdmIdMap::ArxRleUiTdmIdMap(AcDbIdMapping* idMap, CWnd* parent, const TCHAR* winTitle) : CAcUiTabMainDialog(ArxRleUiTdmIdMap::IDD, parent, ArxRleApp::getApp()->dllInstance()) { SetDialogName(_T("ArxRle-IdMap")); if (winTitle != NULL) m_winTitle = winTitle; m_tdcIdMap = new ArxRleUiTdcIdMap(idMap); //{{AFX_DATA_INIT(ArxRleUiTdmIdMap) //}}AFX_DATA_INIT } /**************************************************************************** ** ** ArxRleUiTdmIdMap::~ArxRleUiTdmIdMap ** ** **jma ** *************************************/ ArxRleUiTdmIdMap::~ArxRleUiTdmIdMap() { delete m_tdcIdMap; } /**************************************************************************** ** ** ArxRleUiTdmIdMap::DoDataExchange ** ** **jma ** *************************************/ void ArxRleUiTdmIdMap::DoDataExchange(CDataExchange* pDX) { CAcUiTabMainDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(ArxRleUiTdmIdMap) DDX_Control(pDX, ARXRLE_IDMAP_TAB, m_tabCtrl); //}}AFX_DATA_MAP } ///////////////////////////////////////////////////////////////////////////// // ArxRleUiTdmIdMap message map BEGIN_MESSAGE_MAP(ArxRleUiTdmIdMap, CAcUiTabMainDialog) //{{AFX_MSG_MAP(ArxRleUiTdmIdMap) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // ArxRleUiTdmIdMap message handlers /**************************************************************************** ** ** ArxRleUiTdmIdMap::OnInitDialog ** ** **jma ** *************************************/ BOOL ArxRleUiTdmIdMap::OnInitDialog() { CAcUiTabMainDialog::OnInitDialog(); if (m_winTitle.IsEmpty() == FALSE) SetWindowText(m_winTitle); SetAcadTabPointer(&m_tabCtrl); AddTab(0, _T("Id Mapping"), ArxRleUiTdcIdMap::IDD, m_tdcIdMap); return TRUE; }
[ "fb19801101@126.com" ]
fb19801101@126.com
1b5a61b940db274e64dfcb2524ffd992c34470c8
3b69a62bebfa385549dd245e85a32ca64be35288
/src/pipe_linux.cpp
51705bb4d4f2eeec30bd22f1f26f70e51d5e01ee
[ "BSD-2-Clause" ]
permissive
ricky26/netlib
29c045c78da48e153ce330f19d61d323cd924e93
f4d86475220ae32f0ab25e83fb8dc004f5f1af60
refs/heads/master
2016-09-06T06:52:00.990375
2012-10-19T20:21:43
2012-10-19T20:21:43
4,078,861
1
0
null
null
null
null
UTF-8
C++
false
false
4,413
cpp
#include "netlib/pipe.h" #include "netlib/socket.h" #include "netlib_linux.h" #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h> #include <iostream> #include <cstring> namespace netlib { // // pipe_internal // struct pipe_internal: public ref_counted { int fd; aio_struct aio; pipe_internal(int _fd=-1) { fd = _fd; } ~pipe_internal() { if(fd != -1) ::close(fd); } static inline pipe_internal *get(void *_ptr) { return static_cast<pipe_internal*>(_ptr); } }; // // pipe // pipe::pipe() { mInternal = nullptr; } pipe::pipe(int _handle) { pipe_internal *pi = new pipe_internal(_handle); if(_handle != -1) pi->aio.make_nonblocking(_handle); mInternal = pi; } pipe::pipe(pipe const& _p) { pipe_internal *pi = pipe_internal::get(_p.mInternal); pi->acquire(); mInternal = pi; } pipe::pipe(pipe &&_p) { pipe_internal *pi = pipe_internal::get(_p.mInternal); _p.mInternal = nullptr; mInternal = pi; } pipe::~pipe() { if(pipe_internal *pi = pipe_internal::get(mInternal)) pi->release(); } bool pipe::valid() const { return pipe_internal::get(mInternal)->fd != -1; } int pipe::handle() const { return pipe_internal::get(mInternal)->fd; } int pipe::release() { pipe_internal *pi = pipe_internal::get(mInternal); int hdl = pi->fd; pi->fd = -1; return hdl; } bool pipe::open(std::string const& _pipe) { pipe_internal *pi = pipe_internal::get(mInternal); if(pi->fd != -1) return false; int fd = ::socket(AF_UNIX, SOCK_STREAM, 0); if(fd == -1) return false; sockaddr_un addr; addr.sun_family = AF_UNIX; std::strcpy(addr.sun_path, _pipe.c_str()); pi->aio.make_nonblocking(fd); int len = sizeof(addr.sun_family) + _pipe.length(); pi->aio.begin_out(); int ret = connect(fd, (sockaddr*)&addr, len); if(ret == -1 && errno == EAGAIN) { uthread::current()->suspend(); ret = connect(fd, (sockaddr*)&addr, len); } pi->aio.end_out(); if(ret < 0) { ::close(fd); return false; } pi->fd = fd; return true; } bool pipe::create(std::string const& _pipe) { pipe_internal *pi = pipe_internal::get(mInternal); if(pi->fd != -1) return false; int fd = ::socket(AF_UNIX, SOCK_STREAM, 0); if(fd == -1) return false; sockaddr_un addr; addr.sun_family = AF_UNIX; std::strcpy(addr.sun_path, _pipe.c_str()); int len = sizeof(addr.sun_family) + _pipe.length(); int ret = bind(fd, (sockaddr*)&addr, len); if(ret < 0) { ::close(fd); return false; } ret = ::listen(fd, 5); if(ret < 0) { ::close(fd); return false; } pi->aio.make_nonblocking(fd); pi->fd = fd; return true; } pipe pipe::accept() { pipe_internal *pi = pipe_internal::get(mInternal); if(pi->fd == -1) return pipe(); sockaddr_un addr; socklen_t len = sizeof(addr); pi->aio.begin_in(); int ret = ::accept(pi->fd, (sockaddr*)&addr, &len); if(ret < 0 && errno == EAGAIN) { uthread::current()->suspend(); ret = ::accept(pi->fd, (sockaddr*)&addr, &len); } pi->aio.end_in(); if(ret == -1) { close(); return pipe(); } return std::move(pipe(ret)); } void pipe::close() { pipe_internal *pi = pipe_internal::get(mInternal); if(pi->fd == -1) return; ::close(pi->fd); pi->fd = -1; } size_t pipe::read(void *_buffer, size_t _amt) { pipe_internal *pi = pipe_internal::get(mInternal); if(pi->fd == -1) return 0; pi->aio.begin_in(); int ret = ::read(pi->fd, _buffer, _amt); if(ret < 0 && errno == EAGAIN) { uthread::current()->suspend(); ret = ::read(pi->fd, _buffer, _amt); } pi->aio.end_in(); if(ret < 0) { close(); return 0; } return ret; } size_t pipe::write(const void *_buffer, size_t _amt) { pipe_internal *pi = pipe_internal::get(mInternal); if(pi->fd == -1) return 0; pi->aio.begin_out(); int ret = ::write(pi->fd, _buffer, _amt); if(ret < 0 && errno == EAGAIN) { uthread::current()->suspend(); ret = ::write(pi->fd, _buffer, _amt); } pi->aio.end_out(); if(ret < 0) { close(); return 0; } return ret; } socket pipe::read() { return socket(); // TODO: Write this. } bool pipe::write(socket &_sock) { return false; // TODO: Write zis. } bool pipe::init() { return true; } void pipe::think() { } void pipe::shutdown() { } }
[ "rickytaylor26@gmail.com" ]
rickytaylor26@gmail.com
2bf6c973b72c9bcfb39a95514ec79f34c95d5930
fea469fa3d7da7bd3246de8f72c5d30bed016b70
/stack.cpp
3a80a8a765b8255c0c49e66a16c365ae6fa8cd58
[]
no_license
Amil-Gupta/hacktoberfest-2021
23583258c9f1199815314e3cfd39f22967adc350
fc39d831e9b9dd9b2cdbd8bf380274de1535a798
refs/heads/main
2023-08-19T14:33:47.188340
2021-10-31T15:46:57
2021-10-31T15:46:57
414,146,134
0
4
null
2021-10-31T16:22:42
2021-10-06T09:21:23
C
UTF-8
C++
false
false
2,508
cpp
#include <bits/stdc++.h> using namespace std; // Declare linked list node struct Node { int data; struct Node* link; }; struct Node* top; // Utility function to add an element // data in the stack insert at the beginning void push(int data) { // Create new node temp and allocate memory struct Node* temp; temp = new Node(); // Check if stack (heap) is full. // Then inserting an element would // lead to stack overflow if (!temp) { cout << "\nHeap Overflow"; exit(1); } // Initialize data into temp data field temp->data = data; // Put top pointer reference into temp link temp->link = top; // Make temp as top of Stack top = temp; } // Utility function to check if // the stack is empty or not int isEmpty() { return top == NULL; } // Utility function to return top element in a stack int peek() { // Check for empty stack if (!isEmpty()) return top->data; else exit(1); } // Utility function to pop top // element from the stack void pop() { struct Node* temp; // Check for stack underflow if (top == NULL) { cout << "\nStack Underflow" << endl; exit(1); } else { // Top assign into temp temp = top; // Assign second node to top top = top->link; // Destroy connection between // first and second temp->link = NULL; // Release memory of top node free(temp); } } // Function to print all the // elements of the stack void display() { struct Node* temp; // Check for stack underflow if (top == NULL) { cout << "\nStack Underflow"; exit(1); } else { temp = top; while (temp != NULL) { // Print node data cout << temp->data << "-> "; // Assign temp link to temp temp = temp->link; } } } // Driver Code int main() { // Push the elements of stack push(11); push(22); push(33); push(44); // Display stack elements display(); // Print top element of stack cout << "\nTop element is " << peek() << endl; // Delete top elements of stack pop(); pop(); // Display stack elements display(); // Print top element of stack cout << "\nTop element is " << peek() << endl; return 0; }
[ "noreply@github.com" ]
Amil-Gupta.noreply@github.com
33e556bff44b58bff3d3234e3f16c57b13dd1d7d
ba3abe659d1939b7425693f1c59c34e193987973
/src/applicationui.cpp
32bd356dca303ce8d0dddd5d1a63a87f299be0d0
[]
no_license
rileyBloomfield/Pokedex
8ad284ea0c78dcb76f6bfff986f979580327f2fe
10f48129d59358e03d5fefc447c9ed1519d141f2
refs/heads/master
2016-09-06T15:33:09.293066
2014-09-21T17:52:30
2014-09-21T17:52:30
24,298,262
0
0
null
null
null
null
UTF-8
C++
false
false
5,131
cpp
#include "applicationui.h" #include <bb/cascades/Application> #include <bb/cascades/QmlDocument> #include <bb/cascades/AbstractPane> #include <bb/cascades/DropDown> #include <bb/cascades/RadioGroup> #include <bb/cascades/Label> #include <bb/cascades/ListView> #include <iostream> #include "pokemonlist.h" using namespace bb::cascades; using std::cerr; using std::endl; const QString ENG = "9"; const QString JAP = "1"; ApplicationUI::ApplicationUI(bb::cascades::Application *app) :QObject(app), m_pokemonList(0) { // Create scene document from main.qml asset, the parent is set // to ensure the document gets destroyed properly at shut down. QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this); // Create root object for the UI m_root = qml->createRootObject<AbstractPane>(); // Set the handle for the "pokedex" object from QML qml->setContextProperty("pokedex", this); // Create the "model" to store data about pokemon m_pokemonList = new PokemonList(this); qml->setContextProperty("pokemon_list", m_pokemonList); //Create array of pokemon the size of the number of pokemon in the pokemon types m_pokemonList->setNumberPokemon(m_pokemonList->assignPokemonNumber()); m_pokemonList->all_pokemon = new Pokemon[m_pokemonList->getNumberPokemon()]; // Populate radio buttons for language settings RadioGroup *radio(0); // A pointer to hold the RadioGroup UI object // Search the root QML object for a control named "pokemon_types" radio = m_root->findChild<RadioGroup *>("pokedex_languages"); //Access setPokedexLanguages function from PokemonList class to set languages on language menu m_pokemonList->assignPokedexLanguages(); //Populate buttons if (radio) // did we succeed in getting a pointer to the radio button UI control? { for (int i(0); i<10; i++) { if (i==0 && m_pokemonList->getLanguage()==JAP) //if starting on japanese, make selected radio->add(Option::create().text(m_pokemonList->m_pokedex_languages.at(i)).value(1).selected(true)); if (i==8 && m_pokemonList->getLanguage()==ENG) //if starting on english, make selected radio->add(Option::create().text("English").value(9).selected(true)); if (i==7 && m_pokemonList->getLanguage()==JAP) radio->add(Option::create().text("English").value(9)); else radio->add(Option::create().text(m_pokemonList->m_pokedex_languages.at(i)).value(i+1)); // Add another option } } // Set created root object as the application scene app->setScene(m_root); } void ApplicationUI::typeSelected(int type) { cerr << "In typeSelected() with " << "type=" << type << endl; ListView *pokeList(0); pokeList = m_root->findChild<ListView*>(); //Selects the Listview pokeList->resetDataModel(); //unloads the data m_pokemonList->setTypeId(type); pokeList->setDataModel(m_pokemonList); //reloads the data //m_pokemonList->m_list_size = m_pokemonList->m_temp_list.length(); Label *status(0); // A pointer to hold the Label UI object // Search the root QML object for a control named "status" status = m_root->findChild<Label *>("pokedex_status"); if (status) { // did we succeed in getting a pointer to the Label UI control? // Yes. Now set the text as appropriate status->setText( QString("Found %1 Pok").arg(m_pokemonList->childCount(QVariantList())) +QChar(0x0E9)+QString("mon") ); } else { cerr << "failed to find status " << endl; } } void ApplicationUI::languageSelected(int language) { cerr << "In languageSelected() with " << "language=" << language << endl; QString out = QString::number(language); //convert language int to a string m_pokemonList->setLanguage(out); //assign to pokemonList language member variable ListView *pokeList(0); pokeList = m_root->findChild<ListView*>(); //Selects the Listview pokeList->resetDataModel(); //unloads the data m_pokemonList->setListInit(true); //assure complete repopulation pokeList->setDataModel(m_pokemonList); //reloads the data initDropdown(); //call to empty and repopulate dropdown } void ApplicationUI::initDropdown() { // Populate the dropdown list of types DropDown *dropDown(0); // pointer to hold the DropDown UI object // Search the root QML object for a control named "pokemon_types" dropDown = m_root->findChild<DropDown *>("pokemon_types"); //remove all elements from dropdown dropDown->removeAll(); //call assignTypes function from PokemonList class to assign types with selected language m_pokemonList->assignPokedexTypes(); //repopulate dropdown menu with chaged types if (dropDown) { if (m_pokemonList->getLanguage()==JAP) //if language is japanese { QString all_types = QString::fromLocal8Bit("すべてのタイプ")+" [All Types]"; dropDown->add(Option::create().text(all_types).value(-1).selected(true)); //change all types to japanese } else dropDown->add(Option::create().text("All Types").value(-1).selected(true)); for (int i(0); i<18; i++) { dropDown->add(Option::create().text(m_pokemonList->m_pokedex_types[i]).value(i+1)); } } }
[ "riley.bloomfield@gmail.com" ]
riley.bloomfield@gmail.com
3afdd21aab3c52577df1163a5807da47421e48fd
bd3013a1d6612a5e11ee75db70d65b394d87bbf0
/src/ukf.cpp
5f7b2db4fd109917d4221251f4b2f47abeaaa04d
[ "MIT" ]
permissive
jtwolak/CarND-Unscented-Kalman-Filter
9fac3e1dec49365ea391b5b48a980401e2209e5a
2bb63b3bc69bbe78ca4bdf705680eb8bb2d4ddc9
refs/heads/master
2020-03-25T19:12:56.369976
2018-08-08T21:57:25
2018-08-08T21:57:25
144,070,983
0
0
null
null
null
null
UTF-8
C++
false
false
12,620
cpp
#include "ukf.h" #include "Eigen/Dense" #include <iostream> using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; using std::vector; /** * Initializes Unscented Kalman filter * This is scaffolding, do not modify */ UKF::UKF() { // if this is false, laser measurements will be ignored (except during init) use_laser_ = true; // if this is false, radar measurements will be ignored (except during init) use_radar_ = true; // initial state vector x_ = VectorXd(5); // initial covariance matrix P_ = MatrixXd(5, 5); // Process noise standard deviation longitudinal acceleration in m/s^2 std_a_ = 3; // 30; // Process noise standard deviation yaw acceleration in rad/s^2 std_yawdd_ = 3; // 30; //DO NOT MODIFY measurement noise values below these are provided by the sensor manufacturer. // Laser measurement noise standard deviation position1 in m std_laspx_ = 0.15; // Laser measurement noise standard deviation position2 in m std_laspy_ = 0.15; // Radar measurement noise standard deviation radius in m std_radr_ = 0.3; // Radar measurement noise standard deviation angle in rad std_radphi_ = 0.03; // Radar measurement noise standard deviation radius change in m/s std_radrd_ = 0.3; //DO NOT MODIFY measurement noise values above these are provided by the sensor manufacturer. /** TODO: Complete the initialization. See ukf.h for other member properties. Hint: one or more values initialized above might be wildly off... */ n_x_ = 5; //set state dimension n_aug_ = 7; //set augmented dimension lambda_ = 3 - n_aug_; //define spreading parameter Xsig_pred_ = MatrixXd(n_x_, 2 * n_aug_ + 1); //allocate matrix for predicted sigma points weights_ = VectorXd(2 * n_aug_ + 1); //allocate vector for weights //calculate weights for Radar update float w = 1 / (2 * (lambda_ + n_aug_)); weights_.fill(w); w = lambda_ / (lambda_ + n_aug_); weights_(0) = w; // For Lidar update H_ = MatrixXd(2, 5); H_ << 1, 0, 0, 0, 0, 0, 1, 0, 0, 0; R_ = MatrixXd(2, 2); R_ << std_laspx_* std_laspx_, 0, 0, std_laspy_*std_laspy_; } UKF::~UKF() {} /** * @param {MeasurementPackage} meas_package The latest measurement data of * either radar or laser. */ void UKF::ProcessMeasurement(MeasurementPackage meas_package) { /** TODO: Complete this function! Make sure you switch between lidar and radar measurements. */ if (((meas_package.sensor_type_ == MeasurementPackage::RADAR) && !use_radar_) || ((meas_package.sensor_type_ == MeasurementPackage::LASER) && !use_laser_)) { /* this is need to prevent the main() routine from crashing because it tries to * read data from "x_" that may not have been initialized. */ if (!is_initialized_) { x_ << 1, 1, 1, 1, 1; } return; } /* Sanity check. We need to re-init when we want to switch between Datatset1 * and Dataset2 or if we want to Restart the current Dataset * without re-launching the application */ if (time_us_ != 0) { if (time_us_ > meas_package.timestamp_) { is_initialized_ = 0; } else { float diff = (meas_package.timestamp_ - time_us_) / 1000000.0; if (diff > 1000000) { is_initialized_ = 0; } } } /***************************************************************************** * Initialization ****************************************************************************/ if (!is_initialized_) { /** TODO: * Initialize the state ekf_.x_ with the first measurement. * Create the covariance matrix. * Remember: you'll need to convert radar from polar to cartesian coordinates. */ //step_ = 0; // first measurement cout << "UKF: " << endl; // init state x_ << 1, 1, 1, 1, 1; // init matrix P P_ << 0.2, 0, 0, 0, 0, 0, 0.2, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0.2, 0, 0, 0, 0, 0, 0.2; time_us_ = meas_package.timestamp_; if (meas_package.sensor_type_ == MeasurementPackage::RADAR) { /** Convert radar from polar to cartesian coordinates and initialize state. */ float ro = meas_package.raw_measurements_[0]; float phi = meas_package.raw_measurements_[1]; float rho_dot = meas_package.raw_measurements_[2]; float px = ro * cos(phi); float py = ro * sin(phi); x_ << px, py, rho_dot, 0, 0; } else if (meas_package.sensor_type_ == MeasurementPackage::LASER) { /** Initialize state. */ float px = meas_package.raw_measurements_[0]; float py = meas_package.raw_measurements_[1]; x_ << px, py, 0, 0, 0; } // done initializing, no need to predict or update is_initialized_ = true; return; } /***************************************************************************** * Prediction ****************************************************************************/ // 1. compute the time elapsed between the current and previous measurements float dt = (meas_package.timestamp_ - time_us_) / 1000000.0; //dt - expressed in seconds time_us_ = meas_package.timestamp_; //2. Call the Unscented Kalman Filter prediction function Prediction(dt); /***************************************************************************** * Update ****************************************************************************/ if (meas_package.sensor_type_ == MeasurementPackage::RADAR) { /* * Radar updates */ UpdateRadar(meas_package); } else { /* * Laser updates */ UpdateLidar(meas_package); } // print the output // cout << "x_ = " << ekf_.x_ << endl; // cout << "P_ = " << ekf_.P_ << endl; //step_++; } /** * Predicts sigma points, the state, and the state covariance matrix. * @param {double} delta_t the change in time (in seconds) between the last * measurement and this one. */ void UKF::Prediction(double delta_t) { /** TODO: Complete this function! Estimate the object's location. Modify the state vector, x_. Predict sigma points, the state, and the state covariance matrix. */ /*====================================== *=== 1. Generate Sigma Points ==== *======================================*/ /* * 1.1 create augmented mean vector */ VectorXd x_aug = VectorXd(n_aug_); x_aug.fill(0.0); x_aug.head(n_x_) = x_; /* * 1.2 create augmented state covariance */ MatrixXd P_aug = MatrixXd(n_aug_, n_aug_); P_aug.fill(0.0); P_aug.topLeftCorner(n_x_, n_x_) = P_; P_aug(n_x_, n_x_) = std_a_ * std_a_; P_aug(n_x_ + 1, n_x_ + 1) = std_yawdd_ * std_yawdd_; /* * 1.3 create square root matrix */ MatrixXd A = P_aug.llt().matrixL(); /* * 1.4 create augmented sigma points matrix */ MatrixXd Xsig_aug = MatrixXd(n_aug_, 2 * n_aug_ + 1); Xsig_aug.col(0) = x_aug; for (int i = 0; i < n_aug_; i++) { Xsig_aug.col(i + 1) = x_aug + sqrt(lambda_ + n_aug_) * A.col(i); Xsig_aug.col(i + 1 + n_aug_) = x_aug - sqrt(lambda_ + n_aug_) * A.col(i); } /*==================================== *=== 2. Predict Sigma Points ==== *====================================*/ /* * 2.1 calculate Predicted Sigma Points. Each column is one sigma point. */ VectorXd x = VectorXd(n_aug_); VectorXd x_pred = VectorXd(n_x_); double delta_t2 = delta_t * delta_t; for (int i = 0; i < (2 * n_aug_ + 1); i++) { x = Xsig_aug.col(i); if (x(4) == 0.0) { x_pred(0) = x(0) + (x(2)*cos(x(3))*delta_t) + (0.5*delta_t2*cos(x(3))*x(5)); x_pred(1) = x(1) + (x(2)*sin(x(3))*delta_t) + (0.5*delta_t2*sin(x(3))*x(5)); x_pred(2) = x(2) + 0 + (delta_t*x(5)); x_pred(3) = x(3) + (x(4)*delta_t) + (0.5*delta_t2*x(6)); x_pred(4) = x(4) + 0 + (delta_t*x(6)); } else { x_pred(0) = x(0) + (x(2) / x(4))*(sin(x(3) + x(4)*delta_t) - sin(x(3))) + (0.5*delta_t2*cos(x(3))*x(5)); x_pred(1) = x(1) + (x(2) / x(4))*(-cos(x(3) + x(4)*delta_t) + cos(x(3))) + (0.5*delta_t2*sin(x(3))*x(5)); x_pred(2) = x(2) + 0 + (delta_t*x(5)); x_pred(3) = x(3) + (x(4)*delta_t) + (0.5*delta_t2*x(6)); x_pred(4) = x(4) + 0 + (delta_t*x(6)); } Xsig_pred_.col(i) = x_pred; } /*============================================ *=== 3. Predict Mean and Covariance ==== *============================================*/ /* * 3.1 calculate predict state mean */ x_.fill(0.0); for (int i = 0; i < 1 + (2 * n_aug_); i++) { x_ = x_ + weights_(i)*Xsig_pred_.col(i); } /* * 3.2 calculate predict state covariance matrix */ VectorXd tmp; P_.fill(0.0); for (int i = 0; i < 1 + (2 * n_aug_); i++) { tmp = (Xsig_pred_.col(i) - x_); while (tmp(3)> M_PI) tmp(3) -= 2.*M_PI; while (tmp(3)<-M_PI) tmp(3) += 2.*M_PI; P_ += weights_(i) * tmp * tmp.transpose(); } } /** * Updates the state and the state covariance matrix using a laser measurement. * @param {MeasurementPackage} meas_package */ void UKF::UpdateLidar(MeasurementPackage meas_package) { /** TODO: Complete this function! Use lidar data to update the belief about the object's position. Modify the state vector, x_, and covariance, P_. You'll also need to calculate the lidar NIS. */ int n_z = 2; VectorXd z = VectorXd(n_z); z(0) = meas_package.raw_measurements_(0); z(1) = meas_package.raw_measurements_(1); VectorXd z_pred = H_ * x_; VectorXd y = z - z_pred; MatrixXd Ht = H_.transpose(); MatrixXd S = H_ * P_ * Ht + R_; MatrixXd Si = S.inverse(); MatrixXd PHt = P_ * Ht; MatrixXd K = PHt * Si; //new estimate x_ = x_ + (K * y); long x_size = x_.size(); MatrixXd I = MatrixXd::Identity(x_size, x_size); P_ = (I - K * H_) * P_; } /** * Updates the state and the state covariance matrix using a radar measurement. * @param {MeasurementPackage} meas_package */ void UKF::UpdateRadar(MeasurementPackage meas_package) { /** TODO: Complete this function! Use radar data to update the belief about the object's position. Modify the state vector, x_, and covariance, P_. You'll also need to calculate the radar NIS. */ /*==================================== *=== 1. Predict Measurement === *===================================*/ /* * 1.1 create matrix for sigma points in measurement space */ int n_z = 3; //set measurement dimension, radar can measure r, phi, and r_dot MatrixXd Zsig = MatrixXd(n_z, 2 * n_aug_ + 1); /* * 1.2 transform sigma points into measurement space */ VectorXd x; VectorXd z_tmp = VectorXd(3); for (int i = 0; i < 2 * n_aug_ + 1; i++) { x = Xsig_pred_.col(i); z_tmp(0) = sqrt(x(0)*x(0) + x(1)*x(1)); z_tmp(1) = atan2(x(1), x(0)); z_tmp(2) = (x(0)*cos(x(3))*x(2) + x(1)*sin(x(3))*x(2)) / z_tmp(0); Zsig.col(i) = z_tmp; } /* * 1.3. calculate mean predicted measurement */ VectorXd z_pred = VectorXd(n_z); z_pred.fill(0.0); for (int i = 0; i < 2 * n_aug_ + 1; i++) { z_pred += weights_(i)*Zsig.col(i); } /* * 1.4 calculate innovation covariance matrix S */ MatrixXd S = MatrixXd(n_z, n_z); VectorXd z_diff; S.fill(0.0); for (int i = 0; i < 2 * n_aug_ + 1; i++) { z_diff = Zsig.col(i) - z_pred; //angle normalization while (z_diff(1)> M_PI) z_diff(1) -= 2.*M_PI; while (z_diff(1)<-M_PI) z_diff(1) += 2.*M_PI; S += weights_(i)*z_diff*z_diff.transpose(); } /* * 1.5 add measurement noise covariance matrix */ MatrixXd R = MatrixXd(n_z, n_z); R << std_radr_ * std_radr_, 0, 0, 0, std_radphi_*std_radphi_, 0, 0, 0, std_radrd_*std_radrd_; S = S + R; /*============================== *=== 2. Update State === *==============================*/ /* * 2.1 calculate cross correlation matrix */ MatrixXd Tc = MatrixXd(n_x_, n_z); VectorXd x_diff; Tc.fill(0.0); for (int i = 0; i < 2 * n_aug_ + 1; i++) { x_diff = Xsig_pred_.col(i) - x_; //angle normalization while (x_diff(3)> M_PI) x_diff(3) -= 2.*M_PI; while (x_diff(3)<-M_PI) x_diff(3) += 2.*M_PI; z_diff = Zsig.col(i) - z_pred; //angle normalization while (z_diff(1)> M_PI) z_diff(1) -= 2.*M_PI; while (z_diff(1)<-M_PI) z_diff(1) += 2.*M_PI; Tc += weights_(i) * x_diff * z_diff.transpose(); } /* * 2.2 calculate Kalman gain K; */ MatrixXd K = Tc * S.inverse(); /* * 2.3 update state mean and covariance matrix */ VectorXd z = VectorXd(3); z(0) = meas_package.raw_measurements_(0); z(1) = meas_package.raw_measurements_(1); z(2) = meas_package.raw_measurements_(2); z_diff = z - z_pred; while (z_diff(1)> M_PI) z_diff(1) -= 2.*M_PI; while (z_diff(1)<-M_PI) z_diff(1) += 2.*M_PI; x_ = x_ + K * z_diff; P_ = P_ - K * S*K.transpose(); }
[ "jtwolak@yahoo.com" ]
jtwolak@yahoo.com
d32158b890cdd74768e12d5a020fa14339133169
ea91bffc446ca53e5942a571c2f7090310376c9d
/src/utils/Compression.cpp
a1b5333e8680303f4e6bc3b3bac85e42749d1712
[]
no_license
macro-l/polarphp
f7b1dc4b609f1aae23b4618fc1176b8c26531722
f6608c4dc26add94e61684ed0edd3d5c7e86e768
refs/heads/master
2022-07-21T23:37:02.237733
2019-08-15T10:32:06
2019-08-15T10:32:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,011
cpp
// This source file is part of the polarphp.org open source project // // Copyright (c) 2017 - 2019 polarphp software foundation // Copyright (c) 2017 - 2019 zzu_softboy <zzu_softboy@163.com> // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://polarphp.org/LICENSE.txt for license information // See https://polarphp.org/CONTRIBUTORS.txt for the list of polarphp project authors // // Created by polarboy on 2018/07/03. #include "polarphp/utils/Compression.h" #include "polarphp/basic/adt/SmallVector.h" #include "polarphp/basic/adt/StringRef.h" #include "polarphp/utils/Error.h" #include "polarphp/utils/ErrorHandling.h" #if defined(POLAR_ENABLE_ZLIB) && defined(HAVE_ZLIB_H) #include <zlib.h> #endif namespace polar { namespace utils { namespace zlib { #if defined(POLAR_ENABLE_ZLIB) && defined(HAVE_LIBZ) namespace { Error create_error(StringRef error) { return make_error<StringError>(error, inconvertible_error_code()); } StringRef convert_zlib_code_to_string(int code) { switch (code) { case Z_MEM_ERROR: return "zlib error: Z_MEM_ERROR"; case Z_BUF_ERROR: return "zlib error: Z_BUF_ERROR"; case Z_STREAM_ERROR: return "zlib error: Z_STREAM_ERROR"; case Z_DATA_ERROR: return "zlib error: Z_DATA_ERROR"; case Z_OK: default: polar_unreachable("unknown or unexpected zlib status code"); } } } // anonymous namespace bool is_available() { return true; } Error compress(StringRef inputBuffer, SmallVectorImpl<char> &compressedBuffer, int level) { unsigned long compressedSize = ::compressBound(inputBuffer.getSize()); compressedBuffer.resize(compressedSize); int res = ::compress2((Bytef *)compressedBuffer.getData(), &compressedSize, (const Bytef *)inputBuffer.getData(), inputBuffer.size(), level); // Tell MemorySanitizer that zlib output buffer is fully initialized. // This avoids a false report when running LLVM with uninstrumented ZLib. __msan_unpoison(compressedBuffer.getData(), compressedSize); compressedBuffer.setSize(compressedSize); return res ? create_error(convert_zlib_code_to_string(res)) : Error::getSuccess(); } Error uncompress(StringRef inputBuffer, char *uncompressedBuffer, size_t &uncompressedSize) { int res = ::uncompress((Bytef *)uncompressedBuffer, (uLongf *)&uncompressedSize, (const Bytef *)inputBuffer.getData(), inputBuffer.getSize()); // Tell MemorySanitizer that zlib output buffer is fully initialized. // This avoids a false report when running LLVM with uninstrumented ZLib. __msan_unpoison(uncompressedBuffer, uncompressedSize); return res ? create_error(convert_zlib_code_to_string(res)) : Error::getSuccess(); } Error uncompress(StringRef inputBuffer, SmallVectorImpl<char> &uncompressedBuffer, size_t uncompressedSize) { uncompressedBuffer.resize(uncompressedSize); Error error = uncompress(inputBuffer, uncompressedBuffer.getData(), uncompressedSize); uncompressedBuffer.resize(uncompressedSize); return error; } uint32_t crc32(StringRef buffer) { return ::crc32(0, (const Bytef *)buffer.getData(), buffer.getSize()); } #else bool is_available() { return false; } Error compress(StringRef inputBuffer, SmallVectorImpl<char> &compressedBuffer, int level) { polar_unreachable("zlib::compress is unavailable"); } Error uncompress(StringRef inputBuffer, char *uncompressedBuffer, size_t &uncompressedSize) { polar_unreachable("zlib::uncompress is unavailable"); } Error uncompress(StringRef inputBuffer, SmallVectorImpl<char> &uncompressedBuffer, size_t uncompressedSize) { polar_unreachable("zlib::uncompress is unavailable"); } uint32_t crc32(StringRef buffer) { polar_unreachable("zlib::crc32 is unavailable"); } #endif } // zlib } // utils } // polar
[ "zzu_softboy@163.com" ]
zzu_softboy@163.com
32a03cc2ce0efbcbbc3cf81b0de3446d46aa2c92
d786675f274b98fd3fbf88e90748f50967374fce
/RayTracer/Disk.cpp
b61c08a3a3a28bbbb2ee0ec754a463d9e3f05ebc
[]
no_license
sufian-latif/raytracer
e9235b8ad625c73fba87783e8c6dee9de77195b6
5e18c78acfc50e06eb2cdf9940fa1a9f382d718f
refs/heads/master
2021-05-30T19:19:28.804462
2014-03-07T20:05:11
2014-03-07T20:05:11
null
0
0
null
null
null
null
UTF-8
C++
false
false
358
cpp
// // Disk.cpp // RayTracing // // Created by Sufian Latif on 1/24/14. // // #include "Disk.h" Disk::Disk(Vector c, Vector normal, double r) : Plane(c, normal) { radius = r; } double Disk::getIntersection(Ray ray) { double t = Plane::getIntersection(ray); Vector p = ray.origin + t * ray.dir; return (p - pp).mag() > radius ? -1 : t; }
[ "sufianlatif@Sufians-Macbook-Pro.local" ]
sufianlatif@Sufians-Macbook-Pro.local
eb4ecd85060a960bb03d9da036655e9bba307904
387549ab27d89668e656771a19c09637612d57ed
/DRGLib UE project/Source/FSDEngine/Private/CSGSDFInstanceComponent.cpp
03f7c9f27d92d98ea9b85001bcb3c91bf8b130c9
[ "MIT" ]
permissive
SamsDRGMods/DRGLib
3b7285488ef98b7b22ab4e00fec64a4c3fb6a30a
76f17bc76dd376f0d0aa09400ac8cb4daad34ade
refs/heads/main
2023-07-03T10:37:47.196444
2023-04-07T23:18:54
2023-04-07T23:18:54
383,509,787
16
5
MIT
2023-04-07T23:18:55
2021-07-06T15:08:14
C++
UTF-8
C++
false
false
96
cpp
#include "CSGSDFInstanceComponent.h" UCSGSDFInstanceComponent::UCSGSDFInstanceComponent() { }
[ "samamstar@gmail.com" ]
samamstar@gmail.com
24de994e7439a3f18c779c05c71c4c2ff11c7f5b
5136c5760ebd836332b2d25aa642cafa65c9933f
/Payroll/Damilola_Ogunsola_Assignment6/SalariedEmployee.cpp
c5e7d768946db99c8c98810fe30d8167bd3946e7
[]
no_license
Olapeju/Payroll
1d07a82126861b64a225376368edbc50c496a33a
744f7d524a59f1f4c8ffab461a13dcca8ca4da66
refs/heads/master
2020-04-15T14:08:50.434613
2019-01-08T22:28:44
2019-01-08T22:28:44
164,743,535
0
0
null
null
null
null
UTF-8
C++
false
false
1,315
cpp
// Fig. 12.12: SalariedEmployee.cpp // SalariedEmployee class member-function definitions. #include <iostream> #include <stdexcept> #include "SalariedEmployee.h" // SalariedEmployee class definition using namespace std; // constructor SalariedEmployee::SalariedEmployee(const string &first, const string &last, const string &ssn, int month, int day, int year, double salary) : Employee(first, last, ssn, month, day, year) { setWeeklySalary(salary); } // end SalariedEmployee constructor // set salary void SalariedEmployee::setWeeklySalary(double salary) { if (salary >= 0.0) weeklySalary = salary; else throw invalid_argument("Weekly salary must be >= 0.0"); } // end function setWeeklySalary // return salary double SalariedEmployee::getWeeklySalary() const { return weeklySalary; } // end function getWeeklySalary // calculate earnings; // override pure virtual function earnings in Employee double SalariedEmployee::earnings() const { return getWeeklySalary(); } // end function earnings // print SalariedEmployee's information void SalariedEmployee::print() const { cout << "salaried employee: "; Employee::print(); // reuse abstract base-class print function cout << "\nweekly salary: " << getWeeklySalary(); } // end function print
[ "noreply@github.com" ]
Olapeju.noreply@github.com
4fd9bc30e2d78da208beae2b50985800a5a6f86f
6ac8f056ab6efaf854b8d7798e6a44e07b061dcc
/CvGameCoreDLL/CvTacticalAnalysisMap.cpp
6f73898c1f9e8b1b11728695393eb4e951076d5d
[]
no_license
DelnarErsike/Civ5-Artificial-Unintelligence-DLL
b8587deb33735c38104aa0d7b9f38b2f57a3db32
1add515c01838e743e94c1c1c0cb1cfbe569e097
refs/heads/master
2020-06-04T23:05:06.522287
2015-01-09T06:53:57
2015-01-09T06:53:57
25,795,041
25
10
null
null
null
null
WINDOWS-1252
C++
false
false
35,208
cpp
/* ------------------------------------------------------------------------------------------------------- © 1991-2012 Take-Two Interactive Software and its subsidiaries. Developed by Firaxis Games. Sid Meier's Civilization V, Civ, Civilization, 2K Games, Firaxis Games, Take-Two Interactive Software and their respective logos are all trademarks of Take-Two interactive Software, Inc. All other marks and trademarks are the property of their respective owners. All rights reserved. ------------------------------------------------------------------------------------------------------- */ #include "CvGameCoreDLLPCH.h" #include "CvGameCoreUtils.h" #include "CvTacticalAnalysisMap.h" #include "CvMilitaryAI.h" #include "cvStopWatch.h" #include "CvDiplomacyAI.h" #include "LintFree.h" //===================================== // CvTacticalAnalysisCell //===================================== /// Constructor CvTacticalAnalysisCell::CvTacticalAnalysisCell(void): m_pEnemyMilitary(NULL), m_pEnemyCivilian(NULL), m_pNeutralMilitary(NULL), m_pNeutralCivilian(NULL), m_pFriendlyMilitary(NULL), m_pFriendlyCivilian(NULL), m_iDefenseModifier(0), m_iDeploymentScore(0), m_eTargetType(AI_TACTICAL_TARGET_NONE), m_iDominanceZoneID(-1) { Clear(); } /// Reinitialize data void CvTacticalAnalysisCell::Clear() { ClearFlags(); m_pEnemyMilitary = NULL; m_pEnemyCivilian = NULL; m_pNeutralMilitary = NULL; m_pNeutralCivilian = NULL; m_pFriendlyMilitary = NULL; m_pFriendlyCivilian = NULL; m_iDefenseModifier = 0; m_iDeploymentScore = 0; m_eTargetType = AI_TACTICAL_TARGET_NONE; m_iDominanceZoneID = -1; } bool CvTacticalAnalysisCell::CanUseForOperationGathering() { if (IsImpassableTerrain() || IsImpassableTerritory() || GetEnemyMilitaryUnit() || GetNeutralMilitaryUnit() || GetNeutralCivilianUnit() || IsFriendlyTurnEndTile() || IsEnemyCity() || IsNeutralCity()) { return false; } return true; } bool CvTacticalAnalysisCell::CanUseForOperationGatheringCheckWater(bool bWater) { if (bWater != IsWater() || IsImpassableTerrain() || IsImpassableTerritory() || GetEnemyMilitaryUnit() || GetNeutralMilitaryUnit() || GetNeutralCivilianUnit() || IsFriendlyTurnEndTile() || IsEnemyCity() || IsNeutralCity()) { return false; } return true; } //===================================== // CvTacticalDominanceZone //===================================== /// Constructor CvTacticalDominanceZone::CvTacticalDominanceZone(void) { m_iDominanceZoneID = -1; m_eTerritoryType = TACTICAL_TERRITORY_NONE; m_eDominanceFlag = TACTICAL_DOMINANCE_NO_UNITS_PRESENT; m_eOwner = NO_PLAYER; m_iCityID = -1; m_iAreaID = 0; m_iFriendlyStrength = 0; m_iEnemyStrength = 0; m_iFriendlyRangedStrength = 0; m_iEnemyRangedStrength = 0; m_iFriendlyUnitCount = 0; m_iEnemyUnitCount = 0; m_iFriendlyRangedUnitCount = 0; m_iEnemyRangedUnitCount = 0; m_iZoneValue = 0; m_iRangeClosestEnemyUnit = MAX_INT; m_bIsWater = false; m_bIsNavalInvasion = false; m_pTempZoneCenter = NULL; } /// Retrieve city controlling this zone CvCity *CvTacticalDominanceZone::GetClosestCity() const { if (m_eOwner != NO_PLAYER) { return GET_PLAYER(m_eOwner).getCity(m_iCityID); } return NULL; } /// Set city controlling this zone void CvTacticalDominanceZone::SetClosestCity(CvCity *pCity) { if (pCity != NULL) { m_iCityID = pCity->GetID(); } else { m_iCityID = -1; } } /// Retrieve distance in hexes of closest enemy to center of this zone int CvTacticalDominanceZone::GetRangeClosestEnemyUnit() const { return m_iRangeClosestEnemyUnit; } /// Set distance in hexes of closest enemy to center of this zone void CvTacticalDominanceZone::SetRangeClosestEnemyUnit(int iRange) { m_iRangeClosestEnemyUnit = iRange; } /// Mix ownership of zone and who is dominant to get a unique classification for the zone TacticalMoveZoneType CvTacticalDominanceZone::GetZoneType() const { if (m_eTerritoryType == TACTICAL_TERRITORY_FRIENDLY) { if (m_eDominanceFlag == TACTICAL_DOMINANCE_FRIENDLY) { return AI_TACTICAL_MOVE_ZONE_FRIENDLY_WINNING; } else if (m_eDominanceFlag == TACTICAL_DOMINANCE_EVEN) { return AI_TACTICAL_MOVE_ZONE_FRIENDLY_EVEN; } else { return AI_TACTICAL_MOVE_ZONE_FRIENDLY_LOSING; } } else if (m_eTerritoryType == TACTICAL_TERRITORY_ENEMY) { if (m_eDominanceFlag == TACTICAL_DOMINANCE_FRIENDLY) { return AI_TACTICAL_MOVE_ZONE_ENEMY_WINNING; } else if (m_eDominanceFlag == TACTICAL_DOMINANCE_EVEN) { return AI_TACTICAL_MOVE_ZONE_ENEMY_EVEN; } else { return AI_TACTICAL_MOVE_ZONE_ENEMY_LOSING; } } else { return AI_TACTICAL_MOVE_ZONE_UNOWNED; } } //===================================== // CvTacticalAnalysisMap //===================================== /// Constructor CvTacticalAnalysisMap::CvTacticalAnalysisMap(void) : m_pPlots(NULL), m_iDominancePercentage(25), m_iUnitStrengthMultiplier(5), m_iTacticalRange(8), m_iTempZoneRadius(5), m_iBestFriendlyRange(0), m_bIgnoreLOS(false), m_pPlayer(NULL), m_iNumPlots(0) { m_bIsBuilt = false; m_iTurnBuilt = -1; m_bAtWar = false; m_DominanceZones.clear(); } /// Destructor CvTacticalAnalysisMap::~CvTacticalAnalysisMap(void) { SAFE_DELETE_ARRAY(m_pPlots); } /// Initialize void CvTacticalAnalysisMap::Init(int iNumPlots) { // Time building of these maps AI_PERF("AI-perf-tact.csv", "CvTacticalAnalysisMap::Init()" ); if (m_pPlots) { SAFE_DELETE_ARRAY(m_pPlots); } m_pPlots = FNEW(CvTacticalAnalysisCell[iNumPlots], c_eCiv5GameplayDLL, 0); m_iNumPlots = iNumPlots; m_iDominancePercentage = GC.getAI_TACTICAL_MAP_DOMINANCE_PERCENTAGE(); m_iTacticalRange = GC.getAI_TACTICAL_RECRUIT_RANGE(); m_iUnitStrengthMultiplier = GC.getAI_TACTICAL_MAP_UNIT_STRENGTH_MULTIPLIER() * m_iTacticalRange; m_iTempZoneRadius = GC.getAI_TACTICAL_MAP_TEMP_ZONE_RADIUS(); } /// Fill the map with data for this AI player's turn void CvTacticalAnalysisMap::RefreshDataForNextPlayer(CvPlayer *pPlayer) { if (m_pPlots) { if (pPlayer != m_pPlayer || m_iTurnBuilt < GC.getGame().getGameTurn()) { m_pPlayer = pPlayer; m_iTurnBuilt = GC.getGame().getGameTurn(); // Time building of these maps AI_PERF_FORMAT("AI-perf.csv", ("Tactical Analysis Map, Turn %d, %s", GC.getGame().getGameTurn(), m_pPlayer->getCivilizationShortDescription()) ); m_bIsBuilt = false; // AI civs build this map every turn //if (!m_pPlayer->isHuman() && !m_pPlayer->isBarbarian()) if (!m_pPlayer->isBarbarian()) { m_DominanceZones.clear(); AddTemporaryZones(); for (int iI = 0; iI < GC.getMap().numPlots(); iI++) { CvAssertMsg((iI < m_iNumPlots), "Plot to be accessed exceeds allocation!"); CvPlot *pPlot = GC.getMap().plotByIndexUnchecked(iI); if (pPlot == NULL) { // Erase this cell m_pPlots[iI].Clear(); } else { if (PopulateCell(iI, pPlot)) { AddToDominanceZones(iI, &m_pPlots[iI]); } } } CalculateMilitaryStrengths(); PrioritizeZones(); LogZones(); BuildEnemyUnitList(); MarkCellsNearEnemy(); m_bIsBuilt = true; } } } } // Find all our enemies (combat units) void CvTacticalAnalysisMap::BuildEnemyUnitList() { CvTacticalAnalysisEnemy enemy; m_EnemyUnits.clear(); for (int iPlayer = 0; iPlayer < MAX_PLAYERS; iPlayer++) { const PlayerTypes ePlayer = (PlayerTypes)iPlayer; CvPlayer &kPlayer = GET_PLAYER(ePlayer); const TeamTypes eTeam = kPlayer.getTeam(); // for each opposing civ if (kPlayer.isAlive() && GET_TEAM(eTeam).isAtWar(m_pPlayer->getTeam())) { int iLoop; CvUnit* pLoopUnit = NULL; for (pLoopUnit = kPlayer.firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = kPlayer.nextUnit(&iLoop)) { // Make sure this unit can attack if (pLoopUnit->IsCanAttack()) { m_EnemyUnits.push_back(pLoopUnit); } } } } } // Indicate the plots we might want to move to that the enemy can attack void CvTacticalAnalysisMap::MarkCellsNearEnemy() { int iDistance; // Look at every cell on the map for (int iI = 0; iI < GC.getMap().numPlots(); iI++) { bool bMarkedIt = false; // Set true once we've found one that enemy can move past (worst case) CvPlot *pPlot = GC.getMap().plotByIndexUnchecked(iI); if (m_pPlots[iI].IsRevealed() && !m_pPlots[iI].IsImpassableTerrain() && !m_pPlots[iI].IsImpassableTerritory()) { // Friendly cities always safe if (!m_pPlots[iI].IsFriendlyCity()) { if (!pPlot->isVisibleToEnemyTeam(m_pPlayer->getTeam())) { m_pPlots[iI].SetNotVisibleToEnemy(true); } else { for (unsigned int iUnitIndex = 0; iUnitIndex < m_EnemyUnits.size() && !bMarkedIt; iUnitIndex++) { CvUnit *pUnit = m_EnemyUnits[iUnitIndex]; if (pUnit->getArea() == pPlot->getArea()) { // Distance check before hitting pathfinder iDistance = plotDistance(pUnit->getX(), pUnit->getY(), pPlot->getX(), pPlot->getY()); if (iDistance == 0) { m_pPlots[iI].SetSubjectToAttack(true); m_pPlots[iI].SetEnemyCanMovePast(true); bMarkedIt = true; } // TEMPORARY OPTIMIZATION: Assumes can't use roads or RR else if (iDistance <= pUnit->baseMoves()) { int iTurnsToReach; iTurnsToReach = TurnsToReachTarget(pUnit, pPlot, true /*bReusePaths*/, true /*bIgnoreUnits*/); // Its ok to reuse paths because when ignoring units, we don't use the tactical analysis map (which we are building) if (iTurnsToReach <= 1) { m_pPlots[iI].SetSubjectToAttack(true); } if (iTurnsToReach == 0) { m_pPlots[iI].SetEnemyCanMovePast(true); bMarkedIt = true; } } } } // Check adjacent plots for enemy citadels if (!m_pPlots[iI].IsSubjectToAttack()) { CvPlot *pAdjacentPlot; for (int jJ = 0; jJ < NUM_DIRECTION_TYPES; jJ++) { pAdjacentPlot = plotDirection(pPlot->getX(), pPlot->getY(), ((DirectionTypes)jJ)); if (pAdjacentPlot != NULL && pAdjacentPlot->getOwner() != NO_PLAYER) { if (atWar(m_pPlayer->getTeam(), GET_PLAYER(pAdjacentPlot->getOwner()).getTeam())) { ImprovementTypes eImprovement = pAdjacentPlot->getImprovementType(); if (eImprovement != NO_IMPROVEMENT && GC.getImprovementInfo(eImprovement)->GetNearbyEnemyDamage() > 0) { m_pPlots[iI].SetSubjectToAttack(true); break; } } } } } } } } } } // Clear all dynamic data flags from the map void CvTacticalAnalysisMap::ClearDynamicFlags() { for (int iI = 0; iI < GC.getMap().numPlots(); iI++) { // Erase this cell m_pPlots[iI].SetWithinRangeOfTarget(false); m_pPlots[iI].SetHelpsProvidesFlankBonus(false); m_pPlots[iI].SetSafeForDeployment(false); m_pPlots[iI].SetDeploymentScore(0); } } // Mark cells we can use to bomb a specific target void CvTacticalAnalysisMap::SetTargetBombardCells(CvPlot *pTarget, int iRange, bool bIgnoreLOS) { int iDX, iDY; CvPlot *pLoopPlot; int iPlotIndex; int iPlotDistance; for (iDX = -(iRange); iDX <= iRange; iDX++) { for (iDY = -(iRange); iDY <= iRange; iDY++) { pLoopPlot = plotXY(pTarget->getX(), pTarget->getY(), iDX, iDY); if (pLoopPlot != NULL) { iPlotDistance = plotDistance(pLoopPlot->getX(), pLoopPlot->getY(), pTarget->getX(), pTarget->getY()); if (iPlotDistance > 0 && iPlotDistance <= iRange) { iPlotIndex = GC.getMap().plotNum(pLoopPlot->getX(), pLoopPlot->getY()); if (m_pPlots[iPlotIndex].IsRevealed() && !m_pPlots[iPlotIndex].IsImpassableTerrain() && !m_pPlots[iPlotIndex].IsImpassableTerritory()) { if (!m_pPlots[iPlotIndex].IsEnemyCity() && !m_pPlots[iPlotIndex].IsNeutralCity()) { if (bIgnoreLOS || pLoopPlot->canSeePlot(pTarget, m_pPlayer->getTeam(), iRange, NO_DIRECTION)) { m_pPlots[iPlotIndex].SetWithinRangeOfTarget(true); } } } } } } } } // Mark cells we can use to bomb a specific target void CvTacticalAnalysisMap::SetTargetFlankBonusCells(CvPlot *pTarget) { CvPlot *pLoopPlot; int iPlotIndex; // No flank attacks on units at sea (where all combat is bombards) if (pTarget->isWater()) { return; } for (int iI = 0; iI < NUM_DIRECTION_TYPES; iI++) { pLoopPlot = plotDirection(pTarget->getX(), pTarget->getY(), ((DirectionTypes)iI)); if (pLoopPlot != NULL) { iPlotIndex = GC.getMap().plotNum(pLoopPlot->getX(), pLoopPlot->getY()); if (m_pPlots[iPlotIndex].IsRevealed() && !m_pPlots[iPlotIndex].IsImpassableTerrain() && !m_pPlots[iPlotIndex].IsImpassableTerritory()) { if (!m_pPlots[iPlotIndex].IsFriendlyCity() && !m_pPlots[iPlotIndex].IsEnemyCity() && !m_pPlots[iPlotIndex].IsNeutralCity()) { if (!m_pPlots[iPlotIndex].IsFriendlyTurnEndTile() && m_pPlots[iPlotIndex].GetEnemyMilitaryUnit() == NULL) { m_pPlots[iPlotIndex].SetHelpsProvidesFlankBonus(true); } } } } } } // PRIVATE FUNCTIONS /// Add in any temporary dominance zones from tactical AI void CvTacticalAnalysisMap::AddTemporaryZones() { CvTemporaryZone *pZone; CvTacticalAI *pTacticalAI = m_pPlayer->GetTacticalAI(); if (pTacticalAI) { pTacticalAI->DropObsoleteZones(); pZone = pTacticalAI->GetFirstTemporaryZone(); while (pZone) { // Can't be a city zone (which is just used to boost priority but not establish a new zone) if (pZone->GetTargetType() != AI_TACTICAL_TARGET_CITY) { CvPlot *pPlot = GC.getMap().plot(pZone->GetX(), pZone->GetY()); if (pPlot) { CvTacticalDominanceZone newZone; newZone.SetDominanceZoneID(m_DominanceZones.size()); newZone.SetTerritoryType(TACTICAL_TERRITORY_TEMP_ZONE); newZone.SetOwner(NO_PLAYER); newZone.SetAreaID(pPlot->getArea()); newZone.SetWater(pPlot->isWater()); newZone.SetTempZoneCenter(pPlot); newZone.SetNavalInvasion(pZone->IsNavalInvasion()); m_DominanceZones.push_back(newZone); } } pZone = pTacticalAI->GetNextTemporaryZone(); } } } /// Update data for a cell: returns whether or not to add to dominance zones bool CvTacticalAnalysisMap::PopulateCell(int iIndex, CvPlot *pPlot) { CvUnit *pLoopUnit; int iUnitLoop; CvTacticalAnalysisCell &cell = m_pPlots[iIndex]; cell.Clear(); cell.SetRevealed(pPlot->isRevealed(m_pPlayer->getTeam())); cell.SetVisible(pPlot->isVisible(m_pPlayer->getTeam())); cell.SetImpassableTerrain(pPlot->isImpassable()); cell.SetWater(pPlot->isWater()); cell.SetOcean(pPlot->isWater() && !pPlot->isShallowWater()); bool bImpassableTerritory = false; if (pPlot->isOwned()) { TeamTypes eMyTeam = m_pPlayer->getTeam(); TeamTypes ePlotTeam = pPlot->getTeam(); if (eMyTeam != ePlotTeam && !GET_TEAM(eMyTeam).isAtWar(ePlotTeam) && !GET_TEAM(ePlotTeam).IsAllowsOpenBordersToTeam(eMyTeam)) { bImpassableTerritory = true; } else if (pPlot->isCity()) { if (pPlot->getOwner() == m_pPlayer->GetID()) { cell.SetFriendlyCity(true); } else if (GET_TEAM(eMyTeam).isAtWar(ePlotTeam)) { cell.SetEnemyCity(true); } else { cell.SetNeutralCity(true); } } if (m_pPlayer->GetID() == pPlot->getOwner()) { cell.SetOwnTerritory(true); } if (GET_TEAM(eMyTeam).isFriendlyTerritory(ePlotTeam)) { cell.SetFriendlyTerritory(true); } if (GET_TEAM(ePlotTeam).isAtWar(ePlotTeam)) { cell.SetEnemyTerritory(true); } } else { cell.SetUnclaimedTerritory(true); } cell.SetImpassableTerritory(bImpassableTerritory); cell.SetDefenseModifier(pPlot->defenseModifier(NO_TEAM, true)); if (pPlot->getNumUnits() > 0) { for (iUnitLoop = 0; iUnitLoop < pPlot->getNumUnits(); iUnitLoop++) { pLoopUnit = pPlot->getUnitByIndex(iUnitLoop); if(!pLoopUnit) continue; if (pLoopUnit->getOwner() == m_pPlayer->GetID()) { if (pLoopUnit->IsCombatUnit()) { // CvAssertMsg(!cell.GetFriendlyMilitaryUnit(), "Two friendly military units in a hex, please show Ed and send save."); cell.SetFriendlyMilitaryUnit(pLoopUnit); } else { // CvAssertMsg(!cell.GetFriendlyCivilianUnit(), "Two friendly civilian units in a hex, please show Ed and send save."); cell.SetFriendlyCivilianUnit(pLoopUnit); } } else if (pLoopUnit->isEnemy(m_pPlayer->getTeam())) { if (pLoopUnit->IsCombatUnit()) { // CvAssertMsg(!cell.GetEnemyMilitaryUnit(), "Two enemy military units in a hex, please show Ed and send save."); cell.SetEnemyMilitaryUnit(pLoopUnit); } else { // CvAssertMsg(!cell.GetEnemyCivilianUnit(), "Two enemy civilian units in a hex, please show Ed and send save."); cell.SetEnemyCivilianUnit(pLoopUnit); } } else { if (pLoopUnit->IsCombatUnit()) { // CvAssertMsg(!cell.GetNeutralMilitaryUnit(), "Two neutral military units in a hex, please show Ed and send save."); cell.SetNeutralMilitaryUnit(pLoopUnit); } else { // CvAssertMsg(!cell.GetNeutralCivilianUnit(), "Two neutral civilian units in a hex, please show Ed and send save."); cell.SetNeutralCivilianUnit(pLoopUnit); } } } } // Figure out whether or not to add this to a dominance zone bool bAdd = true; if (cell.IsImpassableTerrain() || cell.IsImpassableTerritory() || !cell.IsRevealed()) { bAdd = false; } return bAdd; } /// Add data for this cell into dominance zone information void CvTacticalAnalysisMap::AddToDominanceZones(int iIndex, CvTacticalAnalysisCell *pCell) { CvPlot *pPlot = GC.getMap().plotByIndex(iIndex); // Compute zone data for this cell m_TempZone.SetAreaID(pPlot->getArea()); m_TempZone.SetOwner(pPlot->getOwner()); m_TempZone.SetWater(pPlot->isWater()); if (!pPlot->isOwned()) { m_TempZone.SetTerritoryType(TACTICAL_TERRITORY_NO_OWNER); } else if (pPlot->getTeam() == m_pPlayer->getTeam()) { m_TempZone.SetTerritoryType(TACTICAL_TERRITORY_FRIENDLY); } else if (GET_TEAM(m_pPlayer->getTeam()).isAtWar(pPlot->getTeam())) { m_TempZone.SetTerritoryType(TACTICAL_TERRITORY_ENEMY); } else { m_TempZone.SetTerritoryType(TACTICAL_TERRITORY_NEUTRAL); } m_TempZone.SetClosestCity(NULL); if (m_TempZone.GetTerritoryType() == TACTICAL_TERRITORY_ENEMY || m_TempZone.GetTerritoryType() == TACTICAL_TERRITORY_NEUTRAL || m_TempZone.GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY) { int iLoop; int iBestDistance = MAX_INT; CvCity *pBestCity = NULL; for (CvCity *pLoopCity = GET_PLAYER(m_TempZone.GetOwner()).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER(m_TempZone.GetOwner()).nextCity(&iLoop)) { int iDistance = plotDistance(pLoopCity->getX(), pLoopCity->getY(), pPlot->getX(), pPlot->getY()); if (iDistance < iBestDistance) { iBestDistance = iDistance; pBestCity = pLoopCity; } } if (pBestCity != NULL) { m_TempZone.SetClosestCity(pBestCity); } } // Now see if we already have a matching zone CvTacticalDominanceZone *pZone = FindExistingZone(pPlot); if (!pZone) { // Data populated, now add to vector m_TempZone.SetDominanceZoneID(m_DominanceZones.size()); m_DominanceZones.push_back(m_TempZone); pZone = &m_DominanceZones[m_DominanceZones.size() - 1]; } // If this isn't owned territory, update zone with military strength info if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_NO_OWNER || pZone->GetTerritoryType() == TACTICAL_TERRITORY_TEMP_ZONE) { CvUnit *pFriendlyUnit = pCell->GetFriendlyMilitaryUnit(); if (pFriendlyUnit) { if (pFriendlyUnit->getDomainType() == DOMAIN_AIR || (pFriendlyUnit->getDomainType() == DOMAIN_LAND && !pZone->IsWater()) || (pFriendlyUnit->getDomainType() == DOMAIN_SEA && pZone->IsWater())) { int iStrength = pFriendlyUnit->GetBaseCombatStrengthConsideringDamage(); if (iStrength == 0 && pFriendlyUnit->isEmbarked() && !pZone->IsWater()) { iStrength = pFriendlyUnit->GetBaseCombatStrength(true); } pZone->AddFriendlyStrength(iStrength * m_iUnitStrengthMultiplier); pZone->AddFriendlyRangedStrength(pFriendlyUnit->GetMaxRangedCombatStrength(NULL, /*pCity*/ NULL, true, true)); if (pFriendlyUnit->GetRange() > GetBestFriendlyRange()) { SetBestFriendlyRange(pFriendlyUnit->GetRange()); } if (pFriendlyUnit->IsRangeAttackIgnoreLOS()) { SetIgnoreLOS(true); } pZone->AddFriendlyUnitCount(1); if (pFriendlyUnit->isRanged()) { pZone->AddFriendlyRangedUnitCount(1); } } } CvUnit *pEnemyUnit = pCell->GetEnemyMilitaryUnit(); if (pEnemyUnit) { if (pEnemyUnit->getDomainType() == DOMAIN_AIR || (pEnemyUnit->getDomainType() == DOMAIN_LAND && !pZone->IsWater()) || (pEnemyUnit->getDomainType() == DOMAIN_SEA && pZone->IsWater())) { int iStrength = pEnemyUnit->GetBaseCombatStrengthConsideringDamage(); if (iStrength == 0 && pEnemyUnit->isEmbarked() && !pZone->IsWater()) { iStrength = pEnemyUnit->GetBaseCombatStrength(true); } pZone->AddEnemyStrength(iStrength * m_iUnitStrengthMultiplier); pZone->AddEnemyRangedStrength(pEnemyUnit->GetMaxRangedCombatStrength(NULL, /*pCity*/ NULL, true, true)); pZone->AddEnemyUnitCount(1); if (pEnemyUnit->isRanged()) { pZone->AddEnemyRangedUnitCount(1); } } } } // Set zone for this cell pCell->SetDominanceZone(pZone->GetDominanceZoneID()); } /// Calculate military presences in each owned dominance zone void CvTacticalAnalysisMap::CalculateMilitaryStrengths() { // Loop through the dominance zones CvTacticalDominanceZone *pZone; CvCity *pClosestCity = NULL; int iDistance; int iMultiplier; int iLoop; CvUnit* pLoopUnit; TeamTypes eTeam; eTeam = m_pPlayer->getTeam(); for (unsigned int iI = 0; iI < m_DominanceZones.size(); iI++) { pZone = &m_DominanceZones[iI]; if (pZone->GetTerritoryType() != TACTICAL_TERRITORY_NO_OWNER) { pClosestCity = pZone->GetClosestCity(); if (pClosestCity) { // Start with strength of the city itself int iStrength = pClosestCity->getStrengthValue() * m_iTacticalRange; if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY) { pZone->AddFriendlyStrength(iStrength); pZone->AddFriendlyRangedStrength(pClosestCity->getStrengthValue()); } else { pZone->AddEnemyStrength(iStrength); pZone->AddEnemyRangedStrength(pClosestCity->getStrengthValue()); } // Loop through all of OUR units first for (pLoopUnit = m_pPlayer->firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = m_pPlayer->nextUnit(&iLoop)) { if (pLoopUnit->IsCombatUnit()) { if (pLoopUnit->getDomainType() == DOMAIN_AIR || (pLoopUnit->getDomainType() == DOMAIN_LAND && !pZone->IsWater()) || (pLoopUnit->getDomainType() == DOMAIN_SEA && pZone->IsWater())) { iDistance = plotDistance(pLoopUnit->getX(), pLoopUnit->getY(), pClosestCity->getX(), pClosestCity->getY()); iMultiplier = (m_iTacticalRange + 1 - iDistance); if (iMultiplier > 0) { int iUnitStrength = pLoopUnit->GetBaseCombatStrengthConsideringDamage(); if (iUnitStrength == 0 && pLoopUnit->isEmbarked() && !pZone->IsWater()) { iUnitStrength = pLoopUnit->GetBaseCombatStrength(true); } pZone->AddFriendlyStrength(iUnitStrength * iMultiplier * m_iUnitStrengthMultiplier); pZone->AddFriendlyRangedStrength(pLoopUnit->GetMaxRangedCombatStrength(NULL, /*pCity*/ NULL, true, true)); if (pLoopUnit->GetRange() > GetBestFriendlyRange()) { SetBestFriendlyRange(pLoopUnit->GetRange()); } if (pLoopUnit->IsRangeAttackIgnoreLOS()) { SetIgnoreLOS(true); } pZone->AddFriendlyUnitCount(1); if (pLoopUnit->isRanged()) { pZone->AddFriendlyRangedUnitCount(1); } } } } } // Repeat for all visible enemy units (or adjacent to visible) for (int iPlayerLoop = 0; iPlayerLoop < MAX_CIV_PLAYERS; iPlayerLoop++) { CvPlayer &kPlayer = GET_PLAYER((PlayerTypes) iPlayerLoop); if (GET_TEAM(eTeam).isAtWar(kPlayer.getTeam())) { for (pLoopUnit = kPlayer.firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = kPlayer.nextUnit(&iLoop)) { if (pLoopUnit->IsCombatUnit()) { if (pLoopUnit->getDomainType() == DOMAIN_AIR || (pLoopUnit->getDomainType() == DOMAIN_LAND && !pZone->IsWater()) || (pLoopUnit->getDomainType() == DOMAIN_SEA && pZone->IsWater())) { CvPlot *pPlot; pPlot = pLoopUnit->plot(); if (pPlot) { if (pPlot->isVisible(eTeam) || pPlot->isAdjacentVisible(eTeam)) { iDistance = plotDistance(pLoopUnit->getX(), pLoopUnit->getY(), pClosestCity->getX(), pClosestCity->getY()); iMultiplier = (m_iTacticalRange + 1 - iDistance); if (iMultiplier > 0) { int iUnitStrength = pLoopUnit->GetBaseCombatStrengthConsideringDamage(); if (iUnitStrength == 0 && pLoopUnit->isEmbarked() && !pZone->IsWater()) { iUnitStrength = pLoopUnit->GetBaseCombatStrength(true); } pZone->AddEnemyStrength(iUnitStrength * iMultiplier * m_iUnitStrengthMultiplier); pZone->AddEnemyRangedStrength(pLoopUnit->GetMaxRangedCombatStrength(NULL, /*pCity*/ NULL, true, true)); pZone->AddEnemyUnitCount(1); if (iDistance < pZone->GetRangeClosestEnemyUnit()) { pZone->SetRangeClosestEnemyUnit(iDistance); } if (pLoopUnit->isRanged()) { pZone->AddEnemyRangedUnitCount(1); } } } } } } } } } } } } } /// Establish order of zone processing for the turn void CvTacticalAnalysisMap::PrioritizeZones() { // Loop through the dominance zones CvTacticalDominanceZone *pZone; int iBaseValue; int iMultiplier; CvCity *pClosestCity = NULL; for (unsigned int iI = 0; iI < m_DominanceZones.size(); iI++) { // Find the zone and compute dominance here pZone = &m_DominanceZones[iI]; eTacticalDominanceFlags eDominance = ComputeDominance(pZone); // Establish a base value for the region iBaseValue = 1; // Temporary zone? if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_TEMP_ZONE) { iMultiplier = 200; } else { pClosestCity = pZone->GetClosestCity(); if (pClosestCity) { iBaseValue += pZone->GetClosestCity()->getPopulation(); if (pClosestCity->isCapital()) { iBaseValue *= 2; } // How damaged is this city? int iDamage = pClosestCity->getDamage(); if (iDamage > 0) { iBaseValue *= ((iDamage + 2)/ 2); } if (m_pPlayer->GetTacticalAI()->IsTemporaryZoneCity(pClosestCity)) { iBaseValue *= 3; } } if (!pZone->IsWater()) { iBaseValue *= 8; } // Now compute a multiplier based on current conditions here iMultiplier = 1; if (eDominance == TACTICAL_DOMINANCE_ENEMY) { if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_ENEMY) { iMultiplier = 2; } else if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY) { iMultiplier = 4; } } else if (eDominance == TACTICAL_DOMINANCE_EVEN) { if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_ENEMY) { iMultiplier = 3; } else if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY) { iMultiplier = 3; } } else if (eDominance == TACTICAL_DOMINANCE_FRIENDLY) { if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_ENEMY) { iMultiplier = 4; } else if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY) { iMultiplier = 1; } } if (!m_pPlayer->isMinorCiv()) { if (m_pPlayer->GetDiplomacyAI()->GetStateAllWars() == STATE_ALL_WARS_WINNING) { if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_ENEMY) { iMultiplier *= 2; } } else if (m_pPlayer->GetDiplomacyAI()->GetStateAllWars() == STATE_ALL_WARS_LOSING) { if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY) { iMultiplier *= 4; } } } } // Save off the value for this zone if ((iBaseValue * iMultiplier) <= 0) { FAssertMsg((iBaseValue * iMultiplier) > 0, "Invalid Dominance Zone Value"); } pZone->SetDominanceZoneValue(iBaseValue * iMultiplier); } std::stable_sort(m_DominanceZones.begin(), m_DominanceZones.end()); } /// Log dominance zone data void CvTacticalAnalysisMap::LogZones() { if (GC.getLogging() && GC.getAILogging()) { CvString szLogMsg; CvTacticalDominanceZone *pZone; for (unsigned int iI = 0; iI < m_DominanceZones.size(); iI++) { pZone = &m_DominanceZones[iI]; // Log all zones with at least some unit present // if (pZone->GetDominanceFlag() != TACTICAL_DOMINANCE_NO_UNITS_PRESENT && pZone->GetDominanceFlag() != TACTICAL_DOMINANCE_NOT_VISIBLE) // { szLogMsg.Format("Zone ID: %d, Area ID: %d, Value: %d, FRIENDLY Str: %d (%d), Ranged: %d (%d), ENEMY Str: %d (%d), Ranged: %d (%d), Closest Enemy: %d", pZone->GetDominanceZoneID(), pZone->GetAreaID(), pZone->GetDominanceZoneValue(), pZone->GetFriendlyStrength(), pZone->GetFriendlyUnitCount(), pZone->GetFriendlyRangedStrength(), pZone->GetFriendlyRangedUnitCount(), pZone->GetEnemyStrength(), pZone->GetEnemyUnitCount(), pZone->GetEnemyRangedStrength(), pZone->GetEnemyRangedUnitCount(), pZone->GetRangeClosestEnemyUnit()); if (pZone->GetDominanceFlag() == TACTICAL_DOMINANCE_FRIENDLY) { szLogMsg += ", Friendly"; } else if (pZone->GetDominanceFlag() == TACTICAL_DOMINANCE_ENEMY) { szLogMsg += ", Enemy"; } else if (pZone->GetDominanceFlag() == TACTICAL_DOMINANCE_EVEN) { szLogMsg += ", Even"; } else if (pZone->GetDominanceFlag() == TACTICAL_DOMINANCE_NO_UNITS_PRESENT) { szLogMsg += ", No Units"; } else if (pZone->GetDominanceFlag() == TACTICAL_DOMINANCE_NOT_VISIBLE) { szLogMsg += ", Not Visible"; } if (pZone->IsWater()) { szLogMsg += ", Water"; } else { szLogMsg += ", Land"; } if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_TEMP_ZONE) { szLogMsg += ", Temporary Zone"; } else if (pZone->GetClosestCity()) { szLogMsg += ", " + pZone->GetClosestCity()->getName(); } m_pPlayer->GetTacticalAI()->LogTacticalMessage(szLogMsg, true /*bSkipLogDominanceZone*/); // } } } } /// Can this cell go in an existing dominance zone? CvTacticalDominanceZone *CvTacticalAnalysisMap::FindExistingZone(CvPlot *pPlot) { CvTacticalDominanceZone *pZone; for (unsigned int iI = 0; iI < m_DominanceZones.size(); iI++) { pZone = &m_DominanceZones[iI]; // If this is a temporary zone, matches if unowned and close enough if ((pZone->GetTerritoryType() == TACTICAL_TERRITORY_TEMP_ZONE) && (m_TempZone.GetTerritoryType() == TACTICAL_TERRITORY_NO_OWNER || m_TempZone.GetTerritoryType() == TACTICAL_TERRITORY_NEUTRAL) && (plotDistance(pPlot->getX(), pPlot->getY(), pZone->GetTempZoneCenter()->getX(), pZone->GetTempZoneCenter()->getY()) <= m_iTempZoneRadius)) { return pZone; } // If not friendly or enemy, just 1 zone per area if ((pZone->GetTerritoryType() == TACTICAL_TERRITORY_NO_OWNER || pZone->GetTerritoryType() == TACTICAL_TERRITORY_NEUTRAL) && (m_TempZone.GetTerritoryType() == TACTICAL_TERRITORY_NO_OWNER || m_TempZone.GetTerritoryType() == TACTICAL_TERRITORY_NEUTRAL)) { if (pZone->GetAreaID() == m_TempZone.GetAreaID()) { return pZone; } } // Otherwise everything needs to match if (pZone->GetTerritoryType() == m_TempZone.GetTerritoryType() && pZone->GetOwner() == m_TempZone.GetOwner() && pZone->GetAreaID() == m_TempZone.GetAreaID() && pZone->GetClosestCity() == m_TempZone.GetClosestCity()) { return pZone; } } return NULL; } /// Retrieve a dominance zone CvTacticalDominanceZone *CvTacticalAnalysisMap::GetZone(int iIndex) { if(iIndex < 0 || iIndex >= (int)m_DominanceZones.size()) return 0; return &m_DominanceZones[iIndex]; } /// Retrieve a dominance zone by closest city CvTacticalDominanceZone *CvTacticalAnalysisMap::GetZoneByCity(CvCity *pCity, bool bWater) { CvTacticalDominanceZone *pZone; for (int iI = 0; iI < GetNumZones(); iI++) { pZone = GetZone(iI); if (pZone->GetClosestCity() == pCity && pZone->IsWater() == bWater) { return pZone; } } return NULL; } // Is this plot in dangerous territory? bool CvTacticalAnalysisMap::IsInEnemyDominatedZone(CvPlot *pPlot) { CvTacticalAnalysisCell *pCell; int iPlotIndex; CvTacticalDominanceZone *pZone; iPlotIndex = GC.getMap().plotNum(pPlot->getX(), pPlot->getY()); pCell = GetCell(iPlotIndex); for (int iI = 0; iI < GetNumZones(); iI++) { pZone = GetZone(iI); if (pZone->GetDominanceZoneID() == pCell->GetDominanceZone()) { return (pZone->GetDominanceFlag() == TACTICAL_DOMINANCE_ENEMY || pZone->GetDominanceFlag() == TACTICAL_DOMINANCE_NOT_VISIBLE); } } return false; } /// Who is dominant in this one zone? eTacticalDominanceFlags CvTacticalAnalysisMap::ComputeDominance(CvTacticalDominanceZone *pZone) { bool bTempZone = false; if (pZone->GetClosestCity()) { bTempZone = m_pPlayer->GetTacticalAI()->IsTemporaryZoneCity(pZone->GetClosestCity()); } // Look at ratio of friendly to enemy strength if (pZone->GetFriendlyStrength() + pZone->GetEnemyStrength() <= 0) { pZone->SetDominanceFlag(TACTICAL_DOMINANCE_NO_UNITS_PRESENT); } // Enemy zone that we can't see (that isn't one of our temporary targets? else if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_ENEMY && !(pZone->GetClosestCity()->plot())->isVisible(m_pPlayer->getTeam()) && !bTempZone) { pZone->SetDominanceFlag(TACTICAL_DOMINANCE_NOT_VISIBLE); } else { bool bEnemyCanSeeOurCity = false; if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY) { for (int iI = 0; iI < MAX_PLAYERS; iI++) { CvPlayerAI& kPlayer = GET_PLAYER((PlayerTypes)iI); if (kPlayer.isAlive()) { TeamTypes eOtherTeam = kPlayer.getTeam(); if (eOtherTeam != m_pPlayer->getTeam()) { if (GET_TEAM(eOtherTeam).isAtWar(m_pPlayer->getTeam())) { if (pZone->GetClosestCity()->plot()->isVisible(eOtherTeam)) { bEnemyCanSeeOurCity = true; break; } } } } } } if (pZone->GetTerritoryType() == TACTICAL_TERRITORY_FRIENDLY && !bEnemyCanSeeOurCity) { pZone->SetDominanceFlag(TACTICAL_DOMINANCE_NOT_VISIBLE); } // Otherwise compute it by strength else if (pZone->GetEnemyStrength() <= 0) { pZone->SetDominanceFlag(TACTICAL_DOMINANCE_FRIENDLY); } else { int iRatio = (pZone->GetFriendlyStrength() * 100) / pZone->GetEnemyStrength(); if (iRatio > 100 + m_iDominancePercentage) { pZone->SetDominanceFlag(TACTICAL_DOMINANCE_FRIENDLY); } else if (iRatio < 100 - m_iDominancePercentage) { pZone->SetDominanceFlag(TACTICAL_DOMINANCE_ENEMY); } else { pZone->SetDominanceFlag(TACTICAL_DOMINANCE_EVEN); } } } return pZone->GetDominanceFlag(); }
[ "delnar.ersike@gmail.com" ]
delnar.ersike@gmail.com
5ac4765777c778525e8754681c0bc9efb57fc931
5a2349399fa9d57c6e8cc6e0f7226d683391a362
/src/qt/qtwebkit/Source/WebCore/svg/SVGEllipseElement.h
a3c8e435a6ba60b7415c317bfc73c81d368ceefb
[ "BSD-2-Clause", "LGPL-2.1-only", "LGPL-2.0-only", "BSD-3-Clause" ]
permissive
aharthcock/phantomjs
e70f3c379dcada720ec8abde3f7c09a24808154c
7d7f2c862347fbc7215c849e790290b2e07bab7c
refs/heads/master
2023-03-18T04:58:32.428562
2023-03-14T05:52:52
2023-03-14T05:52:52
24,828,890
0
0
BSD-3-Clause
2023-03-14T05:52:53
2014-10-05T23:38:56
C++
UTF-8
C++
false
false
2,300
h
/* * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> * * 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., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef SVGEllipseElement_h #define SVGEllipseElement_h #if ENABLE(SVG) #include "SVGAnimatedBoolean.h" #include "SVGAnimatedLength.h" #include "SVGExternalResourcesRequired.h" #include "SVGGraphicsElement.h" namespace WebCore { class SVGEllipseElement FINAL : public SVGGraphicsElement, public SVGExternalResourcesRequired { public: static PassRefPtr<SVGEllipseElement> create(const QualifiedName&, Document*); private: SVGEllipseElement(const QualifiedName&, Document*); virtual bool isValid() const { return SVGTests::isValid(); } virtual bool supportsFocus() const OVERRIDE { return true; } bool isSupportedAttribute(const QualifiedName&); virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; virtual void svgAttributeChanged(const QualifiedName&); virtual bool selfHasRelativeLengths() const; virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE; BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGEllipseElement) DECLARE_ANIMATED_LENGTH(Cx, cx) DECLARE_ANIMATED_LENGTH(Cy, cy) DECLARE_ANIMATED_LENGTH(Rx, rx) DECLARE_ANIMATED_LENGTH(Ry, ry) DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) END_DECLARE_ANIMATED_PROPERTIES }; } // namespace WebCore #endif // ENABLE(SVG) #endif
[ "ariya.hidayat@gmail.com" ]
ariya.hidayat@gmail.com
ed91dc9743fd6060b9aa112070f571b4c4f0569b
8ec65a759d3efc75fe770cb380427c2e496c8581
/common.hpp
f4994bafbf7791f65b16738d50b82ba8439f9e2a
[]
no_license
kamindustries/branchbits
c769343ed8a0d322cb94b27b4b5d617ac0d3a948
19499181cb3f36d149f03b580d56d5db55796dec
refs/heads/master
2021-01-22T14:46:54.806290
2016-02-02T05:59:38
2016-02-02T05:59:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,724
hpp
#pragma once #include "allocore/io/al_App.hpp" using namespace al; using namespace std; // #define LEAF_COUNT 2200 // number of leaves #define LEAF_COUNT 6000 // number of leaves #define STEPS 30 // number of iterations #define NUM_VTX 200000 // max number of verts in tree mesh #define MAX_LEAVES 20000 /////////////////////////////////////////////////////////////////////// // S T A T E C L A S S /////////////////////////////////////////////////////////////////////// struct State { double eyeSeparation, nearClip, farClip; double t; // simulation time int frame_num; unsigned n; // "frame" number float focalLength; Pose pose; // for navigation Color backgroundColor; // bool timeToggle; bool drawLeaves; bool drawBranches; bool drawGround; bool toggleFog; Vec3f leafPos[MAX_LEAVES]; //240000 Color leafColor[MAX_LEAVES]; //240000 int refreshLeaves; int refreshTree; // treePos is main thing being drawn in graphics.cpp Vec3f treePos[NUM_VTX]; //600000 Color treeColor[NUM_VTX]; //600000 int pSize; int cSize; int currentLeafSize; double audioGain; //8 float f[LEAF_COUNT]; //8800 void print() { cout << "printin stuff from state!" << endl; } }; void InitState(State* state){ state->currentLeafSize = LEAF_COUNT; state->n = 0; state->frame_num = 0; state->nearClip = 0.1; state->farClip = 1000; state->focalLength = 6.f; state->eyeSeparation = 0.06; state->backgroundColor = Color(0.1, 1); state->audioGain = 0.0; state->drawLeaves = true; state->drawBranches = false; state->drawGround = true; state->toggleFog = true; }
[ "younkeehong@gmail.com" ]
younkeehong@gmail.com
21c5f0f1ca564d82ce26119de16608d0c659dee8
acf95a387c72d857bfd4a34f1d3d3a3da7ad1c60
/src/decoder/fec.h
1b4e1f76613121fcc5a96052bf99cee004dc52a8
[]
no_license
chemeris/wimax-scanner
dbe88d62dd2cdb4878abcd3afe10ce649784ec46
4511153da9b6d3293f79a4f02e9e43cd02d3d030
refs/heads/master
2021-01-25T00:16:08.989294
2012-04-13T18:34:52
2012-04-13T18:34:52
32,218,510
4
3
null
null
null
null
WINDOWS-1252
C++
false
false
7,876
h
/****************************************************************************/ /*! \file fec.h \brief FEC decoder \author Iliya Voronov, iliya.voronov@gmail.com \version 0.1 FEC decoder of convolutional code, convolutional turbo code, LDPC code etc. implements IEEE Std 802.16-2009, 8.4.9.2 Encoding */ /*****************************************************************************/ /***************************************************************************** Copyright (C) 2011 Iliya Voronov This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ #ifndef _FEC_H_ #define _FEC_H_ #include "comdefs.h" #include "global.h" #include "baseop.h" #include "turbo.h" class Fec { public: /***************************************************************************** Static constant external variables and external types *****************************************************************************/ /****************************************************************************** External functions ******************************************************************************/ Fec( FecType fec, //!< FEC type FecRate rate, //!< FEC rate ModulType modul, //!< modulation int slotSz, //!< slot size in data bits int numSlot ); //!< number of slots ~Fec(); //! Decode soft bits, return number of output bits or zero if not output produced int decod( uint8 * pBit, //!< output bits, length slotSz * concatenation size const float * pSbit ); //!< input softbits, length slotSz / FEC rate private: /***************************************************************************** Static constant internal variables and internal types *****************************************************************************/ static const int maxBlockSz = maxConcSz*symPerSlot*3; //!< max block size, including CTC 1/3 static const int ccMemLen = 7; //!< CC memory length including input bit = K static const int ccNumStat = 0x01UL<<(ccMemLen-1); //!< CC number of state of viterbi decoder = m static const int ccNumGen = 2; //!< CC number of generator polynomials = output bits per input bit = n static const int ctcForbidNum = 7; //!< CTC forbidden number of slots in block static const int ctcNumSblock = 6; //!< CTC number of subblock //! Convolutional code internal structure struct Cc { int aOut0[ccNumStat]; //!< output symbols for 0 input bit, MSB is 0-th generator polinom int aState0[ccNumStat]; //!< next state for 0 input bit, LSB is odlest bit in register int aOut1[ccNumStat]; //!< output symbols for 1 input bit, MSB is 0-th generator polinom int aState1[ccNumStat]; //!< next state for 1 input bit, LSB is odlest bit in register float prev_section[ccNumStat]; float next_section[ccNumStat]; int prev_bit[ccNumStat*(maxConcSz*symPerSlot + symPerSlot/2)]; int prev_state[ccNumStat*(maxConcSz*symPerSlot + symPerSlot/2)]; float rec_array[ccNumGen]; float metric_c[1<<ccNumGen]; }; //! CTC Subblock interleaver params struct CtcSblkIntlvParam { int m; int J; }; static const CtcSblkIntlvParam aCtcSblkIntlvParamTbl[maxConcSz]; //!< CTC Subblock interleaver params table Table 505—Parameters for the subblock interleavers //! CTC inter-component interleaver struct CtcIntIntlvParam { ModulType modul; //!< modulation FecRate rate; //!< FEC rate int numSlot; //!< number of slot int aP[4]; //!< params }; static const CtcIntIntlvParam aCtcIntIntlvParamTbl[]; //!< CTC inter-component interleaver Table 502—CTC channel coding per modulation //! Convolutional turbo code internal structure struct Ctc { int aaSblockIntlv[maxConcSz][maxBlockSz/ctcNumSblock]; //!< subblock interleaver table 8.4.9.2.3.4.2 Subblock interleaving const CtcIntIntlvParam * pIntIntlvParam; //!< pointer to first CTC inter-component interleaver params of specified rate and modulation Turbo * pTurbo; //!< CTC decoder }; static const int aCcGenPol[]; //!< Convolutional code generator polynomials static const int aaCcConcSz[MODUL_NUM][FEC_RATE_NUM]; //!< CC slot concatination size, Table 493—Encoding slot concatenation for different allocations and modulations static const int aaCtcConcSz[MODUL_NUM][FEC_RATE_NUM]; //!< CTC slot concatination size, Table 501—Encoding slot concatenation for different rates in CTC /***************************************************************************** Internal variables *****************************************************************************/ FecType fec; //!< FEC type FecRate rate; //!< FEC rate ModulType modul; //!< modulation int slotSz; //!< slot size in data bits int sbitSz; //!< slot size in softbits int slotCntr; //!< slot counter in block int blockCntr; //!< block counter in burst // concatenation params bool isEqBlock; //!< all block equal length, otherwise 2 last block is different length int numBlock; //!< number of blocks in burst int normNumSlot; //!< normal number of slots in block, equal blocks or not 2 last blocks of nonequal blocks int beflNumSlot; //!< block before last number of slots in block int lastNumSlot; //!< last block number of slots in block float aSbit[maxBlockSz]; //!< block of concatenated slots buffer Cc cc; //!< convolutional code internal data Ctc ctc; //!< convolutional turbo code internal data /****************************************************************************** Internal functions ******************************************************************************/ //! Init concatenation params void initConcat( int numSlot ); //!< number of slots in burst //! Init convolutional code void initCc( int numGen, //!< number of generator polynomials = output bits per input bit const int * pGenPol ); //!< generator polynomials //! Decode convolutional code, return number of output bits of zero if not output produced void decCc( uint8 * pBit, //!< output bits const float * pSbit, //!< input softbits int numSlot ); //!< number of slot in current concatenation block //! Delete convolutional code void deleteCtc(); //! Init convolutional turbo code void initCtc(); //! Init post CTC interleaver void initCtcIntlv(); //! Decode convolutional turbo code, return number of output bits of zero if not output produced void decCtc( uint8 * pBit, //!< output bits const float * pSbit, //!< input softbits int numSlot ); //!< number of slot in current concatenation block //! Deinterleave convolutional turbo code, return softbits in A B Y1 W1 Y2 W2 sequence void intlvCtc( float * pSbit, //!< input/output softbits int numSlot ); //!< number of slot in current concatenation block //! Delete convolutional turbo code void deleteCc(); }; #endif //#ifndef _FEC_H_
[ "iliya.voronov@gmail.com" ]
iliya.voronov@gmail.com
5ca440bb1f1b765d6a90d0a8743a60c14e240e60
5cd42fee97a2aa76f9d1ab1d1e69739efaff4257
/2.4.1/c.h
efdc6f60432d59249bb2d841bf824e2be5a1ddd0
[]
no_license
dgholz/dragon
f8c6dc7827639c4559f0c6be1ca1c23756cd69c3
2ccca119565a12f15f220cb284d98810b93add31
refs/heads/master
2021-01-19T06:10:57.820804
2014-11-04T07:27:22
2014-11-04T07:27:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
203
h
#ifndef C_H #define C_H #include "icharstream.h" struct c { c(icharstream& ics) : _ics(ics) {}; void S(); void operator() () { S(); }; private: c(); icharstream _ics; }; #endif
[ "dgholz@gmail.com" ]
dgholz@gmail.com
1db9dae1185e687c5d1dc4815d0036a21c2a8785
c8d8d5335803d36549cafd55bb7c691e0bcf51fb
/2do-cuatrimestre/ejercicios/archivos-binarios/ej1/ej1/main.cpp
2a56dab6701e962015df4b2c84d08fbc6033c907
[]
no_license
NicoAcosta/utn-ayed
fb7b7f9a065b37b40fac543f3cc2d09ac9362917
d38dc7e64e4e8aed837dfdd4e191f950b8b4c925
refs/heads/main
2023-02-19T01:03:01.808002
2021-01-19T22:24:08
2021-01-19T22:24:08
306,265,257
1
0
null
null
null
null
UTF-8
C++
false
false
974
cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; int main() { FILE *f; int nVal; float val; f = fopen("archivo1.jaja", "wb"); if (f) { cout << "Ingrese cantidad de valores: " << endl; cin >> nVal; for (int i = 0; i < nVal; i++) { cout << endl << endl << "Ingrese valor nº " << i << ": " << endl ; cin >> val; fwrite(&val, sizeof(float), 1, f); } fclose(f); f = fopen("archivo1.jaja", "rb"); cout << endl << endl << endl << "Valores ingresados: " << endl << endl; for (int i = 0; i < nVal; i++) { fread(&val, sizeof(float), 1, f); cout << "Valor nº " << i << ": " << val << endl; } fclose(f); } else cout << "Error al abrir el archivo." << endl; return 0; }
[ "nicacosta@est.frba.utn.edu.ar" ]
nicacosta@est.frba.utn.edu.ar
3553222a4ae49a1232cc82c9881d5029f22f9f51
0d9f235cf7f4829214d9379711381e5de2db216f
/src/map.h
41ad06311cb095f4e7d829f3dfe944bbba2c74ad
[]
no_license
bentglasstube/ld35
c27d179c87a9ba792ec3f3ac8042af0e94e4132b
a41648a46ec631feca5a2af824e505c1f6488ba7
refs/heads/master
2016-09-14T04:30:38.758580
2016-05-03T14:23:36
2016-05-03T14:23:36
56,364,447
0
1
null
2016-04-24T15:51:59
2016-04-16T03:53:32
C++
UTF-8
C++
false
false
1,227
h
#pragma once #include <memory> #include <vector> #include "graphics.h" #include "rect.h" #include "sign.h" #include "spritemap.h" #include "text.h" class Map { public: struct Tile { char c; bool obstruction; float friction; float top, left, right, bottom; }; Map(); void load(std::string file); void draw(Graphics& graphics, int x_offset, int y_offset); void update(Rect player); void push_tile(Map::Tile tile, float dx); Tile tile_at(float x, float y); Tile collision(Rect box, float dx, float dy); int pixel_width() { return width * 16; } int pixel_height() { return height * 16; } int player_x() { return start_x * 16 - 8; } int player_y() { return start_y * 16 + 16; } std::string current_level() { return name; } std::string next_level() { return next; } std::string background() { return bg; } private: typedef std::vector<std::shared_ptr<Sign>> SignSet; SpriteMap tileset; Text text; int height, width; int start_x, start_y; char tiles[128][1024]; std::string name, next, bg; Tile tile(int x, int y); Tile check_tile_range(int x1, int x2, int y1, int y2); SignSet signs; };
[ "alan@eatabrick.org" ]
alan@eatabrick.org
8fb5ad632be5c6b9e8ee49a7938913246bcea696
a957b989ab55dca214390e8e30972604e041bdfd
/tspn.cpp
50a50ee7ee563ec26f3e8176351bd1f7eb4b059c
[]
no_license
zeng2019/K-means-clustering-for-WSN
e6190b00fb7bb1a2a35865f6b37aa5413ce5c869
969988f38811978f16db187a6b6911fb9446fcbe
refs/heads/master
2023-04-15T06:32:27.740455
2020-08-24T20:19:55
2020-08-24T20:19:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,903
cpp
#include<bits/stdc++.h> #define V 4 using namespace std; int maxtsp(int graph[][V],int s) { int i,k; vector<int> vertex; for(i=0;i<V;i++) { if(i!=s) { vertex.push_back(i); } } int maxpath=INT_MIN; do{ int cpath=0; k=s; for(i=0;i<vertex.size();i++) { cpath+=graph[k][vertex[i]]; k=vertex[i]; } cpath+=graph[k][s]; maxpath=max(maxpath,cpath); } while(next_permutation(vertex.begin(),vertex.end())); return maxpath; } int tsp( int graph[][V],int s) { int i; int k; vector<int> vertex; for(i=0;i<V;i++) { if(i!=s) { vertex.push_back(i); } } int minpath=INT_MAX; k=s; do{ int cpath=0; k=s; for(i=0;i<vertex.size();i++) { cpath+=graph[k][vertex[i]]; k=vertex[i]; } cpath+=graph[k][s]; minpath=min(minpath,cpath); } while(next_permutation(vertex.begin(),vertex.end())); return minpath; } int main(){ int graph[][V]={{ 0, 10, 15, 20 }, { 10, 0, 35, 25 }, { 15, 35, 0, 30 }, { 20, 25, 30, 0 }}; int s=0; cout<<tsp(graph,s)<<endl; cout<<maxtsp(graph,s)<<endl; //for 2 sensor based network,optimal TSPN and energy loss modification. //Amount of data at a sensor node is inversely proportional to the radius of communication of the sensor in the network. //Algorithm for TSPN based sensor network /* for 2 sensor system: Step1: Energy loss of a sensor /collector = K r^(alpha); where K = proportionality constant r= estimated radius before improvement; alpha= constant; For Si bit information sensor the Energy loss= K*Si*r^(alpha); problem becomes minimisation problem: minimise Energy net=(k*si*r^(alpha)); subject to : (2(d-r1)+2(d-r2)/velocity of collector)= Dmax; r2=r1(S1/S2)^(1/alpha-1); Function becomes= K1(C/s^(1/alpha-1))=f; Step 2:Calculate TSPN=Dmax; by Elbissioni algorithm over Euclid graph; Step3: if(d<Dmax) do: K1=K1-delta; f=K1(C/s^(1/alpha-1)); else if(d>Dmax) do: K1=K1+delta; f=K1(C/s^(1/alpha-1)); else if(d==Dmax) return f,and optimal radius r; terminate */ cout<<"enter radius of 2 circles"<<endl; float r1,r2; cin>>r1>>r2; cout<<"enter distance between them"<<endl; float d; cin>>d; cout<<"enter packet information rate of S1 and S2"<<endl; float pk1,pk2; cin>>pk1>>pk2; float K= 10^(-5); float alpha= 3; cout<<"Energy loss in case of two sensor system"<<endl; float energy= K*(pk1)*pow(r1,alpha) + K*(pk2)*(pow(r2,alpha)); cout<<energy<<endl; //oprimtality() return 0;}
[ "noreply@github.com" ]
zeng2019.noreply@github.com
5a22e75e2db5c1aa11b7ff6d5b94c3a8117e3deb
97f8be92810bafdbf68b77c8a938411462d5be4b
/3rdParty/rocksdb/6.8/monitoring/persistent_stats_history.cc
7cc869cf2191d7624e34254f4db98ee9db1d1823
[ "Apache-2.0", "BSD-3-Clause", "ICU", "LGPL-2.1-or-later", "BSD-4-Clause", "GPL-1.0-or-later", "Python-2.0", "OpenSSL", "Bison-exception-2.2", "JSON", "ISC", "GPL-2.0-only", "MIT", "BSL-1.0", "LicenseRef-scancode-public-domain", "CC0-1.0", "BSD-2-Clause", "LicenseRef-scancode-autoco...
permissive
solisoft/arangodb
022fefd77ca704bfa4ca240e6392e3afebdb474e
efd5a33bb1ad1ae3b63bfe1f9ce09b16116f62a2
refs/heads/main
2021-12-24T16:50:38.171240
2021-11-30T11:52:58
2021-11-30T11:52:58
436,619,840
2
0
Apache-2.0
2021-12-09T13:05:46
2021-12-09T13:05:46
null
UTF-8
C++
false
false
6,307
cc
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. #include "monitoring/persistent_stats_history.h" #include <cstring> #include <string> #include <utility> #include "db/db_impl/db_impl.h" #include "port/likely.h" #include "util/string_util.h" namespace ROCKSDB_NAMESPACE { // 10 digit seconds timestamp => [Sep 9, 2001 ~ Nov 20, 2286] const int kNowSecondsStringLength = 10; const std::string kFormatVersionKeyString = "__persistent_stats_format_version__"; const std::string kCompatibleVersionKeyString = "__persistent_stats_compatible_version__"; // Every release maintains two versions numbers for persistents stats: Current // format version and compatible format version. Current format version // designates what type of encoding will be used when writing to stats CF; // compatible format version designates the minimum format version that // can decode the stats CF encoded using the current format version. const uint64_t kStatsCFCurrentFormatVersion = 1; const uint64_t kStatsCFCompatibleFormatVersion = 1; Status DecodePersistentStatsVersionNumber(DBImpl* db, StatsVersionKeyType type, uint64_t* version_number) { if (type >= StatsVersionKeyType::kKeyTypeMax) { return Status::InvalidArgument("Invalid stats version key type provided"); } std::string key; if (type == StatsVersionKeyType::kFormatVersion) { key = kFormatVersionKeyString; } else if (type == StatsVersionKeyType::kCompatibleVersion) { key = kCompatibleVersionKeyString; } ReadOptions options; options.verify_checksums = true; std::string result; Status s = db->Get(options, db->PersistentStatsColumnFamily(), key, &result); if (!s.ok() || result.empty()) { return Status::NotFound("Persistent stats version key " + key + " not found."); } // read version_number but do nothing in current version *version_number = ParseUint64(result); return Status::OK(); } int EncodePersistentStatsKey(uint64_t now_seconds, const std::string& key, int size, char* buf) { char timestamp[kNowSecondsStringLength + 1]; // make time stamp string equal in length to allow sorting by time snprintf(timestamp, sizeof(timestamp), "%010d", static_cast<int>(now_seconds)); timestamp[kNowSecondsStringLength] = '\0'; return snprintf(buf, size, "%s#%s", timestamp, key.c_str()); } void OptimizeForPersistentStats(ColumnFamilyOptions* cfo) { cfo->write_buffer_size = 2 << 20; cfo->target_file_size_base = 2 * 1048576; cfo->max_bytes_for_level_base = 10 * 1048576; cfo->soft_pending_compaction_bytes_limit = 256 * 1048576; cfo->hard_pending_compaction_bytes_limit = 1073741824ul; cfo->compression = kNoCompression; } PersistentStatsHistoryIterator::~PersistentStatsHistoryIterator() {} bool PersistentStatsHistoryIterator::Valid() const { return valid_; } Status PersistentStatsHistoryIterator::status() const { return status_; } void PersistentStatsHistoryIterator::Next() { // increment start_time by 1 to avoid infinite loop AdvanceIteratorByTime(GetStatsTime() + 1, end_time_); } uint64_t PersistentStatsHistoryIterator::GetStatsTime() const { return time_; } const std::map<std::string, uint64_t>& PersistentStatsHistoryIterator::GetStatsMap() const { return stats_map_; } std::pair<uint64_t, std::string> parseKey(const Slice& key, uint64_t start_time) { std::pair<uint64_t, std::string> result; std::string key_str = key.ToString(); std::string::size_type pos = key_str.find("#"); // TODO(Zhongyi): add counters to track parse failures? if (pos == std::string::npos) { result.first = port::kMaxUint64; result.second.clear(); } else { uint64_t parsed_time = ParseUint64(key_str.substr(0, pos)); // skip entries with timestamp smaller than start_time if (parsed_time < start_time) { result.first = port::kMaxUint64; result.second = ""; } else { result.first = parsed_time; std::string key_resize = key_str.substr(pos + 1); result.second = key_resize; } } return result; } // advance the iterator to the next time between [start_time, end_time) // if success, update time_ and stats_map_ with new_time and stats_map void PersistentStatsHistoryIterator::AdvanceIteratorByTime(uint64_t start_time, uint64_t end_time) { // try to find next entry in stats_history_ map if (db_impl_ != nullptr) { ReadOptions ro; Iterator* iter = db_impl_->NewIterator(ro, db_impl_->PersistentStatsColumnFamily()); char timestamp[kNowSecondsStringLength + 1]; snprintf(timestamp, sizeof(timestamp), "%010d", static_cast<int>(std::max(time_, start_time))); timestamp[kNowSecondsStringLength] = '\0'; iter->Seek(timestamp); // no more entries with timestamp >= start_time is found or version key // is found to be incompatible if (!iter->Valid()) { valid_ = false; delete iter; return; } time_ = parseKey(iter->key(), start_time).first; valid_ = true; // check parsed time and invalid if it exceeds end_time if (time_ > end_time) { valid_ = false; delete iter; return; } // find all entries with timestamp equal to time_ std::map<std::string, uint64_t> new_stats_map; std::pair<uint64_t, std::string> kv; for (; iter->Valid(); iter->Next()) { kv = parseKey(iter->key(), start_time); if (kv.first != time_) { break; } if (kv.second.compare(kFormatVersionKeyString) == 0) { continue; } new_stats_map[kv.second] = ParseUint64(iter->value().ToString()); } stats_map_.swap(new_stats_map); delete iter; } else { valid_ = false; } } } // namespace ROCKSDB_NAMESPACE
[ "noreply@github.com" ]
solisoft.noreply@github.com
3438d324de2cf33a2337ce2d6bf4917116c10859
190e25c81214b329a131ecf4df7bf1d54c455466
/src/serversocketutil.cc
1d18ff98055f30d3ef2c2687c1741ccd21bac4fc
[ "MIT" ]
permissive
connectiblutz/bcLib
a5fa1c0da063f6616a76aef42445318386275003
2227677b165809940d51977c34e4745f64217c6a
refs/heads/main
2022-11-26T01:44:51.695266
2020-07-03T15:47:48
2020-07-03T15:47:48
273,704,089
0
0
null
null
null
null
UTF-8
C++
false
false
2,070
cc
#include "bcl/serversocketutil.h" #include "bcl/logutil.h" #include "bcl/stringutil.h" #ifdef _WIN32 #include "winsock2.h" #include "ws2tcpip.h" #else #include <arpa/inet.h> #include <unistd.h> #define closesocket ::close #endif namespace bcl { #ifdef _WIN32 #define inet_pton InetPtonA ServerSocket::WSAInit::WSAInit() { WSADATA wsaData; WSAStartup(MAKEWORD(2, 2), &wsaData); } ServerSocket::WSAInit::~WSAInit() { WSACleanup(); } #endif ServerSocket::ServerSocket(int type, const SocketAddress& addr) : sock(0), listening(false) { #ifdef _WIN32 static WSAInit wsaInit; #endif LogUtil::Debug()<<"listening socket on "<<addr.toString(); sock = socket(addr.family(), type, 0); if (0!=bind(sock,addr.getSockaddr(), addr.getSockaddrSize())) { LogUtil::Debug()<<"failed to find to "<<addr.toString() << ", error "<<errno; } else { listening=true; } } void ServerSocket::close() { if (sock) { closesocket(sock); sock=0; } } ServerSocket::~ServerSocket() { close(); } UdpServerSocket::UdpServerSocket(const SocketAddress& addr) : ServerSocket(SOCK_DGRAM, addr) { } UdpServerSocket::~UdpServerSocket() { } uint16_t UdpServerSocket::ReadPacket(SocketAddress& address, char* buffer, uint16_t maxPacketSize) { struct sockaddr src_addr; socklen_t src_len = sizeof src_addr; ssize_t read = recvfrom(sock, buffer, maxPacketSize, 0, &src_addr, &src_len); if (read == -1) { listening=false; return 0; } address = SocketAddress(&src_addr); return read; } void UdpServerSocket::WritePacket(const SocketAddress& dest, char* data, uint16_t size) { ssize_t written = sendto(sock,data,size,0,dest.getSockaddr(),dest.getSockaddrSize()); if (written!=size) { LogUtil::Debug()<<"failed to write "<<size<<" bytes, error "<<errno; } } std::shared_ptr<ServerSocket> ServerSocketUtil::Create(const std::string& protocol, const SocketAddress& addr) { if (protocol=="udp") return std::dynamic_pointer_cast<ServerSocket>(std::make_shared<UdpServerSocket>(addr)); return std::shared_ptr<ServerSocket>(); } }
[ "blutz@connectify.me" ]
blutz@connectify.me
d9e9e827a4164e2d5ac805a228fbb34717f417f7
ab10d257aa2bbdbced58fded27cb0acb694376e5
/Personal projects/p009.cpp
5dc6927248961cf32e1ca5bb9fa5b88c5fa5fdb5
[]
no_license
DuniPls/DanielCastello
1d8d9d96f5bb7c1c926b43d8e29e08935a463d1b
8dec02041b9e545a22568773f48eea681504e1d9
refs/heads/master
2021-01-24T13:19:11.723621
2019-09-12T17:07:51
2019-09-12T17:07:51
123,167,008
0
0
null
null
null
null
UTF-8
C++
false
false
1,371
cpp
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ /* A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. */ #include <iostream> #include <math.h> void evenTest(){ int a; int b; int c; int j = 0; int k = 0; for (int i = 2; i < 50; i=i+2) { j += (i - 1); k = j + 2; if(i + j + k == 1000){std::cout<<(i*j*k)<<'\n';} } } void oddTest(){ int a; int b; int c; int j = 0; int k = 0; for (int i = 1; i < 50; i=i+2) { j += (i + 1); k = j + 1; if(i + j + k == 1000){std::cout<<(i*j*k)<<'\n';} } } void fullTest() { int a, b, c; for (int i = 1; i < 500; i++) { for (int j = i + 1; j < 500; j++) { int k = (1000 - i - j); if (i*i + j*j == k*k) {std::cout<<i<<" "<<j<<" "<<k<<": "<<(i*j*k)<<'\n';} } } } int main() { //evenTest(); //oddTest(); fullTest(); std::cout << "No results." << '\n'; return 0; }
[ "dcastello@enti.cat" ]
dcastello@enti.cat
f64cdb2666d36bc5c66c0b49618c49907c1d6d49
f32b14aeac2969ac99ea65703d5b98ebd0a4684f
/mihttp/timewrap.h
caa17e7743fd04683f14f7ac36e3d06ccd63674d
[]
no_license
Justxu/micode
64dfe6c3b5313c1406c3f766643805b784f2010f
4dd761c231ff37a8020ca32195749f036eb5e53b
refs/heads/master
2020-04-01T08:09:12.690137
2014-12-30T08:57:49
2014-12-30T08:57:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
773
h
#pragma once #include <sys/types.h> #include <time.h> #include <sys/time.h> #include "safe_time.h" class timee { // _msecs: timeval _tv; public: timee() { _tv.tv_sec = 0; _tv.tv_usec = 0; } timee &operator=(const timee &rhs) { _tv = rhs._tv; } long long operator -(const timee &rhs) { return (_tv.tv_sec - rhs._tv.tv_sec) * 1000000 + _tv.tv_usec - rhs._tv.tv_usec; } static timee now() { timee t; safe_gettimeofday(&(t._tv), 0); return t; } }; class time_impl { int64_t rdc; public: long long operator -(const time_impl &rhs) {}; private: static int get_rdtsc() { asm("rdtsc"); } static int64_t rdtsc(void) { int i, j; asm volatile ("rdtsc" : "=a"(i), "=d"(j) : ); return ((unsigned int64_t)j<<32) + (int64_t)i; } }; class date { };
[ "wanfei@localhost.localdomain" ]
wanfei@localhost.localdomain
5fc53d627e3c27e7be19bd8cd4634a9baadbbae5
761175d8c1dad09a7c0fa326c6bde3999be5d778
/corrector.cpp
d6fbb55cc6797a9af972d08218ec84d77cdc3239
[]
no_license
DiegoBriaares/Spelling-Corrector
5459d460e6775ac16e86acfb07c18aa19c8a5dc2
3f916f7d45f6c8db2f842a23ae6dbfe26ff471c0
refs/heads/master
2020-04-05T03:04:39.147500
2018-11-07T06:38:44
2018-11-07T06:38:44
156,500,516
0
1
null
null
null
null
UTF-8
C++
false
false
7,766
cpp
#include <bits/stdc++.h> using namespace std; const long long INF = 999999999; bool corrected; vector<string> candidates; vector<string> new_candidates; map<string, bool> in_set; map<string, int> word_ocurrences; map<pair<string, string>, int> contiguous_words_ocurrences; string generalize(string s) { string new_s = ""; for (int i = 0; i < s.size(); i++) { if (s[i] >= 'A' && s[i] <= 'Z' || s[i] >= 'a' && s[i] <= 'z') { char non_capital_letter; if (s[i] >= 'A' && s[i] <= 'Z') { non_capital_letter = s[i] + ('a' - 'A'); new_s.push_back(non_capital_letter); } else { non_capital_letter = s[i]; new_s.push_back(non_capital_letter); } } } return new_s; } bool is_a_word(string s) { return (word_ocurrences.find(s) != word_ocurrences.end()); } void add_candidates_deleting() { vector<string> my_candidates; for (int i = 0; i < candidates.size(); i++) { string word = candidates[i], new_word; for (int j = 0; j < word.size(); j++) { new_word = word; new_word.erase(new_word.begin() + j); if (is_a_word(new_word)) corrected = true; if (!in_set[new_word]) { my_candidates.push_back(new_word); in_set[new_word] = true; } } } for (int i = 0; i < my_candidates.size(); i++) { new_candidates.push_back(my_candidates[i]); } } void add_candidates_transposing() { vector<string> my_candidates; for (int i = 0; i < candidates.size(); i++) { string word = candidates[i], new_word; for (int j = 1; j < word.size(); j++) { new_word = word; string swapped; swapped.push_back(word[j]); swapped.push_back(word[j - 1]); new_word.replace(j - 1, 2, swapped); if (is_a_word(new_word)) corrected = true; if (!in_set[new_word]) { my_candidates.push_back(new_word); in_set[new_word] = true; } } } for (int i = 0; i < my_candidates.size(); i++) { new_candidates.push_back(my_candidates[i]); } } void add_candidates_inserting() { vector<string> my_candidates; for (int i = 0; i < candidates.size(); i++) { string word = candidates[i], new_word; for (int j = 0; j < word.size(); j++) { for (int letter = 'a'; letter <= 'z'; letter++) { new_word = word; string inserted; inserted.push_back(letter); new_word.insert(j, inserted); if (is_a_word(new_word)) corrected = true; if (!in_set[new_word]) { my_candidates.push_back(new_word); in_set[new_word] = true; } } } } for (int i = 0; i < my_candidates.size(); i++) { new_candidates.push_back(my_candidates[i]); } } void add_candidates_replacing() { vector<string> my_candidates; for (int i = 0; i < candidates.size(); i++) { string word = candidates[i], new_word; for (int j = 0; j < word.size(); j++) { new_word = word; for (int letter = 'a'; letter <= 'z'; letter++) { string inserted; inserted.push_back(letter); new_word.replace(j, 1, inserted); if (is_a_word(new_word)) corrected = true; if (!in_set[new_word]) { my_candidates.push_back(new_word); in_set[new_word] = true; } } } } for (int i = 0; i < my_candidates.size(); i++) { new_candidates.push_back(my_candidates[i]); } } string most_probable_word(string last_word) { string word; int ans = 0; for (int i = 1; i < candidates.size(); i++) { if (!is_a_word(candidates[i])) continue; int ocurrences = 1; if (contiguous_words_ocurrences.find(make_pair(last_word, candidates[i])) != contiguous_words_ocurrences.end()) { ocurrences = contiguous_words_ocurrences[make_pair(last_word, candidates[i])]; } ocurrences *= ocurrences; ocurrences += word_ocurrences[candidates[i]]; if (ocurrences > ans) { ans = ocurrences; word = candidates[i]; } } return word; } vector<string> dictionary; vector<pair<int, string> > cool_candidates; int current_best; int memo[41][41]; string typed, target; int dp(int i, int j) { if (j == typed.size()) { return 0; } if(i == target.size()) return (-INF); if (memo[i][j] != -1) return memo[i][j]; memo[i][j] = dp(i, j + 1); for (int it = i; it < target.size(); it++) { if (target[it] == typed[j]) { return memo[i][j] = max(memo[i][j], dp(it + 1, j + 1) + 1); } } return memo[i][j]; } int edit_distance() { memset(memo, -1, sizeof(memo)); int distance = abs(dp(0, 0) - (int)typed.size()); current_best = min(current_best, distance); return distance; } int calculate_proba (string last_word) { return word_ocurrences[target] + (contiguous_words_ocurrences[make_pair(last_word, target)] * contiguous_words_ocurrences[make_pair(last_word, target)]); } string other_word_correction(string s, string last_word) { string word; int ans = 0; typed = s; current_best = 4; candidates.clear(); cool_candidates.clear(); for (int i = 0; i < dictionary.size(); i++) { target = dictionary[i]; int score = edit_distance(); if (abs((int)target.size() - (int)typed.size()) <= current_best && score <= current_best) cool_candidates.push_back(make_pair(score, target)); } sort(cool_candidates.begin(), cool_candidates.end()); for (int i = 0; i < cool_candidates.size(); i++) { if (i && cool_candidates[i].first > cool_candidates[i - 1].first) break; target = cool_candidates[i].second; int score = calculate_proba(last_word); if (score > ans) { ans = score; word = target; } } return (word.empty() ? s : word); } string correct_word(string s, string last_word) { string word; corrected = false; in_set.clear(); candidates.clear(); new_candidates.clear(); candidates.push_back(s); for (int edit_distance = 1; edit_distance <= 2; edit_distance++) { add_candidates_deleting(); add_candidates_transposing(); add_candidates_inserting(); add_candidates_replacing(); for (int i = 0; i < new_candidates.size(); i++) candidates.push_back(new_candidates[i]); new_candidates.clear(); if (corrected) { word = most_probable_word(last_word); return word; } } return other_word_correction(s, last_word); return s; } int main () { string word, last_word, new_word; ifstream big; big.open("big.txt"); while (big >> word) { word = generalize(word); if (!word.empty()) { if (!word_ocurrences[word]) dictionary.push_back(word); word_ocurrences[word]++; if(word_ocurrences[word] == 1)contiguous_words_ocurrences[make_pair("", word)]++; if (!last_word.empty()) { contiguous_words_ocurrences[make_pair(last_word, word)]++; } last_word = word; } } big.close(); big.open("words.txt"); while (big >> word) { int ocurrences; char coma; big >> ocurrences; big >> coma; word = generalize(word); if (!word_ocurrences[word])dictionary.push_back(word); word_ocurrences[word] += ocurrences; } big.close(); ifstream text; big.open("target/chuchum.txt"); freopen("target/choxom.txt", "w", stdout); last_word = ""; while (big >> word) { new_word = generalize(word); if (!is_a_word(new_word)) { word = correct_word(new_word, last_word); cout << word << " "; } else { cout << word << " "; } word = generalize(word); if (!word.empty()) last_word = word; } }
[ "noreply@github.com" ]
DiegoBriaares.noreply@github.com
1d9bfb169e1d7a53fb8dee47b5933e5c6deed3f3
70668b85b4946bb23e918db1b4a68a54910d9b36
/codingblocks/Divid and Conquer/EKO.cpp
556080f13aeb7f149f89ff32fee31e475a9886d4
[]
no_license
Ishaan29/fuzzy-chainsaw-algo
397e9feddca2a25902081a9d9316923c151779f1
b4fa1f69721f5fe53745303879f9c8ff2c1a8e79
refs/heads/master
2021-06-25T00:26:34.720087
2021-02-28T08:24:52
2021-02-28T08:24:52
201,107,127
3
0
null
2021-02-28T08:24:52
2019-08-07T18:34:25
C++
UTF-8
C++
false
false
1,188
cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define lli long long int void c_p_c() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ONLINE_JUDGE freopen("/Users/ishan/Desktop/fuzzy-chainsaw-algo/input.txt", "r", stdin); freopen("/Users/ishan/Desktop/fuzzy-chainsaw-algo/output.txt", "w", stdout); #endif } bool isPossible(vector<lli> &arr, lli n, lli k, lli mid){ lli cnt = 0; for(int i = 0; i < n; i++){ if(arr[i] >= mid) { cnt += abs(mid-arr[i]); } } if(cnt < k){ return false; }else { return true; } } int main(){ c_p_c(); ll int n; cin>>n; ll int k; cin>>k; vector<ll int> arr; ll int m = INT_MIN; for(int i = 0; i < n; i++){ ll int t; cin>>t; arr.push_back(t); if(t >= m){ m = t; } } ll int s = 0; ll int e = m; ll int ans = 0; while(s <= e){ ll int mid = s+(e-s)/2; bool p = isPossible(arr,n,k,mid); if(p){ ans = mid; s = mid + 1; }else{ e = mid - 1; } } cout<<ans<<endl; return 0; }
[ "bajpaiishan@yahoo.in" ]
bajpaiishan@yahoo.in
5e812e8328b957ed1443d544b977bad1f58494da
657b85a8e705b49c67a7cda9776beaa2e649f6a4
/capter6/ex6.5.4/ex6.5.4/main.cpp
d153a323fdf3f591ec700f7b1c4323bb5525f985
[]
no_license
longjiezhong/leaning_openCV3
cce94604c692dbaf9c5202843653829337a1f75b
906661ba1b7ef7cb30c4c2ca626de805ac893e2d
refs/heads/master
2021-01-02T08:12:36.910312
2017-08-31T12:56:49
2017-08-31T12:56:49
98,952,364
0
0
null
null
null
null
GB18030
C++
false
false
4,071
cpp
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv; using namespace std; Mat g_srcImage, g_dstImage, g_grayImage, g_maskImage; int g_nFillMode = 1; int g_nLowDifference = 20, g_nUpDifference = 20; int g_nConnectivity = 4; int g_bIsColor = true; bool g_bUseMask = false; int g_nNewMackVal = 255; static void onMouse(int event, int x, int y, int, void*) { if(event != CV_EVENT_LBUTTONDOWN) return; Point seed = Point(x, y); int LowDifference = g_nFillMode == 0 ? 0 : g_nLowDifference; int UpDifference = g_nFillMode == 0 ? 0 : g_nUpDifference; int flags = g_nConnectivity + (g_nNewMackVal << 8) + (g_nFillMode == 1 ? CV_FLOODFILL_FIXED_RANGE : 0); int b = (unsigned)theRNG() & 255; //产生的新像素颜色是随机的 int g = (unsigned)theRNG() & 255; int r = (unsigned)theRNG() & 255; Rect ccomp; Scalar newVal = g_bIsColor ? Scalar(b,g,r) : Scalar(r*0.299 + g*0.587 +b*0.114); Mat dst = g_bIsColor ? g_dstImage : g_grayImage; int area; if( g_bUseMask ) { threshold(g_maskImage, g_maskImage, 1, 128, CV_THRESH_BINARY); area = floodFill(dst, //被处理的图像 g_maskImage, //掩膜; seed, //漫水填充算法的起点 newVal, //像素被填充的值 &ccomp, //设置重绘区域最小边界矩形区域 Scalar(LowDifference, LowDifference, LowDifference), //重绘区域负差最大值 Scalar(UpDifference, UpDifference, UpDifference), //重绘区域正查最大值 flags); //操作标志符 imshow( "mask", g_maskImage ); } else { area = floodFill(dst, seed, newVal, &ccomp, Scalar(LowDifference, LowDifference, LowDifference), Scalar(UpDifference, UpDifference, UpDifference), flags); } imshow("效果图", dst); cout << area << "个像素被重绘\n" << endl; } int main(int argc, char** argv) { g_srcImage = imread("1.png", 1); if( !g_srcImage.data ) cout << "读取图片错误!" << endl; g_srcImage.copyTo(g_dstImage); cvtColor(g_srcImage, g_grayImage, COLOR_RGB2GRAY); g_maskImage.create(g_srcImage.rows+2, g_srcImage.cols+2, CV_8UC1); namedWindow("效果图", CV_WINDOW_AUTOSIZE); createTrackbar("负差最大值", "效果图", &g_nLowDifference, 255, 0); createTrackbar("正差最大值", "效果图", &g_nUpDifference, 255, 0); setMouseCallback("效果图", onMouse, 0); while(1) { imshow("效果图", g_bIsColor ? g_dstImage : g_grayImage); char c = waitKey(0); if( c == 27 ) { cout << "程序退出......\n"; break; } switch( c ) { case '1': if( g_bIsColor ) { //cout << "键盘“1”被按下,切换彩色/灰度模式" << endl; cvtColor(g_srcImage, g_grayImage, COLOR_RGB2GRAY); g_maskImage = Scalar::all(0); g_bIsColor = false; } else { g_srcImage.copyTo(g_dstImage); g_maskImage = Scalar::all(0); g_bIsColor = true; } break; //按键2被按下,显示/隐藏掩模窗口 case '2' : if(g_bUseMask) { destroyWindow("mask"); g_bUseMask = false; } else { namedWindow("mask", 0); g_maskImage = Scalar::all(0); imshow("mask", g_maskImage); g_bUseMask = true; } break; case '3': cout << "按键3被按下,恢复原始图像" << endl; g_srcImage.copyTo(g_dstImage); cvtColor(g_dstImage, g_grayImage, COLOR_RGB2GRAY); g_maskImage = Scalar::all(0); break; case '4': cout << "按键4被按下,使用空范围的漫水填充" << endl; g_nFillMode = 0; break; case '5': cout << "按键5被按下,使用渐变、固定范围的漫水填充" << endl; g_nFillMode = 1; break; case '6': cout << "按键6被按下,使用渐变、浮动范围的漫水填充" << endl; g_nFillMode = 2; break; case '7': cout << "按键7被按下,操作标志位的低8位使用4位的连接模式" << endl; g_nConnectivity = 4; break; case '8': cout << "按键8被按下,操作标志位的低8位使用8位的链接模式" << endl; g_nConnectivity = 8; break; } } return 0; }
[ "30586750+longjiezhong@users.noreply.github.com" ]
30586750+longjiezhong@users.noreply.github.com
bee0e26e3a4e4694701fa34d52a65b760c85c8e7
37d6909e8d5d50c9672064cbf9e3b921fab94741
/백준/11497번 통나무 건너뛰기/11497.cpp
5f44550732b8adce67f80c64b2321a4c25a2446f
[]
no_license
lee-jisung/Algorithm-study
97e795c6cb47d1f4f716719f490031479d0578ca
d42470cd24b3984dc15992089d34dbe2ae6bb70d
refs/heads/master
2021-06-28T05:49:12.417367
2021-04-01T13:53:43
2021-04-01T13:53:43
225,784,579
3
0
null
null
null
null
UTF-8
C++
false
false
868
cpp
#include <iostream> #include <algorithm> #include <queue> using namespace std; /* 정규분포 => 가운데부터 큰 숫자를 넣고, 양 옆에 차례대로 숫자들을 분포시킴 */ int T; int level; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cin >> T; while (T--) { level = 1e9; priority_queue<int, vector<int>, greater<int>> pq; int n, res[10001]; cin >> n; for (int i = 0; i < n; i++) { int num; cin >> num; pq.push(num); } int p = 0, q = n - 1; for (int i = 0; i < n / 2; i++) { res[p++] = pq.top(); pq.pop(); res[q--] = pq.top(); pq.pop(); } if (!pq.empty()) res[p] = pq.top(); int tmp = 0; for (int i = 0; i < n-1; i++) { tmp = max(tmp, abs(res[i] - res[i + 1])); } tmp = max(tmp, abs(res[0] - res[n - 1])); level = min(tmp, level); cout << level << "\n"; } return 0; }
[ "noreply@github.com" ]
lee-jisung.noreply@github.com