blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
201
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
85
| license_type
stringclasses 2
values | repo_name
stringlengths 7
100
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 260
values | visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 11.4k
681M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 17
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 80
values | src_encoding
stringclasses 28
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 8
9.86M
| extension
stringclasses 52
values | content
stringlengths 8
9.86M
| authors
sequencelengths 1
1
| author
stringlengths 0
119
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c7a9266d4361405a1d575bb1fdb9031d81424e57 | 2025a00fd5c69cafd70e5e81f527b81e29fed203 | /Model.cpp | 8d5c546735315d84bd0e9271bb7de64cd36b0832 | [] | no_license | MorielTurjeman/mazeProject | 1564ff7e40c440ed1e4fdcbbe3523b48561520d8 | 80160f85ee0f89bf94e19869747cb66d798818e4 | refs/heads/master | 2022-12-26T17:07:55.950380 | 2020-10-13T09:51:11 | 2020-10-13T09:51:11 | 286,579,664 | 1 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 66 | cpp | //
// Created by Sapir Ezra on 23/08/2020.
//
#include "Model.h"
| [
"[email protected]"
] | |
ee2abeb4a9a45dc88b4e76656ed0945806f328a1 | 16048cba139bfca6f594c728380e4e41394558fc | /test/lib/googletest/src/gtest-printers.cc | 0ba79ca3af461adf24a8194bb65506ce1b4166fe | [
"BSD-3-Clause"
] | permissive | niccoloZanieriUnifi/template_images | bb63d93d904b91098ee79432d467c14af4b1671f | 52df42a30416ac73d177050a4a90ec4c9fd9ba71 | refs/heads/master | 2022-12-12T04:52:39.071683 | 2020-08-09T15:34:21 | 2020-08-09T15:34:21 | 284,725,092 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,736 | cc | // Copyright 2007, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: [email protected] (Zhanyong Wan)
// Google Test - The Google C++ Testing Framework
//
// This file implements a universal value printer that can print a
// value of any type T:
//
// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
//
// It uses the << operator when possible, and prints the bytes in the
// object otherwise. A user can override its behavior for a class
// type Foo by defining either operator<<(::std::ostream&, const Foo&)
// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that
// defines Foo.
#include "gtest/gtest-printers.h"
#include <stdio.h>
#include <cctype>
#include <cwchar>
#include <ostream> // NOLINT
#include <string>
#include "gtest/internal/gtest-port.h"
#include "src/gtest-internal-inl.h"
namespace testing {
namespace {
using ::std::ostream;
// Prints a segment of bytes in the given object.
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
void PrintByteSegmentInObjectTo(const unsigned char *obj_bytes, size_t start,
size_t count, ostream *os) {
char text[5] = "";
for (size_t i = 0; i != count; i++) {
const size_t j = start + i;
if (i != 0) {
// Organizes the bytes into groups of 2 for easy parsing by
// human.
if ((j % 2) == 0)
*os << ' ';
else
*os << '-';
}
GTEST_SNPRINTF_(text, sizeof(text), "%02X", obj_bytes[j]);
*os << text;
}
}
// Prints the bytes in the given value to the given ostream.
void PrintBytesInObjectToImpl(const unsigned char *obj_bytes, size_t count,
ostream *os) {
// Tells the user how big the object is.
*os << count << "-byte object <";
const size_t kThreshold = 132;
const size_t kChunkSize = 64;
// If the object size is bigger than kThreshold, we'll have to omit
// some details by printing only the first and the last kChunkSize
// bytes.
// TODO(wan): let the user control the threshold using a flag.
if (count < kThreshold) {
PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
} else {
PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
*os << " ... ";
// Rounds up to 2-byte boundary.
const size_t resume_pos = (count - kChunkSize + 1) / 2 * 2;
PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
}
*os << ">";
}
} // namespace
namespace internal2 {
// Delegates to PrintBytesInObjectToImpl() to print the bytes in the
// given object. The delegation simplifies the implementation, which
// uses the << operator and thus is easier done outside of the
// ::testing::internal namespace, which contains a << operator that
// sometimes conflicts with the one in STL.
void PrintBytesInObjectTo(const unsigned char *obj_bytes, size_t count,
ostream *os) {
PrintBytesInObjectToImpl(obj_bytes, count, os);
}
} // namespace internal2
namespace internal {
// Depending on the value of a char (or wchar_t), we print it in one
// of three formats:
// - as is if it's a printable ASCII (e.g. 'a', '2', ' '),
// - as a hexadecimal escape sequence (e.g. '\x7F'), or
// - as a special escape sequence (e.g. '\r', '\n').
enum CharFormat {
kAsIs,
kHexEscape,
kSpecialEscape
};
// Returns true if c is a printable ASCII character. We test the
// value of c directly instead of calling isprint(), which is buggy on
// Windows Mobile.
inline bool IsPrintableAscii(wchar_t c) {
return 0x20 <= c && c <= 0x7E;
}
// Prints a wide or narrow char c as a character literal without the
// quotes, escaping it when necessary; returns how c was formatted.
// The template argument UnsignedChar is the unsigned version of Char,
// which is the type of c.
template<typename UnsignedChar, typename Char>
static CharFormat PrintAsCharLiteralTo(Char c, ostream *os) {
switch (static_cast<wchar_t>(c)) {
case L'\0':
*os << "\\0";
break;
case L'\'':
*os << "\\'";
break;
case L'\\':
*os << "\\\\";
break;
case L'\a':
*os << "\\a";
break;
case L'\b':
*os << "\\b";
break;
case L'\f':
*os << "\\f";
break;
case L'\n':
*os << "\\n";
break;
case L'\r':
*os << "\\r";
break;
case L'\t':
*os << "\\t";
break;
case L'\v':
*os << "\\v";
break;
default:
if (IsPrintableAscii(c)) {
*os << static_cast<char>(c);
return kAsIs;
} else {
ostream::fmtflags flags = os->flags();
*os << "\\x" << std::hex << std::uppercase
<< static_cast<int>(static_cast<UnsignedChar>(c));
os->flags(flags);
return kHexEscape;
}
}
return kSpecialEscape;
}
// Prints a wchar_t c as if it's part of a string literal, escaping it when
// necessary; returns how c was formatted.
static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream *os) {
switch (c) {
case L'\'':
*os << "'";
return kAsIs;
case L'"':
*os << "\\\"";
return kSpecialEscape;
default:
return PrintAsCharLiteralTo<wchar_t>(c, os);
}
}
// Prints a char c as if it's part of a string literal, escaping it when
// necessary; returns how c was formatted.
static CharFormat PrintAsStringLiteralTo(char c, ostream *os) {
return PrintAsStringLiteralTo(
static_cast<wchar_t>(static_cast<unsigned char>(c)), os);
}
// Prints a wide or narrow character c and its code. '\0' is printed
// as "'\\0'", other unprintable characters are also properly escaped
// using the standard C++ escape sequence. The template argument
// UnsignedChar is the unsigned version of Char, which is the type of c.
template<typename UnsignedChar, typename Char>
void PrintCharAndCodeTo(Char c, ostream *os) {
// First, print c as a literal in the most readable form we can find.
*os << ((sizeof(c) > 1) ? "L'" : "'");
const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);
*os << "'";
// To aid user debugging, we also print c's code in decimal, unless
// it's 0 (in which case c was printed as '\\0', making the code
// obvious).
if (c == 0)
return;
*os << " (" << static_cast<int>(c);
// For more convenience, we print c's code again in hexadecimal,
// unless c was already printed in the form '\x##' or the code is in
// [1, 9].
if (format == kHexEscape || (1 <= c && c <= 9)) {
// Do nothing.
} else {
*os << ", 0x" << String::FormatHexInt(static_cast<UnsignedChar>(c));
}
*os << ")";
}
void PrintTo(unsigned char c, ::std::ostream *os) {
PrintCharAndCodeTo<unsigned char>(c, os);
}
void PrintTo(signed char c, ::std::ostream *os) {
PrintCharAndCodeTo<unsigned char>(c, os);
}
// Prints a wchar_t as a symbol if it is printable or as its internal
// code otherwise and also as its code. L'\0' is printed as "L'\\0'".
void PrintTo(wchar_t wc, ostream *os) {
PrintCharAndCodeTo<wchar_t>(wc, os);
}
// Prints the given array of characters to the ostream. CharType must be either
// char or wchar_t.
// The array starts at begin, the length is len, it may include '\0' characters
// and may not be NUL-terminated.
template<typename CharType>
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
static CharFormat
PrintCharsAsStringTo(
const CharType *begin, size_t len, ostream *os) {
const char *const kQuoteBegin = sizeof(CharType) == 1 ? "\"" : "L\"";
*os << kQuoteBegin;
bool is_previous_hex = false;
CharFormat print_format = kAsIs;
for (size_t index = 0; index < len; ++index) {
const CharType cur = begin[index];
if (is_previous_hex && IsXDigit(cur)) {
// Previous character is of '\x..' form and this character can be
// interpreted as another hexadecimal digit in its number. Break string to
// disambiguate.
*os << "\" " << kQuoteBegin;
}
is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape;
// Remember if any characters required hex escaping.
if (is_previous_hex) {
print_format = kHexEscape;
}
}
*os << "\"";
return print_format;
}
// Prints a (const) char/wchar_t array of 'len' elements, starting at address
// 'begin'. CharType must be either char or wchar_t.
template<typename CharType>
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
static void UniversalPrintCharArray(
const CharType *begin, size_t len, ostream *os) {
// The code
// const char kFoo[] = "foo";
// generates an array of 4, not 3, elements, with the last one being '\0'.
//
// Therefore when printing a char array, we don't print the last element if
// it's '\0', such that the output matches the string literal as it's
// written in the source code.
if (len > 0 && begin[len - 1] == '\0') {
PrintCharsAsStringTo(begin, len - 1, os);
return;
}
// If, however, the last element in the array is not '\0', e.g.
// const char kFoo[] = { 'f', 'o', 'o' };
// we must print the entire array. We also print a message to indicate
// that the array is not NUL-terminated.
PrintCharsAsStringTo(begin, len, os);
*os << " (no terminating NUL)";
}
// Prints a (const) char array of 'len' elements, starting at address 'begin'.
void UniversalPrintArray(const char *begin, size_t len, ostream *os) {
UniversalPrintCharArray(begin, len, os);
}
// Prints a (const) wchar_t array of 'len' elements, starting at address
// 'begin'.
void UniversalPrintArray(const wchar_t *begin, size_t len, ostream *os) {
UniversalPrintCharArray(begin, len, os);
}
// Prints the given C string to the ostream.
void PrintTo(const char *s, ostream *os) {
if (s == NULL) {
*os << "NULL";
} else {
*os << ImplicitCast_<const void *>(s) << " pointing to ";
PrintCharsAsStringTo(s, strlen(s), os);
}
}
// MSVC compiler can be configured to define whar_t as a typedef
// of unsigned short. Defining an overload for const wchar_t* in that case
// would cause pointers to unsigned shorts be printed as wide strings,
// possibly accessing more memory than intended and causing invalid
// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when
// wchar_t is implemented as a native type.
#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
// Prints the given wide C string to the ostream.
void PrintTo(const wchar_t *s, ostream *os) {
if (s == NULL) {
*os << "NULL";
} else {
*os << ImplicitCast_<const void *>(s) << " pointing to ";
PrintCharsAsStringTo(s, std::wcslen(s), os);
}
}
#endif // wchar_t is native
namespace {
bool ContainsUnprintableControlCodes(const char *str, size_t length) {
const unsigned char *s = reinterpret_cast<const unsigned char *>(str);
for (size_t i = 0; i < length; i++) {
unsigned char ch = *s++;
if (std::iscntrl(ch)) {
switch (ch) {
case '\t':
case '\n':
case '\r':
break;
default:
return true;
}
}
}
return false;
}
bool IsUTF8TrailByte(unsigned char t) { return 0x80 <= t && t <= 0xbf; }
bool IsValidUTF8(const char *str, size_t length) {
const unsigned char *s = reinterpret_cast<const unsigned char *>(str);
for (size_t i = 0; i < length;) {
unsigned char lead = s[i++];
if (lead <= 0x7f) {
continue; // single-byte character (ASCII) 0..7F
}
if (lead < 0xc2) {
return false; // trail byte or non-shortest form
} else if (lead <= 0xdf && (i + 1) <= length && IsUTF8TrailByte(s[i])) {
++i; // 2-byte character
} else if (0xe0 <= lead && lead <= 0xef && (i + 2) <= length &&
IsUTF8TrailByte(s[i]) &&
IsUTF8TrailByte(s[i + 1]) &&
// check for non-shortest form and surrogate
(lead != 0xe0 || s[i] >= 0xa0) &&
(lead != 0xed || s[i] < 0xa0)) {
i += 2; // 3-byte character
} else if (0xf0 <= lead && lead <= 0xf4 && (i + 3) <= length &&
IsUTF8TrailByte(s[i]) &&
IsUTF8TrailByte(s[i + 1]) &&
IsUTF8TrailByte(s[i + 2]) &&
// check for non-shortest form
(lead != 0xf0 || s[i] >= 0x90) &&
(lead != 0xf4 || s[i] < 0x90)) {
i += 3; // 4-byte character
} else {
return false;
}
}
return true;
}
void ConditionalPrintAsText(const char *str, size_t length, ostream *os) {
if (!ContainsUnprintableControlCodes(str, length) &&
IsValidUTF8(str, length)) {
*os << "\n As Text: \"" << str << "\"";
}
}
} // anonymous namespace
// Prints a ::string object.
#if GTEST_HAS_GLOBAL_STRING
void PrintStringTo(const ::string& s, ostream* os) {
if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {
if (GTEST_FLAG(print_utf8)) {
ConditionalPrintAsText(s.data(), s.size(), os);
}
}
}
#endif // GTEST_HAS_GLOBAL_STRING
void PrintStringTo(const ::std::string &s, ostream *os) {
if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {
if (GTEST_FLAG(print_utf8)) {
ConditionalPrintAsText(s.data(), s.size(), os);
}
}
}
// Prints a ::wstring object.
#if GTEST_HAS_GLOBAL_WSTRING
void PrintWideStringTo(const ::wstring& s, ostream* os) {
PrintCharsAsStringTo(s.data(), s.size(), os);
}
#endif // GTEST_HAS_GLOBAL_WSTRING
#if GTEST_HAS_STD_WSTRING
void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
PrintCharsAsStringTo(s.data(), s.size(), os);
}
#endif // GTEST_HAS_STD_WSTRING
} // namespace internal
} // namespace testing
| [
"[email protected]"
] | |
b11cb521f0cb44c61107f6821ba422001b5d6141 | 4f10522b616baf895e2f0d483f207553eb403e4f | /C++/prob5/prob5-2/object.cpp | 76a4ab62386b163b8b89f4f0aed8ae0807b5eeb2 | [] | no_license | shalad2/1-week-programming | c70333980a0dec399136d1336613045858851ad2 | b494c95b0f1409b3b07cc524d883900b9f227444 | refs/heads/main | 2023-04-09T03:43:53.541402 | 2021-04-20T09:10:04 | 2021-04-20T09:10:04 | 359,729,863 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 183 | cpp | #include "object.h"
int Object::m_objectNum = 0;
Object::Object(){
m_objectNum++;
}
Object::~Object(){
m_objectNum--;
}
int Object::getObjectNum(){
return m_objectNum;
} | [
"[email protected]"
] | |
41181d34a4401bddd9e9d4abcb61e2daaabc95b2 | 0a81c689071d0c2100f52091c223b4c0258cdae5 | /extensions/CocoGUILIB/System/UIInputManager.h | 17e963bab0245cda367613e005e9f64ad8f8bfb6 | [
"MIT"
] | permissive | chelin192837/Cocos2d-x-For-CocoStudio | 67ba3dfbf20f7dfc41e2782b32b65d5c07b9eb51 | 8c1c38e44103ef27f357b846a9123957a30bab42 | refs/heads/master | 2021-01-22T14:11:45.369082 | 2013-06-24T07:44:58 | 2013-06-24T07:44:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,662 | h | /****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __UIINPUTMANAGER_H__
#define __UIINPUTMANAGER_H__
#include "cocos2d.h"
#include "../BaseClasses/CocoWidget.h"
NS_CC_EXT_BEGIN
class UIInputManager
{
public:
UIInputManager();
~UIInputManager();
void registWidget(CocoWidget* widget);
void uiSceneHasChanged();
void sortWidgets();
void sortRootWidgets(CocoWidget* root);
void removeManageredWidget(CocoWidget* widget);
CocoWidget* checkEventWidget(cocos2d::CCPoint &touchPoint);
void addCheckedDoubleClickWidget(CocoWidget* widget);
void update(float dt);
bool onTouchPressed(cocos2d::CCTouch* touch);
bool onTouchMoved(cocos2d::CCTouch* touch);
bool onTouchReleased(cocos2d::CCTouch* touch);
bool onTouchCanceled(cocos2d::CCTouch* touch);
bool onTouchPressed(float x,float y);
bool onTouchMoved(float x,float y);
bool onTouchReleased(float x,float y);
bool onTouchCanceled(float x,float y);
protected:
cocos2d::CCArray* m_manageredWidget;
CocoWidget* m_pCurSelectedWidget;
cocos2d::CCPoint touchBeganedPoint;
cocos2d::CCPoint touchMovedPoint;
cocos2d::CCPoint touchEndedPoint;
cocos2d::CCPoint touchCanceledPoint;
bool m_bWidgetBeSorted;
bool m_bTouchDown;
float m_fLongClickTime;
float m_fLongClickRecordTime;
cocos2d::CCArray* checkedDoubleClickWidget;
};
NS_CC_EXT_END
#endif /* defined(__CocoGUI__UIInputManager__) */
| [
"[email protected]"
] | |
717d9f847912a5fb2bb67a7d21453e078db9e1d9 | 7d047ddfa804526639a7000f6bec6472ac308605 | /Combination Sum II.cpp | 50a98cd8849432f4ae606bdd1329a5b5a96391e7 | [] | no_license | YuxuanHe/Leetcode | 7e7c5d6c76aa6caa5c17c49de1dfd2e106039385 | c4799aade380a20f46f2737bc2d3e19c954e2bbd | refs/heads/master | 2021-01-10T14:42:58.447611 | 2015-11-21T23:30:46 | 2015-11-21T23:30:46 | 44,711,436 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 857 | cpp | class Solution {
public:
void helper(vector<vector<int>> &res, vector<int> &sol, int index, vector<int> candidates, int target) {
if(target == 0) {
res.push_back(sol);
return;
}
for(int i = index; i < candidates.size(); i++) {
if(target <= 0 || (i != index && candidates[i] == candidates[i-1]))
continue;
sol.push_back(candidates[i]);
helper(res, sol, i+1, candidates, target - candidates[i]);
sol.pop_back();
}
}
vector<vector<int>> combinationSum2(vector<int>& candidates, int target) {
sort(candidates.begin(), candidates.end());
int sum = 0;
int index = 0;
vector<vector<int>> res;
vector<int> sol;
helper(res, sol, index, candidates, target);
return res;
}
};
| [
"[email protected]"
] | |
deaf5bbe10fb49b122485574e0b7b06307a75499 | c2125d3680761883bf216be8c0e2d7da9a18bd43 | /main.cpp | 390ebcb92bfc00b8e35fd6aab5f864511389314a | [] | no_license | mmmovania/BabyRayTracer | d26d30b1c48dfd0fe601cf85604026044abecbe1 | 7088414b00933f95af7310494c9fed4d817cfc0b | refs/heads/master | 2021-01-18T01:48:58.959302 | 2016-03-02T21:50:36 | 2016-03-02T21:50:36 | 53,151,754 | 3 | 0 | null | 2016-03-04T17:09:02 | 2016-03-04T17:09:02 | null | UTF-8 | C++ | false | false | 523 | cpp | #include <iostream>
#include <stdio.h>
#include "Image.hpp"
#include "Vec3.hpp"
#include "Ray.hpp"
#include "Hitablelist.hpp"
#include "Sphere.hpp"
#include "SimpleRand.hpp"
#include "Lambertian.hpp"
#include <random>
int main(int argc, char ** argv){
int width = 400, height = 200;
Image<float> im(width, height);
//Vec3<float>a(50.0, 0, 0); a.normalize();
//cout << "a =" << a.x() << " " << a.y() << " " << a.z() << endl;
//myteste
srand(1000);
im.saveImage("teste.ppm");
system("pause");
return 0;
} | [
"[email protected]"
] | |
3ead357eb1ea9359f4e58b4a34b27b4bcbc6c687 | 58984ee394c34eca219d0690b79a7d40f2b71543 | /cinn/backends/cuda_util.cc | 45a42d047762bd23274037efde092c0943866bb9 | [
"Apache-2.0"
] | permissive | Joejiong/CINN | 889d95b99e796b6c59a3a2ea5cc129c7094583c1 | a6beb59f729e515dfe60b2264b0bed670acaff88 | refs/heads/develop | 2023-04-27T16:39:35.116998 | 2020-10-27T09:25:40 | 2020-10-27T09:25:40 | 304,844,917 | 0 | 0 | Apache-2.0 | 2020-10-17T09:56:56 | 2020-10-17T09:42:38 | null | UTF-8 | C++ | false | false | 721 | cc | #include "cinn/backends/cuda_util.h"
#include <glog/logging.h>
#include "cinn/backends/extern_func_jit_register.h"
#include "cinn/common/target.h"
namespace cinn {
namespace backends {
std::string cuda_thread_axis_name(int level) {
switch (level) {
case 0:
return "threadIdx.x";
break;
case 1:
return "threadIdx.y";
break;
case 2:
return "threadIdx.z";
break;
}
return "";
}
std::string cuda_block_axis_name(int level) {
switch (level) {
case 0:
return "blockIdx.x";
break;
case 1:
return "blockIdx.y";
break;
case 2:
return "blockIdx.z";
break;
}
return "";
}
} // namespace backends
} // namespace cinn
| [
"[email protected]"
] | |
dfdcad3d2d4d6589a0151090af78fd27f7b7067f | a9d43905377e59faa570df7adc7368d34696a361 | /v1/binary_tree/print_vertical_order.cpp | d19c4cf24ea4b488892d44451e3650e4a75ed157 | [] | no_license | sukantomondal/cplusplus | 4026ca2cb6553e0da3ac7789d2f87dc698d4dac7 | a67972317e9babdd66ba67eda13656be2a229d62 | refs/heads/master | 2021-06-20T07:05:25.607113 | 2021-01-05T03:00:24 | 2021-01-05T03:00:24 | 160,621,518 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,120 | cpp | /*Print a Binary Tree in Vertical Order | Set 2 (Map based Method)
Given a binary tree, print it vertically. The following example illustrates vertical order traversal.
1
/ \
2 3
/ \ / \
4 5 6 7
/ \
8 9
The output of print this tree vertically will be:
4
2
1 5 6
3 8
7
9
*/
#include<iostream>
#include<map>
#include<vector>
using namespace std;
struct Node{
int data;
Node * left, *right;
Node(int data) : data(data), left(NULL), right(NULL){};
};
void vertical_order(Node * node, map<int, vector<int>> &map, int hd){
if(node == NULL)
return;
map[hd].push_back(node->data);
vertical_order(node->left, map, hd-1);
vertical_order(node->right, map, hd+1);
}
int main(){
Node * root = new Node(1);
root->left = new Node(2);
root->right = new Node(3);
root->right->left = new Node(4);
root->right->right = new Node(5);
map<int, vector<int>> map;
vertical_order(root, map, 0);
for(auto x : map){
for(auto y: x.second){
cout << y << " ";
}
cout << "\n";
}
return 0;
}
| [
"[email protected]"
] | |
f41c1b6d3da8b82bd5c0b347a64dbe6008014dc3 | 7fb78184cbad4b8e19c5f9770c62cd2c9f9803b3 | /d05/ex01/main.cpp | 6fad5a591e7db9eb0d1713a1dd997008dc022c30 | [] | no_license | JibranKalia/CPP-Piscine | 7269fd7d5178deec0dab11e821709bac10699c27 | b714fcfce81042fdda980c839667bc7af6e893cb | refs/heads/master | 2021-03-27T19:15:47.574626 | 2017-07-14T13:45:52 | 2017-07-14T13:45:52 | 96,112,989 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,655 | cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jkalia <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/07/10 12:02:42 by jkalia #+# #+# */
/* Updated: 2017/07/11 18:37:03 by jkalia ### ########.fr */
/* */
/* ************************************************************************** */
#include "Bureaucrat.hpp"
#include "Form.hpp"
int main(void) {
Bureaucrat suit1 = Bureaucrat("The Bureaucrat 1", 40);
Bureaucrat suit2 = Bureaucrat("The Bureaucrat 2", 20);
Form contract1 = Form("Contract 1", 50, 70);
Form contract2 = Form("Contract 2", 20, 70);
suit1.signForm(contract1);
std::cout << suit1 << std::endl;
std::cout << contract1 << std::endl;
std::cout << std::endl;
suit1.signForm(contract2);
std::cout << suit1 << std::endl;
std::cout << contract2 << std::endl;
std::cout << std::endl;
suit2.signForm(contract1);
std::cout << suit2 << std::endl;
std::cout << contract1 << std::endl;
std::cout << std::endl;
suit2.signForm(contract2);
std::cout << suit2 << std::endl;
std::cout << contract2 << std::endl;
return (0);
}
| [
"[email protected]"
] | |
5a513ee229c405dea2704c2a323ed32c5995022d | 2f00b1f9c227cb30c8658585940d572be524998c | /src/src/lib/geneial/utility/mixins/Buildable.h | 094e2bec7c2f900c4845ce87888beae678c3416b | [
"MIT"
] | permissive | whentze/geneial | b6a92967a68551463368120b7107b1a07193ba5c | 1c03e802f0ec3eb34de134f3eb3fbe5ab62fcfe7 | refs/heads/master | 2020-05-26T01:42:57.455742 | 2019-05-22T15:26:08 | 2019-05-22T15:26:08 | 188,064,093 | 0 | 0 | null | 2019-05-22T15:17:38 | 2019-05-22T15:17:37 | null | UTF-8 | C++ | false | false | 547 | h | #pragma once
#include <memory>
#include <geneial/namespaces.h>
geneial_private_namespace(geneial)
{
geneial_private_namespace(utility)
{
geneial_export_namespace
{
template<typename C>
class Buildable
{
public:
using ptr = std::shared_ptr<C>;
using const_ptr = std::shared_ptr<const C>;
class Builder
{
public:
Builder()
{
}
virtual ~Builder()
{
}
virtual ptr create() = 0;
};
};
} /* export namespace */
} /* namespace utility */
} /* namespace geneial */
| [
"[email protected]"
] | |
c8d77585008d637d3c0991b2a30b43a0001aeb2c | ff5439a3960f58588db0743155f4783691a7e684 | /mmmpap2.cpp | 4c2efa50631829262e9b6fecedc6b1afccdcc91c | [] | no_license | rahul2412/C_plus_plus | e693c8b4bd8e9bd489b864c79107f7215e0c2306 | f9c61139f3af0564aa4c05de3eaf469558530197 | refs/heads/master | 2021-04-28T08:13:33.811134 | 2018-02-20T19:36:57 | 2018-02-20T19:36:57 | 122,244,448 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 585 | cpp | #include<iostream>
#include<map>
using namespace std;
main()
{
multimap<char,int> mp;
mp.insert(pair<char,int>('a',10));
mp.insert(pair<char,int>('b',12));
mp.insert(pair<char,int>('b',13));
mp.insert(pair<char,int>('c',20));
mp.insert(pair<char,int>('d',15));
mp.insert(pair<char,int>('d',19));
mp.insert(pair<char,int>('e',20));
mp.insert(pair<char,int>('a',10));
mp.insert(pair<char,int>('f',25));
multimap<char,int>::iterator it;
mp.erase('d');
it=mp.begin();
mp.erase(it);
for(it=mp.begin();it!=mp.end();it++)
{
cout<<it->first<<"="<<it->second<<endl;
}
}
| [
"[email protected]"
] | |
2d53832116e6770f45e7111c8b67e46384d9d6df | 50fade5bebf7ed89d151fcdce6dd82ac6c11ff3a | /Overdrive/video/window.h | a1f63230d674d74c8a1132f498cc68493f20416b | [
"MIT"
] | permissive | truongascii/Overdrive | bfd754357a46ac0cb753646f9f38f3d2581d84ce | 5dba4e3d29076e68a9036f6b5175fc78a65b0210 | refs/heads/master | 2020-12-30T22:45:28.683533 | 2014-11-09T19:44:58 | 2014-11-09T19:44:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,534 | h | #ifndef OVERDRIVE_VIDEO_WINDOW_H
#define OVERDRIVE_VIDEO_WINDOW_H
#include <string>
#include <vector>
#include <utility>
#include <memory>
#include "opengl.h"
#include "video/monitor.h"
#include "input/keyboard.h"
#include "input/mouse.h"
namespace overdrive {
namespace video {
class Window {
public:
enum class eClientAPI {
OPENGL,
OPENGL_ES,
UNKNOWN
};
enum class eContextRobustness {
NO_ROBUSTNESS,
NO_RESET_NOTIFICATION,
LOSE_CONTEXT_ON_RESET,
UNKNOWN
};
enum class eOpenGLProfile {
ANY,
COMPATIBILITY,
CORE,
UNKNOWN
};
private:
friend class Video; // only allow the Video class to create Windows (because of handle management and callbacks)
Window();
public:
void setWidth(int newWidth);
void setHeight(int newHeight);
int getWidth() const;
int getHeight() const;
bool isFullscreen() const; // setFullscreen may introduce problems, so I'll leave it as a todo
const std::string& getTitle() const;
void create();
void createFullscreen(Monitor* m); // a video mode will be selected that is the closest match to this window size
void destroy();
void swapBuffers() const;
void makeCurrent() const;
bool shouldClose() const;
// Signals
struct OnCreate { Window* mWindow; };
struct OnFramebufferResize { Window* mWindow; int newWidth, newHeight; };
struct OnClose { Window* mWindow; };
struct OnFocus { Window* mWindow; };
struct OnDeFocus { Window* mWindow; };
struct OnIconify { Window* mWindow; };
struct OnRestore { Window* mWindow; };
struct OnMove { Window* mWindow; int newX, newY; };
struct OnRefresh { Window* mWindow; };
struct OnResize { Window* mWindow; int newWidth, newHeight; };
// Window Attributes
bool isFocused() const;
bool isIconified() const;
bool isVisible() const;
bool isResizable() const;
bool isDecorated() const;
void getPosition(int& x, int& y) const;
void getSize(int& width, int& height) const;
void getFramebufferSize(int& width, int& height) const;
// Context Attributes
eClientAPI getClientAPI() const;
int getContextVersionMajor() const;
int getContextVersionMinor() const;
int getContextRevision() const;
bool isOpenGLForwardCompatible() const;
bool isOpenGLDebugContext() const;
eContextRobustness getContextRobustness() const;
eOpenGLProfile getOpenGLProfile() const;
// Triggers
void setTitle(std::string title);
void setPosition(int x, int y);
void setSize(int width, int height);
void iconify();
void restore();
void show();
void hide();
struct CreationHints {
void apply(); // checks and applies the current settings
bool mResizable = true;
bool mVisible = true;
bool mDecorated = true;
int mRedBits = 8;
int mGreenBits = 8;
int mBlueBits = 8;
int mAlphaBits = 8;
int mDepthBits = 24;
int mStencilBits = 8;
int mAccumulationRedBits = 0;
int mAccumulationGreenBits = 0;
int mAccumulationBlueBits = 0;
int mAccumulationAlphaBits = 0;
int mAuxiliaryBuffers = 0;
int mSamples = 0;
int mRefreshRate = 0;
bool mStereo = false;
bool mSRGB = false;
eClientAPI mClientAPI = eClientAPI::OPENGL;
int mContextVersionMajor = 1;
int mContextVersionMinor = 0;
// [Note] - When requesting an openGL profile below 3.2, you *must* also use the OPENGL_ANY_PROFILE
eContextRobustness mContextRobustness = eContextRobustness::NO_ROBUSTNESS;
bool mOpenGLForwardCompatible = false;
bool mOpenGLDebugContext = false;
eOpenGLProfile mOpenGLProfile = eOpenGLProfile::ANY;
};
void setDefaultCreationHints();
static CreationHints mCreationHints; // this should be done better I guess
GLFWwindow* getHandle() const;
input::Keyboard* getKeyboard() const;
input::Mouse* getMouse() const;
private:
GLFWwindow* mHandle;
std::string mTitle = "Overdrive Default Window";
int mWidth = 800;
int mHeight = 600;
bool mIsFullscreen = false;
Monitor* mMonitor = nullptr;
Window* mSharedContext = nullptr;
std::unique_ptr<input::Keyboard> mKeyboard;
std::unique_ptr<input::Mouse> mMouse;
};
}
}
std::ostream& operator << (std::ostream& os, const overdrive::video::Window::eClientAPI& api);
std::ostream& operator << (std::ostream& os, const overdrive::video::Window::eContextRobustness& robust);
std::ostream& operator << (std::ostream& os, const overdrive::video::Window::eOpenGLProfile& profile);
#endif
| [
"[email protected]"
] | |
eb2c1080885d8b64bd46f1dac7cd20dfd8468971 | 5d70dd1628caffb3af79f454a9821d7219c4572d | /cpps/distance.h | 688c97034887a8f8740f1f77cc559f3933f625f7 | [] | no_license | CV-IP/color_calibration | 0e3f8798060ee06bcabb44902dd475b2bf1f6acf | 4ca105ce522e29807ced1459cc2c540e8711db8d | refs/heads/master | 2023-01-27T23:42:25.501930 | 2020-11-30T04:28:50 | 2020-11-30T04:28:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,475 | h | #pragma once
//#include <string>
//#include <iostream>
#include <opencv2/opencv.hpp>
#include "utils.h"
//#include <map>
//#include <tuple>
//#include <cmath>
namespace cv {
namespace ccm {
enum DISTANCE_TYPE {
CIE76,
CIE94_GRAPHIC_ARTS,
CIE94_TEXTILES,
CIE2000,
CMC_1TO1,
CMC_2TO1,
RGB,
RGBL
};
//double to_rad(double degree);
//double to_deg(double rad);
double delta_cie76(Vec3d lab1, Vec3d lab2) {
return norm(lab1 - lab2);
};
double delta_cie94(Vec3d lab1, Vec3d lab2, double kH = 1.0, double kC = 1.0, double kL = 1.0, double k1 = 0.045, double k2 = 0.015) {
double dl = lab1[0] - lab2[0];
double c1 = sqrt(pow(lab1[1], 2) + pow(lab1[2], 2));
double c2 = sqrt(pow(lab2[1], 2) + pow(lab2[2], 2));
double dc = c1 - c2;
double da = lab1[1] - lab2[1];
double db = lab1[2] - lab2[2];
double dh = pow(da, 2) + pow(db, 2) - pow(dc, 2);
double sc = 1.0 + k1 * c1;
double sh = 1.0 + k2 * c1;
double sl = 1.0;
double res = pow(dl / (kL * sl), 2) + pow(dc / (kC * sc), 2) + dh / pow(kH * sh, 2);
return res > 0 ? sqrt(res) : 0;
}
double delta_cie94_graphic_arts(Vec3d lab1, Vec3d lab2) {
return delta_cie94(lab1, lab2);
}
double to_rad(double degree) { return degree / 180 * CV_PI; };
double delta_cie94_textiles(Vec3d lab1, Vec3d lab2) {
return delta_cie94(lab1, lab2, 1.0, 1.0, 2.0, 0.048, 0.014);
}
double delta_ciede2000_(Vec3d lab1, Vec3d lab2, double kL = 1.0, double kC = 1.0, double kH = 1.0) {
double delta_L_apo = lab2[0] - lab1[0];
double l_bar_apo = (lab1[0] + lab2[0]) / 2.0;
double C1 = sqrt(pow(lab1[1], 2) + pow(lab1[2], 2));
double C2 = sqrt(pow(lab2[1], 2) + pow(lab2[2], 2));
double C_bar = (C1 + C2) / 2.0;
double G = sqrt(pow(C_bar, 7) / (pow(C_bar, 7) + pow(25, 7)));
double a1_apo = lab1[1] + lab1[1] / 2.0 * (1.0 - G);
double a2_apo = lab2[1] + lab2[1] / 2.0 * (1.0 - G);
double C1_apo = sqrt(pow(a1_apo, 2) + pow(lab1[2], 2));
double C2_apo = sqrt(pow(a2_apo, 2) + pow(lab2[2], 2));
double C_bar_apo = (C1_apo + C2_apo) / 2.0;
double delta_C_apo = C2_apo - C1_apo;
//h1 and h2
double h1_apo;
if (C1_apo == 0) {
h1_apo = 0.0;
}
else {
h1_apo = atan2(lab1[2], a1_apo);
if (h1_apo < 0.0) h1_apo += 2.*CV_PI;
}
double h2_apo;
if (C2_apo == 0) {
h2_apo = 0.0;
}
else {
h2_apo = atan2(lab2[2], a2_apo);
if (h2_apo < 0.0) h2_apo += 2.*CV_PI;
}
//delta_h_apo
double delta_h_apo;
if (abs(h2_apo - h1_apo) <= CV_PI)
{
delta_h_apo = h2_apo - h1_apo;
}
else if (h2_apo <= h1_apo)
{
delta_h_apo = h2_apo - h1_apo + 2. * CV_PI;
}
else
{
delta_h_apo = h2_apo - h1_apo - 2. * CV_PI;
}
//H_apo
double H_bar_apo;
if (C1_apo == 0 || C2_apo == 0) {
H_bar_apo = h1_apo + h2_apo;
}
else if (abs(h1_apo - h2_apo) <= CV_PI) {
H_bar_apo = (h1_apo + h2_apo) / 2.0;
}
else if (h1_apo + h2_apo < 2.*CV_PI) {
H_bar_apo = (h1_apo + h2_apo + 2.*CV_PI) / 2.0;
}
else {
H_bar_apo = (h1_apo + h2_apo - 2.*CV_PI) / 2.0;
}
//delta_H_apo
double delta_H_apo = 2.0 * sqrt(C1_apo * C2_apo) * sin(delta_h_apo / 2.0);
//double delta_H;
//delta_H_apo = 2.0 * sqrt(C1 * C2) * sin(delta_h_apo / 2.0);
double T = 1.0 - 0.17 * cos(H_bar_apo - to_rad(30.)) + 0.24 * cos(2.0 * H_bar_apo) + 0.32 * cos(3.0 * H_bar_apo + to_rad(6.0)) - 0.2 * cos(4.0 * H_bar_apo - to_rad(63.0));
double sC = 1.0 + 0.045 * C_bar_apo;
double sH = 1.0 + 0.015 * C_bar_apo * T;
double sL = 1.0 + ((0.015 * pow(l_bar_apo - 50.0, 2.0)) / sqrt(20.0 + pow(l_bar_apo - 50.0, 2.0)));
double RT = -2.0 * G * sin(to_rad(60.0) * exp(-pow((H_bar_apo - to_rad(275.0)) / to_rad(25.0), 2.0)));
double res = (pow(delta_L_apo / (kL * sL), 2.0) + pow(delta_C_apo / (kC * sC), 2.0) + pow(delta_H_apo / (kH * sH), 2.0) + RT * (delta_C_apo / (kC * sC)) * (delta_H_apo / (kH * sH)));
//return sqrt(res);
return res > 0 ? sqrt(res) : 0;
}
double delta_ciede2000(Vec3d lab1, Vec3d lab2) {
return delta_ciede2000_(lab1, lab2);
}
double delta_cmc(Vec3d lab1, Vec3d lab2, double kL=1, double kC=1) {
double dL = lab2[0] - lab1[0];
double da = lab2[1] - lab1[1];
double db = lab2[2] - lab1[2];
double C1 = sqrt(pow(lab1[1], 2.0) + pow(lab1[2], 2.0));
double C2 = sqrt(pow(lab2[1], 2.0) + pow(lab2[2], 2.0));
//double C_bar = (C1 + C2) / 2.0;
//double G = sqrt(pow(C_bar, 7) / (pow(C_bar, 7) + pow(25, 7)));
//double temp_a1 = lab1[1] + lab1[1] / 2.0 * (1.0 - G);
double dC = C2 - C1;
double dH = sqrt(pow(da, 2) + pow(db, 2) - pow(dC, 2));
double H1;
if (C1==0.) {
H1 = 0.0;
}
else {
H1 = atan2(lab1[2], lab1[1]);
if (H1 < 0.0) H1 += 2. * CV_PI;
}
double F = pow(C1, 2) / sqrt(pow(C1, 4) + 1900);
double T = (H1 > to_rad(164) && H1 <= to_rad(345)) ? 0.56 + abs(0.2 * cos(H1 + to_rad(168))) : 0.36 + abs(0.4 * cos(H1 + to_rad(35)));;
double sL = lab1[0] < 16. ? 0.511 : (0.040975 * lab1[0]) / (1.0 + 0.01765 * lab1[0]);;
double sC = (0.0638 * C1) / (1.0 + 0.0131 * C1) + 0.638;
double sH = sC * (F * T + 1.0 - F);
return sqrt(pow(dL / (kL * sL), 2.0) + pow(dC / (kC * sC), 2.0) + pow(dH / sH, 2.0));
}
double delta_cmc_1to1(Vec3d lab1, Vec3d lab2) {
return delta_cmc(lab1, lab2);
}
double delta_cmc_2to1(Vec3d lab1, Vec3d lab2) {
return delta_cmc(lab1, lab2, 2, 1);
}
//double delta_cmc_2to1(Vec3d lab1, Vec3d lab2) {
// return delta_cmc(lab1, lab2, 2, 1);
//}
Mat distance(Mat src, Mat ref, DISTANCE_TYPE distance_type) {
switch (distance_type)
{
case cv::ccm::CIE76:
return _distancewise(src, ref, delta_cie76);
break;
case cv::ccm::CIE94_GRAPHIC_ARTS:
return _distancewise(src, ref, delta_cie94_graphic_arts);
break;
case cv::ccm::CIE94_TEXTILES:
return _distancewise(src, ref, delta_cie94_textiles);
break;
case cv::ccm::CIE2000:
return _distancewise(src, ref, delta_ciede2000);
break;
case cv::ccm::CMC_1TO1:
return _distancewise(src, ref, delta_cmc_1to1);
break;
case cv::ccm::CMC_2TO1:
return _distancewise(src, ref, delta_cmc_2to1);
break;
case cv::ccm::RGB:
return _distancewise(src, ref, delta_cie76);
break;
case cv::ccm::RGBL:
return _distancewise(src, ref, delta_cie76);
break;
default:
throw;
break;
}
};
}
}
//double deltaE_cie76(const LAB& lab1, const LAB& lab2);
//double to_rad(double degree);
//double to_deg(double rad);
//double deltacE_cmc(const LAB& lab1, const LAB& lab2, double kL, double kC);
//double deltacE_ciede94(const LAB& lab1, const LAB& lab2, double kH, double kC, double kL, double k1, double);
//double deltacE_ciede2000(const LAB& lab1, const LAB& lab2, double kL, double kC, double kH);
| [
"[email protected]"
] | |
3726eb42650e38170eff63bb5fb12d384ea939a0 | 509957599ce4078400623651e623c7e44a493aa9 | /Operator_Overloading/Overloading_IO_Output/main.cpp | be48017ce52ad50863ec4c4be6fd7c0f1a57cd84 | [] | no_license | ganeshredcobra/CPP | b9ae075360c17d9c9ff35f185956371a15fb6cde | 3811b5e027d14c33c241fed2559ea68abb8c9c68 | refs/heads/master | 2020-04-03T20:12:03.330434 | 2016-12-16T18:26:17 | 2016-12-16T18:26:17 | 43,020,400 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 702 | cpp | #include <iostream>
class Point
{
private:
double m_x, m_y, m_z;
public:
Point(double x=0.0, double y=0.0, double z=0.0): m_x(x), m_y(y), m_z(z)
{
}
friend std::ostream& operator<< (std::ostream &out, const Point &point);
};
std::ostream& operator<< (std::ostream &out, const Point &point)
{
// Since operator<< is a friend of the Point class, we can access Point's members directly.
out << "Point(" << point.m_x << ", " << point.m_y << ", " << point.m_z << ")";
return out;
}
int main()
{
Point point1(2.0, 3.5, 4.0);
Point point2(6.0, 7.5, 8.0);
std::cout << point1 << " " << point2 << '\n';
return 0;
}
| [
"[email protected]"
] | |
3643ab2fd23e19a52527e144dfa0a7b6a619e690 | 594975831ea01c49bc9a3253ca1ccbac9f4f5eea | /app/include/DataStructCom/SeekerTrackingTargetInfo.h | 3c26e035017535dececa6a477d2a826013c723fe | [] | no_license | WarfareCode/linux | 0344589884de3d345b50fa8ba9cad29e94feb9c6 | a0ef3d4da620f3eeb1cf54fa2a86e14c9b96c65a | refs/heads/master | 2021-10-09T18:32:47.071838 | 2018-12-25T08:14:56 | 2018-12-25T08:14:56 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,586 | h | //SeekerTrackingTargetInfo.h: interface for the CSeekerTrackingTargetInfo module.
//!!HDOSE_CLASS(CSeekerTrackingTargetInfo,CEvt)
//////////////////////////////////////////////////////////////////////
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#if !defined(AFX_SeekerTrackingTargetInfo_H)
#define AFX_SeekerTrackingTargetInfo_H
#include "Azimuth3D.h"
//{{HDOSE_CLS_DES(CSeekerTrackingTargetInfo)
/*
Author:
Version: 1.0
Descript: 根据搜捕策略,选定的目标的距离和方位
*/
//}}HDOSE_CLS_DES
class DATASTRUCTCOMPONENTDLL_API CSeekerTrackingTargetInfo /*导引头跟踪目标数据*/ : public CEvt
{
DECLARE_CREATE;
public:
CSeekerTrackingTargetInfo();
virtual ~CSeekerTrackingTargetInfo();
static void ClassInit(ClassInfo *clsinfo);
virtual void OnInit();
void SetSelectedTargetDist(double val){m_SelectedTargetDist=val;}
double GetSelectedTargetDist(){return m_SelectedTargetDist;}
void SetSelectedTargetAzimuth(CAzimuth3D val){m_SelectedTargetAzimuth=val;}
CAzimuth3D GetSelectedTargetAzimuth(){return m_SelectedTargetAzimuth;}
void SetTargetNo(long val){m_TargetNo=val;}
long GetTargetNo(){return m_TargetNo;}
void SetRCS(double val){m_RCS=val;}
double GetRCS(){return m_RCS;}
//{{HDOSE_MEMBER_FUNCTION(CSeekerTrackingTargetInfo)
//}}HDOSE_MEMBER_FUNCTION
public:
//{{HDOSE_ATTRIBUTE(CSeekerTrackingTargetInfo)
double m_SelectedTargetDist/*选定目标的距离*/;
CAzimuth3D m_SelectedTargetAzimuth/*选定目标的方位*/;
long m_TargetNo/*目标编号*/;
double m_RCS/*目标RCS*/;
//}}HDOSE_ATTRIBUTE
};
#endif
| [
"[email protected]"
] | |
e17e252e6b6d5ffe6125d3de14cfc1f2c07299bd | c00df896d0e5bde8f72e07b2d31fce10011dc709 | /EmonTx01.ino | 86c25a06ece74637b2fdf53aebcaed9432c1fefc | [] | no_license | jatg81/EmonTx01 | 9734f5186afd78be0bcf850794aebe904e22a06c | 3340693da6d35f97d300ae57969fc5990901e84d | refs/heads/master | 2020-04-08T23:35:02.054772 | 2018-12-20T20:41:06 | 2018-12-20T20:41:06 | 159,831,157 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,149 | ino | /********************************************************************************************************************************************************************************************/
/* Sketch para el Emontx01 */
/* Version: 2.1 */
/* Date : 02/05/2017 */
/* Author : Juan Taba Gasha */
/* Last Rev: 09/04/2018 */
/********************************************************************************************************************************************************************************************/
/*Versión modificada de la libreria EmonLib que habilita la detención inmediata de los bucles en el método de cálculo de potencias, corrientes,voltajes,etc,mediante el seteo de la variable
timeout a 0. De esta forma se ejecuta en forma inmediata el envio del estado del pulsador (tiempo presionado) y se deshabilita la medición de parametros electricos.
El pulsador es normalmente abierto y esta cableado a la entrada digital 4, su función es encender y apagar la barra led. La señal se envia por RF al emonPi el cual la procesa y envia a traves
de la red Wifi utilizando el protocolo TCP al controlador de led UFO.
*/
#include <EmonLibMod.h>
#include <PinChangeInt.h>
#include <RF69Mod.h>
#define RF_freq RF69_433MHZ //Frecuencia de transmision 433Mhz
#define ledTxPin 9
#define ledStripBtnPin 4 //Entrada digital para el pulsador que controla la barra de led
volatile bool disableCalcVI;
byte txErr;
const int nodeId = 11;
const int netGroup = 210;
unsigned long currentTime,cloopTime1,timeOn;
long long ackRev_buf;
volatile unsigned long lastChangeTime;
EnergyMonitor ct1,ct2,ct3,ct4;
volatile typedef struct { int dat0,dat1,dat2,dat3,dat4,dat5,dat6,dat7,dat8,dat9,dat10,dat11; byte dat12;} PayloadTX;
PayloadTX emontx;
void sendData(){
if(!rf69_sendWithRetry(nodeId, &emontx, sizeof emontx)){
ackRev_buf|=1; //Modifica el contador de errores de Tx cuando no se recibe ACK
txErr++;
}
else digitalWrite (ledTxPin,!digitalRead(ledTxPin));
if ((ackRev_buf&1LL<<59)) txErr--;
ackRev_buf=ackRev_buf<<1;
}
void ledStripBtnOn()
{ //Función que guarda el momento en que fue presionado el pulsador
if (millis() - lastChangeTime > 100){ //Se filtra las falsas señales debido a rebotes del pulsador por 100ms
disableCalcVI=true; //Detiene el método de calculo de potencias,voltajes y corrientes
lastChangeTime=millis();
}
}
void setup()
{
pinMode(ledTxPin,OUTPUT); //Configura la salida para el led indicador de transmisión RF
pinMode(ledStripBtnPin,INPUT);
digitalWrite(ledStripBtnPin,LOW); //Desactiva resistencia pull up
attachPinChangeInterrupt(ledStripBtnPin,ledStripBtnOn,FALLING); //Detecta instante cuando es activado el pulsador
for (uint8_t i=0; i < 8; i++) { //Espera 3s para estabilizar los filtros y empezar a enviar datos
digitalWrite (ledTxPin,!digitalRead(ledTxPin));
delay(375);
}
rf69_initialize(nodeId, RF_freq, netGroup);
ct1.current(1, 60.606);
ct2.current(2, 60.606); // Factor de calibración = CT ratio / burden resistencia
ct3.current(3, 60.606);
ct4.current(4, 60.606);
ct1.voltage(0, 292, 1.7); // Entrada de voltaje (0), factor para el adaptador AC-AC (292) (cada punto equivale a 0.5V aprox)
ct2.voltage(0, 292, 1.7);
ct3.voltage(0, 292, 1.7);
ct4.voltage(0, 292, 1.7);
}
void loop()
{
currentTime = millis();
if(disableCalcVI){
if (!digitalRead(ledStripBtnPin)){ // Verifica que el pulsador esta presionado, para eliminar falsa señales de flicker que afectan la entrada digital
emontx.dat11=1;
sendData();
int i=1;
do{
timeOn=millis()-lastChangeTime; // Envia el número de segundos que se encuentra presionado el pulsador, para realizar el cambio de color de la barra led
if(timeOn>(1000*i+1000) ){
i++;
emontx.dat11=i;
sendData();
}
}while(!digitalRead(ledStripBtnPin));
delay(100);
emontx.dat11=0;
sendData();
}
disableCalcVI=false;
}
else if (currentTime-cloopTime1 >= 2000){ // Cada 2 segundos se envian datos de medición de parametros electricos si y solo si el pulsador no esta activado
cloopTime1 = currentTime;
ct1.calcVI(20,500); // Ejecuta método de cálculo de potencia, corriente, etc para el CT1, analizando 20 medias ondas (aprox 167ms)
ct2.calcVI(20,500); // Ejecuta método de cálculo de potencia, corriente, etc para el CT2, analizando 20 medias ondas (aprox 167ms)
ct3.calcVI(20,500); // Ejecuta método de cálculo de potencia, corriente, etc para el CT3, analizando 20 medias ondas (aprox 167ms)
ct4.calcVI(20,500); // Ejecuta método de cálculo de potencia, corriente, etc para el CT4, analizando 20 medias ondas (aprox 167ms)
if(!disableCalcVI){ // Si se presiona el boton cuando se esta ejecutando alguna función CalcVI no se envian los datos
emontx.dat0=max(0,ct1.realPower); // 1) Potencia real total
emontx.dat1=max(0,ct2.realPower); // 2) Potencia real tomacorrientes
emontx.dat2=max(0,ct3.realPower); // 3) Potencia real luces
emontx.dat3=max(0,ct4.realPower); // 4) Potencia real terma
emontx.dat4=ct1.Irms*100; // 5) Corriente total
emontx.dat5=ct2.Irms*100; // 6) Corriente tomacorrientes
emontx.dat6=ct3.Irms*100; // 7) Corriente luces
emontx.dat7=ct4.Irms*100; // 8) Corriente terma
emontx.dat8=ct1.Vrms; // 9) Voltaje
emontx.dat9=ct1.apparentPower; // 10) Potencia aparente total
emontx.dat10=ct1.powerFactor*100; // 11) Factor de potencia total
emontx.dat11=0; // 12) Tiempo transcurrido desde que el pulsador se mantiene presionado
emontx.dat12=txErr; // 13) Cantidad de envios de datos sin recepción de ACK
sendData();
}
}
}
| [
"[email protected]"
] | |
b69bd75ffa43e19c3c661d85bef65e55e66ea848 | 9ae445462609dc53af297e98c428e5f297cb53c3 | /PZ1/Model2/Пчела.cpp | 8f74aa9c1651b01be949223797e799f737d8cf92 | [] | no_license | bairdob/MaximovArchitectureIS | b147e500a380b5c3110770e3f057c8ac1d1888c3 | c17e79460a697e0a5e36dc6ed67613217f8a3e0c | refs/heads/main | 2023-04-17T08:48:20.546524 | 2021-05-05T19:00:21 | 2021-05-05T19:00:21 | 339,832,774 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 92 | cpp | /**
* Project Untitled
*/
#include "Пчела.h"
/**
* Пчела implementation
*/
| [
"[email protected]"
] | |
636bc118384e12365792933adbf7da9069a4c1f0 | 7a2631e3af71af5f4c5b958481e671d974719db1 | /Embedded Systems Programming/Atmel/WinAVR/lib/gcc/avr32/4.3.2/include/c++/bits/stl_algobase.h | c61bd2f65a5710c518af92f7015c00202997ffad | [] | no_license | xufeiwaei/HHcourses | 32f2d15a52b984a58d67d1385a26dc6e1984140d | 8e3642425d00a13442751577ac69b876c099cd97 | refs/heads/master | 2020-05-18T20:30:14.192308 | 2014-01-12T13:22:47 | 2014-01-12T13:22:47 | 14,732,022 | 6 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 40,819 | h | // Core algorithmic facilities -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, 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 General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file stl_algobase.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _STL_ALGOBASE_H
#define _STL_ALGOBASE_H 1
#include <bits/c++config.h>
#include <cstddef>
#include <bits/functexcept.h>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
#include <ext/numeric_traits.h>
#include <bits/stl_pair.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h>
#include <bits/concept_check.h>
#include <debug/debug.h>
#include <bits/stl_move.h> // For std::swap and _GLIBCXX_MOVE
_GLIBCXX_BEGIN_NAMESPACE(std)
// See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a
// nutshell, we are partially implementing the resolution of DR 187,
// when it's safe, i.e., the value_types are equal.
template<bool _BoolType>
struct __iter_swap
{
template<typename _ForwardIterator1, typename _ForwardIterator2>
static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
_ValueType1 __tmp = _GLIBCXX_MOVE(*__a);
*__a = _GLIBCXX_MOVE(*__b);
*__b = _GLIBCXX_MOVE(__tmp);
}
};
template<>
struct __iter_swap<true>
{
template<typename _ForwardIterator1, typename _ForwardIterator2>
static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
swap(*__a, *__b);
}
};
/**
* @brief Swaps the contents of two iterators.
* @param a An iterator.
* @param b Another iterator.
* @return Nothing.
*
* This function swaps the values pointed to by two iterators, not the
* iterators themselves.
*/
template<typename _ForwardIterator1, typename _ForwardIterator2>
inline void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_ForwardIterator2>::value_type
_ValueType2;
// concept requirements
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator1>)
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator2>)
__glibcxx_function_requires(_ConvertibleConcept<_ValueType1,
_ValueType2>)
__glibcxx_function_requires(_ConvertibleConcept<_ValueType2,
_ValueType1>)
typedef typename iterator_traits<_ForwardIterator1>::reference
_ReferenceType1;
typedef typename iterator_traits<_ForwardIterator2>::reference
_ReferenceType2;
std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
&& __are_same<_ValueType1&, _ReferenceType1>::__value
&& __are_same<_ValueType2&, _ReferenceType2>::__value>::
iter_swap(__a, __b);
}
/**
* @brief Swap the elements of two sequences.
* @param first1 A forward iterator.
* @param last1 A forward iterator.
* @param first2 A forward iterator.
* @return An iterator equal to @p first2+(last1-first1).
*
* Swaps each element in the range @p [first1,last1) with the
* corresponding element in the range @p [first2,(last1-first1)).
* The ranges must not overlap.
*/
template<typename _ForwardIterator1, typename _ForwardIterator2>
_ForwardIterator2
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2)
{
// concept requirements
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator1>)
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator2>)
__glibcxx_requires_valid_range(__first1, __last1);
for (; __first1 != __last1; ++__first1, ++__first2)
std::iter_swap(__first1, __first2);
return __first2;
}
/**
* @brief This does what you think it does.
* @param a A thing of arbitrary type.
* @param b Another thing of arbitrary type.
* @return The lesser of the parameters.
*
* This is the simple classic generic implementation. It will work on
* temporary expressions, since they are only evaluated once, unlike a
* preprocessor macro.
*/
template<typename _Tp>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b)
{
// concept requirements
__glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
//return __b < __a ? __b : __a;
if (__b < __a)
return __b;
return __a;
}
/**
* @brief This does what you think it does.
* @param a A thing of arbitrary type.
* @param b Another thing of arbitrary type.
* @return The greater of the parameters.
*
* This is the simple classic generic implementation. It will work on
* temporary expressions, since they are only evaluated once, unlike a
* preprocessor macro.
*/
template<typename _Tp>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b)
{
// concept requirements
__glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
//return __a < __b ? __b : __a;
if (__a < __b)
return __b;
return __a;
}
/**
* @brief This does what you think it does.
* @param a A thing of arbitrary type.
* @param b Another thing of arbitrary type.
* @param comp A @link s20_3_3_comparisons comparison functor@endlink.
* @return The lesser of the parameters.
*
* This will work on temporary expressions, since they are only evaluated
* once, unlike a preprocessor macro.
*/
template<typename _Tp, typename _Compare>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
//return __comp(__b, __a) ? __b : __a;
if (__comp(__b, __a))
return __b;
return __a;
}
/**
* @brief This does what you think it does.
* @param a A thing of arbitrary type.
* @param b Another thing of arbitrary type.
* @param comp A @link s20_3_3_comparisons comparison functor@endlink.
* @return The greater of the parameters.
*
* This will work on temporary expressions, since they are only evaluated
* once, unlike a preprocessor macro.
*/
template<typename _Tp, typename _Compare>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
//return __comp(__a, __b) ? __b : __a;
if (__comp(__a, __b))
return __b;
return __a;
}
// If _Iterator is a __normal_iterator return its base (a plain pointer,
// normally) otherwise return it untouched. See copy, fill, ...
template<typename _Iterator,
bool _IsNormal = __is_normal_iterator<_Iterator>::__value>
struct __niter_base
{
static _Iterator
__b(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
struct __niter_base<_Iterator, true>
{
static typename _Iterator::iterator_type
__b(_Iterator __it)
{ return __it.base(); }
};
// Likewise, for move_iterator.
template<typename _Iterator,
bool _IsMove = __is_move_iterator<_Iterator>::__value>
struct __miter_base
{
static _Iterator
__b(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
struct __miter_base<_Iterator, true>
{
static typename _Iterator::iterator_type
__b(_Iterator __it)
{ return __it.base(); }
};
// All of these auxiliary structs serve two purposes. (1) Replace
// calls to copy with memmove whenever possible. (Memmove, not memcpy,
// because the input and output ranges are permitted to overlap.)
// (2) If we're using random access iterators, then write the loop as
// a for loop with an explicit count.
template<bool, bool, typename>
struct __copy_move
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, ++__first)
*__result = *__first;
return __result;
}
};
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<typename _Category>
struct __copy_move<true, false, _Category>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, ++__first)
*__result = std::move(*__first);
return __result;
}
};
#endif
template<>
struct __copy_move<false, false, random_access_iterator_tag>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
{
*__result = *__first;
++__first;
++__result;
}
return __result;
}
};
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<>
struct __copy_move<true, false, random_access_iterator_tag>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
{
*__result = std::move(*__first);
++__first;
++__result;
}
return __result;
}
};
#endif
template<bool _IsMove>
struct __copy_move<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
__builtin_memmove(__result, __first,
sizeof(_Tp) * (__last - __first));
return __result + (__last - __first);
}
};
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::value_type _ValueTypeI;
typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
typedef typename iterator_traits<_II>::iterator_category _Category;
const bool __simple = (__is_pod(_ValueTypeI)
&& __is_pointer<_II>::__value
&& __is_pointer<_OI>::__value
&& __are_same<_ValueTypeI, _ValueTypeO>::__value);
return std::__copy_move<_IsMove, __simple,
_Category>::__copy_m(__first, __last, __result);
}
// Helpers for streambuf iterators (either istream or ostream).
// NB: avoid including <iosfwd>, relatively large.
template<typename _CharT>
struct char_traits;
template<typename _CharT, typename _Traits>
class istreambuf_iterator;
template<typename _CharT, typename _Traits>
class ostreambuf_iterator;
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(_CharT*, _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(const _CharT*, const _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
__copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a2(_II __first, _II __last, _OI __result)
{
return _OI(std::__copy_move_a<_IsMove>
(std::__niter_base<_II>::__b(__first),
std::__niter_base<_II>::__b(__last),
std::__niter_base<_OI>::__b(__result)));
}
/**
* @brief Copies the range [first,last) into result.
* @param first An input iterator.
* @param last An input iterator.
* @param result An output iterator.
* @return result + (first - last)
*
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling). Result may not be contained within
* [first,last); the copy_backward function should be used instead.
*
* Note that the end of the output range is permitted to be contained
* within [first,last).
*/
template<typename _II, typename _OI>
inline _OI
copy(_II __first, _II __last, _OI __result)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II>)
__glibcxx_function_requires(_OutputIteratorConcept<_OI,
typename iterator_traits<_II>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
(std::__miter_base<_II>::__b(__first),
std::__miter_base<_II>::__b(__last), __result));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__
/**
* @brief Moves the range [first,last) into result.
* @param first An input iterator.
* @param last An input iterator.
* @param result An output iterator.
* @return result + (first - last)
*
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling). Result may not be contained within
* [first,last); the move_backward function should be used instead.
*
* Note that the end of the output range is permitted to be contained
* within [first,last).
*/
template<typename _II, typename _OI>
inline _OI
move(_II __first, _II __last, _OI __result)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II>)
__glibcxx_function_requires(_OutputIteratorConcept<_OI,
typename iterator_traits<_II>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_a2<true>
(std::__miter_base<_II>::__b(__first),
std::__miter_base<_II>::__b(__last), __result));
}
#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp)
#else
#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::copy(_Tp, _Up, _Vp)
#endif
template<bool, bool, typename>
struct __copy_move_backward
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
while (__first != __last)
*--__result = *--__last;
return __result;
}
};
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<typename _Category>
struct __copy_move_backward<true, false, _Category>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
while (__first != __last)
*--__result = std::move(*--__last);
return __result;
}
};
#endif
template<>
struct __copy_move_backward<false, false, random_access_iterator_tag>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
}
};
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<>
struct __copy_move_backward<true, false, random_access_iterator_tag>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = std::move(*--__last);
return __result;
}
};
#endif
template<bool _IsMove>
struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
const ptrdiff_t _Num = __last - __first;
__builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
{
typedef typename iterator_traits<_BI1>::value_type _ValueType1;
typedef typename iterator_traits<_BI2>::value_type _ValueType2;
typedef typename iterator_traits<_BI1>::iterator_category _Category;
const bool __simple = (__is_pod(_ValueType1)
&& __is_pointer<_BI1>::__value
&& __is_pointer<_BI2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
return std::__copy_move_backward<_IsMove, __simple,
_Category>::__copy_move_b(__first,
__last,
__result);
}
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
{
return _BI2(std::__copy_move_backward_a<_IsMove>
(std::__niter_base<_BI1>::__b(__first),
std::__niter_base<_BI1>::__b(__last),
std::__niter_base<_BI2>::__b(__result)));
}
/**
* @brief Copies the range [first,last) into result.
* @param first A bidirectional iterator.
* @param last A bidirectional iterator.
* @param result A bidirectional iterator.
* @return result - (first - last)
*
* The function has the same effect as copy, but starts at the end of the
* range and works its way to the start, returning the start of the result.
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling).
*
* Result may not be in the range [first,last). Use copy instead. Note
* that the start of the output range may overlap [first,last).
*/
template<typename _BI1, typename _BI2>
inline _BI2
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
// concept requirements
__glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
__glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
__glibcxx_function_requires(_ConvertibleConcept<
typename iterator_traits<_BI1>::value_type,
typename iterator_traits<_BI2>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
(std::__miter_base<_BI1>::__b(__first),
std::__miter_base<_BI1>::__b(__last), __result));
}
#ifdef __GXX_EXPERIMENTAL_CXX0X__
/**
* @brief Moves the range [first,last) into result.
* @param first A bidirectional iterator.
* @param last A bidirectional iterator.
* @param result A bidirectional iterator.
* @return result - (first - last)
*
* The function has the same effect as move, but starts at the end of the
* range and works its way to the start, returning the start of the result.
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling).
*
* Result may not be in the range [first,last). Use move instead. Note
* that the start of the output range may overlap [first,last).
*/
template<typename _BI1, typename _BI2>
inline _BI2
move_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
// concept requirements
__glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
__glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
__glibcxx_function_requires(_ConvertibleConcept<
typename iterator_traits<_BI1>::value_type,
typename iterator_traits<_BI2>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_backward_a2<true>
(std::__miter_base<_BI1>::__b(__first),
std::__miter_base<_BI1>::__b(__last), __result));
}
#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp)
#else
#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::copy_backward(_Tp, _Up, _Vp)
#endif
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
for (; __first != __last; ++__first)
*__first = __value;
}
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
const _Tp __tmp = __value;
for (; __first != __last; ++__first)
*__first = __tmp;
}
// Specialization: for char types we can use memset.
template<typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
__fill_a(_Tp* __first, _Tp* __last, const _Tp& __c)
{
const _Tp __tmp = __c;
__builtin_memset(__first, static_cast<unsigned char>(__tmp),
__last - __first);
}
/**
* @brief Fills the range [first,last) with copies of value.
* @param first A forward iterator.
* @param last A forward iterator.
* @param value A reference-to-const of arbitrary type.
* @return Nothing.
*
* This function fills a range with copies of the same value. For char
* types filling contiguous areas of memory, this becomes an inline call
* to @c memset or @c wmemset.
*/
template<typename _ForwardIterator, typename _Tp>
inline void
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
// concept requirements
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator>)
__glibcxx_requires_valid_range(__first, __last);
std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first),
std::__niter_base<_ForwardIterator>::__b(__last), __value);
}
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
for (; __n > 0; --__n, ++__first)
*__first = __value;
return __first;
}
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
const _Tp __tmp = __value;
for (; __n > 0; --__n, ++__first)
*__first = __tmp;
return __first;
}
template<typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
__fill_n_a(_Tp* __first, _Size __n, const _Tp& __c)
{
std::__fill_a(__first, __first + __n, __c);
return __first + __n;
}
/**
* @brief Fills the range [first,first+n) with copies of value.
* @param first An output iterator.
* @param n The count of copies to perform.
* @param value A reference-to-const of arbitrary type.
* @return The iterator at first+n.
*
* This function fills a range with copies of the same value. For char
* types filling contiguous areas of memory, this becomes an inline call
* to @c memset or @ wmemset.
*/
template<typename _OI, typename _Size, typename _Tp>
inline _OI
fill_n(_OI __first, _Size __n, const _Tp& __value)
{
// concept requirements
__glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>)
return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first),
__n, __value));
}
template<bool _BoolType>
struct __equal
{
template<typename _II1, typename _II2>
static bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
for (; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
return false;
return true;
}
};
template<>
struct __equal<true>
{
template<typename _Tp>
static bool
equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
{
return !__builtin_memcmp(__first1, __first2, sizeof(_Tp)
* (__last1 - __first1));
}
};
template<typename _II1, typename _II2>
inline bool
__equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple = (__is_integer<_ValueType1>::__value
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
return std::__equal<__simple>::equal(__first1, __last1, __first2);
}
template<typename, typename>
struct __lc_rai
{
template<typename _II1, typename _II2>
static _II1
__newlast1(_II1, _II1 __last1, _II2, _II2)
{ return __last1; }
template<typename _II>
static bool
__cnd2(_II __first, _II __last)
{ return __first != __last; }
};
template<>
struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
{
template<typename _RAI1, typename _RAI2>
static _RAI1
__newlast1(_RAI1 __first1, _RAI1 __last1,
_RAI2 __first2, _RAI2 __last2)
{
const typename iterator_traits<_RAI1>::difference_type
__diff1 = __last1 - __first1;
const typename iterator_traits<_RAI2>::difference_type
__diff2 = __last2 - __first2;
return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
}
template<typename _RAI>
static bool
__cnd2(_RAI, _RAI)
{ return true; }
};
template<bool _BoolType>
struct __lexicographical_compare
{
template<typename _II1, typename _II2>
static bool __lc(_II1, _II1, _II2, _II2);
};
template<bool _BoolType>
template<typename _II1, typename _II2>
bool
__lexicographical_compare<_BoolType>::
__lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
{
typedef typename iterator_traits<_II1>::iterator_category _Category1;
typedef typename iterator_traits<_II2>::iterator_category _Category2;
typedef std::__lc_rai<_Category1, _Category2> __rai_type;
__last1 = __rai_type::__newlast1(__first1, __last1,
__first2, __last2);
for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
++__first1, ++__first2)
{
if (*__first1 < *__first2)
return true;
if (*__first2 < *__first1)
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
template<>
struct __lexicographical_compare<true>
{
template<typename _Tp, typename _Up>
static bool
__lc(const _Tp* __first1, const _Tp* __last1,
const _Up* __first2, const _Up* __last2)
{
const size_t __len1 = __last1 - __first1;
const size_t __len2 = __last2 - __first2;
const int __result = __builtin_memcmp(__first1, __first2,
std::min(__len1, __len2));
return __result != 0 ? __result < 0 : __len1 < __len2;
}
};
template<typename _II1, typename _II2>
inline bool
__lexicographical_compare_aux(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple =
(__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
&& !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
&& !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value);
return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
__first2, __last2);
}
_GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
/**
* @brief Tests a range for element-wise equality.
* @param first1 An input iterator.
* @param last1 An input iterator.
* @param first2 An input iterator.
* @return A boolean true or false.
*
* This compares the elements of two ranges using @c == and returns true or
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _II1, typename _II2>
inline bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_function_requires(_EqualOpConcept<
typename iterator_traits<_II1>::value_type,
typename iterator_traits<_II2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
return std::__equal_aux(std::__niter_base<_II1>::__b(__first1),
std::__niter_base<_II1>::__b(__last1),
std::__niter_base<_II2>::__b(__first2));
}
/**
* @brief Tests a range for element-wise equality.
* @param first1 An input iterator.
* @param last1 An input iterator.
* @param first2 An input iterator.
* @param binary_pred A binary predicate @link s20_3_1_base
* functor@endlink.
* @return A boolean true or false.
*
* This compares the elements of two ranges using the binary_pred
* parameter, and returns true or
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
equal(_IIter1 __first1, _IIter1 __last1,
_IIter2 __first2, _BinaryPredicate __binary_pred)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
__glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
__glibcxx_requires_valid_range(__first1, __last1);
for (; __first1 != __last1; ++__first1, ++__first2)
if (!bool(__binary_pred(*__first1, *__first2)))
return false;
return true;
}
/**
* @brief Performs "dictionary" comparison on ranges.
* @param first1 An input iterator.
* @param last1 An input iterator.
* @param first2 An input iterator.
* @param last2 An input iterator.
* @return A boolean true or false.
*
* "Returns true if the sequence of elements defined by the range
* [first1,last1) is lexicographically less than the sequence of elements
* defined by the range [first2,last2). Returns false otherwise."
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp.
*/
template<typename _II1, typename _II2>
inline bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
// concept requirements
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
return std::__lexicographical_compare_aux
(std::__niter_base<_II1>::__b(__first1),
std::__niter_base<_II1>::__b(__last1),
std::__niter_base<_II2>::__b(__first2),
std::__niter_base<_II2>::__b(__last2));
}
/**
* @brief Performs "dictionary" comparison on ranges.
* @param first1 An input iterator.
* @param last1 An input iterator.
* @param first2 An input iterator.
* @param last2 An input iterator.
* @param comp A @link s20_3_3_comparisons comparison functor@endlink.
* @return A boolean true or false.
*
* The same as the four-parameter @c lexicographical_compare, but uses the
* comp parameter instead of @c <.
*/
template<typename _II1, typename _II2, typename _Compare>
bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2, _Compare __comp)
{
typedef typename iterator_traits<_II1>::iterator_category _Category1;
typedef typename iterator_traits<_II2>::iterator_category _Category2;
typedef std::__lc_rai<_Category1, _Category2> __rai_type;
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
__last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
++__first1, ++__first2)
{
if (__comp(*__first1, *__first2))
return true;
if (__comp(*__first2, *__first1))
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
/**
* @brief Finds the places in ranges which don't match.
* @param first1 An input iterator.
* @param last1 An input iterator.
* @param first2 An input iterator.
* @return A pair of iterators pointing to the first mismatch.
*
* This compares the elements of two ranges using @c == and returns a pair
* of iterators. The first iterator points into the first range, the
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIterator1, typename _InputIterator2>
pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_function_requires(_EqualOpConcept<
typename iterator_traits<_InputIterator1>::value_type,
typename iterator_traits<_InputIterator2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
while (__first1 != __last1 && *__first1 == *__first2)
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
/**
* @brief Finds the places in ranges which don't match.
* @param first1 An input iterator.
* @param last1 An input iterator.
* @param first2 An input iterator.
* @param binary_pred A binary predicate @link s20_3_1_base
* functor@endlink.
* @return A pair of iterators pointing to the first mismatch.
*
* This compares the elements of two ranges using the binary_pred
* parameter, and returns a pair
* of iterators. The first iterator points into the first range, the
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_requires_valid_range(__first1, __last1);
while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
_GLIBCXX_END_NESTED_NAMESPACE
// NB: This file is included within many other C++ includes, as a way
// of getting the base algorithms. So, make sure that parallel bits
// come in too if requested.
#ifdef _GLIBCXX_PARALLEL
# include <parallel/algobase.h>
#endif
#endif
| [
"[email protected]"
] | |
49ba8e7b111207748c3092ea4d1cce6ae3144d5c | c67cbd22f9bc3c465fd763fdf87172f2c8ec77d4 | /Desktop/Please Work/build/Android/Preview/app/src/main/include/Fuse.Text.ShapedRun.P-e637870f.h | 9d3bb6b718f927a1c09cf8ff8f291350d7666c4d | [] | no_license | AzazelMoreno/Soteria-project | 7c58896d6bf5a9ad919bde6ddc2a30f4a07fa0d4 | 04fdb71065941176867fb9007ecf38bbf851ad47 | refs/heads/master | 2020-03-11T16:33:22.153713 | 2018-04-19T19:47:55 | 2018-04-19T19:47:55 | 130,120,337 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,854 | h | // This file was generated based on C:/Users/rudy0/AppData/Local/Fusetools/Packages/Fuse.Text/1.8.1/ShapedRun.uno.
// WARNING: Changes might be lost if you edit this file directly.
#pragma once
#include <Fuse.Text.PositionedGlyph.h>
#include <Uno.Collections.IEnumerator.h>
#include <Uno.Collections.IEnumerator1-1.h>
#include <Uno.IDisposable.h>
#include <Uno.Object.h>
namespace g{namespace Fuse{namespace Text{struct ShapedRun;}}}
namespace g{namespace Fuse{namespace Text{struct ShapedRun__PGEnumerator;}}}
namespace g{
namespace Fuse{
namespace Text{
// private sealed class ShapedRun.PGEnumerator :123
// {
struct ShapedRun__PGEnumerator_type : uType
{
::g::Uno::Collections::IEnumerator1 interface0;
::g::Uno::IDisposable interface1;
::g::Uno::Collections::IEnumerator interface2;
};
ShapedRun__PGEnumerator_type* ShapedRun__PGEnumerator_typeof();
void ShapedRun__PGEnumerator__ctor__fn(ShapedRun__PGEnumerator* __this, ::g::Fuse::Text::ShapedRun* shapedRun);
void ShapedRun__PGEnumerator__get_Current_fn(ShapedRun__PGEnumerator* __this, ::g::Fuse::Text::PositionedGlyph* __retval);
void ShapedRun__PGEnumerator__Dispose_fn(ShapedRun__PGEnumerator* __this);
void ShapedRun__PGEnumerator__MoveNext_fn(ShapedRun__PGEnumerator* __this, bool* __retval);
void ShapedRun__PGEnumerator__New1_fn(::g::Fuse::Text::ShapedRun* shapedRun, ShapedRun__PGEnumerator** __retval);
void ShapedRun__PGEnumerator__Reset_fn(ShapedRun__PGEnumerator* __this);
struct ShapedRun__PGEnumerator : uObject
{
int32_t _index;
uStrong< ::g::Fuse::Text::ShapedRun*> _shapedRun;
void ctor_(::g::Fuse::Text::ShapedRun* shapedRun);
::g::Fuse::Text::PositionedGlyph Current();
void Dispose();
bool MoveNext();
void Reset();
static ShapedRun__PGEnumerator* New1(::g::Fuse::Text::ShapedRun* shapedRun);
};
// }
}}} // ::g::Fuse::Text
| [
"[email protected]"
] | |
418e11ba82035866b37d1a213346cd5030b25855 | 5885fd1418db54cc4b699c809cd44e625f7e23fc | /kattis/printingcosts.cpp | b7dedb7230f4ead83a9d3565a55c2e834d79f39a | [] | no_license | ehnryx/acm | c5f294a2e287a6d7003c61ee134696b2a11e9f3b | c706120236a3e55ba2aea10fb5c3daa5c1055118 | refs/heads/master | 2023-08-31T13:19:49.707328 | 2023-08-29T01:49:32 | 2023-08-29T01:49:32 | 131,941,068 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,855 | cpp | #include <bits/stdc++.h>
using namespace std;
//%:include "utility/fast_input.h"
//%:include "utility/output.h"
using ll = long long;
using ld = long double;
using pt = complex<ld>;
constexpr char nl = '\n';
constexpr int MOD = 998244353;
constexpr ld EPS = 1e-9L;
random_device _rd; mt19937 rng(_rd());
int main() {
cin.tie(0)->sync_with_stdio(0);
cout << fixed << setprecision(10);
#ifdef USING_FAST_INPUT
fast_input cin;
#endif
string dumb = R"( ! 9 " 6 # 24 $ 29 % 22
& 24 ' 3 ( 12 ) 12 * 17 + 13
, 7 - 7 . 4 / 10 0 22 1 19
2 22 3 23 4 21 5 27 6 26 7 16
8 23 9 26 : 8 ; 11 < 10 = 14
> 10 ? 15 @ 32 A 24 B 29 C 20
D 26 E 26 F 20 G 25 H 25 I 18
J 18 K 21 L 16 M 28 N 25 O 26
P 23 Q 31 R 28 S 25 T 16 U 23
V 19 W 26 X 18 Y 14 Z 22 [ 18
\ 10 ] 18 ^ 7 _ 8 ` 3 a 23
b 25 c 17 d 25 e 23 f 18 g 30
h 21 i 15 j 20 k 21 l 16 m 22
n 18 o 20 p 25 q 25 r 13 s 21
t 17 u 17 v 13 w 19 x 13 y 24
z 19 { 18 | 12 } 18 ~ 9 )";
istringstream in(dumb);
map<char, int> cost;
for(string a, b; in >> a >> b; ) {
cost[a[0]] = stoi(b);
}
for(string s; getline(cin, s); ) {
int ans = 0;
for(char c : s) {
ans += cost[c];
}
cout << ans << nl;
}
return 0;
}
| [
"[email protected]"
] | |
8ac67c2479f1435a8d449f33fe6be875a0ef2f70 | dfb5f30c657cdb6cff905b7473fe4c162cf94cca | /Components/NOT.cpp | ada4dd01014aff66aeae2aa3ffc2a2b4fce54021 | [] | no_license | KarimAshraf1995/CMPN103_ProjectS2016 | 08c7f005eb4dc5473aaa6f51219ac66aaa477876 | 694acbba812f690bf0cf486c5e234a6bbe117d13 | refs/heads/master | 2021-01-25T00:38:32.081877 | 2017-06-18T12:39:04 | 2017-06-18T12:39:04 | 94,685,044 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,832 | cpp | #include "NOT.h"
#include "../Utility/PrecisionChecker.h"
#include <fstream>
using std::ifstream;
using std::ofstream;
NOT::NOT( int r_FanOut):Gate(1,r_FanOut)
{
}
NOT::NOT(const GraphicsInfo &r_GfxInfo, int r_FanOut):Gate(1, r_FanOut)
{
m_GfxInfo.x1 = r_GfxInfo.x1;
m_GfxInfo.y1 = r_GfxInfo.y1;
m_GfxInfo.x2 = r_GfxInfo.x2;
m_GfxInfo.y2 = r_GfxInfo.y2;
}
void NOT::Save(ofstream& out)
{
out << NOTType << '\t' ;
Gate::Save(out);
}
void NOT::Load(ifstream& in)
{
Gate::Load(in);
}
void NOT::Operate()
{
STATUS IN1=GetInputPinStatus(1);
STATUS OUT1;
OUT1 = (IN1 ? LOW : HIGH);
m_OutputPin.setStatus(OUT1);
}
// Function Draw
// Draws 2-input NOT gate
void NOT::Draw(Output* pOut)
{
pOut->DrawNOT(m_GfxInfo,selected,hoveredpin);
DrawLabel(pOut);
}
void NOT::DrawWithDisplacement(Output* pOut,int deltaX,int deltaY)
{
pOut->DrawNOT(m_GfxInfo,selected,hoveredpin,deltaX,deltaY);
}
InputPin* NOT::ReturnInputPinAT(int& x,int& y)
{
if(WithinRange(x,m_GfxInfo.x1) && WithinRange(y,m_GfxInfo.y1+UI.GATE_Height/2))
{
x=m_GfxInfo.x1;
y=m_GfxInfo.y1+UI.GATE_Height/2;
return &(this->m_InputPins[0]);
}
return NULL;
}
void NOT::getInputPinLocation(InputPin* p,int&x,int&y)
{
x=m_GfxInfo.x1;
y=m_GfxInfo.y1+UI.GATE_Height/2;
}
void NOT::HighlightPinsAT(int x,int y)
{
hoveredpin=NO_PIN;
HighlightOutPinsAT(x,y);
if(WithinRange(x,m_GfxInfo.x1) && WithinRange(y,m_GfxInfo.y1+UI.GATE_Height/2))
hoveredpin=INPUT1;
}
Component* NOT::CreateCopy()
{
GraphicsInfo newl;
newl.x1 = m_GfxInfo.x2+5;
newl.y1 = m_GfxInfo.y2+5;
newl.x2 = m_GfxInfo.x2+5+UI.GATE_Width;
newl.y2 = m_GfxInfo.y2+5+UI.GATE_Height;
NOT *n=new NOT(newl,NOT_FANOUT);
n->selected=true;
n->SetLabel(GetLabel());
return n;
}
| [
"[email protected]"
] | |
19d42d384753aad72055f6f71afddb5fbde49186 | 6df307b049156f719a3aefaa11197fa8ebddbf33 | /for_test/test_template_more_args.cpp | ba633e0215b8e72c8ea9abdc151945eaff0eb83c | [] | no_license | feifa168/libtins_parser | b1eeac2e81eeea25804d157010d2e77241bdd0f8 | a2850ea89e23472dbe8c658a47446f9f488eb1b7 | refs/heads/master | 2020-03-28T20:30:13.008938 | 2018-09-19T07:34:26 | 2018-09-19T07:34:26 | 149,076,751 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,643 | cpp | #include<iostream>
#include<string.h>
#include<bitset>
#include<boost/any.hpp>
#include<boost/utility.hpp>
#include<typeinfo>
using namespace std;
class InParam
{
public:
template<typename... Arg>
InParam(Arg... args)
{
PutArg(args...);
// m_veParamValue.push_back( head );
// cout << typeid( head ).name() << " : " << head << " | ";
// InParam( last... ); // 这个必须实现一个另外一个一样的构造函数
}
template<typename T>
void PutArg(T value) {
cout << typeid(value).name() << "|" << value << endl;
m_veParamValue.push_back(value);
}
template<typename Head, typename... Rail>
void PutArg(Head head, Rail... last) {
const char *pname = typeid(head).name();
cout << pname << "|" << head << endl;
m_veParamValue.push_back(head);
PutArg(last...);
}
~InParam() {
cout << "~~~~ " << m_veParamValue.size() << endl;
}
private:
vector<boost::any> m_veParamValue;
};
struct X {
int a;
X() :a(5) { cout << "X" << endl; }
~X() { cout << "~X" << endl; }
};
void inner(const X&) { cout << "inner(const X&)" << endl; }
void inner(X&&) { cout << "inner(X&&)" << endl; }
template<typename T>
void outer(T&& t) { inner(forward<T>(t)); }
void test_class_construct() {
X a;
{
X *pa = &a;
}
{
X &ra = a;
}
}
void test_forward()
{
{
X a;
// outer(a);
// outer(X());
// inner(forward<X>(X()));
// inner(forward<X>(a));
{
X &a1 = forward<X>(X());
}
{
X &a2 = forward<X>(a);
}
}
}
void test_template_moree_args()
{
test_class_construct();
test_forward();
InParam ip("aaa", 5, 9.5555, 9999L);
cout << "001" << endl;
} | [
"[email protected]"
] | |
540999c4eb9cf8ce07573070ed689809663d2f70 | d998bb0bd1182e504df724549eaf6f08aa7247fb | /Labs12/g/main.cpp | 98ed9412c4a685771e0d7fc5a0d15c1699f74c5d | [] | no_license | y0f0/ITMO-algorithms-and-data-structure | e410c17bddf6f1605800f10a4bbbee15d1511fba | 8d377c9255cb2236e0ad9cc985529fcc4612890a | refs/heads/master | 2023-06-21T07:52:45.200771 | 2021-07-27T07:52:52 | 2021-07-27T07:52:52 | 294,503,891 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 716 | cpp | #include <vector>
#include <iostream>
#include <algorithm>
#include <fstream>
using namespace std;
int main() {
ifstream in("knapsack.in");
ofstream out("knapsack.out");
int s, n, x;
vector<int> w;
in >> s >> n;
for (int i = 0; i < n; i++) {
in >> x;
w.push_back(x);
}
vector<vector<int>> answer(n+1, vector<int>(s+1));
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= s; j++) {
if (i == 0 || j == 0)
answer[i][j] = 0;
else if (w[i - 1] <= j)
answer[i][j] = max(answer[i - 1][j], answer[i - 1][j - w[i - 1]] + w[i - 1]);
else
answer[i][j] = answer[i - 1][j];
}
}
out << answer[n][s];
in.close();
out.close();
return 0;
} | [
"[email protected]"
] | |
a8acd0d65148615b90770f452ce93003793dce69 | d0c7ec22315c9366af69f6ef77d9adf47f16b7f0 | /DeductionServer/DeductionServer/Net/GamePhaseUpdate.h | cdf82d26b415e3436c560cdf849fd0e405ab6b20 | [] | no_license | Muguai/Deduction | 1079f88fe149d38c8922719d649ffe2148a39341 | 8b19f79a9a2963294f92a242efa5bce4e19e1a60 | refs/heads/main | 2023-03-16T19:46:32.554912 | 2021-01-17T23:28:14 | 2021-01-17T23:28:14 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 324 | h | #pragma once
// WARNING : Auto-generated file, changes made will disappear when re-generated.
#include <iostream>
#pragma pack(push, 1)
class GamePhaseUpdate
{
public:
uint64_t phase;
int64_t timer;
uint64_t previous;
void serialize(std::ostream& os) const;
void deserialize(std::istream& is);
};
#pragma pack(pop)
| [
"[email protected]"
] | |
760f1bd18868bcd8033ca281ee3b81baf78cee2f | 6c21e958bc79c22aaeef6ada093872add6b7167a | /src/core/timer/jobs/autoattack.cpp | ebc1a1db59cf668b6e4f3d16f69570f015849771 | [] | no_license | Ockin/trogdor-pp | 609acc27478947241f79963400c267f5a6499413 | d8899d64542ed42597511de4e5b0e51a44737e96 | refs/heads/master | 2020-12-11T07:59:34.459591 | 2015-04-02T17:51:59 | 2015-04-02T17:51:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 560 | cpp | #include "../../include/timer/jobs/autoattack.h"
using namespace std;
namespace core {
void AutoAttackTimerJob::execute(TimerJob &job) {
if (!aggressor->isAlive() || !defender->isAlive()) {
job.setExecutions(0);
return;
}
else if (!defender->isAttackable()) {
job.setExecutions(0);
return;
}
else if (aggressor->getLocation() != defender->getLocation()) {
job.setExecutions(0);
return;
}
aggressor->attack(defender, aggressor->selectWeapon());
}
}
| [
"[email protected]"
] | |
fa2944791d077b4fe285aaadaf5e679a09169c21 | 210b894bafc50e46b04b13d1aab2fe8efee18805 | /Nouse5/StateCalibration.cpp | be673fab5670fd788d7a3cbf43cb01f7b551067f | [
"BSD-3-Clause"
] | permissive | gorodnichy/IVI-Nouse | b2c40a6fddf2a89e87551fe94ea74321c6e82cef | 347d40d7d7bb2baed65415441b7967d5f1e1c144 | refs/heads/master | 2021-07-08T07:29:11.148579 | 2017-10-04T01:46:30 | 2017-10-04T01:46:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,804 | cpp | #include "StdAfx.h"
#include "StateCalibration.h"
CStateCalibration::CStateCalibration(void) :
m_nCountConfirm(3),
m_bQuickCalibrate(false),
m_nClickBoxSize(1),
m_nCountCalibrateSelect(5)
{
m_eWhoAmI = STATE_CALIBRATION;
}
CStateCalibration::~CStateCalibration(void)
{
}
void CStateCalibration::onEntrance(CPVS* pPVS) {
m_timeTimerStart = time(0);
m_bInConfirmingStage = false;
m_nCountdown = 0;
m_pNouseControl->m_refImageData.m_pRangeMotion = &m_pNouseControl->m_rangeMotion;
if(*m_pbEnableSounds)
PlaySound(_T("sound/nouseShowNose.wav"), NULL, SND_ASYNC);
}
EState CStateCalibration::processData(CPVS* pPVS) {
int nTimerSeconds = int(difftime(time(0), m_timeTimerStart));
if(m_bQuickCalibrate) {
if(pPVS->m_fd.detectNose(&pPVS->m_imcIn)) {
PVI_POINT ptNose = *pPVS->m_fd.m_bufPtNose0.getLast();//m_pNouseControl->m_rangeMotion.ptZero;
PVI_RECT rectFace = *pPVS->m_fd.m_bufRectFace0.getLast();
m_pNouseTracker->learn(ptNose, rectFace, pPVS, NULL);
return STATE_CURSOR;
}
} else if(m_bInConfirmingStage) {
//TRACE("CONFIRMING\n");
PVI_BUFFER<PVI_3DPOINT>* bufPts = m_pNouseControl->m_refImageData.m_bufPtAbs;
m_nCountdown = m_nCountConfirm - nTimerSeconds;
PVI_RECT rectSearch = m_pNouseControl->m_refImageData.m_pRangeMotion->getRect(m_pNouseControl->m_nMotionRangeHorizontal, m_pNouseControl->m_nMotionRangeVertical);
m_pNouseTracker->track(pPVS, NULL, &rectSearch);
m_pNouseControl->m_refImageData.putAbs(*m_pNouseTracker->m_bufPtNose.getLast(), m_pNouseControl->m_nMotionRangeHorizontal, m_pNouseControl->m_nMotionRangeVertical);
//Elan09
bool bEnoughPointsInBuffer = bufPts->m_nNumElements > 5;
if(!m_nCountConfirm)
return bEnoughPointsInBuffer ? STATE_CURSOR : m_eWhoAmI;
//Elan09
m_rectConfirm.c = PVI_POINT(160/2, 120/2);
m_rectConfirm.s = PVI_POINT(160 * m_nClickBoxSize / 10.0, 120 * m_nClickBoxSize / 10.0);
EPointRectComparison ePointRectComparison = m_rectConfirm.comparePointToMe(*bufPts->getLast());
//Elan09: Put in 2nd half of and so it will work correctly when the buffer starts empty
if(ePointRectComparison != INSIDE_RECT && bEnoughPointsInBuffer)
return STATE_CURSOR;
if(m_nCountdown <= 0)
return STATE_READY;
} else {
//TRACE("COUNTDOWN\n");
m_nCountdown = m_nCountCalibrateSelect - nTimerSeconds;
/*
// Elan09
if (m_bQuickCalibrate) {
m_nCountdown = 0;
}
*/
if(m_nCountdown <= 0) {
PVI_POINT ptNose = m_pNouseControl->m_rangeMotion.ptZero;
PVI_RECT rectFace = *pPVS->m_fd.m_bufRectFace0.getLast();
m_pNouseTracker->learn(ptNose, rectFace, pPVS, NULL);
m_timeTimerStart = time(0);
m_bInConfirmingStage = true;
if(*m_pbEnableSounds)
PlaySound(_T("sound/nouseConfirm.wav"), NULL, SND_ASYNC);
}
}
return m_eWhoAmI;
} | [
"[email protected]"
] | |
0a0895069d417c7f1a859b092d862f32d62bd5a0 | f048ac073eb2bef649a7eddfc69412a3b34e82ca | /Array/arrayRotations/cyclicRotate.cpp | 9866913f7d1bcb7c9277f5afba3288c967da7ad1 | [] | no_license | tiwason/practice | 85189ce6ab2b6d2a233a54a66d8bc89211c9dde4 | e312cc39024a3d87fc2c8982aa83a2e0b38d9d21 | refs/heads/master | 2023-04-26T23:16:25.065399 | 2021-05-23T08:36:06 | 2021-05-23T08:36:06 | 315,837,804 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 785 | cpp | #include <iostream>
using namespace std;
int gcd(int a, int b)
{
if (b == 0)
return a;
else
return gcd(b, a % b);
}
void printArray(int arr[], int n)
{
int i;
for(i=0;i<n;i++)
cout << arr[i] << " ";
cout <<endl;
}
void reverse(int arr[], int start, int end)
{
while (start < end)
{
int tmp = arr[start];
arr[start] = arr[end];
arr[end] = tmp;
start++;
end--;
}
}
void cyclicRotate(int arr[], int n)
{
reverse(arr, 0, n-1);
reverse(arr, 1, n-1);
}
int main()
{
int arr[] = {1,2,3,4,5,6,7,8,9,10,11,12};
int size = sizeof(arr)/sizeof(arr[0]);
cyclicRotate(arr, size);
cout <<"Rotated array is : " << endl;
printArray(arr, size);
return 0;
} | [
"[email protected]"
] | |
49d46421d3b8ae483ec17386b7349257759ba559 | 6ced41da926682548df646099662e79d7a6022c5 | /aws-cpp-sdk-appflow/include/aws/appflow/model/ConnectorMetadata.h | d89f93ee7d20feb8dc3f1efff9151eed69332870 | [
"Apache-2.0",
"MIT",
"JSON"
] | permissive | irods/aws-sdk-cpp | 139104843de529f615defa4f6b8e20bc95a6be05 | 2c7fb1a048c96713a28b730e1f48096bd231e932 | refs/heads/main | 2023-07-25T12:12:04.363757 | 2022-08-26T15:33:31 | 2022-08-26T15:33:31 | 141,315,346 | 0 | 1 | Apache-2.0 | 2022-08-26T17:45:09 | 2018-07-17T16:24:06 | C++ | UTF-8 | C++ | false | false | 26,390 | h | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/appflow/Appflow_EXPORTS.h>
#include <aws/appflow/model/AmplitudeMetadata.h>
#include <aws/appflow/model/DatadogMetadata.h>
#include <aws/appflow/model/DynatraceMetadata.h>
#include <aws/appflow/model/GoogleAnalyticsMetadata.h>
#include <aws/appflow/model/InforNexusMetadata.h>
#include <aws/appflow/model/MarketoMetadata.h>
#include <aws/appflow/model/RedshiftMetadata.h>
#include <aws/appflow/model/S3Metadata.h>
#include <aws/appflow/model/SalesforceMetadata.h>
#include <aws/appflow/model/ServiceNowMetadata.h>
#include <aws/appflow/model/SingularMetadata.h>
#include <aws/appflow/model/SlackMetadata.h>
#include <aws/appflow/model/SnowflakeMetadata.h>
#include <aws/appflow/model/TrendmicroMetadata.h>
#include <aws/appflow/model/VeevaMetadata.h>
#include <aws/appflow/model/ZendeskMetadata.h>
#include <aws/appflow/model/EventBridgeMetadata.h>
#include <aws/appflow/model/UpsolverMetadata.h>
#include <aws/appflow/model/CustomerProfilesMetadata.h>
#include <aws/appflow/model/HoneycodeMetadata.h>
#include <aws/appflow/model/SAPODataMetadata.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Appflow
{
namespace Model
{
/**
* <p> A structure to specify connector-specific metadata such as
* <code>oAuthScopes</code>, <code>supportedRegions</code>,
* <code>privateLinkServiceUrl</code>, and so on. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/appflow-2020-08-23/ConnectorMetadata">AWS
* API Reference</a></p>
*/
class AWS_APPFLOW_API ConnectorMetadata
{
public:
ConnectorMetadata();
ConnectorMetadata(Aws::Utils::Json::JsonView jsonValue);
ConnectorMetadata& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p> The connector metadata specific to Amplitude. </p>
*/
inline const AmplitudeMetadata& GetAmplitude() const{ return m_amplitude; }
/**
* <p> The connector metadata specific to Amplitude. </p>
*/
inline bool AmplitudeHasBeenSet() const { return m_amplitudeHasBeenSet; }
/**
* <p> The connector metadata specific to Amplitude. </p>
*/
inline void SetAmplitude(const AmplitudeMetadata& value) { m_amplitudeHasBeenSet = true; m_amplitude = value; }
/**
* <p> The connector metadata specific to Amplitude. </p>
*/
inline void SetAmplitude(AmplitudeMetadata&& value) { m_amplitudeHasBeenSet = true; m_amplitude = std::move(value); }
/**
* <p> The connector metadata specific to Amplitude. </p>
*/
inline ConnectorMetadata& WithAmplitude(const AmplitudeMetadata& value) { SetAmplitude(value); return *this;}
/**
* <p> The connector metadata specific to Amplitude. </p>
*/
inline ConnectorMetadata& WithAmplitude(AmplitudeMetadata&& value) { SetAmplitude(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Datadog. </p>
*/
inline const DatadogMetadata& GetDatadog() const{ return m_datadog; }
/**
* <p> The connector metadata specific to Datadog. </p>
*/
inline bool DatadogHasBeenSet() const { return m_datadogHasBeenSet; }
/**
* <p> The connector metadata specific to Datadog. </p>
*/
inline void SetDatadog(const DatadogMetadata& value) { m_datadogHasBeenSet = true; m_datadog = value; }
/**
* <p> The connector metadata specific to Datadog. </p>
*/
inline void SetDatadog(DatadogMetadata&& value) { m_datadogHasBeenSet = true; m_datadog = std::move(value); }
/**
* <p> The connector metadata specific to Datadog. </p>
*/
inline ConnectorMetadata& WithDatadog(const DatadogMetadata& value) { SetDatadog(value); return *this;}
/**
* <p> The connector metadata specific to Datadog. </p>
*/
inline ConnectorMetadata& WithDatadog(DatadogMetadata&& value) { SetDatadog(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Dynatrace. </p>
*/
inline const DynatraceMetadata& GetDynatrace() const{ return m_dynatrace; }
/**
* <p> The connector metadata specific to Dynatrace. </p>
*/
inline bool DynatraceHasBeenSet() const { return m_dynatraceHasBeenSet; }
/**
* <p> The connector metadata specific to Dynatrace. </p>
*/
inline void SetDynatrace(const DynatraceMetadata& value) { m_dynatraceHasBeenSet = true; m_dynatrace = value; }
/**
* <p> The connector metadata specific to Dynatrace. </p>
*/
inline void SetDynatrace(DynatraceMetadata&& value) { m_dynatraceHasBeenSet = true; m_dynatrace = std::move(value); }
/**
* <p> The connector metadata specific to Dynatrace. </p>
*/
inline ConnectorMetadata& WithDynatrace(const DynatraceMetadata& value) { SetDynatrace(value); return *this;}
/**
* <p> The connector metadata specific to Dynatrace. </p>
*/
inline ConnectorMetadata& WithDynatrace(DynatraceMetadata&& value) { SetDynatrace(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Google Analytics. </p>
*/
inline const GoogleAnalyticsMetadata& GetGoogleAnalytics() const{ return m_googleAnalytics; }
/**
* <p> The connector metadata specific to Google Analytics. </p>
*/
inline bool GoogleAnalyticsHasBeenSet() const { return m_googleAnalyticsHasBeenSet; }
/**
* <p> The connector metadata specific to Google Analytics. </p>
*/
inline void SetGoogleAnalytics(const GoogleAnalyticsMetadata& value) { m_googleAnalyticsHasBeenSet = true; m_googleAnalytics = value; }
/**
* <p> The connector metadata specific to Google Analytics. </p>
*/
inline void SetGoogleAnalytics(GoogleAnalyticsMetadata&& value) { m_googleAnalyticsHasBeenSet = true; m_googleAnalytics = std::move(value); }
/**
* <p> The connector metadata specific to Google Analytics. </p>
*/
inline ConnectorMetadata& WithGoogleAnalytics(const GoogleAnalyticsMetadata& value) { SetGoogleAnalytics(value); return *this;}
/**
* <p> The connector metadata specific to Google Analytics. </p>
*/
inline ConnectorMetadata& WithGoogleAnalytics(GoogleAnalyticsMetadata&& value) { SetGoogleAnalytics(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Infor Nexus. </p>
*/
inline const InforNexusMetadata& GetInforNexus() const{ return m_inforNexus; }
/**
* <p> The connector metadata specific to Infor Nexus. </p>
*/
inline bool InforNexusHasBeenSet() const { return m_inforNexusHasBeenSet; }
/**
* <p> The connector metadata specific to Infor Nexus. </p>
*/
inline void SetInforNexus(const InforNexusMetadata& value) { m_inforNexusHasBeenSet = true; m_inforNexus = value; }
/**
* <p> The connector metadata specific to Infor Nexus. </p>
*/
inline void SetInforNexus(InforNexusMetadata&& value) { m_inforNexusHasBeenSet = true; m_inforNexus = std::move(value); }
/**
* <p> The connector metadata specific to Infor Nexus. </p>
*/
inline ConnectorMetadata& WithInforNexus(const InforNexusMetadata& value) { SetInforNexus(value); return *this;}
/**
* <p> The connector metadata specific to Infor Nexus. </p>
*/
inline ConnectorMetadata& WithInforNexus(InforNexusMetadata&& value) { SetInforNexus(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Marketo. </p>
*/
inline const MarketoMetadata& GetMarketo() const{ return m_marketo; }
/**
* <p> The connector metadata specific to Marketo. </p>
*/
inline bool MarketoHasBeenSet() const { return m_marketoHasBeenSet; }
/**
* <p> The connector metadata specific to Marketo. </p>
*/
inline void SetMarketo(const MarketoMetadata& value) { m_marketoHasBeenSet = true; m_marketo = value; }
/**
* <p> The connector metadata specific to Marketo. </p>
*/
inline void SetMarketo(MarketoMetadata&& value) { m_marketoHasBeenSet = true; m_marketo = std::move(value); }
/**
* <p> The connector metadata specific to Marketo. </p>
*/
inline ConnectorMetadata& WithMarketo(const MarketoMetadata& value) { SetMarketo(value); return *this;}
/**
* <p> The connector metadata specific to Marketo. </p>
*/
inline ConnectorMetadata& WithMarketo(MarketoMetadata&& value) { SetMarketo(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Amazon Redshift. </p>
*/
inline const RedshiftMetadata& GetRedshift() const{ return m_redshift; }
/**
* <p> The connector metadata specific to Amazon Redshift. </p>
*/
inline bool RedshiftHasBeenSet() const { return m_redshiftHasBeenSet; }
/**
* <p> The connector metadata specific to Amazon Redshift. </p>
*/
inline void SetRedshift(const RedshiftMetadata& value) { m_redshiftHasBeenSet = true; m_redshift = value; }
/**
* <p> The connector metadata specific to Amazon Redshift. </p>
*/
inline void SetRedshift(RedshiftMetadata&& value) { m_redshiftHasBeenSet = true; m_redshift = std::move(value); }
/**
* <p> The connector metadata specific to Amazon Redshift. </p>
*/
inline ConnectorMetadata& WithRedshift(const RedshiftMetadata& value) { SetRedshift(value); return *this;}
/**
* <p> The connector metadata specific to Amazon Redshift. </p>
*/
inline ConnectorMetadata& WithRedshift(RedshiftMetadata&& value) { SetRedshift(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Amazon S3. </p>
*/
inline const S3Metadata& GetS3() const{ return m_s3; }
/**
* <p> The connector metadata specific to Amazon S3. </p>
*/
inline bool S3HasBeenSet() const { return m_s3HasBeenSet; }
/**
* <p> The connector metadata specific to Amazon S3. </p>
*/
inline void SetS3(const S3Metadata& value) { m_s3HasBeenSet = true; m_s3 = value; }
/**
* <p> The connector metadata specific to Amazon S3. </p>
*/
inline void SetS3(S3Metadata&& value) { m_s3HasBeenSet = true; m_s3 = std::move(value); }
/**
* <p> The connector metadata specific to Amazon S3. </p>
*/
inline ConnectorMetadata& WithS3(const S3Metadata& value) { SetS3(value); return *this;}
/**
* <p> The connector metadata specific to Amazon S3. </p>
*/
inline ConnectorMetadata& WithS3(S3Metadata&& value) { SetS3(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Salesforce. </p>
*/
inline const SalesforceMetadata& GetSalesforce() const{ return m_salesforce; }
/**
* <p> The connector metadata specific to Salesforce. </p>
*/
inline bool SalesforceHasBeenSet() const { return m_salesforceHasBeenSet; }
/**
* <p> The connector metadata specific to Salesforce. </p>
*/
inline void SetSalesforce(const SalesforceMetadata& value) { m_salesforceHasBeenSet = true; m_salesforce = value; }
/**
* <p> The connector metadata specific to Salesforce. </p>
*/
inline void SetSalesforce(SalesforceMetadata&& value) { m_salesforceHasBeenSet = true; m_salesforce = std::move(value); }
/**
* <p> The connector metadata specific to Salesforce. </p>
*/
inline ConnectorMetadata& WithSalesforce(const SalesforceMetadata& value) { SetSalesforce(value); return *this;}
/**
* <p> The connector metadata specific to Salesforce. </p>
*/
inline ConnectorMetadata& WithSalesforce(SalesforceMetadata&& value) { SetSalesforce(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to ServiceNow. </p>
*/
inline const ServiceNowMetadata& GetServiceNow() const{ return m_serviceNow; }
/**
* <p> The connector metadata specific to ServiceNow. </p>
*/
inline bool ServiceNowHasBeenSet() const { return m_serviceNowHasBeenSet; }
/**
* <p> The connector metadata specific to ServiceNow. </p>
*/
inline void SetServiceNow(const ServiceNowMetadata& value) { m_serviceNowHasBeenSet = true; m_serviceNow = value; }
/**
* <p> The connector metadata specific to ServiceNow. </p>
*/
inline void SetServiceNow(ServiceNowMetadata&& value) { m_serviceNowHasBeenSet = true; m_serviceNow = std::move(value); }
/**
* <p> The connector metadata specific to ServiceNow. </p>
*/
inline ConnectorMetadata& WithServiceNow(const ServiceNowMetadata& value) { SetServiceNow(value); return *this;}
/**
* <p> The connector metadata specific to ServiceNow. </p>
*/
inline ConnectorMetadata& WithServiceNow(ServiceNowMetadata&& value) { SetServiceNow(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Singular. </p>
*/
inline const SingularMetadata& GetSingular() const{ return m_singular; }
/**
* <p> The connector metadata specific to Singular. </p>
*/
inline bool SingularHasBeenSet() const { return m_singularHasBeenSet; }
/**
* <p> The connector metadata specific to Singular. </p>
*/
inline void SetSingular(const SingularMetadata& value) { m_singularHasBeenSet = true; m_singular = value; }
/**
* <p> The connector metadata specific to Singular. </p>
*/
inline void SetSingular(SingularMetadata&& value) { m_singularHasBeenSet = true; m_singular = std::move(value); }
/**
* <p> The connector metadata specific to Singular. </p>
*/
inline ConnectorMetadata& WithSingular(const SingularMetadata& value) { SetSingular(value); return *this;}
/**
* <p> The connector metadata specific to Singular. </p>
*/
inline ConnectorMetadata& WithSingular(SingularMetadata&& value) { SetSingular(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Slack. </p>
*/
inline const SlackMetadata& GetSlack() const{ return m_slack; }
/**
* <p> The connector metadata specific to Slack. </p>
*/
inline bool SlackHasBeenSet() const { return m_slackHasBeenSet; }
/**
* <p> The connector metadata specific to Slack. </p>
*/
inline void SetSlack(const SlackMetadata& value) { m_slackHasBeenSet = true; m_slack = value; }
/**
* <p> The connector metadata specific to Slack. </p>
*/
inline void SetSlack(SlackMetadata&& value) { m_slackHasBeenSet = true; m_slack = std::move(value); }
/**
* <p> The connector metadata specific to Slack. </p>
*/
inline ConnectorMetadata& WithSlack(const SlackMetadata& value) { SetSlack(value); return *this;}
/**
* <p> The connector metadata specific to Slack. </p>
*/
inline ConnectorMetadata& WithSlack(SlackMetadata&& value) { SetSlack(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Snowflake. </p>
*/
inline const SnowflakeMetadata& GetSnowflake() const{ return m_snowflake; }
/**
* <p> The connector metadata specific to Snowflake. </p>
*/
inline bool SnowflakeHasBeenSet() const { return m_snowflakeHasBeenSet; }
/**
* <p> The connector metadata specific to Snowflake. </p>
*/
inline void SetSnowflake(const SnowflakeMetadata& value) { m_snowflakeHasBeenSet = true; m_snowflake = value; }
/**
* <p> The connector metadata specific to Snowflake. </p>
*/
inline void SetSnowflake(SnowflakeMetadata&& value) { m_snowflakeHasBeenSet = true; m_snowflake = std::move(value); }
/**
* <p> The connector metadata specific to Snowflake. </p>
*/
inline ConnectorMetadata& WithSnowflake(const SnowflakeMetadata& value) { SetSnowflake(value); return *this;}
/**
* <p> The connector metadata specific to Snowflake. </p>
*/
inline ConnectorMetadata& WithSnowflake(SnowflakeMetadata&& value) { SetSnowflake(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Trend Micro. </p>
*/
inline const TrendmicroMetadata& GetTrendmicro() const{ return m_trendmicro; }
/**
* <p> The connector metadata specific to Trend Micro. </p>
*/
inline bool TrendmicroHasBeenSet() const { return m_trendmicroHasBeenSet; }
/**
* <p> The connector metadata specific to Trend Micro. </p>
*/
inline void SetTrendmicro(const TrendmicroMetadata& value) { m_trendmicroHasBeenSet = true; m_trendmicro = value; }
/**
* <p> The connector metadata specific to Trend Micro. </p>
*/
inline void SetTrendmicro(TrendmicroMetadata&& value) { m_trendmicroHasBeenSet = true; m_trendmicro = std::move(value); }
/**
* <p> The connector metadata specific to Trend Micro. </p>
*/
inline ConnectorMetadata& WithTrendmicro(const TrendmicroMetadata& value) { SetTrendmicro(value); return *this;}
/**
* <p> The connector metadata specific to Trend Micro. </p>
*/
inline ConnectorMetadata& WithTrendmicro(TrendmicroMetadata&& value) { SetTrendmicro(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Veeva. </p>
*/
inline const VeevaMetadata& GetVeeva() const{ return m_veeva; }
/**
* <p> The connector metadata specific to Veeva. </p>
*/
inline bool VeevaHasBeenSet() const { return m_veevaHasBeenSet; }
/**
* <p> The connector metadata specific to Veeva. </p>
*/
inline void SetVeeva(const VeevaMetadata& value) { m_veevaHasBeenSet = true; m_veeva = value; }
/**
* <p> The connector metadata specific to Veeva. </p>
*/
inline void SetVeeva(VeevaMetadata&& value) { m_veevaHasBeenSet = true; m_veeva = std::move(value); }
/**
* <p> The connector metadata specific to Veeva. </p>
*/
inline ConnectorMetadata& WithVeeva(const VeevaMetadata& value) { SetVeeva(value); return *this;}
/**
* <p> The connector metadata specific to Veeva. </p>
*/
inline ConnectorMetadata& WithVeeva(VeevaMetadata&& value) { SetVeeva(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Zendesk. </p>
*/
inline const ZendeskMetadata& GetZendesk() const{ return m_zendesk; }
/**
* <p> The connector metadata specific to Zendesk. </p>
*/
inline bool ZendeskHasBeenSet() const { return m_zendeskHasBeenSet; }
/**
* <p> The connector metadata specific to Zendesk. </p>
*/
inline void SetZendesk(const ZendeskMetadata& value) { m_zendeskHasBeenSet = true; m_zendesk = value; }
/**
* <p> The connector metadata specific to Zendesk. </p>
*/
inline void SetZendesk(ZendeskMetadata&& value) { m_zendeskHasBeenSet = true; m_zendesk = std::move(value); }
/**
* <p> The connector metadata specific to Zendesk. </p>
*/
inline ConnectorMetadata& WithZendesk(const ZendeskMetadata& value) { SetZendesk(value); return *this;}
/**
* <p> The connector metadata specific to Zendesk. </p>
*/
inline ConnectorMetadata& WithZendesk(ZendeskMetadata&& value) { SetZendesk(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Amazon EventBridge. </p>
*/
inline const EventBridgeMetadata& GetEventBridge() const{ return m_eventBridge; }
/**
* <p> The connector metadata specific to Amazon EventBridge. </p>
*/
inline bool EventBridgeHasBeenSet() const { return m_eventBridgeHasBeenSet; }
/**
* <p> The connector metadata specific to Amazon EventBridge. </p>
*/
inline void SetEventBridge(const EventBridgeMetadata& value) { m_eventBridgeHasBeenSet = true; m_eventBridge = value; }
/**
* <p> The connector metadata specific to Amazon EventBridge. </p>
*/
inline void SetEventBridge(EventBridgeMetadata&& value) { m_eventBridgeHasBeenSet = true; m_eventBridge = std::move(value); }
/**
* <p> The connector metadata specific to Amazon EventBridge. </p>
*/
inline ConnectorMetadata& WithEventBridge(const EventBridgeMetadata& value) { SetEventBridge(value); return *this;}
/**
* <p> The connector metadata specific to Amazon EventBridge. </p>
*/
inline ConnectorMetadata& WithEventBridge(EventBridgeMetadata&& value) { SetEventBridge(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Upsolver. </p>
*/
inline const UpsolverMetadata& GetUpsolver() const{ return m_upsolver; }
/**
* <p> The connector metadata specific to Upsolver. </p>
*/
inline bool UpsolverHasBeenSet() const { return m_upsolverHasBeenSet; }
/**
* <p> The connector metadata specific to Upsolver. </p>
*/
inline void SetUpsolver(const UpsolverMetadata& value) { m_upsolverHasBeenSet = true; m_upsolver = value; }
/**
* <p> The connector metadata specific to Upsolver. </p>
*/
inline void SetUpsolver(UpsolverMetadata&& value) { m_upsolverHasBeenSet = true; m_upsolver = std::move(value); }
/**
* <p> The connector metadata specific to Upsolver. </p>
*/
inline ConnectorMetadata& WithUpsolver(const UpsolverMetadata& value) { SetUpsolver(value); return *this;}
/**
* <p> The connector metadata specific to Upsolver. </p>
*/
inline ConnectorMetadata& WithUpsolver(UpsolverMetadata&& value) { SetUpsolver(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Amazon Connect Customer Profiles. </p>
*/
inline const CustomerProfilesMetadata& GetCustomerProfiles() const{ return m_customerProfiles; }
/**
* <p> The connector metadata specific to Amazon Connect Customer Profiles. </p>
*/
inline bool CustomerProfilesHasBeenSet() const { return m_customerProfilesHasBeenSet; }
/**
* <p> The connector metadata specific to Amazon Connect Customer Profiles. </p>
*/
inline void SetCustomerProfiles(const CustomerProfilesMetadata& value) { m_customerProfilesHasBeenSet = true; m_customerProfiles = value; }
/**
* <p> The connector metadata specific to Amazon Connect Customer Profiles. </p>
*/
inline void SetCustomerProfiles(CustomerProfilesMetadata&& value) { m_customerProfilesHasBeenSet = true; m_customerProfiles = std::move(value); }
/**
* <p> The connector metadata specific to Amazon Connect Customer Profiles. </p>
*/
inline ConnectorMetadata& WithCustomerProfiles(const CustomerProfilesMetadata& value) { SetCustomerProfiles(value); return *this;}
/**
* <p> The connector metadata specific to Amazon Connect Customer Profiles. </p>
*/
inline ConnectorMetadata& WithCustomerProfiles(CustomerProfilesMetadata&& value) { SetCustomerProfiles(std::move(value)); return *this;}
/**
* <p> The connector metadata specific to Amazon Honeycode. </p>
*/
inline const HoneycodeMetadata& GetHoneycode() const{ return m_honeycode; }
/**
* <p> The connector metadata specific to Amazon Honeycode. </p>
*/
inline bool HoneycodeHasBeenSet() const { return m_honeycodeHasBeenSet; }
/**
* <p> The connector metadata specific to Amazon Honeycode. </p>
*/
inline void SetHoneycode(const HoneycodeMetadata& value) { m_honeycodeHasBeenSet = true; m_honeycode = value; }
/**
* <p> The connector metadata specific to Amazon Honeycode. </p>
*/
inline void SetHoneycode(HoneycodeMetadata&& value) { m_honeycodeHasBeenSet = true; m_honeycode = std::move(value); }
/**
* <p> The connector metadata specific to Amazon Honeycode. </p>
*/
inline ConnectorMetadata& WithHoneycode(const HoneycodeMetadata& value) { SetHoneycode(value); return *this;}
/**
* <p> The connector metadata specific to Amazon Honeycode. </p>
*/
inline ConnectorMetadata& WithHoneycode(HoneycodeMetadata&& value) { SetHoneycode(std::move(value)); return *this;}
inline const SAPODataMetadata& GetSAPOData() const{ return m_sAPOData; }
inline bool SAPODataHasBeenSet() const { return m_sAPODataHasBeenSet; }
inline void SetSAPOData(const SAPODataMetadata& value) { m_sAPODataHasBeenSet = true; m_sAPOData = value; }
inline void SetSAPOData(SAPODataMetadata&& value) { m_sAPODataHasBeenSet = true; m_sAPOData = std::move(value); }
inline ConnectorMetadata& WithSAPOData(const SAPODataMetadata& value) { SetSAPOData(value); return *this;}
inline ConnectorMetadata& WithSAPOData(SAPODataMetadata&& value) { SetSAPOData(std::move(value)); return *this;}
private:
AmplitudeMetadata m_amplitude;
bool m_amplitudeHasBeenSet;
DatadogMetadata m_datadog;
bool m_datadogHasBeenSet;
DynatraceMetadata m_dynatrace;
bool m_dynatraceHasBeenSet;
GoogleAnalyticsMetadata m_googleAnalytics;
bool m_googleAnalyticsHasBeenSet;
InforNexusMetadata m_inforNexus;
bool m_inforNexusHasBeenSet;
MarketoMetadata m_marketo;
bool m_marketoHasBeenSet;
RedshiftMetadata m_redshift;
bool m_redshiftHasBeenSet;
S3Metadata m_s3;
bool m_s3HasBeenSet;
SalesforceMetadata m_salesforce;
bool m_salesforceHasBeenSet;
ServiceNowMetadata m_serviceNow;
bool m_serviceNowHasBeenSet;
SingularMetadata m_singular;
bool m_singularHasBeenSet;
SlackMetadata m_slack;
bool m_slackHasBeenSet;
SnowflakeMetadata m_snowflake;
bool m_snowflakeHasBeenSet;
TrendmicroMetadata m_trendmicro;
bool m_trendmicroHasBeenSet;
VeevaMetadata m_veeva;
bool m_veevaHasBeenSet;
ZendeskMetadata m_zendesk;
bool m_zendeskHasBeenSet;
EventBridgeMetadata m_eventBridge;
bool m_eventBridgeHasBeenSet;
UpsolverMetadata m_upsolver;
bool m_upsolverHasBeenSet;
CustomerProfilesMetadata m_customerProfiles;
bool m_customerProfilesHasBeenSet;
HoneycodeMetadata m_honeycode;
bool m_honeycodeHasBeenSet;
SAPODataMetadata m_sAPOData;
bool m_sAPODataHasBeenSet;
};
} // namespace Model
} // namespace Appflow
} // namespace Aws
| [
"[email protected]"
] | |
22b711d3d3043b63c97e7ab7a7e34dd2a9d9c1dd | 1923a18e2b45c3d7011ea4172975cef806e571ce | /framework/sdk/vec3.hpp | c584fde298772606bb7af92aa48d64babf61dafa | [] | no_license | sestain/hawk_sdk | 9a06f286cd59812a8973ed770198cd1d32e19ce3 | f24cd0bd1ebd7a225b849476b9f51fda8f642cae | refs/heads/main | 2023-02-26T00:06:21.037287 | 2021-01-28T09:24:12 | 2021-01-28T09:24:12 | 316,706,269 | 0 | 0 | null | 2020-11-28T10:14:56 | 2020-11-28T10:14:55 | null | UTF-8 | C++ | false | false | 6,794 | hpp | #pragma once
#include <cmath>
#include <algorithm>
#include "angles.hpp"
#define CHECK_VALID( _v ) 0
class vec2_t {
public:
vec2_t() = default;
vec2_t(float x, float y) {
this->x = x;
this->y = y;
}
float x, y;
};
class vec3_t {
public:
float x, y, z;
vec3_t() {
init();
}
vec3_t(float x, float y, float z = 0.0f) {
this->x = x;
this->y = y;
this->z = z;
}
float vLength() const
{
return sqrt(x * x + y * y + z * z);
}
void init() {
this->x = this->y = this->z = 0.0f;
}
void init(float x, float y, float z) {
this->x = x;
this->y = y;
this->z = z;
}
inline float VectorNormalize(vec3_t& v)
{
Assert(v.IsValid());
float l = v.Length();
if (l != 0.0f)
{
v /= l;
}
else
{
// FIXME:
// Just copying the existing implemenation; shouldn't res.z == 0?
v.x = v.y = 0.0f; v.z = 1.0f;
}
return l;
}
//===============================================
inline float VectorNormalize(float* v)
{
return VectorNormalize(*(reinterpret_cast<vec3_t*>(v)));
}
bool is_valid() {
return std::isfinite(this->x) && std::isfinite(this->y) && std::isfinite(this->z);
}
bool is_zero() {
return vec3_t(this->x, this->y, this->z) == vec3_t(0.0f, 0.0f, 0.0f);
}
constexpr auto not_null() const noexcept
{
return x || y || z;
}
void invalidate() {
this->x = this->y = this->z = std::numeric_limits< float >::infinity();
}
void clear() {
this->x = this->y = this->z = 0.0f;
}
float& operator[](int i) {
return ((float*) this)[i];
}
float operator[](int i) const {
return ((float*) this)[i];
}
void zero() {
this->x = this->y = this->z = 0.0f;
}
bool operator==(const vec3_t& src) const {
return (src.x == this->x) && (src.y == y) && (src.z == z);
}
bool operator!=(const vec3_t& src) const {
return (src.x != this->x) || (src.y != y) || (src.z != z);
}
vec3_t& operator+=(const vec3_t& v) {
this->x += v.x; this->y += v.y; this->z += v.z;
return *this;
}
vec3_t& operator-=(const vec3_t& v) {
this->x -= v.x; this->y -= v.y; this->z -= v.z;
return *this;
}
vec3_t& operator*=(float fl) {
this->x *= fl;
this->y *= fl;
this->z *= fl;
return *this;
}
vec3_t& operator*=(const vec3_t& v) {
this->x *= v.x;
this->y *= v.y;
this->z *= v.z;
return *this;
}
vec3_t& operator/=(const vec3_t& v) {
this->x /= v.x;
this->y /= v.y;
this->z /= v.z;
return *this;
}
vec3_t& operator+=(float fl) {
this->x += fl;
this->y += fl;
this->z += fl;
return *this;
}
vec3_t& operator/=(float fl) {
this->x /= fl;
this->y /= fl;
this->z /= fl;
return *this;
}
vec3_t& operator-=(float fl) {
this->x -= fl;
this->y -= fl;
this->z -= fl;
return *this;
}
void clamp()
{
while (this->x < -89.0f)
this->x += 89.0f;
if (this->x > 89.0f)
this->x = 89.0f;
while (this->y < -180.0f)
this->y += 360.0f;
while (this->y > 180.0f)
this->y -= 360.0f;
this->z = 0.0f;
}
#define RAD2DEG(x) ((x) * 57.29577951308232087721f)
auto to_angle() const noexcept
{
return vec3_t{RAD2DEG(std::atan2(-z, std::hypot(x, y))),
RAD2DEG(std::atan2(y, x)),
0.0f};
}
vec3_t& normalize_vec() noexcept
{
x = std::isfinite(x) ? std::remainder(x, 360.0f) : 0.0f;
y = std::isfinite(y) ? std::remainder(y, 360.0f) : 0.0f;
z = 0.0f;
return *this;
}
void normalize() {
*this = normalized();
}
vec3_t normalized() const {
auto res = *this;
auto l = res.length();
if (l != 0.0f)
res /= l;
else
res.x = res.y = res.z = 0.0f;
return res;
}
float normalize_place()
{
vec3_t vecOut = *this;
float flLength = vecOut.length();
float flRadius = 1.0f / (flLength + std::numeric_limits<float>::epsilon());
vecOut.x *= flRadius;
vecOut.y *= flRadius;
vecOut.z *= flRadius;
return flLength;
}
float dist_to(const vec3_t& vec) const {
vec3_t delta;
delta.x = this->x - vec.x;
delta.y = this->y - vec.y;
delta.z = this->z - vec.z;
return delta.length();
}
float dist_to_sqr(const vec3_t& vec) const {
vec3_t delta;
delta.x = this->x - vec.x;
delta.y = this->y - vec.y;
delta.z = this->z - vec.z;
return delta.length_sqr();
}
float dot_product(const vec3_t& vec) const {
return this->x * vec.x + this->y * vec.y + this->z * vec.z;
}
vec3_t cross_product(const vec3_t& vec) const {
return vec3_t(this->y * vec.z - this->z * vec.y, this->z * vec.x - this->x * vec.z, this->x * vec.y - this->y * vec.x);
}
float length() const {
return std::sqrtf(this->x * this->x + this->y * this->y + this->z * this->z);
}
float length_sqr() const {
return this->x * this->x + this->y * this->y + this->z * this->z;
}
float length_2d_sqr() const {
return this->x * this->x + this->y * this->y;
}
float length_2d() const {
return std::sqrtf(this->x * this->x + this->y * this->y);
}
vec3_t& operator=(const vec3_t& vec) {
this->x = vec.x; this->y = vec.y; this->z = vec.z;
return *this;
}
vec3_t operator-() const {
return vec3_t(-this->x, -this->y, -this->z);
}
vec3_t operator+(const vec3_t& v) const {
return vec3_t(this->x + v.x, this->y + v.y, this->z + v.z);
}
vec3_t operator-(const vec3_t& v) const {
return vec3_t(this->x - v.x, this->y - v.y, this->z - v.z);
}
vec3_t operator*(float fl) const {
return vec3_t(this->x * fl, this->y * fl, this->z * fl);
}
vec3_t operator*(const vec3_t& v) const {
return vec3_t(this->x * v.x, this->y * v.y, this->z * v.z);
}
vec3_t operator/(float fl) const {
return vec3_t(this->x / fl, this->y / fl, this->z / fl);
}
vec3_t operator/(const vec3_t& v) const {
return vec3_t(this->x / v.x, this->y / v.y, this->z / v.z);
}
float Length(void) const;
vec3_t Normalize();
};
__forceinline vec3_t operator*(float lhs, const vec3_t& rhs) {
return rhs * lhs;
}
__forceinline vec3_t operator/(float lhs, const vec3_t& rhs) {
return rhs / lhs;
}
inline float vector_length(const vec3_t& v)
{
return (float) sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
}
inline vec3_t vector_approach(vec3_t target, vec3_t value, float speed)
{
vec3_t diff = (target - value);
float delta = diff.length();
if (delta > speed)
value += diff.normalized() * speed;
else if (delta < -speed)
value -= diff.normalized() * speed;
else
value = target;
return value;
}
class __declspec(align(16)) vec_alligned : public vec3_t
{
public:
inline vec_alligned(void) {};
inline vec_alligned(float x, float y, float z)
{
init(x, y, z);
}
public:
explicit vec_alligned(const vec3_t& other)
{
init(other.x, other.y, other.z);
}
vec_alligned& operator=(const vec3_t& other)
{
init(other.x, other.y, other.z);
return *this;
}
vec_alligned& operator=(const vec_alligned& other)
{
init(other.x, other.y, other.z);
return *this;
}
float w;
};
| [
"[email protected]"
] | |
de99a2f19d03de46c98a45e52272f2cb0ccdd716 | 6eccfc50c73272c9515b91c641d0e3b3b9e7ba3c | /libraries/client/include/ohl/client/api_logger.hpp | 9e81b3775d75b802810a3810ff3943e9c8dbb856 | [] | no_license | CplSafe/CPLWallet | 5d3c380f039464124c58f3802141f15f172413b1 | 02ffa6deb8c3cdfd57a0e22ca19b12b9f348c00e | refs/heads/master | 2021-08-30T07:29:51.192084 | 2017-12-16T18:36:47 | 2017-12-16T18:36:47 | 114,468,764 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 861 | hpp |
#pragma once
#include <ohl/api/global_api_logger.hpp>
#if OHL_GLOBAL_API_LOG
#include <fc/io/iostream.hpp>
#include <fc/thread/mutex.hpp>
#include <fc/variant.hpp>
namespace ohl { namespace client {
class stream_api_logger : public ohl::api::api_logger
{
public:
stream_api_logger(fc::ostream_ptr output);
virtual ~stream_api_logger();
virtual void log_call_started ( uint64_t call_id, const ohl::api::common_api* target, const fc::string& name, const fc::variants& args ) override;
virtual void log_call_finished( uint64_t call_id, const ohl::api::common_api* target, const fc::string& name, const fc::variants& args, const fc::variant& result ) override;
virtual void close();
fc::ostream_ptr output;
fc::mutex output_mutex;
bool is_first_item;
bool is_closed;
};
} } // end namespace ohl::client
#endif
| [
"[email protected]"
] | |
185dbd6507675635b3fb8882fc1fecea129bbfd6 | 1f9de3f854708161db9dd15f4c8cfbc7e40fd562 | /Source/Aria/AriaCharacter.h | 731d9fd00dccf065a5ebfea24fdfe1f0081f4251 | [] | no_license | chris-hamer/Aria | 2a1c6e058c98d6397a0865caaf852f655353eb7b | e1f3e580dcd1f4bfce8afc99eb4244f28c237281 | refs/heads/master | 2021-04-26T23:29:14.540909 | 2018-07-04T04:22:13 | 2018-07-04T04:22:13 | 124,003,476 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,415 | h | // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "AriaMovementComponent.h"
#include "AriaCharacter.generated.h"
UCLASS()
class ARIA_API AAriaCharacter : public APawn
{
GENERATED_BODY()
public:
// Sets default values for this pawn's properties
AAriaCharacter();
UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
UAriaMovementComponent* MovementComponent;
UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
class UCapsuleComponent* CapsuleComponent;
UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
USkeletalMeshComponent* Model;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
UFUNCTION(BlueprintCallable, Category = "Aria Character Utilities")
void TurnModel();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "State") FRotator TargetDirection;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings") float TurnRate = 720.0f;
};
| [
"[email protected]"
] | |
7e421111ed49e1701eae70c446dfb6ec5b5dca44 | 610d84e48a664566c0df42dffd518e1c062828b6 | /codebase/CVX_NEW/cvx_clustering.cpp | be072cd06aaa299b194d3e048ba1dadba4d1c68f | [
"BSD-3-Clause"
] | permissive | xinlin192/ConvexLatentVariable | 2605c0bb56fd4cae0ee6c4d98626097db38489ce | d81d2c465796ada22b370e76eaf22065c5823633 | refs/heads/master | 2021-08-27T15:24:00.323233 | 2015-02-06T19:33:19 | 2015-02-06T19:33:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,590 | cpp | #include "cvx_clustering.h"
ofstream ss_out ("../obj_vs_time_dp/iris/CVX-DP-MEDOID");
/* algorithmic options */
#define EXACT_LINE_SEARCH // comment this to use inexact search
/* dumping options */
// #define EXACT_LINE_SEARCH_DUMP
//#define LAMBDA_K_PLOT
const double NOISE_EPS = 0.0;
const double FRANK_WOLFE_TOL = 1e-20;
const double ADMM_EPS = 0.000001;
const double SPARSITY_TOL = 1e-5;
const double r = 10000000.0;
// single column skyline
void skyline (double* wout, double* wbar, int R, double lambda) {
vector< double > alpha_vec (R, 0.0);
int num_alpha_elem = 0;
for (int i = 0; i < R; i ++) {
if (wbar[i] > SPARSITY_TOL) {
alpha_vec.push_back (abs(wbar[i]));
++ num_alpha_elem;
}
}
double max_term = -1e50;
double separator = 0.0;
if (num_alpha_elem == 0) return;
// 2. sorting
std::sort (alpha_vec.begin(), alpha_vec.end(), double_dec_comp);
// 3. find mstar
int mstar = 0; // number of elements support the sky
double new_term, sum_alpha = 0.0;
for (int i = 0; i < num_alpha_elem; i ++) {
sum_alpha += alpha_vec[i];
new_term = (sum_alpha - lambda) / (i + 1.0);
if ( new_term > max_term ) {
separator = alpha_vec[i];
max_term = new_term;
mstar = i;
}
}
if (max_term < 0)
max_term = (sum_alpha - lambda) / R;
for (int i = 0; i < R; i ++) {
// 4. assign closed-form solution to wout
set<int>::iterator it;
if ( max_term < 0 ) {
wout[i] = 0.0;
continue;
}
double wbar_val = wbar[i];
if ( abs(wbar_val) >= separator ) {
wout[i] = max_term;
} else {
// its ranking is above m*, directly inherit the wbar
wout[i] = max(wbar_val,0.0);
}
}
}
void col_BCD_solver (double* d, double ** w, double * y, double* s, int N, double rho, int active_col, double lambda, double & PG) {
double * g = new double [N];
double * w_half = new double [N];
double * w_new = new double [N];
// compute: g_j
for (int i = 0; i < N; i ++) {
g[i] = rho * (s[i] + y[i]/rho - 1) + d[i];
}
// update: W_j = W_j - g_j /rho
for (int i = 0; i < N; i++) {
w_half[i] = w[active_col][i] - g[i] / rho;
}
// compute: w_{t+1} through skyline TODO
skyline(w_new, w_half, N, lambda);
// compute: PG
PG = 0.0;
for (int i = 0; i < N; i++) {
double tmp = w_new[i] - w[active_col][i];
PG += tmp * tmp;
}
// update the s_{t+1}
for (int i = 0; i < N; i++) {
s[i] += w_new[i] - w[active_col][i];
}
// update back to matrix w
for (int i = 0; i < N; i ++) {
w[active_col][i] = w_new[i];
}
delete[] w_new;
delete[] w_half;
delete[] g;
}
double overall_objective (double ** dist_mat, double lambda, int N, double ** z) {
// N is number of entities in "data", and z is N by N.
// z is current valid solution (average of w_1 and w_2)
double sum = 0.0;
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
sum += z[i][j];
// cerr << "sum=" << sum/N << endl;
// STEP ONE: compute
// loss = sum_i sum_j z[i][j] * dist_mat[i][j]
double normSum = 0.0;
for (int i = 0; i < N; i ++) {
for (int j = 0; j < N; j ++) {
normSum += z[i][j] * dist_mat[i][j];
}
}
double loss = (normSum);
cout << "loss=" << loss;
// STEP TWO: compute dummy loss
// sum4 = r dot (1 - sum_k w_nk) -> dummy
double * temp_vec = new double [N];
mat_sum_row (z, temp_vec, N, N);
double dummy_penalty=0.0;
double avg=0.0;
for (int i = 0; i < N; i ++) {
avg += temp_vec[i];
dummy_penalty += r * max(1 - temp_vec[i], 0.0) ;
}
cout << ", dummy= " << dummy_penalty;
// STEP THREE: compute group-lasso regularization
double * maxn = new double [N];
for (int i = 0;i < N; i ++)
maxn[i] = -INF;
for (int i = 0; i < N; i ++) {
for (int j = 0; j < N; j ++) {
if ( fabs(z[i][j]) > maxn[j])
maxn[j] = fabs(z[i][j]);
}
}
double sumk = 0.0;
for (int i = 0; i < N; i ++) {
sumk += lambda*maxn[i];
}
double reg = sumk;
cout << ", reg=" << reg ;
delete[] maxn;
delete[] temp_vec;
double overall = loss + reg + dummy_penalty;
cout << ", overall=" << overall << endl;
return loss + reg;
}
bool is_col_zero (double ** mat, int col_index, int R) {
bool isallzero = true;
for (int i = 0; i < R; i ++) {
if (abs(mat[col_index][i]) > SPARSITY_TOL) {
isallzero = false;
break;
}
}
return isallzero;
}
void cvx_clustering (double ** dist_mat, int D, int N, double lambda, double ** W) {
// parameters
double alpha = 0.2;
double rho = 1;
ss_out << "Time Objective" << endl;
double cputime = 0;
double last_cost = INF;
double prev = omp_get_wtime();
// iterative optimization
double error = INF;
double ** w = mat_init (N, N);
double * s = new double [N];
double * y = new double [N];
for (int i = 0; i < N; i++) {
s[i] = 0.0; // summation of each row
y[i] = 0.0;
}
cerr << "cvx_clustering init" <<endl;
// variables for shriking method
vector<int> active_set(N, 0);
int active_size = active_set.size();
// set initial active_set as all elements
for (int i = 0; i < N; i++)
active_set[i] = i;
cputime += omp_get_wtime() - prev;
ss_out << cputime << " " << 0 << endl;
prev = omp_get_wtime();
int iter = 0;
bool no_active_element = false, admm_opt_reached = false;
double PG, PGmax; // TODO
double INNER_EPS = 0.5;
int max_inner_iter;
int active_size_last = N;
bool greedy = false;
while ( true ) { // stopping criteria
// STEP ONE: greedily or randomly process active column
active_size = N;
random_shuffle (active_set.begin(),active_set.end());
cerr << "shuffled .." << endl;
// STEP TWO: blockwise coordinate descent (BCD)
max_inner_iter = N/active_size_last;
int inner_iter= 0;
while( inner_iter < max_inner_iter ){
PGmax = -1e300;
for(int j=0;j<active_size;j++){
int k = active_set[j]; // column to be solved
col_BCD_solver (dist_mat[k], w, y, s, N, rho, k, lambda, PG);
if( is_col_zero(w, k, N) && PG <= 0.0 ){
active_size--;
// swap(active_set[j], active_set[active_size]);
int tmp = active_set[j];
active_set[j] = active_set[active_size];
active_set[active_size] = tmp;
continue;
}
if ( PG > PGmax ) PGmax = PG;
}
if( PGmax < INNER_EPS )//stopping condition
break;
inner_iter++;
}
active_size_last = active_size;
// TODO: y update
for (int i = 0; i < N; i ++) {
y[i] += rho * (s[i] - 1 );
}
// STEP THREE: trace the objective function
// if (iter < 3 * SS_PERIOD || (iter+1) % SS_PERIOD == 0) {
if (true) {
cputime += (omp_get_wtime() - prev);
error = overall_objective (dist_mat, lambda, N, w);
cout << "[Overall] iter = " << iter
<< ", Loss Error: " << error
<< ", cputime: " << cputime << endl;
// NOTE: here is just for plotting
if (error >= last_cost) error = last_cost;
else last_cost = error;
ss_out << cputime << " " << error << endl;
prev = omp_get_wtime();
}
// STEP FOUR: stopping criteria
iter ++;
}
// STEP FIVE: memory recollection
delete[] y;
delete[] s;
mat_free (w, N, N);
// STEP SIX: put converged solution to destination W
mat_copy (w, W, N, N);
ss_out.close();
}
// entry main function
int main (int argc, char ** argv) {
// exception control: illustrate the usage if get input of wrong format
if (argc < 3) {
cerr << "Usage: cvx_clustering [dataFile] [lambda] " << endl;
cerr << "Note: dataFile must be scaled to [0,1] in advance." << endl;
exit(-1);
}
// parse arguments
char * dataFile = argv[1];
double lambda_base = atof(argv[2]);
// read in data
int FIX_DIM;
Parser parser;
vector<Instance*>* pdata;
vector<Instance*> data;
pdata = parser.parseSVM(dataFile, FIX_DIM);
data = *pdata;
// explore the data
int dimensions = -1;
int N = data.size(); // data size
for (int i = 0; i < N; i++) {
vector< pair<int,double> > * f = &(data[i]->fea);
int last_index = f->size()-1;
if (f->at(last_index).first > dimensions) {
dimensions = f->at(last_index).first;
}
}
assert (dimensions == FIX_DIM);
int D = dimensions;
double lambda = lambda_base;
// pre-compute distance matrix
dist_func df = L2norm;
double ** dist_mat = mat_init (N, N);
compute_dist_mat (data, dist_mat, N, D, df, true);
// add noise
for(int i=0;i<N;i++){
for(int j=0;j<N;j++){
dist_mat[i][j] += NOISE_EPS* ((double)rand() / RAND_MAX);
}
}
ofstream dmat_out ("dist_mat");
dmat_out << mat_toString(dist_mat, N, N);
dmat_out.close();
// double ** dist_mat = mat_read (dmatFile, N, N);
// Run sparse convex clustering
#ifndef LAMBDA_K_PLOT
cerr << "D = " << D << endl; // # features
cerr << "N = " << N << endl; // # instances
cerr << "lambda = " << lambda << endl;
cerr << "r = " << r << endl;
int seed = time(NULL);
srand (seed);
cerr << "seed = " << seed << endl;
cerr << "==================================================" << endl;
double ** W = mat_init (N, N);
cvx_clustering (dist_mat, D, N, lambda, W);
// Output cluster
// output_objective(clustering_objective (dist_mat, W, N));
/* Output cluster centroids */
// output_model (W, N);
/* Output assignment */
// output_assignment (W, data, N);
// output the examplar
// compute the mean and update objective to compare with DP_MEANS
cerr << "==================================================" << endl;
cerr << "Computing the mean of derived group members ..." << endl;
vector<int> centroids;
get_all_centroids(W, ¢roids, N, N);
int nCentroids = centroids.size();
vector< vector<int> > members (nCentroids, vector<int>());
for (int c = 0; c < nCentroids; c++) {
int j = centroids[c];
// cout << "centroid: " << j << endl;
for (int i = 0; i < N; i++) {
if (W[i][j] < 1.01 && W[i][j] > 0.99) {
members[c].push_back(i);
// cout << "member: "<< i << endl;
}
}
}
// compute the means
vector< vector<double> > means (nCentroids, vector<double>(D, 0.0));
for (int c = 0; c < nCentroids; c++) {
int numMembers = members[c].size();
for (int x = 0; x < numMembers; x ++) {
int i = members[c][x];
Instance* ins = data[i];
int fea_size = ins->fea.size();
for (int f = 0; f < fea_size; f++)
means[c][ins->fea[f].first-1] += ins->fea[f].second;
}
for (int f = 0; f < D; f++)
means[c][f] = means[c][f] / numMembers;
}
// compute distance
double means_reg = lambda * nCentroids;
double sum_means_loss = 0.0;
for (int c = 0; c < nCentroids; c++) {
double mean_loss = 0.0;
int numMembers = members[c].size();
Instance* mean_ins = new Instance(c+100000);
for (int f = 0; f < D; f++)
mean_ins->fea.push_back(make_pair(f+1, means[c][f]));
for (int x = 0; x < numMembers; x ++) {
int i = members[c][x];
Instance* ins = data[i];
mean_loss += df(mean_ins, ins, D) * df(mean_ins, ins, D);
}
delete mean_ins;
cerr << "c=" << centroids[c] << ", mean_loss: " << mean_loss << endl;
sum_means_loss += mean_loss;
}
// output distance
cerr << "Total_means_loss: " << sum_means_loss << ", Means_reg: " << means_reg << endl;
cerr << "Total_Error: " << sum_means_loss + means_reg << endl;
mat_free (W, N, N);
#else
// =====================================================
ifstream fin ("lambdas");
vector<double> lambda_list;
vector<double> K_list; // reg / lambda
vector<bool> fraction;
while(!fin.eof()){
double temp;
fin >> temp;
if( fin.eof() )break;
lambda_list.push_back(temp);
}
fin.close();
for (int i = 0; i < lambda_list.size(); i ++) {
double temp_lambda = lambda_list[i];
cerr << "D = " << D << endl; // # features
cerr << "N = " << N << endl; // # instances
cerr << "lambda = " << temp_lambda << endl;
cerr << "r = " << r << endl;
cerr << "Screenshot period = " << screenshot_period << endl;
int seed = time(NULL);
srand (seed);
cerr << "seed = " << seed << endl;
cerr << "==================================================" << endl;
double ** wtemp = mat_init (N, N);
cvx_clustering (dist_mat, fw_max_iter, D, N, temp_lambda, wtemp, ADMM_max_iter, screenshot_period);
vector<int> centroids;
double group_lasso = get_reg (wtemp, N, lambda);
double reg_labmda_ratio = group_lasso/lambda;
K_list.push_back(reg_labmda_ratio);
get_all_centroids (wtemp, ¢roids, N, N);
int nCentroids = centroids.size();
if (reg_labmda_ratio > nCentroids - 1e-2 && reg_labmda_ratio < nCentroids + 1e-2)
fraction.push_back(true);
else
fraction.push_back(false);
mat_free(wtemp, N, N);
}
ofstream lambdaK_out ("lambda_vs_K_dp");
assert (lambda_list.size() == K_list.size());
lambdaK_out << "lambda K fractional" << endl;
for (int i =0 ; i < K_list.size(); i ++)
lambdaK_out << lambda_list[i] << " " << K_list[i]
<< " " << (fraction[i]?1:0) <<endl;
lambdaK_out.close();
// =====================================================
#endif
/* reallocation */
mat_free (dist_mat, N, N);
}
| [
"[email protected]"
] | |
7779c62c16ec35c3ad0009d888be6bdfc37c8ff2 | bd3054e3359fdeb6415ed15d76b4b98c037e2484 | /DelFEM/DelFEM_VCStaticLibrary/src/ls/preconditioner.cpp | 773ec65e3480e4bb7dbff6e3ed36bd365688db05 | [] | no_license | ryujimiya/delfem4net | 0af1619e375161b8f2a4c1c59c53f953e4d875b0 | 43ca8198ea9589d8d4b6141be16196b864c2393e | refs/heads/master | 2020-05-16T06:35:13.394134 | 2018-04-30T01:50:16 | 2018-04-30T01:50:16 | 42,876,545 | 0 | 1 | null | null | null | null | SHIFT_JIS | C++ | false | false | 13,201 | cpp | /*
Copyright (C) 2009 Nobuyuki Umetani [email protected]
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#if defined(__VISUALC__)
#pragma warning( disable : 4786 ) // C4786なんて表示すんな( ゚Д゚)ゴルァ
#endif
#define for if(0); else for
#include <assert.h>
#include <time.h>
#include <stdio.h>
#include "delfem/matvec/matdia_blkcrs.h"
#include "delfem/matvec/matdiafrac_blkcrs.h"
#include "delfem/matvec/matfrac_blkcrs.h"
#include "delfem/matvec/vector_blk.h"
#include "delfem/matvec/solver_mg.h"
#include "delfem/matvec/ordering_blk.h"
#include "delfem/ls/preconditioner.h"
void LsSol::CPreconditioner_ILU::Clear()
{
for(unsigned int i=0;i<m_Matrix_NonDia.size();i++){
for(unsigned int j=0;j<m_Matrix_NonDia[i].size();j++){
if( m_Matrix_NonDia[i][j] != 0 ) delete m_Matrix_NonDia[i][j];
}
m_Matrix_NonDia[i].clear();
}
m_Matrix_NonDia.clear();
////////////////
for(unsigned int i=0;i<m_Matrix_Dia.size();i++){
if( m_Matrix_Dia[i] != 0 ) delete m_Matrix_Dia[i];
}
m_Matrix_Dia.clear();
////////////////
m_alev_input.clear();
m_is_ordering = false;
}
// symbolic factorization
void LsSol::CPreconditioner_ILU::SetLinearSystem(const CLinearSystem& ls)
{
// std::cout << "0 prec : set linsys " << std::endl;
if( m_is_ordering ){
/*
clock_t start,mid,end;
start = clock();
const unsigned int nlss = ls.GetNLinSysSeg();
assert( nlss == 1 );
assert( m_alev_input.size() == 0 || (m_alev_input.size() == 1 && m_alev_input[0].second == -1 ) );
unsigned int lev = 0;
if( m_alev_input.size() == 1 ){
assert( m_alev_input[0].second == -1 );
lev = m_alev_input[0].first;
}
m_order.MakeOrdering_AMD( ls.GetMatrix(0) );
// m_order.MakeOrdering_RCM2( ls.GetMatrix(0) );
// m_order.MakeOrdering_RCM( ls.GetMatrix(0) );
mid = clock();
end = clock();
printf("Ordering:%.4f Pattern:%.4f\n",(double)(mid-start)/CLOCKS_PER_SEC,(double)(end-mid)/CLOCKS_PER_SEC);
*/
m_Matrix_NonDia.resize(1);
m_Matrix_NonDia[0].push_back(0);
m_Matrix_Dia.push_back( new MatVec::CMatDiaFrac_BlkCrs(0,ls.GetMatrix(0),m_order) );
const unsigned int nblk = ls.GetMatrix(0).NBlkMatCol();
const unsigned int nlen = ls.GetMatrix(0).LenBlkCol();
m_vec.Initialize(nblk,nlen);
// std::cout << ls.GetMatrix(0).NBlkMatCol() << " " << ls.GetMatrix(0).NCrs() << " " << m_Matrix_Dia[0]->NCrs() << std::endl;
return;
}
////////////////
// std::cout << "1 prec : set linsys " << std::endl;
const unsigned int nlss = ls.GetNLinSysSeg();
m_Matrix_NonDia.resize(nlss);
for(unsigned int ilss=0;ilss<nlss;ilss++){
m_Matrix_Dia.push_back( new MatVec::CMatDiaFrac_BlkCrs(0,ls.GetMatrix(ilss)) );
for(unsigned int jlss=0;jlss<nlss;jlss++){
if( ilss == jlss || !ls.IsMatrix(ilss,jlss) ){
m_Matrix_NonDia[ilss].push_back(0);
continue;
}
m_Matrix_NonDia[ilss].push_back( new MatVec::CMatFrac_BlkCrs(ls.GetMatrix(ilss,jlss)) );
}
}
if( m_alev_input.size() == 0 && m_afill_blk.empty() ) return; // 指定が何も無ければ0 レベルのフィルイン
// std::cout << "2 prec : set linsys " << std::endl;
std::vector<int> alev;
alev.resize(nlss*nlss,0);
for(unsigned int iin=0;iin<m_alev_input.size();iin++){
const int lev = m_alev_input[iin].first;
const int ilss = m_alev_input[iin].second;
if( ilss == -1 ){
for(unsigned int i=0;i<nlss*nlss;i++){ alev[i] = lev; }
}
else{
for(unsigned int i=0;i<nlss;i++){
alev[i*nlss+ilss] = lev;
alev[ilss*nlss+i] = lev;
}
}
}
{
bool iflag = false;
for(unsigned int i=0;i<nlss*nlss;i++){
if( alev[i] != 0 ) iflag = true;
}
if( !iflag && m_afill_blk.empty() ) return;
}
// std::cout << "3 prec : set linsys " << std::endl;
for(unsigned int ilss=0;ilss<nlss;ilss++){
for(unsigned int jlss=0;jlss<nlss;jlss++){
// std::cout << "add frac ptn" << ilss << " " << jlss << std::endl;
const int lev_ij = alev[ilss*nlss+jlss];
if( ilss == jlss ){
assert( m_Matrix_Dia[ilss] != 0 );
for(unsigned int klss=0;klss<ilss;klss++){
assert( klss < ilss );
if( m_Matrix_NonDia[ilss][klss] == 0 || m_Matrix_NonDia[klss][jlss] == 0) continue;
// std::cout << " add frac ptn low up " << ilss << " " << klss << " " << jlss << std::endl;
m_Matrix_Dia[ilss]->AddFracPtnLowUp(lev_ij,
*m_Matrix_NonDia[ilss][klss], *m_Matrix_NonDia[klss][jlss] );
}
std::cout << " add frac ptn dia " << ilss << " " << ilss << " " << jlss << std::endl;
if( ilss == 0 && m_afill_blk.size() > 0 ){
m_Matrix_Dia[ilss]->AddFracPtn(lev_ij,m_afill_blk);
}
else{
m_Matrix_Dia[ilss]->AddFracPtn(lev_ij);
}
}
else{
const unsigned int kmax = ( ilss < jlss ) ? ilss : jlss;
for(unsigned int klss=0;klss<kmax+1;klss++){
if( klss == ilss && klss < jlss ){
if( m_Matrix_NonDia[ilss][jlss] == 0 ) continue;
// std::cout << " add frac ptn up " << ilss << " " << klss << " " << jlss << std::endl;
m_Matrix_NonDia[ilss][jlss]->AddFracPtnUp( *m_Matrix_Dia[klss], lev_ij);
continue;
}
if( klss == jlss && klss < ilss ){
if( m_Matrix_NonDia[ilss][jlss] == 0 ) continue;
// std::cout << " add frac ptn low " << ilss << " " << klss << " " << jlss << std::endl;
m_Matrix_NonDia[ilss][jlss]->AddFracPtnLow(*m_Matrix_Dia[klss], lev_ij);
continue;
}
if( m_Matrix_NonDia[ilss][klss] == 0 || m_Matrix_NonDia[klss][jlss] == 0 ){ continue; }
if( m_Matrix_NonDia[ilss][jlss] == 0 ){
const MatVec::CVector_Blk& res_i = ls.GetVector(-1,ilss);
const MatVec::CVector_Blk& res_j = ls.GetVector(-1,jlss);
const unsigned int nblk_i = res_i.NBlk();
const unsigned int nblk_j = res_j.NBlk();
if( res_i.Len() >= 0 && res_i.Len() >= 0 ){
// std::cout << "add matrix " << ilss << " " << jlss << std::endl;
m_Matrix_NonDia[ilss][jlss]
= new MatVec::CMatFrac_BlkCrs(nblk_i,res_i.Len(), nblk_j, res_j.Len() );
}
else{
std::cout << "Error!-->Not Implemented" << std::endl;
assert(0);
}
}
// std::cout << " add frac ptn low up" << ilss << " " << klss << " " << jlss << std::endl;
m_Matrix_NonDia[ilss][jlss]
->AddFracPtnLowUp(*m_Matrix_NonDia[ilss][klss], *m_Matrix_NonDia[klss][jlss], lev_ij);
}
}
}
}
// std::cout << "4 prec : set linsys " << std::endl;
for(unsigned int ilss=0;ilss<nlss;ilss++){
assert( m_Matrix_Dia[ilss] != 0 );
m_Matrix_Dia[ilss]->MakePatternFinalize();
for(unsigned int jlss=0;jlss<nlss;jlss++){
if( ilss == jlss ){ continue; }
if( m_Matrix_NonDia[ilss][jlss] == 0 ) continue;
// std::cout << "Pattern finalize " << ilss << " " << jlss << std::endl;
m_Matrix_NonDia[ilss][jlss]->MakePatternFinalize();
}
}
// std::cout << "5 prec : set linsys " << std::endl;
// std::cout << "End Finalize Pattern " << std::endl;
}
// numerical factorization
// 値を設定してILU分解を行う関数
// ILU分解が成功しているかどうかはもっと詳細なデータを返したい
bool LsSol::CPreconditioner_ILU::SetValue(const LsSol::CLinearSystem& ls)
{
// std::cout << "0 prec : set linsys " << std::endl;
// std::cout << "SetValue and LU decompose " << std::endl;
const unsigned int nlss = ls.GetNLinSysSeg();
if( m_is_ordering ){
assert( nlss == 1 );
m_Matrix_Dia[0]->SetValue_Initialize( ls.GetMatrix(0), m_order );
if( !m_Matrix_Dia[0]->DoILUDecomp() ){ return false; }
return true;
}
////////////////
// 値をコピー
for(unsigned int ilss=0;ilss<nlss;ilss++){
// std::cout << " 0SetValue Dia : " << ilss << std::endl;
assert( m_Matrix_Dia[ilss] != 0 );
m_Matrix_Dia[ilss]->SetValue_Initialize( ls.GetMatrix(ilss) );
// std::cout << " 1SetValue Dia : " << ilss << std::endl;
for(unsigned int jlss=0;jlss<nlss;jlss++){
if( ilss == jlss ){ continue; }
if( !ls.IsMatrix(ilss,jlss) && m_Matrix_NonDia[ilss][jlss] != 0 ){
m_Matrix_NonDia[ilss][jlss] -> SetZero();
continue;
}
if( !ls.IsMatrix(ilss,jlss) ) continue;
// std::cout << " 0Set Value : " << ilss << " " << jlss << std::endl;
m_Matrix_NonDia[ilss][jlss]->SetValue_Initialize( ls.GetMatrix(ilss,jlss) );
// std::cout << " 1Set Value : " << ilss << " " << jlss << std::endl;
}
}
// std::cout << "1 prec : set linsys " << std::endl;
////////////////
// ILU分解
for(unsigned int ilss=0;ilss<nlss;ilss++){
for(unsigned int jlss=0;jlss<nlss;jlss++){
if( ilss == jlss ){
for(unsigned int klss=0;klss<ilss;klss++){
if( m_Matrix_NonDia[ilss][klss] && m_Matrix_NonDia[klss][ilss] ){
// std::cout << "ILU Frac Dia LowUp:" << ilss << " " << klss << " " << ilss << std::endl;
if( !m_Matrix_Dia[ilss]->DoILUDecompLowUp(
*m_Matrix_NonDia[ilss][klss],
*m_Matrix_NonDia[klss][ilss] ) ){ return false; }
}
}
// std::cout << "ILU Frac Dia:" << ilss << std::endl;
if( !m_Matrix_Dia[ilss]->DoILUDecomp() ){
std::cout << "ilu frac false 33 matrix non-ordered" << std::endl;
return false;
}
}
else{
if( m_Matrix_NonDia[ilss][jlss] == 0 ) continue;
const unsigned int kmax = ( ilss < jlss ) ? ilss : jlss;
for(unsigned int klss=0;klss<kmax+1;klss++){
if( klss == ilss && klss < jlss ){
// std::cout << "ILU Frac Up:" << ilss << " " << klss << " " << jlss << std::endl;
if( !m_Matrix_NonDia[ilss][jlss]->DoILUDecompUp( *m_Matrix_Dia[ilss] ) ){ return false; }
continue;
}
if( klss == jlss && klss < ilss ){
// std::cout << "ILU Frac Low:" << ilss << " " << klss << " " << jlss << std::endl;
if( !m_Matrix_NonDia[ilss][jlss]->DoILUDecompLow( *m_Matrix_Dia[jlss] ) ){ return false; }
continue;
}
if( m_Matrix_NonDia[ilss][klss] == 0 || m_Matrix_NonDia[klss][jlss] == 0 ){ continue; }
assert( klss < ilss );
assert( klss < jlss );
// std::cout << "ILU Frac LowUp:" << ilss << " " << klss << " " << jlss << std::endl;
if( !m_Matrix_NonDia[ilss][jlss]->DoILUDecompLowUp(
*m_Matrix_NonDia[ilss][klss],
*m_Matrix_NonDia[klss][jlss] ) ){ return false; }
}
}
}
}
return true;
}
// Solve Preconditioning System
bool LsSol::CPreconditioner_ILU::SolvePrecond(LsSol::CLinearSystem& ls, unsigned int iv)
{
const unsigned int nlss = ls.GetNLinSysSeg();
if( m_is_ordering ){
assert( nlss == 1 );
m_order.OrderingVector_OldToNew(m_vec,ls.GetVector(iv,0));
m_Matrix_Dia[0]->ForwardSubstitution( m_vec);
m_Matrix_Dia[0]->BackwardSubstitution(m_vec);
m_order.OrderingVector_NewToOld(ls.GetVector(iv,0),m_vec);
return true;
}
////////////////
// Forward Substitution
for(unsigned int ilss=0;ilss<nlss;ilss++){
for(unsigned int jlss=0;jlss<ilss;jlss++){
if( !m_Matrix_NonDia[ilss][jlss] ){ continue; }
m_Matrix_NonDia[ilss][jlss]->MatVec(
-1.0,ls.GetVector(iv,jlss),1.0,ls.GetVector(iv,ilss),true);
}
m_Matrix_Dia[ilss]->ForwardSubstitution(ls.GetVector(iv,ilss));
}
// Backward Substitution
for(int ilss=(int)nlss-1;ilss>=0;ilss--){
for(unsigned int jlss=ilss+1;jlss<nlss;jlss++){
if( !m_Matrix_NonDia[ilss][jlss] ){ continue; }
m_Matrix_NonDia[ilss][jlss]->MatVec(
-1.0,ls.GetVector(iv,jlss),1.0,ls.GetVector(iv,ilss),true);
}
m_Matrix_Dia[ilss]->BackwardSubstitution(ls.GetVector(iv,ilss));
}
return true;
}
| [
"[email protected]"
] | |
5c852cecab856003d2527175d842d1b8ea862605 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2749486_0/C++/tough/b.cpp | 85106a314630d2e3c0ae25f6d9d23a9c0a660cdf | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 405 | cpp | #include <cmath>
#include <string>
#include <iostream>
using namespace std;
int main(){
int t;
cin >> t;
int x,y;
int ca= 0;
char ew,sn;
while(t--){
string s;
ca ++ ;
cin >> x >> y;
for(int i = 0 ;i < abs(x) ;i++){
if(x>0)
s+="WE";
else
s+="EW";
}
for(int i = 0 ;i < abs(y);i++){
if(y>0)
s+="SN";
else
s+="NS";
}
cout<<"Case #"<<ca<<": "<<s<<endl;
}
}
| [
"[email protected]"
] | |
7f6e4a29172230ede89278a95593d99f41cd4f1d | 52ce3c5df1ea64d88f7919116a0a50ef43d5483f | /Qualification/reversort-engineering.cpp | 33a0ec44540b386ba034227eb35c71cdd7059aec | [] | no_license | jnobre/Google-Code-Jam-2021 | 0197e5fbeb485022f8f6400e765d213ac8cdaa7a | d0f5e861c1e7518a6eeec7deeb59b97430a95db3 | refs/heads/main | 2023-07-04T01:44:05.799249 | 2021-08-21T15:03:28 | 2021-08-21T15:03:28 | 394,055,818 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 703 | cpp | #include <algorithm>
#include <cstdio>
#include <numeric>
#define MAXN 100
using namespace std;
int l[MAXN], pcost[MAXN];
int main() {
int t;
scanf("%d\n", &t);
for(int tc = 1; tc <= t; tc++) {
int n, c;
scanf("%d %d\n", &n, &c);
if(c < n - 1 || c > (n - 1) * (n + 2) / 2) {
printf("Case #%d: IMPOSSIBLE\n", tc);
continue;
}
for(int i = 0; i < n - 1; i++) {
c -= pcost[i] = min(c - (n - 2 - i), n - i);
}
iota(l, l + n, 1);
for(int i = n - 2; i >= 0; i--) {
reverse(l + i, l + i + pcost[i]);
}
printf("Case #%d:", tc);
for(int i = 0; i < n; i++) {
printf(" %d", l[i]);
}
printf("\n");
}
return 0;
} | [
"[email protected]"
] | |
3ea540614f2675ffcf7d6303d661964189b4eca4 | 7391feeb5b8e31f982422bdd74517e954d8c955e | /Net/testsuite/src/HTTPCookieTest.h | adc07e6b2cb6ae07c55502a33bc605c937c941eb | [
"BSL-1.0"
] | permissive | AppAnywhere/agent-sdk | 62d762d0424fc2e8d4a98b79fb150e635adedd4d | c5495c4a1d892f2d3bca5b82a7436db7d8adff71 | refs/heads/master | 2021-01-11T15:22:01.406793 | 2016-09-01T16:36:20 | 2016-09-01T16:36:20 | 80,341,203 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 823 | h | //
// HTTPCookieTest.h
//
// $Id: //poco/1.7/Net/testsuite/src/HTTPCookieTest.h#1 $
//
// Definition of the HTTPCookieTest class.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef HTTPCookieTest_INCLUDED
#define HTTPCookieTest_INCLUDED
#include "Poco/Net/Net.h"
#include "Poco/DateTime.h"
#include "CppUnit/TestCase.h"
class HTTPCookieTest: public CppUnit::TestCase
{
public:
HTTPCookieTest(const std::string& name);
~HTTPCookieTest();
void testCookie();
void testEscape();
void testUnescape();
void testExpiryFuture();
void testExpiryPast();
void testCookieExpiry(Poco::DateTime expiryTime);
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // HTTPCookieTest_INCLUDED
| [
"[email protected]"
] | |
4cfba9c9e6910e9c87b196be1a19c2fc11690163 | 80f4842c6df51199c8ae676578a9e7fd2dc6ed12 | /CONTAIN/PainWall.h | 5ee5e6321be7a340e5adc221091f909a89454643 | [] | no_license | john6/CONTAIN | 79e3677841740b386f5bfb847d790456b4be68b1 | dc90e7073f44df14e6e053ff1ca67d4f682f4b94 | refs/heads/master | 2021-05-19T00:24:34.450893 | 2021-01-04T21:21:49 | 2021-01-04T21:21:49 | 251,491,588 | 1 | 2 | null | 2020-11-03T04:19:04 | 2020-03-31T03:31:34 | C++ | UTF-8 | C++ | false | false | 314 | h | #pragma once
#include "Entity.h"
class PainWall :
public Entity
{
private:
bool colorState;
sf::Color colorA;
sf::Color colorB;
hiRes_time_point lastColorSwitch;
float colorSwitchRate;
public:
void Update(float i_stepSize) override;
PainWall(Vector2f i_startPosition, RigidBody i_rb);
~PainWall();
};
| [
"[email protected]"
] | |
8f8bf4cb6bbf28b42ec85e5afb907aa8bd39fe39 | 0006f89c8d952bcf14a6150e9c26c94e47fab040 | /src/trace/DXInterceptor/dxplugin/DXIntPluginLoaded.h | 2c0d973f1f4e710267b726ce5f2a1785d9abfd12 | [
"BSD-3-Clause"
] | permissive | cooperyuan/attila | eceb5d34b8c64c53ffcc52cd96b684d4f88b706f | 29a0ceab793b566c09cf81af26263e4855842c7a | refs/heads/master | 2016-09-05T18:55:56.472248 | 2013-06-29T14:42:02 | 2013-06-29T14:42:02 | 10,222,034 | 8 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,446 | h | ////////////////////////////////////////////////////////////////////////////////
#pragma once
////////////////////////////////////////////////////////////////////////////////
#include "DXIntPlugin.h"
////////////////////////////////////////////////////////////////////////////////
namespace dxplugin
{
class DXIntPluginLoaded
{
public:
DXIntPluginLoaded(const std::string& filename, HMODULE dllHandle, unsigned int version, const std::string& name);
DXIntPluginLoaded(const DXIntPluginLoaded& plugin);
virtual ~DXIntPluginLoaded();
DXIntPluginLoaded& operator = (const DXIntPluginLoaded& plugin);
const std::string& GetFileName() const;
HMODULE GetDllHandle() const;
unsigned int GetVersion() const;
const std::string& GetName() const;
unsigned int GetCounterCount() const;
bool GetCounter(unsigned int position, DXINTCOUNTERINFO* counter) const;
unsigned int AddCounter(DXINTCOUNTERINFO counter);
bool CounterExists(DXINTCOUNTERID counterID) const;
bool CounterFind(DXINTCOUNTERID counterID, DXINTCOUNTERINFO* counter) const;
protected:
std::string m_filename;
HMODULE m_dllHandle;
unsigned int m_version;
std::string m_name;
std::vector<DXINTCOUNTERINFO> m_counters;
static void CloneObjects(const DXIntPluginLoaded& orig, DXIntPluginLoaded& dest);
};
}
////////////////////////////////////////////////////////////////////////////////
| [
"[email protected]"
] | |
77d83dd7e681e34449845f4f98cffc244eb94d49 | 7f6d2df4f97ee88d8614881b5fa0e30d51617e61 | /孙宝泉/第5次作业/student.h | 68fec5b82002a501491ad17086f7eebabde7a8ec | [] | no_license | tsingke/Homework_Turing | 79d36b18692ec48b1b65cfb83fc21abf87fd53b0 | aa077a2ca830cdf14f4a0fd55e61822a4f99f01d | refs/heads/master | 2021-10-10T02:03:53.951212 | 2019-01-06T07:44:20 | 2019-01-06T07:44:20 | 148,451,853 | 15 | 25 | null | 2018-10-17T15:20:24 | 2018-09-12T09:01:50 | C++ | UTF-8 | C++ | false | false | 505 | h | #define _CRT_SECURE_NO_WARNINGS
#ifndef _STUDENT
#define _STUDENT
#include<iostream>
#include<string>
using namespace std;
#define SIZE 80
class Student
{
public:
Student();
Student(char* na, char* id, char* num, char* spec, int ag);
Student(const Student &per);
~Student();
char* getName();
char* getID();
char* getNumber();
char* getSpec();
int getAge();
void display();
void input();
private:
char* name;
char ID[19];
char number[10];
char speciality[20];
int age;
};
#endif
| [
"[email protected]"
] | |
0fc22b70c5402b1aac2fd67193aa728250bde538 | c69118b46cdc2b7b6560debbeb8f8a67a9693ce9 | /Onyx/src/buffers/VBO.hpp | 5c77b78759c90ce7d03f70d5631a1bee8d9357c5 | [] | no_license | MrShedman/Onyx | 50c9f6fb2cd71ed97ba57e50307d6449483a6ca9 | 7cdab90ecf52eca7d7a528bc5b8e0b9af29825c1 | refs/heads/master | 2021-04-26T23:38:33.653141 | 2018-03-04T21:14:33 | 2018-03-04T21:14:33 | 123,829,588 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 471 | hpp | #pragma once
#include "GL\glew.h"
//#include "ErrorCheck.hpp"
#define check_gl_error
class VBO
{
public:
VBO(GLenum target, GLenum usage);
~VBO();
VBO(const VBO& other) = delete;
VBO operator = (const VBO&) = delete;
VBO(VBO&& other);
VBO& operator=(VBO&& other);
GLuint name() const;
void bind() const;
void unbind() const;
void data(GLsizeiptr data_size, const GLvoid* data_ptr);
private:
GLenum m_target;
GLenum m_usage;
GLuint m_name;
}; | [
"[email protected]"
] | |
0cf1381e35fb9080c3e6ed1ab8a3c21c2f60d59d | fbc8bbdf2fcafbbcf06ea87aac99aad103dfc773 | /VTK/Rendering/OpenGL2/vtkDepthPeelingPass.h | ad4d3aad03bd9cb0e3577daebc80b278b0aed67f | [
"BSD-3-Clause"
] | permissive | vildenst/In_Silico_Heart_Models | a6d3449479f2ae1226796ca8ae9c8315966c231e | dab84821e678f98cdd702620a3f0952699eace7c | refs/heads/master | 2020-12-02T20:50:19.721226 | 2017-07-24T17:27:45 | 2017-07-24T17:27:45 | 96,219,496 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,639 | h | /*=========================================================================
Program: Visualization Toolkit
Module: vtkDepthPeelingPass.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkDepthPeelingPass
* @brief Implement an Order Independent Transparency
* render pass.
*
*
* Note that this implementation is only used as a fallback for drivers that
* don't support floating point textures. Most renderings will use the subclass
* vtkDualDepthPeelingPass instead.
*
* Render the translucent polygonal geometry of a scene without sorting
* polygons in the view direction.
*
* This pass expects an initialized depth buffer and color buffer.
* Initialized buffers means they have been cleared with farest z-value and
* background color/gradient/transparent color.
* An opaque pass may have been performed right after the initialization.
*
* The depth peeling algorithm works by rendering the translucent polygonal
* geometry multiple times (once for each peel). The actually rendering of
* the translucent polygonal geometry is performed by its delegate
* TranslucentPass. This delegate is therefore used multiple times.
*
* Its delegate is usually set to a vtkTranslucentPass.
*
* @sa
* vtkRenderPass, vtkTranslucentPass
*/
#ifndef vtkDepthPeelingPass_h
#define vtkDepthPeelingPass_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkOpenGLRenderPass.h"
#include <vector> // STL Header
class vtkTextureObject;
class vtkOpenGLRenderWindow;
class vtkOpenGLHelper;
class VTKRENDERINGOPENGL2_EXPORT vtkDepthPeelingPass
: public vtkOpenGLRenderPass
{
public:
static vtkDepthPeelingPass *New();
vtkTypeMacro(vtkDepthPeelingPass,vtkOpenGLRenderPass);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Perform rendering according to a render state \p s.
* \pre s_exists: s!=0
*/
void Render(const vtkRenderState *s) VTK_OVERRIDE;
/**
* Release graphics resources and ask components to release their own
* resources.
* \pre w_exists: w!=0
*/
void ReleaseGraphicsResources(vtkWindow *w) VTK_OVERRIDE;
//@{
/**
* Delegate for rendering the translucent polygonal geometry.
* If it is NULL, nothing will be rendered and a warning will be emitted.
* It is usually set to a vtkTranslucentPass.
* Initial value is a NULL pointer.
*/
vtkGetObjectMacro(TranslucentPass,vtkRenderPass);
virtual void SetTranslucentPass(vtkRenderPass *translucentPass);
//@}
//@{
/**
* In case of use of depth peeling technique for rendering translucent
* material, define the threshold under which the algorithm stops to
* iterate over peel layers. This is the ratio of the number of pixels
* that have been touched by the last layer over the total number of pixels
* of the viewport area.
* Initial value is 0.0, meaning rendering have to be exact. Greater values
* may speed-up the rendering with small impact on the quality.
*/
vtkSetClampMacro(OcclusionRatio,double,0.0,0.5);
vtkGetMacro(OcclusionRatio,double);
//@}
//@{
/**
* In case of depth peeling, define the maximum number of peeling layers.
* Initial value is 4. A special value of 0 means no maximum limit.
* It has to be a positive value.
*/
vtkSetMacro(MaximumNumberOfPeels,int);
vtkGetMacro(MaximumNumberOfPeels,int);
//@}
/**
* Is rendering at translucent geometry stage using depth peeling and
* rendering a layer other than the first one? (Boolean value)
* If so, the uniform variables UseTexture and Texture can be set.
* (Used by vtkOpenGLProperty or vtkOpenGLTexture)
* int GetDepthPeelingHigherLayer();
*/
// vtkOpenGLRenderPass virtuals:
bool PostReplaceShaderValues(std::string &vertexShader,
std::string &geometryShader,
std::string &fragmentShader,
vtkAbstractMapper *mapper,
vtkProp *prop) VTK_OVERRIDE;
bool SetShaderParameters(vtkShaderProgram *program,
vtkAbstractMapper *mapper, vtkProp *prop,
vtkOpenGLVertexArrayObject* VAO = NULL) VTK_OVERRIDE;
protected:
/**
* Default constructor. TranslucentPass is set to NULL.
*/
vtkDepthPeelingPass();
/**
* Destructor.
*/
~vtkDepthPeelingPass() VTK_OVERRIDE;
vtkRenderPass *TranslucentPass;
vtkTimeStamp CheckTime;
//@{
/**
* Cache viewport values for depth peeling.
*/
int ViewportX;
int ViewportY;
int ViewportWidth;
int ViewportHeight;
//@}
/**
* In case of use of depth peeling technique for rendering translucent
* material, define the threshold under which the algorithm stops to
* iterate over peel layers. This is the ratio of the number of pixels
* that have been touched by the last layer over the total number of pixels
* of the viewport area.
* Initial value is 0.0, meaning rendering have to be exact. Greater values
* may speed-up the rendering with small impact on the quality.
*/
double OcclusionRatio;
/**
* In case of depth peeling, define the maximum number of peeling layers.
* Initial value is 4. A special value of 0 means no maximum limit.
* It has to be a positive value.
*/
int MaximumNumberOfPeels;
// Is rendering at translucent geometry stage using depth peeling and
// rendering a layer other than the first one? (Boolean value)
// If so, the uniform variables UseTexture and Texture can be set.
// (Used by vtkOpenGLProperty or vtkOpenGLTexture)
int DepthPeelingHigherLayer;
vtkOpenGLHelper *FinalBlendProgram;
vtkOpenGLHelper *IntermediateBlendProgram;
vtkTextureObject *OpaqueZTexture;
vtkTextureObject *OpaqueRGBATexture;
vtkTextureObject *TranslucentRGBATexture;
vtkTextureObject *TranslucentZTexture;
vtkTextureObject *CurrentRGBATexture;
std::vector<float> *DepthZData;
void BlendIntermediatePeels(vtkOpenGLRenderWindow *renWin, bool);
void BlendFinalPeel(vtkOpenGLRenderWindow *renWin);
private:
vtkDepthPeelingPass(const vtkDepthPeelingPass&) VTK_DELETE_FUNCTION;
void operator=(const vtkDepthPeelingPass&) VTK_DELETE_FUNCTION;
};
#endif
| [
"vilde@Vildes-MBP"
] | vilde@Vildes-MBP |
333a10a96287986499fe9e47f7b5113083936650 | 9a646821b5a9cda524de716caf4225a733527876 | /Artem/Task 2 Matrix/Task 2 Matrix/TestMatrix.cpp | 5b7ca55317a3be765a16dc6350a10e714a9fea15 | [] | no_license | SemyonBevzuk/Programming_practice_381908-1-2 | 5cc584508de1ef2871cffad20b293d33b7a41609 | d09de61f3ea11cbc792ba117e0e3ca0171e32310 | refs/heads/master | 2021-01-01T14:47:13.137338 | 2020-06-02T12:36:11 | 2020-06-02T12:36:11 | 239,323,892 | 0 | 19 | null | 2020-06-02T12:36:12 | 2020-02-09T15:08:11 | C++ | UTF-8 | C++ | false | false | 959 | cpp | #include"Matrix.h"
using namespace std;
int main()
{
Matrix matr1, matr2(2, 1), matr3(matr2), matr4(3), matr5(3, 1), matr6(3, 3);
ifstream fin;
ofstream fout;
fin.open("MatrIn.txt");
fout.open("MatrixResult.txt");
matr3 = matr1 + matr2;
fout << "The result of adding two matrixes together:" << endl;
fout << matr3;
fout << "The fourth matrix:" << endl;
fin >> matr4;
fin.close();
fout << matr4;
matr4 = matr4.Transpose();
fout << "The transposed matrix" << endl;
fout << matr4;
matr4 = matr4 * matr5;
fout << "The result of multiplication of two matrixes:" << endl;
fout << matr4;
matr5 = matr6;
fout << "The fifth matrix:" << endl;
fout << matr5;
if (matr3.IsDagonalDominance())
fout << "The matrix has diagonal dominance" << endl;
else
fout << "The matrix does not have diagonal domination" << endl;
fout << "The result of multiplication by a number:" << endl;
matr4 = matr4 * 2;
fout << matr4;
fout.close();
return 0;
} | [
"[email protected]"
] | |
ef06d6d0effb581c180689639271adb9fdf8b7fa | 6bb86693b655f77784ceec252b08cb98ab7832d0 | /spoj/basic/test.cpp | 48a03c606af5b3c0809da400fc52f35af343563b | [] | no_license | rahulroshan96/placement | 52d80fc800608068303096a2f5bee7c7d8a5251c | 8d63f9e68cd510972300bab54e1e2a84d818a2df | refs/heads/master | 2020-04-12T09:37:26.388815 | 2018-11-24T07:10:02 | 2018-11-24T07:10:02 | 43,913,700 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 100 | cpp | #include <iosteam>
#include <vector>
using namespace std;
int main()
{
cout<<"Hello";
return 0;
}
| [
"[email protected]"
] | |
7c23227d2594413f58b2b3a3b8b66deb52bf0500 | 44a35c2b86a42b2b593089fd334f8e8f20b14a81 | /Phonebook/PersonsView.cpp | 0f1391f424432e7fa0f94d5e200c10e8e0f8a007 | [] | no_license | mironikolov/Phonebook | ea15d0f97af5cb2a370f89573b1f4a61f201e2a6 | d71c8f0a542a7cff831999dffe30c1abd7c373a7 | refs/heads/master | 2020-08-13T00:35:54.804724 | 2020-02-13T14:04:23 | 2020-02-13T14:04:23 | 214,875,301 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,194 | cpp | // PersonsView.cpp : implementation of the CPersonsView class
//
#include "stdafx.h"
// SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail
// and search filter handlers and allows sharing of document code with that project.
#ifndef SHARED_HANDLERS
#include "Phonebook.h"
#endif
#include "PersonsView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#define PERSONS_NAME _T( "Име" )
#define PERSONS_SURNAME _T( "Презиме" )
#define PERSONS_LAST_NAME _T( "Фамилия" )
#define PERSONS_UCN _T( "ЕГН" )
#define PERSONS_CITY _T( "Град" )
#define PERSONS_ADDRESS _T( "Адрес" )
#define LIST_COLUMN_WIDTH 300
// CCitiesView
IMPLEMENT_DYNCREATE(CPersonsView, CListView)
BEGIN_MESSAGE_MAP( CPersonsView, CListView )
// Standard printing commands
ON_COMMAND( ID_FILE_PRINT, &CListView::OnFilePrint )
ON_COMMAND( ID_FILE_PRINT_DIRECT, &CListView::OnFilePrint )
ON_COMMAND( ID_FILE_PRINT_PREVIEW, &CListView::OnFilePrintPreview )
ON_COMMAND( ID_MENU_MODIFY, &CPersonsView::OnMenuModify )
ON_COMMAND( ID_MENU_INSERT, &CPersonsView::OnMenuInsert )
ON_COMMAND( ID_MENU_DELETE, &CPersonsView::OnMenuDelete )
ON_COMMAND( ID_MENU_VIEW, &CPersonsView::OpenListCtrlRecord )
ON_WM_CONTEXTMENU()
ON_NOTIFY_REFLECT( LVN_ITEMACTIVATE, &CPersonsView::OnLvnItemActivate )
ON_NOTIFY_REFLECT(LVN_COLUMNCLICK, &CPersonsView::OnLvnColumnclick)
END_MESSAGE_MAP()
// CCitiesView construction/destruction
CPersonsView::CPersonsView() noexcept
{
}
CPersonsView::~CPersonsView()
{
}
// Methods
// ----------------
BOOL CPersonsView::PreCreateWindow(CREATESTRUCT& cs)
{
return CListView::PreCreateWindow(cs);
}
void CPersonsView::SetRowText(const PERSONS& recPerson, UpdateViewHint eUpdateViewHint)
{
CListCtrl& oListCtrl = GetListCtrl();
int nItemCount = -1;
if (eUpdateViewHint == ViewInsert)
{
nItemCount = oListCtrl.GetItemCount();
oListCtrl.InsertItem( nItemCount, _T(""), NULL );
oListCtrl.SetItemData( nItemCount, recPerson.lID );
}
else
nItemCount = GetItemIndex( recPerson );
if ( nItemCount == -1 )
return;
oListCtrl.SetItemText( nItemCount, ColumnPersonsName, recPerson.szName );
oListCtrl.SetItemText( nItemCount, ColumnPersonsSurname, recPerson.szSurname );
oListCtrl.SetItemText( nItemCount, ColumnPersonsLastName, recPerson.szLastName );
oListCtrl.SetItemText( nItemCount, ColumnPersonsUCN, recPerson.szUCN );
oListCtrl.SetItemText( nItemCount, ColumnPersonsAddress, recPerson.szAddress );
CITIES* pCity = nullptr;
if(!GetDocument()->GetCitiesMap().Lookup( recPerson.lCityID, pCity ))
return;
if ( pCity == nullptr )
return;
oListCtrl.SetItemText( nItemCount, ColumnPersonsCity, pCity->szName );
}
void CPersonsView::InsertViewColumns()
{
CListCtrl& oListCtrl = GetListCtrl();
oListCtrl.InsertColumn( ColumnPersonsName, PERSONS_NAME, LVCFMT_LEFT, LIST_COLUMN_WIDTH );
oListCtrl.InsertColumn( ColumnPersonsSurname, PERSONS_SURNAME, LVCFMT_LEFT, LIST_COLUMN_WIDTH );
oListCtrl.InsertColumn( ColumnPersonsLastName, PERSONS_LAST_NAME, LVCFMT_LEFT, LIST_COLUMN_WIDTH );
oListCtrl.InsertColumn( ColumnPersonsUCN, PERSONS_UCN, LVCFMT_LEFT, LIST_COLUMN_WIDTH );
oListCtrl.InsertColumn( ColumnPersonsCity, PERSONS_CITY, LVCFMT_LEFT, LIST_COLUMN_WIDTH );
oListCtrl.InsertColumn( ColumnPersonsAddress, PERSONS_ADDRESS, LVCFMT_LEFT, LIST_COLUMN_WIDTH );
}
void CPersonsView::FillListCtrl()
{
const CPersonsArray& oPersonsArray = GetDocument()->GetPersonsArray();
for (int i = 0; i < oPersonsArray.GetCount(); i++)
{
PERSONS* pPerson = oPersonsArray.GetAt(i);
if (!pPerson)
return;
SetRowText(*pPerson, ViewInsert);
}
}
void CPersonsView::OnDraw(CDC* /*pDC*/)
{
CPersonsDocument* pDoc = GetDocument();
ASSERT_VALID(pDoc);
}
void CPersonsView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
ModifyListControlStyles();
InsertViewColumns();
FillListCtrl();
}
// CCitiesView printing
BOOL CPersonsView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CPersonsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
}
void CPersonsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
}
// CCitiesView diagnostics
#ifdef _DEBUG
void CPersonsView::AssertValid() const
{
CListView::AssertValid();
}
void CPersonsView::Dump(CDumpContext& dc) const
{
CListView::Dump(dc);
}
CPersonsDocument* CPersonsView::GetDocument() const // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPersonsDocument)));
return (CPersonsDocument*)m_pDocument;
}
#endif //_DEBUG
// CCitiesView message handlers
void CPersonsView::OnContextMenu(CWnd* pWnd, CPoint point)
{
CMenu oMainMenu;
oMainMenu.LoadMenuW(IDR_CONTEXTMENU);
CMenu* pSubMenu = oMainMenu.GetSubMenu(0);
if (!pSubMenu)
return;
CListCtrl& oListCtrl = GetListCtrl();
int nIndex = GetSelectedItemIndex();
if ( nIndex == -1 )
{
oMainMenu.EnableMenuItem( ID_MENU_MODIFY, MF_GRAYED );
oMainMenu.EnableMenuItem( ID_MENU_VIEW, MF_GRAYED );
oMainMenu.EnableMenuItem( ID_MENU_DELETE, MF_GRAYED );
}
(*pSubMenu).TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
}
void CPersonsView::OpenListCtrlRecord()
{
CListCtrl& oListCtrl = GetListCtrl();
int nIndex = GetSelectedItemIndex();
if (nIndex == -1)
return;
long lID = (long)oListCtrl.GetItemData( nIndex );
CPersonWithNumbers oPersonWithNumbers;
if ( !GetDocument()->SelectWhereID( lID, oPersonWithNumbers ) )
return;
const CPhoneTypesMap& oPhoneTypesMap = GetDocument()->GetPhoneTypesMap();
CPersonsDlg oPersonsDlg( oPersonWithNumbers, GetDocument()->GetCitiesMap(), oPhoneTypesMap, DialogModeView);
oPersonsDlg.DoModal();
}
void CPersonsView::OnMenuModify()
{
CListCtrl& oListCtrl = GetListCtrl();
int nIndex = GetSelectedItemIndex();
if ( nIndex == -1 )
return;
long lID = (long)oListCtrl.GetItemData( nIndex );
CPersonWithNumbers oPersonWithNumbers;
if ( !GetDocument()->SelectWhereID( lID, oPersonWithNumbers ) )
return;
const CCitiesMap& oCitiesMap = GetDocument()->GetCitiesMap();
const CPhoneTypesMap& oPhoneTypesMap = GetDocument()->GetPhoneTypesMap();
CPersonsDlg oPersonsDlg( oPersonWithNumbers, oCitiesMap, oPhoneTypesMap, DialogModeModify);
if (oPersonsDlg .DoModal() != IDOK )
return;
if (!GetDocument()->UpdateWhereID( oPersonWithNumbers.GetPerson().lID, oPersonWithNumbers))
return;
}
void CPersonsView::OnMenuInsert()
{
CPersonWithNumbers oPersonWithNumbers;
const CPhoneTypesMap& oPhoneTypesMap = GetDocument()->GetPhoneTypesMap();
const CCitiesMap& oCitiesMap = GetDocument()->GetCitiesMap();
CPersonsDlg oPersonsDlg( oPersonWithNumbers, oCitiesMap, oPhoneTypesMap, DialogModeInsert);
if ( oPersonsDlg.DoModal() != IDOK )
return;
if (!GetDocument()->Insert( oPersonWithNumbers ))
return;
}
void CPersonsView::OnMenuDelete()
{
int nMessage = MessageBox(_T("Сигурни ли сте, че искате да изтриете този запис?"), NULL, MB_YESNO);
if (nMessage != IDYES)
return;
CListCtrl& oListCtrl = GetListCtrl();
int nIndex = GetSelectedItemIndex();
if ( nIndex == -1 )
return;
long lID = (long)oListCtrl.GetItemData( nIndex );
if (!GetDocument()->DeleteWhereID(lID))
return;
}
int CPersonsView::GetItemIndex(const PERSONS& recPerson)
{
CListCtrl& oListCtrl = GetListCtrl();
for (int i = 0; i < oListCtrl.GetItemCount(); i++)
{
if (recPerson.lID == oListCtrl.GetItemData(i))
{
return i;
}
}
return -1;
}
int CPersonsView::GetSelectedItemIndex()
{
CListCtrl& oListCtrl = GetListCtrl();
POSITION oPos = oListCtrl.GetFirstSelectedItemPosition();
int nIndex = oListCtrl.GetNextSelectedItem(oPos);
return nIndex;
}
void CPersonsView::ModifyListControlStyles()
{
CListCtrl& oListCtrl = GetListCtrl();
oListCtrl.ModifyStyle(0, LVS_REPORT | LVS_SINGLESEL);
oListCtrl.SetExtendedStyle(LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT );
}
void CPersonsView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
CListCtrl& oListCtrl = GetListCtrl();
CPersonWithNumbers* pUpdateHint = static_cast<CPersonWithNumbers*>(pHint);
if (!pUpdateHint)
return;
PERSONS recPerson = pUpdateHint->GetPerson();
switch (lHint)
{
case ViewModify:
SetRowText(recPerson, ViewModify);
break;
case ViewInsert:
SetRowText(recPerson, ViewInsert);
break;
case ViewDelete:
{
int nIndex = GetItemIndex( recPerson );
if ( nIndex == -1 )
return;
oListCtrl.DeleteItem( nIndex );
}
break;
}
}
void CPersonsView::OnLvnItemActivate(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMITEMACTIVATE pNMIA = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
OpenListCtrlRecord();
*pResult = 0;
}
void CPersonsView::OnLvnColumnclick(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
static int nLastColumn = -1;
static bool bAsc = true;
if (nLastColumn != pNMLV->iSubItem)
{
bAsc = true;
nLastColumn = pNMLV->iSubItem;
}
else
bAsc = !bAsc;
CListCtrl& oListCtrl = GetListCtrl();
CQSortContext oQSortContext(oListCtrl, bAsc, pNMLV->iSubItem);
GetDocument()->SortArray(oQSortContext);
oListCtrl.DeleteAllItems();
FillListCtrl();
*pResult = 0;
}
| [
"[email protected]"
] | |
6c4c8e9860a6ce47a36f9c00a102f52dc03ef02a | a08e2804372e63e9070f0d8beab52733aec2b364 | /pat/1136.cpp | a9972813e8a9731111e93e9f3e7d4ad058e10a96 | [] | no_license | luer9/C | a27393addbb65944491497d5bdad7f6883605b86 | e6f1aa1cdbc6aca3132455a389cb8f0b5fe0faf1 | refs/heads/master | 2022-12-01T13:07:58.743140 | 2020-08-26T10:04:32 | 2020-08-26T10:04:32 | 290,456,724 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 2,691 | cpp | #include <bits/stdc++.h>
using namespace std;
int isPal(string num) {
int len = num.length();
for(int i = 0; i < len; i ++) {
if(num[i] != num[len - i - 1]) {
return 0;//不是回文
}
}
return 1;//是回文
}
string s;
int num1[1102]= {0},num2[1102]= {0},num[1102]= {0};
int main() {
#ifdef ONLINE_JUDGE
#else
freopen("in.txt", "r", stdin);
#endif
int cnt = 0;
cin >> s;
//要判断 刚开始的 是不是回文串 否则 中间有两个样例过不去
if(isPal(s)){
cout << s << " is a palindromic number." << endl;
return 0;
}
while(1) {
cnt++;
if(cnt > 10) {
cout << "Not found in 10 iterations." << endl;
return 0;
}
int index = 0;
int len = s.length();
//s 转成 数组
for(int i = 0; i < len; i++) {
num1[index] = (s[i]-'0');
num2[index++] = (s[len - i - 1] - '0');
}
// 数组加
for(int i = 0; i < index; i++) {
num[i] = num1[i] + num2[i];
}
int c = 0;
// for(int i = 0; i < index; i++) {
// cout << num[i] << " ";
// }
// cout << endl;
for(int i = 0; i < index; i++) {
num[i] = num[i] + c;
c = num[i] / 10;
num[i] %= 10;
}
if(c!=0) {
num[index] = c;
index++;
}
// for(int i = 0; i < index; i++) {
// cout << num[i] << " ";
// }
// cout << endl;
for(int i = 0; i < len; i++){
cout << s[i];
}
cout << " + ";
for(int i = 0; i < len; i++){
cout << s[len - i - 1];
}
string ans = "";
for(int i = index-1; i >= 0; i--){
ans += (num[i] + '0');
}
cout << " = " ;
cout << ans << endl;
s = ans;
if(isPal(ans)){
cout << ans << " is a palindromic number." << endl;
return 0;
}
}
return 0;
}
/*
大神精简的代码
#include <iostream>
#include <algorithm>
using namespace std;
string rev(string s) {
reverse(s.begin(), s.end());
return s;
}
string add(string s1, string s2) {
string s = s1;
int carry = 0;
for (int i = s1.size() - 1; i >= 0; i--) {
s[i] = (s1[i] - '0' + s2[i] - '0' + carry) % 10 + '0';
carry = (s1[i] - '0' + s2[i] - '0' + carry) / 10;
}
if (carry > 0) s = "1" + s;
return s;
}
int main() {
string s, sum;
int n = 10;
cin >> s;
if (s == rev(s)) {
cout << s << " is a palindromic number.\n";
return 0;
}
while (n--) {
sum = add(s, rev(s));
cout << s << " + " << rev(s) << " = " << sum << endl;
if (sum == rev(sum)) {
cout << sum << " is a palindromic number.\n";
return 0;
}
s = sum;
}
cout << "Not found in 10 iterations.\n";
return 0;
}
*/
| [
"[email protected]"
] | |
0954a957f916ab64a28632559f3096170b157a6e | 8bc6efba41eb3562b52a6998ade337f18b538826 | /classes/Cat.h | 55c2642c371846f7f8a965b9003fb7d63fd0b66b | [] | no_license | KaterynaDudko/cpp_course | a49ae7616d528c00d390b9b4b8b2ae8635690109 | d797a1bff3e31eb2e6e42e01a50afe2728540326 | refs/heads/master | 2022-04-15T15:02:49.777979 | 2020-03-31T13:23:30 | 2020-03-31T13:23:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 129 | h | #ifndef CAT_H_
#define CAT_H_
class Cat {
private:
bool happy;
public:
void speak();
Cat();
~Cat();
};
#endif
| [
"[email protected]"
] | |
3148d9ed4e0b589de89a72eff05055b44939c5c7 | 2cb7ef795d2a12cabc9c97d47bc8b868ee844b88 | /includes/mach-o_reloc.hpp | f7536a2dcaea8f68a35cced51d85b23c8909767a | [
"MIT"
] | permissive | paulhuggett/machowriter | b0a9f207761add304dfc8b544af7f99163add2d2 | 0a2cf64c55984687faa6009ad785a14a562198e5 | refs/heads/master | 2021-07-15T17:02:34.695855 | 2021-06-19T08:45:07 | 2021-06-19T08:45:07 | 187,329,540 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,310 | hpp | #ifndef MACH_O_RELOC_HPP
#define MACH_O_RELOC_HPP
#include <cstdint>
#ifdef __APPLE__
# include <mach-o/reloc.h>
# define CHECK 1
#endif
namespace mach_o {
// Format of a relocation entry of a Mach-O file. Modified from the 4.3BSD format. The
// modifications from the original format were changing the value of the r_symbolnum field for
// "local" (r_extern == 0) relocation entries. This modification is required to support symbols
// in an arbitrary number of sections not just the three sections (text, data and bss) in
// a 4.3BSD file. Also the last 4 bits have had the r_type tag added to them.
struct relocation_info {
std::int32_t r_address; ///< offset in the section to what is being relocated
std::uint32_t
r_symbolnum : 24, ///< Symbol index if r_extern == 1 or section ordinal if r_extern == 0
r_pcrel : 1, ///< Was relocated pc relative already?
r_length : 2, ///< 0=byte, 1=word, 2=long, 3=quad
r_extern : 1, ///< Does not include value of sym referenced
r_type : 4; ///< If not 0, machine specific relocation type
};
constexpr std::uint32_t r_abs = 0; /// Absolute relocation type for Mach-O files
} // end namespace mach_o
#endif // MACH_O_RELOC_HPP
| [
"[email protected]"
] | |
94623f262d4a25fe050b06dda20515972e23294b | 59a4648976391959a2a88e43d58828920f3bfb8c | /VarioSW_as/VarioSW/src/lib/CircleFit/data.cpp | 23e4a24730457c7f9d229e3b0fe162079c504ba3 | [] | no_license | Jenatko/VariYO | 871dbcc0eda744daab0bcc484250e5c2ab2d9258 | e68f7e871c2ddfe5746fa28013cbc0fd370e1569 | refs/heads/master | 2022-09-16T14:29:45.241730 | 2022-09-03T22:28:50 | 2022-09-03T22:28:50 | 191,448,893 | 3 | 3 | null | 2021-03-17T22:39:24 | 2019-06-11T21:03:24 | C | UTF-8 | C++ | false | false | 1,952 | cpp | #include "data.h"
//
/************************************************************************
BODY OF THE MEMBER ROUTINES
************************************************************************/
// Default constructor
Data::Data()
{
write_index = 0;
n=0;
X = new reals[n];
Y = new reals[n];
for (int i=0; i<n; i++)
{
X[i]=0.;
Y[i]=0.;
}
}
// Constructor with assignment of the field N
Data::Data(int N)
{
write_index = 0;
n=N;
X = new reals[n];
Y = new reals[n];
for (int i=0; i<n; i++)
{
X[i]=0.;
Y[i]=0.;
}
}
// Constructor with assignment of each field
Data::Data(int N, reals dataX[], reals dataY[])
{
write_index = 0;
n=N;
X = new reals[n];
Y = new reals[n];
for (int i=0; i<n; i++)
{
X[i]=dataX[i];
Y[i]=dataY[i];
}
}
// Routine that computes the x- and y- sample means (the coordinates of the centeroid)
void Data::means(void)
{
meanX=0.; meanY=0.;
for (int i=0; i<n; i++)
{
meanX += X[i];
meanY += Y[i];
}
meanX /= n;
meanY /= n;
}
// Routine that centers the data set (shifts the coordinates to the centeroid)
void Data::center(void)
{
reals sX=0.,sY=0.;
int i;
for (i=0; i<n; i++)
{
sX += X[i];
sY += Y[i];
}
sX /= n;
sY /= n;
for (i=0; i<n; i++)
{
X[i] -= sX;
Y[i] -= sY;
}
meanX = 0.;
meanY = 0.;
}
// Routine that scales the coordinates (makes them of order one)
void Data::scale(void)
{
reals sXX=0.,sYY=0.,scaling;
int i;
for (i=0; i<n; i++)
{
sXX += X[i]*X[i];
sYY += Y[i]*Y[i];
}
scaling = sqrt((sXX+sYY)/n/2.0);
for (i=0; i<n; i++)
{
X[i] /= scaling;
Y[i] /= scaling;
}
}
// Printing routine
void Data::print(void)
{
//cout << endl << "The data set has " << n << " points with coordinates :"<< endl;
//for (int i=0; i<n-1; i++) cout << setprecision(7) << "(" << X[i] << ","<< Y[i] << "), ";
// cout << "(" << X[n-1] << ","<< Y[n-1] << ")\n";
}
// Destructor
Data::~Data()
{
delete[] X;
delete[] Y;
}
| [
"[email protected]"
] | |
f252f11841a00ae095dc045495ebd97ec749c61c | fe3f31bf0cc79347d0ba6a657302684abc37a420 | /LP1_LAB2/questão3/src/Funcionario.cpp | 550471a309cd7856a724c34bc22af2a2e67db8c5 | [] | no_license | rvfarias/LP1_LAB2 | 18ba8ece10b2e476c0d8ed4873d791097c60f368 | 97b30632f307b32cc17dd1682fc76a67ec66b0ec | refs/heads/master | 2020-06-28T17:59:24.171472 | 2019-08-12T23:15:05 | 2019-08-12T23:15:05 | 200,302,373 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 498 | cpp | #include "Funcionario.hpp"
Funcionario::Funcionario(){
//default
}
void Funcionario::setNome(string nome){
this->nome = nome;
}
void Funcionario::setMatricula(int matricula){
this->matricula = matricula;
}
void Funcionario::setSalario(double salario){
this->salario = salario;
}
string Funcionario::getNome(){
return nome;
}
int Funcionario::getMatricula(){
return matricula;
}
double Funcionario::getSalario(){
return salario;
}
| [
"[email protected]"
] | |
64d78dc57eccd0aec4b67c4ba3f124a9981b91c7 | 898aba0ba23c7bfb1af1c0857ad56c814a6d32ba | /CppExamples/Pointers/PointersAndArrays/main.cpp | bab9b340c612d1b0fa011b663ab2ca6f87d95b0a | [] | no_license | andrewbolster/cppqubmarch2013 | 735d4bdefc4e2413969a5bb7a3480969549281fe | cb033fc22f5262daba9f542062d2d0ac40b38f4a | refs/heads/master | 2016-09-05T19:03:32.343921 | 2013-03-22T13:41:27 | 2013-03-22T13:41:27 | 8,875,864 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 832 | cpp |
#include<iostream>
using namespace std;
void printArrayUsingPointerArithmetic(int *);
void printArrayUsingBrackets(int *);
int main() {
int iarray[] = {101,202,303,404,505};
cout << "--- EX 1 ---" << endl;
printArrayUsingPointerArithmetic(iarray);
cout << "--- EX 2 ---" << endl;
printArrayUsingBrackets(iarray);
}
void printArrayUsingPointerArithmetic(int * i_ptr1) {
cout << *i_ptr1 << endl; //101
i_ptr1++;
cout << *i_ptr1 << endl; //202
i_ptr1++;
cout << *i_ptr1 << endl; //303
i_ptr1++;
cout << *i_ptr1 << endl; //404
i_ptr1++;
cout << *i_ptr1 << endl; //505
}
void printArrayUsingBrackets(int * i_ptr2) {
cout << i_ptr2[0] << endl; //101
cout << i_ptr2[1] << endl; //202
cout << i_ptr2[2] << endl; //303
cout << i_ptr2[3] << endl; //404
cout << i_ptr2[4] << endl; //505
} | [
"bolster@localhost.(none)"
] | bolster@localhost.(none) |
71192ddda8f9ba99c4e07f240be03523f1f4bb05 | d98259a6476a52d365a2bab6c7175a00eaeac0f6 | /CreditHelper/lab08/Percent.h | f2bee8cbed5128d0ef451ecc49dd7c8f8d92f0be | [] | no_license | NazarMartyniuk/My_CPP_projects | 0463aeef3372c46e98a8fe4439db618fe64784e9 | 6b1c582702f547438f9a2ea50fad3c58a089fc6b | refs/heads/master | 2023-07-08T04:21:07.711200 | 2021-08-13T11:41:31 | 2021-08-13T11:41:31 | 344,292,209 | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 14,403 | h | #include "Credit.h"
namespace lab08 {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Сводка для Percent
/// </summary>
public ref class Percent : public System::Windows::Forms::Form
{
public:
Percent(void)
{
InitializeComponent();
//
//TODO: добавьте код конструктора
//
}
protected:
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
~Percent()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::TextBox^ textBox7;
protected:
private: System::Windows::Forms::Label^ label7;
private: System::Windows::Forms::TextBox^ textBox6;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::TextBox^ textBox5;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::TextBox^ textBox4;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::TextBox^ textBox3;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label8;
private: System::Windows::Forms::TextBox^ textBox8;
private: System::Windows::Forms::Label^ label9;
private: System::Windows::Forms::TextBox^ textBox9;
private: System::Windows::Forms::TextBox^ textBox10;
private: System::Windows::Forms::Label^ label10;
protected:
private:
/// <summary>
/// Обязательная переменная конструктора.
/// </summary>
System::ComponentModel::Container^ components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
void InitializeComponent(void)
{
this->textBox7 = (gcnew System::Windows::Forms::TextBox());
this->label7 = (gcnew System::Windows::Forms::Label());
this->textBox6 = (gcnew System::Windows::Forms::TextBox());
this->label6 = (gcnew System::Windows::Forms::Label());
this->button2 = (gcnew System::Windows::Forms::Button());
this->textBox5 = (gcnew System::Windows::Forms::TextBox());
this->label5 = (gcnew System::Windows::Forms::Label());
this->textBox4 = (gcnew System::Windows::Forms::TextBox());
this->label4 = (gcnew System::Windows::Forms::Label());
this->button1 = (gcnew System::Windows::Forms::Button());
this->textBox3 = (gcnew System::Windows::Forms::TextBox());
this->label3 = (gcnew System::Windows::Forms::Label());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->label1 = (gcnew System::Windows::Forms::Label());
this->label8 = (gcnew System::Windows::Forms::Label());
this->textBox8 = (gcnew System::Windows::Forms::TextBox());
this->label9 = (gcnew System::Windows::Forms::Label());
this->textBox9 = (gcnew System::Windows::Forms::TextBox());
this->textBox10 = (gcnew System::Windows::Forms::TextBox());
this->label10 = (gcnew System::Windows::Forms::Label());
this->SuspendLayout();
//
// textBox7
//
this->textBox7->Location = System::Drawing::Point(268, 435);
this->textBox7->Multiline = true;
this->textBox7->Name = L"textBox7";
this->textBox7->ReadOnly = true;
this->textBox7->Size = System::Drawing::Size(138, 38);
this->textBox7->TabIndex = 31;
//
// label7
//
this->label7->AutoSize = true;
this->label7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label7->Location = System::Drawing::Point(7, 444);
this->label7->Name = L"label7";
this->label7->Size = System::Drawing::Size(255, 29);
this->label7->TabIndex = 30;
this->label7->Text = L"Лишилось оплатити:";
//
// textBox6
//
this->textBox6->Location = System::Drawing::Point(200, 386);
this->textBox6->Multiline = true;
this->textBox6->Name = L"textBox6";
this->textBox6->ReadOnly = true;
this->textBox6->Size = System::Drawing::Size(138, 38);
this->textBox6->TabIndex = 29;
//
// label6
//
this->label6->AutoSize = true;
this->label6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label6->Location = System::Drawing::Point(6, 395);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(188, 29);
this->label6->TabIndex = 28;
this->label6->Text = L"Уже оплачено:";
//
// button2
//
this->button2->Location = System::Drawing::Point(11, 337);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(672, 43);
this->button2->TabIndex = 27;
this->button2->Text = L"Оплатити";
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this, &Percent::button2_Click);
//
// textBox5
//
this->textBox5->Location = System::Drawing::Point(247, 244);
this->textBox5->Multiline = true;
this->textBox5->Name = L"textBox5";
this->textBox5->ReadOnly = true;
this->textBox5->Size = System::Drawing::Size(138, 38);
this->textBox5->TabIndex = 26;
//
// label5
//
this->label5->AutoSize = true;
this->label5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label5->Location = System::Drawing::Point(11, 244);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(236, 29);
this->label5->TabIndex = 25;
this->label5->Text = L"Кількість платежів:";
//
// textBox4
//
this->textBox4->Location = System::Drawing::Point(339, 194);
this->textBox4->Multiline = true;
this->textBox4->Name = L"textBox4";
this->textBox4->ReadOnly = true;
this->textBox4->Size = System::Drawing::Size(138, 38);
this->textBox4->TabIndex = 24;
//
// label4
//
this->label4->AutoSize = true;
this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label4->Location = System::Drawing::Point(11, 194);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(322, 29);
this->label4->TabIndex = 23;
this->label4->Text = L"Сума оплати з відсотками:";
//
// button1
//
this->button1->Location = System::Drawing::Point(11, 145);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(672, 43);
this->button1->TabIndex = 22;
this->button1->Text = L"Порахувати";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Percent::button1_Click);
//
// textBox3
//
this->textBox3->Location = System::Drawing::Point(551, 24);
this->textBox3->Multiline = true;
this->textBox3->Name = L"textBox3";
this->textBox3->Size = System::Drawing::Size(138, 38);
this->textBox3->TabIndex = 21;
//
// label3
//
this->label3->AutoSize = true;
this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label3->Location = System::Drawing::Point(338, 24);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(207, 29);
this->label3->TabIndex = 20;
this->label3->Text = L"Грошей на карті:";
//
// textBox2
//
this->textBox2->Location = System::Drawing::Point(344, 65);
this->textBox2->Multiline = true;
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(138, 38);
this->textBox2->TabIndex = 19;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label2->Location = System::Drawing::Point(11, 65);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(327, 29);
this->label2->TabIndex = 18;
this->label2->Text = L"Час, за який треба віддати:";
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(194, 24);
this->textBox1->Multiline = true;
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(138, 38);
this->textBox1->TabIndex = 17;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label1->Location = System::Drawing::Point(12, 24);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(176, 29);
this->label1->TabIndex = 16;
this->label1->Text = L"Сума кредиту:";
//
// label8
//
this->label8->AutoSize = true;
this->label8->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label8->Location = System::Drawing::Point(18, 110);
this->label8->Name = L"label8";
this->label8->Size = System::Drawing::Size(119, 29);
this->label8->TabIndex = 32;
this->label8->Text = L"Відсоток:";
//
// textBox8
//
this->textBox8->Location = System::Drawing::Point(143, 101);
this->textBox8->Multiline = true;
this->textBox8->Name = L"textBox8";
this->textBox8->Size = System::Drawing::Size(138, 38);
this->textBox8->TabIndex = 33;
//
// label9
//
this->label9->AutoSize = true;
this->label9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label9->Location = System::Drawing::Point(391, 244);
this->label9->Name = L"label9";
this->label9->Size = System::Drawing::Size(220, 29);
this->label9->TabIndex = 34;
this->label9->Text = L"Відсоток від суми:";
//
// textBox9
//
this->textBox9->Location = System::Drawing::Point(617, 244);
this->textBox9->Multiline = true;
this->textBox9->Name = L"textBox9";
this->textBox9->ReadOnly = true;
this->textBox9->Size = System::Drawing::Size(66, 38);
this->textBox9->TabIndex = 35;
//
// textBox10
//
this->textBox10->Location = System::Drawing::Point(327, 294);
this->textBox10->Multiline = true;
this->textBox10->Name = L"textBox10";
this->textBox10->ReadOnly = true;
this->textBox10->Size = System::Drawing::Size(138, 38);
this->textBox10->TabIndex = 37;
//
// label10
//
this->label10->AutoSize = true;
this->label10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14));
this->label10->Location = System::Drawing::Point(12, 294);
this->label10->Name = L"label10";
this->label10->Size = System::Drawing::Size(309, 29);
this->label10->TabIndex = 36;
this->label10->Text = L"Сума рівномірної оплати:";
//
// Percent
//
this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(696, 489);
this->Controls->Add(this->textBox10);
this->Controls->Add(this->label10);
this->Controls->Add(this->textBox9);
this->Controls->Add(this->label9);
this->Controls->Add(this->textBox8);
this->Controls->Add(this->label8);
this->Controls->Add(this->textBox7);
this->Controls->Add(this->label7);
this->Controls->Add(this->textBox6);
this->Controls->Add(this->label6);
this->Controls->Add(this->button2);
this->Controls->Add(this->textBox5);
this->Controls->Add(this->label5);
this->Controls->Add(this->textBox4);
this->Controls->Add(this->label4);
this->Controls->Add(this->button1);
this->Controls->Add(this->textBox3);
this->Controls->Add(this->label3);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->label2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->label1);
this->Name = L"Percent";
this->Text = L"Percent";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
double sumToPay, moneyOnCard, percentToPay;
int timeToPay;
sumToPay = Convert::ToDouble(textBox1->Text);
moneyOnCard = Convert::ToDouble(textBox3->Text);
timeToPay = Convert::ToInt16(textBox2->Text);
percentToPay = Convert::ToDouble(textBox8->Text);
PercentPayment a(sumToPay, moneyOnCard, percentToPay, timeToPay);
textBox9->Text = Convert::ToString(a.PaymentPrecent());
textBox4->Text = Convert::ToString(a.PercentSum());
textBox5->Text = Convert::ToString(timeToPay);
textBox6->Text = Convert::ToString(a.alreadyPayed);
textBox7->Text = Convert::ToString(a.needToPay);
textBox10->Text = Convert::ToString(a.EqualPartsPayment());
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e)
{
double sumToPay, moneyOnCard, alreadyPayed, needToPay;
int timeToPay;
sumToPay = Convert::ToDouble(textBox10->Text);
moneyOnCard = Convert::ToDouble(textBox3->Text);
timeToPay = Convert::ToInt16(textBox5->Text);
alreadyPayed = Convert::ToDouble(textBox6->Text);
needToPay = Convert::ToDouble(textBox7->Text);
if (moneyOnCard > sumToPay&& timeToPay != 0)
{
moneyOnCard -= sumToPay;
timeToPay -= 1;
alreadyPayed += sumToPay;
needToPay -= sumToPay;
}
textBox3->Text = Convert::ToString(moneyOnCard);
textBox5->Text = Convert::ToString(timeToPay);
textBox6->Text = Convert::ToString(alreadyPayed);
textBox7->Text = Convert::ToString(needToPay);
}
};
}
| [
"[email protected]"
] | |
79840dbe12e3cec88f1926363ec1a501483be685 | ce1a9d0c1e776c3af0781c3cff8ec6d6d5899364 | /qwgraphicsview.cpp | 6041e7a83602a002b7e9dce987bf963642f17232 | [] | no_license | adstellaria/Snake | 24a9a8e1620475866e6a593b155966c5fbc61672 | af36b7c6d27fe5e4ff783f7a434ab28949e9d939 | refs/heads/main | 2022-12-29T19:40:42.451554 | 2020-10-16T11:55:35 | 2020-10-16T11:55:35 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 341 | cpp | #include "qwgraphicsview.h"
QWGraphicsView::QWGraphicsView(QWidget *parent):QGraphicsView(parent)
{
}
void QWGraphicsView::mousePressEvent(QMouseEvent *event)
{
if(event->button()==Qt::LeftButton){
QPoint point=event->pos();
emit mouseClicked(point);
}
QGraphicsView::mousePressEvent(event);
}
| [
"[email protected]"
] | |
84868f7b84102b3efe341df82cb378e3cdcd4f11 | 7c0aceac410a978a31a572d8416ea08ba50bde71 | /Shooting01/Shooting/Score.cpp | 87b8aae84c85cc3bc3af4e71b5c06d9fe19a5824 | [] | no_license | ha-k-pg-okada/SubmissionAssignments | 238dd76cc288692db6372bb2441062bc19f9b478 | 085f9ad8977dabb685060208df04671c8d0a24e4 | refs/heads/master | 2022-12-19T19:23:10.703562 | 2020-10-01T07:44:27 | 2020-10-01T07:44:27 | 293,471,279 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 2,003 | cpp | #include "Score.h"
#include "Src/Engine/Engine.h"
void Score::Update()
{
}
void Score::Iintialize(Vec2 init_pos)
{
//メンバ変数初期化
Position = Vec2(0.0f, 0.0f);
Scale = Vec2(1.0f, 1.0f);
Angle = 0.0f;
Alpha = 255;
//unsigned char Alpha;
}
void Release()
{
}
void Score::Draw()
{
int g_Score = 354;
const char* number_keys[] =
{
"Score00",
"Score01",
"Score02",
"Score03",
"Score04",
"Score05",
"Score06",
"Score07",
"Score08",
"Score09",
};
float offset = 120.0f; //数値画像のサイズ
int digit_count = 0; //行チェックの回数
int score = g_Score; //チェック用のスコア
int numbers[6] =
{
0, 2, 0, 3, 0, 0
};
//名桁の値を割り出すための処理
//do
//{
// int digit = g_Score % 10;
// g_Score /= 10;
//Engine::DrawTexture(300.0f - (offset * digit_count), 200.0f, number_keys[digit]);
// numbers[digit_count] = digit;
// digit_count++;
//} while (g_Score != 0);
for (int i = 0; i < 6; i++)
{
int key_id = numbers[i];
Engine::DrawTexture(i * 100.0, 200.0f, number_keys[key_id]);
}
//Engine::DrawTexture(Position.X, Position.Y, "Score00", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score01", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score02", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score03", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score04", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score05", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score06", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score07", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score08", Alpha, Angle, Scale.X, Scale.Y);
//Engine::DrawTexture(Position.X, Position.Y, "Score09", Alpha, Angle, Scale.X, Scale.Y);
}
| [
"[email protected]"
] | |
060cdfc2dd8c58b392b4b097417ccd945dc0ee3a | 74fc7c5d39baa6c30aa929e629ff60bf40500c61 | /test/unit-tests/mbr/mbr_util_mock.h | 1aa861ae66c4fc7cba6a099ae8c649726df493f9 | [
"BSD-3-Clause"
] | permissive | jhyunleehi/poseidonos | e472be680d0e85dc62f0e2c0d7356dbee74a3bd6 | 1d90e4320855d61742ff37af8c0148da579d95d4 | refs/heads/develop | 2023-07-13T03:37:29.754509 | 2021-08-23T15:26:08 | 2021-08-23T15:26:08 | 393,203,347 | 0 | 0 | BSD-3-Clause | 2021-08-20T00:04:14 | 2021-08-06T00:30:35 | C | UTF-8 | C++ | false | false | 109 | h | #include <gmock/gmock.h>
#include <list>
#include <string>
#include <vector>
#include "src/mbr/mbr_util.h"
| [
"[email protected]"
] | |
683ce4db96fb32ecd2df9755970ae7603110de7a | 2d6fe63c5688f0555f7f51d866e0c00e3771fb0f | /C/switch_blinking_led/switch_blinking_led.ino | 3cabde74471f010cc39ac2ff60af03d1e672a7b7 | [] | no_license | supa96/C-ProjectX | 800e4d105a463e667f47100c5e9f0246843f1199 | c601a0880767bb137449056ee09436379a410ecd | refs/heads/master | 2021-01-19T09:31:50.959304 | 2017-02-16T01:04:28 | 2017-02-16T01:04:28 | 82,122,947 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 487 | ino | const int buttonPin = 2;
const int ledPinR = 13;
const int ledPinG = 12;
int buttonState;
void setup() {
pinMode(ledPinR, OUTPUT);
pinMode(ledPinG, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
digitalWrite(ledPinG, HIGH);
digitalWrite(ledPinR, LOW );
} else {
digitalWrite(ledPinG, LOW);
digitalWrite(ledPinR, HIGH);
}
}
| [
"Supachai"
] | Supachai |
beae20661601c010791818772d41198b85b4df66 | 9bf8a225016e45d6ffaf76a626577c1ae60f303c | /apps/common/ospray_testing/builders/Interpolation.cpp | ba5997998b279740007564833dbb47da1362351b | [
"Apache-2.0"
] | permissive | CIBC-Internal/ospray | cccd1c7f85462486b947efa26d79c1de19022b04 | 08111292f4671ed8822e7e0374080d75c15538a2 | refs/heads/master | 2023-07-05T23:21:58.895336 | 2023-06-17T15:16:25 | 2023-06-17T15:16:25 | 130,269,553 | 0 | 1 | Apache-2.0 | 2023-06-23T23:38:17 | 2018-04-19T20:33:05 | C++ | UTF-8 | C++ | false | false | 5,343 | cpp | // Copyright 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#include "Builder.h"
#include "ospray_testing.h"
// stl
#include <random>
using namespace rkcommon::math;
namespace ospray {
namespace testing {
struct Interpolation : public detail::Builder
{
Interpolation(
bool subd = false, unsigned int attrib = 0, unsigned int interp = 0)
: useSubd(subd), attribute(attrib), interpolation(interp)
{}
~Interpolation() override = default;
void commit() override;
cpp::Group buildGroup() const override;
cpp::World buildWorld() const override;
// TODO: support triangles
bool useSubd{false}; // otherwise Mesh
unsigned int attribute; // color, texcoord, normal
unsigned int interpolation; // face varying, vertex varying, uniform, constant
};
// quad mesh data
static std::vector<vec3f> vertices = {
// Left
{0.f, 0.f, 0.f},
{1.f, 0.f, 0.f},
{1.f, 1.f, 0.f},
{0.f, 1.f, 0.f},
// Right
{2.f, 0.f, 0.f},
{2.f, 1.f, 0.f}};
static std::vector<vec4ui> quad_indices = {
{0, 1, 2, 3}, // Left
{1, 4, 5, 2} // Right
};
static std::vector<unsigned int> subd_indices = {0, 1, 2, 3, 1, 4, 5, 2};
static std::vector<vec2f> texcoords = {{0.0f, 0.0f},
{0.1f, 0.0f},
{0.2f, 0.0f},
{0.3f, 0.0f},
{0.4f, 0.0f},
{0.5f, 0.0f},
{0.6f, 0.0f},
{0.7f, 0.0f}};
static std::vector<vec4f> colors = {{1.f, 0.f, 0.f, 1.f},
{0.f, 1.f, 0.f, 1.f},
{0.f, 0.f, 1.f, 1.f},
{1.f, 1.f, 0.f, 1.f},
{1.f, 0.f, 1.f, 1.f},
{1.f, 0.f, 1.f, 1.f}};
static std::vector<vec4f> colors_fv = {{1.f, 0.f, 0.f, 1.f},
{0.f, 1.f, 0.f, 1.f},
{0.f, 0.f, 1.f, 1.f},
{1.f, 1.f, 0.f, 1.f},
{1.f, 0.f, 1.f, 1.f},
{1.f, 0.f, 1.f, 1.f},
{1.f, 0.f, 1.f, 1.f},
{1.f, 0.f, 1.f, 1.f}};
static std::vector<vec3f> normals = {{1.f, 0.f, 0.f},
{0.f, 1.f, 0.f},
{0.f, 0.f, 1.f},
{1.f, 1.f, 0.f},
{1.f, 0.f, 1.f},
{1.f, 0.f, 1.f},
{1.f, 0.f, 1.f},
{1.f, 0.f, 1.f}};
// number of vertex indices per face
static std::vector<unsigned int> faces = {4, 4};
// Inlined definitions ////////////////////////////////////////////////////
void Interpolation::commit()
{
Builder::commit();
useSubd = getParam<bool>("useSubd", useSubd);
attribute = getParam<unsigned int>("attribute", attribute);
interpolation = getParam<unsigned int>("interpolation", interpolation);
addPlane = false;
}
cpp::Group Interpolation::buildGroup() const
{
cpp::Geometry mesh;
std::vector<vec4f> colors_mod = colors;
if (interpolation == 0)
colors_mod = colors_fv;
else if (interpolation == 2)
colors_mod.resize(2);
else if (interpolation == 3)
colors_mod.resize(1);
cpp::Texture tex("texture2d");
tex.setParam("format", OSP_TEXTURE_RGBA32F);
tex.setParam(
"data", cpp::CopiedData(colors_mod.data(), vec2ul(colors_mod.size(), 1)));
tex.commit();
cpp::Material mat(rendererType, "obj");
if (attribute == 1) // texture
mat.setParam("map_kd", tex);
mat.commit();
if (useSubd) {
mesh = cpp::Geometry("subdivision");
mesh.setParam("vertex.position", cpp::CopiedData(vertices));
mesh.setParam("face", cpp::CopiedData(faces));
mesh.setParam("level", 1.0f); // global level
mesh.setParam("index", cpp::CopiedData(subd_indices));
mesh.setParam("mode", OSP_SUBDIVISION_PIN_CORNERS);
} else {
mesh = cpp::Geometry("mesh");
mesh.setParam("vertex.position", cpp::CopiedData(vertices));
mesh.setParam("index", cpp::CopiedData(quad_indices));
}
if (interpolation == 0) {
if (attribute == 1)
mesh.setParam("texcoord", cpp::CopiedData(texcoords));
else if (attribute == 2)
mesh.setParam("normal", cpp::CopiedData(normals));
else
mesh.setParam("color", cpp::CopiedData(colors_mod));
} else if (interpolation == 1) {
if (attribute == 1)
mesh.setParam("vertex.texcoord", cpp::CopiedData(texcoords));
else if (attribute == 2)
mesh.setParam("vertex.normal", cpp::CopiedData(normals));
else
mesh.setParam("vertex.color", cpp::CopiedData(colors_mod));
}
mesh.commit();
cpp::GeometricModel model(mesh);
// create and setup a material
if (rendererType == "pathtracer" || rendererType == "scivis"
|| rendererType == "ao") {
model.setParam("material", mat);
}
if ((attribute == 0) && interpolation == 2)
model.setParam("color", cpp::CopiedData(colors_mod));
else if ((attribute == 0) && interpolation == 3)
model.setParam("color", colors_mod[0]);
// Put the mesh and material into a model
model.commit();
cpp::Group group;
group.setParam("geometry", cpp::CopiedData(model));
group.commit();
return group;
}
cpp::World Interpolation::buildWorld() const
{
auto world = Builder::buildWorld();
cpp::Light light("distant");
light.setParam("color", vec3f(0.78f, 0.551f, 0.183f));
light.setParam("intensity", 3.14f);
light.setParam("direction", vec3f(-0.8f, -0.6f, 0.3f));
light.commit();
cpp::Light ambient("ambient");
ambient.setParam("intensity", 0.35f);
ambient.setParam("visible", false);
ambient.commit();
std::vector<cpp::Light> lights{light, ambient};
world.setParam("light", cpp::CopiedData(lights));
return world;
}
OSP_REGISTER_TESTING_BUILDER(Interpolation, interpolation);
} // namespace testing
} // namespace ospray
| [
"[email protected]"
] | |
93fd91bbc920951b77829b6317caa0cdf850cfcf | ef7bf2b4dc47e0f2d91d5c9cd8ba2587e9ec1908 | /client.h | 71ffcddc785a4be74e42cca35b61a18c070d51c7 | [] | no_license | malloc47/term-do | 802960e9f3e2cbb1a370f108d2fcc99f2e23d2b4 | abc03c9e35a34e94e1433d54775dab04674eaf1b | refs/heads/master | 2022-05-11T20:53:01.525472 | 2022-04-26T16:52:28 | 2022-04-26T16:55:02 | 3,126,323 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 852 | h | #include "config.h"
#ifdef DAEMON
#ifndef CLIENT_H_
#define CLIENT_H_
#include <boost/interprocess/ipc/message_queue.hpp>
#include "common.h"
#include "vt100.h"
#include "query.h"
#include "plugins.h"
#include "view.h"
#include "term-do.h"
#include "frontend.h"
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
using namespace boost::interprocess;
class Client : public Frontend {
public:
Client();
~Client();
string loopDo();
void run(string);
void reset();
private:
void init();
void cleanup();
int handleChar(char);
void sendToServer(string);
string getFromServer(string,string);
string getFromServer(string);
string getFromServer();
class View *view;
message_queue *server_send;
message_queue *server_receive;
};
#endif
#endif
| [
"[email protected]"
] | |
c2cbd8d2f10b5028feba084c4af42817318dc43a | 7419c3edc2d0f8ecc82be918f1321d985b781a39 | /sources/scene.cpp | 60a2546d0f0e3f09871c6e13e3281ac8bfc432ee | [] | no_license | Nojan/particle | 07b1685f127610b35d222aa305a9114577e6a855 | d3e700a114479c69dfcced52f828c1b253d4fde7 | refs/heads/master | 2021-07-30T00:03:37.947192 | 2018-09-16T15:27:45 | 2018-09-16T15:33:35 | 21,325,548 | 1 | 1 | null | 2021-07-28T09:49:41 | 2014-06-29T15:03:19 | C++ | UTF-8 | C++ | false | false | 1,267 | cpp | #include "scene.hpp"
#include "imgui/imgui_header.hpp"
namespace Constant {
IMGUI_CONST float Direction[] = { 0.f, 0.1f, -0.5f };
IMGUI_CONST float DiffuseColor[] = { 1.f, 1.f, 1.f };
IMGUI_CONST float SpecularColor[] = { 1.f, 1.f, 1.f };
}
#ifdef IMGUI_ENABLE
void Scene::debug_GUI()
{
ImGui::SliderFloat3("Direction", Constant::Direction, -1.f, 1.f);
ImGui::SliderFloat3("Diffuse Color", Constant::DiffuseColor, 0.f, 1.f);
ImGui::SliderFloat3("Specular Color", Constant::SpecularColor, 0.f, 1.f);
SetupDefaultLight();
}
#endif
Scene::Scene()
{
SetupDefaultLight();
}
void Scene::SetupDefaultLight()
{
mDirLight.mDirection = glm::vec3(Constant::Direction[0], Constant::Direction[1], Constant::Direction[2]);
mDirLight.mDirection = glm::normalize(mDirLight.mDirection);
mDirLight.mDiffuseColor.r = Constant::DiffuseColor[0];
mDirLight.mDiffuseColor.g = Constant::DiffuseColor[1];
mDirLight.mDiffuseColor.b = Constant::DiffuseColor[2];
mDirLight.mSpecularColor.r = Constant::SpecularColor[0];
mDirLight.mSpecularColor.g = Constant::SpecularColor[1];
mDirLight.mSpecularColor.b = Constant::SpecularColor[2];
}
const DirectionalLight& Scene::GetDirectionalLight() const
{
return mDirLight;
}
| [
"[email protected]"
] | |
45ce884f9ee229350a5c4529111fb74ec19ccbdb | 51a2d2dfbeef5db71abb77f3fc23e2f86c422f6f | /src/core/indicator/DoubleMatrixLightIndicator.h | 5b045e3b4a9485a2ea2d95018663123a3a08a8df | [] | no_license | bidule21/arduino-etarget | a20e8b6ef2fbaa36c39e50b4ed7ea131609b3faf | 92cb507cb68921a7d28566a8635e60dcc20f01ed | refs/heads/master | 2020-04-28T19:26:34.813396 | 2017-08-13T18:44:52 | 2017-08-13T18:44:52 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 442 | h | #include <LedControlMS.h>
#include "LightIndicatorInterface.h"
#ifndef DoubleMatrixLightIndicator_h
#define DoubleMatrixLightIndicator_h
class DoubleMatrixLightIndicator: public LightIndicatorInterface {
public:
DoubleMatrixLightIndicator(bool doInit = false);
void init();
void green();
void red();
void off();
void setBrightness(int brightness);
String getName();
private:
LedControl *lc;
};
#endif
| [
"[email protected]"
] | |
2eacf10341d5bd10baf6117a634c81e0ffee7ad0 | 36631dcd4211c9896f978b042b50ae06e7428902 | /project/functions/addCredit/addCredit.h | 9ac052b4fd08d85f9614ca4465d55eb79264726b | [] | no_license | JosephRob/csci3060u-project | 16fb5bcf3eceb4f22e8c34ca88f93cafcef5907d | 831efcd36d35b4561b026f179149fc8e507523ac | refs/heads/master | 2021-03-19T10:54:13.384545 | 2018-03-08T20:49:07 | 2018-03-08T20:49:07 | 117,279,085 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 486 | h | #ifndef __ADDCREDIT_H_INCLUDED__
#define __ADDCREDIT_H_INCLUDED__
#include <string>
using namespace std;
/*
This is the class for add credit function.
In this function, there are 2 functions, the constructor
and the addCredit function itself
*/
class addCreditClass{
public:
double credit;
string targetUserName;
addCreditClass();
bool addCredit(string userType, double maxAddBalanceThisSession);
bool isNumber(const string& s);
bool checkTarget(string userName);
};
#endif
| [
"[email protected]"
] | |
028a33deea5487aa2d739cfa93321d3d22f9d1ed | 882209d255fe562b73528cc900fb7310646526a1 | /osc_sender/ip/posix/UdpSocket.cpp | 7a6e8d47c18b04d41391bb8d4f4c397719cdeb2d | [
"MIT"
] | permissive | SirDifferential/utilities | d1bec03108ccfea7aeed19f9821495119357ce6e | 39580f37c4248e0d4f1833f72818f2efb06e4a69 | refs/heads/master | 2021-01-02T23:12:46.586082 | 2018-05-04T10:37:19 | 2018-05-04T10:37:19 | 5,548,686 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,770 | cpp | /*
oscpack -- Open Sound Control (OSC) packet manipulation library
http://www.rossbencina.com/code/oscpack
Copyright (c) 2004-2013 Ross Bencina <[email protected]>
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.
*/
/*
The text above constitutes the entire oscpack license; however,
the oscpack developer(s) also make the following non-binding requests:
Any person wishing to distribute modifications to the Software is
requested to send the modifications to the original developer so that
they can be incorporated into the canonical version. It is also
requested that these non-binding requests be included whenever the
above license is reproduced.
*/
#include "../UdpSocket.h"
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h> // for sockaddr_in
#include <signal.h>
#include <math.h>
#include <errno.h>
#include <string.h>
#include <algorithm>
#include <cassert>
#include <cstring> // for memset
#include <stdexcept>
#include <vector>
#include "../PacketListener.h"
#include "../TimerListener.h"
#if defined(__APPLE__) && !defined(_SOCKLEN_T)
// pre system 10.3 didn't have socklen_t
typedef ssize_t socklen_t;
#endif
static void SockaddrFromIpEndpointName( struct sockaddr_in& sockAddr, const IpEndpointName& endpoint )
{
std::memset( (char *)&sockAddr, 0, sizeof(sockAddr ) );
sockAddr.sin_family = AF_INET;
sockAddr.sin_addr.s_addr =
(endpoint.address == IpEndpointName::ANY_ADDRESS)
? INADDR_ANY
: htonl( endpoint.address );
sockAddr.sin_port =
(endpoint.port == IpEndpointName::ANY_PORT)
? 0
: htons( endpoint.port );
}
static IpEndpointName IpEndpointNameFromSockaddr( const struct sockaddr_in& sockAddr )
{
return IpEndpointName(
(sockAddr.sin_addr.s_addr == INADDR_ANY)
? IpEndpointName::ANY_ADDRESS
: ntohl( sockAddr.sin_addr.s_addr ),
(sockAddr.sin_port == 0)
? IpEndpointName::ANY_PORT
: ntohs( sockAddr.sin_port )
);
}
class UdpSocket::Implementation{
bool isBound_;
bool isConnected_;
int socket_;
struct sockaddr_in connectedAddr_;
struct sockaddr_in sendToAddr_;
public:
Implementation()
: isBound_( false )
, isConnected_( false )
, socket_( -1 )
{
if( (socket_ = socket( AF_INET, SOCK_DGRAM, 0 )) == -1 ){
throw std::runtime_error("unable to create udp socket\n");
}
std::memset( &sendToAddr_, 0, sizeof(sendToAddr_) );
sendToAddr_.sin_family = AF_INET;
}
~Implementation()
{
if (socket_ != -1) close(socket_);
}
void SetEnableBroadcast( bool enableBroadcast )
{
int broadcast = (enableBroadcast) ? 1 : 0; // int on posix
setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast));
}
void SetAllowReuse( bool allowReuse )
{
int reuseAddr = (allowReuse) ? 1 : 0; // int on posix
setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &reuseAddr, sizeof(reuseAddr));
#ifdef __APPLE__
// needed also for OS X - enable multiple listeners for a single port on same network interface
int reusePort = (allowReuse) ? 1 : 0; // int on posix
setsockopt(socket_, SOL_SOCKET, SO_REUSEPORT, &reusePort, sizeof(reusePort));
#endif
}
IpEndpointName LocalEndpointFor( const IpEndpointName& remoteEndpoint ) const
{
assert( isBound_ );
// first connect the socket to the remote server
struct sockaddr_in connectSockAddr;
SockaddrFromIpEndpointName( connectSockAddr, remoteEndpoint );
if (connect(socket_, (struct sockaddr *)&connectSockAddr, sizeof(connectSockAddr)) < 0) {
throw std::runtime_error("unable to connect udp socket\n");
}
// get the address
struct sockaddr_in sockAddr;
std::memset( (char *)&sockAddr, 0, sizeof(sockAddr ) );
socklen_t length = sizeof(sockAddr);
if (getsockname(socket_, (struct sockaddr *)&sockAddr, &length) < 0) {
throw std::runtime_error("unable to getsockname\n");
}
if( isConnected_ ){
// reconnect to the connected address
if (connect(socket_, (struct sockaddr *)&connectedAddr_, sizeof(connectedAddr_)) < 0) {
throw std::runtime_error("unable to connect udp socket\n");
}
}else{
// unconnect from the remote address
struct sockaddr_in unconnectSockAddr;
std::memset( (char *)&unconnectSockAddr, 0, sizeof(unconnectSockAddr ) );
unconnectSockAddr.sin_family = AF_UNSPEC;
// address fields are zero
int connectResult = connect(socket_, (struct sockaddr *)&unconnectSockAddr, sizeof(unconnectSockAddr));
if ( connectResult < 0 && errno != EAFNOSUPPORT ) {
throw std::runtime_error("unable to un-connect udp socket\n");
}
}
return IpEndpointNameFromSockaddr( sockAddr );
}
void Connect( const IpEndpointName& remoteEndpoint )
{
SockaddrFromIpEndpointName( connectedAddr_, remoteEndpoint );
if (connect(socket_, (struct sockaddr *)&connectedAddr_, sizeof(connectedAddr_)) < 0) {
throw std::runtime_error("unable to connect udp socket\n");
}
isConnected_ = true;
}
void Send( const char *data, std::size_t size )
{
assert( isConnected_ );
send( socket_, data, size, 0 );
}
void SendTo( const IpEndpointName& remoteEndpoint, const char *data, std::size_t size )
{
sendToAddr_.sin_addr.s_addr = htonl( remoteEndpoint.address );
sendToAddr_.sin_port = htons( remoteEndpoint.port );
sendto( socket_, data, size, 0, (sockaddr*)&sendToAddr_, sizeof(sendToAddr_) );
}
void Bind( const IpEndpointName& localEndpoint )
{
struct sockaddr_in bindSockAddr;
SockaddrFromIpEndpointName( bindSockAddr, localEndpoint );
if (bind(socket_, (struct sockaddr *)&bindSockAddr, sizeof(bindSockAddr)) < 0) {
throw std::runtime_error("unable to bind udp socket\n");
}
isBound_ = true;
}
bool IsBound() const { return isBound_; }
std::size_t ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, std::size_t size )
{
assert( isBound_ );
struct sockaddr_in fromAddr;
socklen_t fromAddrLen = sizeof(fromAddr);
ssize_t result = recvfrom(socket_, data, size, 0,
(struct sockaddr *) &fromAddr, (socklen_t*)&fromAddrLen);
if( result < 0 )
return 0;
remoteEndpoint.address = ntohl(fromAddr.sin_addr.s_addr);
remoteEndpoint.port = ntohs(fromAddr.sin_port);
return (std::size_t)result;
}
int Socket() { return socket_; }
};
UdpSocket::UdpSocket()
{
impl_ = new Implementation();
}
UdpSocket::~UdpSocket()
{
delete impl_;
}
void UdpSocket::SetEnableBroadcast( bool enableBroadcast )
{
impl_->SetEnableBroadcast( enableBroadcast );
}
void UdpSocket::SetAllowReuse( bool allowReuse )
{
impl_->SetAllowReuse( allowReuse );
}
IpEndpointName UdpSocket::LocalEndpointFor( const IpEndpointName& remoteEndpoint ) const
{
return impl_->LocalEndpointFor( remoteEndpoint );
}
void UdpSocket::Connect( const IpEndpointName& remoteEndpoint )
{
impl_->Connect( remoteEndpoint );
}
void UdpSocket::Send( const char *data, std::size_t size )
{
impl_->Send( data, size );
}
void UdpSocket::SendTo( const IpEndpointName& remoteEndpoint, const char *data, std::size_t size )
{
impl_->SendTo( remoteEndpoint, data, size );
}
void UdpSocket::Bind( const IpEndpointName& localEndpoint )
{
impl_->Bind( localEndpoint );
}
bool UdpSocket::IsBound() const
{
return impl_->IsBound();
}
std::size_t UdpSocket::ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, std::size_t size )
{
return impl_->ReceiveFrom( remoteEndpoint, data, size );
}
struct AttachedTimerListener{
AttachedTimerListener( int id, int p, TimerListener *tl )
: initialDelayMs( id )
, periodMs( p )
, listener( tl ) {}
int initialDelayMs;
int periodMs;
TimerListener *listener;
};
static bool CompareScheduledTimerCalls(
const std::pair< double, AttachedTimerListener > & lhs, const std::pair< double, AttachedTimerListener > & rhs )
{
return lhs.first < rhs.first;
}
SocketReceiveMultiplexer *multiplexerInstanceToAbortWithSigInt_ = 0;
extern "C" /*static*/ void InterruptSignalHandler( int );
/*static*/ void InterruptSignalHandler( int )
{
multiplexerInstanceToAbortWithSigInt_->AsynchronousBreak();
signal( SIGINT, SIG_DFL );
}
class SocketReceiveMultiplexer::Implementation{
std::vector< std::pair< PacketListener*, UdpSocket* > > socketListeners_;
std::vector< AttachedTimerListener > timerListeners_;
volatile bool break_;
int breakPipe_[2]; // [0] is the reader descriptor and [1] the writer
double GetCurrentTimeMs() const
{
struct timeval t;
gettimeofday( &t, 0 );
return ((double)t.tv_sec*1000.) + ((double)t.tv_usec / 1000.);
}
public:
Implementation()
{
if( pipe(breakPipe_) != 0 )
throw std::runtime_error( "creation of asynchronous break pipes failed\n" );
}
~Implementation()
{
close( breakPipe_[0] );
close( breakPipe_[1] );
}
void AttachSocketListener( UdpSocket *socket, PacketListener *listener )
{
assert( std::find( socketListeners_.begin(), socketListeners_.end(), std::make_pair(listener, socket) ) == socketListeners_.end() );
// we don't check that the same socket has been added multiple times, even though this is an error
socketListeners_.push_back( std::make_pair( listener, socket ) );
}
void DetachSocketListener( UdpSocket *socket, PacketListener *listener )
{
std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i =
std::find( socketListeners_.begin(), socketListeners_.end(), std::make_pair(listener, socket) );
assert( i != socketListeners_.end() );
socketListeners_.erase( i );
}
void AttachPeriodicTimerListener( int periodMilliseconds, TimerListener *listener )
{
timerListeners_.push_back( AttachedTimerListener( periodMilliseconds, periodMilliseconds, listener ) );
}
void AttachPeriodicTimerListener( int initialDelayMilliseconds, int periodMilliseconds, TimerListener *listener )
{
timerListeners_.push_back( AttachedTimerListener( initialDelayMilliseconds, periodMilliseconds, listener ) );
}
void DetachPeriodicTimerListener( TimerListener *listener )
{
std::vector< AttachedTimerListener >::iterator i = timerListeners_.begin();
while( i != timerListeners_.end() ){
if( i->listener == listener )
break;
++i;
}
assert( i != timerListeners_.end() );
timerListeners_.erase( i );
}
void Run()
{
break_ = false;
char *data = 0;
try{
// configure the master fd_set for select()
fd_set masterfds, tempfds;
FD_ZERO( &masterfds );
FD_ZERO( &tempfds );
// in addition to listening to the inbound sockets we
// also listen to the asynchronous break pipe, so that AsynchronousBreak()
// can break us out of select() from another thread.
FD_SET( breakPipe_[0], &masterfds );
int fdmax = breakPipe_[0];
for( std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = socketListeners_.begin();
i != socketListeners_.end(); ++i ){
if( fdmax < i->second->impl_->Socket() )
fdmax = i->second->impl_->Socket();
FD_SET( i->second->impl_->Socket(), &masterfds );
}
// configure the timer queue
double currentTimeMs = GetCurrentTimeMs();
// expiry time ms, listener
std::vector< std::pair< double, AttachedTimerListener > > timerQueue_;
for( std::vector< AttachedTimerListener >::iterator i = timerListeners_.begin();
i != timerListeners_.end(); ++i )
timerQueue_.push_back( std::make_pair( currentTimeMs + i->initialDelayMs, *i ) );
std::sort( timerQueue_.begin(), timerQueue_.end(), CompareScheduledTimerCalls );
const int MAX_BUFFER_SIZE = 4098;
data = new char[ MAX_BUFFER_SIZE ];
IpEndpointName remoteEndpoint;
struct timeval timeout;
while( !break_ ){
tempfds = masterfds;
struct timeval *timeoutPtr = 0;
if( !timerQueue_.empty() ){
double timeoutMs = timerQueue_.front().first - GetCurrentTimeMs();
if( timeoutMs < 0 )
timeoutMs = 0;
long timoutSecondsPart = (long)(timeoutMs * .001);
timeout.tv_sec = (time_t)timoutSecondsPart;
// 1000000 microseconds in a second
timeout.tv_usec = (suseconds_t)((timeoutMs - (timoutSecondsPart * 1000)) * 1000);
timeoutPtr = &timeout;
}
if( select( fdmax + 1, &tempfds, 0, 0, timeoutPtr ) < 0 ){
if( break_ ){
break;
}else if( errno == EINTR ){
// on returning an error, select() doesn't clear tempfds.
// so tempfds would remain all set, which would cause read( breakPipe_[0]...
// below to block indefinitely. therefore if select returns EINTR we restart
// the while() loop instead of continuing on to below.
continue;
}else{
throw std::runtime_error("select failed\n");
}
}
if( FD_ISSET( breakPipe_[0], &tempfds ) ){
// clear pending data from the asynchronous break pipe
char c;
read( breakPipe_[0], &c, 1 );
}
if( break_ )
break;
for( std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = socketListeners_.begin();
i != socketListeners_.end(); ++i ){
if( FD_ISSET( i->second->impl_->Socket(), &tempfds ) ){
std::size_t size = i->second->ReceiveFrom( remoteEndpoint, data, MAX_BUFFER_SIZE );
if( size > 0 ){
i->first->ProcessPacket( data, (int)size, remoteEndpoint );
if( break_ )
break;
}
}
}
// execute any expired timers
currentTimeMs = GetCurrentTimeMs();
bool resort = false;
for( std::vector< std::pair< double, AttachedTimerListener > >::iterator i = timerQueue_.begin();
i != timerQueue_.end() && i->first <= currentTimeMs; ++i ){
i->second.listener->TimerExpired();
if( break_ )
break;
i->first += i->second.periodMs;
resort = true;
}
if( resort )
std::sort( timerQueue_.begin(), timerQueue_.end(), CompareScheduledTimerCalls );
}
delete [] data;
}catch(...){
if( data )
delete [] data;
throw;
}
}
void Break()
{
break_ = true;
}
void AsynchronousBreak()
{
break_ = true;
// Send a termination message to the asynchronous break pipe, so select() will return
write( breakPipe_[1], "!", 1 );
}
};
SocketReceiveMultiplexer::SocketReceiveMultiplexer()
{
impl_ = new Implementation();
}
SocketReceiveMultiplexer::~SocketReceiveMultiplexer()
{
delete impl_;
}
void SocketReceiveMultiplexer::AttachSocketListener( UdpSocket *socket, PacketListener *listener )
{
impl_->AttachSocketListener( socket, listener );
}
void SocketReceiveMultiplexer::DetachSocketListener( UdpSocket *socket, PacketListener *listener )
{
impl_->DetachSocketListener( socket, listener );
}
void SocketReceiveMultiplexer::AttachPeriodicTimerListener( int periodMilliseconds, TimerListener *listener )
{
impl_->AttachPeriodicTimerListener( periodMilliseconds, listener );
}
void SocketReceiveMultiplexer::AttachPeriodicTimerListener( int initialDelayMilliseconds, int periodMilliseconds, TimerListener *listener )
{
impl_->AttachPeriodicTimerListener( initialDelayMilliseconds, periodMilliseconds, listener );
}
void SocketReceiveMultiplexer::DetachPeriodicTimerListener( TimerListener *listener )
{
impl_->DetachPeriodicTimerListener( listener );
}
void SocketReceiveMultiplexer::Run()
{
impl_->Run();
}
void SocketReceiveMultiplexer::RunUntilSigInt()
{
assert( multiplexerInstanceToAbortWithSigInt_ == 0 ); /* at present we support only one multiplexer instance running until sig int */
multiplexerInstanceToAbortWithSigInt_ = this;
signal( SIGINT, InterruptSignalHandler );
impl_->Run();
signal( SIGINT, SIG_DFL );
multiplexerInstanceToAbortWithSigInt_ = 0;
}
void SocketReceiveMultiplexer::Break()
{
impl_->Break();
}
void SocketReceiveMultiplexer::AsynchronousBreak()
{
impl_->AsynchronousBreak();
}
| [
"[email protected]"
] | |
2f531fbf4dc48556a0451dce7130c6d4316af534 | 15bd66a84176e002f7bfe113ec073b5f41d6cd03 | /MPI_LargeFile_Partitioner.cpp | 57dab1c5c21b597f8ad85ffd7e84150e0d722a12 | [] | no_license | satishphd/MPI-FilePartitioning | 688a0b08e23d7b33469a5e699c1da51622503a7d | b5eeb0db0f43f78b6fe019911179a07620e822cb | refs/heads/master | 2020-09-29T05:23:45.947598 | 2019-12-11T19:20:23 | 2019-12-11T19:20:23 | 226,963,306 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,332 | cpp | #include "filePartition/MPI_LargeFile_Partitioner.h"
class FileSplits;
void MPI_LargeFile_Partitioner :: finalize()
{
MPI_File_close(&mpi_layer1);
MPI_File_close(&mpi_layer2);
}
int MPI_LargeFile_Partitioner :: initialize(Config &args)
{
rank = args.rank;
MPI_Processes = args.numProcesses;
const char *layer1 = args.getLayer1()->at(2).c_str();
const char *layer2 = args.getLayer2()->at(2).c_str();
// cout<<"MPI layer1 "<<layer1<<endl;
// cout<<"MPI layer2 "<<layer2<<endl;
MPI_Info myinfo;
MPI_Info_create(&myinfo);
MPI_Info_set(myinfo, "access_style", "read_once,sequential");
MPI_Info_set(myinfo, "collective_buffering", "true");
MPI_Info_set(myinfo, "romio_cb_read", "enable");
int ierr1 = MPI_File_open(MPI_COMM_WORLD, layer1, MPI_MODE_RDONLY, myinfo, &mpi_layer1);
int ierr2 = MPI_File_open(MPI_COMM_WORLD, layer2, MPI_MODE_RDONLY, myinfo, &mpi_layer2);
if (ierr1 || ierr2)
//if (ierr1)
{
if (rank == 0)
cout<<" Couldn't open file 1\n"<<endl;
MPI_Finalize();
exit(2);
}
return 0;
}
MPI_File MPI_LargeFile_Partitioner :: initializeLayer(Config &args)
{
rank = args.rank;
MPI_Processes = args.numProcesses;
const char *layer1 = args.getLayer1()->at(2).c_str();
// cout<<"MPI layer1 "<<layer1<<endl;
MPI_Info myinfo;
MPI_Info_create(&myinfo);
MPI_Info_set(myinfo, "access_style", "read_once,sequential");
MPI_Info_set(myinfo, "collective_buffering", "true");
MPI_Info_set(myinfo, "romio_cb_read", "enable");
/* you can add optimizations for write as well like "romio_cb_write" etc */
int ierr1 = MPI_File_open(MPI_COMM_WORLD, layer1, MPI_MODE_RDONLY, myinfo, &mpi_layer1);
//int ierr1 = MPI_File_open(MPI_COMM_WORLD, layer1, MPI_MODE_RDONLY, MPI_INFO_NULL, &mpi_layer1);
if (ierr1)
{
if (rank == 0)
cout<<" Couldn't open file 1\n"<<endl;
MPI_Finalize();
exit(2);
}
return mpi_layer1;
}
pair<FileSplits*,FileSplits*> MPI_LargeFile_Partitioner :: partition()
{
FileSplits* splitLayer1 = partitionLayer(mpi_layer1);
FileSplits* splitLayer2 = partitionLayer(mpi_layer2);
pair<FileSplits*, FileSplits*> p(splitLayer1, splitLayer2);
//pair<FileSplits*, FileSplits*> p(splitLayer1, NULL);
return p;
}
FileSplits* MPI_LargeFile_Partitioner :: partitionLayer(MPI_File mpi_layer)
{
MPI_Offset filesize;
MPI_Offset localsize;
MPI_Offset start;
MPI_Offset end;
char *chunk;
/* figure out who reads what */
MPI_File_get_size(mpi_layer, &filesize);
if(rank == 0) {
//cerr<<"FileSize "<<filesize<<endl;
//fflush(stdout);
}
localsize = filesize/MPI_Processes;
start = rank * localsize;
end = start + localsize - 1;
/* add overlap to the end of everyone's chunk... */
end += OVERLAP;
/* except the last processor, of course */
if (rank == MPI_Processes-1) end = filesize;
localsize = end - start + 1;
//cerr<<rank<<" 1st : "<<start<<" , "<<end<<endl;
//printf("P%d, 1st %lld, %lld, %lld \n", rank, start, end, localsize);
//fflush(stdout);
/* allocate memory */
chunk = (char *)malloc((localsize+1) * sizeof(char));
if(chunk == NULL) {
cerr<<"Error in malloc code 1 for chunk "<<endl;
return NULL;
}
// int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf,
// int count, MPI_Datatype datatype,
// MPI_Status *status)
/* everyone reads in their part */
MPI_File_read_at(mpi_layer, start, chunk, localsize/PACKING_LEN, MPI_CHARS, MPI_STATUS_IGNORE);
chunk[localsize] = '\0';
cout<<"Length of file buffer read "<<strlen(chunk)<<endl;
/*
* everyone calculate what their start and end *really* are by going
* from the first newline after start to the first newline after the
* overlap region starts (eg, after end - overlap + 1)
*/
MPI_Offset locstart, locend;
locstart = 0;
locend = localsize;
//cout<<rank<<" "<<locend<<endl; //<<locstart<<locend
//if(rank==0)
// printf("rank = %d localsize = %d locstart = %d locend = %d \n",rank, localsize, locstart, locend);
if (rank != 0) {
while(chunk[locstart] != '\n')
locstart++;
locstart++;
}
if (rank != MPI_Processes-1) {
locend -= OVERLAP;
while(locend < (localsize+1) && chunk[locend] != '\n') {
locend++;
//assert(locend < (localsize+2));
}
}
localsize = locend-locstart+1;
//fflush(stdout);
//cerr<<rank<<" : "<<locstart<<" , "<<locend<<endl;
//printf("P%d, 2nd %lld : %lld\n", rank, locstart, locend);
fflush(stdout);
assert(locstart < locend);
/* Now let's copy our actual data over into a new array, with no overlaps*/
char *data = (char *)malloc((localsize+1)*sizeof(char));
// if(data == NULL) {
// cerr<<"P"<<rank<<" : Error in malloc code 2 for data "<<localsize<<" "<<locstart<<" "<<locend<<endl;
//
// return NULL;
// }
//MPI_Offset int_max = numeric_limits<int>::max();
//MPI_Offset numBlocks = ceil((float)localsize/int_max);
//MPI_Offset blockSize = int_max;
//printf("int_max = %d, numBlocks = %d \n", int_max, numBlocks);
//cout<<"int max = "<<int_max<<" blcks "<<numBlocks<<endl;
list<string>* contents = new list<string>();
size_t total = 0;
for(int i = 0; i< localsize; i++)
{
data[i] = chunk[i];
}
data[localsize] = '\0';
/*
for(MPI_Offset i = 0; i < numBlocks; i++) {
MPI_Offset runningOfset = i * int_max;
MPI_Offset startOfset = locstart + runningOfset;
if(i == (numBlocks-1))
blockSize = localsize - startOfset;
char *data = (char *)malloc( (1+blockSize) * sizeof(char));
//printf(" i = %d Start Offset = %d, Block Size = %d \n ",i, startOfset, blockSize);
cout<<i<<" "<<"st "<<startOfset<<"blockSize "<<blockSize<<endl;
memcpy( data, &(chunk[startOfset]), blockSize);
data[blockSize] = '\0';
std::stringstream ss(data);
std::string to;
if (data != NULL)
{
while(std::getline(ss,to,'\n')){
//cout << to <<endl;
contents->push_back(to);
total++;
}
}
cout<<"Letter "<<chunk[startOfset]<<endl;
//cout<<"MPI partitioner class total "<<total<<endl<<endl;
free(data);
}*/
cout<<"MPI partitioner class total "<<total<<endl<<endl;
//data[localsize] = '\0';
free(chunk);
FileSplits *splits = new FileSplits();
//splits->write(data);
splits->setContents(contents);
//free(data);
//cout<<"Returning from partionLayer"<<endl;
return splits;
}
| [
"[email protected]"
] | |
a4e9cd31d5ac0ef0eb191b05bf0a2369aa6d2c7b | 35500e33d552292dcf2982ac89bb4d3c2ebff952 | /codels/MonteCarloPrintFunctions.cc | a2ba2789da0417acafbb1a4b336b1741f28cd705 | [] | no_license | newbdez33/rfidPositioner | dae07db02b68ff4ed024fc05b3620649abc3fd81 | 7c14ee151b711ceed3f2636217f0e3b2dcd51208 | refs/heads/master | 2021-01-18T05:18:12.054527 | 2010-02-02T19:40:09 | 2010-02-02T19:40:09 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,639 | cc | /*
* MonteCarloPrintFunctions.cc
*
* Created on: Nov 23, 2009
* Author: acodas
*/
#include "MonteCarloPrintFunctions.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//@tested
//prints a mc_Point
void mc_printPoint(const mc_Point p) {
printf("{x=%g, y=%g, theta=%g}", p.x, p.y, p.theta);
}
//@tested
//prints the matrix A
void mc_printMatrix(const double A[3][3]) {
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
printf("%g ", A[i][j]);
}
printf("\n");
}
}
int mc_printSamples(const char OUTPUT_FILE_NAME[],const mc_Points *currentPoints){
int numberPrinting = MAXMCNSAMPLES;
char * pHome;
char location[128];
pHome = getenv("HOME");
strcpy(location,pHome);
strcat(location,"/simulation/results/");
strcat(location,OUTPUT_FILE_NAME);
FILE* outputFile = fopen(location, "w");
if(outputFile == NULL){
printf("Invalid File to write results. File 'path' == %s \n",location);
return 1;
}
if (numberPrinting > mc_nSamples) {
numberPrinting = mc_nSamples;
}
fprintf(outputFile, "m = [");
int i;
for (i = 0; i < numberPrinting - 1; ++i) {
fprintf(outputFile, "\n\t%lf,\t%lf,\t%lf,\t%.20lf;",
currentPoints->points[i].x, currentPoints->points[i].y,
currentPoints->points[i].theta, currentPoints->weights[i]);
}
fprintf(outputFile, "\n\t%lf,\t%lf,\t%lf,\t%.20lf];",
currentPoints->points[i].x, currentPoints->points[i].y,
currentPoints->points[i].theta, currentPoints->weights[i]);
fprintf(outputFile, "\nparticules = struct('pos',m);\n");
fprintf(outputFile, "simulations = [simulations particules];\n");
fclose(outputFile);
return 0;
}
//prints the current samples with an introduction text
//prints tag detections
void mc_printTagDetections(const TagDetection* tagDetections) {
const TagDetection* aux = tagDetections;
int tagNum = -2;
while (aux != 0) {
if (tagNum == tagNumber(aux->tagid)) {
printf(" %d", aux->antenna);
} else {
tagNum = tagNumber(aux->tagid);
printf("\nTagDetection %d %s - antennas %d", tagNum, aux->tagid,
aux->antenna);
}
aux = aux->next;
}
printf("\n");
}
void mc_printTagsExpected(const TagExpectation* tagsExpected) {
const TagExpectation* aux = tagsExpected;
int tagNum;
while (aux != 0) {
if (tagNum == tagNumber(aux->tagid)) {
printf("\n%s antenna %d - probability %lf ", aux->tagid,
aux->antenna, aux->probability);
} else {
tagNum = tagNumber(aux->tagid);
printf("\nTagExpectation %d %s\n", tagNum, aux->tagid);
printf("\n%s antenna %d - probability %lf ", aux->tagid,
aux->antenna, aux->probability);
}
aux = aux->next;
}
printf("\n");
}
| [
"[email protected]"
] | |
fd48062b7f64ed45b145aa67e6f02c5d5f34479f | 3cb01b55220a367f1a941599f34ad3c413ddd734 | /Project 1/Debug/DirectXTK/Inc/Audio.h | 4a02af43577b968bd09f5748d5d935b4bf587e42 | [
"MIT"
] | permissive | FreeButter/Team-Project-GP | 81d222136490b0f9c9ce76b0d2b6f5fae462d1ac | 86a603fdf936f7e7a95e26286fe321e27931fc6d | refs/heads/master | 2020-04-10T21:03:02.391126 | 2016-10-24T11:32:58 | 2016-10-24T11:32:58 | 68,062,626 | 0 | 0 | null | 2016-10-08T09:01:40 | 2016-09-13T01:30:03 | C++ | UTF-8 | C++ | false | false | 22,252 | h | //--------------------------------------------------------------------------------------
// File: Audio.h
//
// DirectXTK for Audio header
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// http://go.microsoft.com/fwlink/?LinkId=248929
//--------------------------------------------------------------------------------------
#pragma once
#include <objbase.h>
#include <mmreg.h>
#include <audioclient.h>
#if defined(_XBOX_ONE) && defined(_TITLE)
#include <xma2defs.h>
#pragma comment(lib,"acphal.lib")
#endif
#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
#pragma comment(lib,"PhoneAudioSes.lib")
#endif
#ifndef XAUDIO2_HELPER_FUNCTIONS
#define XAUDIO2_HELPER_FUNCTIONS
#endif
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
#if defined(_MSC_VER) && (_MSC_VER < 1700)
#error DirectX Tool Kit for Audio does not support VS 2010 without the DirectX SDK
#endif
#include <xaudio2.h>
#include <xaudio2fx.h>
#include <x3daudio.h>
#include <xapofx.h>
#pragma comment(lib,"xaudio2.lib")
#else
// Using XAudio 2.7 requires the DirectX SDK
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\comdecl.h>
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xaudio2.h>
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xaudio2fx.h>
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xapofx.h>
#pragma warning(push)
#pragma warning( disable : 4005 )
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\x3daudio.h>
#pragma warning(pop)
#pragma comment(lib,"x3daudio.lib")
#pragma comment(lib,"xapofx.lib")
#endif
#include <DirectXMath.h>
#include <stdint.h>
#include <functional>
#include <memory>
#include <string>
#include <vector>
namespace DirectX
{
class SoundEffectInstance;
//----------------------------------------------------------------------------------
struct AudioStatistics
{
size_t playingOneShots; // Number of one-shot sounds currently playing
size_t playingInstances; // Number of sound effect instances currently playing
size_t allocatedInstances; // Number of SoundEffectInstance allocated
size_t allocatedVoices; // Number of XAudio2 voices allocated (standard, 3D, one-shots, and idle one-shots)
size_t allocatedVoices3d; // Number of XAudio2 voices allocated for 3D
size_t allocatedVoicesOneShot; // Number of XAudio2 voices allocated for one-shot sounds
size_t allocatedVoicesIdle; // Number of XAudio2 voices allocated for one-shot sounds but not currently in use
size_t audioBytes; // Total wave data (in bytes) in SoundEffects and in-memory WaveBanks
#if defined(_XBOX_ONE) && defined(_TITLE)
size_t xmaAudioBytes; // Total wave data (in bytes) in SoundEffects and in-memory WaveBanks allocated with ApuAlloc
#endif
};
//----------------------------------------------------------------------------------
class IVoiceNotify
{
public:
virtual void __cdecl OnBufferEnd() = 0;
// Notfication that a voice buffer has finished
// Note this is called from XAudio2's worker thread, so it should perform very minimal and thread-safe operations
virtual void __cdecl OnCriticalError() = 0;
// Notification that the audio engine encountered a critical error
virtual void __cdecl OnReset() = 0;
// Notification of an audio engine reset
virtual void __cdecl OnUpdate() = 0;
// Notification of an audio engine per-frame update (opt-in)
virtual void __cdecl OnDestroyEngine() = 0;
// Notification that the audio engine is being destroyed
virtual void __cdecl OnTrim() = 0;
// Notification of a request to trim the voice pool
virtual void __cdecl GatherStatistics(AudioStatistics& stats) const = 0;
// Contribute to statistics request
};
//----------------------------------------------------------------------------------
enum AUDIO_ENGINE_FLAGS
{
AudioEngine_Default = 0x0,
AudioEngine_EnvironmentalReverb = 0x1,
AudioEngine_ReverbUseFilters = 0x2,
AudioEngine_UseMasteringLimiter = 0x4,
AudioEngine_Debug = 0x10000,
AudioEngine_ThrowOnNoAudioHW = 0x20000,
AudioEngine_DisableVoiceReuse = 0x40000,
};
inline AUDIO_ENGINE_FLAGS operator|(AUDIO_ENGINE_FLAGS a, AUDIO_ENGINE_FLAGS b) { return static_cast<AUDIO_ENGINE_FLAGS>(static_cast<int>(a) | static_cast<int>(b)); }
enum SOUND_EFFECT_INSTANCE_FLAGS
{
SoundEffectInstance_Default = 0x0,
SoundEffectInstance_Use3D = 0x1,
SoundEffectInstance_ReverbUseFilters = 0x2,
SoundEffectInstance_NoSetPitch = 0x4,
SoundEffectInstance_UseRedirectLFE = 0x10000,
};
inline SOUND_EFFECT_INSTANCE_FLAGS operator|(SOUND_EFFECT_INSTANCE_FLAGS a, SOUND_EFFECT_INSTANCE_FLAGS b) { return static_cast<SOUND_EFFECT_INSTANCE_FLAGS>(static_cast<int>(a) | static_cast<int>(b)); }
enum AUDIO_ENGINE_REVERB
{
Reverb_Off,
Reverb_Default,
Reverb_Generic,
Reverb_Forest,
Reverb_PaddedCell,
Reverb_Room,
Reverb_Bathroom,
Reverb_LivingRoom,
Reverb_StoneRoom,
Reverb_Auditorium,
Reverb_ConcertHall,
Reverb_Cave,
Reverb_Arena,
Reverb_Hangar,
Reverb_CarpetedHallway,
Reverb_Hallway,
Reverb_StoneCorridor,
Reverb_Alley,
Reverb_City,
Reverb_Mountains,
Reverb_Quarry,
Reverb_Plain,
Reverb_ParkingLot,
Reverb_SewerPipe,
Reverb_Underwater,
Reverb_SmallRoom,
Reverb_MediumRoom,
Reverb_LargeRoom,
Reverb_MediumHall,
Reverb_LargeHall,
Reverb_Plate,
Reverb_MAX
};
enum SoundState
{
STOPPED = 0,
PLAYING,
PAUSED
};
//----------------------------------------------------------------------------------
class AudioEngine
{
public:
explicit AudioEngine(AUDIO_ENGINE_FLAGS flags = AudioEngine_Default, _In_opt_ const WAVEFORMATEX* wfx = nullptr, _In_opt_z_ const wchar_t* deviceId = nullptr,
AUDIO_STREAM_CATEGORY category = AudioCategory_GameEffects);
AudioEngine(AudioEngine&& moveFrom);
AudioEngine& operator= (AudioEngine&& moveFrom);
AudioEngine(AudioEngine const&) = delete;
AudioEngine& operator= (AudioEngine const&) = delete;
virtual ~AudioEngine();
bool __cdecl Update();
// Performs per-frame processing for the audio engine, returns false if in 'silent mode'
bool __cdecl Reset(_In_opt_ const WAVEFORMATEX* wfx = nullptr, _In_opt_z_ const wchar_t* deviceId = nullptr);
// Reset audio engine from critical error/silent mode using a new device; can also 'migrate' the graph
// Returns true if succesfully reset, false if in 'silent mode' due to no default device
// Note: One shots are lost, all SoundEffectInstances are in the STOPPED state after successful reset
void __cdecl Suspend();
void __cdecl Resume();
// Suspend/resumes audio processing (i.e. global pause/resume)
float __cdecl GetMasterVolume() const;
void __cdecl SetMasterVolume(float volume);
// Master volume property for all sounds
void __cdecl SetReverb(AUDIO_ENGINE_REVERB reverb);
void __cdecl SetReverb(_In_opt_ const XAUDIO2FX_REVERB_PARAMETERS* native);
// Sets environmental reverb for 3D positional audio (if active)
void __cdecl SetMasteringLimit(int release, int loudness);
// Sets the mastering volume limiter properties (if active)
AudioStatistics __cdecl GetStatistics() const;
// Gathers audio engine statistics
WAVEFORMATEXTENSIBLE __cdecl GetOutputFormat() const;
// Returns the format consumed by the mastering voice (which is the same as the device output if defaults are used)
uint32_t __cdecl GetChannelMask() const;
// Returns the output channel mask
int __cdecl GetOutputChannels() const;
// Returns the number of output channels
bool __cdecl IsAudioDevicePresent() const;
// Returns true if the audio graph is operating normally, false if in 'silent mode'
bool __cdecl IsCriticalError() const;
// Returns true if the audio graph is halted due to a critical error (which also places the engine into 'silent mode')
// Voice pool management.
void __cdecl SetDefaultSampleRate(int sampleRate);
// Sample rate for voices in the reuse pool (defaults to 44100)
void __cdecl SetMaxVoicePool(size_t maxOneShots, size_t maxInstances);
// Maximum number of voices to allocate for one-shots and instances
// Note: one-shots over this limit are ignored; too many instance voices throws an exception
void __cdecl TrimVoicePool();
// Releases any currently unused voices
// Internal-use functions
void __cdecl AllocateVoice(_In_ const WAVEFORMATEX* wfx, SOUND_EFFECT_INSTANCE_FLAGS flags, bool oneshot, _Outptr_result_maybenull_ IXAudio2SourceVoice** voice);
void __cdecl DestroyVoice(_In_ IXAudio2SourceVoice* voice);
// Should only be called for instance voices, not one-shots
void __cdecl RegisterNotify(_In_ IVoiceNotify* notify, bool usesUpdate);
void __cdecl UnregisterNotify(_In_ IVoiceNotify* notify, bool usesOneShots, bool usesUpdate);
// XAudio2 interface access
IXAudio2* __cdecl GetInterface() const;
IXAudio2MasteringVoice* __cdecl GetMasterVoice() const;
IXAudio2SubmixVoice* __cdecl GetReverbVoice() const;
X3DAUDIO_HANDLE& __cdecl Get3DHandle() const;
// Static functions
struct RendererDetail
{
std::wstring deviceId;
std::wstring description;
};
static std::vector<RendererDetail> __cdecl GetRendererDetails();
// Returns a list of valid audio endpoint devices
private:
// Private implementation.
class Impl;
std::unique_ptr<Impl> pImpl;
};
//----------------------------------------------------------------------------------
class WaveBank
{
public:
WaveBank(_In_ AudioEngine* engine, _In_z_ const wchar_t* wbFileName);
WaveBank(WaveBank&& moveFrom);
WaveBank& operator= (WaveBank&& moveFrom);
WaveBank(WaveBank const&) = delete;
WaveBank& operator= (WaveBank const&) = delete;
virtual ~WaveBank();
void __cdecl Play(int index);
void __cdecl Play(int index, float volume, float pitch, float pan);
void __cdecl Play(_In_z_ const char* name);
void __cdecl Play(_In_z_ const char* name, float volume, float pitch, float pan);
std::unique_ptr<SoundEffectInstance> __cdecl CreateInstance(int index, SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
std::unique_ptr<SoundEffectInstance> __cdecl CreateInstance(_In_z_ const char* name, SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
bool __cdecl IsPrepared() const;
bool __cdecl IsInUse() const;
bool __cdecl IsStreamingBank() const;
size_t __cdecl GetSampleSizeInBytes(int index) const;
// Returns size of wave audio data
size_t __cdecl GetSampleDuration(int index) const;
// Returns the duration in samples
size_t __cdecl GetSampleDurationMS(int index) const;
// Returns the duration in milliseconds
const WAVEFORMATEX* __cdecl GetFormat(int index, _Out_writes_bytes_(maxsize) WAVEFORMATEX* wfx, size_t maxsize) const;
int __cdecl Find(_In_z_ const char* name) const;
#if defined(_XBOX_ONE) || (_WIN32_WINNT < _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= 0x0A00 /*_WIN32_WINNT_WIN10*/ )
bool __cdecl FillSubmitBuffer(int index, _Out_ XAUDIO2_BUFFER& buffer, _Out_ XAUDIO2_BUFFER_WMA& wmaBuffer) const;
#else
void __cdecl FillSubmitBuffer(int index, _Out_ XAUDIO2_BUFFER& buffer) const;
#endif
private:
// Private implementation.
class Impl;
std::unique_ptr<Impl> pImpl;
// Private interface
void __cdecl UnregisterInstance(_In_ SoundEffectInstance* instance);
friend class SoundEffectInstance;
};
//----------------------------------------------------------------------------------
class SoundEffect
{
public:
SoundEffect(_In_ AudioEngine* engine, _In_z_ const wchar_t* waveFileName);
SoundEffect(_In_ AudioEngine* engine, _Inout_ std::unique_ptr<uint8_t[]>& wavData,
_In_ const WAVEFORMATEX* wfx, _In_reads_bytes_(audioBytes) const uint8_t* startAudio, size_t audioBytes);
SoundEffect(_In_ AudioEngine* engine, _Inout_ std::unique_ptr<uint8_t[]>& wavData,
_In_ const WAVEFORMATEX* wfx, _In_reads_bytes_(audioBytes) const uint8_t* startAudio, size_t audioBytes,
uint32_t loopStart, uint32_t loopLength);
#if defined(_XBOX_ONE) || (_WIN32_WINNT < _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= 0x0A00 /*_WIN32_WINNT_WIN10*/)
SoundEffect(_In_ AudioEngine* engine, _Inout_ std::unique_ptr<uint8_t[]>& wavData,
_In_ const WAVEFORMATEX* wfx, _In_reads_bytes_(audioBytes) const uint8_t* startAudio, size_t audioBytes,
_In_reads_(seekCount) const uint32_t* seekTable, size_t seekCount);
#endif
SoundEffect(SoundEffect&& moveFrom);
SoundEffect& operator= (SoundEffect&& moveFrom);
SoundEffect(SoundEffect const&) = delete;
SoundEffect& operator= (SoundEffect const&) = delete;
virtual ~SoundEffect();
void __cdecl Play();
void __cdecl Play(float volume, float pitch, float pan);
std::unique_ptr<SoundEffectInstance> __cdecl CreateInstance(SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
bool __cdecl IsInUse() const;
size_t __cdecl GetSampleSizeInBytes() const;
// Returns size of wave audio data
size_t __cdecl GetSampleDuration() const;
// Returns the duration in samples
size_t __cdecl GetSampleDurationMS() const;
// Returns the duration in milliseconds
const WAVEFORMATEX* __cdecl GetFormat() const;
#if defined(_XBOX_ONE) || (_WIN32_WINNT < _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= 0x0A00 /*_WIN32_WINNT_WIN10*/)
bool __cdecl FillSubmitBuffer(_Out_ XAUDIO2_BUFFER& buffer, _Out_ XAUDIO2_BUFFER_WMA& wmaBuffer) const;
#else
void __cdecl FillSubmitBuffer(_Out_ XAUDIO2_BUFFER& buffer) const;
#endif
private:
// Private implementation.
class Impl;
std::unique_ptr<Impl> pImpl;
// Private interface
void __cdecl UnregisterInstance(_In_ SoundEffectInstance* instance);
friend class SoundEffectInstance;
};
//----------------------------------------------------------------------------------
struct AudioListener : public X3DAUDIO_LISTENER
{
AudioListener()
{
memset(this, 0, sizeof(X3DAUDIO_LISTENER));
OrientFront.z = -1.f;
OrientTop.y = 1.f;
}
void XM_CALLCONV SetPosition(FXMVECTOR v)
{
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), v);
}
void __cdecl SetPosition(const XMFLOAT3& pos)
{
Position.x = pos.x;
Position.y = pos.y;
Position.z = pos.z;
}
void XM_CALLCONV SetVelocity(FXMVECTOR v)
{
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
}
void __cdecl SetVelocity(const XMFLOAT3& vel)
{
Velocity.x = vel.x;
Velocity.y = vel.y;
Velocity.z = vel.z;
}
void XM_CALLCONV SetOrientation(FXMVECTOR forward, FXMVECTOR up)
{
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
}
void __cdecl SetOrientation(const XMFLOAT3& forward, const XMFLOAT3& up)
{
OrientFront.x = forward.x; OrientTop.x = up.x;
OrientFront.y = forward.y; OrientTop.y = up.y;
OrientFront.z = forward.z; OrientTop.z = up.z;
}
void XM_CALLCONV SetOrientationFromQuaternion(FXMVECTOR quat)
{
XMVECTOR forward = XMVector3Rotate(g_XMIdentityR2, quat);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
XMVECTOR up = XMVector3Rotate(g_XMIdentityR1, quat);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
}
void XM_CALLCONV Update(FXMVECTOR newPos, XMVECTOR upDir, float dt)
// Updates velocity and orientation by tracking changes in position over time...
{
if (dt > 0.f)
{
XMVECTOR lastPos = XMLoadFloat3(reinterpret_cast<const XMFLOAT3*>(&Position));
XMVECTOR vDelta = (newPos - lastPos);
XMVECTOR v = vDelta / dt;
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
vDelta = XMVector3Normalize(vDelta);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), vDelta);
v = XMVector3Cross(upDir, vDelta);
v = XMVector3Normalize(v);
v = XMVector3Cross(vDelta, v);
v = XMVector3Normalize(v);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), v);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), newPos);
}
}
};
//----------------------------------------------------------------------------------
struct AudioEmitter : public X3DAUDIO_EMITTER
{
float EmitterAzimuths[XAUDIO2_MAX_AUDIO_CHANNELS];
AudioEmitter()
{
memset(this, 0, sizeof(X3DAUDIO_EMITTER));
memset(EmitterAzimuths, 0, sizeof(EmitterAzimuths));
OrientFront.z = -1.f;
OrientTop.y =
ChannelRadius =
CurveDistanceScaler =
DopplerScaler = 1.f;
ChannelCount = 1;
pChannelAzimuths = EmitterAzimuths;
InnerRadiusAngle = X3DAUDIO_PI / 4.0f;
}
void XM_CALLCONV SetPosition(FXMVECTOR v)
{
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), v);
}
void __cdecl SetPosition(const XMFLOAT3& pos)
{
Position.x = pos.x;
Position.y = pos.y;
Position.z = pos.z;
}
void XM_CALLCONV SetVelocity(FXMVECTOR v)
{
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
}
void __cdecl SetVelocity(const XMFLOAT3& vel)
{
Velocity.x = vel.x;
Velocity.y = vel.y;
Velocity.z = vel.z;
}
void XM_CALLCONV SetOrientation(FXMVECTOR forward, FXMVECTOR up)
{
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
}
void __cdecl SetOrientation(const XMFLOAT3& forward, const XMFLOAT3& up)
{
OrientFront.x = forward.x; OrientTop.x = up.x;
OrientFront.y = forward.y; OrientTop.y = up.y;
OrientFront.z = forward.z; OrientTop.z = up.z;
}
void XM_CALLCONV SetOrientationFromQuaternion(FXMVECTOR quat)
{
XMVECTOR forward = XMVector3Rotate(g_XMIdentityR2, quat);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), forward);
XMVECTOR up = XMVector3Rotate(g_XMIdentityR1, quat);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), up);
}
void XM_CALLCONV Update(FXMVECTOR newPos, XMVECTOR upDir, float dt)
// Updates velocity and orientation by tracking changes in position over time...
{
if (dt > 0.f)
{
XMVECTOR lastPos = XMLoadFloat3(reinterpret_cast<const XMFLOAT3*>(&Position));
XMVECTOR vDelta = (newPos - lastPos);
XMVECTOR v = vDelta / dt;
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Velocity), v);
vDelta = XMVector3Normalize(vDelta);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientFront), vDelta);
v = XMVector3Cross(upDir, vDelta);
v = XMVector3Normalize(v);
v = XMVector3Cross(vDelta, v);
v = XMVector3Normalize(v);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&OrientTop), v);
XMStoreFloat3(reinterpret_cast<XMFLOAT3*>(&Position), newPos);
}
}
};
//----------------------------------------------------------------------------------
class SoundEffectInstance
{
public:
SoundEffectInstance(SoundEffectInstance&& moveFrom);
SoundEffectInstance& operator= (SoundEffectInstance&& moveFrom);
SoundEffectInstance(SoundEffectInstance const&) = delete;
SoundEffectInstance& operator= (SoundEffectInstance const&) = delete;
virtual ~SoundEffectInstance();
void __cdecl Play(bool loop = false);
void __cdecl Stop(bool immediate = true);
void __cdecl Pause();
void __cdecl Resume();
void __cdecl SetVolume(float volume);
void __cdecl SetPitch(float pitch);
void __cdecl SetPan(float pan);
void __cdecl Apply3D(const AudioListener& listener, const AudioEmitter& emitter, bool rhcoords = true);
bool __cdecl IsLooped() const;
SoundState __cdecl GetState();
// Notifications.
void __cdecl OnDestroyParent();
private:
// Private implementation.
class Impl;
std::unique_ptr<Impl> pImpl;
// Private constructors
SoundEffectInstance(_In_ AudioEngine* engine, _In_ SoundEffect* effect, SOUND_EFFECT_INSTANCE_FLAGS flags);
SoundEffectInstance(_In_ AudioEngine* engine, _In_ WaveBank* effect, int index, SOUND_EFFECT_INSTANCE_FLAGS flags);
friend std::unique_ptr<SoundEffectInstance> __cdecl SoundEffect::CreateInstance(SOUND_EFFECT_INSTANCE_FLAGS);
friend std::unique_ptr<SoundEffectInstance> __cdecl WaveBank::CreateInstance(int, SOUND_EFFECT_INSTANCE_FLAGS);
};
//----------------------------------------------------------------------------------
class DynamicSoundEffectInstance
{
public:
DynamicSoundEffectInstance(_In_ AudioEngine* engine,
_In_opt_ std::function<void __cdecl(DynamicSoundEffectInstance*)> bufferNeeded,
int sampleRate, int channels, int sampleBits = 16,
SOUND_EFFECT_INSTANCE_FLAGS flags = SoundEffectInstance_Default);
DynamicSoundEffectInstance(DynamicSoundEffectInstance&& moveFrom);
DynamicSoundEffectInstance& operator= (DynamicSoundEffectInstance&& moveFrom);
DynamicSoundEffectInstance(DynamicSoundEffectInstance const&) = delete;
DynamicSoundEffectInstance& operator= (DynamicSoundEffectInstance const&) = delete;
virtual ~DynamicSoundEffectInstance();
void __cdecl Play();
void __cdecl Stop(bool immediate = true);
void __cdecl Pause();
void __cdecl Resume();
void __cdecl SetVolume(float volume);
void __cdecl SetPitch(float pitch);
void __cdecl SetPan(float pan);
void __cdecl Apply3D(const AudioListener& listener, const AudioEmitter& emitter, bool rhcoords = true);
void __cdecl SubmitBuffer(_In_reads_bytes_(audioBytes) const uint8_t* pAudioData, size_t audioBytes);
void __cdecl SubmitBuffer(_In_reads_bytes_(audioBytes) const uint8_t* pAudioData, uint32_t offset, size_t audioBytes);
SoundState __cdecl GetState();
size_t __cdecl GetSampleDuration(size_t bytes) const;
// Returns duration in samples of a buffer of a given size
size_t __cdecl GetSampleDurationMS(size_t bytes) const;
// Returns duration in milliseconds of a buffer of a given size
size_t __cdecl GetSampleSizeInBytes(uint64_t duration) const;
// Returns size of a buffer for a duration given in milliseconds
int __cdecl GetPendingBufferCount() const;
const WAVEFORMATEX* __cdecl GetFormat() const;
private:
// Private implementation.
class Impl;
std::unique_ptr<Impl> pImpl;
};
}
| [
"[email protected]"
] | |
4950cddf5d261c95d4dad47f3c11b365ec291db2 | e592a5d2b07bf548d8229c38f8f95f4e174b1346 | /longest_palindrome_substring.cpp | 3f186a3770613004cef3352d4b56c013e77889bc | [] | no_license | Abhi-1725/DSA-cpp | 74d2169010c1d5604db47592b4e01a397f8b6250 | ec546743d7ef193472dde1dc5068334f452c5e4b | refs/heads/master | 2022-12-07T21:41:35.669581 | 2020-09-02T14:35:31 | 2020-09-02T14:35:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 977 | cpp | /* WAF that, given a string, returns its longest palindromic substring
A palindromic is defined as a string that's written the same forward
and backward. Note that single-character strings are palindromes.
You can assume that there will only be one longest palindromic substring.
*/
#include<iostream>
#include <string>
using namespace std;
bool isPalindrome(string str);
// O(n^3) time | O(1) space
string longestPalindromicSubstring(string str)
{
string longest = "";
for(int i = 0; i < str.length(); i++)
{
for(int j = 0; j < str.length(); j++)
{
string substring = str.substr(i, j + 1 - i);
if(substring.length() > longest.length() && isPalindrome(substring))
{
longest = substring;
}
}
}
return longest;
}
bool isPalindrome(string str)
{
int leftIdx = 0;
int rightIdx = str.length() - 1;
while(leftIdx < rightIdx)
{
if(str[leftIdx] != str[rightIdx])
{
return false;
}
leftIdx++;
rightIdx--;
}
return true;
}
| [
"[email protected]"
] | |
2f12208ccd9757727299b0a266fce138668b5bb6 | 0c7f6eb2da04fc478cf417b6f6ff7d7ddb3d53be | /src/checkpoints.cpp | cc83d3d2776703ef0a6d2f4b5a326db998556a8e | [
"MIT"
] | permissive | etcdev/EntropyCoins | 425571efe9215eec223df0347e8f9a141fbdda30 | f2d86507ddca3082559531fe4c427b75937569e0 | refs/heads/master | 2016-08-04T18:41:08.491191 | 2014-06-11T01:47:15 | 2014-06-11T01:47:15 | 17,300,445 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,922 | cpp | // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/foreach.hpp>
#include "checkpoints.h"
#include "main.h"
#include "uint256.h"
namespace Checkpoints
{
typedef std::map<int, uint256> MapCheckpoints;
// How many times we expect transactions after the last checkpoint to
// be slower. This number is a compromise, as it can't be accurate for
// every system. When reindexing from a fast disk with a slow CPU, it
// can be up to 20, while when downloading from a slow network with a
// fast multicore CPU, it won't be much higher than 1.
static const double fSigcheckVerificationFactor = 5.0;
struct CCheckpointData {
const MapCheckpoints *mapCheckpoints;
int64 nTimeLastCheckpoint;
int64 nTransactionsLastCheckpoint;
double fTransactionsPerDay;
};
// What makes a good checkpoint block?
// + Is surrounded by blocks with reasonable timestamps
// (no blocks before with a timestamp after, none after with
// timestamp before)
// + Contains no strange transactions
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, uint256("0x8b7020a5f83d7c90ca2e6a1685a5c21db5afff52916539ccf06feb38e96d0552"))
( 1, uint256("0xa542e0211c11443ce09247c65f30e2a79314b33a0fb992caba5f456689ded041"))
( 49476, uint256("0x9fc075c175271abddf9cc7b8590ea3244e470ae2e0daf2c0f0186c1cb9eed6fb"))
( 51007, uint256("0xa03b2342ef9d5bb5501f6ceaa0a97ecf5fb787ffbe29d776ef78449bb2f92c59"))
( 93528, uint256("0x2115a4dd28cb1b5479949c61f91c05469f21eb3608e347ffe76bcca8e38d6ccc"))
;
static const CCheckpointData data = {
&mapCheckpoints,
1402034580, // * UNIX timestamp of last checkpoint block
106002, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
8000.0 // * estimated number of transactions per day after checkpoint
};
static MapCheckpoints mapCheckpointsTestnet =
boost::assign::map_list_of
( 546, uint256("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70"))
( 35000, uint256("2af959ab4f12111ce947479bfcef16702485f04afd95210aa90fde7d1e4a64ad"))
;
static const CCheckpointData dataTestnet = {
&mapCheckpointsTestnet,
1369685559,
37581,
300
};
const CCheckpointData &Checkpoints() {
if (fTestNet)
return dataTestnet;
else
return data;
}
bool CheckBlock(int nHeight, const uint256& hash)
{
if (fTestNet) return true; // Testnet has no checkpoints
if (!GetBoolArg("-checkpoints", true))
return true;
const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
MapCheckpoints::const_iterator i = checkpoints.find(nHeight);
if (i == checkpoints.end()) return true;
//[[REMOVE
return hash == i->second;
//put back to generate genesis block
//return true;
}
// Guess how far we are in the verification process at the given block index
double GuessVerificationProgress(CBlockIndex *pindex) {
if (pindex==NULL)
return 0.0;
int64 nNow = time(NULL);
double fWorkBefore = 0.0; // Amount of work done before pindex
double fWorkAfter = 0.0; // Amount of work left after pindex (estimated)
// Work is defined as: 1.0 per transaction before the last checkoint, and
// fSigcheckVerificationFactor per transaction after.
const CCheckpointData &data = Checkpoints();
if (pindex->nChainTx <= data.nTransactionsLastCheckpoint) {
double nCheapBefore = pindex->nChainTx;
double nCheapAfter = data.nTransactionsLastCheckpoint - pindex->nChainTx;
double nExpensiveAfter = (nNow - data.nTimeLastCheckpoint)/86400.0*data.fTransactionsPerDay;
fWorkBefore = nCheapBefore;
fWorkAfter = nCheapAfter + nExpensiveAfter*fSigcheckVerificationFactor;
} else {
double nCheapBefore = data.nTransactionsLastCheckpoint;
double nExpensiveBefore = pindex->nChainTx - data.nTransactionsLastCheckpoint;
double nExpensiveAfter = (nNow - pindex->nTime)/86400.0*data.fTransactionsPerDay;
fWorkBefore = nCheapBefore + nExpensiveBefore*fSigcheckVerificationFactor;
fWorkAfter = nExpensiveAfter*fSigcheckVerificationFactor;
}
return fWorkBefore / (fWorkBefore + fWorkAfter);
}
int GetTotalBlocksEstimate()
{
if (fTestNet) return 0; // Testnet has no checkpoints
if (!GetBoolArg("-checkpoints", true))
return 0;
const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
//[[[REMOVE
return checkpoints.rbegin()->first;
// put back to generate genesis block
//return 0;
}
CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex)
{
if (fTestNet) return NULL; // Testnet has no checkpoints
if (!GetBoolArg("-checkpoints", true))
return NULL;
const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints)
{
const uint256& hash = i.second;
std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash);
if (t != mapBlockIndex.end())
//[[[REMOVE
return t->second;
//put back to generate genesis block
//return NULL;
}
return NULL;
}
}
| [
"[email protected]"
] | |
4bbb24821de1836b59303b8e32234c74e3afa442 | 399705334f88e0b88adb86163c988d9e1c24314a | /Practise/Hackerrank/Equal.cpp | ee84f7bbcf17134e25d6e89d20dc571111afd6a1 | [] | no_license | shivangstreak/comp | d4d27b6726291d29d9216b632127399f4c7cf18b | 0ba7f89d6cd6f548449fdbbbff19c2fec42579c6 | refs/heads/master | 2023-08-13T02:53:07.867755 | 2023-08-07T08:01:52 | 2023-08-07T08:01:52 | 380,742,432 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 539 | cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=10005;
int arr[N];
ll ops(ll x){
return x/5+(x%5)/2+((x%5)%2);
}
int main(){
int n,t;scanf("%d",&t);
while(t--){
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d",&arr[i]);
}
int mn=*min_element(arr,arr+n);
ll mn1=INT_MAX;
ll sum=0;
for(int i=0;i<=5;i++){
sum=0;
for(int j=0;j<n;j++){
sum+=ops((ll)arr[j]-(ll)(mn-i));
}
if(sum<mn1){
mn1=sum;
}
}
printf("%lld\n",mn1);
}
return 0;
}
| [
"[email protected]"
] | |
0733a48cd65be28dd995c9f106b0fd97955bb541 | 8295a6c1cb2a09055fc628b8cbc8f7a8cb1d3723 | /cpp/ex1/src/bench_dijkstra.cpp | 787ef84f63da602a6816b013b7e994a20647b294 | [] | no_license | leochatain/inf5016 | e430c541d1e8b47e1969abf09482587db55a44d9 | 5baed0901821d2181511c3e45741717c2c7cf9c0 | refs/heads/master | 2021-01-20T10:46:56.568704 | 2012-12-29T05:55:52 | 2012-12-29T05:55:52 | 5,690,233 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,248 | cpp | #include <cstdio>
#include <cstring>
#include <iostream>
#include <fstream>
#include <vector>
#include <ctime>
#include "binary_heap.h"
#include "dijkstra.h"
#include "graph.h"
using namespace std;
using namespace inf5016;
const int ERROR = -1;
const int HELP = 0;
const int PROGRAM = 1;
bool comp(const Edge a, const Edge b) {
return a.cost < b.cost;
}
int parse_args(int argc, char* argv[], int& num_bench, string& graph_path);
vector<pair<int, int> > parse_bench(ifstream& in);
Graph parse_graph(ifstream& in);
void print_help();
int main(int argc, char** argv) {
int num_bench;
string graph_path;
switch (parse_args(argc, argv, num_bench, graph_path)) {
case ERROR:
return ERROR;
case HELP:
print_help();
return HELP;
};
// Parse graph and benchmarks.
ifstream graph_file(graph_path.c_str());
const Graph& graph = parse_graph(graph_file);
Dijkstra dijkstra;
// Run benchmarks.
srand((int)time(0));
double sum = 0;
for (int i = 0; i < num_bench; i++) {
int src = rand() % graph.size();
int dst = rand() % (graph.size() - 1);
if (dst == src) dst = graph.size() -1;
time_t init_time = clock();
int distance = dijkstra.run(graph, src, dst);
time_t end_time = clock();
sum += (end_time - init_time) / (double)CLOCKS_PER_SEC;
}
cout << sum / (double) num_bench << endl;
}
int parse_args(int argc, char* argv[], int& num_bench, string& graph_path) {
if (argc < 3) {
return HELP;
}
for (int i = 1; i < argc; i++) {
if (!(strcmp(argv[i], "-b"))) {
num_bench = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-g")) {
graph_path = argv[++i];
} else {
cout << "Unknown option " << argv[i] << endl;
return ERROR;
}
}
return PROGRAM;
}
Graph parse_graph(ifstream& in) {
Graph g;
string line;
while (getline(in, line)) {
if (line[0] == 'a') {
int u, v, w;
sscanf(line.c_str(), "a %d %d %d", &u, &v, &w);
g.put(u, v, w);
}
}
return g;
}
void print_help() {
cout << "ex1 - By Leo Chatain ([email protected])" << endl << endl;
cout << "-b Specifies the number of benchmarks (they're all random)"
<< endl
<< "-g Specifies the graph file." << endl;
}
| [
"[email protected]"
] | |
1320fda8ea20ab8b3f37b1891fe3511a2d0aa956 | 977d375905ced27aab3f40d152d78a2506501571 | /Source/GameDevWeekendDemo/Private/DemoGameInstance.cpp | 0b8e42a4be51a50b00e2d9fb937f16dcc39556ac | [] | no_license | Samukus/GameDevWeekendDemo | 49cb14cad5643ae20694b05e7649856a92d84d19 | 6146cc5369baf584f8a77bafd7c698196fc166b9 | refs/heads/master | 2023-07-11T00:32:24.094282 | 2021-08-12T14:27:28 | 2021-08-12T14:27:28 | 395,038,629 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,759 | cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "DemoGameInstance.h"
#include "UObject/Class.h"
#include "Interfaces/OnlineIdentityInterface.h"
#include "ConfigDemonstration.h"
void UDemoGameInstance::Init() {
Super::Init();
OSS_Native = IOnlineSubsystem::GetByPlatform();
OSS_Default = IOnlineSubsystem::Get();
if (OSS_Default)
{
OSS_Default->GetIdentityInterface()->AddOnLoginCompleteDelegate_Handle(0, FOnLoginCompleteDelegate::CreateUObject(this, &UDemoGameInstance::OnLoginComplete));
}
}
void UDemoGameInstance::Shutdown()
{
Super::Shutdown();
}
void UDemoGameInstance::OnLoginComplete(int32 LocalUserNum, bool bWasSuccessful,
const FUniqueNetId& UserId, const FString& Error)
{
LogEventDelegate.Broadcast(FString::Format(TEXT("Autologin[{0}]: {1}, {2}\n"),
{UserId.ToString(), bWasSuccessful ? TEXT("Succesfull") : TEXT("Error"), Error}));
}
// Config Demo
FString UDemoGameInstance::GetPlatformConfigProperty()
{
return GetDefault<UConfigDemonstration>()->PlatformProperty;
}
FString UDemoGameInstance::GetDefaultConfigProperty()
{
return GetDefault<UConfigDemonstration>()->DefaultProperty;
}
// OSS by config Demo
FString UDemoGameInstance::GetNativeOSSServiceName() {
if (OSS_Native)
{
return OSS_Native->GetOnlineServiceName().ToString();
}
return TEXT("None");
}
FString UDemoGameInstance::GetDefaultOSSServiceName() {
if (OSS_Default) {
return OSS_Default->GetOnlineServiceName().ToString();
}
return TEXT("None");
}
// OSS identity inheritance demo
void UDemoGameInstance::OSSPlatformLoginDemo()
{
if (OSS_Default) {
OSS_Default->GetIdentityInterface()->AutoLogin(0);
}
} | [
"[email protected]"
] | |
3293ebcc9798437f1a0af19667f165c2e709238e | 17021f288a57ec5af71ac038b3de9de45f10f353 | /BitManipulation/LC751IPToCIDR.cpp | cf1a0c6478715592f1051d5b4368d19eab615804 | [] | no_license | CSStudySession/AlgoInCpp | 17895441df545cf6a177e84f85a1c4bcf13ea88e | 44dcea21406a37d6ed015850d12542184f7b52d9 | refs/heads/master | 2022-09-30T15:58:47.283730 | 2022-08-27T09:08:30 | 2022-08-27T09:08:30 | 223,360,180 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,886 | cpp | //
// Created by Aaron Liu on 9/12/20.
//
#include <vector>
#include <string>
#include <cmath>
#include <iostream>
using namespace std;
class LC751 {
public:
vector<string> ipToCIDR(string ip, int n) {
vector<string> ret;
long ipNum = 0;
string buffer;
// convert ip from string to long type
for (int i = 0 ; i <= ip.size(); i++) {
if (i == ip.size() || ip[i] == '.') {
cout << "buffer: " << buffer << " ";
ipNum |= stoi(buffer);
cout << "ipNum :" << ipNum << endl;
if (i != ip.size()) ipNum <<= 8;
buffer.clear();
} else {
buffer.append(1, ip[i]);
}
}
// edage cases: ip: "0.0.0.0"
if (ipNum == 0) {
for (int i = 0; i < n; i++) {
string tmp = "0.0.0.";
tmp += to_string(i);
tmp += "/32";
ret.push_back(tmp);
}
return ret;
}
while (n > 0) {
long delta = ipNum & -ipNum;
cout << "delta: " << delta << " ";
while (delta > n) delta /= 2;
string tmp = convert(ipNum, delta);
ret.push_back(tmp);
ipNum += delta;
n -= delta;
}
return ret;
}
string convert(long ipNum, int delta) {
return to_string((ipNum >> 24) & 255) + "." +
to_string((ipNum >> 16) & 255) + "." +
to_string((ipNum >> 8) & 255) + "." +
to_string(ipNum & 255) + "/" +
to_string(32 - (int)log2(delta));
}
};
/*
int main() {
LC751 inst;
string myip = "0.0.0.0";
int n = 2;
vector<string> ret = inst.ipToCIDR(myip, n);
for (auto &item : ret) {
cout << item << endl;
}
return 0;
}
*/
| [
"[email protected]"
] | |
782f48276aa5459e2750350e3837d5a971b9d74a | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /c++/TileDB/2018/8/writer.h | a9d2f95fac5fedc5d27cc033258e893b11df0707 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | C++ | false | false | 24,585 | h | /**
* @file writer.h
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017-2018 TileDB, Inc.
*
* 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.
*
* @section DESCRIPTION
*
* This file defines class Writer.
*/
#ifndef TILEDB_WRITER_H
#define TILEDB_WRITER_H
#include "tiledb/sm/array_schema/array_schema.h"
#include "tiledb/sm/filter/filter_pipeline.h"
#include "tiledb/sm/fragment/fragment_metadata.h"
#include "tiledb/sm/misc/status.h"
#include "tiledb/sm/query/dense_cell_range_iter.h"
#include "tiledb/sm/query/types.h"
#include "tiledb/sm/tile/tile.h"
#include <memory>
#include <set>
namespace tiledb {
namespace sm {
class StorageManager;
/** Processes write queries. */
class Writer {
public:
/* ********************************* */
/* TYPE DEFINITIONS */
/* ********************************* */
/**
* State used only in global writes, where the user can "append"
* by successive query submissions until the query is finalized.
*/
struct GlobalWriteState {
/**
* Stores the last tile of each attribute for each write operation.
* For fixed-sized attributes, the second tile is ignored. For
* var-sized attributes, the first tile is the offsets tile, whereas
* the second tile is the values tile.
*/
std::unordered_map<std::string, std::pair<Tile, Tile>> last_tiles_;
/**
* Stores the number of cells written for each attribute across the
* write operations.
*/
std::unordered_map<std::string, uint64_t> cells_written_;
/** The fragment metadata. */
std::shared_ptr<FragmentMetadata> frag_meta_;
};
/** Cell range to be written. */
struct WriteCellRange {
/** The position in the tile where the range will be copied. */
uint64_t pos_;
/** The starting cell in the user buffers. */
uint64_t start_;
/** The ending cell in the user buffers. */
uint64_t end_;
/** Constructor. */
WriteCellRange(uint64_t pos, uint64_t start, uint64_t end)
: pos_(pos)
, start_(start)
, end_(end) {
}
};
/** A vector of write cell ranges. */
typedef std::vector<WriteCellRange> WriteCellRangeVec;
/* ********************************* */
/* CONSTRUCTORS & DESTRUCTORS */
/* ********************************* */
/** Constructor. */
Writer();
/** Destructor. */
~Writer();
/* ********************************* */
/* API */
/* ********************************* */
/** Returns the array schema. */
const ArraySchema* array_schema() const;
/**
* Return list of attribtues for query
* @return vector of attributes for query
*/
std::vector<std::string> attributes() const;
/**
* Fetch AttributeBuffer for attribute
* @param attribute to fetch
* @return AttributeBuffer for attribute
*/
AttributeBuffer buffer(const std::string& attribute) const;
/** Finalizes the reader. */
Status finalize();
/** Initializes the writer. */
Status init();
/** Returns the cell layout. */
Layout layout() const;
/*
* Sets the array schema. If the array is a kv store, then this
* function also sets global order as the default layout.
*/
void set_array_schema(const ArraySchema* array_schema);
/**
* Sets the buffer for a fixed-sized attribute.
*
* @param attribute The attribute to set the buffer for.
* @param buffer The buffer that has the input data to be written.
* @param buffer_size The size of `buffer` in bytes.
* @return Status
*/
Status set_buffer(
const std::string& attribute, void* buffer, uint64_t* buffer_size);
/**
* Sets the buffer for a var-sized attribute.
*
* @param attribute The attribute to set the buffer for.
* @param buffer_off The buffer that has the input data to be written,
* This buffer holds the starting offsets of each cell value in
* `buffer_val`.
* @param buffer_off_size The size of `buffer_off` in bytes.
* @param buffer_val The buffer that has the input data to be written.
* This buffer holds the actual var-sized cell values.
* @param buffer_val_size The size of `buffer_val` in bytes.
* @return Status
*/
Status set_buffer(
const std::string& attribute,
uint64_t* buffer_off,
uint64_t* buffer_off_size,
void* buffer_val,
uint64_t* buffer_val_size);
/** Sets the fragment URI. Applicable only to write queries. */
void set_fragment_uri(const URI& fragment_uri);
/**
* Sets the cell layout of the query. The function will return an error
* if the queried array is a key-value store (because it has its default
* layout for both reads and writes.
*/
Status set_layout(Layout layout);
/** Sets the storage manager. */
void set_storage_manager(StorageManager* storage_manager);
/**
* Sets the query subarray. If it is null, then the subarray will be set to
* the entire domain.
*
* @param subarray The subarray to be set.
* @return Status
*/
Status set_subarray(const void* subarray);
/*
* Return the subarray
* @return subarray
*/
void* subarray() const;
/** Performs a write query using its set members. */
Status write();
private:
/* ********************************* */
/* PRIVATE ATTRIBUTES */
/* ********************************* */
/** The array schema. */
const ArraySchema* array_schema_;
/** The names of the attributes involved in the query. */
std::vector<std::string> attributes_;
/** Maps attribute names to their buffers. */
std::unordered_map<std::string, AttributeBuffer> attr_buffers_;
/**
* Meaningful only when `dedup_coords_` is `false`.
* If `true`, a check for duplicate coordinates will be performed upon
* sparse writes and appropriate errors will be thrown in case
* duplicates are found.
*/
bool check_coord_dups_;
/**
* If `true`, deduplication of coordinates/cells will happen upon
* sparse writes. Ties are broken arbitrarily.
*
*/
bool dedup_coords_;
/** The name of the new fragment to be created. */
URI fragment_uri_;
/** The state associated with global writes. */
std::unique_ptr<GlobalWriteState> global_write_state_;
/** True if the writer has been initialized. */
bool initialized_;
/**
* The layout of the cells in the result of the subarray. Note
* that this may not be the same as what the user set to the
* query, as the Writer may calibrate it to boost performance.
*/
Layout layout_;
/** The storage manager. */
StorageManager* storage_manager_;
/** The subarray the query is constrained on. */
void* subarray_;
/* ********************************* */
/* PRIVATE METHODS */
/* ********************************* */
/** Checks if attributes has been appropriately set for the query. */
Status check_attributes();
/** Correctness checks for buffer sizes. */
Status check_buffer_sizes() const;
/**
* Throws an error if there are coordinate duplicates.
*
* @param cell_pos The sorted positions of the coordinates in the
* `attr_buffers_`.
* @return Status
*/
Status check_coord_dups(const std::vector<uint64_t>& cell_pos) const;
/**
* Throws an error if there are coordinate duplicates. This function
* assumes that the coordinates are written in the global layout,
* which means that they are already sorted in the attribute buffers.
*
* @return Status
*/
Status check_coord_dups() const;
/** Correctness checks for `subarray_`. */
Status check_subarray() const;
/** Correctness checks for `subarray_`. */
template <class T>
Status check_subarray() const;
/** Closes all attribute files, flushing their state to storage. */
Status close_files(FragmentMetadata* meta) const;
/**
* Computes the positions of the coordinate duplicates (if any). Note
* that only the duplicate occurrences are determined, i.e., if the same
* coordinates appear 3 times, only 2 will be marked as duplicates,
* whereas the first occurrence will not be marked as duplicate.
*
* @param cell_pos The sorted positions of the coordinates in the
* `attr_buffers_`.
* @param A set indicating the positions of the duplicates.
* If there are not duplicates, this vector will be **empty** after
* the termination of the function.
* @return Status
*/
Status compute_coord_dups(
const std::vector<uint64_t>& cell_pos,
std::set<uint64_t>* coord_dups) const;
/**
* Computes the positions of the coordinate duplicates (if any). Note
* that only the duplicate occurrences are determined, i.e., if the same
* coordinates appear 3 times, only 2 will be marked as duplicates,
* whereas the first occurrence will not be marked as duplicate.
*
* This functions assumes that the coordinates are laid out in the
* global order and, hence, they are sorted in the attribute buffers.
*
* @param A set indicating the positions of the duplicates.
* If there are not duplicates, this vector will be **empty** after
* the termination of the function.
* @return Status
*/
Status compute_coord_dups(std::set<uint64_t>* coord_dups) const;
/**
* Computes the coordinates metadata (e.g., MBRs).
*
* @tparam T The domain type.
* @param tiles The tiles to calculate the coords metadata from.
* @param meta The fragment metadata that will store the coords metadata.
* @return Status
*/
template <class T>
Status compute_coords_metadata(
const std::vector<Tile>& tiles, FragmentMetadata* meta) const;
/**
* Computes the cell ranges to be written, derived from a
* dense cell range iterator for a specific tile.
*
* @tparam T The domain type.
* @param iter The dense cell range iterator for one
* tile overlapping with the write subarray.
* @param write_cell_ranges The write cell ranges to be created.
* @return Status
*/
template <class T>
Status compute_write_cell_ranges(
DenseCellRangeIter<T>* iters, WriteCellRangeVec* write_cell_ranges) const;
/**
* Creates a new fragment.
*
* @param dense Whether the fragment is dense or not.
* @param frag_meta The fragment metadata to be generated.
* @return Status
*/
Status create_fragment(
bool dense, std::shared_ptr<FragmentMetadata>* frag_meta) const;
/**
* Runs the input tiles for the input attribute through the filter pipeline.
* The tile buffers are modified to contain the output of the pipeline.
*
* @param attribute The attribute the tiles belong to.
* @param tile The tiles to be filtered.
* @return Status
*/
Status filter_tiles(
const std::string& attribute, std::vector<Tile>* tiles) const;
/**
* Runs the input tile for the input attribute through the filter pipeline.
* The tile buffer is modified to contain the output of the pipeline.
*
* @param attribute The attribute the tile belong to.
* @param tile The tile to be filtered.
* @param offsets True if the tile to be filtered contains offsets for a
* var-sized attribute.
* @return Status
*/
Status filter_tile(
const std::string& attribute, Tile* tile, bool offsets) const;
/** Finalizes the global write state. */
Status finalize_global_write_state();
/**
* Finalizes the global write state.
*
* @tparam T The domain type.
* @return Status
*/
template <class T>
Status finalize_global_write_state();
/**
* Writes in the global layout. Applicable to both dense and sparse
* arrays.
*/
Status global_write();
/**
* Writes in the global layout. Applicable to both dense and sparse
* arrays.
*
* @tparam T The domain type.
*/
template <class T>
Status global_write();
/**
* Applicable only to global writes. Writes the last tiles for each
* attribute remaining in the state, and records the metadata for
* the coordinates attribute (if present).
*
* @tparam T The domain type.
* @return Status
*/
template <class T>
Status global_write_handle_last_tile();
/** Returns `true` if the coordinates are included in the attributes. */
bool has_coords() const;
/** Initializes the global write state. */
Status init_global_write_state();
/**
* Initializes a fixed-sized tile.
*
* @param attribute The attribute the tile belongs to.
* @param tile The tile to be initialized.
* @return Status
*/
Status init_tile(const std::string& attribute, Tile* tile) const;
/**
* Initializes a var-sized tile.
*
* @param attribute The attribute the tile belongs to.
* @param tile The offsets tile to be initialized.
* @param tile_var The var-sized data tile to be initialized.
* @return Status
*/
Status init_tile(
const std::string& attribute, Tile* tile, Tile* tile_var) const;
/**
* Initializes dense cell range iterators for the subarray to be writte,
* one per overlapping tile.
*
* @tparam T The domain type.
* @param iters The dense cell range iterators to be created.
* @return Status
*/
template <class T>
Status init_tile_dense_cell_range_iters(
std::vector<DenseCellRangeIter<T>>* iters) const;
/**
* Initializes the tiles for writing for the input attribute.
*
* @param attribute The attribute the tiles belong to.
* @param tile_num The number of tiles.
* @param tiles The tiles to be initialized. Note that the vector
* has been already preallocated.
* @return Status
*/
Status init_tiles(
const std::string& attribute,
uint64_t tile_num,
std::vector<Tile>* tiles) const;
/**
* Generates a new fragment name, which is in the form: <br>
* .__uuid_timestamp. For instance,
* __6ba7b8129dad11d180b400c04fd430c8_1458759561320
*
* Note that this is a temporary name, initiated by a new write process.
* After the new fragmemt is finalized, the array will change its name
* by removing the leading '.' character.
*
* @param frag_uri Will store the new special fragment name
* @return Status
*/
Status new_fragment_name(std::string* frag_uri) const;
/**
* This deletes the global write state and deletes the potentially
* partially written fragment.
*/
void nuke_global_write_state();
/**
* Optimize the layout for 1D arrays. Specifically, if the array
* is 1D and the query layout is not global or unordered, the layout
* should be the same as the cell order of the array. This produces
* equivalent results offering faster processing.
*/
void optimize_layout_for_1D();
/**
* Writes in an ordered layout (col- or row-major order). Applicable only
* to dense arrays.
*/
Status ordered_write();
/**
* Writes in an ordered layout (col- or row-major order). Applicable only
* to dense arrays.
*
* @tparam T The domain type.
*/
template <class T>
Status ordered_write();
/**
* Applicable only to write in global order. It prepares only full
* tiles, storing the last potentially non-full tile in
* `global_write_state->last_tiles_` as part of the state to be used in
* the next write invocation. The last tiles are written to storage
* upon `finalize`. Upon each invocation, the function first
* populates the partially full last tile from the previous
* invocation.
*
* @param attribute The attribute to prepare the tiles for.
* @param coord_dups The positions of the duplicate coordinates.
* @param tiles The **full** tiles to be created.
* @return Status
*/
Status prepare_full_tiles(
const std::string& attribute,
const std::set<uint64_t>& coord_dups,
std::vector<Tile>* tiles) const;
/**
* Applicable only to write in global order. It prepares only full
* tiles, storing the last potentially non-full tile in
* `global_write_state_->last_tiles_` as part of the state to be used in
* the next write invocation. The last tiles are written to storage
* upon `finalize`. Upon each invocation, the function first
* populates the partially full last tile from the previous
* invocation. Applicable only to fixed-sized attributes.
*
* @param attribute The attribute to prepare the tiles for.
* @param coord_dups The positions of the duplicate coordinates.
* @param tiles The **full** tiles to be created.
* @return Status
*/
Status prepare_full_tiles_fixed(
const std::string& attribute,
const std::set<uint64_t>& coord_dups,
std::vector<Tile>* tiles) const;
/**
* Applicable only to write in global order. It prepares only full
* tiles, storing the last potentially non-full tile in
* `global_write_state_->last_tiles_` as part of the state to be used in
* the next write invocation. The last tiles are written to storage
* upon `finalize`. Upon each invocation, the function first
* populates the partially full last tile from the previous
* invocation. Applicable only to var-sized attributes.
*
* @param attribute The attribute to prepare the tiles for.
* @param coord_dups The positions of the duplicate coordinates.
* @param tiles The **full** tiles to be created.
* @return Status
*/
Status prepare_full_tiles_var(
const std::string& attribute,
const std::set<uint64_t>& coord_dups,
std::vector<Tile>* tiles) const;
/**
* It prepares the tiles, copying from the user buffers into the tiles
* the values based on the input write cell ranges, focusing on the
* input attribute.
*
* @param attribute The attribute to prepare the tiles for.
* @param write_cell_ranges The write cell ranges.
* @param tiles The tiles to be created.
* @return Status
*/
Status prepare_tiles(
const std::string& attribute,
const std::vector<WriteCellRangeVec>& write_cell_ranges,
std::vector<Tile>* tiles) const;
/**
* It prepares the tiles, re-organizing the cells from the user
* buffers based on the input sorted positions.
*
* @param attribute The attribute to prepare the tiles for.
* @param cell_pos The positions that resulted from sorting and
* according to which the cells must be re-arranged.
* @param coord_dups The set with the positions
* of duplicate coordinates/cells.
* @param tiles The tiles to be created.
* @return Status
*/
Status prepare_tiles(
const std::string& attribute,
const std::vector<uint64_t>& cell_pos,
const std::set<uint64_t>& coord_dups,
std::vector<Tile>* tiles) const;
/**
* It prepares the tiles, re-organizing the cells from the user
* buffers based on the input sorted positions. Applicable only
* to fixed-sized attributes.
*
* @param attribute The attribute to prepare the tiles for.
* @param cell_pos The positions that resulted from sorting and
* according to which the cells must be re-arranged.
* @param coord_dups The set with the positions
* of duplicate coordinates/cells.
* @param tiles The tiles to be created.
* @return Status
*/
Status prepare_tiles_fixed(
const std::string& attribute,
const std::vector<uint64_t>& cell_pos,
const std::set<uint64_t>& coord_dups,
std::vector<Tile>* tiles) const;
/**
* It prepares the tiles, re-organizing the cells from the user
* buffers based on the input sorted positions. Applicable only
* to var-sized attributes.
*
* @param attribute The attribute to prepare the tiles for.
* @param cell_pos The positions that resulted from sorting and
* according to which the cells must be re-arranged.
* @param coord_dups The set with the positions
* of duplicate coordinates/cells.
* @param tiles The tiles to be created.
* @return Status
*/
Status prepare_tiles_var(
const std::string& attribute,
const std::vector<uint64_t>& cell_pos,
const std::set<uint64_t>& coord_dups,
std::vector<Tile>* tiles) const;
/** Resets the writer object, rendering it incomplete. */
void reset();
/**
* Sorts the coordinates of the user buffers, creating a vector with
* the sorted positions.
*
* @tparam T The domain type.
* @param cell_pos The sorted cell positions to be created.
* @return Status
*/
template <class T>
Status sort_coords(std::vector<uint64_t>* cell_pos) const;
/**
* Writes in unordered layout. Applicable to both dense and sparse arrays.
* Explicit coordinates must be provided for this write.
*/
Status unordered_write();
/**
* Writes in unordered layout. Applicable to both dense and sparse arrays.
* Explicit coordinates must be provided for this write.
*
* @tparam T The domain type.
*/
template <class T>
Status unordered_write();
/**
* Writes an empty cell range to the input tile.
* Applicable to **fixed-sized** attributes.
*
* @param num Number of empty values to write.
* @param tile The tile to write to.
* @return Status
*/
Status write_empty_cell_range_to_tile(uint64_t num, Tile* tile) const;
/**
* Writes an empty cell range to the input tile.
* Applicable to **variable-sized** attributes.
*
* @param num Number of empty values to write.
* @param tile The tile offsets to write to.
* @param tile_var The tile with the var-sized cells to write to.
* @return Status
*/
Status write_empty_cell_range_to_tile_var(
uint64_t num, Tile* tile, Tile* tile_var) const;
/**
* Writes the input cell range to the input tile, for a particular
* buffer. Applicable to **fixed-sized** attributes.
*
* @param buff The write buffer where the cells will be copied from.
* @param start The start element in the write buffer.
* @param end The end element in the write buffer.
* @param tile The tile to write to.
* @return Status
*/
Status write_cell_range_to_tile(
ConstBuffer* buff, uint64_t start, uint64_t end, Tile* tile) const;
/**
* Writes the input cell range to the input tile, for a particular
* buffer. Applicable to **variable-sized** attributes.
*
* @param buff The write buffer where the cell offsets will be copied from.
* @param buff_var The write buffer where the cell values will be copied from.
* @param start The start element in the write buffer.
* @param end The end element in the write buffer.
* @param tile The tile offsets to write to.
* @param tile_var The tile with the var-sized cells to write to.
* @return Status
*/
Status write_cell_range_to_tile_var(
ConstBuffer* buff,
ConstBuffer* buff_var,
uint64_t start,
uint64_t end,
Tile* tile,
Tile* tile_var) const;
/**
* Writes all the input tiles to storage.
*
* @param attribute_tiles Tiles to be written, one element per attribute.
* @return Status
*/
Status write_all_tiles(
FragmentMetadata* frag_meta,
const std::vector<std::vector<Tile>>& attribute_tiles) const;
/**
* Writes the input tiles for the input attribute to storage.
*
* @param attribute The attribute the tiles belong to.
* @param frag_meta The fragment metadata.
* @param tiles The tiles to be written.
* @return Status
*/
Status write_tiles(
const std::string& attribute,
FragmentMetadata* frag_meta,
const std::vector<Tile>& tiles) const;
};
} // namespace sm
} // namespace tiledb
#endif // TILEDB_WRITER_H
| [
"[email protected]"
] | |
3afbcbb1adeb65777029595de165c7532e7d13a6 | e018d8a71360d3a05cba3742b0f21ada405de898 | /Client/Packet/Types/PlayerTypes.h | e480c272e99296df1dc71bf7c7bd807f4cc9fa8a | [] | no_license | opendarkeden/client | 33f2c7e74628a793087a08307e50161ade6f4a51 | 321b680fad81d52baf65ea7eb3beeb91176c15f4 | refs/heads/master | 2022-11-28T08:41:15.782324 | 2022-11-26T13:21:22 | 2022-11-26T13:21:22 | 42,562,963 | 24 | 18 | null | 2022-11-26T13:21:23 | 2015-09-16T03:43:01 | C++ | UHC | C++ | false | false | 4,429 | h | //////////////////////////////////////////////////////////////////////////////
// Filename : PlayerTypes.h
// Written By : Reiot
// Description :
//////////////////////////////////////////////////////////////////////////////
#ifndef __PLAYER_TYPES_H__
#define __PLAYER_TYPES_H__
#include "SystemTypes.h"
//////////////////////////////////////////////////////////////////////////////
// 플레이어 생성 및 변경 관련 에러 ID
//////////////////////////////////////////////////////////////////////////////
enum ErrorID {
INVALID_ID_PASSWORD,
ALREADY_CONNECTED,
ALREADY_REGISTER_ID,
ALREADY_REGISTER_SSN,
EMPTY_ID,
SMALL_ID_LENGTH,
EMPTY_PASSWORD,
SMALL_PASSWORD_LENGTH,
EMPTY_NAME,
EMPTY_SSN,
INVALID_SSN,
NOT_FOUND_PLAYER,
NOT_FOUND_ID,
NOT_PAY_ACCOUNT,
NOT_ALLOW_ACCOUNT,
ETC_ERROR,
IP_DENYED,
CHILDGUARD_DENYED,
CANNOT_AUTHORIZE_BILLING, // 빌링 정보를 찾을 수 없습니다.
CANNOT_CREATE_PC_BILLING, // 유료 사용자가 아니라서 캐릭터를 못 만듭니다.
KEY_EXPIRED, // 키 유효기간이 지났다.
NOT_FOUND_KEY, // 키가 없다.
// add by Coffee
CHECK_VERSION_ERROR,
};
//////////////////////////////////////////////////////////////////////////////
// 플레이어 아이디
//////////////////////////////////////////////////////////////////////////////
const uint minIDLength = 4;
const uint maxIDLength = 10;
//////////////////////////////////////////////////////////////////////////////
// 플레이어 암호
//////////////////////////////////////////////////////////////////////////////
const uint minPasswordLength = 6;
const uint maxPasswordLength = 10;
//////////////////////////////////////////////////////////////////////////////
// 플레이어 이름
//////////////////////////////////////////////////////////////////////////////
const uint maxNameLength = 20;
//////////////////////////////////////////////////////////////////////////////
// 주민등록번호 ( '-' 를 포함해야 한다. )
//////////////////////////////////////////////////////////////////////////////
const uint maxSSNLength = 20;
//////////////////////////////////////////////////////////////////////////////
// 집전화
//////////////////////////////////////////////////////////////////////////////
const uint maxTelephoneLength = 15;
//////////////////////////////////////////////////////////////////////////////
// 휴대폰
//////////////////////////////////////////////////////////////////////////////
const uint maxCellularLength = 15;
//////////////////////////////////////////////////////////////////////////////
// 우편번호
//////////////////////////////////////////////////////////////////////////////
const uint maxZipCodeLength = 7;
//////////////////////////////////////////////////////////////////////////////
// 집주소
//////////////////////////////////////////////////////////////////////////////
const uint maxAddressLength = 100;
//////////////////////////////////////////////////////////////////////////////
// 전자메일
//////////////////////////////////////////////////////////////////////////////
const uint maxEmailLength = 50;
//////////////////////////////////////////////////////////////////////////////
// 홈페이지
//////////////////////////////////////////////////////////////////////////////
const uint maxHomepageLength = 50;
//////////////////////////////////////////////////////////////////////////////
// 자기소개글
//////////////////////////////////////////////////////////////////////////////
const uint maxProfileLength = 200;
//////////////////////////////////////////////////////////////////////////////
// 국적
//////////////////////////////////////////////////////////////////////////////
typedef BYTE Nation_t;
const uint szNation = szBYTE;
enum Nation
{
KOREA,
USA,
JAPAN
};
const std::string Nation2String [] =
{
"KOREA",
"USA",
"JAPAN"
};
//////////////////////////////////////////////////////////////////////////////
// 패널티 타입
//////////////////////////////////////////////////////////////////////////////
enum PenaltyType
{
PENALTY_TYPE_KICKED, // 나가라
PENALTY_TYPE_MUTE, // 닥쳐라
PENALTY_TYPE_FREEZING, // 멈춰라
PENALTY_TYPE_MAX
};
#endif
| [
"[email protected]"
] | |
ea195fbb6965c4acb465531d05d86753419ddeed | 0e29cf5595eb18f0480d46a2b2dbe8bf8be70b7b | /DowhileNo3.cpp | 47776f5fb6f392c1193fd407d966c560ab2b976f | [] | no_license | miftahulhasna146/TugasElearningDoWhile | e3de7661bdcfc5dea93d11b17fad3aaaa30781f7 | 303eeaf09d25377565ab20099d03f3fdcd0362ff | refs/heads/master | 2020-04-05T17:49:11.211921 | 2018-11-11T13:01:41 | 2018-11-11T13:01:41 | 157,077,057 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 322 | cpp | #include <stdio.h>
#include <conio.h>
#include <iostream>
using namespace std;
int main (){
int a, n;
float nilai, rata;
cout<<"Masukkan bilangan = "; cin>>n;
do
{
nilai=nilai+a;
a++;
}
while (a<=n);
cout<<"Nilai Total ="<<nilai<<endl;
rata=nilai/n;
cout<<"Rata-rata = "<<rata<<endl;
}
| [
"[email protected]"
] | |
c9ee5721678cbb3c999c1d078b4088b27949fd37 | 25b8499e6395bddc3103ec7fcc652a10e781b74e | /test/testTrie2.cpp | 65763afed6542c961bf29f0eee6b072c902a1260 | [] | no_license | Kakarotto9/CxxSearch | 8b1e5c600fe1943a010383a66584acfa93b21bb6 | d50ff5c970972ad68873751f19523a6437d2eabe | refs/heads/master | 2020-05-07T19:27:57.398485 | 2019-04-16T04:36:05 | 2019-04-16T04:36:05 | 180,814,425 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 717 | cpp |
#include<iostream>
#include"Trie2.h"
using namespace std;
int main(){
Trie t;
t.addWord("weixin",1);
t.addWord("weixi",2);
t.addWord("weixn",3);
t.addWord("wexin",4);
t.addWord("weixi",8);
cout<<"getFreq="<<t.getFreq("weixn")<<endl;
t.addWord("ascw",2);
t.addWord("asce",3);
t.addWord("ahce",9);
vector<string> v;
t.printMatch("wei",v);
for(auto i:v){
cout<<"v="<<i<<endl;
}
vector<string> v2;
t.printMatch("as",v2);
for(auto i:v2){
cout<<"v2="<<i<<endl;
}
vector<string> v3;
t.getAllWord(v3);
for(auto i:v3){
cout<<"v3="<<i<<endl;
}
vector<int> v4;
bool b2=t.getLineNum("weixi",v4);
if(b2){
for(auto i:v4){
cout<<"v4="<<i<<endl;
}
}
else{
cout<<"v4没找到"<<endl;
}
}
| [
"[email protected]"
] | |
3cc986c6835fe2625a6262194248264175c04cea | 691abe5f62df930ae7420d00f48e5b2f7f57faed | /atcoder.jp/abc035/abc035_b/Main.cpp | 81914f83a052e87b5c80dcf03d98fb211644c252 | [] | no_license | Volverman/procon-archive | 2fa9d10d0a655590f2c6342c5e494deff5718c73 | 834adc4a70a275eb28cea6d724ee5cc5d926ffe7 | refs/heads/master | 2022-12-18T23:40:48.494023 | 2020-09-12T07:48:48 | 2020-09-12T07:48:48 | 294,258,109 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,072 | cpp | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
using P = pair<int,int>;
int dx[4]={-1,1,0,0};
int dy[4]={0,0,1,-1};
int main()
{
string S;
int T;
cin >> S >> T;
int x=0,y=0;
int MAX=0,MIN=0;
REP(i,S.size()){
if(S.at(i)=='L'){
x+=dx[0];
y+=dy[0];
}else if(S.at(i)=='R'){
x+=dx[1];
y+=dy[1];
}else if(S.at(i)=='U'){
x+=dx[2];
y+=dy[2];
}else if(S.at(i)=='D'){
x+=dx[3];
y+=dy[3];
}else if(S.at(i)=='?'){
MAX++;
}
}
int maxans = MAX+abs(x)+abs(y);
int minans;
if(abs(x)+abs(y)-MAX>=0){
minans=abs(x)+abs(y)-MAX;
}else{
if(((abs(x)+abs(y))%2==0&&MAX%2==0)||(abs(x)+abs(y))%2==1&&MAX%2==1){
minans = 0;
}else{
minans = 1;
}
}
if(T==1){
cout << maxans << endl;
}else{
cout << minans << endl;
}
} | [
"[email protected]"
] | |
42a1f28c68cf3d4f8460835b19d904feedeb9606 | 30bdd8ab897e056f0fb2f9937dcf2f608c1fd06a | /CodesNew/3876.cpp | 5d8d199136db873e3ce23a43f172739d6ff23f7f | [] | no_license | thegamer1907/Code_Analysis | 0a2bb97a9fb5faf01d983c223d9715eb419b7519 | 48079e399321b585efc8a2c6a84c25e2e7a22a61 | refs/heads/master | 2020-05-27T01:20:55.921937 | 2019-11-20T11:15:11 | 2019-11-20T11:15:11 | 188,403,594 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 884 | cpp | #include<bits/stdc++.h>
using namespace std;
typedef long l;
typedef long long ll;
typedef unsigned long long ull;
#define sc(a) scanf("%d",&a)
const int MAX = 1e5+5;
const ll inf = 2*1e9+77;
const int MOD = 1e8+7;
int a[MAX];
int n;
bool check(ll d)
{
ll hold = d;
for(int i = 0 ; i < n ; ++i)
{
hold -= (d-a[i]);
if(hold <= 0)
return 1;
}
return 0;
}
int main()
{
cin>>n;
for(int i = 0 ; i < n ; ++i)
cin>>a[i];
sort(a,a+n,greater<int>());
ll st = a[0],en = inf;
ll res = 0;
while(st <= en)
{
ll md = (st + en)/2;
if(check(md))
{
res = md;
en = md - 1;
}
else
st = md + 1;
}
cout<<res<<endl;
return 0;
} | [
"[email protected]"
] | |
e1afa30e7e19cb1b289e8e0431740e6152961b37 | dc442d8cd539a7db76d47007e20dfe7d2126ed53 | /stack using array.cpp | 198a0ad6939d62cd7389d8ad9ac59c485ccb3771 | [] | no_license | barsha87/snippets | e7177af081123852bff584b414013cb363824407 | fdf0ef70ca335cef127835297a21194e9d7bbc97 | refs/heads/master | 2022-01-09T00:14:33.520985 | 2019-04-30T10:54:49 | 2019-04-30T10:54:49 | 181,631,572 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,633 | cpp | #include <iostream>
using namespace std;
class stack
{
int a[50],n,res;
public:
int top;
void pop();
void push();
void disp();
};
void stack::push()
{
cout<<"\nEnter element: ";
cin>>n;
if(top==49)
res=-1;
else
{
top++;
a[top]=n;
res=0;
}
if (res==-1)
{
cout<<"Overflow!! \n";
}
}
void stack::pop()
{
if(top==-1)
cout<<"Underflow!! \n";
else
{
res=a[top];
top--;
cout<<"\nThe deleted element is: "<<res<<endl;
}
}
void stack::disp()
{
cout<<"\nThe Stack now is: \n";
if(top==-1)
{cout<<"Empty";
return;}
cout<<a[top];
for(int i=top-1;i>=0;i--)
cout<<" "<<a[i];
}
int main()
{
stack s;
s.top=-1;
int c;
char ch='y';
while (ch=='y'||ch=='Y')
{
cout<<"Enter Choice: (1)Push (2)Pop (3)Display : ";
cin>>c;
switch(c)
{
case 1: s.push();
break;
case 2: s.pop();
break;
case 3: s.disp();
break;
default: cout<<"\nInvalid Choice! ";
}
cout<<"\n continue? ";
cin>>ch;
}
return 0;
}
| [
"[email protected]"
] | |
7e362eca6b1e6c250161dfc69f242b09d0707580 | 3aa9a68026ab10ced85dec559b6b4dfcb74ae251 | /love babbar series/Strings/balanced paranthesis.cpp | 3fe754cb39abd13bcbfea05dfc0cbe5a693312b7 | [] | no_license | kushuu/competitive_programming_all | 10eee29c3ca0656a2ffa37b142df680c3a022f1b | 5edaec66d2179a012832698035bdfb0957dbd806 | refs/heads/master | 2023-08-17T15:09:48.492816 | 2021-10-04T20:09:37 | 2021-10-04T20:09:37 | 334,891,360 | 3 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,430 | cpp | /****************************************************************
Author: kushuu File: balanced paranthesis.cpp Date: Sun Nov 08 2020
****************************************************************/
#include <bits/stdc++.h>
//shorts
#define ll long long int
#define sll stack<long long int>
#define vll vector<long long int>
#define ld long double
#define pb push_back
#define mp make_pair
#define vpll vector<pair<long long int, long long int>>
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define fo(i,x,y) for(long long i = x; i < y; i++)
#define MOD 1000000007
#define endl "\n"
#define F first
#define S second
#define s(a) a.size()
//program specific shorts (if any)
//
using namespace std;
ll getlcm(ll a, ll b) {
return (a*b)/__gcd(a, b);
}
int main() {
fastIO;
ll t; cin >> t;
while(t--) {
string s; cin >> s;
if(s(s) == 1) {cout << "not balanced\n"; continue;}
map<char, char> close;
close['('] = ')';
close['['] = ']';
close['{'] = '}';
stack<char> check;
check.push(s[0]);
fo(i, 1, s(s)) {
if(s[i] == close[check.top()])
check.pop();
else
check.push(s[i]);
}
if(check.empty()) cout << "balanced\n";
else cout << "not balanced\n";
// while(!check.empty()) {cout << check.top(); check.pop();}
}
return 0;
} | [
"[email protected]"
] | |
206de379eb1b9d0a9e3fd9a01a004c66c50b3be0 | 4da19b7f48cb480788bd77e067560789d6d22158 | /Pikachu/Classes/CommonFunctions.h | 56daa9693a8aa7189f3502b71cf6cfc8dd9c0dc1 | [] | no_license | caothetoan/iOS-Pikachu | 898d53e8e0c55875be959b7916c25c146e43fcfb | 1fdbcae81dc92c7461909572dd04cb83455b10d7 | refs/heads/master | 2021-01-01T05:57:23.258013 | 2017-07-15T13:34:51 | 2017-07-15T13:34:51 | 97,317,916 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 298 | h | //
// CommonFunctions.h
// Pikachu
//
// Created by tinvukhac on 8/25/13.
//
//
#ifndef __Pikachu__CommonFunctions__
#define __Pikachu__CommonFunctions__
#include "cocos2d.h"
using namespace cocos2d;
CCString* getPngPath(const char* path);
#endif /* defined(__Pikachu__CommonFunctions__) */
| [
"[email protected]"
] | |
2bfacd0fe97599a9ff580eefedadec0ebd27ac5c | 97fde28997b618180cfa5dd979b142fd54dd2105 | /core/dep/acelite/ace/Dynamic.inl | 54052b8e52bef58be89157ce2cf806f2f0124cee | [] | no_license | Refuge89/sunwell-2 | 5897f4e78c693e791e368761904e79d2b7af20da | f01a89300394065f33eaec799c8779c2cac5c320 | refs/heads/master | 2020-12-31T05:55:43.496145 | 2016-02-16T20:46:50 | 2016-02-16T20:46:50 | 80,622,543 | 1 | 0 | null | 2017-02-01T13:30:06 | 2017-02-01T13:30:06 | null | UTF-8 | C++ | false | false | 559 | inl | // -*- C++ -*-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
ACE_Dynamic::~ACE_Dynamic (void)
{
// ACE_TRACE ("ACE_Dynamic::~ACE_Dynamic");
}
ACE_INLINE void
ACE_Dynamic::set (void)
{
// ACE_TRACE ("ACE_Dynamic::set");
this->is_dynamic_ = true;
}
ACE_INLINE bool
ACE_Dynamic::is_dynamic (void)
{
// ACE_TRACE ("ACE_Dynamic::is_dynamic");
return this->is_dynamic_;
}
ACE_INLINE void
ACE_Dynamic::reset (void)
{
// ACE_TRACE ("ACE_Dynamic::reset");
this->is_dynamic_ = false;
}
ACE_END_VERSIONED_NAMESPACE_DECL
| [
"[email protected]"
] | |
4477bf46d153e01601fd53929cf5e5839ce9830e | f5cf5bd1f9eb40e468dd3fb580f55944ec1ff31c | /src/ActiveDataAPI/ActAPI_IParameter.cpp | 4d5a097171a1337ac81eb109dc7ab3b4deabf8c4 | [] | no_license | CadQuery/active-data | 3977b4fe693e15e791ba919df2f91b08c71de8f5 | df3f043d7d8a050a0695c04851462ff10e1a6730 | refs/heads/master | 2022-12-11T16:22:13.373786 | 2020-07-21T12:53:53 | 2020-07-21T12:53:53 | 291,694,156 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,995 | cpp | //-----------------------------------------------------------------------------
// Created on: March 2012
//-----------------------------------------------------------------------------
// Copyright (c) 2017, OPEN CASCADE SAS
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of OPEN CASCADE SAS nor the
// names of all 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 AUTHORS 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.
//
// Web: http://dev.opencascade.org
//-----------------------------------------------------------------------------
// Own include
#include <ActAPI_IParameter.h>
//! Destructor.
ActAPI_IUserParameter::~ActAPI_IUserParameter()
{
}
| [
"[email protected]"
] | |
de2cee8ee5603730f6d0f19e6c44a21b5f1e50dd | 9ca0783e78c37c41221d255601bab73ec958b0b9 | /src/util/gl/Buffer.hpp | 159c3f6a1e574ae12ec673e5f3cf7907f6c87670 | [] | no_license | nagalun/worldofpixels-client | c67006bf982cd79fa47d1d173381c39a703bc9c2 | d224a215fa6f33727e6315745b65def7fc4dda97 | refs/heads/master | 2023-07-07T11:11:50.010894 | 2023-06-28T09:02:17 | 2023-06-28T09:02:17 | 210,177,431 | 6 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 490 | hpp | #pragma once
#include <cstdint>
#include <cstddef>
namespace gl {
class Buffer {
std::uint32_t id;
public:
Buffer();
~Buffer();
Buffer(Buffer &&other);
Buffer& operator=(Buffer &&other);
Buffer(const Buffer &other) = delete;
Buffer& operator=(const Buffer &other) = delete;
void use(std::uint32_t type) const;
void data(std::uint32_t type, std::size_t size, const void * data, std::uint32_t usage);
std::uint32_t get() const;
private:
void del();
};
} /* namespace gl */
| [
"[email protected]"
] | |
8be3524622ff56dcdbea5ced99d2fab1644b6dae | 56738bc398f8445f5ebcba74d5e8b7d6a9eaa57d | /blazetest/blazetest/mathtest/strictlylowermatrix/SparseTest.h | 324af22fe1aee16d371199b6909a280414fc47aa | [
"BSD-3-Clause"
] | permissive | praveenmunagapati/blaze | bc1fd9f6d49e3976dac54c8bcdf9e95ea1a0296c | a5fb3d165a4c332cec4974ed222271615a7fe0e6 | refs/heads/master | 2021-06-09T13:49:54.139830 | 2017-01-02T04:45:23 | 2017-01-02T04:45:23 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,000 | h | //=================================================================================================
/*!
// \file blazetest/mathtest/strictlylowermatrix/SparseTest.h
// \brief Header file for the StrictlyLowerMatrix sparse test
//
// Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
//
// This file is part of the Blaze library. You can redistribute it and/or modify it under
// the terms of the New (Revised) BSD License. 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 Blaze development group nor the names of its contributors
// may be used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
// SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
*/
//=================================================================================================
#ifndef _BLAZETEST_MATHTEST_STRICTLYLOWERMATRIX_SPARSETEST_H_
#define _BLAZETEST_MATHTEST_STRICTLYLOWERMATRIX_SPARSETEST_H_
//*************************************************************************************************
// Includes
//*************************************************************************************************
#include <sstream>
#include <stdexcept>
#include <string>
#include <blaze/math/CompressedMatrix.h>
#include <blaze/math/constraints/ColumnMajorMatrix.h>
#include <blaze/math/constraints/RequiresEvaluation.h>
#include <blaze/math/constraints/RowMajorMatrix.h>
#include <blaze/math/constraints/SparseMatrix.h>
#include <blaze/math/constraints/StrictlyLower.h>
#include <blaze/math/constraints/StrictlyUpper.h>
#include <blaze/math/StrictlyLowerMatrix.h>
#include <blaze/math/typetraits/IsRowMajorMatrix.h>
#include <blaze/util/constraints/SameType.h>
#include <blazetest/system/Types.h>
namespace blazetest {
namespace mathtest {
namespace strictlylowermatrix {
//=================================================================================================
//
// CLASS DEFINITION
//
//=================================================================================================
//*************************************************************************************************
/*!\brief Auxiliary class for all tests of the sparse StrictlyLowerMatrix specialization.
//
// This class represents a test suite for the blaze::StrictlyLowerMatrix class template
// specialization for sparse matrices. It performs a series of both compile time as well as
// runtime tests.
*/
class SparseTest
{
public:
//**Constructors********************************************************************************
/*!\name Constructors */
//@{
explicit SparseTest();
// No explicitly declared copy constructor.
//@}
//**********************************************************************************************
//**Destructor**********************************************************************************
// No explicitly declared destructor.
//**********************************************************************************************
private:
//**Test functions******************************************************************************
/*!\name Test functions */
//@{
void testConstructors();
void testAssignment ();
void testAddAssign ();
void testSubAssign ();
void testMultAssign ();
void testScaling ();
void testFunctionCall();
void testIterator ();
void testNonZeros ();
void testReset ();
void testClear ();
void testSet ();
void testInsert ();
void testAppend ();
void testResize ();
void testReserve ();
void testTrim ();
void testSwap ();
void testErase ();
void testFind ();
void testLowerBound ();
void testUpperBound ();
void testIsDefault ();
void testSubmatrix ();
void testRow ();
void testColumn ();
template< typename Type >
void checkRows( const Type& matrix, size_t expectedRows ) const;
template< typename Type >
void checkColumns( const Type& matrix, size_t expectedColumns ) const;
template< typename Type >
void checkCapacity( const Type& matrix, size_t minCapacity ) const;
template< typename Type >
void checkCapacity( const Type& matrix, size_t index, size_t minCapacity ) const;
template< typename Type >
void checkNonZeros( const Type& matrix, size_t expectedNonZeros ) const;
template< typename Type >
void checkNonZeros( const Type& matrix, size_t index, size_t expectedNonZeros ) const;
//@}
//**********************************************************************************************
//**Member variables****************************************************************************
/*!\name Member variables */
//@{
std::string test_; //!< Label of the currently performed test.
//@}
//**********************************************************************************************
//**Type definitions****************************************************************************
//! Type of the row-major strictly lower matrix.
typedef blaze::StrictlyLowerMatrix< blaze::CompressedMatrix<int,blaze::rowMajor> > LT;
//! Type of the column-major strictly lower matrix.
typedef blaze::StrictlyLowerMatrix< blaze::CompressedMatrix<int,blaze::columnMajor> > OLT;
typedef LT::Rebind<double>::Other RLT; //!< Rebound row-major strictly lower matrix type.
typedef OLT::Rebind<double>::Other ORLT; //!< Rebound column-major strictly lower matrix type.
//**********************************************************************************************
//**Compile time checks*************************************************************************
/*! \cond BLAZE_INTERNAL */
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( LT );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( LT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( LT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( LT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( OLT );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( OLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( OLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( OLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( RLT );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( RLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( RLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( RLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( ORLT );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( ORLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( ORLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE( ORLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( LT );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( LT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( LT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( LT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( OLT );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( OLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( OLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( OLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( RLT );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( RLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( RLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( RLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( ORLT );
BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE( ORLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( ORLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE ( ORLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( LT );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( LT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( LT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_UPPER_MATRIX_TYPE( LT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( OLT );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( OLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( OLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_UPPER_MATRIX_TYPE( OLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( RLT );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( RLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( RLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_UPPER_MATRIX_TYPE( RLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( ORLT );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( ORLT::ResultType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_LOWER_MATRIX_TYPE( ORLT::OppositeType );
BLAZE_CONSTRAINT_MUST_BE_STRICTLY_UPPER_MATRIX_TYPE( ORLT::TransposeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( LT::ResultType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( LT::OppositeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( LT::TransposeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( OLT::ResultType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( OLT::OppositeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( OLT::TransposeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( RLT::ResultType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( RLT::OppositeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( RLT::TransposeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( ORLT::ResultType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( ORLT::OppositeType );
BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION( ORLT::TransposeType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( LT::ElementType, LT::ResultType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( LT::ElementType, LT::OppositeType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( LT::ElementType, LT::TransposeType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( OLT::ElementType, OLT::ResultType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( OLT::ElementType, OLT::OppositeType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( OLT::ElementType, OLT::TransposeType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( RLT::ElementType, RLT::ResultType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( RLT::ElementType, RLT::OppositeType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( RLT::ElementType, RLT::TransposeType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( ORLT::ElementType, ORLT::ResultType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( ORLT::ElementType, ORLT::OppositeType::ElementType );
BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( ORLT::ElementType, ORLT::TransposeType::ElementType );
/*! \endcond */
//**********************************************************************************************
};
//*************************************************************************************************
//=================================================================================================
//
// TEST FUNCTIONS
//
//=================================================================================================
//*************************************************************************************************
/*!\brief Checking the number of rows of the given matrix.
//
// \param matrix The matrix to be checked.
// \param expectedRows The expected number of rows of the matrix.
// \return void
// \exception std::runtime_error Error detected.
//
// This function checks the number of rows of the given matrix. In case the actual number of
// rows does not correspond to the given expected number of rows, a \a std::runtime_error
// exception is thrown.
*/
template< typename Type > // Type of the matrix
void SparseTest::checkRows( const Type& matrix, size_t expectedRows ) const
{
if( matrix.rows() != expectedRows ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid number of rows detected\n"
<< " Details:\n"
<< " Number of rows : " << matrix.rows() << "\n"
<< " Expected number of rows: " << expectedRows << "\n";
throw std::runtime_error( oss.str() );
}
}
//*************************************************************************************************
//*************************************************************************************************
/*!\brief Checking the number of columns of the given matrix.
//
// \param matrix The matrix to be checked.
// \param expectedRows The expected number of columns of the matrix.
// \return void
// \exception std::runtime_error Error detected.
//
// This function checks the number of columns of the given matrix. In case the actual number of
// columns does not correspond to the given expected number of columns, a \a std::runtime_error
// exception is thrown.
*/
template< typename Type > // Type of the matrix
void SparseTest::checkColumns( const Type& matrix, size_t expectedColumns ) const
{
if( matrix.columns() != expectedColumns ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid number of columns detected\n"
<< " Details:\n"
<< " Number of columns : " << matrix.columns() << "\n"
<< " Expected number of columns: " << expectedColumns << "\n";
throw std::runtime_error( oss.str() );
}
}
//*************************************************************************************************
//*************************************************************************************************
/*!\brief Checking the capacity of the given matrix.
//
// \param matrix The matrix to be checked.
// \param minCapacity The expected minimum capacity of the matrix.
// \return void
// \exception std::runtime_error Error detected.
//
// This function checks the capacity of the given matrix. In case the actual capacity is smaller
// than the given expected minimum capacity, a \a std::runtime_error exception is thrown.
*/
template< typename Type > // Type of the matrix
void SparseTest::checkCapacity( const Type& matrix, size_t minCapacity ) const
{
if( capacity( matrix ) < minCapacity ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid capacity detected\n"
<< " Details:\n"
<< " Capacity : " << capacity( matrix ) << "\n"
<< " Expected minimum capacity: " << minCapacity << "\n";
throw std::runtime_error( oss.str() );
}
}
//*************************************************************************************************
//*************************************************************************************************
/*!\brief Checking the capacity of a specific row/column of the given matrix.
//
// \param matrix The matrix to be checked.
// \param index The row/column to be checked.
// \param minCapacity The expected minimum capacity of the specified row/column.
// \return void
// \exception std::runtime_error Error detected.
//
// This function checks the capacity of a specific row/column of the given matrix. In case the
// actual capacity is smaller than the given expected minimum capacity, a \a std::runtime_error
// exception is thrown.
*/
template< typename Type > // Type of the matrix
void SparseTest::checkCapacity( const Type& matrix, size_t index, size_t minCapacity ) const
{
if( capacity( matrix, index ) < minCapacity ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid capacity detected in "
<< ( blaze::IsRowMajorMatrix<Type>::value ? "row " : "column " ) << index << "\n"
<< " Details:\n"
<< " Capacity : " << capacity( matrix, index ) << "\n"
<< " Expected minimum capacity: " << minCapacity << "\n";
throw std::runtime_error( oss.str() );
}
}
//*************************************************************************************************
//*************************************************************************************************
/*!\brief Checking the number of non-zero elements of the given matrix.
//
// \param matrix The matrix to be checked.
// \param expectedNonZeros The expected number of non-zero elements of the matrix.
// \return void
// \exception std::runtime_error Error detected.
//
// This function checks the number of non-zero elements of the given matrix. In case the
// actual number of non-zero elements does not correspond to the given expected number,
// a \a std::runtime_error exception is thrown.
*/
template< typename Type > // Type of the matrix
void SparseTest::checkNonZeros( const Type& matrix, size_t expectedNonZeros ) const
{
if( nonZeros( matrix ) != expectedNonZeros ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid number of non-zero elements\n"
<< " Details:\n"
<< " Number of non-zeros : " << nonZeros( matrix ) << "\n"
<< " Expected number of non-zeros: " << expectedNonZeros << "\n";
throw std::runtime_error( oss.str() );
}
if( capacity( matrix ) < nonZeros( matrix ) ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid capacity detected\n"
<< " Details:\n"
<< " Number of non-zeros: " << nonZeros( matrix ) << "\n"
<< " Capacity : " << capacity( matrix ) << "\n";
throw std::runtime_error( oss.str() );
}
}
//*************************************************************************************************
//*************************************************************************************************
/*!\brief Checking the number of non-zero elements in a specific row/column of the given matrix.
//
// \param matrix The matrix to be checked.
// \param index The row/column to be checked.
// \param expectedNonZeros The expected number of non-zero elements in the specified row/column.
// \return void
// \exception std::runtime_error Error detected.
//
// This function checks the number of non-zero elements in the specified row/column of the
// given matrix. In case the actual number of non-zero elements does not correspond to the
// given expected number, a \a std::runtime_error exception is thrown.
*/
template< typename Type > // Type of the matrix
void SparseTest::checkNonZeros( const Type& matrix, size_t index, size_t expectedNonZeros ) const
{
if( nonZeros( matrix, index ) != expectedNonZeros ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid number of non-zero elements in "
<< ( blaze::IsRowMajorMatrix<Type>::value ? "row " : "column " ) << index << "\n"
<< " Details:\n"
<< " Number of non-zeros : " << nonZeros( matrix, index ) << "\n"
<< " Expected number of non-zeros: " << expectedNonZeros << "\n";
throw std::runtime_error( oss.str() );
}
if( capacity( matrix, index ) < nonZeros( matrix, index ) ) {
std::ostringstream oss;
oss << " Test: " << test_ << "\n"
<< " Error: Invalid capacity detected in "
<< ( blaze::IsRowMajorMatrix<Type>::value ? "row " : "column " ) << index << "\n"
<< " Details:\n"
<< " Number of non-zeros: " << nonZeros( matrix, index ) << "\n"
<< " Capacity : " << capacity( matrix, index ) << "\n";
throw std::runtime_error( oss.str() );
}
}
//*************************************************************************************************
//=================================================================================================
//
// GLOBAL TEST FUNCTIONS
//
//=================================================================================================
//*************************************************************************************************
/*!\brief Testing the functionality of the sparse StrictlyLowerMatrix specialization.
//
// \return void
*/
void runTest()
{
SparseTest();
}
//*************************************************************************************************
//=================================================================================================
//
// MACRO DEFINITIONS
//
//=================================================================================================
//*************************************************************************************************
/*! \cond BLAZE_INTERNAL */
/*!\brief Macro for the execution of the StrictlyLowerMatrix sparse test.
*/
#define RUN_STRICTLYLOWERMATRIX_SPARSE_TEST \
blazetest::mathtest::strictlylowermatrix::runTest()
/*! \endcond */
//*************************************************************************************************
} // namespace strictlylowermatrix
} // namespace mathtest
} // namespace blazetest
#endif
| [
"[email protected]"
] | |
b20e86a527421b6a13980907e78092e671073155 | dc7ba2a2eb5f6eb721074e25dbf16b5e15a3b298 | /src/realta/inc/MRealTimeAnalyzer.h | ee4df15ad09356f70ae7d089e19ad6f75dd199e6 | [] | no_license | markbandstra/megalib | 094fc75debe3cff24a79ba8c3485180c92d70858 | 078f4d23813d8185a75414e1cdb2099d73f17a65 | refs/heads/master | 2021-01-17T08:34:07.177308 | 2013-11-15T22:17:10 | 2013-11-15T22:17:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,264 | h | /*
* MRealTimeAnalyzer.h
*
* Copyright (C) by Andreas Zoglauer.
* All rights reserved.
*
* Please see the source-file for the copyright-notice.
*
*/
#ifndef __MRealTimeAnalyzer__
#define __MRealTimeAnalyzer__
////////////////////////////////////////////////////////////////////////////////
// Standard libs:
#include <list>
#include <vector>
using namespace std;
// ROOT libs:
#include "TH1.h"
#include "TThread.h"
#include "TMutex.h"
// MEGAlib libs:
#include "MGlobal.h"
#include "MSettingsRealta.h"
#include "MRealTimeEvent.h"
#include "MTransceiverTcpIp.h"
#include "MImageSpheric.h"
#include "MImagerExternallyManaged.h"
#include "MIsotope.h"
// Forward declarations:
////////////////////////////////////////////////////////////////////////////////
void* StartTransmissionThread(void* Analysis);
void* StartCoincidenceThread(void* Analysis);
void* StartReconstructionThread(void* Analysis);
void* StartImagingThread(void* Analysis);
void* StartHistogrammingThread(void* Analysis);
void* StartIdentificationThread(void* Analysis);
////////////////////////////////////////////////////////////////////////////////
class MRealTimeAnalyzer
{
// public interface:
public:
//! Default constructor for the real-time analyzer
MRealTimeAnalyzer();
//! Default desstructor for the real-time analyzer
virtual ~MRealTimeAnalyzer();
//! Set all the user definable settings
void SetSettings(MSettingsRealta* Settings);
//! Set the accumulation time
void SetAccumulationTime(double AccumulationTime);
//! Start all the analysis
void StartAnalysis();
//! Stop all the analysis
void StopAnalysis();
//! Connect to the other machine
bool Connect();
//! Disconnect from the other machine
bool Disconnect();
//! Reset the analysis
bool Reset();
//! The infinite reading loop
void OneTransmissionLoop();
//! The infinite coincidence loop
void OneCoincidenceLoop();
//! The infinite reconstruction loop
void OneReconstructionLoop();
//! The infinite backprojection loop
void OneImagingLoop();
//! The infinite backprojection loop
void OneHistogrammingLoop();
//! The infinite identification loop
void OneIdentificationLoop();
//! Get count rate historgram
TH1D* GetCountRateHistogram() { return m_CountRate; }
//! Get spectrum historgram
TH1D* GetSpectrumHistogram() { return m_Spectrum; }
//! Get image
MImageSpheric* GetImage() { return m_Image; }
//! Get a COPY of the isotope list
vector<MIsotope> GetIsotopes();
//! Return the connection
bool IsConnected() { return m_IsConnected; }
//! Get the transmission thread CPU usage...
double GetTransmissionThreadCpuUsage() { return m_TransmissionThreadCpuUsage; }
//! Get the coincidence thread CPU usage...
double GetCoincidenceThreadCpuUsage() { return m_CoincidenceThreadCpuUsage; }
//! Get the reconstruction thread CPU usage...
double GetReconstructionThreadCpuUsage() { return m_ReconstructionThreadCpuUsage; }
//! Get the imaging thread CPU usage...
double GetImagingThreadCpuUsage() { return m_ImagingThreadCpuUsage; }
//! Get the imaging thread CPU usage...
double GetHistogrammingThreadCpuUsage() { return m_HistogrammingThreadCpuUsage; }
//! Get the identification thread CPU usage...
double GetIdentificationThreadCpuUsage() { return m_IdentificationThreadCpuUsage; }
//! Get the ID of the last event handled in the transmission thread...
unsigned int GetTransmissionThreadLastEventID() { return m_TransmissionThreadLastEventID; }
//! Get the ID of the last event handled in the coincidence thread...
unsigned int GetCoincidenceThreadLastEventID() { return m_CoincidenceThreadLastEventID; }
//! Get the ID of the last event handled in the reconstruction thread...
unsigned int GetReconstructionThreadLastEventID() { return m_ReconstructionThreadLastEventID; }
//! Get the ID of the last event handled in the imaging thread...
unsigned int GetImagingThreadLastEventID() { return m_ImagingThreadLastEventID; }
//! Get the ID of the last event handled in the histogramming thread...
unsigned int GetHistogrammingThreadLastEventID() { return m_HistogrammingThreadLastEventID; }
//! Get the ID of the last event handled in the identification thread...
unsigned int GetIdentificationThreadLastEventID() { return m_IdentificationThreadLastEventID; }
// protected methods:
protected:
//! initialize an object of MImagerExternallyManaged
MImagerExternallyManaged* InitializeImager();
// private methods:
private:
// protected members:
protected:
// private members:
private:
//! The user settings
MSettingsRealta* m_Settings;
//! The thread where the transmission happens
TThread* m_TransmissionThread;
//! True if the transmission thread is in its execution loop
bool m_IsTransmissionThreadRunning;
//! The CPU usage of the transmission thread
double m_TransmissionThreadCpuUsage;
//! The ID of the last transmitted event
unsigned int m_TransmissionThreadLastEventID;
//! The thread where the coincidence finding happens
TThread* m_CoincidenceThread;
//! True if the coincidence thread is in its execution loop
bool m_IsCoincidenceThreadRunning;
//! The CPU usage of the coincidence thread
double m_CoincidenceThreadCpuUsage;
//! The ID of the last coincident event
unsigned int m_CoincidenceThreadLastEventID;
//! The thread where the event reconstruction happens
TThread* m_ReconstructionThread;
//! True if the reconstruction thread is in its execution loop
bool m_IsReconstructionThreadRunning;
//! The CPU usage of the reconstruction thread
double m_ReconstructionThreadCpuUsage;
//! The ID of the last reconstructed event
unsigned int m_ReconstructionThreadLastEventID;
//! The thread where the backprojection happens
TThread* m_ImagingThread;
//! True if the imaging thread is in its execution loop
bool m_IsImagingThreadRunning;
//! The CPU usage of the imaging thread
double m_ImagingThreadCpuUsage;
//! The ID of the last imaged event
unsigned int m_ImagingThreadLastEventID;
//! The thread where the histogramming happens
TThread* m_HistogrammingThread;
//! True if the histogramming thread is in its execution loop
bool m_IsHistogrammingThreadRunning;
//! The CPU usage of the histogramming thread
double m_HistogrammingThreadCpuUsage;
//! The ID of the last histogrammed event
unsigned int m_HistogrammingThreadLastEventID;
//! The thread where the identification happens
TThread* m_IdentificationThread;
//! True if the identification thread is in its execution loop
bool m_IsIdentificationThreadRunning;
//! The CPU usage of the identification thread
double m_IdentificationThreadCpuUsage;
//! The ID of the last identification event
unsigned int m_IdentificationThreadLastEventID;
//! Unique Id for all the threads...
static int m_ThreadId;
//! True if the threads should be stopped
bool m_StopThreads;
//! True is the analysis is running
bool m_IsAnalysisRunning;
//! True if we are at the thread initialization stage
bool m_IsInitializing;
//! True is the analysis is running
bool m_IsConnected;
//! True if we should disconnect
bool m_DoDisconnect;
//! The transceiver
MTransceiverTcpIp* m_Transceiver;
//! The geometry file name
MString m_GeometryFileName;
//! The accumulation time in seconds
double m_AccumulationTime;
//! And a guarding mutex for the accumulation time
TMutex m_AccumulationTimeMutex;
//! The "list"
list<MRealTimeEvent*> m_Events;
//! Current number of events in the list
unsigned int m_NEvents;
//! Maximum number of events to keep in the list
unsigned int m_MaxNEvents;
//! The current count rate histogram
TH1D* m_CountRate;
//! The current spectrum histogram
TH1D* m_Spectrum;
//! The current image
MImageSpheric* m_Image;
//! A list of isoptopes to identify:
vector<MIsotope> m_Isotopes;
//! And a guarding mutex for the isotope retrieval
TMutex m_IsotopeMutex;
#ifdef ___CINT___
public:
ClassDef(MRealTimeAnalyzer, 0) // no description
#endif
};
#endif
////////////////////////////////////////////////////////////////////////////////
| [
"[email protected]"
] | |
53b019bf7af6c946cb28120dff6e8a1dcfdb7bca | 573b127ac411ac7b1c865df4faa302f86686f1f5 | /src/nettest.cpp | 250912797d3ea111556adc3c4f64c52c08bb2db1 | [
"LGPL-2.1-only",
"BSD-3-Clause"
] | permissive | ericloewe/MCIS | db454631646c7fecbe5a32fca45e1aa2358925c5 | 2d740e715de55acfc57ba2048ebd5f0409ee7c5f | refs/heads/master | 2021-05-03T22:07:07.504796 | 2019-07-24T22:40:56 | 2019-07-24T22:40:56 | 120,386,541 | 0 | 0 | BSD-3-Clause | 2019-05-05T23:18:34 | 2018-02-06T01:48:28 | C++ | UTF-8 | C++ | false | false | 4,074 | cpp | /*
Copyright (c) 2018, Eric Loewenthal
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the organization nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <iostream>
#include <fstream>
#include <vector>
#include <chrono>
#include "include/MCIS_config.h"
#include "include/MCIS_MDA.h"
#include "include/discreteMath.h"
#include "include/MCIS_xplane_sock.h"
#include "include/MCIS_fileio.h"
#define configFileName "MCISconfig.bin"
#define outFilename "nettest.csv"
#define inputsLogname "nettestinputs.csv"
#define inPort 10555
int main()
{
MCISconfig config;
std::ofstream outfile;
std::ofstream inputslog;
std::ifstream configFile;
char *fileIn = (char *)&config;
std::cout << "MCIS network test" << std::endl;
//Try to open the config file...
configFile.open(configFileName, std::ios_base::binary);
if (!configFile.good())
{
std::cout << "Error opening config file " << configFileName << std::endl;
return 0;
}
//And try to read it.
configFile.read(fileIn, sizeof(MCISconfig));
if (configFile.gcount() != sizeof(MCISconfig))
{
std::cout << "Config file truncated! Cannot start MCIS using config file " << configFileName << std::endl;
return 0;
}
std::cout << "Configuration loaded." << std::endl;
MCIS_MDA mda{config};
outfile.open(outFilename);
if (!outfile.good())
{
std::cout << "Failed to open output file: " << outFilename << std::endl;
return 0;
}
inputslog.open(inputsLogname);
if (!inputslog.good())
{
std::cout << "Failed to open inputs log file: " << inputsLogname << std::endl;
return 0;
}
MCISvector sfIn, angIn, posOut, angOut;
xplaneSocket inSock(inPort, XP9);
auto nextTick = std::chrono::high_resolution_clock::now();
//std::chrono::high_resolution_clock::duration oneSecond(std::chrono::duration<long long>(1));
auto sampleTime = std::chrono::nanoseconds( (int)(1e9 / config.sampleRate));
//auto sampleTime = std::chrono::microseconds((unsigned long)(10e9));
/*std::cout << "std::chrono::duration = " << sampleTime.count() << " ns" << std::endl;
std::cout << " = " << sampleTime.count() * 1e-9 << " s" << std::endl;
std::cout << "sampleRate = " << config.sampleRate << std::endl;*/
//for (int i = 0; i < 120; i++)
while (true)
{
nextTick += sampleTime;
inSock.getData(sfIn, angIn);
writeMCISoutputs(inputslog, sfIn, angIn);
mda.nextSample(sfIn, angIn);
writeMCISfullOutputs(outfile, mda.getPos(), mda.getangle(), mda.getAngleNoTC());
std::this_thread::sleep_until(nextTick);
}
} | [
"[email protected]"
] | |
9dceb7b5ab98a39ed44318ad1a8489ac3d595a88 | 079fc299d6a1622832f738bac1f28167df6b0b9c | /cpp_module05/ex02/main.cpp | 36aed6f73e1e0188ce12a0fc390a0946ebb73e73 | [] | no_license | xogml123/cpp | 294fa038e078a18cf3e24fdd7eea32692b634b25 | 4e2a24e169ad2e31cb8d9d6ba3afa2f8de21d9f3 | refs/heads/master | 2023-08-14T01:40:37.260112 | 2021-10-06T14:59:55 | 2021-10-06T14:59:55 | 374,075,489 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 627 | cpp | #include "Bureaucrat.hpp"
#include "Form.hpp"
#include "ShrubberyCreationForm.hpp"
#include "RobotomyRequestForm.hpp"
#include "PresidentialPardonForm.hpp"
int main()
{
Bureaucrat* b1 = NULL;
Form* f1 = NULL;
Form* f2 = NULL;
Form* f3 = NULL;
try
{
b1 = new Bureaucrat("tom",44);
f1 = new ShrubberyCreationForm("tomForm");
f2 = new RobotomyRequestForm("johnForm");
f3 = new PresidentialPardonForm("jamesForm");
}
catch(const std::exception& e)
{
std::cerr << e.what() << '\n';
}
b1->executeForm(*f1);
b1->executeForm(*f2);
b1->executeForm(*f3);
delete b1;
delete f1;
delete f2;
delete f3;
} | [
"[email protected]"
] | |
620aee5d02c9c243ef3a39ed96ff79d657ddda08 | 508fff84ee929a68daac4ff900d36912f0d6b6ed | /WSEExternal/include/Common/GeometryUtilities/Mesh/Utils/IndexSet/hkIndexSet.h | 32337cce9fc583f33ac7b5100c28cf36e8a1d649 | [
"WTFPL"
] | permissive | blockspacer/wse | f2e05755ba1263c645d0b021548a73e5a5a33ba6 | 3ad901f1a463139b320c30ea08bdc343358ea6b6 | refs/heads/master | 2023-03-16T13:15:04.153026 | 2014-02-13T08:10:03 | 2014-02-13T08:10:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,731 | h | /*
*
* Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's
* prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok.
* Level 2 and Level 3 source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2009 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement.
*
*/
#ifndef HK_INDEX_SET_H
#define HK_INDEX_SET_H
/// Holds a unique set of int indices.
///
/// This implements a 'mathematical' style set of int values or 'indices'.
///
/// A set either contains or does not contain an index. Sets can be combined via the standard set
/// operations of setIntersection, setUnion and setDifference. This operations are designed to be relatively
/// fast. Note that the sets passed in cannot be the same as the set that is being modified.
///
/// Its possible to modify the contents using startUpdate/endUpdate. Members can be added/removed from the
/// set by manipulating the array. Doing endUpdate will sort the members, and remove any duplicates.
///
/// The implementation holds the indices held in the set in a sorted array. Having a sorted list, allows for fast
/// comparison, and the boolean operations. It also allows relatively fast containment tesing - using a binary chop
/// giving O(log2(n)) performance.
class hkIndexSet
{
public:
HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_SCENE_DATA, hkIndexSet);
/// Returns the index of index if found, else -1 if not
/// Complexity - O(log(n)) n is is size of set
int findIndex(int index) const;
/// Returns true if the set contains the index
/// Complexity - O(log(n)) n is is size of set
hkBool contains(int index) const { return findIndex(index) >= 0; }
/// Returns the indices which are in both sets
/// Complexity O(n + m) n is size of a, m is size of b
void setIntersection(const hkIndexSet& a, const hkIndexSet& b);
/// Returns the union of both sets
/// Complexity O(n + m) n is size of a, m is size of b
void setUnion(const hkIndexSet& a, const hkIndexSet& b);
/// Set the set as the members of a minus the members of b
/// Complexity O(n + m) n is size of a, m is size of b
void setDifference(const hkIndexSet& a, const hkIndexSet& b);
/// Read only access to contained indices
const hkArray<int>& getIndices() const { return m_indices; }
/// Start updating the contents
/// Complexity - O(1)
hkArray<int>& startUpdate();
/// End the update
/// Complexity - O(n), will reorder indices and remove duplicates
void endUpdate();
/// Get the number of indices. Note the can be incorrect in an update if there are repeated indices.
int getSize() const { return m_indices.getSize(); }
/// Remove a value (can only be done in an update)
/// Complextiy - O(n)
void removeIndex(int index);
/// Add a value (can only be done in an update)
/// Complexity O(1). Note that each addition will consume memory, duplicates are only removed in the end update
void addIndex(int index);
/// Remove all of the contents
void clear() { m_indices.clear(); }
/// Optimizes memory allocation
void optimizeAllocation();
/// Clears and deallocates
void clearAndDeallocate() { m_indices.clearAndDeallocate(); }
/// Swap
void swap(hkIndexSet& rhs) { m_indices.swap(rhs.m_indices); }
/// Returns true if the index sets are the same
hkBool operator==(const hkIndexSet& rhs) const;
/// Returns true if the index sets are not equal
hkBool operator!=(const hkIndexSet& rhs) const { return !(*this == rhs); }
/// Assignment
void operator=(const hkIndexSet& rhs);
/// Calculate the number members of both this and the parameter
int calculateNumIntersecting(const hkIndexSet& rhs) const;
/// Calculate the total unique members in both
int calculateNumUnion(const hkIndexSet& rhs) const;
/// Ctor
hkIndexSet();
/// Copy ctor
hkIndexSet(const hkIndexSet& rhs);
/// Calculates the number of members which intersect and are union
static void HK_CALL calculateNumIntersectAndUnion(const hkIndexSet& setA, const hkIndexSet& setB, int& numIntersectOut, int& numUnionOut);
#ifdef HK_DEBUG
// Used to test this class is functioning correctly
static void HK_CALL selfTest();
#endif
protected:
hkArray<int> m_indices;
hkBool m_inUpdate;
};
#endif // HK_INDEX_SET_H
/*
* Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20090704)
*
* Confidential Information of Havok. (C) Copyright 1999-2009
* Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok
* Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership
* rights, and intellectual property rights in the Havok software remain in
* Havok and/or its suppliers.
*
* Use of this software for evaluation purposes is subject to and indicates
* acceptance of the End User licence Agreement for this product. A copy of
* the license is included with this software and is also available at www.havok.com/tryhavok.
*
*/
| [
"[email protected]"
] | |
f69039f513ef26156f52104bff97d4d7c8309d4f | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /third_party/blink/public/platform/interface_registry.h | 73c378e9f6e8f2c3eba7304551392816cc4dabd0 | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | C++ | false | false | 3,602 | h | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_INTERFACE_REGISTRY_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_INTERFACE_REGISTRY_H_
#include <utility>
#include "base/callback_forward.h"
#include "base/memory/scoped_refptr.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" // nogncheck
#include "third_party/blink/renderer/platform/wtf/functional.h" // nogncheck
#endif
namespace base {
class SingleThreadTaskRunner;
}
namespace blink {
using InterfaceFactory =
base::RepeatingCallback<void(mojo::ScopedMessagePipeHandle)>;
using AssociatedInterfaceFactory =
base::RepeatingCallback<void(mojo::ScopedInterfaceEndpointHandle)>;
class BLINK_PLATFORM_EXPORT InterfaceRegistry {
public:
virtual void AddInterface(
const char* name,
const InterfaceFactory&,
scoped_refptr<base::SingleThreadTaskRunner> = nullptr) = 0;
// The usage of associated interfaces should be very limited. Please
// consult the owners of public/platform before adding one.
virtual void AddAssociatedInterface(const char* name,
const AssociatedInterfaceFactory&) = 0;
static InterfaceRegistry* GetEmptyInterfaceRegistry();
#if INSIDE_BLINK
template <typename Interface>
void AddInterface(
base::RepeatingCallback<void(mojo::PendingReceiver<Interface>)> factory) {
AddInterface(
Interface::Name_,
WTF::BindRepeating(&InterfaceRegistry::ForwardToInterfaceFactory<
mojo::PendingReceiver<Interface>>,
std::move(factory)));
}
template <typename Interface>
void AddInterface(
base::RepeatingCallback<void(mojo::PendingReceiver<Interface>)> factory,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
DCHECK(task_runner->RunsTasksInCurrentSequence());
AddInterface(
Interface::Name_,
WTF::BindRepeating(&InterfaceRegistry::ForwardToInterfaceFactory<
mojo::PendingReceiver<Interface>>,
std::move(factory)),
std::move(task_runner));
}
template <typename Interface>
void AddAssociatedInterface(
base::RepeatingCallback<void(mojo::PendingAssociatedReceiver<Interface>)>
factory) {
AddAssociatedInterface(
Interface::Name_,
WTF::BindRepeating(
&InterfaceRegistry::ForwardToAssociatedInterfaceFactory<
mojo::PendingAssociatedReceiver<Interface>>,
std::move(factory)));
}
private:
template <typename MojoType>
static void ForwardToInterfaceFactory(
base::RepeatingCallback<void(MojoType)> factory,
mojo::ScopedMessagePipeHandle handle) {
factory.Run(MojoType(std::move(handle)));
}
template <typename MojoType>
static void ForwardToAssociatedInterfaceFactory(
base::RepeatingCallback<void(MojoType)> factory,
mojo::ScopedInterfaceEndpointHandle handle) {
factory.Run(MojoType(std::move(handle)));
}
#endif // INSIDE_BLINK
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_INTERFACE_REGISTRY_H_
| [
"[email protected]"
] | |
98a0abd656cb94ddef2dc9444cffd420338cfb4b | a278262a622032cfa6fa8c3c62ed5eb63866310b | /include/MetaInfo.h | 346837801d1c94a460bd09b850c6e0c2b6ad8d41 | [] | no_license | WindLeafSing/lrc_system | 38c8de0262c30ffa08a999c4aff7717800bdf3b4 | 82f88ad8a57efec8f54593bf4132f723bcf0919c | refs/heads/master | 2023-04-08T04:10:52.244527 | 2021-04-19T08:42:54 | 2021-04-19T08:42:54 | 358,582,183 | 0 | 0 | null | 2021-04-19T08:42:55 | 2021-04-16T11:50:17 | null | UTF-8 | C++ | false | false | 3,174 | h | //
// Created by 杜清鹏 on 2021/3/29.
//
#ifndef LRC_METAINFO_H
#define LRC_METAINFO_H
#include "devcommon.h"
namespace lrc{
/*
* this file provides general filesystem meta infomation such as StripeInfo , ClusterInfo etc.
*/
struct ECSchema{
ECSchema() =default;
ECSchema(int datablk, int localparityblk, int globalparityblk, int blksize) : datablk(datablk),
localparityblk{localparityblk},globalparityblk{globalparityblk},blksize{blksize}{}
int datablk;
int localparityblk;
int globalparityblk;
int blksize; // count Bytes
};
struct ECSchemaHash{
std::size_t operator()(const ECSchema & ecSchema)const {
return std::hash<int>()(ecSchema.datablk)+std::hash<int>()(ecSchema.localparityblk)+std::hash<int>()(ecSchema.globalparityblk);
}
};
struct ECSchemaCMP{
bool operator()(const ECSchema & left,const ECSchema & right) const
{
return left.datablk==right.datablk&&
left.localparityblk==right.localparityblk&&
left.globalparityblk==right.globalparityblk;
}
};
enum ErasureCodingPolicy{
LRC = 0 // default
};
struct StripeInfo{
/*
* describe a stripe[same as a file in this project] , consists of stripe width , local parity
* and global parity blocks , currently our own LRC ECSchema
*/
//location : an uri vector
//ie : [{datablk :}ip:port1,ip:port2,...|{local_parity_blk :}ip:port k+1,...|{global_parityblk : }... ]
std::vector<std::string> blklocation;
//ie : [cluster1 , cluster1 ,cluster2,] means blklocation[i] coming from clusterdistribution[i]
std::vector<int> clusterdistribution;
std::string dir;
int stripeid;
ECSchema ecschema;
ErasureCodingPolicy ecpolicy;
bool operator<(const StripeInfo &rhs) const {
return stripeid < rhs.stripeid;
}
};
struct DataNodeInfo{
std::unordered_set<int> stored_stripeid;//{stripeid,block_type(0:data 1:localp 2:globalp)}
std::string crosscluster_routeruri;
int clusterid;
int consumed_space;//count in MB because blk size count in MB too
int port;
};
struct ClusterInfo{
std::vector<std::string> datanodesuri;
std::string gatewayuri;
int clusterid;
int stripeload;//stripes number
ClusterInfo(const std::vector<std::string> &datanodesuri, const std::string &gatewayuri, int clusterid,
int stripeload) : datanodesuri(datanodesuri), gatewayuri(gatewayuri), clusterid(clusterid),
stripeload(stripeload) {}
ClusterInfo()=default;
};
/*
* decribe a filesystem namespace
*/
/*
struct FileSystemDirectoryTree{
struct FileSystemDirectoryNode{
FileSystemObject
std::vector<FileSystemDirectoryNode *> childnodes;
};
};
*/
}
#endif //LRC_METAINFO_H
| [
"[email protected]"
] | |
ca0c3b13465618bea0dfd72c097003afb2d6d543 | dae66863ac441ab98adbd2d6dc2cabece7ba90be | /examples/flexrun/ASWorkFlexRun.h | aad3385447c35be6ad42d6653b4001fb392c9140 | [] | no_license | bitcrystal/flexcppbridge | 2485e360f47f8d8d124e1d7af5237f7e30dd1980 | 474c17cfa271a9d260be6afb2496785e69e72ead | refs/heads/master | 2021-01-10T14:14:30.928229 | 2008-11-11T06:11:34 | 2008-11-11T06:11:34 | 48,993,836 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,045 | h | /*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Flex C++ Bridge.
*
* The Initial Developer of the Original Code is
* Anirudh Sasikumar (http://anirudhs.chaosnet.org/).
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*/
#pragma once
#include "aswork.h"
class CASWorkFlexRun :
public CASWork
{
protected:
virtual void Worker();
public:
CASWorkFlexRun(void);
virtual ~CASWorkFlexRun(void);
virtual CASWork* Clone();
};
| [
"anirudhsasikumar@1c1c0844-4f48-0410-9872-0bebc774e022"
] | anirudhsasikumar@1c1c0844-4f48-0410-9872-0bebc774e022 |
2371b0d0c33d76cc6c2989eab05c6982d5c36064 | 0322b03bea0c57f7c7866037f41ee3e5b792826a | /source/serializer/decoder/decoder.cpp | c1715e581a983e390067f1f43d0876efe4cd4a7d | [] | no_license | tiberiu/super-duper-octo-robot | 0be0c48dc838502d66081df29a106cf137dc50a7 | 0778ef0e54c51b20b506bdfb7b305c3c84c0a716 | refs/heads/master | 2021-01-01T03:58:00.773780 | 2016-05-21T08:56:50 | 2016-05-21T08:56:50 | 56,438,609 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 350 | cpp | #include "serializer/decoder/decoder.h"
#include "serializer/decoder/textdecoder.h"
Decoder* Decoder::GetDecoder(std::string dataFormat) {
return new TextDecoder();
}
Decoder::Node::Node() {
this->isList = false;
this->isObj = false;
this->isValue = false;
this->data = NULL;
}
Decoder::Node::~Node() {
// TODO: clean up
}
| [
"[email protected]"
] | |
abf1d8883944292071ef22c8ae2ba8c4ff7e8134 | ac92a9c7251a11048a314d9d452f7a9e8816b258 | /Temp/il2cppOutput/il2cppOutput/Il2CppCompilerCalculateTypeValues_8Table.cpp | 3abadb311f8b0c705f80f659ea54f136c118938d | [] | no_license | vannorman/MappingPrefabs | a411858b792f24e62cf17d80981981cc3779adc7 | 22f3fb8389ec8c0298ac0a863994dcb00fc1ceaa | refs/heads/master | 2020-03-29T07:15:25.468882 | 2019-02-01T17:17:13 | 2019-02-01T17:17:13 | 149,658,755 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 250,928 | 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"
// Microsoft.Win32.SafeHandles.SafeWaitHandle
struct SafeWaitHandle_t1972936122;
// System.ActivationContext
struct ActivationContext_t976916018;
// System.AppDomainInitializer
struct AppDomainInitializer_t682969308;
// System.AppDomainManager
struct AppDomainManager_t1420869192;
// System.ApplicationIdentity
struct ApplicationIdentity_t1917735356;
// System.AssemblyLoadEventHandler
struct AssemblyLoadEventHandler_t107971893;
// System.AttributeUsageAttribute
struct AttributeUsageAttribute_t290877318;
// System.Boolean[]
struct BooleanU5BU5D_t2897418192;
// System.Byte[]
struct ByteU5BU5D_t4116647657;
// System.Char[]
struct CharU5BU5D_t3528271667;
// System.Collections.ArrayList
struct ArrayList_t2718874744;
// System.Collections.Hashtable
struct Hashtable_t1853889766;
// System.Collections.IDictionary
struct IDictionary_t1363984059;
// System.Collections.SortedList
struct SortedList_t2427694641;
// System.Delegate
struct Delegate_t1188392813;
// System.EventHandler
struct EventHandler_t1348719766;
// System.IO.TextReader
struct TextReader_t283511965;
// System.IO.TextWriter
struct TextWriter_t3478189236;
// System.Int32[]
struct Int32U5BU5D_t385246372;
// System.IntPtr[]
struct IntPtrU5BU5D_t4013366056;
// System.MonoEnumInfo/IntComparer
struct IntComparer_t3812095803;
// System.MonoEnumInfo/LongComparer
struct LongComparer_t1798269597;
// System.MonoEnumInfo/SByteComparer
struct SByteComparer_t2329725001;
// System.MonoEnumInfo/ShortComparer
struct ShortComparer_t2253094562;
// System.MulticastDelegate
struct MulticastDelegate_t;
// System.Object[]
struct ObjectU5BU5D_t2843939325;
// System.OperatingSystem
struct OperatingSystem_t3730783609;
// System.Reflection.Assembly
struct Assembly_t;
// System.Reflection.ConstructorInfo
struct ConstructorInfo_t5769829;
// System.ResolveEventHandler
struct ResolveEventHandler_t2775508208;
// System.Runtime.Hosting.ActivationArguments
struct ActivationArguments_t4219999170;
// System.Runtime.Remoting.ServerIdentity
struct ServerIdentity_t2342208608;
// System.SByte[]
struct SByteU5BU5D_t2651576203;
// System.Security.Cryptography.RandomNumberGenerator
struct RandomNumberGenerator_t386037858;
// System.Security.PermissionSet
struct PermissionSet_t223948603;
// System.Security.Policy.ApplicationTrust
struct ApplicationTrust_t3270368423;
// System.Security.Policy.Evidence
struct Evidence_t2008144148;
// System.Security.Principal.IPrincipal
struct IPrincipal_t2343618843;
// System.Security.SecurityContext
struct SecurityContext_t2435442044;
// System.Security.SecurityElement
struct SecurityElement_t1046076091;
// System.String
struct String_t;
// System.String[]
struct StringU5BU5D_t1281789340;
// System.Text.DecoderFallback
struct DecoderFallback_t3123823036;
// System.Text.DecoderFallbackBuffer
struct DecoderFallbackBuffer_t2402303981;
// System.Text.EncoderFallback
struct EncoderFallback_t1188251036;
// System.Text.Encoding
struct Encoding_t1523322056;
// System.Threading.ExecutionContext
struct ExecutionContext_t1748372627;
// System.Threading.ManualResetEvent
struct ManualResetEvent_t451242010;
// System.Threading.Timer/Scheduler
struct Scheduler_t3215764947;
// System.Threading.TimerCallback
struct TimerCallback_t1438585625;
// System.Threading.WaitHandle
struct WaitHandle_t1743403487;
// System.Threading.WaitOrTimerCallback
struct WaitOrTimerCallback_t1973723282;
// System.Type
struct Type_t;
// System.Type[]
struct TypeU5BU5D_t3940880105;
// System.UnhandledExceptionEventHandler
struct UnhandledExceptionEventHandler_t3101989324;
// System.Void
struct Void_t1185182177;
#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 ACTIVATIONCONTEXT_T976916018_H
#define ACTIVATIONCONTEXT_T976916018_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ActivationContext
struct ActivationContext_t976916018 : public RuntimeObject
{
public:
// System.Boolean System.ActivationContext::_disposed
bool ____disposed_0;
public:
inline static int32_t get_offset_of__disposed_0() { return static_cast<int32_t>(offsetof(ActivationContext_t976916018, ____disposed_0)); }
inline bool get__disposed_0() const { return ____disposed_0; }
inline bool* get_address_of__disposed_0() { return &____disposed_0; }
inline void set__disposed_0(bool value)
{
____disposed_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ACTIVATIONCONTEXT_T976916018_H
#ifndef ACTIVATOR_T1841325713_H
#define ACTIVATOR_T1841325713_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Activator
struct Activator_t1841325713 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ACTIVATOR_T1841325713_H
#ifndef APPLICATIONIDENTITY_T1917735356_H
#define APPLICATIONIDENTITY_T1917735356_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ApplicationIdentity
struct ApplicationIdentity_t1917735356 : public RuntimeObject
{
public:
// System.String System.ApplicationIdentity::_fullName
String_t* ____fullName_0;
public:
inline static int32_t get_offset_of__fullName_0() { return static_cast<int32_t>(offsetof(ApplicationIdentity_t1917735356, ____fullName_0)); }
inline String_t* get__fullName_0() const { return ____fullName_0; }
inline String_t** get_address_of__fullName_0() { return &____fullName_0; }
inline void set__fullName_0(String_t* value)
{
____fullName_0 = value;
Il2CppCodeGenWriteBarrier((&____fullName_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // APPLICATIONIDENTITY_T1917735356_H
#ifndef ATTRIBUTE_T861562559_H
#define ATTRIBUTE_T861562559_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Attribute
struct Attribute_t861562559 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ATTRIBUTE_T861562559_H
#ifndef BITCONVERTER_T3118986983_H
#define BITCONVERTER_T3118986983_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.BitConverter
struct BitConverter_t3118986983 : public RuntimeObject
{
public:
public:
};
struct BitConverter_t3118986983_StaticFields
{
public:
// System.Boolean System.BitConverter::SwappedWordsInDouble
bool ___SwappedWordsInDouble_0;
// System.Boolean System.BitConverter::IsLittleEndian
bool ___IsLittleEndian_1;
public:
inline static int32_t get_offset_of_SwappedWordsInDouble_0() { return static_cast<int32_t>(offsetof(BitConverter_t3118986983_StaticFields, ___SwappedWordsInDouble_0)); }
inline bool get_SwappedWordsInDouble_0() const { return ___SwappedWordsInDouble_0; }
inline bool* get_address_of_SwappedWordsInDouble_0() { return &___SwappedWordsInDouble_0; }
inline void set_SwappedWordsInDouble_0(bool value)
{
___SwappedWordsInDouble_0 = value;
}
inline static int32_t get_offset_of_IsLittleEndian_1() { return static_cast<int32_t>(offsetof(BitConverter_t3118986983_StaticFields, ___IsLittleEndian_1)); }
inline bool get_IsLittleEndian_1() const { return ___IsLittleEndian_1; }
inline bool* get_address_of_IsLittleEndian_1() { return &___IsLittleEndian_1; }
inline void set_IsLittleEndian_1(bool value)
{
___IsLittleEndian_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BITCONVERTER_T3118986983_H
#ifndef BUFFER_T1599081364_H
#define BUFFER_T1599081364_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Buffer
struct Buffer_t1599081364 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BUFFER_T1599081364_H
#ifndef CHARENUMERATOR_T1121470421_H
#define CHARENUMERATOR_T1121470421_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.CharEnumerator
struct CharEnumerator_t1121470421 : public RuntimeObject
{
public:
// System.String System.CharEnumerator::str
String_t* ___str_0;
// System.Int32 System.CharEnumerator::index
int32_t ___index_1;
// System.Int32 System.CharEnumerator::length
int32_t ___length_2;
public:
inline static int32_t get_offset_of_str_0() { return static_cast<int32_t>(offsetof(CharEnumerator_t1121470421, ___str_0)); }
inline String_t* get_str_0() const { return ___str_0; }
inline String_t** get_address_of_str_0() { return &___str_0; }
inline void set_str_0(String_t* value)
{
___str_0 = value;
Il2CppCodeGenWriteBarrier((&___str_0), value);
}
inline static int32_t get_offset_of_index_1() { return static_cast<int32_t>(offsetof(CharEnumerator_t1121470421, ___index_1)); }
inline int32_t get_index_1() const { return ___index_1; }
inline int32_t* get_address_of_index_1() { return &___index_1; }
inline void set_index_1(int32_t value)
{
___index_1 = value;
}
inline static int32_t get_offset_of_length_2() { return static_cast<int32_t>(offsetof(CharEnumerator_t1121470421, ___length_2)); }
inline int32_t get_length_2() const { return ___length_2; }
inline int32_t* get_address_of_length_2() { return &___length_2; }
inline void set_length_2(int32_t value)
{
___length_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CHARENUMERATOR_T1121470421_H
#ifndef CONSOLE_T3208230065_H
#define CONSOLE_T3208230065_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Console
struct Console_t3208230065 : public RuntimeObject
{
public:
public:
};
struct Console_t3208230065_StaticFields
{
public:
// System.IO.TextWriter System.Console::stdout
TextWriter_t3478189236 * ___stdout_0;
// System.IO.TextWriter System.Console::stderr
TextWriter_t3478189236 * ___stderr_1;
// System.IO.TextReader System.Console::stdin
TextReader_t283511965 * ___stdin_2;
// System.Text.Encoding System.Console::inputEncoding
Encoding_t1523322056 * ___inputEncoding_3;
// System.Text.Encoding System.Console::outputEncoding
Encoding_t1523322056 * ___outputEncoding_4;
public:
inline static int32_t get_offset_of_stdout_0() { return static_cast<int32_t>(offsetof(Console_t3208230065_StaticFields, ___stdout_0)); }
inline TextWriter_t3478189236 * get_stdout_0() const { return ___stdout_0; }
inline TextWriter_t3478189236 ** get_address_of_stdout_0() { return &___stdout_0; }
inline void set_stdout_0(TextWriter_t3478189236 * value)
{
___stdout_0 = value;
Il2CppCodeGenWriteBarrier((&___stdout_0), value);
}
inline static int32_t get_offset_of_stderr_1() { return static_cast<int32_t>(offsetof(Console_t3208230065_StaticFields, ___stderr_1)); }
inline TextWriter_t3478189236 * get_stderr_1() const { return ___stderr_1; }
inline TextWriter_t3478189236 ** get_address_of_stderr_1() { return &___stderr_1; }
inline void set_stderr_1(TextWriter_t3478189236 * value)
{
___stderr_1 = value;
Il2CppCodeGenWriteBarrier((&___stderr_1), value);
}
inline static int32_t get_offset_of_stdin_2() { return static_cast<int32_t>(offsetof(Console_t3208230065_StaticFields, ___stdin_2)); }
inline TextReader_t283511965 * get_stdin_2() const { return ___stdin_2; }
inline TextReader_t283511965 ** get_address_of_stdin_2() { return &___stdin_2; }
inline void set_stdin_2(TextReader_t283511965 * value)
{
___stdin_2 = value;
Il2CppCodeGenWriteBarrier((&___stdin_2), value);
}
inline static int32_t get_offset_of_inputEncoding_3() { return static_cast<int32_t>(offsetof(Console_t3208230065_StaticFields, ___inputEncoding_3)); }
inline Encoding_t1523322056 * get_inputEncoding_3() const { return ___inputEncoding_3; }
inline Encoding_t1523322056 ** get_address_of_inputEncoding_3() { return &___inputEncoding_3; }
inline void set_inputEncoding_3(Encoding_t1523322056 * value)
{
___inputEncoding_3 = value;
Il2CppCodeGenWriteBarrier((&___inputEncoding_3), value);
}
inline static int32_t get_offset_of_outputEncoding_4() { return static_cast<int32_t>(offsetof(Console_t3208230065_StaticFields, ___outputEncoding_4)); }
inline Encoding_t1523322056 * get_outputEncoding_4() const { return ___outputEncoding_4; }
inline Encoding_t1523322056 ** get_address_of_outputEncoding_4() { return &___outputEncoding_4; }
inline void set_outputEncoding_4(Encoding_t1523322056 * value)
{
___outputEncoding_4 = value;
Il2CppCodeGenWriteBarrier((&___outputEncoding_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONSOLE_T3208230065_H
#ifndef CONVERT_T2465617642_H
#define CONVERT_T2465617642_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Convert
struct Convert_t2465617642 : public RuntimeObject
{
public:
public:
};
struct Convert_t2465617642_StaticFields
{
public:
// System.Object System.Convert::DBNull
RuntimeObject * ___DBNull_0;
// System.Type[] System.Convert::conversionTable
TypeU5BU5D_t3940880105* ___conversionTable_1;
public:
inline static int32_t get_offset_of_DBNull_0() { return static_cast<int32_t>(offsetof(Convert_t2465617642_StaticFields, ___DBNull_0)); }
inline RuntimeObject * get_DBNull_0() const { return ___DBNull_0; }
inline RuntimeObject ** get_address_of_DBNull_0() { return &___DBNull_0; }
inline void set_DBNull_0(RuntimeObject * value)
{
___DBNull_0 = value;
Il2CppCodeGenWriteBarrier((&___DBNull_0), value);
}
inline static int32_t get_offset_of_conversionTable_1() { return static_cast<int32_t>(offsetof(Convert_t2465617642_StaticFields, ___conversionTable_1)); }
inline TypeU5BU5D_t3940880105* get_conversionTable_1() const { return ___conversionTable_1; }
inline TypeU5BU5D_t3940880105** get_address_of_conversionTable_1() { return &___conversionTable_1; }
inline void set_conversionTable_1(TypeU5BU5D_t3940880105* value)
{
___conversionTable_1 = value;
Il2CppCodeGenWriteBarrier((&___conversionTable_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONVERT_T2465617642_H
#ifndef DBNULL_T3725197148_H
#define DBNULL_T3725197148_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DBNull
struct DBNull_t3725197148 : public RuntimeObject
{
public:
public:
};
struct DBNull_t3725197148_StaticFields
{
public:
// System.DBNull System.DBNull::Value
DBNull_t3725197148 * ___Value_0;
public:
inline static int32_t get_offset_of_Value_0() { return static_cast<int32_t>(offsetof(DBNull_t3725197148_StaticFields, ___Value_0)); }
inline DBNull_t3725197148 * get_Value_0() const { return ___Value_0; }
inline DBNull_t3725197148 ** get_address_of_Value_0() { return &___Value_0; }
inline void set_Value_0(DBNull_t3725197148 * value)
{
___Value_0 = value;
Il2CppCodeGenWriteBarrier((&___Value_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DBNULL_T3725197148_H
#ifndef DATETIMEUTILS_T3080864452_H
#define DATETIMEUTILS_T3080864452_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTimeUtils
struct DateTimeUtils_t3080864452 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIMEUTILS_T3080864452_H
#ifndef DELEGATEDATA_T1677132599_H
#define DELEGATEDATA_T1677132599_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DelegateData
struct DelegateData_t1677132599 : 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;
public:
inline static int32_t get_offset_of_target_type_0() { return static_cast<int32_t>(offsetof(DelegateData_t1677132599, ___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_t1677132599, ___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);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DELEGATEDATA_T1677132599_H
#ifndef DELEGATESERIALIZATIONHOLDER_T3408600559_H
#define DELEGATESERIALIZATIONHOLDER_T3408600559_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DelegateSerializationHolder
struct DelegateSerializationHolder_t3408600559 : public RuntimeObject
{
public:
// System.Delegate System.DelegateSerializationHolder::_delegate
Delegate_t1188392813 * ____delegate_0;
public:
inline static int32_t get_offset_of__delegate_0() { return static_cast<int32_t>(offsetof(DelegateSerializationHolder_t3408600559, ____delegate_0)); }
inline Delegate_t1188392813 * get__delegate_0() const { return ____delegate_0; }
inline Delegate_t1188392813 ** get_address_of__delegate_0() { return &____delegate_0; }
inline void set__delegate_0(Delegate_t1188392813 * value)
{
____delegate_0 = value;
Il2CppCodeGenWriteBarrier((&____delegate_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DELEGATESERIALIZATIONHOLDER_T3408600559_H
#ifndef DELEGATEENTRY_T1019584161_H
#define DELEGATEENTRY_T1019584161_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_t1019584161 : 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_t1019584161 * ___delegateEntry_6;
public:
inline static int32_t get_offset_of_type_0() { return static_cast<int32_t>(offsetof(DelegateEntry_t1019584161, ___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_t1019584161, ___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_t1019584161, ___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_t1019584161, ___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_t1019584161, ___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_t1019584161, ___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_t1019584161, ___delegateEntry_6)); }
inline DelegateEntry_t1019584161 * get_delegateEntry_6() const { return ___delegateEntry_6; }
inline DelegateEntry_t1019584161 ** get_address_of_delegateEntry_6() { return &___delegateEntry_6; }
inline void set_delegateEntry_6(DelegateEntry_t1019584161 * value)
{
___delegateEntry_6 = value;
Il2CppCodeGenWriteBarrier((&___delegateEntry_6), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DELEGATEENTRY_T1019584161_H
#ifndef ENVIRONMENT_T2712485525_H
#define ENVIRONMENT_T2712485525_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Environment
struct Environment_t2712485525 : public RuntimeObject
{
public:
public:
};
struct Environment_t2712485525_StaticFields
{
public:
// System.OperatingSystem System.Environment::os
OperatingSystem_t3730783609 * ___os_1;
public:
inline static int32_t get_offset_of_os_1() { return static_cast<int32_t>(offsetof(Environment_t2712485525_StaticFields, ___os_1)); }
inline OperatingSystem_t3730783609 * get_os_1() const { return ___os_1; }
inline OperatingSystem_t3730783609 ** get_address_of_os_1() { return &___os_1; }
inline void set_os_1(OperatingSystem_t3730783609 * value)
{
___os_1 = value;
Il2CppCodeGenWriteBarrier((&___os_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ENVIRONMENT_T2712485525_H
#ifndef EVENTARGS_T3591816995_H
#define EVENTARGS_T3591816995_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.EventArgs
struct EventArgs_t3591816995 : public RuntimeObject
{
public:
public:
};
struct EventArgs_t3591816995_StaticFields
{
public:
// System.EventArgs System.EventArgs::Empty
EventArgs_t3591816995 * ___Empty_0;
public:
inline static int32_t get_offset_of_Empty_0() { return static_cast<int32_t>(offsetof(EventArgs_t3591816995_StaticFields, ___Empty_0)); }
inline EventArgs_t3591816995 * get_Empty_0() const { return ___Empty_0; }
inline EventArgs_t3591816995 ** get_address_of_Empty_0() { return &___Empty_0; }
inline void set_Empty_0(EventArgs_t3591816995 * value)
{
___Empty_0 = value;
Il2CppCodeGenWriteBarrier((&___Empty_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EVENTARGS_T3591816995_H
#ifndef EXCEPTION_T_H
#define EXCEPTION_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Exception
struct Exception_t : public RuntimeObject
{
public:
// System.IntPtr[] System.Exception::trace_ips
IntPtrU5BU5D_t4013366056* ___trace_ips_0;
// System.Exception System.Exception::inner_exception
Exception_t * ___inner_exception_1;
// System.String System.Exception::message
String_t* ___message_2;
// System.String System.Exception::help_link
String_t* ___help_link_3;
// System.String System.Exception::class_name
String_t* ___class_name_4;
// System.String System.Exception::stack_trace
String_t* ___stack_trace_5;
// System.String System.Exception::_remoteStackTraceString
String_t* ____remoteStackTraceString_6;
// System.Int32 System.Exception::remote_stack_index
int32_t ___remote_stack_index_7;
// System.Int32 System.Exception::hresult
int32_t ___hresult_8;
// System.String System.Exception::source
String_t* ___source_9;
// System.Collections.IDictionary System.Exception::_data
RuntimeObject* ____data_10;
public:
inline static int32_t get_offset_of_trace_ips_0() { return static_cast<int32_t>(offsetof(Exception_t, ___trace_ips_0)); }
inline IntPtrU5BU5D_t4013366056* get_trace_ips_0() const { return ___trace_ips_0; }
inline IntPtrU5BU5D_t4013366056** get_address_of_trace_ips_0() { return &___trace_ips_0; }
inline void set_trace_ips_0(IntPtrU5BU5D_t4013366056* value)
{
___trace_ips_0 = value;
Il2CppCodeGenWriteBarrier((&___trace_ips_0), value);
}
inline static int32_t get_offset_of_inner_exception_1() { return static_cast<int32_t>(offsetof(Exception_t, ___inner_exception_1)); }
inline Exception_t * get_inner_exception_1() const { return ___inner_exception_1; }
inline Exception_t ** get_address_of_inner_exception_1() { return &___inner_exception_1; }
inline void set_inner_exception_1(Exception_t * value)
{
___inner_exception_1 = value;
Il2CppCodeGenWriteBarrier((&___inner_exception_1), value);
}
inline static int32_t get_offset_of_message_2() { return static_cast<int32_t>(offsetof(Exception_t, ___message_2)); }
inline String_t* get_message_2() const { return ___message_2; }
inline String_t** get_address_of_message_2() { return &___message_2; }
inline void set_message_2(String_t* value)
{
___message_2 = value;
Il2CppCodeGenWriteBarrier((&___message_2), value);
}
inline static int32_t get_offset_of_help_link_3() { return static_cast<int32_t>(offsetof(Exception_t, ___help_link_3)); }
inline String_t* get_help_link_3() const { return ___help_link_3; }
inline String_t** get_address_of_help_link_3() { return &___help_link_3; }
inline void set_help_link_3(String_t* value)
{
___help_link_3 = value;
Il2CppCodeGenWriteBarrier((&___help_link_3), value);
}
inline static int32_t get_offset_of_class_name_4() { return static_cast<int32_t>(offsetof(Exception_t, ___class_name_4)); }
inline String_t* get_class_name_4() const { return ___class_name_4; }
inline String_t** get_address_of_class_name_4() { return &___class_name_4; }
inline void set_class_name_4(String_t* value)
{
___class_name_4 = value;
Il2CppCodeGenWriteBarrier((&___class_name_4), value);
}
inline static int32_t get_offset_of_stack_trace_5() { return static_cast<int32_t>(offsetof(Exception_t, ___stack_trace_5)); }
inline String_t* get_stack_trace_5() const { return ___stack_trace_5; }
inline String_t** get_address_of_stack_trace_5() { return &___stack_trace_5; }
inline void set_stack_trace_5(String_t* value)
{
___stack_trace_5 = value;
Il2CppCodeGenWriteBarrier((&___stack_trace_5), value);
}
inline static int32_t get_offset_of__remoteStackTraceString_6() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackTraceString_6)); }
inline String_t* get__remoteStackTraceString_6() const { return ____remoteStackTraceString_6; }
inline String_t** get_address_of__remoteStackTraceString_6() { return &____remoteStackTraceString_6; }
inline void set__remoteStackTraceString_6(String_t* value)
{
____remoteStackTraceString_6 = value;
Il2CppCodeGenWriteBarrier((&____remoteStackTraceString_6), value);
}
inline static int32_t get_offset_of_remote_stack_index_7() { return static_cast<int32_t>(offsetof(Exception_t, ___remote_stack_index_7)); }
inline int32_t get_remote_stack_index_7() const { return ___remote_stack_index_7; }
inline int32_t* get_address_of_remote_stack_index_7() { return &___remote_stack_index_7; }
inline void set_remote_stack_index_7(int32_t value)
{
___remote_stack_index_7 = value;
}
inline static int32_t get_offset_of_hresult_8() { return static_cast<int32_t>(offsetof(Exception_t, ___hresult_8)); }
inline int32_t get_hresult_8() const { return ___hresult_8; }
inline int32_t* get_address_of_hresult_8() { return &___hresult_8; }
inline void set_hresult_8(int32_t value)
{
___hresult_8 = value;
}
inline static int32_t get_offset_of_source_9() { return static_cast<int32_t>(offsetof(Exception_t, ___source_9)); }
inline String_t* get_source_9() const { return ___source_9; }
inline String_t** get_address_of_source_9() { return &___source_9; }
inline void set_source_9(String_t* value)
{
___source_9 = value;
Il2CppCodeGenWriteBarrier((&___source_9), value);
}
inline static int32_t get_offset_of__data_10() { return static_cast<int32_t>(offsetof(Exception_t, ____data_10)); }
inline RuntimeObject* get__data_10() const { return ____data_10; }
inline RuntimeObject** get_address_of__data_10() { return &____data_10; }
inline void set__data_10(RuntimeObject* value)
{
____data_10 = value;
Il2CppCodeGenWriteBarrier((&____data_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXCEPTION_T_H
#ifndef GC_T959872083_H
#define GC_T959872083_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.GC
struct GC_t959872083 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GC_T959872083_H
#ifndef GUIDPARSER_T2761237274_H
#define GUIDPARSER_T2761237274_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Guid/GuidParser
struct GuidParser_t2761237274 : public RuntimeObject
{
public:
// System.String System.Guid/GuidParser::_src
String_t* ____src_0;
// System.Int32 System.Guid/GuidParser::_length
int32_t ____length_1;
// System.Int32 System.Guid/GuidParser::_cur
int32_t ____cur_2;
public:
inline static int32_t get_offset_of__src_0() { return static_cast<int32_t>(offsetof(GuidParser_t2761237274, ____src_0)); }
inline String_t* get__src_0() const { return ____src_0; }
inline String_t** get_address_of__src_0() { return &____src_0; }
inline void set__src_0(String_t* value)
{
____src_0 = value;
Il2CppCodeGenWriteBarrier((&____src_0), value);
}
inline static int32_t get_offset_of__length_1() { return static_cast<int32_t>(offsetof(GuidParser_t2761237274, ____length_1)); }
inline int32_t get__length_1() const { return ____length_1; }
inline int32_t* get_address_of__length_1() { return &____length_1; }
inline void set__length_1(int32_t value)
{
____length_1 = value;
}
inline static int32_t get_offset_of__cur_2() { return static_cast<int32_t>(offsetof(GuidParser_t2761237274, ____cur_2)); }
inline int32_t get__cur_2() const { return ____cur_2; }
inline int32_t* get_address_of__cur_2() { return &____cur_2; }
inline void set__cur_2(int32_t value)
{
____cur_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GUIDPARSER_T2761237274_H
#ifndef LOCALDATASTORESLOT_T740841968_H
#define LOCALDATASTORESLOT_T740841968_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.LocalDataStoreSlot
struct LocalDataStoreSlot_t740841968 : public RuntimeObject
{
public:
// System.Int32 System.LocalDataStoreSlot::slot
int32_t ___slot_0;
// System.Boolean System.LocalDataStoreSlot::thread_local
bool ___thread_local_1;
public:
inline static int32_t get_offset_of_slot_0() { return static_cast<int32_t>(offsetof(LocalDataStoreSlot_t740841968, ___slot_0)); }
inline int32_t get_slot_0() const { return ___slot_0; }
inline int32_t* get_address_of_slot_0() { return &___slot_0; }
inline void set_slot_0(int32_t value)
{
___slot_0 = value;
}
inline static int32_t get_offset_of_thread_local_1() { return static_cast<int32_t>(offsetof(LocalDataStoreSlot_t740841968, ___thread_local_1)); }
inline bool get_thread_local_1() const { return ___thread_local_1; }
inline bool* get_address_of_thread_local_1() { return &___thread_local_1; }
inline void set_thread_local_1(bool value)
{
___thread_local_1 = value;
}
};
struct LocalDataStoreSlot_t740841968_StaticFields
{
public:
// System.Object System.LocalDataStoreSlot::lock_obj
RuntimeObject * ___lock_obj_2;
// System.Boolean[] System.LocalDataStoreSlot::slot_bitmap_thread
BooleanU5BU5D_t2897418192* ___slot_bitmap_thread_3;
// System.Boolean[] System.LocalDataStoreSlot::slot_bitmap_context
BooleanU5BU5D_t2897418192* ___slot_bitmap_context_4;
public:
inline static int32_t get_offset_of_lock_obj_2() { return static_cast<int32_t>(offsetof(LocalDataStoreSlot_t740841968_StaticFields, ___lock_obj_2)); }
inline RuntimeObject * get_lock_obj_2() const { return ___lock_obj_2; }
inline RuntimeObject ** get_address_of_lock_obj_2() { return &___lock_obj_2; }
inline void set_lock_obj_2(RuntimeObject * value)
{
___lock_obj_2 = value;
Il2CppCodeGenWriteBarrier((&___lock_obj_2), value);
}
inline static int32_t get_offset_of_slot_bitmap_thread_3() { return static_cast<int32_t>(offsetof(LocalDataStoreSlot_t740841968_StaticFields, ___slot_bitmap_thread_3)); }
inline BooleanU5BU5D_t2897418192* get_slot_bitmap_thread_3() const { return ___slot_bitmap_thread_3; }
inline BooleanU5BU5D_t2897418192** get_address_of_slot_bitmap_thread_3() { return &___slot_bitmap_thread_3; }
inline void set_slot_bitmap_thread_3(BooleanU5BU5D_t2897418192* value)
{
___slot_bitmap_thread_3 = value;
Il2CppCodeGenWriteBarrier((&___slot_bitmap_thread_3), value);
}
inline static int32_t get_offset_of_slot_bitmap_context_4() { return static_cast<int32_t>(offsetof(LocalDataStoreSlot_t740841968_StaticFields, ___slot_bitmap_context_4)); }
inline BooleanU5BU5D_t2897418192* get_slot_bitmap_context_4() const { return ___slot_bitmap_context_4; }
inline BooleanU5BU5D_t2897418192** get_address_of_slot_bitmap_context_4() { return &___slot_bitmap_context_4; }
inline void set_slot_bitmap_context_4(BooleanU5BU5D_t2897418192* value)
{
___slot_bitmap_context_4 = value;
Il2CppCodeGenWriteBarrier((&___slot_bitmap_context_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // LOCALDATASTORESLOT_T740841968_H
#ifndef MARSHALBYREFOBJECT_T2760389100_H
#define MARSHALBYREFOBJECT_T2760389100_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MarshalByRefObject
struct MarshalByRefObject_t2760389100 : public RuntimeObject
{
public:
// System.Runtime.Remoting.ServerIdentity System.MarshalByRefObject::_identity
ServerIdentity_t2342208608 * ____identity_0;
public:
inline static int32_t get_offset_of__identity_0() { return static_cast<int32_t>(offsetof(MarshalByRefObject_t2760389100, ____identity_0)); }
inline ServerIdentity_t2342208608 * get__identity_0() const { return ____identity_0; }
inline ServerIdentity_t2342208608 ** get_address_of__identity_0() { return &____identity_0; }
inline void set__identity_0(ServerIdentity_t2342208608 * value)
{
____identity_0 = value;
Il2CppCodeGenWriteBarrier((&____identity_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MARSHALBYREFOBJECT_T2760389100_H
#ifndef MATH_T1671470975_H
#define MATH_T1671470975_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Math
struct Math_t1671470975 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MATH_T1671470975_H
#ifndef MONOCUSTOMATTRS_T3634537737_H
#define MONOCUSTOMATTRS_T3634537737_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoCustomAttrs
struct MonoCustomAttrs_t3634537737 : public RuntimeObject
{
public:
public:
};
struct MonoCustomAttrs_t3634537737_StaticFields
{
public:
// System.Reflection.Assembly System.MonoCustomAttrs::corlib
Assembly_t * ___corlib_0;
// System.Type System.MonoCustomAttrs::AttributeUsageType
Type_t * ___AttributeUsageType_1;
// System.AttributeUsageAttribute System.MonoCustomAttrs::DefaultAttributeUsage
AttributeUsageAttribute_t290877318 * ___DefaultAttributeUsage_2;
public:
inline static int32_t get_offset_of_corlib_0() { return static_cast<int32_t>(offsetof(MonoCustomAttrs_t3634537737_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_AttributeUsageType_1() { return static_cast<int32_t>(offsetof(MonoCustomAttrs_t3634537737_StaticFields, ___AttributeUsageType_1)); }
inline Type_t * get_AttributeUsageType_1() const { return ___AttributeUsageType_1; }
inline Type_t ** get_address_of_AttributeUsageType_1() { return &___AttributeUsageType_1; }
inline void set_AttributeUsageType_1(Type_t * value)
{
___AttributeUsageType_1 = value;
Il2CppCodeGenWriteBarrier((&___AttributeUsageType_1), value);
}
inline static int32_t get_offset_of_DefaultAttributeUsage_2() { return static_cast<int32_t>(offsetof(MonoCustomAttrs_t3634537737_StaticFields, ___DefaultAttributeUsage_2)); }
inline AttributeUsageAttribute_t290877318 * get_DefaultAttributeUsage_2() const { return ___DefaultAttributeUsage_2; }
inline AttributeUsageAttribute_t290877318 ** get_address_of_DefaultAttributeUsage_2() { return &___DefaultAttributeUsage_2; }
inline void set_DefaultAttributeUsage_2(AttributeUsageAttribute_t290877318 * value)
{
___DefaultAttributeUsage_2 = value;
Il2CppCodeGenWriteBarrier((&___DefaultAttributeUsage_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MONOCUSTOMATTRS_T3634537737_H
#ifndef ATTRIBUTEINFO_T2216804170_H
#define ATTRIBUTEINFO_T2216804170_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_t2216804170 : public RuntimeObject
{
public:
// System.AttributeUsageAttribute System.MonoCustomAttrs/AttributeInfo::_usage
AttributeUsageAttribute_t290877318 * ____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_t2216804170, ____usage_0)); }
inline AttributeUsageAttribute_t290877318 * get__usage_0() const { return ____usage_0; }
inline AttributeUsageAttribute_t290877318 ** get_address_of__usage_0() { return &____usage_0; }
inline void set__usage_0(AttributeUsageAttribute_t290877318 * value)
{
____usage_0 = value;
Il2CppCodeGenWriteBarrier((&____usage_0), value);
}
inline static int32_t get_offset_of__inheritanceLevel_1() { return static_cast<int32_t>(offsetof(AttributeInfo_t2216804170, ____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_T2216804170_H
#ifndef INTCOMPARER_T3812095803_H
#define INTCOMPARER_T3812095803_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoEnumInfo/IntComparer
struct IntComparer_t3812095803 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INTCOMPARER_T3812095803_H
#ifndef LONGCOMPARER_T1798269597_H
#define LONGCOMPARER_T1798269597_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoEnumInfo/LongComparer
struct LongComparer_t1798269597 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // LONGCOMPARER_T1798269597_H
#ifndef SBYTECOMPARER_T2329725001_H
#define SBYTECOMPARER_T2329725001_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoEnumInfo/SByteComparer
struct SByteComparer_t2329725001 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SBYTECOMPARER_T2329725001_H
#ifndef SHORTCOMPARER_T2253094562_H
#define SHORTCOMPARER_T2253094562_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoEnumInfo/ShortComparer
struct ShortComparer_t2253094562 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SHORTCOMPARER_T2253094562_H
#ifndef MONOTOUCHAOTHELPER_T570977590_H
#define MONOTOUCHAOTHELPER_T570977590_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoTouchAOTHelper
struct MonoTouchAOTHelper_t570977590 : public RuntimeObject
{
public:
public:
};
struct MonoTouchAOTHelper_t570977590_StaticFields
{
public:
// System.Boolean System.MonoTouchAOTHelper::FalseFlag
bool ___FalseFlag_0;
public:
inline static int32_t get_offset_of_FalseFlag_0() { return static_cast<int32_t>(offsetof(MonoTouchAOTHelper_t570977590_StaticFields, ___FalseFlag_0)); }
inline bool get_FalseFlag_0() const { return ___FalseFlag_0; }
inline bool* get_address_of_FalseFlag_0() { return &___FalseFlag_0; }
inline void set_FalseFlag_0(bool value)
{
___FalseFlag_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MONOTOUCHAOTHELPER_T570977590_H
#ifndef MONOTYPEINFO_T3366989025_H
#define MONOTYPEINFO_T3366989025_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoTypeInfo
struct MonoTypeInfo_t3366989025 : public RuntimeObject
{
public:
// System.String System.MonoTypeInfo::full_name
String_t* ___full_name_0;
// System.Reflection.ConstructorInfo System.MonoTypeInfo::default_ctor
ConstructorInfo_t5769829 * ___default_ctor_1;
public:
inline static int32_t get_offset_of_full_name_0() { return static_cast<int32_t>(offsetof(MonoTypeInfo_t3366989025, ___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_t3366989025, ___default_ctor_1)); }
inline ConstructorInfo_t5769829 * get_default_ctor_1() const { return ___default_ctor_1; }
inline ConstructorInfo_t5769829 ** get_address_of_default_ctor_1() { return &___default_ctor_1; }
inline void set_default_ctor_1(ConstructorInfo_t5769829 * value)
{
___default_ctor_1 = value;
Il2CppCodeGenWriteBarrier((&___default_ctor_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MONOTYPEINFO_T3366989025_H
#ifndef CRITICALFINALIZEROBJECT_T701527852_H
#define CRITICALFINALIZEROBJECT_T701527852_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Runtime.ConstrainedExecution.CriticalFinalizerObject
struct CriticalFinalizerObject_t701527852 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CRITICALFINALIZEROBJECT_T701527852_H
#ifndef DECODER_T2204182725_H
#define DECODER_T2204182725_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.Decoder
struct Decoder_t2204182725 : public RuntimeObject
{
public:
// System.Text.DecoderFallback System.Text.Decoder::fallback
DecoderFallback_t3123823036 * ___fallback_0;
// System.Text.DecoderFallbackBuffer System.Text.Decoder::fallback_buffer
DecoderFallbackBuffer_t2402303981 * ___fallback_buffer_1;
public:
inline static int32_t get_offset_of_fallback_0() { return static_cast<int32_t>(offsetof(Decoder_t2204182725, ___fallback_0)); }
inline DecoderFallback_t3123823036 * get_fallback_0() const { return ___fallback_0; }
inline DecoderFallback_t3123823036 ** get_address_of_fallback_0() { return &___fallback_0; }
inline void set_fallback_0(DecoderFallback_t3123823036 * value)
{
___fallback_0 = value;
Il2CppCodeGenWriteBarrier((&___fallback_0), value);
}
inline static int32_t get_offset_of_fallback_buffer_1() { return static_cast<int32_t>(offsetof(Decoder_t2204182725, ___fallback_buffer_1)); }
inline DecoderFallbackBuffer_t2402303981 * get_fallback_buffer_1() const { return ___fallback_buffer_1; }
inline DecoderFallbackBuffer_t2402303981 ** get_address_of_fallback_buffer_1() { return &___fallback_buffer_1; }
inline void set_fallback_buffer_1(DecoderFallbackBuffer_t2402303981 * value)
{
___fallback_buffer_1 = value;
Il2CppCodeGenWriteBarrier((&___fallback_buffer_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DECODER_T2204182725_H
#ifndef ENCODING_T1523322056_H
#define ENCODING_T1523322056_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.Encoding
struct Encoding_t1523322056 : public RuntimeObject
{
public:
// System.Int32 System.Text.Encoding::codePage
int32_t ___codePage_0;
// System.Int32 System.Text.Encoding::windows_code_page
int32_t ___windows_code_page_1;
// System.Boolean System.Text.Encoding::is_readonly
bool ___is_readonly_2;
// System.Text.DecoderFallback System.Text.Encoding::decoder_fallback
DecoderFallback_t3123823036 * ___decoder_fallback_3;
// System.Text.EncoderFallback System.Text.Encoding::encoder_fallback
EncoderFallback_t1188251036 * ___encoder_fallback_4;
// System.String System.Text.Encoding::body_name
String_t* ___body_name_8;
// System.String System.Text.Encoding::encoding_name
String_t* ___encoding_name_9;
// System.String System.Text.Encoding::header_name
String_t* ___header_name_10;
// System.Boolean System.Text.Encoding::is_mail_news_display
bool ___is_mail_news_display_11;
// System.Boolean System.Text.Encoding::is_mail_news_save
bool ___is_mail_news_save_12;
// System.Boolean System.Text.Encoding::is_browser_save
bool ___is_browser_save_13;
// System.Boolean System.Text.Encoding::is_browser_display
bool ___is_browser_display_14;
// System.String System.Text.Encoding::web_name
String_t* ___web_name_15;
public:
inline static int32_t get_offset_of_codePage_0() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___codePage_0)); }
inline int32_t get_codePage_0() const { return ___codePage_0; }
inline int32_t* get_address_of_codePage_0() { return &___codePage_0; }
inline void set_codePage_0(int32_t value)
{
___codePage_0 = value;
}
inline static int32_t get_offset_of_windows_code_page_1() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___windows_code_page_1)); }
inline int32_t get_windows_code_page_1() const { return ___windows_code_page_1; }
inline int32_t* get_address_of_windows_code_page_1() { return &___windows_code_page_1; }
inline void set_windows_code_page_1(int32_t value)
{
___windows_code_page_1 = value;
}
inline static int32_t get_offset_of_is_readonly_2() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_readonly_2)); }
inline bool get_is_readonly_2() const { return ___is_readonly_2; }
inline bool* get_address_of_is_readonly_2() { return &___is_readonly_2; }
inline void set_is_readonly_2(bool value)
{
___is_readonly_2 = value;
}
inline static int32_t get_offset_of_decoder_fallback_3() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___decoder_fallback_3)); }
inline DecoderFallback_t3123823036 * get_decoder_fallback_3() const { return ___decoder_fallback_3; }
inline DecoderFallback_t3123823036 ** get_address_of_decoder_fallback_3() { return &___decoder_fallback_3; }
inline void set_decoder_fallback_3(DecoderFallback_t3123823036 * value)
{
___decoder_fallback_3 = value;
Il2CppCodeGenWriteBarrier((&___decoder_fallback_3), value);
}
inline static int32_t get_offset_of_encoder_fallback_4() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___encoder_fallback_4)); }
inline EncoderFallback_t1188251036 * get_encoder_fallback_4() const { return ___encoder_fallback_4; }
inline EncoderFallback_t1188251036 ** get_address_of_encoder_fallback_4() { return &___encoder_fallback_4; }
inline void set_encoder_fallback_4(EncoderFallback_t1188251036 * value)
{
___encoder_fallback_4 = value;
Il2CppCodeGenWriteBarrier((&___encoder_fallback_4), value);
}
inline static int32_t get_offset_of_body_name_8() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___body_name_8)); }
inline String_t* get_body_name_8() const { return ___body_name_8; }
inline String_t** get_address_of_body_name_8() { return &___body_name_8; }
inline void set_body_name_8(String_t* value)
{
___body_name_8 = value;
Il2CppCodeGenWriteBarrier((&___body_name_8), value);
}
inline static int32_t get_offset_of_encoding_name_9() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___encoding_name_9)); }
inline String_t* get_encoding_name_9() const { return ___encoding_name_9; }
inline String_t** get_address_of_encoding_name_9() { return &___encoding_name_9; }
inline void set_encoding_name_9(String_t* value)
{
___encoding_name_9 = value;
Il2CppCodeGenWriteBarrier((&___encoding_name_9), value);
}
inline static int32_t get_offset_of_header_name_10() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___header_name_10)); }
inline String_t* get_header_name_10() const { return ___header_name_10; }
inline String_t** get_address_of_header_name_10() { return &___header_name_10; }
inline void set_header_name_10(String_t* value)
{
___header_name_10 = value;
Il2CppCodeGenWriteBarrier((&___header_name_10), value);
}
inline static int32_t get_offset_of_is_mail_news_display_11() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_mail_news_display_11)); }
inline bool get_is_mail_news_display_11() const { return ___is_mail_news_display_11; }
inline bool* get_address_of_is_mail_news_display_11() { return &___is_mail_news_display_11; }
inline void set_is_mail_news_display_11(bool value)
{
___is_mail_news_display_11 = value;
}
inline static int32_t get_offset_of_is_mail_news_save_12() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_mail_news_save_12)); }
inline bool get_is_mail_news_save_12() const { return ___is_mail_news_save_12; }
inline bool* get_address_of_is_mail_news_save_12() { return &___is_mail_news_save_12; }
inline void set_is_mail_news_save_12(bool value)
{
___is_mail_news_save_12 = value;
}
inline static int32_t get_offset_of_is_browser_save_13() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_browser_save_13)); }
inline bool get_is_browser_save_13() const { return ___is_browser_save_13; }
inline bool* get_address_of_is_browser_save_13() { return &___is_browser_save_13; }
inline void set_is_browser_save_13(bool value)
{
___is_browser_save_13 = value;
}
inline static int32_t get_offset_of_is_browser_display_14() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_browser_display_14)); }
inline bool get_is_browser_display_14() const { return ___is_browser_display_14; }
inline bool* get_address_of_is_browser_display_14() { return &___is_browser_display_14; }
inline void set_is_browser_display_14(bool value)
{
___is_browser_display_14 = value;
}
inline static int32_t get_offset_of_web_name_15() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___web_name_15)); }
inline String_t* get_web_name_15() const { return ___web_name_15; }
inline String_t** get_address_of_web_name_15() { return &___web_name_15; }
inline void set_web_name_15(String_t* value)
{
___web_name_15 = value;
Il2CppCodeGenWriteBarrier((&___web_name_15), value);
}
};
struct Encoding_t1523322056_StaticFields
{
public:
// System.Reflection.Assembly System.Text.Encoding::i18nAssembly
Assembly_t * ___i18nAssembly_5;
// System.Boolean System.Text.Encoding::i18nDisabled
bool ___i18nDisabled_6;
// System.Object[] System.Text.Encoding::encodings
ObjectU5BU5D_t2843939325* ___encodings_7;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::asciiEncoding
Encoding_t1523322056 * ___asciiEncoding_16;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::bigEndianEncoding
Encoding_t1523322056 * ___bigEndianEncoding_17;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::defaultEncoding
Encoding_t1523322056 * ___defaultEncoding_18;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf7Encoding
Encoding_t1523322056 * ___utf7Encoding_19;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf8EncodingWithMarkers
Encoding_t1523322056 * ___utf8EncodingWithMarkers_20;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf8EncodingWithoutMarkers
Encoding_t1523322056 * ___utf8EncodingWithoutMarkers_21;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::unicodeEncoding
Encoding_t1523322056 * ___unicodeEncoding_22;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::isoLatin1Encoding
Encoding_t1523322056 * ___isoLatin1Encoding_23;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf8EncodingUnsafe
Encoding_t1523322056 * ___utf8EncodingUnsafe_24;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf32Encoding
Encoding_t1523322056 * ___utf32Encoding_25;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::bigEndianUTF32Encoding
Encoding_t1523322056 * ___bigEndianUTF32Encoding_26;
// System.Object System.Text.Encoding::lockobj
RuntimeObject * ___lockobj_27;
public:
inline static int32_t get_offset_of_i18nAssembly_5() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___i18nAssembly_5)); }
inline Assembly_t * get_i18nAssembly_5() const { return ___i18nAssembly_5; }
inline Assembly_t ** get_address_of_i18nAssembly_5() { return &___i18nAssembly_5; }
inline void set_i18nAssembly_5(Assembly_t * value)
{
___i18nAssembly_5 = value;
Il2CppCodeGenWriteBarrier((&___i18nAssembly_5), value);
}
inline static int32_t get_offset_of_i18nDisabled_6() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___i18nDisabled_6)); }
inline bool get_i18nDisabled_6() const { return ___i18nDisabled_6; }
inline bool* get_address_of_i18nDisabled_6() { return &___i18nDisabled_6; }
inline void set_i18nDisabled_6(bool value)
{
___i18nDisabled_6 = value;
}
inline static int32_t get_offset_of_encodings_7() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___encodings_7)); }
inline ObjectU5BU5D_t2843939325* get_encodings_7() const { return ___encodings_7; }
inline ObjectU5BU5D_t2843939325** get_address_of_encodings_7() { return &___encodings_7; }
inline void set_encodings_7(ObjectU5BU5D_t2843939325* value)
{
___encodings_7 = value;
Il2CppCodeGenWriteBarrier((&___encodings_7), value);
}
inline static int32_t get_offset_of_asciiEncoding_16() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___asciiEncoding_16)); }
inline Encoding_t1523322056 * get_asciiEncoding_16() const { return ___asciiEncoding_16; }
inline Encoding_t1523322056 ** get_address_of_asciiEncoding_16() { return &___asciiEncoding_16; }
inline void set_asciiEncoding_16(Encoding_t1523322056 * value)
{
___asciiEncoding_16 = value;
Il2CppCodeGenWriteBarrier((&___asciiEncoding_16), value);
}
inline static int32_t get_offset_of_bigEndianEncoding_17() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___bigEndianEncoding_17)); }
inline Encoding_t1523322056 * get_bigEndianEncoding_17() const { return ___bigEndianEncoding_17; }
inline Encoding_t1523322056 ** get_address_of_bigEndianEncoding_17() { return &___bigEndianEncoding_17; }
inline void set_bigEndianEncoding_17(Encoding_t1523322056 * value)
{
___bigEndianEncoding_17 = value;
Il2CppCodeGenWriteBarrier((&___bigEndianEncoding_17), value);
}
inline static int32_t get_offset_of_defaultEncoding_18() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___defaultEncoding_18)); }
inline Encoding_t1523322056 * get_defaultEncoding_18() const { return ___defaultEncoding_18; }
inline Encoding_t1523322056 ** get_address_of_defaultEncoding_18() { return &___defaultEncoding_18; }
inline void set_defaultEncoding_18(Encoding_t1523322056 * value)
{
___defaultEncoding_18 = value;
Il2CppCodeGenWriteBarrier((&___defaultEncoding_18), value);
}
inline static int32_t get_offset_of_utf7Encoding_19() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf7Encoding_19)); }
inline Encoding_t1523322056 * get_utf7Encoding_19() const { return ___utf7Encoding_19; }
inline Encoding_t1523322056 ** get_address_of_utf7Encoding_19() { return &___utf7Encoding_19; }
inline void set_utf7Encoding_19(Encoding_t1523322056 * value)
{
___utf7Encoding_19 = value;
Il2CppCodeGenWriteBarrier((&___utf7Encoding_19), value);
}
inline static int32_t get_offset_of_utf8EncodingWithMarkers_20() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf8EncodingWithMarkers_20)); }
inline Encoding_t1523322056 * get_utf8EncodingWithMarkers_20() const { return ___utf8EncodingWithMarkers_20; }
inline Encoding_t1523322056 ** get_address_of_utf8EncodingWithMarkers_20() { return &___utf8EncodingWithMarkers_20; }
inline void set_utf8EncodingWithMarkers_20(Encoding_t1523322056 * value)
{
___utf8EncodingWithMarkers_20 = value;
Il2CppCodeGenWriteBarrier((&___utf8EncodingWithMarkers_20), value);
}
inline static int32_t get_offset_of_utf8EncodingWithoutMarkers_21() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf8EncodingWithoutMarkers_21)); }
inline Encoding_t1523322056 * get_utf8EncodingWithoutMarkers_21() const { return ___utf8EncodingWithoutMarkers_21; }
inline Encoding_t1523322056 ** get_address_of_utf8EncodingWithoutMarkers_21() { return &___utf8EncodingWithoutMarkers_21; }
inline void set_utf8EncodingWithoutMarkers_21(Encoding_t1523322056 * value)
{
___utf8EncodingWithoutMarkers_21 = value;
Il2CppCodeGenWriteBarrier((&___utf8EncodingWithoutMarkers_21), value);
}
inline static int32_t get_offset_of_unicodeEncoding_22() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___unicodeEncoding_22)); }
inline Encoding_t1523322056 * get_unicodeEncoding_22() const { return ___unicodeEncoding_22; }
inline Encoding_t1523322056 ** get_address_of_unicodeEncoding_22() { return &___unicodeEncoding_22; }
inline void set_unicodeEncoding_22(Encoding_t1523322056 * value)
{
___unicodeEncoding_22 = value;
Il2CppCodeGenWriteBarrier((&___unicodeEncoding_22), value);
}
inline static int32_t get_offset_of_isoLatin1Encoding_23() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___isoLatin1Encoding_23)); }
inline Encoding_t1523322056 * get_isoLatin1Encoding_23() const { return ___isoLatin1Encoding_23; }
inline Encoding_t1523322056 ** get_address_of_isoLatin1Encoding_23() { return &___isoLatin1Encoding_23; }
inline void set_isoLatin1Encoding_23(Encoding_t1523322056 * value)
{
___isoLatin1Encoding_23 = value;
Il2CppCodeGenWriteBarrier((&___isoLatin1Encoding_23), value);
}
inline static int32_t get_offset_of_utf8EncodingUnsafe_24() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf8EncodingUnsafe_24)); }
inline Encoding_t1523322056 * get_utf8EncodingUnsafe_24() const { return ___utf8EncodingUnsafe_24; }
inline Encoding_t1523322056 ** get_address_of_utf8EncodingUnsafe_24() { return &___utf8EncodingUnsafe_24; }
inline void set_utf8EncodingUnsafe_24(Encoding_t1523322056 * value)
{
___utf8EncodingUnsafe_24 = value;
Il2CppCodeGenWriteBarrier((&___utf8EncodingUnsafe_24), value);
}
inline static int32_t get_offset_of_utf32Encoding_25() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf32Encoding_25)); }
inline Encoding_t1523322056 * get_utf32Encoding_25() const { return ___utf32Encoding_25; }
inline Encoding_t1523322056 ** get_address_of_utf32Encoding_25() { return &___utf32Encoding_25; }
inline void set_utf32Encoding_25(Encoding_t1523322056 * value)
{
___utf32Encoding_25 = value;
Il2CppCodeGenWriteBarrier((&___utf32Encoding_25), value);
}
inline static int32_t get_offset_of_bigEndianUTF32Encoding_26() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___bigEndianUTF32Encoding_26)); }
inline Encoding_t1523322056 * get_bigEndianUTF32Encoding_26() const { return ___bigEndianUTF32Encoding_26; }
inline Encoding_t1523322056 ** get_address_of_bigEndianUTF32Encoding_26() { return &___bigEndianUTF32Encoding_26; }
inline void set_bigEndianUTF32Encoding_26(Encoding_t1523322056 * value)
{
___bigEndianUTF32Encoding_26 = value;
Il2CppCodeGenWriteBarrier((&___bigEndianUTF32Encoding_26), value);
}
inline static int32_t get_offset_of_lockobj_27() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___lockobj_27)); }
inline RuntimeObject * get_lockobj_27() const { return ___lockobj_27; }
inline RuntimeObject ** get_address_of_lockobj_27() { return &___lockobj_27; }
inline void set_lockobj_27(RuntimeObject * value)
{
___lockobj_27 = value;
Il2CppCodeGenWriteBarrier((&___lockobj_27), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ENCODING_T1523322056_H
#ifndef STRINGBUILDER_T_H
#define STRINGBUILDER_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.StringBuilder
struct StringBuilder_t : public RuntimeObject
{
public:
// System.Int32 System.Text.StringBuilder::_length
int32_t ____length_1;
// System.String System.Text.StringBuilder::_str
String_t* ____str_2;
// System.String System.Text.StringBuilder::_cached_str
String_t* ____cached_str_3;
// System.Int32 System.Text.StringBuilder::_maxCapacity
int32_t ____maxCapacity_4;
public:
inline static int32_t get_offset_of__length_1() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____length_1)); }
inline int32_t get__length_1() const { return ____length_1; }
inline int32_t* get_address_of__length_1() { return &____length_1; }
inline void set__length_1(int32_t value)
{
____length_1 = value;
}
inline static int32_t get_offset_of__str_2() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____str_2)); }
inline String_t* get__str_2() const { return ____str_2; }
inline String_t** get_address_of__str_2() { return &____str_2; }
inline void set__str_2(String_t* value)
{
____str_2 = value;
Il2CppCodeGenWriteBarrier((&____str_2), value);
}
inline static int32_t get_offset_of__cached_str_3() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____cached_str_3)); }
inline String_t* get__cached_str_3() const { return ____cached_str_3; }
inline String_t** get_address_of__cached_str_3() { return &____cached_str_3; }
inline void set__cached_str_3(String_t* value)
{
____cached_str_3 = value;
Il2CppCodeGenWriteBarrier((&____cached_str_3), value);
}
inline static int32_t get_offset_of__maxCapacity_4() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____maxCapacity_4)); }
inline int32_t get__maxCapacity_4() const { return ____maxCapacity_4; }
inline int32_t* get_address_of__maxCapacity_4() { return &____maxCapacity_4; }
inline void set__maxCapacity_4(int32_t value)
{
____maxCapacity_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STRINGBUILDER_T_H
#ifndef COMPRESSEDSTACK_T1202932761_H
#define COMPRESSEDSTACK_T1202932761_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.CompressedStack
struct CompressedStack_t1202932761 : public RuntimeObject
{
public:
// System.Collections.ArrayList System.Threading.CompressedStack::_list
ArrayList_t2718874744 * ____list_0;
public:
inline static int32_t get_offset_of__list_0() { return static_cast<int32_t>(offsetof(CompressedStack_t1202932761, ____list_0)); }
inline ArrayList_t2718874744 * get__list_0() const { return ____list_0; }
inline ArrayList_t2718874744 ** get_address_of__list_0() { return &____list_0; }
inline void set__list_0(ArrayList_t2718874744 * value)
{
____list_0 = value;
Il2CppCodeGenWriteBarrier((&____list_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMPRESSEDSTACK_T1202932761_H
#ifndef EXECUTIONCONTEXT_T1748372627_H
#define EXECUTIONCONTEXT_T1748372627_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ExecutionContext
struct ExecutionContext_t1748372627 : public RuntimeObject
{
public:
// System.Security.SecurityContext System.Threading.ExecutionContext::_sc
SecurityContext_t2435442044 * ____sc_0;
// System.Boolean System.Threading.ExecutionContext::_suppressFlow
bool ____suppressFlow_1;
// System.Boolean System.Threading.ExecutionContext::_capture
bool ____capture_2;
public:
inline static int32_t get_offset_of__sc_0() { return static_cast<int32_t>(offsetof(ExecutionContext_t1748372627, ____sc_0)); }
inline SecurityContext_t2435442044 * get__sc_0() const { return ____sc_0; }
inline SecurityContext_t2435442044 ** get_address_of__sc_0() { return &____sc_0; }
inline void set__sc_0(SecurityContext_t2435442044 * value)
{
____sc_0 = value;
Il2CppCodeGenWriteBarrier((&____sc_0), value);
}
inline static int32_t get_offset_of__suppressFlow_1() { return static_cast<int32_t>(offsetof(ExecutionContext_t1748372627, ____suppressFlow_1)); }
inline bool get__suppressFlow_1() const { return ____suppressFlow_1; }
inline bool* get_address_of__suppressFlow_1() { return &____suppressFlow_1; }
inline void set__suppressFlow_1(bool value)
{
____suppressFlow_1 = value;
}
inline static int32_t get_offset_of__capture_2() { return static_cast<int32_t>(offsetof(ExecutionContext_t1748372627, ____capture_2)); }
inline bool get__capture_2() const { return ____capture_2; }
inline bool* get_address_of__capture_2() { return &____capture_2; }
inline void set__capture_2(bool value)
{
____capture_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXECUTIONCONTEXT_T1748372627_H
#ifndef INTERLOCKED_T2273387594_H
#define INTERLOCKED_T2273387594_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.Interlocked
struct Interlocked_t2273387594 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INTERLOCKED_T2273387594_H
#ifndef MONITOR_T2197244473_H
#define MONITOR_T2197244473_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.Monitor
struct Monitor_t2197244473 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MONITOR_T2197244473_H
#ifndef NATIVEEVENTCALLS_T570794723_H
#define NATIVEEVENTCALLS_T570794723_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.NativeEventCalls
struct NativeEventCalls_t570794723 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // NATIVEEVENTCALLS_T570794723_H
#ifndef SYNCHRONIZATIONCONTEXT_T2326897723_H
#define SYNCHRONIZATIONCONTEXT_T2326897723_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.SynchronizationContext
struct SynchronizationContext_t2326897723 : public RuntimeObject
{
public:
public:
};
struct SynchronizationContext_t2326897723_ThreadStaticFields
{
public:
// System.Threading.SynchronizationContext System.Threading.SynchronizationContext::currentContext
SynchronizationContext_t2326897723 * ___currentContext_0;
public:
inline static int32_t get_offset_of_currentContext_0() { return static_cast<int32_t>(offsetof(SynchronizationContext_t2326897723_ThreadStaticFields, ___currentContext_0)); }
inline SynchronizationContext_t2326897723 * get_currentContext_0() const { return ___currentContext_0; }
inline SynchronizationContext_t2326897723 ** get_address_of_currentContext_0() { return &___currentContext_0; }
inline void set_currentContext_0(SynchronizationContext_t2326897723 * value)
{
___currentContext_0 = value;
Il2CppCodeGenWriteBarrier((&___currentContext_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SYNCHRONIZATIONCONTEXT_T2326897723_H
#ifndef THREADPOOL_T2177989550_H
#define THREADPOOL_T2177989550_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ThreadPool
struct ThreadPool_t2177989550 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // THREADPOOL_T2177989550_H
#ifndef SCHEDULER_T3215764947_H
#define SCHEDULER_T3215764947_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.Timer/Scheduler
struct Scheduler_t3215764947 : public RuntimeObject
{
public:
// System.Collections.SortedList System.Threading.Timer/Scheduler::list
SortedList_t2427694641 * ___list_1;
public:
inline static int32_t get_offset_of_list_1() { return static_cast<int32_t>(offsetof(Scheduler_t3215764947, ___list_1)); }
inline SortedList_t2427694641 * get_list_1() const { return ___list_1; }
inline SortedList_t2427694641 ** get_address_of_list_1() { return &___list_1; }
inline void set_list_1(SortedList_t2427694641 * value)
{
___list_1 = value;
Il2CppCodeGenWriteBarrier((&___list_1), value);
}
};
struct Scheduler_t3215764947_StaticFields
{
public:
// System.Threading.Timer/Scheduler System.Threading.Timer/Scheduler::instance
Scheduler_t3215764947 * ___instance_0;
public:
inline static int32_t get_offset_of_instance_0() { return static_cast<int32_t>(offsetof(Scheduler_t3215764947_StaticFields, ___instance_0)); }
inline Scheduler_t3215764947 * get_instance_0() const { return ___instance_0; }
inline Scheduler_t3215764947 ** get_address_of_instance_0() { return &___instance_0; }
inline void set_instance_0(Scheduler_t3215764947 * value)
{
___instance_0 = value;
Il2CppCodeGenWriteBarrier((&___instance_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SCHEDULER_T3215764947_H
#ifndef TIMERCOMPARER_T2774265395_H
#define TIMERCOMPARER_T2774265395_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.Timer/TimerComparer
struct TimerComparer_t2774265395 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TIMERCOMPARER_T2774265395_H
#ifndef VALUETYPE_T3640485471_H
#define VALUETYPE_T3640485471_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ValueType
struct ValueType_t3640485471 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_t3640485471_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_t3640485471_marshaled_com
{
};
#endif // VALUETYPE_T3640485471_H
#ifndef APPDOMAINMANAGER_T1420869192_H
#define APPDOMAINMANAGER_T1420869192_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.AppDomainManager
struct AppDomainManager_t1420869192 : public MarshalByRefObject_t2760389100
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // APPDOMAINMANAGER_T1420869192_H
#ifndef APPLICATIONEXCEPTION_T2339761290_H
#define APPLICATIONEXCEPTION_T2339761290_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ApplicationException
struct ApplicationException_t2339761290 : public Exception_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // APPLICATIONEXCEPTION_T2339761290_H
#ifndef ASSEMBLYLOADEVENTARGS_T2792010465_H
#define ASSEMBLYLOADEVENTARGS_T2792010465_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.AssemblyLoadEventArgs
struct AssemblyLoadEventArgs_t2792010465 : public EventArgs_t3591816995
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASSEMBLYLOADEVENTARGS_T2792010465_H
#ifndef CONTEXTBOUNDOBJECT_T1394786030_H
#define CONTEXTBOUNDOBJECT_T1394786030_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ContextBoundObject
struct ContextBoundObject_t1394786030 : public MarshalByRefObject_t2760389100
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONTEXTBOUNDOBJECT_T1394786030_H
#ifndef ENUM_T4135868527_H
#define ENUM_T4135868527_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Enum
struct Enum_t4135868527 : public ValueType_t3640485471
{
public:
public:
};
struct Enum_t4135868527_StaticFields
{
public:
// System.Char[] System.Enum::split_char
CharU5BU5D_t3528271667* ___split_char_0;
public:
inline static int32_t get_offset_of_split_char_0() { return static_cast<int32_t>(offsetof(Enum_t4135868527_StaticFields, ___split_char_0)); }
inline CharU5BU5D_t3528271667* get_split_char_0() const { return ___split_char_0; }
inline CharU5BU5D_t3528271667** get_address_of_split_char_0() { return &___split_char_0; }
inline void set_split_char_0(CharU5BU5D_t3528271667* value)
{
___split_char_0 = value;
Il2CppCodeGenWriteBarrier((&___split_char_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t4135868527_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t4135868527_marshaled_com
{
};
#endif // ENUM_T4135868527_H
#ifndef FLAGSATTRIBUTE_T2262502849_H
#define FLAGSATTRIBUTE_T2262502849_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.FlagsAttribute
struct FlagsAttribute_t2262502849 : public Attribute_t861562559
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FLAGSATTRIBUTE_T2262502849_H
#ifndef GUID_T_H
#define GUID_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Guid
struct Guid_t
{
public:
// System.Int32 System.Guid::_a
int32_t ____a_0;
// System.Int16 System.Guid::_b
int16_t ____b_1;
// System.Int16 System.Guid::_c
int16_t ____c_2;
// System.Byte System.Guid::_d
uint8_t ____d_3;
// System.Byte System.Guid::_e
uint8_t ____e_4;
// System.Byte System.Guid::_f
uint8_t ____f_5;
// System.Byte System.Guid::_g
uint8_t ____g_6;
// System.Byte System.Guid::_h
uint8_t ____h_7;
// System.Byte System.Guid::_i
uint8_t ____i_8;
// System.Byte System.Guid::_j
uint8_t ____j_9;
// System.Byte System.Guid::_k
uint8_t ____k_10;
public:
inline static int32_t get_offset_of__a_0() { return static_cast<int32_t>(offsetof(Guid_t, ____a_0)); }
inline int32_t get__a_0() const { return ____a_0; }
inline int32_t* get_address_of__a_0() { return &____a_0; }
inline void set__a_0(int32_t value)
{
____a_0 = value;
}
inline static int32_t get_offset_of__b_1() { return static_cast<int32_t>(offsetof(Guid_t, ____b_1)); }
inline int16_t get__b_1() const { return ____b_1; }
inline int16_t* get_address_of__b_1() { return &____b_1; }
inline void set__b_1(int16_t value)
{
____b_1 = value;
}
inline static int32_t get_offset_of__c_2() { return static_cast<int32_t>(offsetof(Guid_t, ____c_2)); }
inline int16_t get__c_2() const { return ____c_2; }
inline int16_t* get_address_of__c_2() { return &____c_2; }
inline void set__c_2(int16_t value)
{
____c_2 = value;
}
inline static int32_t get_offset_of__d_3() { return static_cast<int32_t>(offsetof(Guid_t, ____d_3)); }
inline uint8_t get__d_3() const { return ____d_3; }
inline uint8_t* get_address_of__d_3() { return &____d_3; }
inline void set__d_3(uint8_t value)
{
____d_3 = value;
}
inline static int32_t get_offset_of__e_4() { return static_cast<int32_t>(offsetof(Guid_t, ____e_4)); }
inline uint8_t get__e_4() const { return ____e_4; }
inline uint8_t* get_address_of__e_4() { return &____e_4; }
inline void set__e_4(uint8_t value)
{
____e_4 = value;
}
inline static int32_t get_offset_of__f_5() { return static_cast<int32_t>(offsetof(Guid_t, ____f_5)); }
inline uint8_t get__f_5() const { return ____f_5; }
inline uint8_t* get_address_of__f_5() { return &____f_5; }
inline void set__f_5(uint8_t value)
{
____f_5 = value;
}
inline static int32_t get_offset_of__g_6() { return static_cast<int32_t>(offsetof(Guid_t, ____g_6)); }
inline uint8_t get__g_6() const { return ____g_6; }
inline uint8_t* get_address_of__g_6() { return &____g_6; }
inline void set__g_6(uint8_t value)
{
____g_6 = value;
}
inline static int32_t get_offset_of__h_7() { return static_cast<int32_t>(offsetof(Guid_t, ____h_7)); }
inline uint8_t get__h_7() const { return ____h_7; }
inline uint8_t* get_address_of__h_7() { return &____h_7; }
inline void set__h_7(uint8_t value)
{
____h_7 = value;
}
inline static int32_t get_offset_of__i_8() { return static_cast<int32_t>(offsetof(Guid_t, ____i_8)); }
inline uint8_t get__i_8() const { return ____i_8; }
inline uint8_t* get_address_of__i_8() { return &____i_8; }
inline void set__i_8(uint8_t value)
{
____i_8 = value;
}
inline static int32_t get_offset_of__j_9() { return static_cast<int32_t>(offsetof(Guid_t, ____j_9)); }
inline uint8_t get__j_9() const { return ____j_9; }
inline uint8_t* get_address_of__j_9() { return &____j_9; }
inline void set__j_9(uint8_t value)
{
____j_9 = value;
}
inline static int32_t get_offset_of__k_10() { return static_cast<int32_t>(offsetof(Guid_t, ____k_10)); }
inline uint8_t get__k_10() const { return ____k_10; }
inline uint8_t* get_address_of__k_10() { return &____k_10; }
inline void set__k_10(uint8_t value)
{
____k_10 = value;
}
};
struct Guid_t_StaticFields
{
public:
// System.Guid System.Guid::Empty
Guid_t ___Empty_11;
// System.Object System.Guid::_rngAccess
RuntimeObject * ____rngAccess_12;
// System.Security.Cryptography.RandomNumberGenerator System.Guid::_rng
RandomNumberGenerator_t386037858 * ____rng_13;
// System.Security.Cryptography.RandomNumberGenerator System.Guid::_fastRng
RandomNumberGenerator_t386037858 * ____fastRng_14;
public:
inline static int32_t get_offset_of_Empty_11() { return static_cast<int32_t>(offsetof(Guid_t_StaticFields, ___Empty_11)); }
inline Guid_t get_Empty_11() const { return ___Empty_11; }
inline Guid_t * get_address_of_Empty_11() { return &___Empty_11; }
inline void set_Empty_11(Guid_t value)
{
___Empty_11 = value;
}
inline static int32_t get_offset_of__rngAccess_12() { return static_cast<int32_t>(offsetof(Guid_t_StaticFields, ____rngAccess_12)); }
inline RuntimeObject * get__rngAccess_12() const { return ____rngAccess_12; }
inline RuntimeObject ** get_address_of__rngAccess_12() { return &____rngAccess_12; }
inline void set__rngAccess_12(RuntimeObject * value)
{
____rngAccess_12 = value;
Il2CppCodeGenWriteBarrier((&____rngAccess_12), value);
}
inline static int32_t get_offset_of__rng_13() { return static_cast<int32_t>(offsetof(Guid_t_StaticFields, ____rng_13)); }
inline RandomNumberGenerator_t386037858 * get__rng_13() const { return ____rng_13; }
inline RandomNumberGenerator_t386037858 ** get_address_of__rng_13() { return &____rng_13; }
inline void set__rng_13(RandomNumberGenerator_t386037858 * value)
{
____rng_13 = value;
Il2CppCodeGenWriteBarrier((&____rng_13), value);
}
inline static int32_t get_offset_of__fastRng_14() { return static_cast<int32_t>(offsetof(Guid_t_StaticFields, ____fastRng_14)); }
inline RandomNumberGenerator_t386037858 * get__fastRng_14() const { return ____fastRng_14; }
inline RandomNumberGenerator_t386037858 ** get_address_of__fastRng_14() { return &____fastRng_14; }
inline void set__fastRng_14(RandomNumberGenerator_t386037858 * value)
{
____fastRng_14 = value;
Il2CppCodeGenWriteBarrier((&____fastRng_14), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GUID_T_H
#ifndef INT32_T2950945753_H
#define INT32_T2950945753_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int32
struct Int32_t2950945753
{
public:
// System.Int32 System.Int32::m_value
int32_t ___m_value_2;
public:
inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Int32_t2950945753, ___m_value_2)); }
inline int32_t get_m_value_2() const { return ___m_value_2; }
inline int32_t* get_address_of_m_value_2() { return &___m_value_2; }
inline void set_m_value_2(int32_t value)
{
___m_value_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INT32_T2950945753_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 MONOENUMINFO_T3694469084_H
#define MONOENUMINFO_T3694469084_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoEnumInfo
struct MonoEnumInfo_t3694469084
{
public:
// System.Type System.MonoEnumInfo::utype
Type_t * ___utype_0;
// System.Array System.MonoEnumInfo::values
RuntimeArray * ___values_1;
// System.String[] System.MonoEnumInfo::names
StringU5BU5D_t1281789340* ___names_2;
// System.Collections.Hashtable System.MonoEnumInfo::name_hash
Hashtable_t1853889766 * ___name_hash_3;
public:
inline static int32_t get_offset_of_utype_0() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084, ___utype_0)); }
inline Type_t * get_utype_0() const { return ___utype_0; }
inline Type_t ** get_address_of_utype_0() { return &___utype_0; }
inline void set_utype_0(Type_t * value)
{
___utype_0 = value;
Il2CppCodeGenWriteBarrier((&___utype_0), value);
}
inline static int32_t get_offset_of_values_1() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084, ___values_1)); }
inline RuntimeArray * get_values_1() const { return ___values_1; }
inline RuntimeArray ** get_address_of_values_1() { return &___values_1; }
inline void set_values_1(RuntimeArray * value)
{
___values_1 = value;
Il2CppCodeGenWriteBarrier((&___values_1), value);
}
inline static int32_t get_offset_of_names_2() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084, ___names_2)); }
inline StringU5BU5D_t1281789340* get_names_2() const { return ___names_2; }
inline StringU5BU5D_t1281789340** get_address_of_names_2() { return &___names_2; }
inline void set_names_2(StringU5BU5D_t1281789340* value)
{
___names_2 = value;
Il2CppCodeGenWriteBarrier((&___names_2), value);
}
inline static int32_t get_offset_of_name_hash_3() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084, ___name_hash_3)); }
inline Hashtable_t1853889766 * get_name_hash_3() const { return ___name_hash_3; }
inline Hashtable_t1853889766 ** get_address_of_name_hash_3() { return &___name_hash_3; }
inline void set_name_hash_3(Hashtable_t1853889766 * value)
{
___name_hash_3 = value;
Il2CppCodeGenWriteBarrier((&___name_hash_3), value);
}
};
struct MonoEnumInfo_t3694469084_StaticFields
{
public:
// System.Collections.Hashtable System.MonoEnumInfo::global_cache
Hashtable_t1853889766 * ___global_cache_5;
// System.Object System.MonoEnumInfo::global_cache_monitor
RuntimeObject * ___global_cache_monitor_6;
// System.MonoEnumInfo/SByteComparer System.MonoEnumInfo::sbyte_comparer
SByteComparer_t2329725001 * ___sbyte_comparer_7;
// System.MonoEnumInfo/ShortComparer System.MonoEnumInfo::short_comparer
ShortComparer_t2253094562 * ___short_comparer_8;
// System.MonoEnumInfo/IntComparer System.MonoEnumInfo::int_comparer
IntComparer_t3812095803 * ___int_comparer_9;
// System.MonoEnumInfo/LongComparer System.MonoEnumInfo::long_comparer
LongComparer_t1798269597 * ___long_comparer_10;
public:
inline static int32_t get_offset_of_global_cache_5() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084_StaticFields, ___global_cache_5)); }
inline Hashtable_t1853889766 * get_global_cache_5() const { return ___global_cache_5; }
inline Hashtable_t1853889766 ** get_address_of_global_cache_5() { return &___global_cache_5; }
inline void set_global_cache_5(Hashtable_t1853889766 * value)
{
___global_cache_5 = value;
Il2CppCodeGenWriteBarrier((&___global_cache_5), value);
}
inline static int32_t get_offset_of_global_cache_monitor_6() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084_StaticFields, ___global_cache_monitor_6)); }
inline RuntimeObject * get_global_cache_monitor_6() const { return ___global_cache_monitor_6; }
inline RuntimeObject ** get_address_of_global_cache_monitor_6() { return &___global_cache_monitor_6; }
inline void set_global_cache_monitor_6(RuntimeObject * value)
{
___global_cache_monitor_6 = value;
Il2CppCodeGenWriteBarrier((&___global_cache_monitor_6), value);
}
inline static int32_t get_offset_of_sbyte_comparer_7() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084_StaticFields, ___sbyte_comparer_7)); }
inline SByteComparer_t2329725001 * get_sbyte_comparer_7() const { return ___sbyte_comparer_7; }
inline SByteComparer_t2329725001 ** get_address_of_sbyte_comparer_7() { return &___sbyte_comparer_7; }
inline void set_sbyte_comparer_7(SByteComparer_t2329725001 * value)
{
___sbyte_comparer_7 = value;
Il2CppCodeGenWriteBarrier((&___sbyte_comparer_7), value);
}
inline static int32_t get_offset_of_short_comparer_8() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084_StaticFields, ___short_comparer_8)); }
inline ShortComparer_t2253094562 * get_short_comparer_8() const { return ___short_comparer_8; }
inline ShortComparer_t2253094562 ** get_address_of_short_comparer_8() { return &___short_comparer_8; }
inline void set_short_comparer_8(ShortComparer_t2253094562 * value)
{
___short_comparer_8 = value;
Il2CppCodeGenWriteBarrier((&___short_comparer_8), value);
}
inline static int32_t get_offset_of_int_comparer_9() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084_StaticFields, ___int_comparer_9)); }
inline IntComparer_t3812095803 * get_int_comparer_9() const { return ___int_comparer_9; }
inline IntComparer_t3812095803 ** get_address_of_int_comparer_9() { return &___int_comparer_9; }
inline void set_int_comparer_9(IntComparer_t3812095803 * value)
{
___int_comparer_9 = value;
Il2CppCodeGenWriteBarrier((&___int_comparer_9), value);
}
inline static int32_t get_offset_of_long_comparer_10() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084_StaticFields, ___long_comparer_10)); }
inline LongComparer_t1798269597 * get_long_comparer_10() const { return ___long_comparer_10; }
inline LongComparer_t1798269597 ** get_address_of_long_comparer_10() { return &___long_comparer_10; }
inline void set_long_comparer_10(LongComparer_t1798269597 * value)
{
___long_comparer_10 = value;
Il2CppCodeGenWriteBarrier((&___long_comparer_10), value);
}
};
struct MonoEnumInfo_t3694469084_ThreadStaticFields
{
public:
// System.Collections.Hashtable System.MonoEnumInfo::cache
Hashtable_t1853889766 * ___cache_4;
public:
inline static int32_t get_offset_of_cache_4() { return static_cast<int32_t>(offsetof(MonoEnumInfo_t3694469084_ThreadStaticFields, ___cache_4)); }
inline Hashtable_t1853889766 * get_cache_4() const { return ___cache_4; }
inline Hashtable_t1853889766 ** get_address_of_cache_4() { return &___cache_4; }
inline void set_cache_4(Hashtable_t1853889766 * value)
{
___cache_4 = value;
Il2CppCodeGenWriteBarrier((&___cache_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.MonoEnumInfo
struct MonoEnumInfo_t3694469084_marshaled_pinvoke
{
Type_t * ___utype_0;
RuntimeArray * ___values_1;
char** ___names_2;
Hashtable_t1853889766 * ___name_hash_3;
};
// Native definition for COM marshalling of System.MonoEnumInfo
struct MonoEnumInfo_t3694469084_marshaled_com
{
Type_t * ___utype_0;
RuntimeArray * ___values_1;
Il2CppChar** ___names_2;
Hashtable_t1853889766 * ___name_hash_3;
};
#endif // MONOENUMINFO_T3694469084_H
#ifndef SYSTEMEXCEPTION_T176217640_H
#define SYSTEMEXCEPTION_T176217640_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.SystemException
struct SystemException_t176217640 : public Exception_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SYSTEMEXCEPTION_T176217640_H
#ifndef UTF32ENCODING_T312252005_H
#define UTF32ENCODING_T312252005_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UTF32Encoding
struct UTF32Encoding_t312252005 : public Encoding_t1523322056
{
public:
// System.Boolean System.Text.UTF32Encoding::bigEndian
bool ___bigEndian_28;
// System.Boolean System.Text.UTF32Encoding::byteOrderMark
bool ___byteOrderMark_29;
public:
inline static int32_t get_offset_of_bigEndian_28() { return static_cast<int32_t>(offsetof(UTF32Encoding_t312252005, ___bigEndian_28)); }
inline bool get_bigEndian_28() const { return ___bigEndian_28; }
inline bool* get_address_of_bigEndian_28() { return &___bigEndian_28; }
inline void set_bigEndian_28(bool value)
{
___bigEndian_28 = value;
}
inline static int32_t get_offset_of_byteOrderMark_29() { return static_cast<int32_t>(offsetof(UTF32Encoding_t312252005, ___byteOrderMark_29)); }
inline bool get_byteOrderMark_29() const { return ___byteOrderMark_29; }
inline bool* get_address_of_byteOrderMark_29() { return &___byteOrderMark_29; }
inline void set_byteOrderMark_29(bool value)
{
___byteOrderMark_29 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UTF32ENCODING_T312252005_H
#ifndef UTF32DECODER_T635925672_H
#define UTF32DECODER_T635925672_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UTF32Encoding/UTF32Decoder
struct UTF32Decoder_t635925672 : public Decoder_t2204182725
{
public:
// System.Boolean System.Text.UTF32Encoding/UTF32Decoder::bigEndian
bool ___bigEndian_2;
// System.Int32 System.Text.UTF32Encoding/UTF32Decoder::leftOverByte
int32_t ___leftOverByte_3;
// System.Int32 System.Text.UTF32Encoding/UTF32Decoder::leftOverLength
int32_t ___leftOverLength_4;
public:
inline static int32_t get_offset_of_bigEndian_2() { return static_cast<int32_t>(offsetof(UTF32Decoder_t635925672, ___bigEndian_2)); }
inline bool get_bigEndian_2() const { return ___bigEndian_2; }
inline bool* get_address_of_bigEndian_2() { return &___bigEndian_2; }
inline void set_bigEndian_2(bool value)
{
___bigEndian_2 = value;
}
inline static int32_t get_offset_of_leftOverByte_3() { return static_cast<int32_t>(offsetof(UTF32Decoder_t635925672, ___leftOverByte_3)); }
inline int32_t get_leftOverByte_3() const { return ___leftOverByte_3; }
inline int32_t* get_address_of_leftOverByte_3() { return &___leftOverByte_3; }
inline void set_leftOverByte_3(int32_t value)
{
___leftOverByte_3 = value;
}
inline static int32_t get_offset_of_leftOverLength_4() { return static_cast<int32_t>(offsetof(UTF32Decoder_t635925672, ___leftOverLength_4)); }
inline int32_t get_leftOverLength_4() const { return ___leftOverLength_4; }
inline int32_t* get_address_of_leftOverLength_4() { return &___leftOverLength_4; }
inline void set_leftOverLength_4(int32_t value)
{
___leftOverLength_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UTF32DECODER_T635925672_H
#ifndef UTF7ENCODING_T2644108479_H
#define UTF7ENCODING_T2644108479_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UTF7Encoding
struct UTF7Encoding_t2644108479 : public Encoding_t1523322056
{
public:
// System.Boolean System.Text.UTF7Encoding::allowOptionals
bool ___allowOptionals_28;
public:
inline static int32_t get_offset_of_allowOptionals_28() { return static_cast<int32_t>(offsetof(UTF7Encoding_t2644108479, ___allowOptionals_28)); }
inline bool get_allowOptionals_28() const { return ___allowOptionals_28; }
inline bool* get_address_of_allowOptionals_28() { return &___allowOptionals_28; }
inline void set_allowOptionals_28(bool value)
{
___allowOptionals_28 = value;
}
};
struct UTF7Encoding_t2644108479_StaticFields
{
public:
// System.Byte[] System.Text.UTF7Encoding::encodingRules
ByteU5BU5D_t4116647657* ___encodingRules_29;
// System.SByte[] System.Text.UTF7Encoding::base64Values
SByteU5BU5D_t2651576203* ___base64Values_30;
public:
inline static int32_t get_offset_of_encodingRules_29() { return static_cast<int32_t>(offsetof(UTF7Encoding_t2644108479_StaticFields, ___encodingRules_29)); }
inline ByteU5BU5D_t4116647657* get_encodingRules_29() const { return ___encodingRules_29; }
inline ByteU5BU5D_t4116647657** get_address_of_encodingRules_29() { return &___encodingRules_29; }
inline void set_encodingRules_29(ByteU5BU5D_t4116647657* value)
{
___encodingRules_29 = value;
Il2CppCodeGenWriteBarrier((&___encodingRules_29), value);
}
inline static int32_t get_offset_of_base64Values_30() { return static_cast<int32_t>(offsetof(UTF7Encoding_t2644108479_StaticFields, ___base64Values_30)); }
inline SByteU5BU5D_t2651576203* get_base64Values_30() const { return ___base64Values_30; }
inline SByteU5BU5D_t2651576203** get_address_of_base64Values_30() { return &___base64Values_30; }
inline void set_base64Values_30(SByteU5BU5D_t2651576203* value)
{
___base64Values_30 = value;
Il2CppCodeGenWriteBarrier((&___base64Values_30), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UTF7ENCODING_T2644108479_H
#ifndef UTF7DECODER_T2247208115_H
#define UTF7DECODER_T2247208115_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UTF7Encoding/UTF7Decoder
struct UTF7Decoder_t2247208115 : public Decoder_t2204182725
{
public:
// System.Int32 System.Text.UTF7Encoding/UTF7Decoder::leftOver
int32_t ___leftOver_2;
public:
inline static int32_t get_offset_of_leftOver_2() { return static_cast<int32_t>(offsetof(UTF7Decoder_t2247208115, ___leftOver_2)); }
inline int32_t get_leftOver_2() const { return ___leftOver_2; }
inline int32_t* get_address_of_leftOver_2() { return &___leftOver_2; }
inline void set_leftOver_2(int32_t value)
{
___leftOver_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UTF7DECODER_T2247208115_H
#ifndef UTF8ENCODING_T3956466879_H
#define UTF8ENCODING_T3956466879_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UTF8Encoding
struct UTF8Encoding_t3956466879 : public Encoding_t1523322056
{
public:
// System.Boolean System.Text.UTF8Encoding::emitIdentifier
bool ___emitIdentifier_28;
public:
inline static int32_t get_offset_of_emitIdentifier_28() { return static_cast<int32_t>(offsetof(UTF8Encoding_t3956466879, ___emitIdentifier_28)); }
inline bool get_emitIdentifier_28() const { return ___emitIdentifier_28; }
inline bool* get_address_of_emitIdentifier_28() { return &___emitIdentifier_28; }
inline void set_emitIdentifier_28(bool value)
{
___emitIdentifier_28 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UTF8ENCODING_T3956466879_H
#ifndef UTF8DECODER_T2159214862_H
#define UTF8DECODER_T2159214862_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UTF8Encoding/UTF8Decoder
struct UTF8Decoder_t2159214862 : public Decoder_t2204182725
{
public:
// System.UInt32 System.Text.UTF8Encoding/UTF8Decoder::leftOverBits
uint32_t ___leftOverBits_2;
// System.UInt32 System.Text.UTF8Encoding/UTF8Decoder::leftOverCount
uint32_t ___leftOverCount_3;
public:
inline static int32_t get_offset_of_leftOverBits_2() { return static_cast<int32_t>(offsetof(UTF8Decoder_t2159214862, ___leftOverBits_2)); }
inline uint32_t get_leftOverBits_2() const { return ___leftOverBits_2; }
inline uint32_t* get_address_of_leftOverBits_2() { return &___leftOverBits_2; }
inline void set_leftOverBits_2(uint32_t value)
{
___leftOverBits_2 = value;
}
inline static int32_t get_offset_of_leftOverCount_3() { return static_cast<int32_t>(offsetof(UTF8Decoder_t2159214862, ___leftOverCount_3)); }
inline uint32_t get_leftOverCount_3() const { return ___leftOverCount_3; }
inline uint32_t* get_address_of_leftOverCount_3() { return &___leftOverCount_3; }
inline void set_leftOverCount_3(uint32_t value)
{
___leftOverCount_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UTF8DECODER_T2159214862_H
#ifndef UNICODEENCODING_T1959134050_H
#define UNICODEENCODING_T1959134050_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UnicodeEncoding
struct UnicodeEncoding_t1959134050 : public Encoding_t1523322056
{
public:
// System.Boolean System.Text.UnicodeEncoding::bigEndian
bool ___bigEndian_28;
// System.Boolean System.Text.UnicodeEncoding::byteOrderMark
bool ___byteOrderMark_29;
public:
inline static int32_t get_offset_of_bigEndian_28() { return static_cast<int32_t>(offsetof(UnicodeEncoding_t1959134050, ___bigEndian_28)); }
inline bool get_bigEndian_28() const { return ___bigEndian_28; }
inline bool* get_address_of_bigEndian_28() { return &___bigEndian_28; }
inline void set_bigEndian_28(bool value)
{
___bigEndian_28 = value;
}
inline static int32_t get_offset_of_byteOrderMark_29() { return static_cast<int32_t>(offsetof(UnicodeEncoding_t1959134050, ___byteOrderMark_29)); }
inline bool get_byteOrderMark_29() const { return ___byteOrderMark_29; }
inline bool* get_address_of_byteOrderMark_29() { return &___byteOrderMark_29; }
inline void set_byteOrderMark_29(bool value)
{
___byteOrderMark_29 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UNICODEENCODING_T1959134050_H
#ifndef UNICODEDECODER_T872550992_H
#define UNICODEDECODER_T872550992_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.UnicodeEncoding/UnicodeDecoder
struct UnicodeDecoder_t872550992 : public Decoder_t2204182725
{
public:
// System.Boolean System.Text.UnicodeEncoding/UnicodeDecoder::bigEndian
bool ___bigEndian_2;
// System.Int32 System.Text.UnicodeEncoding/UnicodeDecoder::leftOverByte
int32_t ___leftOverByte_3;
public:
inline static int32_t get_offset_of_bigEndian_2() { return static_cast<int32_t>(offsetof(UnicodeDecoder_t872550992, ___bigEndian_2)); }
inline bool get_bigEndian_2() const { return ___bigEndian_2; }
inline bool* get_address_of_bigEndian_2() { return &___bigEndian_2; }
inline void set_bigEndian_2(bool value)
{
___bigEndian_2 = value;
}
inline static int32_t get_offset_of_leftOverByte_3() { return static_cast<int32_t>(offsetof(UnicodeDecoder_t872550992, ___leftOverByte_3)); }
inline int32_t get_leftOverByte_3() const { return ___leftOverByte_3; }
inline int32_t* get_address_of_leftOverByte_3() { return &___leftOverByte_3; }
inline void set_leftOverByte_3(int32_t value)
{
___leftOverByte_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UNICODEDECODER_T872550992_H
#ifndef TIMER_T716671026_H
#define TIMER_T716671026_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.Timer
struct Timer_t716671026 : public MarshalByRefObject_t2760389100
{
public:
// System.Threading.TimerCallback System.Threading.Timer::callback
TimerCallback_t1438585625 * ___callback_2;
// System.Object System.Threading.Timer::state
RuntimeObject * ___state_3;
// System.Int64 System.Threading.Timer::due_time_ms
int64_t ___due_time_ms_4;
// System.Int64 System.Threading.Timer::period_ms
int64_t ___period_ms_5;
// System.Int64 System.Threading.Timer::next_run
int64_t ___next_run_6;
// System.Boolean System.Threading.Timer::disposed
bool ___disposed_7;
public:
inline static int32_t get_offset_of_callback_2() { return static_cast<int32_t>(offsetof(Timer_t716671026, ___callback_2)); }
inline TimerCallback_t1438585625 * get_callback_2() const { return ___callback_2; }
inline TimerCallback_t1438585625 ** get_address_of_callback_2() { return &___callback_2; }
inline void set_callback_2(TimerCallback_t1438585625 * value)
{
___callback_2 = value;
Il2CppCodeGenWriteBarrier((&___callback_2), value);
}
inline static int32_t get_offset_of_state_3() { return static_cast<int32_t>(offsetof(Timer_t716671026, ___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_due_time_ms_4() { return static_cast<int32_t>(offsetof(Timer_t716671026, ___due_time_ms_4)); }
inline int64_t get_due_time_ms_4() const { return ___due_time_ms_4; }
inline int64_t* get_address_of_due_time_ms_4() { return &___due_time_ms_4; }
inline void set_due_time_ms_4(int64_t value)
{
___due_time_ms_4 = value;
}
inline static int32_t get_offset_of_period_ms_5() { return static_cast<int32_t>(offsetof(Timer_t716671026, ___period_ms_5)); }
inline int64_t get_period_ms_5() const { return ___period_ms_5; }
inline int64_t* get_address_of_period_ms_5() { return &___period_ms_5; }
inline void set_period_ms_5(int64_t value)
{
___period_ms_5 = value;
}
inline static int32_t get_offset_of_next_run_6() { return static_cast<int32_t>(offsetof(Timer_t716671026, ___next_run_6)); }
inline int64_t get_next_run_6() const { return ___next_run_6; }
inline int64_t* get_address_of_next_run_6() { return &___next_run_6; }
inline void set_next_run_6(int64_t value)
{
___next_run_6 = value;
}
inline static int32_t get_offset_of_disposed_7() { return static_cast<int32_t>(offsetof(Timer_t716671026, ___disposed_7)); }
inline bool get_disposed_7() const { return ___disposed_7; }
inline bool* get_address_of_disposed_7() { return &___disposed_7; }
inline void set_disposed_7(bool value)
{
___disposed_7 = value;
}
};
struct Timer_t716671026_StaticFields
{
public:
// System.Threading.Timer/Scheduler System.Threading.Timer::scheduler
Scheduler_t3215764947 * ___scheduler_1;
public:
inline static int32_t get_offset_of_scheduler_1() { return static_cast<int32_t>(offsetof(Timer_t716671026_StaticFields, ___scheduler_1)); }
inline Scheduler_t3215764947 * get_scheduler_1() const { return ___scheduler_1; }
inline Scheduler_t3215764947 ** get_address_of_scheduler_1() { return &___scheduler_1; }
inline void set_scheduler_1(Scheduler_t3215764947 * value)
{
___scheduler_1 = value;
Il2CppCodeGenWriteBarrier((&___scheduler_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TIMER_T716671026_H
#ifndef TIMESPAN_T881159249_H
#define TIMESPAN_T881159249_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.TimeSpan
struct TimeSpan_t881159249
{
public:
// System.Int64 System.TimeSpan::_ticks
int64_t ____ticks_8;
public:
inline static int32_t get_offset_of__ticks_8() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249, ____ticks_8)); }
inline int64_t get__ticks_8() const { return ____ticks_8; }
inline int64_t* get_address_of__ticks_8() { return &____ticks_8; }
inline void set__ticks_8(int64_t value)
{
____ticks_8 = value;
}
};
struct TimeSpan_t881159249_StaticFields
{
public:
// System.TimeSpan System.TimeSpan::MaxValue
TimeSpan_t881159249 ___MaxValue_5;
// System.TimeSpan System.TimeSpan::MinValue
TimeSpan_t881159249 ___MinValue_6;
// System.TimeSpan System.TimeSpan::Zero
TimeSpan_t881159249 ___Zero_7;
public:
inline static int32_t get_offset_of_MaxValue_5() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249_StaticFields, ___MaxValue_5)); }
inline TimeSpan_t881159249 get_MaxValue_5() const { return ___MaxValue_5; }
inline TimeSpan_t881159249 * get_address_of_MaxValue_5() { return &___MaxValue_5; }
inline void set_MaxValue_5(TimeSpan_t881159249 value)
{
___MaxValue_5 = value;
}
inline static int32_t get_offset_of_MinValue_6() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249_StaticFields, ___MinValue_6)); }
inline TimeSpan_t881159249 get_MinValue_6() const { return ___MinValue_6; }
inline TimeSpan_t881159249 * get_address_of_MinValue_6() { return &___MinValue_6; }
inline void set_MinValue_6(TimeSpan_t881159249 value)
{
___MinValue_6 = value;
}
inline static int32_t get_offset_of_Zero_7() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249_StaticFields, ___Zero_7)); }
inline TimeSpan_t881159249 get_Zero_7() const { return ___Zero_7; }
inline TimeSpan_t881159249 * get_address_of_Zero_7() { return &___Zero_7; }
inline void set_Zero_7(TimeSpan_t881159249 value)
{
___Zero_7 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TIMESPAN_T881159249_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 ACCESSVIOLATIONEXCEPTION_T339633883_H
#define ACCESSVIOLATIONEXCEPTION_T339633883_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.AccessViolationException
struct AccessViolationException_t339633883 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ACCESSVIOLATIONEXCEPTION_T339633883_H
#ifndef ARGUMENTEXCEPTION_T132251570_H
#define ARGUMENTEXCEPTION_T132251570_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArgumentException
struct ArgumentException_t132251570 : public SystemException_t176217640
{
public:
// System.String System.ArgumentException::param_name
String_t* ___param_name_12;
public:
inline static int32_t get_offset_of_param_name_12() { return static_cast<int32_t>(offsetof(ArgumentException_t132251570, ___param_name_12)); }
inline String_t* get_param_name_12() const { return ___param_name_12; }
inline String_t** get_address_of_param_name_12() { return &___param_name_12; }
inline void set_param_name_12(String_t* value)
{
___param_name_12 = value;
Il2CppCodeGenWriteBarrier((&___param_name_12), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARGUMENTEXCEPTION_T132251570_H
#ifndef ARITHMETICEXCEPTION_T4283546778_H
#define ARITHMETICEXCEPTION_T4283546778_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArithmeticException
struct ArithmeticException_t4283546778 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARITHMETICEXCEPTION_T4283546778_H
#ifndef ARRAYTYPEMISMATCHEXCEPTION_T2342549375_H
#define ARRAYTYPEMISMATCHEXCEPTION_T2342549375_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArrayTypeMismatchException
struct ArrayTypeMismatchException_t2342549375 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARRAYTYPEMISMATCHEXCEPTION_T2342549375_H
#ifndef ATTRIBUTETARGETS_T1784037988_H
#define ATTRIBUTETARGETS_T1784037988_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.AttributeTargets
struct AttributeTargets_t1784037988
{
public:
// System.Int32 System.AttributeTargets::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(AttributeTargets_t1784037988, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ATTRIBUTETARGETS_T1784037988_H
#ifndef WHICH_T2943845661_H
#define WHICH_T2943845661_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTime/Which
struct Which_t2943845661
{
public:
// System.Int32 System.DateTime/Which::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(Which_t2943845661, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // WHICH_T2943845661_H
#ifndef DATETIMEKIND_T3468814247_H
#define DATETIMEKIND_T3468814247_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTimeKind
struct DateTimeKind_t3468814247
{
public:
// System.Int32 System.DateTimeKind::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(DateTimeKind_t3468814247, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIMEKIND_T3468814247_H
#ifndef DAYOFWEEK_T3650621421_H
#define DAYOFWEEK_T3650621421_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DayOfWeek
struct DayOfWeek_t3650621421
{
public:
// System.Int32 System.DayOfWeek::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(DayOfWeek_t3650621421, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DAYOFWEEK_T3650621421_H
#ifndef SPECIALFOLDER_T3871784040_H
#define SPECIALFOLDER_T3871784040_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_t3871784040
{
public:
// System.Int32 System.Environment/SpecialFolder::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SpecialFolder_t3871784040, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SPECIALFOLDER_T3871784040_H
#ifndef EXECUTIONENGINEEXCEPTION_T1142598034_H
#define EXECUTIONENGINEEXCEPTION_T1142598034_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ExecutionEngineException
struct ExecutionEngineException_t1142598034 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXECUTIONENGINEEXCEPTION_T1142598034_H
#ifndef FORMATEXCEPTION_T154580423_H
#define FORMATEXCEPTION_T154580423_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.FormatException
struct FormatException_t154580423 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FORMATEXCEPTION_T154580423_H
#ifndef INDEXOUTOFRANGEEXCEPTION_T1578797820_H
#define INDEXOUTOFRANGEEXCEPTION_T1578797820_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.IndexOutOfRangeException
struct IndexOutOfRangeException_t1578797820 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INDEXOUTOFRANGEEXCEPTION_T1578797820_H
#ifndef INVALIDCASTEXCEPTION_T3927145244_H
#define INVALIDCASTEXCEPTION_T3927145244_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.InvalidCastException
struct InvalidCastException_t3927145244 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INVALIDCASTEXCEPTION_T3927145244_H
#ifndef INVALIDOPERATIONEXCEPTION_T56020091_H
#define INVALIDOPERATIONEXCEPTION_T56020091_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.InvalidOperationException
struct InvalidOperationException_t56020091 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INVALIDOPERATIONEXCEPTION_T56020091_H
#ifndef INVALIDPROGRAMEXCEPTION_T3836716986_H
#define INVALIDPROGRAMEXCEPTION_T3836716986_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.InvalidProgramException
struct InvalidProgramException_t3836716986 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INVALIDPROGRAMEXCEPTION_T3836716986_H
#ifndef LOADEROPTIMIZATION_T1484956347_H
#define LOADEROPTIMIZATION_T1484956347_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.LoaderOptimization
struct LoaderOptimization_t1484956347
{
public:
// System.Int32 System.LoaderOptimization::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(LoaderOptimization_t1484956347, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // LOADEROPTIMIZATION_T1484956347_H
#ifndef MEMBERACCESSEXCEPTION_T1734467078_H
#define MEMBERACCESSEXCEPTION_T1734467078_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MemberAccessException
struct MemberAccessException_t1734467078 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MEMBERACCESSEXCEPTION_T1734467078_H
#ifndef MONOASYNCCALL_T3023670838_H
#define MONOASYNCCALL_T3023670838_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoAsyncCall
struct MonoAsyncCall_t3023670838 : 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;
// System.Int64 System.MonoAsyncCall::wait_event
int64_t ___wait_event_6;
public:
inline static int32_t get_offset_of_msg_0() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t3023670838, ___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_t3023670838, ___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_t3023670838, ___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_t3023670838, ___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_t3023670838, ___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_t3023670838, ___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);
}
inline static int32_t get_offset_of_wait_event_6() { return static_cast<int32_t>(offsetof(MonoAsyncCall_t3023670838, ___wait_event_6)); }
inline int64_t get_wait_event_6() const { return ___wait_event_6; }
inline int64_t* get_address_of_wait_event_6() { return &___wait_event_6; }
inline void set_wait_event_6(int64_t value)
{
___wait_event_6 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MONOASYNCCALL_T3023670838_H
#ifndef PRINCIPALPOLICY_T1761212333_H
#define PRINCIPALPOLICY_T1761212333_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Principal.PrincipalPolicy
struct PrincipalPolicy_t1761212333
{
public:
// System.Int32 System.Security.Principal.PrincipalPolicy::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(PrincipalPolicy_t1761212333, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PRINCIPALPOLICY_T1761212333_H
#ifndef EVENTRESETMODE_T3817241503_H
#define EVENTRESETMODE_T3817241503_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.EventResetMode
struct EventResetMode_t3817241503
{
public:
// System.Int32 System.Threading.EventResetMode::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(EventResetMode_t3817241503, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EVENTRESETMODE_T3817241503_H
#ifndef REGISTEREDWAITHANDLE_T1529538454_H
#define REGISTEREDWAITHANDLE_T1529538454_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.RegisteredWaitHandle
struct RegisteredWaitHandle_t1529538454 : public MarshalByRefObject_t2760389100
{
public:
// System.Threading.WaitHandle System.Threading.RegisteredWaitHandle::_waitObject
WaitHandle_t1743403487 * ____waitObject_1;
// System.Threading.WaitOrTimerCallback System.Threading.RegisteredWaitHandle::_callback
WaitOrTimerCallback_t1973723282 * ____callback_2;
// System.TimeSpan System.Threading.RegisteredWaitHandle::_timeout
TimeSpan_t881159249 ____timeout_3;
// System.Object System.Threading.RegisteredWaitHandle::_state
RuntimeObject * ____state_4;
// System.Boolean System.Threading.RegisteredWaitHandle::_executeOnlyOnce
bool ____executeOnlyOnce_5;
// System.Threading.WaitHandle System.Threading.RegisteredWaitHandle::_finalEvent
WaitHandle_t1743403487 * ____finalEvent_6;
// System.Threading.ManualResetEvent System.Threading.RegisteredWaitHandle::_cancelEvent
ManualResetEvent_t451242010 * ____cancelEvent_7;
// System.Int32 System.Threading.RegisteredWaitHandle::_callsInProcess
int32_t ____callsInProcess_8;
// System.Boolean System.Threading.RegisteredWaitHandle::_unregistered
bool ____unregistered_9;
public:
inline static int32_t get_offset_of__waitObject_1() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____waitObject_1)); }
inline WaitHandle_t1743403487 * get__waitObject_1() const { return ____waitObject_1; }
inline WaitHandle_t1743403487 ** get_address_of__waitObject_1() { return &____waitObject_1; }
inline void set__waitObject_1(WaitHandle_t1743403487 * value)
{
____waitObject_1 = value;
Il2CppCodeGenWriteBarrier((&____waitObject_1), value);
}
inline static int32_t get_offset_of__callback_2() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____callback_2)); }
inline WaitOrTimerCallback_t1973723282 * get__callback_2() const { return ____callback_2; }
inline WaitOrTimerCallback_t1973723282 ** get_address_of__callback_2() { return &____callback_2; }
inline void set__callback_2(WaitOrTimerCallback_t1973723282 * value)
{
____callback_2 = value;
Il2CppCodeGenWriteBarrier((&____callback_2), value);
}
inline static int32_t get_offset_of__timeout_3() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____timeout_3)); }
inline TimeSpan_t881159249 get__timeout_3() const { return ____timeout_3; }
inline TimeSpan_t881159249 * get_address_of__timeout_3() { return &____timeout_3; }
inline void set__timeout_3(TimeSpan_t881159249 value)
{
____timeout_3 = value;
}
inline static int32_t get_offset_of__state_4() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____state_4)); }
inline RuntimeObject * get__state_4() const { return ____state_4; }
inline RuntimeObject ** get_address_of__state_4() { return &____state_4; }
inline void set__state_4(RuntimeObject * value)
{
____state_4 = value;
Il2CppCodeGenWriteBarrier((&____state_4), value);
}
inline static int32_t get_offset_of__executeOnlyOnce_5() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____executeOnlyOnce_5)); }
inline bool get__executeOnlyOnce_5() const { return ____executeOnlyOnce_5; }
inline bool* get_address_of__executeOnlyOnce_5() { return &____executeOnlyOnce_5; }
inline void set__executeOnlyOnce_5(bool value)
{
____executeOnlyOnce_5 = value;
}
inline static int32_t get_offset_of__finalEvent_6() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____finalEvent_6)); }
inline WaitHandle_t1743403487 * get__finalEvent_6() const { return ____finalEvent_6; }
inline WaitHandle_t1743403487 ** get_address_of__finalEvent_6() { return &____finalEvent_6; }
inline void set__finalEvent_6(WaitHandle_t1743403487 * value)
{
____finalEvent_6 = value;
Il2CppCodeGenWriteBarrier((&____finalEvent_6), value);
}
inline static int32_t get_offset_of__cancelEvent_7() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____cancelEvent_7)); }
inline ManualResetEvent_t451242010 * get__cancelEvent_7() const { return ____cancelEvent_7; }
inline ManualResetEvent_t451242010 ** get_address_of__cancelEvent_7() { return &____cancelEvent_7; }
inline void set__cancelEvent_7(ManualResetEvent_t451242010 * value)
{
____cancelEvent_7 = value;
Il2CppCodeGenWriteBarrier((&____cancelEvent_7), value);
}
inline static int32_t get_offset_of__callsInProcess_8() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____callsInProcess_8)); }
inline int32_t get__callsInProcess_8() const { return ____callsInProcess_8; }
inline int32_t* get_address_of__callsInProcess_8() { return &____callsInProcess_8; }
inline void set__callsInProcess_8(int32_t value)
{
____callsInProcess_8 = value;
}
inline static int32_t get_offset_of__unregistered_9() { return static_cast<int32_t>(offsetof(RegisteredWaitHandle_t1529538454, ____unregistered_9)); }
inline bool get__unregistered_9() const { return ____unregistered_9; }
inline bool* get_address_of__unregistered_9() { return &____unregistered_9; }
inline void set__unregistered_9(bool value)
{
____unregistered_9 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // REGISTEREDWAITHANDLE_T1529538454_H
#ifndef SYNCHRONIZATIONLOCKEXCEPTION_T841761767_H
#define SYNCHRONIZATIONLOCKEXCEPTION_T841761767_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.SynchronizationLockException
struct SynchronizationLockException_t841761767 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SYNCHRONIZATIONLOCKEXCEPTION_T841761767_H
#ifndef THREADABORTEXCEPTION_T4074510458_H
#define THREADABORTEXCEPTION_T4074510458_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ThreadAbortException
struct ThreadAbortException_t4074510458 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // THREADABORTEXCEPTION_T4074510458_H
#ifndef THREADINTERRUPTEDEXCEPTION_T3240955163_H
#define THREADINTERRUPTEDEXCEPTION_T3240955163_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ThreadInterruptedException
struct ThreadInterruptedException_t3240955163 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // THREADINTERRUPTEDEXCEPTION_T3240955163_H
#ifndef THREADSTATE_T2533302383_H
#define THREADSTATE_T2533302383_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ThreadState
struct ThreadState_t2533302383
{
public:
// System.Int32 System.Threading.ThreadState::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ThreadState_t2533302383, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // THREADSTATE_T2533302383_H
#ifndef THREADSTATEEXCEPTION_T3003788475_H
#define THREADSTATEEXCEPTION_T3003788475_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ThreadStateException
struct ThreadStateException_t3003788475 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // THREADSTATEEXCEPTION_T3003788475_H
#ifndef WAITHANDLE_T1743403487_H
#define WAITHANDLE_T1743403487_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.WaitHandle
struct WaitHandle_t1743403487 : public MarshalByRefObject_t2760389100
{
public:
// Microsoft.Win32.SafeHandles.SafeWaitHandle System.Threading.WaitHandle::safe_wait_handle
SafeWaitHandle_t1972936122 * ___safe_wait_handle_2;
// System.Boolean System.Threading.WaitHandle::disposed
bool ___disposed_4;
public:
inline static int32_t get_offset_of_safe_wait_handle_2() { return static_cast<int32_t>(offsetof(WaitHandle_t1743403487, ___safe_wait_handle_2)); }
inline SafeWaitHandle_t1972936122 * get_safe_wait_handle_2() const { return ___safe_wait_handle_2; }
inline SafeWaitHandle_t1972936122 ** get_address_of_safe_wait_handle_2() { return &___safe_wait_handle_2; }
inline void set_safe_wait_handle_2(SafeWaitHandle_t1972936122 * value)
{
___safe_wait_handle_2 = value;
Il2CppCodeGenWriteBarrier((&___safe_wait_handle_2), value);
}
inline static int32_t get_offset_of_disposed_4() { return static_cast<int32_t>(offsetof(WaitHandle_t1743403487, ___disposed_4)); }
inline bool get_disposed_4() const { return ___disposed_4; }
inline bool* get_address_of_disposed_4() { return &___disposed_4; }
inline void set_disposed_4(bool value)
{
___disposed_4 = value;
}
};
struct WaitHandle_t1743403487_StaticFields
{
public:
// System.IntPtr System.Threading.WaitHandle::InvalidHandle
intptr_t ___InvalidHandle_3;
public:
inline static int32_t get_offset_of_InvalidHandle_3() { return static_cast<int32_t>(offsetof(WaitHandle_t1743403487_StaticFields, ___InvalidHandle_3)); }
inline intptr_t get_InvalidHandle_3() const { return ___InvalidHandle_3; }
inline intptr_t* get_address_of_InvalidHandle_3() { return &___InvalidHandle_3; }
inline void set_InvalidHandle_3(intptr_t value)
{
___InvalidHandle_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // WAITHANDLE_T1743403487_H
#ifndef TYPELOADEXCEPTION_T3707937253_H
#define TYPELOADEXCEPTION_T3707937253_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.TypeLoadException
struct TypeLoadException_t3707937253 : public SystemException_t176217640
{
public:
// System.String System.TypeLoadException::className
String_t* ___className_12;
// System.String System.TypeLoadException::assemblyName
String_t* ___assemblyName_13;
public:
inline static int32_t get_offset_of_className_12() { return static_cast<int32_t>(offsetof(TypeLoadException_t3707937253, ___className_12)); }
inline String_t* get_className_12() const { return ___className_12; }
inline String_t** get_address_of_className_12() { return &___className_12; }
inline void set_className_12(String_t* value)
{
___className_12 = value;
Il2CppCodeGenWriteBarrier((&___className_12), value);
}
inline static int32_t get_offset_of_assemblyName_13() { return static_cast<int32_t>(offsetof(TypeLoadException_t3707937253, ___assemblyName_13)); }
inline String_t* get_assemblyName_13() const { return ___assemblyName_13; }
inline String_t** get_address_of_assemblyName_13() { return &___assemblyName_13; }
inline void set_assemblyName_13(String_t* value)
{
___assemblyName_13 = value;
Il2CppCodeGenWriteBarrier((&___assemblyName_13), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TYPELOADEXCEPTION_T3707937253_H
#ifndef APPDOMAIN_T1571427825_H
#define APPDOMAIN_T1571427825_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.AppDomain
struct AppDomain_t1571427825 : public MarshalByRefObject_t2760389100
{
public:
// System.IntPtr System.AppDomain::_mono_app_domain
intptr_t ____mono_app_domain_1;
// System.Security.Policy.Evidence System.AppDomain::_evidence
Evidence_t2008144148 * ____evidence_6;
// System.Security.PermissionSet System.AppDomain::_granted
PermissionSet_t223948603 * ____granted_7;
// System.Security.Principal.PrincipalPolicy System.AppDomain::_principalPolicy
int32_t ____principalPolicy_8;
// System.AppDomainManager System.AppDomain::_domain_manager
AppDomainManager_t1420869192 * ____domain_manager_11;
// System.ActivationContext System.AppDomain::_activation
ActivationContext_t976916018 * ____activation_12;
// System.ApplicationIdentity System.AppDomain::_applicationIdentity
ApplicationIdentity_t1917735356 * ____applicationIdentity_13;
// System.AssemblyLoadEventHandler System.AppDomain::AssemblyLoad
AssemblyLoadEventHandler_t107971893 * ___AssemblyLoad_14;
// System.ResolveEventHandler System.AppDomain::AssemblyResolve
ResolveEventHandler_t2775508208 * ___AssemblyResolve_15;
// System.EventHandler System.AppDomain::DomainUnload
EventHandler_t1348719766 * ___DomainUnload_16;
// System.EventHandler System.AppDomain::ProcessExit
EventHandler_t1348719766 * ___ProcessExit_17;
// System.ResolveEventHandler System.AppDomain::ResourceResolve
ResolveEventHandler_t2775508208 * ___ResourceResolve_18;
// System.ResolveEventHandler System.AppDomain::TypeResolve
ResolveEventHandler_t2775508208 * ___TypeResolve_19;
// System.UnhandledExceptionEventHandler System.AppDomain::UnhandledException
UnhandledExceptionEventHandler_t3101989324 * ___UnhandledException_20;
// System.ResolveEventHandler System.AppDomain::ReflectionOnlyAssemblyResolve
ResolveEventHandler_t2775508208 * ___ReflectionOnlyAssemblyResolve_21;
public:
inline static int32_t get_offset_of__mono_app_domain_1() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ____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_t1571427825, ____evidence_6)); }
inline Evidence_t2008144148 * get__evidence_6() const { return ____evidence_6; }
inline Evidence_t2008144148 ** get_address_of__evidence_6() { return &____evidence_6; }
inline void set__evidence_6(Evidence_t2008144148 * value)
{
____evidence_6 = value;
Il2CppCodeGenWriteBarrier((&____evidence_6), value);
}
inline static int32_t get_offset_of__granted_7() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ____granted_7)); }
inline PermissionSet_t223948603 * get__granted_7() const { return ____granted_7; }
inline PermissionSet_t223948603 ** get_address_of__granted_7() { return &____granted_7; }
inline void set__granted_7(PermissionSet_t223948603 * value)
{
____granted_7 = value;
Il2CppCodeGenWriteBarrier((&____granted_7), value);
}
inline static int32_t get_offset_of__principalPolicy_8() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ____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__domain_manager_11() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ____domain_manager_11)); }
inline AppDomainManager_t1420869192 * get__domain_manager_11() const { return ____domain_manager_11; }
inline AppDomainManager_t1420869192 ** get_address_of__domain_manager_11() { return &____domain_manager_11; }
inline void set__domain_manager_11(AppDomainManager_t1420869192 * value)
{
____domain_manager_11 = value;
Il2CppCodeGenWriteBarrier((&____domain_manager_11), value);
}
inline static int32_t get_offset_of__activation_12() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ____activation_12)); }
inline ActivationContext_t976916018 * get__activation_12() const { return ____activation_12; }
inline ActivationContext_t976916018 ** get_address_of__activation_12() { return &____activation_12; }
inline void set__activation_12(ActivationContext_t976916018 * value)
{
____activation_12 = value;
Il2CppCodeGenWriteBarrier((&____activation_12), value);
}
inline static int32_t get_offset_of__applicationIdentity_13() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ____applicationIdentity_13)); }
inline ApplicationIdentity_t1917735356 * get__applicationIdentity_13() const { return ____applicationIdentity_13; }
inline ApplicationIdentity_t1917735356 ** get_address_of__applicationIdentity_13() { return &____applicationIdentity_13; }
inline void set__applicationIdentity_13(ApplicationIdentity_t1917735356 * value)
{
____applicationIdentity_13 = value;
Il2CppCodeGenWriteBarrier((&____applicationIdentity_13), value);
}
inline static int32_t get_offset_of_AssemblyLoad_14() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___AssemblyLoad_14)); }
inline AssemblyLoadEventHandler_t107971893 * get_AssemblyLoad_14() const { return ___AssemblyLoad_14; }
inline AssemblyLoadEventHandler_t107971893 ** get_address_of_AssemblyLoad_14() { return &___AssemblyLoad_14; }
inline void set_AssemblyLoad_14(AssemblyLoadEventHandler_t107971893 * value)
{
___AssemblyLoad_14 = value;
Il2CppCodeGenWriteBarrier((&___AssemblyLoad_14), value);
}
inline static int32_t get_offset_of_AssemblyResolve_15() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___AssemblyResolve_15)); }
inline ResolveEventHandler_t2775508208 * get_AssemblyResolve_15() const { return ___AssemblyResolve_15; }
inline ResolveEventHandler_t2775508208 ** get_address_of_AssemblyResolve_15() { return &___AssemblyResolve_15; }
inline void set_AssemblyResolve_15(ResolveEventHandler_t2775508208 * value)
{
___AssemblyResolve_15 = value;
Il2CppCodeGenWriteBarrier((&___AssemblyResolve_15), value);
}
inline static int32_t get_offset_of_DomainUnload_16() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___DomainUnload_16)); }
inline EventHandler_t1348719766 * get_DomainUnload_16() const { return ___DomainUnload_16; }
inline EventHandler_t1348719766 ** get_address_of_DomainUnload_16() { return &___DomainUnload_16; }
inline void set_DomainUnload_16(EventHandler_t1348719766 * value)
{
___DomainUnload_16 = value;
Il2CppCodeGenWriteBarrier((&___DomainUnload_16), value);
}
inline static int32_t get_offset_of_ProcessExit_17() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___ProcessExit_17)); }
inline EventHandler_t1348719766 * get_ProcessExit_17() const { return ___ProcessExit_17; }
inline EventHandler_t1348719766 ** get_address_of_ProcessExit_17() { return &___ProcessExit_17; }
inline void set_ProcessExit_17(EventHandler_t1348719766 * value)
{
___ProcessExit_17 = value;
Il2CppCodeGenWriteBarrier((&___ProcessExit_17), value);
}
inline static int32_t get_offset_of_ResourceResolve_18() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___ResourceResolve_18)); }
inline ResolveEventHandler_t2775508208 * get_ResourceResolve_18() const { return ___ResourceResolve_18; }
inline ResolveEventHandler_t2775508208 ** get_address_of_ResourceResolve_18() { return &___ResourceResolve_18; }
inline void set_ResourceResolve_18(ResolveEventHandler_t2775508208 * value)
{
___ResourceResolve_18 = value;
Il2CppCodeGenWriteBarrier((&___ResourceResolve_18), value);
}
inline static int32_t get_offset_of_TypeResolve_19() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___TypeResolve_19)); }
inline ResolveEventHandler_t2775508208 * get_TypeResolve_19() const { return ___TypeResolve_19; }
inline ResolveEventHandler_t2775508208 ** get_address_of_TypeResolve_19() { return &___TypeResolve_19; }
inline void set_TypeResolve_19(ResolveEventHandler_t2775508208 * value)
{
___TypeResolve_19 = value;
Il2CppCodeGenWriteBarrier((&___TypeResolve_19), value);
}
inline static int32_t get_offset_of_UnhandledException_20() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___UnhandledException_20)); }
inline UnhandledExceptionEventHandler_t3101989324 * get_UnhandledException_20() const { return ___UnhandledException_20; }
inline UnhandledExceptionEventHandler_t3101989324 ** get_address_of_UnhandledException_20() { return &___UnhandledException_20; }
inline void set_UnhandledException_20(UnhandledExceptionEventHandler_t3101989324 * value)
{
___UnhandledException_20 = value;
Il2CppCodeGenWriteBarrier((&___UnhandledException_20), value);
}
inline static int32_t get_offset_of_ReflectionOnlyAssemblyResolve_21() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825, ___ReflectionOnlyAssemblyResolve_21)); }
inline ResolveEventHandler_t2775508208 * get_ReflectionOnlyAssemblyResolve_21() const { return ___ReflectionOnlyAssemblyResolve_21; }
inline ResolveEventHandler_t2775508208 ** get_address_of_ReflectionOnlyAssemblyResolve_21() { return &___ReflectionOnlyAssemblyResolve_21; }
inline void set_ReflectionOnlyAssemblyResolve_21(ResolveEventHandler_t2775508208 * value)
{
___ReflectionOnlyAssemblyResolve_21 = value;
Il2CppCodeGenWriteBarrier((&___ReflectionOnlyAssemblyResolve_21), value);
}
};
struct AppDomain_t1571427825_StaticFields
{
public:
// System.String System.AppDomain::_process_guid
String_t* ____process_guid_2;
// System.AppDomain System.AppDomain::default_domain
AppDomain_t1571427825 * ___default_domain_10;
public:
inline static int32_t get_offset_of__process_guid_2() { return static_cast<int32_t>(offsetof(AppDomain_t1571427825_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_t1571427825_StaticFields, ___default_domain_10)); }
inline AppDomain_t1571427825 * get_default_domain_10() const { return ___default_domain_10; }
inline AppDomain_t1571427825 ** get_address_of_default_domain_10() { return &___default_domain_10; }
inline void set_default_domain_10(AppDomain_t1571427825 * value)
{
___default_domain_10 = value;
Il2CppCodeGenWriteBarrier((&___default_domain_10), value);
}
};
struct AppDomain_t1571427825_ThreadStaticFields
{
public:
// System.Collections.Hashtable System.AppDomain::type_resolve_in_progress
Hashtable_t1853889766 * ___type_resolve_in_progress_3;
// System.Collections.Hashtable System.AppDomain::assembly_resolve_in_progress
Hashtable_t1853889766 * ___assembly_resolve_in_progress_4;
// System.Collections.Hashtable System.AppDomain::assembly_resolve_in_progress_refonly
Hashtable_t1853889766 * ___assembly_resolve_in_progress_refonly_5;
// System.Security.Principal.IPrincipal 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_t1571427825_ThreadStaticFields, ___type_resolve_in_progress_3)); }
inline Hashtable_t1853889766 * get_type_resolve_in_progress_3() const { return ___type_resolve_in_progress_3; }
inline Hashtable_t1853889766 ** get_address_of_type_resolve_in_progress_3() { return &___type_resolve_in_progress_3; }
inline void set_type_resolve_in_progress_3(Hashtable_t1853889766 * 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_t1571427825_ThreadStaticFields, ___assembly_resolve_in_progress_4)); }
inline Hashtable_t1853889766 * get_assembly_resolve_in_progress_4() const { return ___assembly_resolve_in_progress_4; }
inline Hashtable_t1853889766 ** get_address_of_assembly_resolve_in_progress_4() { return &___assembly_resolve_in_progress_4; }
inline void set_assembly_resolve_in_progress_4(Hashtable_t1853889766 * 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_t1571427825_ThreadStaticFields, ___assembly_resolve_in_progress_refonly_5)); }
inline Hashtable_t1853889766 * get_assembly_resolve_in_progress_refonly_5() const { return ___assembly_resolve_in_progress_refonly_5; }
inline Hashtable_t1853889766 ** 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(Hashtable_t1853889766 * 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_t1571427825_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
#endif // APPDOMAIN_T1571427825_H
#ifndef APPDOMAINSETUP_T123196401_H
#define APPDOMAINSETUP_T123196401_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.AppDomainSetup
struct AppDomainSetup_t123196401 : 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.LoaderOptimization 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.Runtime.Hosting.ActivationArguments System.AppDomainSetup::_activationArguments
ActivationArguments_t4219999170 * ____activationArguments_15;
// System.AppDomainInitializer System.AppDomainSetup::domain_initializer
AppDomainInitializer_t682969308 * ___domain_initializer_16;
// System.Security.Policy.ApplicationTrust System.AppDomainSetup::application_trust
ApplicationTrust_t3270368423 * ___application_trust_17;
// System.String[] System.AppDomainSetup::domain_initializer_args
StringU5BU5D_t1281789340* ___domain_initializer_args_18;
// System.Security.SecurityElement System.AppDomainSetup::application_trust_xml
SecurityElement_t1046076091 * ___application_trust_xml_19;
// System.Boolean System.AppDomainSetup::disallow_appbase_probe
bool ___disallow_appbase_probe_20;
// System.Byte[] System.AppDomainSetup::configuration_bytes
ByteU5BU5D_t4116647657* ___configuration_bytes_21;
public:
inline static int32_t get_offset_of_application_base_0() { return static_cast<int32_t>(offsetof(AppDomainSetup_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ___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_t123196401, ____activationArguments_15)); }
inline ActivationArguments_t4219999170 * get__activationArguments_15() const { return ____activationArguments_15; }
inline ActivationArguments_t4219999170 ** get_address_of__activationArguments_15() { return &____activationArguments_15; }
inline void set__activationArguments_15(ActivationArguments_t4219999170 * 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_t123196401, ___domain_initializer_16)); }
inline AppDomainInitializer_t682969308 * get_domain_initializer_16() const { return ___domain_initializer_16; }
inline AppDomainInitializer_t682969308 ** get_address_of_domain_initializer_16() { return &___domain_initializer_16; }
inline void set_domain_initializer_16(AppDomainInitializer_t682969308 * 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_t123196401, ___application_trust_17)); }
inline ApplicationTrust_t3270368423 * get_application_trust_17() const { return ___application_trust_17; }
inline ApplicationTrust_t3270368423 ** get_address_of_application_trust_17() { return &___application_trust_17; }
inline void set_application_trust_17(ApplicationTrust_t3270368423 * 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_t123196401, ___domain_initializer_args_18)); }
inline StringU5BU5D_t1281789340* get_domain_initializer_args_18() const { return ___domain_initializer_args_18; }
inline StringU5BU5D_t1281789340** get_address_of_domain_initializer_args_18() { return &___domain_initializer_args_18; }
inline void set_domain_initializer_args_18(StringU5BU5D_t1281789340* value)
{
___domain_initializer_args_18 = value;
Il2CppCodeGenWriteBarrier((&___domain_initializer_args_18), value);
}
inline static int32_t get_offset_of_application_trust_xml_19() { return static_cast<int32_t>(offsetof(AppDomainSetup_t123196401, ___application_trust_xml_19)); }
inline SecurityElement_t1046076091 * get_application_trust_xml_19() const { return ___application_trust_xml_19; }
inline SecurityElement_t1046076091 ** get_address_of_application_trust_xml_19() { return &___application_trust_xml_19; }
inline void set_application_trust_xml_19(SecurityElement_t1046076091 * value)
{
___application_trust_xml_19 = value;
Il2CppCodeGenWriteBarrier((&___application_trust_xml_19), value);
}
inline static int32_t get_offset_of_disallow_appbase_probe_20() { return static_cast<int32_t>(offsetof(AppDomainSetup_t123196401, ___disallow_appbase_probe_20)); }
inline bool get_disallow_appbase_probe_20() const { return ___disallow_appbase_probe_20; }
inline bool* get_address_of_disallow_appbase_probe_20() { return &___disallow_appbase_probe_20; }
inline void set_disallow_appbase_probe_20(bool value)
{
___disallow_appbase_probe_20 = value;
}
inline static int32_t get_offset_of_configuration_bytes_21() { return static_cast<int32_t>(offsetof(AppDomainSetup_t123196401, ___configuration_bytes_21)); }
inline ByteU5BU5D_t4116647657* get_configuration_bytes_21() const { return ___configuration_bytes_21; }
inline ByteU5BU5D_t4116647657** get_address_of_configuration_bytes_21() { return &___configuration_bytes_21; }
inline void set_configuration_bytes_21(ByteU5BU5D_t4116647657* value)
{
___configuration_bytes_21 = value;
Il2CppCodeGenWriteBarrier((&___configuration_bytes_21), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // APPDOMAINSETUP_T123196401_H
#ifndef ARGUMENTNULLEXCEPTION_T1615371798_H
#define ARGUMENTNULLEXCEPTION_T1615371798_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArgumentNullException
struct ArgumentNullException_t1615371798 : public ArgumentException_t132251570
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARGUMENTNULLEXCEPTION_T1615371798_H
#ifndef ARGUMENTOUTOFRANGEEXCEPTION_T777629997_H
#define ARGUMENTOUTOFRANGEEXCEPTION_T777629997_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArgumentOutOfRangeException
struct ArgumentOutOfRangeException_t777629997 : public ArgumentException_t132251570
{
public:
// System.Object System.ArgumentOutOfRangeException::actual_value
RuntimeObject * ___actual_value_13;
public:
inline static int32_t get_offset_of_actual_value_13() { return static_cast<int32_t>(offsetof(ArgumentOutOfRangeException_t777629997, ___actual_value_13)); }
inline RuntimeObject * get_actual_value_13() const { return ___actual_value_13; }
inline RuntimeObject ** get_address_of_actual_value_13() { return &___actual_value_13; }
inline void set_actual_value_13(RuntimeObject * value)
{
___actual_value_13 = value;
Il2CppCodeGenWriteBarrier((&___actual_value_13), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARGUMENTOUTOFRANGEEXCEPTION_T777629997_H
#ifndef DATETIME_T3738529785_H
#define DATETIME_T3738529785_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTime
struct DateTime_t3738529785
{
public:
// System.TimeSpan System.DateTime::ticks
TimeSpan_t881159249 ___ticks_10;
// System.DateTimeKind System.DateTime::kind
int32_t ___kind_11;
public:
inline static int32_t get_offset_of_ticks_10() { return static_cast<int32_t>(offsetof(DateTime_t3738529785, ___ticks_10)); }
inline TimeSpan_t881159249 get_ticks_10() const { return ___ticks_10; }
inline TimeSpan_t881159249 * get_address_of_ticks_10() { return &___ticks_10; }
inline void set_ticks_10(TimeSpan_t881159249 value)
{
___ticks_10 = value;
}
inline static int32_t get_offset_of_kind_11() { return static_cast<int32_t>(offsetof(DateTime_t3738529785, ___kind_11)); }
inline int32_t get_kind_11() const { return ___kind_11; }
inline int32_t* get_address_of_kind_11() { return &___kind_11; }
inline void set_kind_11(int32_t value)
{
___kind_11 = value;
}
};
struct DateTime_t3738529785_StaticFields
{
public:
// System.DateTime System.DateTime::MaxValue
DateTime_t3738529785 ___MaxValue_12;
// System.DateTime System.DateTime::MinValue
DateTime_t3738529785 ___MinValue_13;
// System.String[] System.DateTime::ParseTimeFormats
StringU5BU5D_t1281789340* ___ParseTimeFormats_14;
// System.String[] System.DateTime::ParseYearDayMonthFormats
StringU5BU5D_t1281789340* ___ParseYearDayMonthFormats_15;
// System.String[] System.DateTime::ParseYearMonthDayFormats
StringU5BU5D_t1281789340* ___ParseYearMonthDayFormats_16;
// System.String[] System.DateTime::ParseDayMonthYearFormats
StringU5BU5D_t1281789340* ___ParseDayMonthYearFormats_17;
// System.String[] System.DateTime::ParseMonthDayYearFormats
StringU5BU5D_t1281789340* ___ParseMonthDayYearFormats_18;
// System.String[] System.DateTime::MonthDayShortFormats
StringU5BU5D_t1281789340* ___MonthDayShortFormats_19;
// System.String[] System.DateTime::DayMonthShortFormats
StringU5BU5D_t1281789340* ___DayMonthShortFormats_20;
// System.Int32[] System.DateTime::daysmonth
Int32U5BU5D_t385246372* ___daysmonth_21;
// System.Int32[] System.DateTime::daysmonthleap
Int32U5BU5D_t385246372* ___daysmonthleap_22;
// System.Object System.DateTime::to_local_time_span_object
RuntimeObject * ___to_local_time_span_object_23;
// System.Int64 System.DateTime::last_now
int64_t ___last_now_24;
public:
inline static int32_t get_offset_of_MaxValue_12() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___MaxValue_12)); }
inline DateTime_t3738529785 get_MaxValue_12() const { return ___MaxValue_12; }
inline DateTime_t3738529785 * get_address_of_MaxValue_12() { return &___MaxValue_12; }
inline void set_MaxValue_12(DateTime_t3738529785 value)
{
___MaxValue_12 = value;
}
inline static int32_t get_offset_of_MinValue_13() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___MinValue_13)); }
inline DateTime_t3738529785 get_MinValue_13() const { return ___MinValue_13; }
inline DateTime_t3738529785 * get_address_of_MinValue_13() { return &___MinValue_13; }
inline void set_MinValue_13(DateTime_t3738529785 value)
{
___MinValue_13 = value;
}
inline static int32_t get_offset_of_ParseTimeFormats_14() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseTimeFormats_14)); }
inline StringU5BU5D_t1281789340* get_ParseTimeFormats_14() const { return ___ParseTimeFormats_14; }
inline StringU5BU5D_t1281789340** get_address_of_ParseTimeFormats_14() { return &___ParseTimeFormats_14; }
inline void set_ParseTimeFormats_14(StringU5BU5D_t1281789340* value)
{
___ParseTimeFormats_14 = value;
Il2CppCodeGenWriteBarrier((&___ParseTimeFormats_14), value);
}
inline static int32_t get_offset_of_ParseYearDayMonthFormats_15() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseYearDayMonthFormats_15)); }
inline StringU5BU5D_t1281789340* get_ParseYearDayMonthFormats_15() const { return ___ParseYearDayMonthFormats_15; }
inline StringU5BU5D_t1281789340** get_address_of_ParseYearDayMonthFormats_15() { return &___ParseYearDayMonthFormats_15; }
inline void set_ParseYearDayMonthFormats_15(StringU5BU5D_t1281789340* value)
{
___ParseYearDayMonthFormats_15 = value;
Il2CppCodeGenWriteBarrier((&___ParseYearDayMonthFormats_15), value);
}
inline static int32_t get_offset_of_ParseYearMonthDayFormats_16() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseYearMonthDayFormats_16)); }
inline StringU5BU5D_t1281789340* get_ParseYearMonthDayFormats_16() const { return ___ParseYearMonthDayFormats_16; }
inline StringU5BU5D_t1281789340** get_address_of_ParseYearMonthDayFormats_16() { return &___ParseYearMonthDayFormats_16; }
inline void set_ParseYearMonthDayFormats_16(StringU5BU5D_t1281789340* value)
{
___ParseYearMonthDayFormats_16 = value;
Il2CppCodeGenWriteBarrier((&___ParseYearMonthDayFormats_16), value);
}
inline static int32_t get_offset_of_ParseDayMonthYearFormats_17() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseDayMonthYearFormats_17)); }
inline StringU5BU5D_t1281789340* get_ParseDayMonthYearFormats_17() const { return ___ParseDayMonthYearFormats_17; }
inline StringU5BU5D_t1281789340** get_address_of_ParseDayMonthYearFormats_17() { return &___ParseDayMonthYearFormats_17; }
inline void set_ParseDayMonthYearFormats_17(StringU5BU5D_t1281789340* value)
{
___ParseDayMonthYearFormats_17 = value;
Il2CppCodeGenWriteBarrier((&___ParseDayMonthYearFormats_17), value);
}
inline static int32_t get_offset_of_ParseMonthDayYearFormats_18() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseMonthDayYearFormats_18)); }
inline StringU5BU5D_t1281789340* get_ParseMonthDayYearFormats_18() const { return ___ParseMonthDayYearFormats_18; }
inline StringU5BU5D_t1281789340** get_address_of_ParseMonthDayYearFormats_18() { return &___ParseMonthDayYearFormats_18; }
inline void set_ParseMonthDayYearFormats_18(StringU5BU5D_t1281789340* value)
{
___ParseMonthDayYearFormats_18 = value;
Il2CppCodeGenWriteBarrier((&___ParseMonthDayYearFormats_18), value);
}
inline static int32_t get_offset_of_MonthDayShortFormats_19() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___MonthDayShortFormats_19)); }
inline StringU5BU5D_t1281789340* get_MonthDayShortFormats_19() const { return ___MonthDayShortFormats_19; }
inline StringU5BU5D_t1281789340** get_address_of_MonthDayShortFormats_19() { return &___MonthDayShortFormats_19; }
inline void set_MonthDayShortFormats_19(StringU5BU5D_t1281789340* value)
{
___MonthDayShortFormats_19 = value;
Il2CppCodeGenWriteBarrier((&___MonthDayShortFormats_19), value);
}
inline static int32_t get_offset_of_DayMonthShortFormats_20() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___DayMonthShortFormats_20)); }
inline StringU5BU5D_t1281789340* get_DayMonthShortFormats_20() const { return ___DayMonthShortFormats_20; }
inline StringU5BU5D_t1281789340** get_address_of_DayMonthShortFormats_20() { return &___DayMonthShortFormats_20; }
inline void set_DayMonthShortFormats_20(StringU5BU5D_t1281789340* value)
{
___DayMonthShortFormats_20 = value;
Il2CppCodeGenWriteBarrier((&___DayMonthShortFormats_20), value);
}
inline static int32_t get_offset_of_daysmonth_21() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___daysmonth_21)); }
inline Int32U5BU5D_t385246372* get_daysmonth_21() const { return ___daysmonth_21; }
inline Int32U5BU5D_t385246372** get_address_of_daysmonth_21() { return &___daysmonth_21; }
inline void set_daysmonth_21(Int32U5BU5D_t385246372* value)
{
___daysmonth_21 = value;
Il2CppCodeGenWriteBarrier((&___daysmonth_21), value);
}
inline static int32_t get_offset_of_daysmonthleap_22() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___daysmonthleap_22)); }
inline Int32U5BU5D_t385246372* get_daysmonthleap_22() const { return ___daysmonthleap_22; }
inline Int32U5BU5D_t385246372** get_address_of_daysmonthleap_22() { return &___daysmonthleap_22; }
inline void set_daysmonthleap_22(Int32U5BU5D_t385246372* value)
{
___daysmonthleap_22 = value;
Il2CppCodeGenWriteBarrier((&___daysmonthleap_22), value);
}
inline static int32_t get_offset_of_to_local_time_span_object_23() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___to_local_time_span_object_23)); }
inline RuntimeObject * get_to_local_time_span_object_23() const { return ___to_local_time_span_object_23; }
inline RuntimeObject ** get_address_of_to_local_time_span_object_23() { return &___to_local_time_span_object_23; }
inline void set_to_local_time_span_object_23(RuntimeObject * value)
{
___to_local_time_span_object_23 = value;
Il2CppCodeGenWriteBarrier((&___to_local_time_span_object_23), value);
}
inline static int32_t get_offset_of_last_now_24() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___last_now_24)); }
inline int64_t get_last_now_24() const { return ___last_now_24; }
inline int64_t* get_address_of_last_now_24() { return &___last_now_24; }
inline void set_last_now_24(int64_t value)
{
___last_now_24 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIME_T3738529785_H
#ifndef DIVIDEBYZEROEXCEPTION_T1856388118_H
#define DIVIDEBYZEROEXCEPTION_T1856388118_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DivideByZeroException
struct DivideByZeroException_t1856388118 : public ArithmeticException_t4283546778
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DIVIDEBYZEROEXCEPTION_T1856388118_H
#ifndef DLLNOTFOUNDEXCEPTION_T2721418633_H
#define DLLNOTFOUNDEXCEPTION_T2721418633_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DllNotFoundException
struct DllNotFoundException_t2721418633 : public TypeLoadException_t3707937253
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DLLNOTFOUNDEXCEPTION_T2721418633_H
#ifndef ENTRYPOINTNOTFOUNDEXCEPTION_T1356862416_H
#define ENTRYPOINTNOTFOUNDEXCEPTION_T1356862416_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.EntryPointNotFoundException
struct EntryPointNotFoundException_t1356862416 : public TypeLoadException_t3707937253
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ENTRYPOINTNOTFOUNDEXCEPTION_T1356862416_H
#ifndef FIELDACCESSEXCEPTION_T238379456_H
#define FIELDACCESSEXCEPTION_T238379456_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.FieldAccessException
struct FieldAccessException_t238379456 : public MemberAccessException_t1734467078
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FIELDACCESSEXCEPTION_T238379456_H
#ifndef METHODACCESSEXCEPTION_T190175859_H
#define METHODACCESSEXCEPTION_T190175859_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MethodAccessException
struct MethodAccessException_t190175859 : public MemberAccessException_t1734467078
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // METHODACCESSEXCEPTION_T190175859_H
#ifndef MISSINGMEMBEREXCEPTION_T1385081665_H
#define MISSINGMEMBEREXCEPTION_T1385081665_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MissingMemberException
struct MissingMemberException_t1385081665 : public MemberAccessException_t1734467078
{
public:
// System.String System.MissingMemberException::ClassName
String_t* ___ClassName_11;
// System.String System.MissingMemberException::MemberName
String_t* ___MemberName_12;
// System.Byte[] System.MissingMemberException::Signature
ByteU5BU5D_t4116647657* ___Signature_13;
public:
inline static int32_t get_offset_of_ClassName_11() { return static_cast<int32_t>(offsetof(MissingMemberException_t1385081665, ___ClassName_11)); }
inline String_t* get_ClassName_11() const { return ___ClassName_11; }
inline String_t** get_address_of_ClassName_11() { return &___ClassName_11; }
inline void set_ClassName_11(String_t* value)
{
___ClassName_11 = value;
Il2CppCodeGenWriteBarrier((&___ClassName_11), value);
}
inline static int32_t get_offset_of_MemberName_12() { return static_cast<int32_t>(offsetof(MissingMemberException_t1385081665, ___MemberName_12)); }
inline String_t* get_MemberName_12() const { return ___MemberName_12; }
inline String_t** get_address_of_MemberName_12() { return &___MemberName_12; }
inline void set_MemberName_12(String_t* value)
{
___MemberName_12 = value;
Il2CppCodeGenWriteBarrier((&___MemberName_12), value);
}
inline static int32_t get_offset_of_Signature_13() { return static_cast<int32_t>(offsetof(MissingMemberException_t1385081665, ___Signature_13)); }
inline ByteU5BU5D_t4116647657* get_Signature_13() const { return ___Signature_13; }
inline ByteU5BU5D_t4116647657** get_address_of_Signature_13() { return &___Signature_13; }
inline void set_Signature_13(ByteU5BU5D_t4116647657* value)
{
___Signature_13 = value;
Il2CppCodeGenWriteBarrier((&___Signature_13), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MISSINGMEMBEREXCEPTION_T1385081665_H
#ifndef EVENTWAITHANDLE_T777845177_H
#define EVENTWAITHANDLE_T777845177_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.EventWaitHandle
struct EventWaitHandle_t777845177 : public WaitHandle_t1743403487
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EVENTWAITHANDLE_T777845177_H
#ifndef MUTEX_T3066672582_H
#define MUTEX_T3066672582_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.Mutex
struct Mutex_t3066672582 : public WaitHandle_t1743403487
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MUTEX_T3066672582_H
#ifndef THREAD_T2300836069_H
#define THREAD_T2300836069_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.Thread
struct Thread_t2300836069 : public CriticalFinalizerObject_t701527852
{
public:
// System.Int32 System.Threading.Thread::lock_thread_id
int32_t ___lock_thread_id_0;
// System.IntPtr System.Threading.Thread::system_thread_handle
intptr_t ___system_thread_handle_1;
// System.Object System.Threading.Thread::cached_culture_info
RuntimeObject * ___cached_culture_info_2;
// System.IntPtr System.Threading.Thread::unused0
intptr_t ___unused0_3;
// System.Boolean System.Threading.Thread::threadpool_thread
bool ___threadpool_thread_4;
// System.IntPtr System.Threading.Thread::name
intptr_t ___name_5;
// System.Int32 System.Threading.Thread::name_len
int32_t ___name_len_6;
// System.Threading.ThreadState System.Threading.Thread::state
int32_t ___state_7;
// System.Object System.Threading.Thread::abort_exc
RuntimeObject * ___abort_exc_8;
// System.Int32 System.Threading.Thread::abort_state_handle
int32_t ___abort_state_handle_9;
// System.Int64 System.Threading.Thread::thread_id
int64_t ___thread_id_10;
// System.IntPtr System.Threading.Thread::start_notify
intptr_t ___start_notify_11;
// System.IntPtr System.Threading.Thread::stack_ptr
intptr_t ___stack_ptr_12;
// System.UIntPtr System.Threading.Thread::static_data
uintptr_t ___static_data_13;
// System.IntPtr System.Threading.Thread::jit_data
intptr_t ___jit_data_14;
// System.IntPtr System.Threading.Thread::lock_data
intptr_t ___lock_data_15;
// System.Object System.Threading.Thread::current_appcontext
RuntimeObject * ___current_appcontext_16;
// System.Int32 System.Threading.Thread::stack_size
int32_t ___stack_size_17;
// System.Object System.Threading.Thread::start_obj
RuntimeObject * ___start_obj_18;
// System.IntPtr System.Threading.Thread::appdomain_refs
intptr_t ___appdomain_refs_19;
// System.Int32 System.Threading.Thread::interruption_requested
int32_t ___interruption_requested_20;
// System.IntPtr System.Threading.Thread::suspend_event
intptr_t ___suspend_event_21;
// System.IntPtr System.Threading.Thread::suspended_event
intptr_t ___suspended_event_22;
// System.IntPtr System.Threading.Thread::resume_event
intptr_t ___resume_event_23;
// System.IntPtr System.Threading.Thread::synch_cs
intptr_t ___synch_cs_24;
// System.IntPtr System.Threading.Thread::serialized_culture_info
intptr_t ___serialized_culture_info_25;
// System.Int32 System.Threading.Thread::serialized_culture_info_len
int32_t ___serialized_culture_info_len_26;
// System.IntPtr System.Threading.Thread::serialized_ui_culture_info
intptr_t ___serialized_ui_culture_info_27;
// System.Int32 System.Threading.Thread::serialized_ui_culture_info_len
int32_t ___serialized_ui_culture_info_len_28;
// System.Boolean System.Threading.Thread::thread_dump_requested
bool ___thread_dump_requested_29;
// System.IntPtr System.Threading.Thread::end_stack
intptr_t ___end_stack_30;
// System.Boolean System.Threading.Thread::thread_interrupt_requested
bool ___thread_interrupt_requested_31;
// System.Byte System.Threading.Thread::apartment_state
uint8_t ___apartment_state_32;
// System.Int32 modreq(System.Runtime.CompilerServices.IsVolatile) System.Threading.Thread::critical_region_level
int32_t ___critical_region_level_33;
// System.Int32 System.Threading.Thread::small_id
int32_t ___small_id_34;
// System.IntPtr System.Threading.Thread::manage_callback
intptr_t ___manage_callback_35;
// System.Object System.Threading.Thread::pending_exception
RuntimeObject * ___pending_exception_36;
// System.Threading.ExecutionContext System.Threading.Thread::ec_to_set
ExecutionContext_t1748372627 * ___ec_to_set_37;
// System.IntPtr System.Threading.Thread::interrupt_on_stop
intptr_t ___interrupt_on_stop_38;
// System.IntPtr System.Threading.Thread::unused3
intptr_t ___unused3_39;
// System.IntPtr System.Threading.Thread::unused4
intptr_t ___unused4_40;
// System.IntPtr System.Threading.Thread::unused5
intptr_t ___unused5_41;
// System.IntPtr System.Threading.Thread::unused6
intptr_t ___unused6_42;
// System.MulticastDelegate System.Threading.Thread::threadstart
MulticastDelegate_t * ___threadstart_45;
// System.Int32 System.Threading.Thread::managed_id
int32_t ___managed_id_46;
// System.Security.Principal.IPrincipal System.Threading.Thread::_principal
RuntimeObject* ____principal_47;
// System.Boolean System.Threading.Thread::in_currentculture
bool ___in_currentculture_50;
public:
inline static int32_t get_offset_of_lock_thread_id_0() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___lock_thread_id_0)); }
inline int32_t get_lock_thread_id_0() const { return ___lock_thread_id_0; }
inline int32_t* get_address_of_lock_thread_id_0() { return &___lock_thread_id_0; }
inline void set_lock_thread_id_0(int32_t value)
{
___lock_thread_id_0 = value;
}
inline static int32_t get_offset_of_system_thread_handle_1() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___system_thread_handle_1)); }
inline intptr_t get_system_thread_handle_1() const { return ___system_thread_handle_1; }
inline intptr_t* get_address_of_system_thread_handle_1() { return &___system_thread_handle_1; }
inline void set_system_thread_handle_1(intptr_t value)
{
___system_thread_handle_1 = value;
}
inline static int32_t get_offset_of_cached_culture_info_2() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___cached_culture_info_2)); }
inline RuntimeObject * get_cached_culture_info_2() const { return ___cached_culture_info_2; }
inline RuntimeObject ** get_address_of_cached_culture_info_2() { return &___cached_culture_info_2; }
inline void set_cached_culture_info_2(RuntimeObject * value)
{
___cached_culture_info_2 = value;
Il2CppCodeGenWriteBarrier((&___cached_culture_info_2), value);
}
inline static int32_t get_offset_of_unused0_3() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___unused0_3)); }
inline intptr_t get_unused0_3() const { return ___unused0_3; }
inline intptr_t* get_address_of_unused0_3() { return &___unused0_3; }
inline void set_unused0_3(intptr_t value)
{
___unused0_3 = value;
}
inline static int32_t get_offset_of_threadpool_thread_4() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___threadpool_thread_4)); }
inline bool get_threadpool_thread_4() const { return ___threadpool_thread_4; }
inline bool* get_address_of_threadpool_thread_4() { return &___threadpool_thread_4; }
inline void set_threadpool_thread_4(bool value)
{
___threadpool_thread_4 = value;
}
inline static int32_t get_offset_of_name_5() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___name_5)); }
inline intptr_t get_name_5() const { return ___name_5; }
inline intptr_t* get_address_of_name_5() { return &___name_5; }
inline void set_name_5(intptr_t value)
{
___name_5 = value;
}
inline static int32_t get_offset_of_name_len_6() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___name_len_6)); }
inline int32_t get_name_len_6() const { return ___name_len_6; }
inline int32_t* get_address_of_name_len_6() { return &___name_len_6; }
inline void set_name_len_6(int32_t value)
{
___name_len_6 = value;
}
inline static int32_t get_offset_of_state_7() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___state_7)); }
inline int32_t get_state_7() const { return ___state_7; }
inline int32_t* get_address_of_state_7() { return &___state_7; }
inline void set_state_7(int32_t value)
{
___state_7 = value;
}
inline static int32_t get_offset_of_abort_exc_8() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___abort_exc_8)); }
inline RuntimeObject * get_abort_exc_8() const { return ___abort_exc_8; }
inline RuntimeObject ** get_address_of_abort_exc_8() { return &___abort_exc_8; }
inline void set_abort_exc_8(RuntimeObject * value)
{
___abort_exc_8 = value;
Il2CppCodeGenWriteBarrier((&___abort_exc_8), value);
}
inline static int32_t get_offset_of_abort_state_handle_9() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___abort_state_handle_9)); }
inline int32_t get_abort_state_handle_9() const { return ___abort_state_handle_9; }
inline int32_t* get_address_of_abort_state_handle_9() { return &___abort_state_handle_9; }
inline void set_abort_state_handle_9(int32_t value)
{
___abort_state_handle_9 = value;
}
inline static int32_t get_offset_of_thread_id_10() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___thread_id_10)); }
inline int64_t get_thread_id_10() const { return ___thread_id_10; }
inline int64_t* get_address_of_thread_id_10() { return &___thread_id_10; }
inline void set_thread_id_10(int64_t value)
{
___thread_id_10 = value;
}
inline static int32_t get_offset_of_start_notify_11() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___start_notify_11)); }
inline intptr_t get_start_notify_11() const { return ___start_notify_11; }
inline intptr_t* get_address_of_start_notify_11() { return &___start_notify_11; }
inline void set_start_notify_11(intptr_t value)
{
___start_notify_11 = value;
}
inline static int32_t get_offset_of_stack_ptr_12() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___stack_ptr_12)); }
inline intptr_t get_stack_ptr_12() const { return ___stack_ptr_12; }
inline intptr_t* get_address_of_stack_ptr_12() { return &___stack_ptr_12; }
inline void set_stack_ptr_12(intptr_t value)
{
___stack_ptr_12 = value;
}
inline static int32_t get_offset_of_static_data_13() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___static_data_13)); }
inline uintptr_t get_static_data_13() const { return ___static_data_13; }
inline uintptr_t* get_address_of_static_data_13() { return &___static_data_13; }
inline void set_static_data_13(uintptr_t value)
{
___static_data_13 = value;
}
inline static int32_t get_offset_of_jit_data_14() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___jit_data_14)); }
inline intptr_t get_jit_data_14() const { return ___jit_data_14; }
inline intptr_t* get_address_of_jit_data_14() { return &___jit_data_14; }
inline void set_jit_data_14(intptr_t value)
{
___jit_data_14 = value;
}
inline static int32_t get_offset_of_lock_data_15() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___lock_data_15)); }
inline intptr_t get_lock_data_15() const { return ___lock_data_15; }
inline intptr_t* get_address_of_lock_data_15() { return &___lock_data_15; }
inline void set_lock_data_15(intptr_t value)
{
___lock_data_15 = value;
}
inline static int32_t get_offset_of_current_appcontext_16() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___current_appcontext_16)); }
inline RuntimeObject * get_current_appcontext_16() const { return ___current_appcontext_16; }
inline RuntimeObject ** get_address_of_current_appcontext_16() { return &___current_appcontext_16; }
inline void set_current_appcontext_16(RuntimeObject * value)
{
___current_appcontext_16 = value;
Il2CppCodeGenWriteBarrier((&___current_appcontext_16), value);
}
inline static int32_t get_offset_of_stack_size_17() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___stack_size_17)); }
inline int32_t get_stack_size_17() const { return ___stack_size_17; }
inline int32_t* get_address_of_stack_size_17() { return &___stack_size_17; }
inline void set_stack_size_17(int32_t value)
{
___stack_size_17 = value;
}
inline static int32_t get_offset_of_start_obj_18() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___start_obj_18)); }
inline RuntimeObject * get_start_obj_18() const { return ___start_obj_18; }
inline RuntimeObject ** get_address_of_start_obj_18() { return &___start_obj_18; }
inline void set_start_obj_18(RuntimeObject * value)
{
___start_obj_18 = value;
Il2CppCodeGenWriteBarrier((&___start_obj_18), value);
}
inline static int32_t get_offset_of_appdomain_refs_19() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___appdomain_refs_19)); }
inline intptr_t get_appdomain_refs_19() const { return ___appdomain_refs_19; }
inline intptr_t* get_address_of_appdomain_refs_19() { return &___appdomain_refs_19; }
inline void set_appdomain_refs_19(intptr_t value)
{
___appdomain_refs_19 = value;
}
inline static int32_t get_offset_of_interruption_requested_20() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___interruption_requested_20)); }
inline int32_t get_interruption_requested_20() const { return ___interruption_requested_20; }
inline int32_t* get_address_of_interruption_requested_20() { return &___interruption_requested_20; }
inline void set_interruption_requested_20(int32_t value)
{
___interruption_requested_20 = value;
}
inline static int32_t get_offset_of_suspend_event_21() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___suspend_event_21)); }
inline intptr_t get_suspend_event_21() const { return ___suspend_event_21; }
inline intptr_t* get_address_of_suspend_event_21() { return &___suspend_event_21; }
inline void set_suspend_event_21(intptr_t value)
{
___suspend_event_21 = value;
}
inline static int32_t get_offset_of_suspended_event_22() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___suspended_event_22)); }
inline intptr_t get_suspended_event_22() const { return ___suspended_event_22; }
inline intptr_t* get_address_of_suspended_event_22() { return &___suspended_event_22; }
inline void set_suspended_event_22(intptr_t value)
{
___suspended_event_22 = value;
}
inline static int32_t get_offset_of_resume_event_23() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___resume_event_23)); }
inline intptr_t get_resume_event_23() const { return ___resume_event_23; }
inline intptr_t* get_address_of_resume_event_23() { return &___resume_event_23; }
inline void set_resume_event_23(intptr_t value)
{
___resume_event_23 = value;
}
inline static int32_t get_offset_of_synch_cs_24() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___synch_cs_24)); }
inline intptr_t get_synch_cs_24() const { return ___synch_cs_24; }
inline intptr_t* get_address_of_synch_cs_24() { return &___synch_cs_24; }
inline void set_synch_cs_24(intptr_t value)
{
___synch_cs_24 = value;
}
inline static int32_t get_offset_of_serialized_culture_info_25() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___serialized_culture_info_25)); }
inline intptr_t get_serialized_culture_info_25() const { return ___serialized_culture_info_25; }
inline intptr_t* get_address_of_serialized_culture_info_25() { return &___serialized_culture_info_25; }
inline void set_serialized_culture_info_25(intptr_t value)
{
___serialized_culture_info_25 = value;
}
inline static int32_t get_offset_of_serialized_culture_info_len_26() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___serialized_culture_info_len_26)); }
inline int32_t get_serialized_culture_info_len_26() const { return ___serialized_culture_info_len_26; }
inline int32_t* get_address_of_serialized_culture_info_len_26() { return &___serialized_culture_info_len_26; }
inline void set_serialized_culture_info_len_26(int32_t value)
{
___serialized_culture_info_len_26 = value;
}
inline static int32_t get_offset_of_serialized_ui_culture_info_27() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___serialized_ui_culture_info_27)); }
inline intptr_t get_serialized_ui_culture_info_27() const { return ___serialized_ui_culture_info_27; }
inline intptr_t* get_address_of_serialized_ui_culture_info_27() { return &___serialized_ui_culture_info_27; }
inline void set_serialized_ui_culture_info_27(intptr_t value)
{
___serialized_ui_culture_info_27 = value;
}
inline static int32_t get_offset_of_serialized_ui_culture_info_len_28() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___serialized_ui_culture_info_len_28)); }
inline int32_t get_serialized_ui_culture_info_len_28() const { return ___serialized_ui_culture_info_len_28; }
inline int32_t* get_address_of_serialized_ui_culture_info_len_28() { return &___serialized_ui_culture_info_len_28; }
inline void set_serialized_ui_culture_info_len_28(int32_t value)
{
___serialized_ui_culture_info_len_28 = value;
}
inline static int32_t get_offset_of_thread_dump_requested_29() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___thread_dump_requested_29)); }
inline bool get_thread_dump_requested_29() const { return ___thread_dump_requested_29; }
inline bool* get_address_of_thread_dump_requested_29() { return &___thread_dump_requested_29; }
inline void set_thread_dump_requested_29(bool value)
{
___thread_dump_requested_29 = value;
}
inline static int32_t get_offset_of_end_stack_30() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___end_stack_30)); }
inline intptr_t get_end_stack_30() const { return ___end_stack_30; }
inline intptr_t* get_address_of_end_stack_30() { return &___end_stack_30; }
inline void set_end_stack_30(intptr_t value)
{
___end_stack_30 = value;
}
inline static int32_t get_offset_of_thread_interrupt_requested_31() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___thread_interrupt_requested_31)); }
inline bool get_thread_interrupt_requested_31() const { return ___thread_interrupt_requested_31; }
inline bool* get_address_of_thread_interrupt_requested_31() { return &___thread_interrupt_requested_31; }
inline void set_thread_interrupt_requested_31(bool value)
{
___thread_interrupt_requested_31 = value;
}
inline static int32_t get_offset_of_apartment_state_32() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___apartment_state_32)); }
inline uint8_t get_apartment_state_32() const { return ___apartment_state_32; }
inline uint8_t* get_address_of_apartment_state_32() { return &___apartment_state_32; }
inline void set_apartment_state_32(uint8_t value)
{
___apartment_state_32 = value;
}
inline static int32_t get_offset_of_critical_region_level_33() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___critical_region_level_33)); }
inline int32_t get_critical_region_level_33() const { return ___critical_region_level_33; }
inline int32_t* get_address_of_critical_region_level_33() { return &___critical_region_level_33; }
inline void set_critical_region_level_33(int32_t value)
{
___critical_region_level_33 = value;
}
inline static int32_t get_offset_of_small_id_34() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___small_id_34)); }
inline int32_t get_small_id_34() const { return ___small_id_34; }
inline int32_t* get_address_of_small_id_34() { return &___small_id_34; }
inline void set_small_id_34(int32_t value)
{
___small_id_34 = value;
}
inline static int32_t get_offset_of_manage_callback_35() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___manage_callback_35)); }
inline intptr_t get_manage_callback_35() const { return ___manage_callback_35; }
inline intptr_t* get_address_of_manage_callback_35() { return &___manage_callback_35; }
inline void set_manage_callback_35(intptr_t value)
{
___manage_callback_35 = value;
}
inline static int32_t get_offset_of_pending_exception_36() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___pending_exception_36)); }
inline RuntimeObject * get_pending_exception_36() const { return ___pending_exception_36; }
inline RuntimeObject ** get_address_of_pending_exception_36() { return &___pending_exception_36; }
inline void set_pending_exception_36(RuntimeObject * value)
{
___pending_exception_36 = value;
Il2CppCodeGenWriteBarrier((&___pending_exception_36), value);
}
inline static int32_t get_offset_of_ec_to_set_37() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___ec_to_set_37)); }
inline ExecutionContext_t1748372627 * get_ec_to_set_37() const { return ___ec_to_set_37; }
inline ExecutionContext_t1748372627 ** get_address_of_ec_to_set_37() { return &___ec_to_set_37; }
inline void set_ec_to_set_37(ExecutionContext_t1748372627 * value)
{
___ec_to_set_37 = value;
Il2CppCodeGenWriteBarrier((&___ec_to_set_37), value);
}
inline static int32_t get_offset_of_interrupt_on_stop_38() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___interrupt_on_stop_38)); }
inline intptr_t get_interrupt_on_stop_38() const { return ___interrupt_on_stop_38; }
inline intptr_t* get_address_of_interrupt_on_stop_38() { return &___interrupt_on_stop_38; }
inline void set_interrupt_on_stop_38(intptr_t value)
{
___interrupt_on_stop_38 = value;
}
inline static int32_t get_offset_of_unused3_39() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___unused3_39)); }
inline intptr_t get_unused3_39() const { return ___unused3_39; }
inline intptr_t* get_address_of_unused3_39() { return &___unused3_39; }
inline void set_unused3_39(intptr_t value)
{
___unused3_39 = value;
}
inline static int32_t get_offset_of_unused4_40() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___unused4_40)); }
inline intptr_t get_unused4_40() const { return ___unused4_40; }
inline intptr_t* get_address_of_unused4_40() { return &___unused4_40; }
inline void set_unused4_40(intptr_t value)
{
___unused4_40 = value;
}
inline static int32_t get_offset_of_unused5_41() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___unused5_41)); }
inline intptr_t get_unused5_41() const { return ___unused5_41; }
inline intptr_t* get_address_of_unused5_41() { return &___unused5_41; }
inline void set_unused5_41(intptr_t value)
{
___unused5_41 = value;
}
inline static int32_t get_offset_of_unused6_42() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___unused6_42)); }
inline intptr_t get_unused6_42() const { return ___unused6_42; }
inline intptr_t* get_address_of_unused6_42() { return &___unused6_42; }
inline void set_unused6_42(intptr_t value)
{
___unused6_42 = value;
}
inline static int32_t get_offset_of_threadstart_45() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___threadstart_45)); }
inline MulticastDelegate_t * get_threadstart_45() const { return ___threadstart_45; }
inline MulticastDelegate_t ** get_address_of_threadstart_45() { return &___threadstart_45; }
inline void set_threadstart_45(MulticastDelegate_t * value)
{
___threadstart_45 = value;
Il2CppCodeGenWriteBarrier((&___threadstart_45), value);
}
inline static int32_t get_offset_of_managed_id_46() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___managed_id_46)); }
inline int32_t get_managed_id_46() const { return ___managed_id_46; }
inline int32_t* get_address_of_managed_id_46() { return &___managed_id_46; }
inline void set_managed_id_46(int32_t value)
{
___managed_id_46 = value;
}
inline static int32_t get_offset_of__principal_47() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ____principal_47)); }
inline RuntimeObject* get__principal_47() const { return ____principal_47; }
inline RuntimeObject** get_address_of__principal_47() { return &____principal_47; }
inline void set__principal_47(RuntimeObject* value)
{
____principal_47 = value;
Il2CppCodeGenWriteBarrier((&____principal_47), value);
}
inline static int32_t get_offset_of_in_currentculture_50() { return static_cast<int32_t>(offsetof(Thread_t2300836069, ___in_currentculture_50)); }
inline bool get_in_currentculture_50() const { return ___in_currentculture_50; }
inline bool* get_address_of_in_currentculture_50() { return &___in_currentculture_50; }
inline void set_in_currentculture_50(bool value)
{
___in_currentculture_50 = value;
}
};
struct Thread_t2300836069_StaticFields
{
public:
// System.Collections.Hashtable System.Threading.Thread::datastorehash
Hashtable_t1853889766 * ___datastorehash_48;
// System.Object System.Threading.Thread::datastore_lock
RuntimeObject * ___datastore_lock_49;
// System.Object System.Threading.Thread::culture_lock
RuntimeObject * ___culture_lock_51;
public:
inline static int32_t get_offset_of_datastorehash_48() { return static_cast<int32_t>(offsetof(Thread_t2300836069_StaticFields, ___datastorehash_48)); }
inline Hashtable_t1853889766 * get_datastorehash_48() const { return ___datastorehash_48; }
inline Hashtable_t1853889766 ** get_address_of_datastorehash_48() { return &___datastorehash_48; }
inline void set_datastorehash_48(Hashtable_t1853889766 * value)
{
___datastorehash_48 = value;
Il2CppCodeGenWriteBarrier((&___datastorehash_48), value);
}
inline static int32_t get_offset_of_datastore_lock_49() { return static_cast<int32_t>(offsetof(Thread_t2300836069_StaticFields, ___datastore_lock_49)); }
inline RuntimeObject * get_datastore_lock_49() const { return ___datastore_lock_49; }
inline RuntimeObject ** get_address_of_datastore_lock_49() { return &___datastore_lock_49; }
inline void set_datastore_lock_49(RuntimeObject * value)
{
___datastore_lock_49 = value;
Il2CppCodeGenWriteBarrier((&___datastore_lock_49), value);
}
inline static int32_t get_offset_of_culture_lock_51() { return static_cast<int32_t>(offsetof(Thread_t2300836069_StaticFields, ___culture_lock_51)); }
inline RuntimeObject * get_culture_lock_51() const { return ___culture_lock_51; }
inline RuntimeObject ** get_address_of_culture_lock_51() { return &___culture_lock_51; }
inline void set_culture_lock_51(RuntimeObject * value)
{
___culture_lock_51 = value;
Il2CppCodeGenWriteBarrier((&___culture_lock_51), value);
}
};
struct Thread_t2300836069_ThreadStaticFields
{
public:
// System.Object[] System.Threading.Thread::local_slots
ObjectU5BU5D_t2843939325* ___local_slots_43;
// System.Threading.ExecutionContext System.Threading.Thread::_ec
ExecutionContext_t1748372627 * ____ec_44;
public:
inline static int32_t get_offset_of_local_slots_43() { return static_cast<int32_t>(offsetof(Thread_t2300836069_ThreadStaticFields, ___local_slots_43)); }
inline ObjectU5BU5D_t2843939325* get_local_slots_43() const { return ___local_slots_43; }
inline ObjectU5BU5D_t2843939325** get_address_of_local_slots_43() { return &___local_slots_43; }
inline void set_local_slots_43(ObjectU5BU5D_t2843939325* value)
{
___local_slots_43 = value;
Il2CppCodeGenWriteBarrier((&___local_slots_43), value);
}
inline static int32_t get_offset_of__ec_44() { return static_cast<int32_t>(offsetof(Thread_t2300836069_ThreadStaticFields, ____ec_44)); }
inline ExecutionContext_t1748372627 * get__ec_44() const { return ____ec_44; }
inline ExecutionContext_t1748372627 ** get_address_of__ec_44() { return &____ec_44; }
inline void set__ec_44(ExecutionContext_t1748372627 * value)
{
____ec_44 = value;
Il2CppCodeGenWriteBarrier((&____ec_44), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // THREAD_T2300836069_H
#ifndef DATETIMEOFFSET_T3229287507_H
#define DATETIMEOFFSET_T3229287507_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTimeOffset
struct DateTimeOffset_t3229287507
{
public:
// System.DateTime System.DateTimeOffset::dt
DateTime_t3738529785 ___dt_2;
// System.TimeSpan System.DateTimeOffset::utc_offset
TimeSpan_t881159249 ___utc_offset_3;
public:
inline static int32_t get_offset_of_dt_2() { return static_cast<int32_t>(offsetof(DateTimeOffset_t3229287507, ___dt_2)); }
inline DateTime_t3738529785 get_dt_2() const { return ___dt_2; }
inline DateTime_t3738529785 * get_address_of_dt_2() { return &___dt_2; }
inline void set_dt_2(DateTime_t3738529785 value)
{
___dt_2 = value;
}
inline static int32_t get_offset_of_utc_offset_3() { return static_cast<int32_t>(offsetof(DateTimeOffset_t3229287507, ___utc_offset_3)); }
inline TimeSpan_t881159249 get_utc_offset_3() const { return ___utc_offset_3; }
inline TimeSpan_t881159249 * get_address_of_utc_offset_3() { return &___utc_offset_3; }
inline void set_utc_offset_3(TimeSpan_t881159249 value)
{
___utc_offset_3 = value;
}
};
struct DateTimeOffset_t3229287507_StaticFields
{
public:
// System.DateTimeOffset System.DateTimeOffset::MaxValue
DateTimeOffset_t3229287507 ___MaxValue_0;
// System.DateTimeOffset System.DateTimeOffset::MinValue
DateTimeOffset_t3229287507 ___MinValue_1;
public:
inline static int32_t get_offset_of_MaxValue_0() { return static_cast<int32_t>(offsetof(DateTimeOffset_t3229287507_StaticFields, ___MaxValue_0)); }
inline DateTimeOffset_t3229287507 get_MaxValue_0() const { return ___MaxValue_0; }
inline DateTimeOffset_t3229287507 * get_address_of_MaxValue_0() { return &___MaxValue_0; }
inline void set_MaxValue_0(DateTimeOffset_t3229287507 value)
{
___MaxValue_0 = value;
}
inline static int32_t get_offset_of_MinValue_1() { return static_cast<int32_t>(offsetof(DateTimeOffset_t3229287507_StaticFields, ___MinValue_1)); }
inline DateTimeOffset_t3229287507 get_MinValue_1() const { return ___MinValue_1; }
inline DateTimeOffset_t3229287507 * get_address_of_MinValue_1() { return &___MinValue_1; }
inline void set_MinValue_1(DateTimeOffset_t3229287507 value)
{
___MinValue_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIMEOFFSET_T3229287507_H
#ifndef MISSINGFIELDEXCEPTION_T1989070983_H
#define MISSINGFIELDEXCEPTION_T1989070983_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MissingFieldException
struct MissingFieldException_t1989070983 : public MissingMemberException_t1385081665
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MISSINGFIELDEXCEPTION_T1989070983_H
#ifndef MISSINGMETHODEXCEPTION_T1274661534_H
#define MISSINGMETHODEXCEPTION_T1274661534_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MissingMethodException
struct MissingMethodException_t1274661534 : public MissingMemberException_t1385081665
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MISSINGMETHODEXCEPTION_T1274661534_H
#ifndef MANUALRESETEVENT_T451242010_H
#define MANUALRESETEVENT_T451242010_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ManualResetEvent
struct ManualResetEvent_t451242010 : public EventWaitHandle_t777845177
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MANUALRESETEVENT_T451242010_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize800 = { sizeof (StringBuilder_t), sizeof(char*), 0, 0 };
extern const int32_t g_FieldOffsetTable800[5] =
{
0,
StringBuilder_t::get_offset_of__length_1(),
StringBuilder_t::get_offset_of__str_2(),
StringBuilder_t::get_offset_of__cached_str_3(),
StringBuilder_t::get_offset_of__maxCapacity_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize801 = { sizeof (UTF32Encoding_t312252005), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable801[2] =
{
UTF32Encoding_t312252005::get_offset_of_bigEndian_28(),
UTF32Encoding_t312252005::get_offset_of_byteOrderMark_29(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize802 = { sizeof (UTF32Decoder_t635925672), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable802[3] =
{
UTF32Decoder_t635925672::get_offset_of_bigEndian_2(),
UTF32Decoder_t635925672::get_offset_of_leftOverByte_3(),
UTF32Decoder_t635925672::get_offset_of_leftOverLength_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize803 = { sizeof (UTF7Encoding_t2644108479), -1, sizeof(UTF7Encoding_t2644108479_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable803[3] =
{
UTF7Encoding_t2644108479::get_offset_of_allowOptionals_28(),
UTF7Encoding_t2644108479_StaticFields::get_offset_of_encodingRules_29(),
UTF7Encoding_t2644108479_StaticFields::get_offset_of_base64Values_30(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize804 = { sizeof (UTF7Decoder_t2247208115), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable804[1] =
{
UTF7Decoder_t2247208115::get_offset_of_leftOver_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize805 = { sizeof (UTF8Encoding_t3956466879), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable805[1] =
{
UTF8Encoding_t3956466879::get_offset_of_emitIdentifier_28(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize806 = { sizeof (UTF8Decoder_t2159214862), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable806[2] =
{
UTF8Decoder_t2159214862::get_offset_of_leftOverBits_2(),
UTF8Decoder_t2159214862::get_offset_of_leftOverCount_3(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize807 = { sizeof (UnicodeEncoding_t1959134050), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable807[2] =
{
UnicodeEncoding_t1959134050::get_offset_of_bigEndian_28(),
UnicodeEncoding_t1959134050::get_offset_of_byteOrderMark_29(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize808 = { sizeof (UnicodeDecoder_t872550992), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable808[2] =
{
UnicodeDecoder_t872550992::get_offset_of_bigEndian_2(),
UnicodeDecoder_t872550992::get_offset_of_leftOverByte_3(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize809 = { sizeof (CompressedStack_t1202932761), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable809[1] =
{
CompressedStack_t1202932761::get_offset_of__list_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize810 = { sizeof (EventResetMode_t3817241503)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable810[3] =
{
EventResetMode_t3817241503::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize811 = { sizeof (EventWaitHandle_t777845177), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize812 = { sizeof (ExecutionContext_t1748372627), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable812[3] =
{
ExecutionContext_t1748372627::get_offset_of__sc_0(),
ExecutionContext_t1748372627::get_offset_of__suppressFlow_1(),
ExecutionContext_t1748372627::get_offset_of__capture_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize813 = { sizeof (Interlocked_t2273387594), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize814 = { sizeof (ManualResetEvent_t451242010), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize815 = { sizeof (Monitor_t2197244473), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize816 = { sizeof (Mutex_t3066672582), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize817 = { sizeof (NativeEventCalls_t570794723), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize818 = { sizeof (RegisteredWaitHandle_t1529538454), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable818[9] =
{
RegisteredWaitHandle_t1529538454::get_offset_of__waitObject_1(),
RegisteredWaitHandle_t1529538454::get_offset_of__callback_2(),
RegisteredWaitHandle_t1529538454::get_offset_of__timeout_3(),
RegisteredWaitHandle_t1529538454::get_offset_of__state_4(),
RegisteredWaitHandle_t1529538454::get_offset_of__executeOnlyOnce_5(),
RegisteredWaitHandle_t1529538454::get_offset_of__finalEvent_6(),
RegisteredWaitHandle_t1529538454::get_offset_of__cancelEvent_7(),
RegisteredWaitHandle_t1529538454::get_offset_of__callsInProcess_8(),
RegisteredWaitHandle_t1529538454::get_offset_of__unregistered_9(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize819 = { sizeof (SynchronizationContext_t2326897723), -1, 0, sizeof(SynchronizationContext_t2326897723_ThreadStaticFields) };
extern const int32_t g_FieldOffsetTable819[1] =
{
SynchronizationContext_t2326897723_ThreadStaticFields::get_offset_of_currentContext_0() | THREAD_LOCAL_STATIC_MASK,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize820 = { sizeof (SynchronizationLockException_t841761767), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize821 = { sizeof (Thread_t2300836069), -1, sizeof(Thread_t2300836069_StaticFields), sizeof(Thread_t2300836069_ThreadStaticFields) };
extern const int32_t g_FieldOffsetTable821[52] =
{
Thread_t2300836069::get_offset_of_lock_thread_id_0(),
Thread_t2300836069::get_offset_of_system_thread_handle_1(),
Thread_t2300836069::get_offset_of_cached_culture_info_2(),
Thread_t2300836069::get_offset_of_unused0_3(),
Thread_t2300836069::get_offset_of_threadpool_thread_4(),
Thread_t2300836069::get_offset_of_name_5(),
Thread_t2300836069::get_offset_of_name_len_6(),
Thread_t2300836069::get_offset_of_state_7(),
Thread_t2300836069::get_offset_of_abort_exc_8(),
Thread_t2300836069::get_offset_of_abort_state_handle_9(),
Thread_t2300836069::get_offset_of_thread_id_10(),
Thread_t2300836069::get_offset_of_start_notify_11(),
Thread_t2300836069::get_offset_of_stack_ptr_12(),
Thread_t2300836069::get_offset_of_static_data_13(),
Thread_t2300836069::get_offset_of_jit_data_14(),
Thread_t2300836069::get_offset_of_lock_data_15(),
Thread_t2300836069::get_offset_of_current_appcontext_16(),
Thread_t2300836069::get_offset_of_stack_size_17(),
Thread_t2300836069::get_offset_of_start_obj_18(),
Thread_t2300836069::get_offset_of_appdomain_refs_19(),
Thread_t2300836069::get_offset_of_interruption_requested_20(),
Thread_t2300836069::get_offset_of_suspend_event_21(),
Thread_t2300836069::get_offset_of_suspended_event_22(),
Thread_t2300836069::get_offset_of_resume_event_23(),
Thread_t2300836069::get_offset_of_synch_cs_24(),
Thread_t2300836069::get_offset_of_serialized_culture_info_25(),
Thread_t2300836069::get_offset_of_serialized_culture_info_len_26(),
Thread_t2300836069::get_offset_of_serialized_ui_culture_info_27(),
Thread_t2300836069::get_offset_of_serialized_ui_culture_info_len_28(),
Thread_t2300836069::get_offset_of_thread_dump_requested_29(),
Thread_t2300836069::get_offset_of_end_stack_30(),
Thread_t2300836069::get_offset_of_thread_interrupt_requested_31(),
Thread_t2300836069::get_offset_of_apartment_state_32(),
Thread_t2300836069::get_offset_of_critical_region_level_33(),
Thread_t2300836069::get_offset_of_small_id_34(),
Thread_t2300836069::get_offset_of_manage_callback_35(),
Thread_t2300836069::get_offset_of_pending_exception_36(),
Thread_t2300836069::get_offset_of_ec_to_set_37(),
Thread_t2300836069::get_offset_of_interrupt_on_stop_38(),
Thread_t2300836069::get_offset_of_unused3_39(),
Thread_t2300836069::get_offset_of_unused4_40(),
Thread_t2300836069::get_offset_of_unused5_41(),
Thread_t2300836069::get_offset_of_unused6_42(),
Thread_t2300836069_ThreadStaticFields::get_offset_of_local_slots_43() | THREAD_LOCAL_STATIC_MASK,
Thread_t2300836069_ThreadStaticFields::get_offset_of__ec_44() | THREAD_LOCAL_STATIC_MASK,
Thread_t2300836069::get_offset_of_threadstart_45(),
Thread_t2300836069::get_offset_of_managed_id_46(),
Thread_t2300836069::get_offset_of__principal_47(),
Thread_t2300836069_StaticFields::get_offset_of_datastorehash_48(),
Thread_t2300836069_StaticFields::get_offset_of_datastore_lock_49(),
Thread_t2300836069::get_offset_of_in_currentculture_50(),
Thread_t2300836069_StaticFields::get_offset_of_culture_lock_51(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize822 = { sizeof (ThreadAbortException_t4074510458), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize823 = { sizeof (ThreadInterruptedException_t3240955163), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize824 = { sizeof (ThreadPool_t2177989550), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize825 = { sizeof (ThreadState_t2533302383)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable825[11] =
{
ThreadState_t2533302383::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize826 = { sizeof (ThreadStateException_t3003788475), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize827 = { sizeof (Timer_t716671026), -1, sizeof(Timer_t716671026_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable827[7] =
{
Timer_t716671026_StaticFields::get_offset_of_scheduler_1(),
Timer_t716671026::get_offset_of_callback_2(),
Timer_t716671026::get_offset_of_state_3(),
Timer_t716671026::get_offset_of_due_time_ms_4(),
Timer_t716671026::get_offset_of_period_ms_5(),
Timer_t716671026::get_offset_of_next_run_6(),
Timer_t716671026::get_offset_of_disposed_7(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize828 = { sizeof (TimerComparer_t2774265395), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize829 = { sizeof (Scheduler_t3215764947), -1, sizeof(Scheduler_t3215764947_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable829[2] =
{
Scheduler_t3215764947_StaticFields::get_offset_of_instance_0(),
Scheduler_t3215764947::get_offset_of_list_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize830 = { sizeof (WaitHandle_t1743403487), -1, sizeof(WaitHandle_t1743403487_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable830[4] =
{
0,
WaitHandle_t1743403487::get_offset_of_safe_wait_handle_2(),
WaitHandle_t1743403487_StaticFields::get_offset_of_InvalidHandle_3(),
WaitHandle_t1743403487::get_offset_of_disposed_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize831 = { sizeof (AccessViolationException_t339633883), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize832 = { sizeof (ActivationContext_t976916018), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable832[1] =
{
ActivationContext_t976916018::get_offset_of__disposed_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize833 = { sizeof (Activator_t1841325713), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize834 = { sizeof (AppDomain_t1571427825), -1, sizeof(AppDomain_t1571427825_StaticFields), sizeof(AppDomain_t1571427825_ThreadStaticFields) };
extern const int32_t g_FieldOffsetTable834[21] =
{
AppDomain_t1571427825::get_offset_of__mono_app_domain_1(),
AppDomain_t1571427825_StaticFields::get_offset_of__process_guid_2(),
AppDomain_t1571427825_ThreadStaticFields::get_offset_of_type_resolve_in_progress_3() | THREAD_LOCAL_STATIC_MASK,
AppDomain_t1571427825_ThreadStaticFields::get_offset_of_assembly_resolve_in_progress_4() | THREAD_LOCAL_STATIC_MASK,
AppDomain_t1571427825_ThreadStaticFields::get_offset_of_assembly_resolve_in_progress_refonly_5() | THREAD_LOCAL_STATIC_MASK,
AppDomain_t1571427825::get_offset_of__evidence_6(),
AppDomain_t1571427825::get_offset_of__granted_7(),
AppDomain_t1571427825::get_offset_of__principalPolicy_8(),
AppDomain_t1571427825_ThreadStaticFields::get_offset_of__principal_9() | THREAD_LOCAL_STATIC_MASK,
AppDomain_t1571427825_StaticFields::get_offset_of_default_domain_10(),
AppDomain_t1571427825::get_offset_of__domain_manager_11(),
AppDomain_t1571427825::get_offset_of__activation_12(),
AppDomain_t1571427825::get_offset_of__applicationIdentity_13(),
AppDomain_t1571427825::get_offset_of_AssemblyLoad_14(),
AppDomain_t1571427825::get_offset_of_AssemblyResolve_15(),
AppDomain_t1571427825::get_offset_of_DomainUnload_16(),
AppDomain_t1571427825::get_offset_of_ProcessExit_17(),
AppDomain_t1571427825::get_offset_of_ResourceResolve_18(),
AppDomain_t1571427825::get_offset_of_TypeResolve_19(),
AppDomain_t1571427825::get_offset_of_UnhandledException_20(),
AppDomain_t1571427825::get_offset_of_ReflectionOnlyAssemblyResolve_21(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize835 = { sizeof (AppDomainManager_t1420869192), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize836 = { sizeof (AppDomainSetup_t123196401), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable836[22] =
{
AppDomainSetup_t123196401::get_offset_of_application_base_0(),
AppDomainSetup_t123196401::get_offset_of_application_name_1(),
AppDomainSetup_t123196401::get_offset_of_cache_path_2(),
AppDomainSetup_t123196401::get_offset_of_configuration_file_3(),
AppDomainSetup_t123196401::get_offset_of_dynamic_base_4(),
AppDomainSetup_t123196401::get_offset_of_license_file_5(),
AppDomainSetup_t123196401::get_offset_of_private_bin_path_6(),
AppDomainSetup_t123196401::get_offset_of_private_bin_path_probe_7(),
AppDomainSetup_t123196401::get_offset_of_shadow_copy_directories_8(),
AppDomainSetup_t123196401::get_offset_of_shadow_copy_files_9(),
AppDomainSetup_t123196401::get_offset_of_publisher_policy_10(),
AppDomainSetup_t123196401::get_offset_of_path_changed_11(),
AppDomainSetup_t123196401::get_offset_of_loader_optimization_12(),
AppDomainSetup_t123196401::get_offset_of_disallow_binding_redirects_13(),
AppDomainSetup_t123196401::get_offset_of_disallow_code_downloads_14(),
AppDomainSetup_t123196401::get_offset_of__activationArguments_15(),
AppDomainSetup_t123196401::get_offset_of_domain_initializer_16(),
AppDomainSetup_t123196401::get_offset_of_application_trust_17(),
AppDomainSetup_t123196401::get_offset_of_domain_initializer_args_18(),
AppDomainSetup_t123196401::get_offset_of_application_trust_xml_19(),
AppDomainSetup_t123196401::get_offset_of_disallow_appbase_probe_20(),
AppDomainSetup_t123196401::get_offset_of_configuration_bytes_21(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize837 = { sizeof (ApplicationException_t2339761290), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize838 = { sizeof (ApplicationIdentity_t1917735356), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable838[1] =
{
ApplicationIdentity_t1917735356::get_offset_of__fullName_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize839 = { sizeof (ArgumentException_t132251570), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable839[2] =
{
0,
ArgumentException_t132251570::get_offset_of_param_name_12(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize840 = { sizeof (ArgumentNullException_t1615371798), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable840[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize841 = { sizeof (ArgumentOutOfRangeException_t777629997), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable841[1] =
{
ArgumentOutOfRangeException_t777629997::get_offset_of_actual_value_13(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize842 = { sizeof (ArithmeticException_t4283546778), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize843 = { sizeof (ArrayTypeMismatchException_t2342549375), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable843[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize844 = { sizeof (AssemblyLoadEventArgs_t2792010465), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize845 = { sizeof (AttributeTargets_t1784037988)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable845[17] =
{
AttributeTargets_t1784037988::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize846 = { sizeof (BitConverter_t3118986983), -1, sizeof(BitConverter_t3118986983_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable846[2] =
{
BitConverter_t3118986983_StaticFields::get_offset_of_SwappedWordsInDouble_0(),
BitConverter_t3118986983_StaticFields::get_offset_of_IsLittleEndian_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize847 = { sizeof (Buffer_t1599081364), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize848 = { sizeof (CharEnumerator_t1121470421), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable848[3] =
{
CharEnumerator_t1121470421::get_offset_of_str_0(),
CharEnumerator_t1121470421::get_offset_of_index_1(),
CharEnumerator_t1121470421::get_offset_of_length_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize849 = { sizeof (Console_t3208230065), -1, sizeof(Console_t3208230065_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable849[5] =
{
Console_t3208230065_StaticFields::get_offset_of_stdout_0(),
Console_t3208230065_StaticFields::get_offset_of_stderr_1(),
Console_t3208230065_StaticFields::get_offset_of_stdin_2(),
Console_t3208230065_StaticFields::get_offset_of_inputEncoding_3(),
Console_t3208230065_StaticFields::get_offset_of_outputEncoding_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize850 = { sizeof (ContextBoundObject_t1394786030), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize851 = { sizeof (Convert_t2465617642), -1, sizeof(Convert_t2465617642_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable851[2] =
{
Convert_t2465617642_StaticFields::get_offset_of_DBNull_0(),
Convert_t2465617642_StaticFields::get_offset_of_conversionTable_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize852 = { sizeof (DBNull_t3725197148), -1, sizeof(DBNull_t3725197148_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable852[1] =
{
DBNull_t3725197148_StaticFields::get_offset_of_Value_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize853 = { sizeof (DateTime_t3738529785)+ sizeof (RuntimeObject), -1, sizeof(DateTime_t3738529785_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable853[25] =
{
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
DateTime_t3738529785::get_offset_of_ticks_10() + static_cast<int32_t>(sizeof(RuntimeObject)),
DateTime_t3738529785::get_offset_of_kind_11() + static_cast<int32_t>(sizeof(RuntimeObject)),
DateTime_t3738529785_StaticFields::get_offset_of_MaxValue_12(),
DateTime_t3738529785_StaticFields::get_offset_of_MinValue_13(),
DateTime_t3738529785_StaticFields::get_offset_of_ParseTimeFormats_14(),
DateTime_t3738529785_StaticFields::get_offset_of_ParseYearDayMonthFormats_15(),
DateTime_t3738529785_StaticFields::get_offset_of_ParseYearMonthDayFormats_16(),
DateTime_t3738529785_StaticFields::get_offset_of_ParseDayMonthYearFormats_17(),
DateTime_t3738529785_StaticFields::get_offset_of_ParseMonthDayYearFormats_18(),
DateTime_t3738529785_StaticFields::get_offset_of_MonthDayShortFormats_19(),
DateTime_t3738529785_StaticFields::get_offset_of_DayMonthShortFormats_20(),
DateTime_t3738529785_StaticFields::get_offset_of_daysmonth_21(),
DateTime_t3738529785_StaticFields::get_offset_of_daysmonthleap_22(),
DateTime_t3738529785_StaticFields::get_offset_of_to_local_time_span_object_23(),
DateTime_t3738529785_StaticFields::get_offset_of_last_now_24(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize854 = { sizeof (Which_t2943845661)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable854[5] =
{
Which_t2943845661::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize855 = { sizeof (DateTimeKind_t3468814247)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable855[4] =
{
DateTimeKind_t3468814247::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize856 = { sizeof (DateTimeOffset_t3229287507)+ sizeof (RuntimeObject), -1, sizeof(DateTimeOffset_t3229287507_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable856[4] =
{
DateTimeOffset_t3229287507_StaticFields::get_offset_of_MaxValue_0(),
DateTimeOffset_t3229287507_StaticFields::get_offset_of_MinValue_1(),
DateTimeOffset_t3229287507::get_offset_of_dt_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
DateTimeOffset_t3229287507::get_offset_of_utc_offset_3() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize857 = { sizeof (DateTimeUtils_t3080864452), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize858 = { sizeof (DayOfWeek_t3650621421)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable858[8] =
{
DayOfWeek_t3650621421::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize859 = { sizeof (DelegateData_t1677132599), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable859[2] =
{
DelegateData_t1677132599::get_offset_of_target_type_0(),
DelegateData_t1677132599::get_offset_of_method_name_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize860 = { sizeof (DelegateSerializationHolder_t3408600559), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable860[1] =
{
DelegateSerializationHolder_t3408600559::get_offset_of__delegate_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize861 = { sizeof (DelegateEntry_t1019584161), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable861[7] =
{
DelegateEntry_t1019584161::get_offset_of_type_0(),
DelegateEntry_t1019584161::get_offset_of_assembly_1(),
DelegateEntry_t1019584161::get_offset_of_target_2(),
DelegateEntry_t1019584161::get_offset_of_targetTypeAssembly_3(),
DelegateEntry_t1019584161::get_offset_of_targetTypeName_4(),
DelegateEntry_t1019584161::get_offset_of_methodName_5(),
DelegateEntry_t1019584161::get_offset_of_delegateEntry_6(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize862 = { sizeof (DivideByZeroException_t1856388118), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable862[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize863 = { sizeof (DllNotFoundException_t2721418633), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable863[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize864 = { sizeof (EntryPointNotFoundException_t1356862416), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable864[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize865 = { sizeof (MonoEnumInfo_t3694469084)+ sizeof (RuntimeObject), -1, sizeof(MonoEnumInfo_t3694469084_StaticFields), sizeof(MonoEnumInfo_t3694469084_ThreadStaticFields) };
extern const int32_t g_FieldOffsetTable865[11] =
{
MonoEnumInfo_t3694469084::get_offset_of_utype_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
MonoEnumInfo_t3694469084::get_offset_of_values_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
MonoEnumInfo_t3694469084::get_offset_of_names_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
MonoEnumInfo_t3694469084::get_offset_of_name_hash_3() + static_cast<int32_t>(sizeof(RuntimeObject)),
MonoEnumInfo_t3694469084_ThreadStaticFields::get_offset_of_cache_4() | THREAD_LOCAL_STATIC_MASK,
MonoEnumInfo_t3694469084_StaticFields::get_offset_of_global_cache_5(),
MonoEnumInfo_t3694469084_StaticFields::get_offset_of_global_cache_monitor_6(),
MonoEnumInfo_t3694469084_StaticFields::get_offset_of_sbyte_comparer_7(),
MonoEnumInfo_t3694469084_StaticFields::get_offset_of_short_comparer_8(),
MonoEnumInfo_t3694469084_StaticFields::get_offset_of_int_comparer_9(),
MonoEnumInfo_t3694469084_StaticFields::get_offset_of_long_comparer_10(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize866 = { sizeof (SByteComparer_t2329725001), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize867 = { sizeof (ShortComparer_t2253094562), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize868 = { sizeof (IntComparer_t3812095803), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize869 = { sizeof (LongComparer_t1798269597), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize870 = { sizeof (Environment_t2712485525), -1, sizeof(Environment_t2712485525_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable870[2] =
{
0,
Environment_t2712485525_StaticFields::get_offset_of_os_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize871 = { sizeof (SpecialFolder_t3871784040)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable871[24] =
{
SpecialFolder_t3871784040::get_offset_of_value___1() + 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,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize872 = { sizeof (EventArgs_t3591816995), -1, sizeof(EventArgs_t3591816995_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable872[1] =
{
EventArgs_t3591816995_StaticFields::get_offset_of_Empty_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize873 = { sizeof (ExecutionEngineException_t1142598034), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize874 = { sizeof (FieldAccessException_t238379456), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize875 = { sizeof (FlagsAttribute_t2262502849), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize876 = { sizeof (FormatException_t154580423), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable876[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize877 = { sizeof (GC_t959872083), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize878 = { sizeof (Guid_t)+ sizeof (RuntimeObject), sizeof(Guid_t ), sizeof(Guid_t_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable878[15] =
{
Guid_t::get_offset_of__a_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__b_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__c_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__d_3() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__e_4() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__f_5() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__g_6() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__h_7() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__i_8() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__j_9() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t::get_offset_of__k_10() + static_cast<int32_t>(sizeof(RuntimeObject)),
Guid_t_StaticFields::get_offset_of_Empty_11(),
Guid_t_StaticFields::get_offset_of__rngAccess_12(),
Guid_t_StaticFields::get_offset_of__rng_13(),
Guid_t_StaticFields::get_offset_of__fastRng_14(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize879 = { sizeof (GuidParser_t2761237274), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable879[3] =
{
GuidParser_t2761237274::get_offset_of__src_0(),
GuidParser_t2761237274::get_offset_of__length_1(),
GuidParser_t2761237274::get_offset_of__cur_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize880 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize881 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize882 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize883 = { sizeof (IndexOutOfRangeException_t1578797820), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize884 = { sizeof (InvalidCastException_t3927145244), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable884[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize885 = { sizeof (InvalidOperationException_t56020091), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable885[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize886 = { sizeof (InvalidProgramException_t3836716986), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize887 = { sizeof (LoaderOptimization_t1484956347)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable887[7] =
{
LoaderOptimization_t1484956347::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize888 = { sizeof (LocalDataStoreSlot_t740841968), -1, sizeof(LocalDataStoreSlot_t740841968_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable888[5] =
{
LocalDataStoreSlot_t740841968::get_offset_of_slot_0(),
LocalDataStoreSlot_t740841968::get_offset_of_thread_local_1(),
LocalDataStoreSlot_t740841968_StaticFields::get_offset_of_lock_obj_2(),
LocalDataStoreSlot_t740841968_StaticFields::get_offset_of_slot_bitmap_thread_3(),
LocalDataStoreSlot_t740841968_StaticFields::get_offset_of_slot_bitmap_context_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize889 = { sizeof (Math_t1671470975), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize890 = { sizeof (MemberAccessException_t1734467078), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize891 = { sizeof (MethodAccessException_t190175859), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable891[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize892 = { sizeof (MissingFieldException_t1989070983), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize893 = { sizeof (MissingMemberException_t1385081665), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable893[3] =
{
MissingMemberException_t1385081665::get_offset_of_ClassName_11(),
MissingMemberException_t1385081665::get_offset_of_MemberName_12(),
MissingMemberException_t1385081665::get_offset_of_Signature_13(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize894 = { sizeof (MissingMethodException_t1274661534), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable894[1] =
{
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize895 = { sizeof (MonoAsyncCall_t3023670838), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable895[7] =
{
MonoAsyncCall_t3023670838::get_offset_of_msg_0(),
MonoAsyncCall_t3023670838::get_offset_of_cb_method_1(),
MonoAsyncCall_t3023670838::get_offset_of_cb_target_2(),
MonoAsyncCall_t3023670838::get_offset_of_state_3(),
MonoAsyncCall_t3023670838::get_offset_of_res_4(),
MonoAsyncCall_t3023670838::get_offset_of_out_args_5(),
MonoAsyncCall_t3023670838::get_offset_of_wait_event_6(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize896 = { sizeof (MonoCustomAttrs_t3634537737), -1, sizeof(MonoCustomAttrs_t3634537737_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable896[3] =
{
MonoCustomAttrs_t3634537737_StaticFields::get_offset_of_corlib_0(),
MonoCustomAttrs_t3634537737_StaticFields::get_offset_of_AttributeUsageType_1(),
MonoCustomAttrs_t3634537737_StaticFields::get_offset_of_DefaultAttributeUsage_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize897 = { sizeof (AttributeInfo_t2216804170), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable897[2] =
{
AttributeInfo_t2216804170::get_offset_of__usage_0(),
AttributeInfo_t2216804170::get_offset_of__inheritanceLevel_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize898 = { sizeof (MonoTouchAOTHelper_t570977590), -1, sizeof(MonoTouchAOTHelper_t570977590_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable898[1] =
{
MonoTouchAOTHelper_t570977590_StaticFields::get_offset_of_FalseFlag_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize899 = { sizeof (MonoTypeInfo_t3366989025), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable899[2] =
{
MonoTypeInfo_t3366989025::get_offset_of_full_name_0(),
MonoTypeInfo_t3366989025::get_offset_of_default_ctor_1(),
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"[email protected]"
] | |
5a8f3467de34e86805a49959e6c63124d3a990b2 | 90f9ab77e2c2c1e63d0e1cb79c1a6b5c287d794e | /Recursion/Permutation3.cpp | 123ada7eca3215470f33e247401b86c2aa21a237 | [] | no_license | mukeshkumar7470/Practice-Cpp | caa8de851dbf907a53d8bad128dba6357819b48a | fa72f7468902c64a995e2e2ac36091f52285008c | refs/heads/master | 2023-03-20T19:15:06.687538 | 2021-03-25T07:24:26 | 2021-03-25T07:24:26 | 339,183,104 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 879 | cpp | #include <iostream>
#include <climits>
#include "bits/stdc++.h"
using namespace std;
/* Permutations using STL */
/* Next_permutation(start,end):
If the function can determine the next higher permutation, it rearranges the
elements as such and returns true. If that was not possible (because it is already
at the largest possible permutation), it rearranges the elements according to the
first permutation (sorted in ascending order) and returns false. */
vector<vector<int>> permute(vector<int> nums) {
vector<vector<int>> ans;
sort(nums.begin(), nums.end());
do {
ans.push_back(nums);
} while (next_permutation(nums.begin(), nums.end()));
return ans;
}
int main(){
vector<vector<int>> res = permute({1, 2, 2});
for (auto i : res) {
for (auto ii : i) {
cout << ii << " ";
}
cout << "\n";
}
}
| [
"[email protected]"
] | |
72b14d3d04a9cb329694c2479ffb2b74677901d6 | b9575b7d4299110e663a7432381ce7534c234b40 | /4_ExtLib/4.4_GuiFrameworks/4.4.2_HaxeUI/4.4.2.1_SimpleGui/4.4.2.1.1_HaxeuiBackends/4.4.2.1.1.2_haxeui-hxwidgets/4.4.2.1.1.2.3_Dialogs/SimpleMessageDialog/Export/cpp/debug/include/hx/widgets/CheckBox.h | c8d7d0399096c565be2a2f64bd6d8bfdbe8e3312 | [] | no_license | R3D9477/haxe-basics | dc912670731ac891f359c73db68f1a683af03f6a | cd12a1cb250447afa877fc30cf671f00e62717ef | refs/heads/master | 2021-09-02T12:22:55.398965 | 2018-01-02T15:29:40 | 2018-01-02T15:29:40 | 72,667,406 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,488 | h | // GeneratedByHaxe
#ifndef INCLUDED_hx_widgets_CheckBox
#define INCLUDED_hx_widgets_CheckBox
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
#ifndef INCLUDED_hx_widgets_Control
#include <hx/widgets/Control.h>
#endif
#ifndef INCLUDED_a958b609e3b635d9
#define INCLUDED_a958b609e3b635d9
#include "wx/checkbox.h"
#endif
HX_DECLARE_CLASS2(hx,widgets,CheckBox)
HX_DECLARE_CLASS2(hx,widgets,Control)
HX_DECLARE_CLASS2(hx,widgets,EvtHandler)
HX_DECLARE_CLASS2(hx,widgets,Object)
HX_DECLARE_CLASS2(hx,widgets,Trackable)
HX_DECLARE_CLASS2(hx,widgets,Window)
namespace hx{
namespace widgets{
class HXCPP_CLASS_ATTRIBUTES CheckBox_obj : public ::hx::widgets::Control_obj
{
public:
typedef ::hx::widgets::Control_obj super;
typedef CheckBox_obj OBJ_;
CheckBox_obj();
public:
enum { _hx_ClassId = 0x58d6973e };
void __construct( ::hx::widgets::Window parent,::String label,hx::Null< int > __o_style,hx::Null< int > __o_id);
inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="hx.widgets.CheckBox")
{ return hx::Object::operator new(inSize,inContainer,inName); }
inline void *operator new(size_t inSize, int extra)
{ return hx::Object::operator new(inSize+extra,true,"hx.widgets.CheckBox"); }
static hx::ObjectPtr< CheckBox_obj > __new( ::hx::widgets::Window parent,::String label,hx::Null< int > __o_style,hx::Null< int > __o_id);
static hx::ObjectPtr< CheckBox_obj > __alloc(hx::Ctx *_hx_ctx, ::hx::widgets::Window parent,::String label,hx::Null< int > __o_style,hx::Null< int > __o_id);
static void * _hx_vtable;
static Dynamic __CreateEmpty();
static Dynamic __Create(hx::DynamicArray inArgs);
//~CheckBox_obj();
HX_DO_RTTI_ALL;
hx::Val __Field(const ::String &inString, hx::PropertyAccess inCallProp);
hx::Val __SetField(const ::String &inString,const hx::Val &inValue, hx::PropertyAccess inCallProp);
void __GetFields(Array< ::String> &outFields);
static void __register();
void __Mark(HX_MARK_PARAMS);
void __Visit(HX_VISIT_PARAMS);
bool _hx_isInstanceOf(int inClassId);
::String __ToString() const { return HX_HCSTRING("CheckBox","\x43","\x46","\x8f","\x86"); }
bool get_value();
::Dynamic get_value_dyn();
bool set_value(bool value);
::Dynamic set_value_dyn();
::cpp::Pointer< wxCheckBox > checkboxRef;
::cpp::Pointer< wxCheckBox > get_checkboxRef();
::Dynamic get_checkboxRef_dyn();
};
} // end namespace hx
} // end namespace widgets
#endif /* INCLUDED_hx_widgets_CheckBox */
| [
"[email protected]"
] | |
b28f1d8c67d06ce39c7eaed5142ca7e68b77c729 | 261a5b12cba37d0cc82e9536a80e5124b3da08d1 | /Framework/Source/Core/OpenGL/ShaderStorageBufferGL.cpp | fcb1a5e61071517701b99bc871bfbc08818b5c24 | [] | no_license | hsdk/Falcor | d977d33402a2cf45229caa02054aaffb2cba1717 | 732bb6c57498636d705605d425aa0beee9c6094f | refs/heads/master | 2021-01-17T18:19:05.029027 | 2016-08-20T01:23:06 | 2016-08-20T01:23:06 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,795 | cpp | /***************************************************************************
# Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
#include "Framework.h"
#ifdef FALCOR_GL
#include "../ShaderStorageBuffer.h"
#include "glm/glm.hpp"
#include "../Buffer.h"
namespace Falcor
{
using namespace ShaderReflection;
bool checkVariableByOffset(VariableDesc::Type callType, size_t offset, size_t count, const VariableDescMap& uniforms, const std::string& bufferName);
bool checkVariableType(VariableDesc::Type callType, VariableDesc::Type shaderType, const std::string& name, const std::string& bufferName);
ShaderStorageBuffer::SharedPtr ShaderStorageBuffer::create(const ProgramVersion* pProgram, const std::string& bufferName, size_t overrideSize)
{
auto pBuffer = SharedPtr(new ShaderStorageBuffer(bufferName));
if(pBuffer->init(pProgram, bufferName, overrideSize, false) == false)
{
return nullptr;
}
return pBuffer;
}
ShaderStorageBuffer::ShaderStorageBuffer(const std::string& bufferName) : UniformBuffer(bufferName)
{
}
void ShaderStorageBuffer::readFromGPU(size_t offset, size_t size)
{
if(size == -1)
{
size = mSize - offset;
}
if(size + offset > mSize)
{
Logger::log(Logger::Level::Warning, "ShaderStorageBuffer::readFromGPU() - trying to read more data than what the buffer contains. Call is ignored.");
return;
}
mpBuffer->readData(mData.data(), offset, size);
}
ShaderStorageBuffer::~ShaderStorageBuffer() = default;
void ShaderStorageBuffer::readBlob(void* pDest, size_t offset, size_t size) const
{
if(size + offset > mSize)
{
Logger::log(Logger::Level::Warning, "ShaderStorageBuffer::readBlob() - trying to read more data than what the buffer contains. Call is ignored.");
return;
}
memcpy(pDest, mData.data() + offset, size);
}
#define get_uniform_offset(_var_type, _c_type) \
template<> void ShaderStorageBuffer::getVariable(size_t offset, _c_type& value) const \
{ \
if(checkVariableByOffset(VariableDesc::Type::_var_type, offset, 1, mVariables, mName)) \
{ \
const uint8_t* pVar = mData.data() + offset; \
value = *(const _c_type*)pVar; \
} \
}
get_uniform_offset(Bool, bool);
get_uniform_offset(Bool2, glm::bvec2);
get_uniform_offset(Bool3, glm::bvec3);
get_uniform_offset(Bool4, glm::bvec4);
get_uniform_offset(Uint, uint32_t);
get_uniform_offset(Uint2, glm::uvec2);
get_uniform_offset(Uint3, glm::uvec3);
get_uniform_offset(Uint4, glm::uvec4);
get_uniform_offset(Int, int32_t);
get_uniform_offset(Int2, glm::ivec2);
get_uniform_offset(Int3, glm::ivec3);
get_uniform_offset(Int4, glm::ivec4);
get_uniform_offset(Float, float);
get_uniform_offset(Float2, glm::vec2);
get_uniform_offset(Float3, glm::vec3);
get_uniform_offset(Float4, glm::vec4);
get_uniform_offset(Float2x2, glm::mat2);
get_uniform_offset(Float2x3, glm::mat2x3);
get_uniform_offset(Float2x4, glm::mat2x4);
get_uniform_offset(Float3x3, glm::mat3);
get_uniform_offset(Float3x2, glm::mat3x2);
get_uniform_offset(Float3x4, glm::mat3x4);
get_uniform_offset(Float4x4, glm::mat4);
get_uniform_offset(Float4x2, glm::mat4x2);
get_uniform_offset(Float4x3, glm::mat4x3);
get_uniform_offset(GpuPtr, uint64_t);
#undef get_uniform_offset
#define get_uniform_string(_var_type, _c_type) \
template<> void ShaderStorageBuffer::getVariable(const std::string& name, _c_type& value) const \
{ \
size_t offset; \
const auto* pUniform = getVariableData<true>(name, offset); \
if((_LOG_ENABLED == 0) || (pUniform && checkVariableType(VariableDesc::Type::_var_type, pUniform->type, name, mName))) \
{ \
getVariable(offset, value); \
} \
}
get_uniform_string(Bool, bool);
get_uniform_string(Bool2, glm::bvec2);
get_uniform_string(Bool3, glm::bvec3);
get_uniform_string(Bool4, glm::bvec4);
get_uniform_string(Uint, uint32_t);
get_uniform_string(Uint2, glm::uvec2);
get_uniform_string(Uint3, glm::uvec3);
get_uniform_string(Uint4, glm::uvec4);
get_uniform_string(Int, int32_t);
get_uniform_string(Int2, glm::ivec2);
get_uniform_string(Int3, glm::ivec3);
get_uniform_string(Int4, glm::ivec4);
get_uniform_string(Float, float);
get_uniform_string(Float2, glm::vec2);
get_uniform_string(Float3, glm::vec3);
get_uniform_string(Float4, glm::vec4);
get_uniform_string(Float2x2, glm::mat2);
get_uniform_string(Float2x3, glm::mat2x3);
get_uniform_string(Float2x4, glm::mat2x4);
get_uniform_string(Float3x3, glm::mat3);
get_uniform_string(Float3x2, glm::mat3x2);
get_uniform_string(Float3x4, glm::mat3x4);
get_uniform_string(Float4x4, glm::mat4);
get_uniform_string(Float4x2, glm::mat4x2);
get_uniform_string(Float4x3, glm::mat4x3);
get_uniform_string(GpuPtr, uint64_t);
#undef get_uniform_string
#define get_uniform_array_offset(_var_type, _c_type) \
template<> void ShaderStorageBuffer::getVariableArray(size_t offset, size_t count, _c_type value[]) const \
{ \
if(checkVariableByOffset(VariableDesc::Type::_var_type, offset, count, mVariables, mName)) \
{ \
const uint8_t* pVar = mData.data() + offset; \
const _c_type* pMat = (_c_type*)pVar; \
for(size_t i = 0; i < count; i++) \
{ \
value[i] = pMat[i]; \
} \
} \
}
get_uniform_array_offset(Bool, bool);
get_uniform_array_offset(Bool2, glm::bvec2);
get_uniform_array_offset(Bool3, glm::bvec3);
get_uniform_array_offset(Bool4, glm::bvec4);
get_uniform_array_offset(Uint, uint32_t);
get_uniform_array_offset(Uint2, glm::uvec2);
get_uniform_array_offset(Uint3, glm::uvec3);
get_uniform_array_offset(Uint4, glm::uvec4);
get_uniform_array_offset(Int, int32_t);
get_uniform_array_offset(Int2, glm::ivec2);
get_uniform_array_offset(Int3, glm::ivec3);
get_uniform_array_offset(Int4, glm::ivec4);
get_uniform_array_offset(Float, float);
get_uniform_array_offset(Float2, glm::vec2);
get_uniform_array_offset(Float3, glm::vec3);
get_uniform_array_offset(Float4, glm::vec4);
get_uniform_array_offset(Float2x2, glm::mat2);
get_uniform_array_offset(Float2x3, glm::mat2x3);
get_uniform_array_offset(Float2x4, glm::mat2x4);
get_uniform_array_offset(Float3x3, glm::mat3);
get_uniform_array_offset(Float3x2, glm::mat3x2);
get_uniform_array_offset(Float3x4, glm::mat3x4);
get_uniform_array_offset(Float4x4, glm::mat4);
get_uniform_array_offset(Float4x2, glm::mat4x2);
get_uniform_array_offset(Float4x3, glm::mat4x3);
get_uniform_array_offset(GpuPtr, uint64_t);
#undef get_uniform_array_offset
#define get_uniform_array_string(_var_type, _c_type) \
template<> void ShaderStorageBuffer::getVariableArray(const std::string& name, size_t count, _c_type value[]) const \
{ \
size_t offset; \
const auto* pUniform = getVariableData<false>(name, offset); \
if((_LOG_ENABLED == 0) || (pUniform && checkVariableType(VariableDesc::Type::_var_type, pUniform->type, name, mName))) \
{ \
getVariableArray(offset, count, value); \
} \
}
get_uniform_array_string(Bool, bool);
get_uniform_array_string(Bool2, glm::bvec2);
get_uniform_array_string(Bool3, glm::bvec3);
get_uniform_array_string(Bool4, glm::bvec4);
get_uniform_array_string(Uint, uint32_t);
get_uniform_array_string(Uint2, glm::uvec2);
get_uniform_array_string(Uint3, glm::uvec3);
get_uniform_array_string(Uint4, glm::uvec4);
get_uniform_array_string(Int, int32_t);
get_uniform_array_string(Int2, glm::ivec2);
get_uniform_array_string(Int3, glm::ivec3);
get_uniform_array_string(Int4, glm::ivec4);
get_uniform_array_string(Float, float);
get_uniform_array_string(Float2, glm::vec2);
get_uniform_array_string(Float3, glm::vec3);
get_uniform_array_string(Float4, glm::vec4);
get_uniform_array_string(Float2x2, glm::mat2);
get_uniform_array_string(Float2x3, glm::mat2x3);
get_uniform_array_string(Float2x4, glm::mat2x4);
get_uniform_array_string(Float3x3, glm::mat3);
get_uniform_array_string(Float3x2, glm::mat3x2);
get_uniform_array_string(Float3x4, glm::mat3x4);
get_uniform_array_string(Float4x4, glm::mat4);
get_uniform_array_string(Float4x2, glm::mat4x2);
get_uniform_array_string(Float4x3, glm::mat4x3);
get_uniform_array_string(GpuPtr, uint64_t);
#undef get_uniform_array_string
}
#endif //#ifdef FALCOR_GL
| [
"[email protected]"
] | |
f186d8357e2f790ab4d074c0fbf763dcf0a54fe5 | e099f3450ccb982c9fa06f6d411a3b1d99b5c8d1 | /threadPool/main.cpp | f96bc47671e4ede3bd13325481fd64003a8a75fb | [] | no_license | Request2609/summer2019 | 71d9370edd9be3d703a86695400201cee11b34ef | 2e621b2d9c7278c7f897cc1cd98ad01ea950b661 | refs/heads/master | 2022-02-18T04:08:58.495086 | 2019-09-04T15:18:45 | 2019-09-04T15:18:45 | 197,857,588 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,132 | cpp | #include"threadPool.h"
#include<iostream>
struct gfunc{
int operator()(int n) {
std::cout << n << std::endl ;
return n ;
}
int func() {
printf("hello " ) ;
return 1 ;
}
} ;
int func1(std :: string a, int b) {
std :: cout << "字符串的值为:" << a << " 整型值为:" << b << std :: endl ;
return 0 ;
}
void func(int i) {
std :: cout << "该函数返回值为void,传的参数是" << i << std :: endl ;
}
int func2(int a, int b) {
std :: cout << "有个返回值的线程池" << " int"<< std :: endl ;
return a+b ;
}
int main()
{
try {
//线程池队列正在等待
threadPool pool(10) ;
//往队列中加入任务
std :: future<void> ff = pool.commit(func, 1);
std :: future<int> ff1 = pool.commit(func2, 1,2) ;
printf("ff:") ;
ff.get();
printf("ff1:") ;
ff1.get() ;
printf("ff2:") ;
} catch(std :: exception& e) {
std :: cout << "some unhappy happened..." << std :: this_thread :: get_id() << e.what() << std :: endl ;
}
return 0;
}
| [
"[email protected]"
] | |
ffcdbdbc7c115249766f75265b4f2c4f18e8be31 | 03c6d91afa813b32aa0c0f5710c8ccc68e5d7c05 | /codeforces 981 A. Antipalindrome.cpp | 936dc12a4c519aff6727e7641d490da35511ae09 | [] | no_license | DorianBajorek/Codeforces-solutions | 96fe6c54b55681fe030f3e9015367d2176d10daf | d8e936de286342fef7230da2afbc50dd13164c93 | refs/heads/master | 2023-05-29T00:52:16.680588 | 2020-10-05T16:33:52 | 2020-10-05T16:33:52 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,982 | cpp | #include<bits/stdc++.h>
#define endl '\n'
#define time clock_t tStart = clock();
#define show printf("Time taken: %.6fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
#define ll long long int
#define loop(a,b) for(int i=a;i<=b;++i)
#define count_1(n) __builtin_popcountll(n)
#define pb push_back
#define F first
#define S second
#define mp make_pair
#define MOD 1000000007
#define itoc(c) ((char)(((int)'0')+c))
#define vi vector<int>
#define vll vector<ll>
#define pll pair<ll,ll>
#define pii pair<int,int>
#define all(p) p.begin(),p.end()
#define mid(s,e) (s+(e-s)/2)
#define tcase() ll t,n; cin>>t;n=t; while(t--)
#define iscn(num) scanf("%d",&num);
#define eb emplace_back
#define ull unsigned long long
using namespace std;
void FAST_IO();
int main()
{
//_time_
//FAST_IO();
string s;
cin>>s;
ll sz=s.size(),mx=0;
bool check=false;
for(ll i=0;i<sz;i++)
{
ll start=i,endd=sz-1;
while(endd>start)
{
for(ll j=start,k=endd;j<=(start+endd)/2;j++,k--)
{
if(s[j]!=s[k])
{
check=true;
mx=endd-start+1;
}
}
endd--;
if(check)
break;
}
if(check)
break;
}
cout<<mx<<endl;
// show
return 0;
}
void FAST_IO()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
//cout.setf(ios::fixed);
//cout.precision(20);
#ifndef _offline
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
#endif
}
| [
"[email protected]"
] | |
d11c84ecd3cdb9dcfda66f90229ac90e04134384 | 7d391a176f5b54848ebdedcda271f0bd37206274 | /src/Samples/include/babylon/samples/loaders/babylon/import_dummy3_scene.h | 511d690e2c31232654478e1ae417889385e407e6 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | pthom/BabylonCpp | c37ea256f310d4fedea1a0b44922a1379df77690 | 52b04a61467ef56f427c2bb7cfbafc21756ea915 | refs/heads/master | 2021-06-20T21:15:18.007678 | 2019-08-09T08:23:12 | 2019-08-09T08:23:12 | 183,211,708 | 2 | 0 | Apache-2.0 | 2019-04-24T11:06:28 | 2019-04-24T11:06:28 | null | UTF-8 | C++ | false | false | 709 | h | #ifndef BABYLON_SAMPLES_LOADERS_BABYLON_IMPORT_DUMMY3_SCENE_H
#define BABYLON_SAMPLES_LOADERS_BABYLON_IMPORT_DUMMY3_SCENE_H
#include <babylon/interfaces/irenderable_scene.h>
namespace BABYLON {
namespace Samples {
/**
* @brief Import Dummy 3 Scene.
* @see https://www.babylonjs-playground.com/#C38BUD#1
*/
struct ImportDummy3Scene : public IRenderableScene {
ImportDummy3Scene(ICanvas* iCanvas);
~ImportDummy3Scene() override;
const char* getName() override;
void initializeScene(ICanvas* canvas, Scene* scene) override;
}; // end of struct ImportDummy3Scene
} // end of namespace Samples
} // end of namespace BABYLON
#endif // end of BABYLON_SAMPLES_LOADERS_BABYLON_IMPORT_DUMMY3_SCENE_H
| [
"[email protected]"
] | |
acd4f7ea406fd9279c5c4ed3b92547e02b3391f8 | bd8da89a17e0056bed98aefcec38dac80fd8dd5d | /sqldata/sqldb.cpp | cd9d50acde5157cb49c9ff152eb163a614d9c718 | [
"Apache-2.0"
] | permissive | ChrisYuan/sqlines | cf89b9d171288d608d3c6ea5ad733034eb1e3505 | f82176f154a158105f655d71fb7934dd0ee1c82f | refs/heads/master | 2022-01-22T04:04:01.198352 | 2021-12-19T09:06:37 | 2021-12-19T09:06:37 | 211,207,186 | 1 | 0 | Apache-2.0 | 2019-09-27T00:56:29 | 2019-09-27T00:56:29 | null | UTF-8 | C++ | false | false | 104,260 | cpp | /**
* Copyright (c) 2016 SQLines
*
* 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.
*/
// SqlDb Database Access
#if defined(WIN32) || defined(WIN64)
#include <windows.h>
#include <process.h>
#endif
#include <stdio.h>
#include <string>
#include <list>
#include "sqldb.h"
#include "sqlociapi.h"
#include "sqlsncapi.h"
#include "sqlmysqlapi.h"
#include "sqlpgapi.h"
#include "sqlctapi.h"
#include "sqlasaapi.h"
#include "sqlifmxapi.h"
#include "sqldb2api.h"
#include "sqlodbcapi.h"
#include "sqlstdapi.h"
#include "str.h"
#include "os.h"
// Constructor
SqlDb::SqlDb()
{
source_type = 0;
target_type = 0;
source_subtype = 0;
target_subtype = 0;
_callback = NULL;
_callback_object = NULL;
_callback_rate = 3100;
_metaSqlDb = this;
_parameters = NULL;
_log = NULL;
_column_map = NULL;
_datatype_map = NULL;
_tsel_exp_map = NULL;
_tsel_exp_all = NULL;
_twhere_cond_map = NULL;
_session_id = 0;
_trace_diff_data = false;
_validation_not_equal_max_rows = -1;
_validation_datetime_fraction = -1;
_mysql_validation_collate = NULL;
}
// Destructor
SqlDb::~SqlDb()
{
delete _source_ca.db_api;
delete _target_ca.db_api;
}
// Set database configuration
int SqlDb::Init(int db_types, const char *source_conn, const char *target_conn, int *s_rc_inout, int *t_rc_inout)
{
SqlApiBase *s_db_api = NULL, *t_db_api = NULL;
int s_rc = 0;
int t_rc = 0;
// Set static initialization results
if(s_rc_inout != NULL)
s_rc = *s_rc_inout;
if(t_rc_inout != NULL)
t_rc = *t_rc_inout;
// Create database API object for source database
if(s_rc == 0)
s_db_api = CreateDatabaseApi(source_conn, &source_type);
// Create database API object for target database
if(t_rc == 0 && db_types != SQLDB_SOURCE_ONLY)
t_db_api = CreateDatabaseApi(target_conn, &target_type);
// Initialize the source database API (do not exit in case of error, allow initializing the target API)
if(s_db_api != NULL)
{
s_db_api->SetTargetApiProvider(t_db_api);
s_rc = InitCa(&_source_ca, s_db_api);
if(s_rc_inout != NULL)
*s_rc_inout = s_rc;
}
else
{
if(s_rc == 0)
strcpy(_source_ca.native_error_text, "Source database type is unknown");
s_rc = -1;
if(s_rc_inout != NULL)
*s_rc_inout = -1;
}
// Initialize the source database API
if(t_db_api != NULL)
{
t_db_api->SetSourceApiProvider(s_db_api);
t_rc = InitCa(&_target_ca, t_db_api);
if(t_rc_inout != NULL)
*t_rc_inout = t_rc;
}
else
{
if(t_rc == 0)
strcpy(_target_ca.native_error_text, "Target database type is unknown");
t_rc = -1;
if(t_rc_inout != NULL)
*t_rc_inout = -1;
}
if(s_rc == -1 || t_rc == -1)
return -1;
return 0;
}
// Perform static initialization of the API libraries
int SqlDb::InitStatic(int db_types, const char *source_conn, const char *target_conn, int *s_rc_out, int *t_rc_out)
{
std::string error_text;
int s_rc = InitStaticApi(source_conn, error_text);
if(s_rc == -1)
{
_source_ca.cmd_rc = (short)s_rc;
strcpy(_source_ca.native_error_text, error_text.c_str());
}
if(s_rc_out != NULL)
*s_rc_out = s_rc;
// Source database is only initialized
if(db_types == SQLDB_SOURCE_ONLY)
return s_rc;
error_text.clear();
int t_rc = InitStaticApi(target_conn, error_text);
if(t_rc == -1)
{
_target_ca.cmd_rc = (short)t_rc;
strcpy(_target_ca.native_error_text, error_text.c_str());
}
if(t_rc_out != NULL)
*t_rc_out = t_rc;
if(s_rc == -1 || t_rc == -1)
return -1;
return 0;
}
// Initialize database API once per process
int SqlDb::InitStaticApi(const char *conn, std::string &error)
{
if(conn == NULL)
return -1;
int rc = 0;
const char *cur = Str::SkipSpaces(conn);
// Initialize MySQL C API
if(_strnicmp(cur, "mysql", 5) == 0 || _strnicmp(cur, "mariadb", 7) == 0)
{
SqlMysqlApi mysqlApi;
mysqlApi.SetParameters(_parameters);
mysqlApi.SetAppLog(_log);
const char *conn = strchr(cur, ',');
if(conn != NULL)
{
conn = Str::SkipSpaces(conn + 1);
mysqlApi.SetConnectionString(conn);
}
if(_strnicmp(cur, "mariadb", 7) == 0)
mysqlApi.SetSubType(SQLDATA_SUBTYPE_MARIADB);
rc = mysqlApi.InitStatic();
if(rc == -1)
error = mysqlApi.GetNativeErrorText();
}
// If API does not support static initialization 0 must be returned
return rc;
}
// Create database API object for source database
SqlApiBase* SqlDb::CreateDatabaseApi(const char *conn, short *type)
{
if(conn == NULL)
return NULL;
SqlApiBase *db_api = NULL;
const char *cur = Str::SkipSpaces(conn);
// Check for Oracle OCI
if(_strnicmp(cur, "oracle", 6) == 0)
{
db_api = new SqlOciApi();
cur += 6;
if(type != NULL)
*type = SQLDATA_ORACLE;
}
else
// Check for SQL Server Native Client
if(_strnicmp(cur, "sql", 3) == 0)
{
db_api = new SqlSncApi();
cur += 3;
if(type != NULL)
*type = SQLDATA_SQL_SERVER;
}
else
// Check for MySQL C API
if(_strnicmp(cur, "mysql", 5) == 0)
{
db_api = new SqlMysqlApi();
cur += 5;
if(type != NULL)
*type = SQLDATA_MYSQL;
}
else
// Check for MariaDB C API
if(_strnicmp(cur, "mariadb", 7) == 0)
{
db_api = new SqlMysqlApi();
db_api->SetSubType(SQLDATA_SUBTYPE_MARIADB);
cur += 7;
if(type != NULL)
*type = SQLDATA_MYSQL;
}
else
// Check for PostgreSQL libpq C library
if(_strnicmp(cur, "pg", 2) == 0)
{
db_api = new SqlPgApi();
cur += 2;
if(type != NULL)
*type = SQLDATA_POSTGRESQL;
}
else
// Check for Sybase Client library
if(_strnicmp(cur, "sybase", 6) == 0)
{
db_api = new SqlCtApi();
cur += 6;
if(type != NULL)
*type = SQLDATA_SYBASE;
}
#if defined(WIN32) || defined(_WIN64)
else
// Sybase SQL Anywhere ODBC driver
if(_strnicmp(cur, "asa", 3) == 0)
{
db_api = new SqlAsaApi();
cur += 3;
if(type != NULL)
*type = SQLDATA_ASA;
}
#endif
else
// Check for Informix library
if(_strnicmp(cur, "informix", 8) == 0)
{
db_api = new SqlIfmxApi();
cur += 8;
if(type != NULL)
*type = SQLDATA_INFORMIX;
}
else
// Check for DB2 library
if(_strnicmp(cur, "db2", 3) == 0)
{
db_api = new SqlDb2Api();
cur += 3;
if(type != NULL)
*type = SQLDATA_DB2;
}
#if defined(WIN32) || defined(_WIN64)
else
// Check for ODBC
if(_strnicmp(cur, "odbc", 4) == 0)
{
db_api = new SqlOdbcApi();
cur += 4;
if(type != NULL)
*type = SQLDATA_ODBC;
}
#endif
else
// Check for Standard Output
if(_strnicmp(cur, "stdout", 6) == 0)
{
db_api = new SqlStdApi();
cur += 6;
if(type != NULL)
*type = SQLDATA_STDOUT;
}
cur = Str::SkipSpaces(cur);
// Check driver type information
if(*cur == ':')
{
cur++;
db_api->SetDriverType(cur);
cur = Str::SkipUntil(cur, ',');
}
cur = Str::SkipSpaces(cur);
// Skip comma after database type
if(*cur == ',')
cur++;
cur = Str::SkipSpaces(cur);
// Set the connection string and parameters in the API object
if(db_api != NULL)
{
db_api->SetConnectionString(cur);
db_api->SetParameters(_parameters);
db_api->SetAppLog(_log);
}
return db_api;
}
// Initialize database API
int SqlDb::InitCa(SqlDbThreadCa *ca, SqlApiBase *db_api)
{
if(db_api == NULL)
return -1;
ca->sqlDb = this;
ca->db_api = db_api;
// Initialize the database API library
int rc = ca->db_api->Init();
if(rc == -1)
{
ca->cmd_rc = (short)rc;
strcpy(ca->native_error_text, ca->db_api->GetNativeErrorText());
return rc;
}
// Create synchronization objects
#if defined(WIN32) || defined(_WIN64)
ca->_wait_event = CreateEvent(NULL, FALSE, FALSE, NULL);
ca->_completed_event = CreateEvent(NULL, FALSE, FALSE, NULL);
#else
Os::CreateEvent(&ca->_wait_event);
Os::CreateEvent(&ca->_completed_event);
#endif
// Start a thread to handle requests for the database
#if defined(WIN32) || defined(_WIN64)
_beginthreadex(NULL, 0, &SqlDb::StartWorkerS, ca, 0, NULL);
#else
pthread_t thread;
pthread_create(&thread, NULL, &SqlDb::StartWorkerS, ca);
#endif
return 0;
}
// Connect to databases
int SqlDb::Connect(int db_types, SqlDataReply &reply, int *s_rc_in, int *t_rc_in)
{
size_t start = Os::GetTickCount();
int rc = 0;
int s_rc = 0;
int t_rc = 0;
// Set initialization results
if(s_rc_in != NULL)
s_rc = *s_rc_in;
if(t_rc_in != NULL)
t_rc = *t_rc_in;
// Connect to both databases (both were initialized successfully)
if(db_types == SQLDB_BOTH && s_rc == 0 && t_rc == 0)
{
rc = Execute(SQLDATA_CMD_CONNECT);
}
else
// Connect to source only
if(db_types == SQLDB_SOURCE_ONLY || (db_types == SQLDB_BOTH && s_rc == 0))
{
if(_source_ca.db_api != NULL)
{
s_rc = _source_ca.db_api->Connect(&_source_ca._time_spent);
if(s_rc == -1)
_source_ca.error = _source_ca.db_api->GetError();
}
}
else
// Connect to target only
if(db_types == SQLDB_SOURCE_ONLY || (db_types == SQLDB_BOTH && t_rc == 0))
{
if(_target_ca.db_api != NULL)
{
t_rc = _target_ca.db_api->Connect(&_target_ca._time_spent);
if(t_rc == -1)
_target_ca.error = _target_ca.db_api->GetError();
}
}
if(s_rc == -1 || t_rc == -1)
rc = -1;
source_subtype = GetSubType(SQLDB_SOURCE_ONLY);
target_subtype = GetSubType(SQLDB_TARGET_ONLY);
// Set results
reply._cmd_subtype = SQLDATA_CMD_CONNECT;
reply.rc = rc;
reply._s_rc = _source_ca.cmd_rc;
reply._t_rc = _target_ca.cmd_rc;
// Versions
if(_source_ca.db_api != NULL)
strcpy(reply._s_name, _source_ca.db_api->GetVersion().c_str());
if(_target_ca.db_api != NULL)
strcpy(reply._t_name, _target_ca.db_api->GetVersion().c_str());
reply.s_error = _source_ca.error;
reply.t_error = _target_ca.error;
reply._time_spent = GetTickCount() - start;
reply._s_time_spent = _source_ca._time_spent;
reply._t_time_spent = _target_ca._time_spent;
if(reply.s_error == -1 && _source_ca.db_api != NULL)
strcpy(reply.s_native_error_text, _source_ca.db_api->GetNativeErrorText());
if(reply.t_error == -1 && _target_ca.db_api != NULL)
strcpy(reply.t_native_error_text, _target_ca.db_api->GetNativeErrorText());
return rc;
}
// Test connection
int SqlDb::TestConnection(std::string &conn, std::string &error, std::string &loaded_path,
std::list<std::string> &search_paths, size_t *time_spent)
{
size_t start = Os::GetTickCount();
// Create database API
SqlApiBase *api = CreateDatabaseApi(conn.c_str(), NULL);
if(api == NULL)
{
error = "Unknown database API";
return -1;
}
// Initialize the database API library for process
int rc = InitStaticApi(conn.c_str(), error);
if(rc == 0)
{
// Initialize the database API library
rc = api->Init();
api->GetDriverPaths(search_paths);
loaded_path = api->GetLoadedDriver();
if(rc == -1)
{
error = api->GetNativeErrorText();
delete api;
if(time_spent != NULL)
*time_spent = Os::GetTickCount() - start;
return -1;
}
}
// Try to connect
if(rc == 0)
{
rc = api->Connect(NULL);
if(rc == -1)
error = api->GetNativeErrorText();
api->Disconnect();
api->Deallocate();
}
delete api;
if(time_spent != NULL)
*time_spent = Os::GetTickCount() - start;
return rc;
}
// Get the list of available tables
int SqlDb::GetAvailableTables(int db_types, std::string &table_template, std::string &exclude,
std::list<std::string> &tables)
{
if(_source_ca.db_api == NULL)
return -1;
int rc = 0;
if(db_types == SQLDB_SOURCE_ONLY)
rc = _source_ca.db_api->GetAvailableTables(table_template, exclude, tables);
return rc;
}
// Read schema information
int SqlDb::ReadSchema(int db_types, std::string &select, std::string &exclude, bool read_cns, bool read_idx)
{
int rc = 0;
// Read source and target schemas
if(db_types == SQLDB_BOTH && _source_ca.db_api != NULL && _target_ca.db_api != NULL)
{
if(target_type == SQLDATA_ORACLE)
{
_source_ca._void1 = (void*)select.c_str();
_target_ca._void1 = (void*)select.c_str();
_source_ca._void2 = (void*)exclude.c_str();
_target_ca._void2 = (void*)exclude.c_str();
rc = Execute(SQLDATA_CMD_READ_SCHEMA, SQLDATA_CMD_READ_SCHEMA_FOR_TRANSFER_TO);
}
else
rc = _source_ca.db_api->ReadSchema(select.c_str(), exclude.c_str(), read_cns, read_idx);
}
else
// Read the source schema only
if(db_types == SQLDB_SOURCE_ONLY && _source_ca.db_api != NULL)
rc = _source_ca.db_api->ReadSchema(select.c_str(), exclude.c_str(), read_cns, read_idx);
return rc;
}
// Read non-table objects
int SqlDb::ReadObjects(int db_types, std::string &select, std::string &exclude)
{
int rc = 0;
// Read the source schema only
if(db_types == SQLDB_SOURCE_ONLY && _source_ca.db_api != NULL)
rc = _source_ca.db_api->ReadObjects(select.c_str(), exclude.c_str());
return rc;
}
// Read table name by constraint name
int SqlDb::ReadConstraintTable(int /*db_types*/, const char *schema, const char *constraint, std::string &table)
{
if(_source_ca.db_api == NULL)
return -1;
int rc = _source_ca.db_api->ReadConstraintTable(schema, constraint, table);
return rc;
}
// Read columns of the specified constraint name
int SqlDb::ReadConstraintColumns(int /*db_types*/, const char *schema, const char *table, const char *constraint, std::string &cols)
{
if(_source_ca.db_api == NULL)
return -1;
int rc = _source_ca.db_api->ReadConstraintColumns(schema, table, constraint, cols);
return rc;
}
// Check if identity column defined for the table
bool SqlDb::IsIdentityDefined(int /*db_types*/, std::string &schema, std::string &table)
{
if(_source_ca.db_api == NULL)
return false;
return _source_ca.db_api->IsIdentityDefined(schema, table);
}
// Read columns for the specified PRIMARY and UNIQUE key constraint
int SqlDb::GetKeyConstraintColumns(int /*db_types*/, SqlConstraints &cns, std::list<std::string> &key_cols)
{
if(_source_ca.db_api == NULL)
return -1;
int rc = _source_ca.db_api->GetKeyConstraintColumns(cns, key_cols);
return rc;
}
// Get columns for the specified FOREIGN key constraint
int SqlDb::GetForeignKeyConstraintColumns(int /*db_types*/, SqlConstraints &cns, std::list<std::string> &fcols,
std::list<std::string> &pcols, std::string &ptable)
{
if(_source_ca.db_api == NULL)
return -1;
int rc = _source_ca.db_api->GetForeignKeyConstraintColumns(cns, fcols, pcols, ptable);
return rc;
}
// Get column list for the specified index
int SqlDb::GetIndexColumns(int /*db_types*/, SqlIndexes &idx, std::list<std::string> &idx_cols, std::list<std::string> &idx_sorts)
{
if(_source_ca.db_api == NULL)
return -1;
return _source_ca.db_api->GetIndexColumns(idx, idx_cols, idx_sorts);
}
// Get information on table columns
std::list<SqlColMeta>* SqlDb::GetTableColumns(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetTableColumns();
}
// Get information on table constraints
std::list<SqlConstraints>* SqlDb::GetTableConstraints(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetTableConstraints();
}
// Get information about constraint columns
std::list<SqlConsColumns>* SqlDb::GetConstraintColumns(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetConstraintColumns();
}
std::list<SqlComments>* SqlDb::GetTableComments(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetTableComments();
}
std::list<SqlIndexes>* SqlDb::GetTableIndexes(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetTableIndexes();
}
std::list<SqlIndColumns>* SqlDb::GetIndexColumns(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetIndexColumns();
}
std::list<SqlIndExp>* SqlDb::GetIndexExpressions(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetIndexExpressions();
}
// Get sequences
std::list<SqlSequences>* SqlDb::GetSequences(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetSequences();
}
// Get stored procedures
std::list<SqlObjMeta>* SqlDb::GetProcedures(int /*db_type*/)
{
if(_source_ca.db_api == NULL)
return NULL;
return _source_ca.db_api->GetProcedures();
}
// Transfer table rows
int SqlDb::TransferRows(SqlDataReply &reply, int options, bool create_tables, bool data)
{
if(_source_ca.db_api == NULL || _target_ca.db_api == NULL)
return -1;
// Notify that a table was selected for processing
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_STARTED;
_callback(_callback_object, &reply);
}
size_t start = GetTickCount(), now = start, prev_update = start;
std::string select, t_select;
// SELECT query
if(reply.s_sql_l.empty())
{
if(_metaSqlDb != NULL)
_metaSqlDb->BuildQuery(select, t_select, reply._s_name, reply._t_name, true);
}
else
select = reply.s_sql_l;
size_t col_count = 0, allocated_array_rows = 0;
int rows_fetched = 0, rows_written = 0;
int all_rows_read = 0, all_rows_written = 0;
size_t bytes_written = 0;
__int64 all_bytes_written = 0;
size_t time_read = 0, all_time_read = 0;
size_t time_write = 0, all_time_write = 0;
SqlCol *s_cols = NULL, *s_cols_copy = NULL, *cur_cols = NULL, *t_cols = NULL;
bool no_more_data = false;
size_t buffer_rows = 0;
// Fetch only one row to get cursor definition when no data transferred
if(!data)
buffer_rows = 1;
// Open cursor allocating 10M buffer
int rc = _source_ca.db_api->OpenCursor(select.c_str(), buffer_rows, 1024*1024*32, &col_count, &allocated_array_rows,
&rows_fetched, &s_cols, &time_read, false, _datatype_map);
if(rc != -1)
{
all_rows_read += rows_fetched;
all_time_read += time_read;
}
// Notify on opening cursor
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_OPEN_CURSOR;
reply.rc = rc;
reply._s_int1 = all_rows_read;
reply._s_int2 = (int)time_read;
// There can be warnings (rc = 1) such as truncation error, get exact message
if(rc != 0)
{
reply.s_error = _source_ca.db_api->GetError();
strcpy(reply.s_native_error_text, _source_ca.db_api->GetNativeErrorText());
}
// In case of error, callback will be called on completion
if(rc != -1)
_callback(_callback_object, &reply);
}
if(rc == -1)
return -1;
// Check if we can read and write in parallel for this table
bool parallel_read_write = _source_ca.db_api->CanParallelReadWrite();
// Check whether target bound the source buffers, so the same buffers must be passed to TransferRows
bool data_bound = _target_ca.db_api->IsDataBufferBound();
// Oracle OCI returns 100, ODBC 0 when rows are less than allocated array
if(rc == 100 || rows_fetched < allocated_array_rows)
no_more_data = true;
cur_cols = s_cols;
// Allocate a copy of column buffer if data were not fetched in one iteration
if(no_more_data == false && parallel_read_write == true)
{
CopyColumns(s_cols, &s_cols_copy, col_count, allocated_array_rows);
cur_cols = s_cols_copy;
}
bool ddl_error = false;
// Check whether we need to drop, create or truncate the table
if(create_tables && options != 0)
{
rc = PrepareTransfer(s_cols, reply._s_name, reply._t_name, col_count, options, reply);
if(rc == -1)
{
reply._cmd_subtype = SQLDATA_CMD_DUMP_DDL;
reply.rc = rc;
reply.data = s_cols;
reply._int1 = (int)col_count;
if(_callback != NULL)
_callback(_callback_object, &reply);
reply.data = NULL;
reply._int1 = 0;
// Notify on transfer completion with DDL error (call back will be called in the caller)
reply._cmd_subtype = SQLDATA_CMD_COMPLETE_WITH_DDL_ERROR;
reply.rc = rc;
ddl_error = true;
}
}
bool bulk_init = false;
// Initialize the bulk insert in the target database
if(data && rc != -1 && rows_fetched != 0)
{
rc = _target_ca.db_api->InitBulkTransfer(reply._t_name, col_count, allocated_array_rows, cur_cols, &t_cols);
bulk_init = true;
}
while(data && rc != -1)
{
// Only one fetch, or the last fetch
if(no_more_data == true)
{
// Sybase CT-lib and ODBC return NO DATA after all rows fetched so check for number of rows
if(rows_fetched != 0)
{
// Copy buffer if it is non-single fetch and source data buffer is bound
if(s_cols_copy != NULL && data_bound == true)
CopyColumnData(s_cols, s_cols_copy, col_count, rows_fetched);
// Do not copy, use source buffers
else
cur_cols = s_cols;
// Insert last portion of rows
rc = _target_ca.db_api->TransferRows(cur_cols, rows_fetched, &rows_written, &bytes_written,
&time_write);
if(rc == 0)
{
all_rows_written += rows_written;
all_bytes_written += bytes_written;
all_time_write += time_write;
}
}
break;
}
else
// Parallel read/write is not allowed
if(parallel_read_write == false)
{
// Insert the current row
rc = _target_ca.db_api->TransferRows(cur_cols, rows_fetched, &rows_written, &bytes_written,
&time_write);
if(rc == -1)
break;
// Get next row
rc = _source_ca.db_api->Fetch(&rows_fetched, &time_read);
}
// Use concurrent threads
else
{
// Copy data
CopyColumnData(s_cols, s_cols_copy, col_count, rows_fetched);
cur_cols = s_cols_copy;
// Prepare insert command
_target_ca._int2 = rows_fetched;
_target_ca._void1 = cur_cols;
// Fetch the next set of data, and insert the current set in 2 concurrent threads
rc = Execute(SQLDATA_CMD_FETCH_NEXT, SQLDATA_CMD_INSERT_NEXT);
if(rc == -1)
break;
rows_fetched = _source_ca._int1;
time_read = (size_t)_source_ca._int4;
rows_written = _target_ca._int1;
bytes_written = (size_t)_target_ca._int3;
time_write = (size_t)_target_ca._int4;
}
all_rows_read += rows_fetched;
all_time_read += time_read;
all_rows_written += rows_written;
all_bytes_written += bytes_written;
all_time_write += time_write;
now = GetTickCount();
// Notify on transfer in progress every callback_rate milliseconds
if(_callback != NULL && (now - prev_update >= _callback_rate))
{
reply._cmd_subtype = SQLDATA_CMD_IN_PROGRESS;
reply.rc = 0;
reply._int1 = (int)(now - start);
reply._s_int1 = all_rows_read;
reply._s_int2 = (int)all_time_read;
reply._t_int1 = (int)all_rows_written;
reply._t_int2 = (int)all_time_write;
reply._t_bigint1 = all_bytes_written;
_callback(_callback_object, &reply);
prev_update = now;
}
// it was the last fetch
if(rc == 100 || rows_fetched < allocated_array_rows)
no_more_data = true;
}
// Complete transfer
if(bulk_init == true)
{
int close_rc = _target_ca.db_api->CloseBulkTransfer();
if(close_rc == -1)
{
rc = -1;
reply._t_rc = -1;
}
}
// Close the source database cursor
_source_ca.db_api->CloseCursor();
// Delete the copy buffer
if(s_cols_copy != NULL)
{
for(int i = 0; i < col_count; i++)
{
delete [] s_cols_copy[i]._data;
delete [] s_cols_copy[i]._ind2;
delete [] s_cols_copy[i]._len_ind2;
}
delete [] s_cols_copy;
}
// Notify on transfer completion (call back will be called in the caller)
if(data && ddl_error == false)
{
reply._cmd_subtype = SQLDATA_CMD_COMPLETE;
reply.rc = rc;
reply._int1 = (int)(GetTickCount() - start);
reply._s_int1 = all_rows_read;
reply._s_int2 = (int)all_time_read;
reply._t_int1 = all_rows_written;
reply._t_int2 = (int)all_time_write;
reply._t_bigint1 = all_bytes_written;
// Set error information in case of a failure
if(rc == -1)
{
reply.s_error = _source_ca.db_api->GetError();
reply.t_error = _target_ca.db_api->GetError();
strcpy(reply.s_native_error_text, _source_ca.db_api->GetNativeErrorText());
strcpy(reply.t_native_error_text, _target_ca.db_api->GetNativeErrorText());
}
}
// Notify that the data transfer was skipped
if(!data)
{
reply._cmd_subtype = SQLDATA_CMD_SKIPPED;
reply.rc = 0;
}
return (rc == 100) ? 0 : rc;
}
// Assess table rows
int SqlDb::AssessRows(SqlDataReply &reply)
{
if(_source_ca.db_api == NULL)
return -1;
// Notify that a table was selected for processing
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_STARTED;
_callback(_callback_object, &reply);
}
size_t start = GetTickCount(), now = start, prev_update = start;
std::string select, t_select;
// SELECT query
if(_metaSqlDb != NULL)
_metaSqlDb->BuildQuery(select, t_select, reply._s_name, reply._t_name, true);
//select = "select well_te from afmss.well_remarks where well_rmks_id=100827";
size_t col_count = 0, allocated_array_rows = 0;
int rows_fetched = 0;
int all_rows_read = 0;
__int64 all_bytes_read = 0;
size_t time_read = 0, all_time_read = 0;
SqlCol *s_cols = NULL;
bool no_more_data = false;
// Open cursor allocating 10M buffer
int rc = _source_ca.db_api->OpenCursor(select.c_str(), 0, 1024*1024*10, &col_count, &allocated_array_rows,
&rows_fetched, &s_cols, &time_read);
if(rc != -1)
{
all_rows_read += rows_fetched;
all_time_read += time_read;
}
// Notify on opening cursor
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_OPEN_CURSOR;
reply.rc = rc;
reply._s_int1 = all_rows_read;
reply._s_int2 = (int)time_read;
// There can be warnings (rc = 1) such as truncation error, get exact message
if(rc != 0)
{
reply.s_error = _source_ca.db_api->GetError();
strcpy(reply.s_native_error_text, _source_ca.db_api->GetNativeErrorText());
}
// In case of error, callback will be called on completion
if(rc != -1)
_callback(_callback_object, &reply);
}
if(rc == -1)
return -1;
// Oracle OCI returns 100, ODBC 0 when rows are less than allocated array
if(rc == 100 || rows_fetched < allocated_array_rows)
no_more_data = true;
while(rc != -1)
{
// Prepare buffers and calculate data size
for(int i = 0; i < rows_fetched; i++)
{
for(int k = 0; k < col_count; k++)
{
if(source_type == SQLDATA_DB2 || source_type == SQLDATA_SQL_SERVER ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_MYSQL ||
source_type == SQLDATA_ASA)
{
if(s_cols[k].ind != NULL && s_cols[k].ind[i] != -1)
{
// Source indicator can contain value larger than fetch size in case if data truncated
// warning risen (Informix when LOB fecthed as VARCHAR)
if(s_cols[k].ind[i] > s_cols[k]._fetch_len)
all_bytes_read += s_cols[k]._fetch_len;
else
all_bytes_read += s_cols[k].ind[i];
}
}
}
}
if(no_more_data == true)
break;
// Get next rows
rc = _source_ca.db_api->Fetch(&rows_fetched, &time_read);
all_rows_read += rows_fetched;
all_time_read += time_read;
now = GetTickCount();
// Notify on assessment in progress every callback_rate milliseconds
if(_callback != NULL && (now - prev_update >= _callback_rate))
{
reply._cmd_subtype = SQLDATA_CMD_IN_PROGRESS;
reply.rc = 0;
reply._int1 = (int)(now - start);
reply._s_int1 = all_rows_read;
reply._s_int2 = (int)all_time_read;
reply._s_bigint1 = all_bytes_read;
_callback(_callback_object, &reply);
prev_update = now;
}
// Last fetch in ODBC-like interface, no new data in buffer
if(rc == 100 && rows_fetched == 0)
break;
// it was the last fetch
if(rc == 100 || rows_fetched < allocated_array_rows)
no_more_data = true;
}
// Close the source database cursor
_source_ca.db_api->CloseCursor();
reply._cmd_subtype = SQLDATA_CMD_COMPLETE;
reply.rc = rc;
reply._int1 = (int)(GetTickCount() - start);
reply._s_int1 = all_rows_read;
reply._s_int2 = (int)all_time_read;
reply._s_bigint1 = all_bytes_read;
// Set error information in case of a failure
if(rc == -1)
{
reply.s_error = _source_ca.db_api->GetError();
strcpy(reply.s_native_error_text, _source_ca.db_api->GetNativeErrorText());
}
return (rc == 100) ? 0 : rc;
}
// Check whether we need to drop, create or truncate the table
int SqlDb::PrepareTransfer(SqlCol *s_cols, const char *s_table, const char *t_table, size_t col_count, int options, SqlDataReply &reply)
{
if(s_table == NULL || t_table == NULL || _target_ca.db_api == NULL || s_cols == NULL)
return -1;
int rc = 0;
size_t time_spent = 0;
// Check for necessity to DROP existing table
if(options & SQLDATA_OPT_DROP)
{
std::string drop_stmt;
rc = _target_ca.db_api->DropTable(t_table, &time_spent, drop_stmt);
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_DROP;
reply.rc = rc;
reply._int1 = (int)time_spent;
reply.t_sql = drop_stmt.c_str();
if(rc != 0)
{
reply.t_error = _target_ca.db_api->GetError();
strcpy(reply.t_native_error_text, _target_ca.db_api->GetNativeErrorText());
}
_callback(_callback_object, &reply);
}
// If failed with the error other than table does not exist, then exit
if(rc == -1 && reply.t_error != SQL_DBAPI_NOT_EXISTS_ERROR)
return rc;
}
// Check truncate command
if(options & SQLDATA_OPT_TRUNCATE)
{
std::string command = "TRUNCATE TABLE ";
command += t_table;
rc = _target_ca.db_api->ExecuteNonQuery(command.c_str(), &time_spent);
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_TRUNCATE;
reply.rc = rc;
reply._int1 = (int)time_spent;
reply.t_sql = command.c_str();
if(rc != 0)
{
reply.t_error = _target_ca.db_api->GetError();
strcpy(reply.t_native_error_text, _target_ca.db_api->GetNativeErrorText());
}
_callback(_callback_object, &reply);
}
}
// Check for necessity to create table
if(options & SQLDATA_OPT_CREATE)
{
std::string command;
// Generate SQL CREATE TABLE statement
GenerateCreateTable(s_cols, s_table, t_table, (int)col_count, command);
rc = _target_ca.db_api->ExecuteNonQuery(command.c_str(), &time_spent);
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_CREATE;
reply.rc = rc;
reply._int1 = (int)time_spent;
reply.t_sql = command.c_str();
if(rc != 0)
{
reply.t_error = _target_ca.db_api->GetError();
strcpy(reply.t_native_error_text, _target_ca.db_api->GetNativeErrorText());
}
_callback(_callback_object, &reply);
}
}
return rc;
}
// Generate SQL CREATE TABLE statement
int SqlDb::GenerateCreateTable(SqlCol *s_cols, const char *s_table, const char *t_table, int col_count, std::string &sql)
{
if(s_table == NULL || t_table == NULL || s_cols == NULL)
return -1;
sql = "CREATE TABLE ";
sql += t_table;
sql += "\n(\n ";
char int1[12], int2[12];
for(int i = 0; i < col_count; i++)
{
if(i > 0)
sql += ",\n ";
std::string colname;
std::string coltype;
// Get the target column name
MapColumn(s_table, s_cols[i]._name, colname, coltype);
sql += colname;
sql += ' ';
strcpy(s_cols[i]._t_name, colname.c_str());
// Set data type from global data type mapping
if(coltype.empty() == true && s_cols[i]._t_datatype_name.empty() == false)
coltype = s_cols[i]._t_datatype_name;
std::string identity_clause;
// Get IDENTITY clause to be added to column definition, it may affect the target data type conversion
GetInlineIdentityClause(s_table, s_cols[i]._name, identity_clause);
// Data type is set by the column name mapping
if(coltype.empty() == false)
sql += coltype;
else
// Oracle VARCHAR2 (SQLT_CHR) ODBC SQL_VARCHAR
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_CHR) ||
// Sybase ASE CHAR and VARCHAR (CS_CHAR_TYPE for VARCHAR <= 255, and CS_LONGCHAR_TYPE for VARCHAR < 32K)
(source_type == SQLDATA_SYBASE && (s_cols[i]._native_dt == CS_CHAR_TYPE || s_cols[i]._native_dt == CS_LONGCHAR_TYPE)) ||
// MySQL VARCHAR
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_VAR_STRING) ||
// SQL Server, DB2, Informix, Sybase ASA VARCHAR
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA || source_type == SQLDATA_ODBC)
&& s_cols[i]._native_dt == SQL_VARCHAR))
{
Str::IntToString((int)s_cols[i]._len, int1);
// VARCHAR2 or CLOB in Oracle
if(target_type == SQLDATA_SQL_SERVER)
{
if(s_cols[i]._len <= 8000)
{
sql += "VARCHAR(";
sql += int1;
sql += ")";
}
else
sql += "VARCHAR(max)";
}
else
// VARCHAR2 or CLOB in Oracle
if(target_type == SQLDATA_ORACLE)
{
if(s_cols[i]._len <= 4000)
{
sql += "VARCHAR2(";
sql += int1;
sql += " CHAR)";
}
else
sql += "CLOB";
}
else
if(target_type == SQLDATA_MYSQL)
{
// Can be SQL Server VARCHAR(max), so check the length
if(s_cols[i]._len <= 8000)
{
sql += "VARCHAR(";
sql += int1;
sql += ")";
}
else
sql += "LONGTEXT";
}
else
if(target_type == SQLDATA_POSTGRESQL)
{
sql += "TEXT";
}
else
{
sql += "VARCHAR(";
sql += int1;
sql += ")";
}
}
else
// Oracle CHAR
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_AFC) ||
// SQL Server CHAR
(source_type == SQLDATA_SQL_SERVER && s_cols[i]._native_dt == SQL_CHAR) ||
// Informix CHAR
(source_type == SQLDATA_INFORMIX && s_cols[i]._native_dt == SQL_CHAR) ||
// DB2 CHAR
(source_type == SQLDATA_DB2 && s_cols[i]._native_dt == SQL_CHAR) ||
// ODBC CHAR
(source_type == SQLDATA_ODBC && s_cols[i]._native_dt == SQL_CHAR) ||
// MySQL CHAR
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_STRING))
{
int len = (int)s_cols[i]._len;
Str::IntToString(len, int1);
// MySQL allows zero length for CHAR columns
if(len == 0 && target_type != SQLDATA_MYSQL)
len = 1;
// MySQL allows max size 255 for CHAR
if(target_type == SQLDATA_MYSQL)
{
if(s_cols[i]._len <= 255)
{
sql += "CHAR(";
sql += int1;
sql += ")";
}
else
sql += "TEXT";
}
else
// SQL Server allows max size 8000 for CHAR (while Informix allows 32,767)
if(target_type == SQLDATA_SQL_SERVER)
{
if(s_cols[i]._len <= 8000)
{
sql += "CHAR(";
sql += int1;
sql += ")";
}
else
sql += "VARCHAR(max)";
}
else
{
sql += "CHAR(";
sql += int1;
// Add CHAR length semantic for Oracle as many databases specify size in characters,
// while BYTE is default in Oracle
if(target_type == SQLDATA_ORACLE)
sql += " CHAR";
sql += ")";
}
}
else
// SQL Server, Sybase ASA NCHAR
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_WCHAR) ||
// DB2 GRAPHIC with code -95
(source_type == SQLDATA_DB2 && s_cols[i]._native_dt == -95))
{
// Length in characters for source Sybase ASA
int len = (int)s_cols[i]._len;
Str::IntToString((int)s_cols[i]._len, int1);
// NCHAR in SQL Server
if(target_type == SQLDATA_SQL_SERVER)
{
if(len <= 4000)
{
sql += "NCHAR(";
sql += int1;
sql += ")";
}
else
sql += "NVARCHAR(max)";
}
else
// MySQL allows max size 255 for NCHAR
if(target_type == SQLDATA_MYSQL)
{
if(s_cols[i]._len <= 255)
{
sql += "NCHAR(";
sql += int1;
sql += ")";
}
else
sql += "TEXT";
}
else
if(target_type == SQLDATA_POSTGRESQL)
{
sql += "TEXT";
}
else
{
sql += "NCHAR(";
sql += int1;
sql += ")";
}
}
else
// SQL Server, Sybase ASA NVARCHAR
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_WVARCHAR) ||
// DB2 VARGRAPHIC with code -96
(source_type == SQLDATA_DB2 && s_cols[i]._native_dt == -96))
{
// Length in characters for source Sybase ASA
int len = (int)s_cols[i]._len;
Str::IntToString((int)s_cols[i]._len, int1);
if(target_type == SQLDATA_ORACLE)
{
sql += "NVARCHAR2(";
sql += int1;
sql += ")";
}
else
// NVARCHAR in SQL Server
if(target_type == SQLDATA_SQL_SERVER)
{
if(len <= 4000)
{
sql += "NVARCHAR(";
sql += int1;
sql += ")";
}
else
sql += "NVARCHAR(max)";
}
else
if(target_type == SQLDATA_MYSQL)
{
// Can be SQL Server NVARCHAR(max), so check the length
if(s_cols[i]._len <= 4000)
{
sql += "NVARCHAR(";
sql += int1;
sql += ")";
}
else
sql += "LONGTEXT";
}
else
if(target_type == SQLDATA_POSTGRESQL)
{
sql += "TEXT";
}
else
{
sql += "NVARCHAR(";
sql += int1;
sql += ")";
}
}
else
// Oracle NUMBER as INTEGER
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_NUM && s_cols[i]._precision != 0 &&
s_cols[i]._precision < 10 && s_cols[i]._scale == 0) ||
// Oracle NUMBER as INTEGER through ODBC
(source_type == SQLDATA_ODBC && source_subtype == SQLDATA_ORACLE && s_cols[i]._native_dt == SQL_DECIMAL &&
s_cols[i]._precision < 10 && s_cols[i]._scale == 0) ||
// SQL Server, DB2, Informix, Sybase ASA INTEGER
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA)
&& s_cols[i]._native_dt == SQL_INTEGER) ||
// Sybase ASE INT
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_INT_TYPE) ||
// MySQL INT
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_LONG))
{
if(target_type != SQLDATA_ORACLE)
sql += "INTEGER";
else
sql += "NUMBER(10)";
}
else
// SQL Server, DB2, Informix, Sybase ASA BIGINT (SQL_BIGINT -5)
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_BIGINT) ||
// MySQL BIGINT
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_LONGLONG) ||
// Sybase ASE BIGINT
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_BIGINT_TYPE) ||
// Informix SQL_INFX_BIGINT (-114)
(source_type == SQLDATA_INFORMIX && s_cols[i]._native_dt == -114))
{
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER(19)";
else
sql += "BIGINT";
}
else
// SMALLINT
if((source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_SMALLINT_TYPE) ||
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_SHORT) ||
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA)
&& s_cols[i]._native_dt == SQL_SMALLINT))
{
if(target_type != SQLDATA_ORACLE)
sql += "SMALLINT";
else
sql += "NUMBER(5)";
}
else
// SQL Server, MySQL, Sybase ASA TINYINT
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_TINYINT) ||
// Sybase TINYINT
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_TINYINT_TYPE) ||
// MySQL TINYINT
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_TINY))
{
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER(3)";
else
if(target_type == SQLDATA_SQL_SERVER || target_type == SQLDATA_MYSQL)
sql += "TINYINT";
else
sql += "INTEGER";
}
else
// Oracle NUMBER without parameters
if(source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_NUM &&
((s_cols[i]._precision == 0 && s_cols[i]._scale == 129) || s_cols[i]._precision >= 38))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "FLOAT";
else
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER";
else
if(target_type == SQLDATA_MYSQL)
sql += "DOUBLE";
else
sql += "DOUBLE PRECISION";
}
else
// MySQL DOUBLE
if((source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_DOUBLE) ||
// SQL Server, DB2, ODBC FLOAT
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 || source_type == SQLDATA_ODBC) &&
s_cols[i]._native_dt == SQL_FLOAT))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "FLOAT";
else
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER";
else
if(target_type == SQLDATA_POSTGRESQL)
sql += "DOUBLE PRECISION";
else
sql += "DOUBLE";
}
else
// SQL Server, DB2, ODBC DOUBLE
if((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 || source_type == SQLDATA_ODBC) &&
s_cols[i]._native_dt == SQL_DOUBLE)
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "FLOAT";
else
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER";
else
if(target_type == SQLDATA_POSTGRESQL)
sql += "DOUBLE PRECISION";
else
sql += "DOUBLE";
}
else
// Informix single-precision floating point number SMALLFLOAT, REAL
if((source_type == SQLDATA_INFORMIX && s_cols[i]._native_dt == SQL_REAL) ||
// DB2 FLOAT, SQL Server REAL, Sybase ASA single-precision FLOAT
((source_type == SQLDATA_DB2 || source_type == SQLDATA_SQL_SERVER ||
source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_REAL))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "FLOAT";
else
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER";
else
sql += "FLOAT";
}
else
// Informix double-precision floating point number FLOAT, DOUBLE PRECISION
// Sybase ASA DOUBLE
if((source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_DOUBLE)
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "FLOAT";
else
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER";
else
sql += "DOUBLE PRECISION";
}
else
// MySQL FLOAT (4-byte)
if((source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_FLOAT) ||
// Sybase ASE FLOAT
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_FLOAT_TYPE))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "REAL";
else
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER";
else
sql += "FLOAT";
}
else
// DB2 DECFLOAT(16 | 34)
if(source_type == SQLDATA_DB2 && s_cols[i]._native_dt == -360)
{
sql += "DOUBLE";
}
else
// Oracle NUMBER as DECIMAL
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_NUM ||
source_type == SQLDATA_ODBC && source_subtype == SQLDATA_ORACLE && s_cols[i]._native_dt == SQL_DECIMAL) &&
((s_cols[i]._precision >= 10 && s_cols[i]._precision <= 38) || s_cols[i]._scale != 0) ||
// Sybase ASE NUMERIC and DECIMAL
(source_type == SQLDATA_SYBASE && (s_cols[i]._native_dt == CS_NUMERIC_TYPE || s_cols[i]._native_dt == CS_DECIMAL_TYPE)) ||
// SQL Server, DB2, Informix, Sybase ASA DECIMAL/NUMERIC
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA) &&
(s_cols[i]._native_dt == SQL_DECIMAL || s_cols[i]._native_dt == SQL_NUMERIC)) ||
// MySQL DECIMAL or NUMERIC
(source_type == SQLDATA_MYSQL &&
(s_cols[i]._native_dt == MYSQL_TYPE_NEWDECIMAL || s_cols[i]._native_dt == MYSQL_TYPE_DECIMAL)))
{
// Sybase ASE allows NUMERIC/DECIMAL(x,0) for identity while MySQL/MariaDB allows only integers
if(source_type == SQLDATA_SYBASE && target_type == SQLDATA_MYSQL && s_cols[i]._scale == 0 && !identity_clause.empty())
{
if(s_cols[i]._precision < 9)
sql += "INTEGER";
else
sql += "BIGINTEGER";
}
else
{
if(target_type == SQLDATA_ORACLE)
sql += "NUMBER(";
else
sql += "DECIMAL(";
sql += Str::IntToString(s_cols[i]._precision, int1);
sql += ",";
sql += Str::IntToString(s_cols[i]._scale, int2);
sql += ")";
}
}
else
// Sybase ASE MONEY
if(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_MONEY_TYPE)
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "MONEY";
else
{
sql += "DECIMAL(";
sql += Str::IntToString(s_cols[i]._precision, int1);
sql += ",";
sql += Str::IntToString(s_cols[i]._scale, int2);
sql += ")";
}
}
else
// Sybase ASE SMALLMONEY
if(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_MONEY4_TYPE)
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "SMALLMONEY";
else
{
sql += "DECIMAL(";
sql += Str::IntToString(s_cols[i]._precision, int1);
sql += ",";
sql += Str::IntToString(s_cols[i]._scale, int2);
sql += ")";
}
}
else
// Oracle DATE
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_DAT) ||
// MySQL DATETIME
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_DATETIME))
{
if(target_type == SQLDATA_DB2 || target_type == SQLDATA_POSTGRESQL)
sql += "TIMESTAMP";
else
if(target_type == SQLDATA_ORACLE)
sql += "DATE";
else
sql += "DATETIME";
}
else
// Oracle TIMESTAMP (SQLT_TIMESTAMP)
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_TIMESTAMP) ||
// Sybase ASE DATETIME
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_DATETIME_TYPE) ||
// SQL Server, DB2, Informix, Sybase ASA, ODBC DATETIME
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA ||
source_type == SQLDATA_ODBC) &&
s_cols[i]._native_dt == SQL_TYPE_TIMESTAMP))
{
char fraction[11];
// Define fractional seconds precision
sprintf(fraction, "%d", s_cols[i]._scale);
if(target_type == SQLDATA_SQL_SERVER)
sql += "DATETIME2";
else
if(target_type == SQLDATA_MYSQL)
{
sql += "DATETIME(";
// In DB2 fraction can be up to 12, in some other databases up to 9
// while MySQL and MariaDB support up to 6
if(s_cols[i]._scale <= 6)
sql += fraction;
else
sql += "6";
sql += ')';
}
else
// Oracle TIMESTAMP
if(target_type == SQLDATA_ORACLE)
{
sql += "TIMESTAMP(";
sql += fraction;
sql += ')';
}
else
sql += "TIMESTAMP";
}
else
// Oracle TIMESTAMP WITH TIME ZONE
if(source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_TIMESTAMP_TZ)
{
char fraction[11];
// Define fractional seconds precision
sprintf(fraction, "%d", s_cols[i]._scale);
if(target_type == SQLDATA_SQL_SERVER)
{
sql += "DATETIMEOFFSET(";
sql += fraction;
sql += ')';
}
else
if(target_type == SQLDATA_ORACLE)
{
sql += "TIMESTAMP(";
sql += fraction;
sql += ')';
sql += " WITH TIME ZONE";
}
else
if(target_type == SQLDATA_MYSQL)
sql += "DATETIME";
}
else
// ODBC, SQL Server, DB2, Informix, Sybase ASA TIME
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA ||
source_type == SQLDATA_ODBC) && s_cols[i]._native_dt == SQL_TYPE_TIME) ||
(source_type == SQLDATA_SQL_SERVER && s_cols[i]._native_dt == SQL_SS_TIME2) ||
// Sybase ASE TIME
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_TIME_TYPE))
{
char fraction[11];
// Define fractional seconds precision
sprintf(fraction, "%d", s_cols[i]._scale);
if(target_type == SQLDATA_SQL_SERVER)
{
sql += "TIME(";
sql += fraction;
sql += ')';
}
else
// Oracle TIMESTAMP
if(target_type == SQLDATA_ORACLE)
{
sql += "TIMESTAMP(";
sql += fraction;
sql += ')';
}
else
sql += "TIME";
}
else
// Oracle INTERVAL DAY TO SECOND
if(source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_INTERVAL_DS)
{
char fraction[11];
// Define fractional seconds precision
sprintf(fraction, "%d", s_cols[i]._scale);
if(target_type == SQLDATA_SQL_SERVER || target_type == SQLDATA_MYSQL)
sql += "VARCHAR(30)";
else
if(target_type == SQLDATA_ORACLE)
{
sql += "INTERVAL DAY TO SECOND(";
sql += fraction;
sql += ')';
}
}
else
// SQL Server, DB2, Informix, Sybase ASA DATE
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 ||
source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_TYPE_DATE) ||
// MySQL DATE
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_DATE) ||
// Sybase ASE DATE
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_DATE_TYPE))
{
sql += "DATE";
}
else
// Sybase ASE SMALLDATETIME
if(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_DATETIME4_TYPE)
{
if(target_type == SQLDATA_MYSQL)
sql += "DATETIME";
else
sql += "DATETIME";
}
else
// SQL Server BINARY
if((source_type == SQLDATA_SQL_SERVER && s_cols[i]._native_dt == SQL_BINARY) ||
// Sybase ASE BINARY
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_BINARY_TYPE))
{
if(target_type == SQLDATA_ORACLE)
{
sql += "RAW(";
sql += Str::IntToString((int)s_cols[i]._len, int1);
sql += ")";
}
else
if(target_type == SQLDATA_MYSQL)
{
sql += "BINARY(";
sql += Str::IntToString((int)s_cols[i]._len, int1);
sql += ")";
}
}
else
// Oracle RAW
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_BIN) ||
// SQL Server VARBINARY, DB2 VARCHAR FOR BIT DATA
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2)
&& s_cols[i]._native_dt == SQL_VARBINARY &&
s_cols[i]._lob == false) ||
// Sybase ASA BINARY is variable-length (!) data type
(source_type == SQLDATA_ASA && s_cols[i]._native_dt == SQL_BINARY))
{
int len = (int)s_cols[i]._len;
Str::IntToString(len, int1);
// VARBINARY(n | MAX) in SQL Server
if(target_type == SQLDATA_SQL_SERVER)
{
sql += "VARBINARY(";
if(len <= 8000)
sql += int1;
else
sql += "MAX";
sql += ")";
}
else
if(target_type == SQLDATA_MYSQL)
{
// Can be SQL Server VARBINARY(max) fetched as non-LOB, so check the length
if(s_cols[i]._len <= 8000)
{
sql += "VARBINARY(";
sql += int1;
sql += ")";
}
else
sql += "LONGBLOB";
}
else
if(target_type == SQLDATA_POSTGRESQL)
{
sql += "BYTEA";
}
else
{
sql += "VARBINARY(";
sql += int1;
sql += ")";
}
}
else
// Oracle CLOB, LONG
if((source_type == SQLDATA_ORACLE &&
(s_cols[i]._native_dt == SQLT_CLOB || s_cols[i]._native_dt == SQLT_LNG)) ||
// Sybase ASE TEXT
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_TEXT_TYPE) ||
// Informix TEXT, Sybase ASA LONG VARCHAR
((source_type == SQLDATA_INFORMIX || source_type == SQLDATA_ASA || source_type == SQLDATA_ODBC)
&& s_cols[i]._native_dt == SQL_LONGVARCHAR) ||
// DB2 CLOB with code -99, LONG VARCHAR with code -1
(source_type == SQLDATA_DB2 && (s_cols[i]._native_dt == -99 || s_cols[i]._native_dt == -1)) ||
// Informix CLOB with code -103
(source_type == SQLDATA_INFORMIX && s_cols[i]._native_dt == -103) ||
// MySQL CLOB
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_BLOB && s_cols[i]._binary == false))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "VARCHAR(MAX)";
else
if(target_type == SQLDATA_ORACLE)
sql += "CLOB";
else
if(target_type == SQLDATA_MYSQL)
sql += "LONGTEXT";
else
if(target_type == SQLDATA_POSTGRESQL)
sql += "TEXT";
}
else
// SQL Server NTEXT, Sybase ASA LONG NVARCHAR
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_INFORMIX ||
source_type == SQLDATA_ASA || source_type == SQLDATA_ODBC)
&& s_cols[i]._native_dt == SQL_WLONGVARCHAR) ||
// Sybase ASE UNITEXT
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_UNITEXT_TYPE))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "NVARCHAR(MAX)";
else
if(target_type == SQLDATA_ORACLE)
sql += "NCLOB";
else
if(target_type == SQLDATA_MYSQL)
sql += "LONGTEXT";
else
if(target_type == SQLDATA_POSTGRESQL)
sql += "TEXT";
}
else
// Oracle BLOB, ODBC BLOB
if((source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_BLOB) ||
// SQL Server IMAGE, Informix BYTE, Sybase ASA LONG BINARY
((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_DB2 || source_type == SQLDATA_INFORMIX ||
source_type == SQLDATA_ASA || source_type == SQLDATA_ODBC)
&& s_cols[i]._native_dt == SQL_LONGVARBINARY) ||
// SQL Server VARBINARY(max)
(source_type == SQLDATA_SQL_SERVER && s_cols[i]._native_dt == SQL_VARBINARY &&
s_cols[i]._lob == true) ||
// DB2 BLOB with code -98
(source_type == SQLDATA_DB2 && s_cols[i]._native_dt == -98) ||
// Informix BLOB with code -102
(source_type == SQLDATA_INFORMIX && s_cols[i]._native_dt == -102) ||
// MySQL BLOB
(source_type == SQLDATA_MYSQL && s_cols[i]._native_dt == MYSQL_TYPE_BLOB && s_cols[i]._binary == true))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "VARBINARY(MAX)";
else
if(target_type == SQLDATA_ORACLE)
sql += "BLOB";
else
if(target_type == SQLDATA_MYSQL)
sql += "LONGBLOB";
else
if(target_type == SQLDATA_POSTGRESQL)
sql += "BYTEA";
}
else
// SQL Server XML
if((source_type == SQLDATA_SQL_SERVER && s_cols[i]._native_dt == SQL_SS_XML) ||
// DB2 XML with code -370
(source_type == SQLDATA_DB2 && s_cols[i]._native_dt == -370))
{
if(target_type == SQLDATA_ORACLE)
sql += "XMLTYPE";
else
if(target_type == SQLDATA_SQL_SERVER)
sql += "XML";
else
if(target_type == SQLDATA_MYSQL)
sql += "LONGTEXT";
else
if(target_type == SQLDATA_POSTGRESQL)
sql += "TEXT";
else
sql += "XML";
}
else
// SQL Server, Sybase ASA BIT, Informix BOOLEAN (SQL_BIT -7)
if(((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_INFORMIX ||
source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_BIT) ||
// Sybase ASE BIT
(source_type == SQLDATA_SYBASE && s_cols[i]._native_dt == CS_BIT_TYPE))
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "BIT";
else
sql += "CHAR(1)";
}
else
// Sybase ASA UNIQUEIDENTIFIER (SQL_GUID -11)
if((source_type == SQLDATA_SQL_SERVER || source_type == SQLDATA_ASA) &&
s_cols[i]._native_dt == SQL_GUID)
{
if(target_type == SQLDATA_SQL_SERVER)
sql += "UNIQUEIDENTIFIER";
else
sql += "CHAR(36)";
}
else
// Oracle ROWID
if(source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_RDD)
{
if(target_type != SQLDATA_ORACLE)
sql += "CHAR(18)";
else
sql += "ROWID";
}
else
// Oracle object type
if(source_type == SQLDATA_ORACLE && s_cols[i]._native_dt == SQLT_NTY)
{
Str::IntToString((int)s_cols[i]._len, int1);
sql += "VARCHAR(";
sql += int1;
sql += ")";
}
std::string default_clause;
// Get DEFAULT if it is a literal (MySQL i.e. requires full column specification in ALTER TABLE)
GetDefaultClause(s_table, s_cols[i]._name, default_clause);
if(source_type == SQLDATA_DB2 && target_type == SQLDATA_MYSQL && default_clause.empty() == false)
{
sql += " DEFAULT ";
sql += default_clause;
}
// Check NOT NULL attribute
if(s_cols[i]._nullable == false || IsPrimaryKeyColumn(s_table, s_cols[i]._name))
sql += " NOT NULL";
if(identity_clause.empty() == false)
{
sql += " ";
sql += identity_clause;
}
// For MySQL add column comment as a column property
if(target_type == SQLDATA_MYSQL)
{
std::string comment;
_source_ca.db_api->GetComment(s_table, s_cols[i]._name, comment);
// A comment found
if(comment.empty() == false)
{
std::string quoted_comment;
// Single quotes in comment must be duplicated
Str::Quote(comment, quoted_comment);
sql += " COMMENT ";
sql += quoted_comment;
}
}
}
sql += "\n)";
// For MySQL add table comment, character set etc. as a part of CREATE TABLE statement
if(target_type == SQLDATA_MYSQL)
AddMySQLTableOptions(s_table, sql);
return 0;
}
// Add table options when target is MySQL
void SqlDb::AddMySQLTableOptions(const char *s_table, std::string &sql)
{
// Add table comment as a part of CREATE TABLE statement
std::string comment;
_source_ca.db_api->GetComment(s_table, NULL, comment);
// A comment found
if(comment.empty() == false)
{
std::string quoted_comment;
// Single quotes in comment must be duplicated
Str::Quote(comment, quoted_comment);
sql += "\n COMMENT ";
sql += quoted_comment;
}
// Character set
const char *value = _parameters->Get("-mysql_set_character_set");
if(Str::IsSet(value))
{
sql += "\n CHARACTER SET ";
sql += value;
}
// Collation
value = _parameters->Get("-mysql_set_collation");
if(Str::IsSet(value))
{
sql += "\n COLLATE ";
sql += value;
}
}
// Get DEFAULT if it is a literal (MySQL i.e. requires full column specification in ALTER TABLE)
int SqlDb::GetDefaultClause(const char *s_table, char *column, std::string &default_clause)
{
if(s_table == NULL || column == NULL)
return -1;
if(target_type != SQLDATA_MYSQL)
return 0;
std::string def_clause;
if(_metaSqlDb != NULL)
_metaSqlDb->_source_ca.db_api->GetColumnDefault(s_table, column, def_clause);
// MySQL allows only string literals, numbers and some functions
if(def_clause.empty() == false)
{
const char *d = def_clause.c_str();
if(*d == '\'' || (*d >= '0' && *d <= '9') || !_stricmp(d, "CURRENT_TIMESTAMP"))
default_clause = def_clause;
else
if(!_stricmp(d, "CURRENT TIMESTAMP"))
default_clause = "CURRENT_TIMESTAMP";
}
return 0;
}
// Get IDENTITY clause to be added to column definition
int SqlDb::GetInlineIdentityClause(const char *s_table, char *column, std::string &identity_clause)
{
if(s_table == NULL || column == NULL)
return -1;
if(target_type != SQLDATA_SQL_SERVER && target_type != SQLDATA_MYSQL)
return 0;
std::list<SqlColMeta> *table_columns = _metaSqlDb->GetTableColumns(SQLDB_SOURCE_ONLY);
if(table_columns == NULL)
return 0;
std::string schema;
std::string table;
SqlApiBase::SplitQualifiedName(s_table, schema, table);
// Find mapping record for this table and column
for(std::list<SqlColMeta>::iterator i = table_columns->begin(); i != table_columns->end(); i++)
{
// Not an identity column
if((*i).identity == false)
continue;
char *col = (*i).column;
char *tab = (*i).table;
char *sch = (*i).schema;
if(col == NULL || tab == NULL || sch == NULL)
continue;
if(_stricmp(col, column) == 0 && _stricmp(tab, table.c_str()) == 0 &&
_stricmp(sch, schema.c_str()) == 0)
{
char int1[21];
if(target_type == SQLDATA_SQL_SERVER)
{
identity_clause += "IDENTITY(";
identity_clause += Str::IntToString((*i).id_next, int1);
identity_clause += ",";
identity_clause += Str::IntToString((*i).id_inc, int1);
identity_clause += ")";
}
else
// MySQL and MariaDB require auto_increment to be a key
if(target_type == SQLDATA_MYSQL)
identity_clause += "AUTO_INCREMENT PRIMARY KEY";
break;
}
}
return 0;
}
// Check if a column belongs to primary key
bool SqlDb::IsPrimaryKeyColumn(const char *s_table, const char *column)
{
if(s_table == NULL || column == NULL)
return false;
std::list<SqlColMeta> *table_columns = _metaSqlDb->GetTableColumns(SQLDB_SOURCE_ONLY);
if(table_columns == NULL)
return 0;
std::string schema;
std::string table;
SqlApiBase::SplitQualifiedName(s_table, schema, table);
// Find mapping record for this table and column
for(std::list<SqlColMeta>::iterator i = table_columns->begin(); i != table_columns->end(); i++)
{
// Not a primary key column
if((*i).pk_column == false)
continue;
char *col = (*i).column;
char *tab = (*i).table;
char *sch = (*i).schema;
if(col == NULL || tab == NULL || sch == NULL)
continue;
if(_stricmp(col, column) == 0 && _stricmp(tab, table.c_str()) == 0 &&
_stricmp(sch, schema.c_str()) == 0)
return (*i).pk_column;
}
return false;
}
// Get the target column name and type
void SqlDb::MapColumn(const char *s_table, const char *s_name, std::string &t_name, std::string &t_type)
{
if(s_table == NULL || s_name == NULL)
return;
bool name_mapped = false;
// Check is column name mapping is set
if(_column_map != NULL && _column_map->size() > 0)
{
std::string schema;
std::string table;
SqlApiBase::SplitQualifiedName(s_table, schema, table);
// Find mapping record for this table and column
for(std::list<SqlColMap>::iterator i = _column_map->begin(); i != _column_map->end(); i++)
{
if(_stricmp((*i).schema.c_str(), schema.c_str()) == 0 &&
_stricmp((*i).table.c_str(), table.c_str()) == 0 && _stricmp((*i).name.c_str(), s_name) == 0)
{
// Target column name is optional
if((*i).t_name.empty() == false)
{
t_name = (*i).t_name;
name_mapped = true;
}
// Target data type is optional
t_type = (*i).t_type;
break;
}
}
}
if(name_mapped)
return;
// Enclose column names to prevent reserved word conflicts
if(target_type == SQLDATA_SQL_SERVER)
{
t_name += '[';
t_name += s_name;
t_name += "]";
}
else
if(target_type == SQLDATA_ORACLE)
{
// Check for a reserved word in the target database
bool resword = _target_ca.db_api->IsReservedWord(s_name);
// Check for space (Sybase ASE, ASA i.e. return unqouted identifier when space inside)
bool space = strchr(s_name, ' ') != NULL ? true : false;
if(resword || space)
t_name += '"';
t_name += s_name;
if(resword || space)
t_name += '"';
// The length must not exceed 30 characters
if(resword == false)
{
size_t len = t_name.size();
if(len > 30)
{
std::string trimmed;
Str::TrimToAbbr(t_name, trimmed, 30);
t_name = trimmed;
}
}
}
else
if(target_type == SQLDATA_POSTGRESQL)
{
if(IsSpecialIdentifier(s_name) == true)
{
t_name += '"';
t_name += s_name;
t_name += "\"";
}
else
t_name += s_name;
}
else
if(target_type == SQLDATA_MYSQL)
{
t_name += '`';
t_name += s_name;
t_name += "`";
}
else
t_name += s_name;
}
// Check is the identifier contains a special character such as a space, dot etc.
bool SqlDb::IsSpecialIdentifier(const char *name)
{
if(name == NULL)
return false;
if(strchr(name, ' ') || strchr(name, '.'))
return true;
return false;
}
// Copy column definitions and buffers
int SqlDb::CopyColumns(SqlCol *cols, SqlCol **cols_copy, size_t col_count, size_t allocated_array_rows)
{
if(cols == NULL || cols_copy == NULL || col_count <= 0 || allocated_array_rows <= 0)
return -1;
SqlCol *cols_c = new SqlCol[col_count];
for(int i = 0; i < col_count; i++)
{
// Copy column metadata
cols_c[i] = cols[i];
// Allocate copy buffers
cols_c[i]._data = new char[cols_c[i]._fetch_len * allocated_array_rows];
if(cols[i]._ind2 != NULL)
cols_c[i]._ind2 = new short[allocated_array_rows];
if(cols[i].ind != NULL)
cols_c[i].ind = new size_t[allocated_array_rows];
if(cols[i]._len_ind2 != NULL)
cols_c[i]._len_ind2 = new short[allocated_array_rows];
if(cols[i]._len_ind4 != NULL)
cols_c[i]._len_ind4 = new int[allocated_array_rows];
}
*cols_copy = cols_c;
return 0;
}
// Copy data
int SqlDb::CopyColumnData(SqlCol *s_cols, SqlCol *t_cols, size_t col_count, int rows_fetched)
{
if(s_cols == NULL || t_cols == NULL || col_count <= 0 || rows_fetched <= 0)
return -1;
for(int i = 0; i < col_count; i++)
{
// Copy data
memcpy(t_cols[i]._data, s_cols[i]._data, s_cols[i]._fetch_len * rows_fetched);
if(s_cols[i]._ind2 != NULL)
memcpy(t_cols[i]._ind2, s_cols[i]._ind2, sizeof(short) * rows_fetched);
if(s_cols[i].ind != NULL)
memcpy(t_cols[i].ind, s_cols[i].ind, sizeof(size_t) * rows_fetched);
if(s_cols[i]._len_ind2 != NULL)
memcpy(t_cols[i]._len_ind2, s_cols[i]._len_ind2, sizeof(short) * rows_fetched);
if(s_cols[i]._len_ind4 != NULL)
memcpy(t_cols[i]._len_ind4, s_cols[i]._len_ind4, sizeof(int) * rows_fetched);
}
return 0;
}
// Validate table row count
int SqlDb::ValidateRowCount(SqlDataReply &reply)
{
if(_source_ca.db_api == NULL || _target_ca.db_api == NULL)
return -1;
// Notify that a table was selected for processing
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_STARTED;
_callback(_callback_object, &reply);
}
_source_ca._name = reply._s_name;
_target_ca._name = reply._t_name;
size_t start = GetTickCount();
// Execute the command
int rc = Execute(SQLDATA_CMD_VALIDATE_ROW_COUNT);
// Set results
reply._cmd_subtype = SQLDATA_CMD_COMPLETE;
reply.rc = rc;
reply._s_rc = _source_ca.cmd_rc;
reply._t_rc = _target_ca.cmd_rc;
reply._s_int1 = _source_ca._int1;
reply._t_int1 = _target_ca._int1;
reply._time_spent = GetTickCount() - start;
reply._s_time_spent = _source_ca._time_spent;
reply._t_time_spent = _target_ca._time_spent;
reply.s_error = _source_ca.error;
reply.t_error = _target_ca.error;
return rc;
};
// Validate data in rows
int SqlDb::ValidateRows(SqlDataReply &reply)
{
if(_metaSqlDb == NULL)
return -1;
// Notify that a table was selected for processing
if(_callback != NULL)
{
reply._cmd_subtype = SQLDATA_CMD_STARTED;
_callback(_callback_object, &reply);
}
size_t start = Os::GetTickCount();
std::string s_select, t_select;
// SELECT queries with ORDER BY
_metaSqlDb->BuildQuery(s_select, t_select, reply._s_name, reply._t_name, false);
_source_ca._void1 = (void*)s_select.c_str();
_target_ca._void1 = (void*)t_select.c_str();
// Out SqlCols
_source_ca._void2 = NULL;
_target_ca._void2 = NULL;
// Row and column counts
_source_ca._int1 = 0;
_source_ca._int2 = 0;
_source_ca._int3 = 0;
_target_ca._int1 = 0;
_target_ca._int2 = 0;
_target_ca._int3 = 0;
// The same number of rows must be fetched
_source_ca._int4 = 10000;
_target_ca._int4 = 10000;
int all_not_equal_rows = 0;
int not_equal_rows = 0;
// Open cursors
int rc = Execute(SQLDATA_CMD_OPEN_CURSOR);
SqlCol *s_cols = (SqlCol*)_source_ca._void2;
SqlCol *t_cols = (SqlCol*)_target_ca._void2;
int s_col_count = _source_ca._int1;
int t_col_count = _target_ca._int1;
int s_alloc_rows = _source_ca._int2;
int t_alloc_rows = _target_ca._int2;
int s_fetched_rows = _source_ca._int3;
int t_fetched_rows = _target_ca._int3;
int s_all_fetched_rows = 0;
int t_all_fetched_rows = 0;
__int64 s_all_bytes = 0;
__int64 t_all_bytes = 0;
int s_time_spent = (int)_source_ca._time_spent;
int t_time_spent = (int)_target_ca._time_spent;
bool more = true;
// Set trace file name containing possible differences (it will be created only if any difference found)
if(_trace_diff_data)
_trace_diff.SetLogfile(std::string(reply._s_name).append("_diff.txt").c_str(), NULL);
while(more)
{
if(rc == -1)
{
more = false;
break;
}
int s_bytes = 0, t_bytes = 0;
// Compare content in the buffers
not_equal_rows = ValidateCompareRows(s_cols, t_cols, s_col_count, &s_bytes, t_col_count, s_fetched_rows,
t_fetched_rows, &t_bytes, s_all_fetched_rows, all_not_equal_rows);
s_all_fetched_rows += s_fetched_rows;
t_all_fetched_rows += t_fetched_rows;
s_all_bytes += s_bytes;
t_all_bytes += t_bytes;
if(not_equal_rows != -1)
all_not_equal_rows += not_equal_rows;
// Exit if the number of fetched rows is less than allocated rows, or we reached the number of errors
if((s_fetched_rows < s_alloc_rows || t_fetched_rows < t_alloc_rows) ||
(_validation_not_equal_max_rows != -1 && all_not_equal_rows >= _validation_not_equal_max_rows))
{
more = false;
break;
}
// Fetch the next set of data in 2 concurrent threads
rc = Execute(SQLDATA_CMD_FETCH_NEXT);
s_fetched_rows = _source_ca._int1;
t_fetched_rows = _target_ca._int1;
s_time_spent += _source_ca._int4;
t_time_spent += _target_ca._int4;
// No more row, 0 can be returned if total rows divisible buffer size (10K, 100K, 10M etc.)
if(s_fetched_rows == 0 || t_fetched_rows == 0)
{
more = false;
break;
}
}
int diff_cols = 0;
std::string diff_cols_list;
// Before closing cursors calculate the number of different columns
for(int i = 0; i < s_col_count; i++)
{
if(s_cols != NULL && s_cols[i]._diff_rows > 0)
{
if(diff_cols > 0)
diff_cols_list += ", ";
diff_cols_list += s_cols[i]._name;
diff_cols++;
}
}
// Close cursors
_source_ca.db_api->CloseCursor();
_target_ca.db_api->CloseCursor();
// Set results
reply._cmd_subtype = SQLDATA_CMD_COMPLETE;
reply.rc = rc;
reply._s_rc = _source_ca.cmd_rc;
reply._t_rc = _target_ca.cmd_rc;
reply.s_error = _source_ca.error;
reply.t_error = _target_ca.error;
reply._int1 = all_not_equal_rows;
reply._int2 = diff_cols;
reply._int3 = s_col_count;
reply._s_int1 = s_all_fetched_rows;
reply._t_int1 = t_all_fetched_rows;
if(diff_cols > 0)
{
strncpy(reply.data2, diff_cols_list.c_str(), 1023);
reply.data2[1023] = '\x0';
}
reply.s_sql_l = s_select;
reply.t_sql_l = t_select;
reply._s_bigint1 = s_all_bytes;
reply._t_bigint1 = t_all_bytes;
reply._time_spent = Os::GetTickCount() - start;
reply._s_time_spent = (size_t)s_time_spent;
reply._t_time_spent = (size_t)t_time_spent;
if(reply.s_error == -1)
strcpy(reply.s_native_error_text, _source_ca.db_api->GetNativeErrorText());
if(reply.t_error == -1)
strcpy(reply.t_native_error_text, _target_ca.db_api->GetNativeErrorText());
return rc;
}
// Compare data in rows
int SqlDb::ValidateCompareRows(SqlCol *s_cols, SqlCol *t_cols, int s_col_count, int *s_bytes, int t_col_count,
int s_rows, int t_rows, int *t_bytes, int running_rows, int running_not_equal_rows)
{
if(s_cols == NULL || t_cols == NULL || s_col_count == 0 || t_col_count == 0)
return -1;
int not_equal_rows = 0;
int sb = 0, tb = 0;
char ora_date_str[19];
for(int i = 0; i < s_rows; i++)
{
// No corresponding target row
if(i >= t_rows)
break;
bool equal_row = true;
for(int k = 0; k < s_col_count; k++)
{
// No corresponding target column
if(k >= t_col_count)
break;
// Length/NULL indicators
int s_len = GetColumnDataLen(s_cols, i, k, source_type, _source_ca.db_api);
int t_len = GetColumnDataLen(t_cols, i, k, target_type, _target_ca.db_api);
char *s_string = NULL, *t_string = NULL;
char *s_ora_date = NULL, *t_ora_date = NULL;
bool s_int_set = false, t_int_set = false;
int s_int = 0, t_int = 0;
SQL_TIMESTAMP_STRUCT *s_ts_struct = NULL, *t_ts_struct = NULL;
// Both NULL values
if(s_len == -1 && t_len == -1)
continue;
else
// Oracle NULL and non-Oracle empty string
if((source_type == SQLDATA_ORACLE && s_len == -1 && target_type != SQLDATA_ORACLE && t_len == 0) ||
(source_type != SQLDATA_ORACLE && s_len == 0 && target_type == SQLDATA_ORACLE && t_len == -1))
continue;
else
// One is NULL, another not NULL
if((s_len == -1 && t_len != -1) || (s_len != -1 && t_len == -1))
{
equal_row = false;
s_cols[k]._diff_rows++;
if(_trace_diff_data)
ValidateDiffDump(&s_cols[k], &t_cols[k], i + running_rows, s_len, t_len, s_string, t_string);
continue;
}
// Both are empty (non-NULL) values
if(s_len == 0 && t_len == 0)
continue;
if(s_len != -1)
sb += s_len;
if(t_len != -1)
tb += t_len;
int equal = -1;
// If LOBs perform their comparison first
bool lob = ValidateCompareLobs(&s_cols[k], s_len, &t_cols[k], t_len, &equal);
// Get the source and target values
if(!lob)
{
GetColumnData(s_cols, i, k, source_type, _source_ca.db_api, &s_string, &s_int_set, &s_int, &s_ts_struct, &s_ora_date);
GetColumnData(t_cols, i, k, target_type, _target_ca.db_api, &t_string, &t_int_set, &t_int, &t_ts_struct, &t_ora_date);
}
// Compare 2 string values
if(s_string != NULL && t_string != NULL && !lob)
{
// Compare string representations of numbers .5 and 0.50
bool num = ValidateCompareNumbers(&s_cols[k], s_string, s_len, &t_cols[k], t_string, t_len, &equal);
bool datetime = false;
if(!num)
datetime = ValidateCompareDatetimes(&s_cols[k], s_string, s_len, &t_cols[k], t_string, t_len, &equal);
if(!num && !datetime)
{
if(s_len == t_len)
equal = memcmp(s_string, t_string, (size_t)s_len);
else
ValidateCompareStrings(&s_cols[k], s_string, s_len, &t_cols[k], t_string, t_len, &equal);
}
}
else
// Compare string and integer
if(((s_int_set && t_string != NULL) || (s_string != NULL && t_int_set)) && !lob)
{
char *str = (s_string != NULL) ? s_string : t_string;
int int_v = s_int_set ? s_int : t_int;
int int_v2 = atoi(str);
equal = (int_v == int_v2) ? 0 : -1;
}
else
// Compare ODBC SQL_TIMESTAMP_STRUCT and string
if(((s_ts_struct != NULL && t_string != NULL) || (t_ts_struct != NULL && s_string != NULL)) && !lob)
{
SQL_TIMESTAMP_STRUCT *ts = (s_ts_struct != NULL) ? s_ts_struct : t_ts_struct;
char *str = (s_string != NULL) ? s_string : t_string;
// String can contain date only or date and time
int str_len = (s_string != NULL) ? s_len : t_len;
char ts_str[27];
// Convert SQL_TIMESTAMP_STRUCT to string
Str::SqlTs2Str((short)ts->year, (short)ts->month, (short)ts->day, (short)ts->hour, (short)ts->minute, (short)ts->second, (long)ts->fraction, ts_str);
equal = memcmp(str, ts_str, (size_t)str_len);
}
else
// Compare Oracle DATE and string
if(((s_ora_date != NULL && t_string != NULL) || (t_ora_date != NULL && s_string != NULL)) && !lob)
{
char *ora_date = (s_ora_date != NULL) ? s_ora_date : t_ora_date;
char *str = (s_string != NULL) ? s_string : t_string;
// String can contain date only or date and time
// int str_len = (s_string != NULL) ? s_len : t_len;
// Convert 7-byte packed Oracle DATE to string (non-null terminated, exactly 19 characters)
Str::OraDate2Str((unsigned char*)ora_date, ora_date_str);
// Target SQL Server i.e. may have trailing .000 in string, so let's use Oracle len
equal = memcmp(ora_date_str, str, 19);
}
// Not equal
if(equal != 0)
{
equal_row = false;
s_cols[k]._diff_rows++;
if(_trace_diff_data)
ValidateDiffDump(&s_cols[k], &t_cols[k], i + running_rows, s_len, t_len, s_string, t_string);
}
}
if(equal_row == false)
{
not_equal_rows++;
// Check for not equal rows max limit
if(_validation_not_equal_max_rows != -1 && (not_equal_rows + running_not_equal_rows) >= _validation_not_equal_max_rows)
break;
}
}
if(s_bytes != NULL)
*s_bytes = sb;
if(t_bytes != NULL)
*t_bytes = tb;
return not_equal_rows;
}
// Compare string representations of numbers .5 and 0.50
bool SqlDb::ValidateCompareNumbers(SqlCol *s_col, const char *s_string, int s_len, SqlCol *t_col,
const char *t_string, int t_len, int *equal)
{
if(s_col == NULL || s_string == NULL || t_col == NULL || t_string == NULL)
return false;
bool num = false;
bool comp = false;
// Check is the source data type is a number fetched as string
if((source_type == SQLDATA_ORACLE && s_col->_native_dt == SQLT_NUM && s_col->_scale != 129 /*floating*/) ||
(source_type == SQLDATA_SYBASE && s_col->_native_fetch_dt == CS_CHAR_TYPE &&
(s_col->_native_dt == CS_NUMERIC_TYPE || s_col->_native_dt == CS_DECIMAL_TYPE ||
s_col->_native_dt == CS_MONEY_TYPE || s_col->_native_dt == CS_MONEY4_TYPE)) ||
(source_type == SQLDATA_INFORMIX && s_col->_native_fetch_dt == SQL_C_CHAR &&
(s_col->_native_dt == SQL_DECIMAL || s_col->_native_dt == SQL_NUMERIC ||
s_col->_native_dt == SQL_REAL || s_col->_native_dt == SQL_DOUBLE)))
{
// Compare numbers
comp = Str::CompareNumberAsString(s_string, s_len, t_string, t_len);
num = true;
}
else
// Compare floating point numbers that can be different due to rounding issues
// Sybase ASE can return 6.7000000000000002 for value 6.7
if((source_type == SQLDATA_ORACLE && s_col->_native_dt == SQLT_NUM && s_col->_scale == 129 /*floating*/) ||
(source_type == SQLDATA_SYBASE && s_col->_native_fetch_dt == CS_CHAR_TYPE &&
(s_col->_native_dt == CS_REAL_TYPE || s_col->_native_dt == CS_FLOAT_TYPE)))
{
double d1 = 0.0, d2 = 0.0;
char f1[11], f2[11];
// Get double values
sprintf(f1, "%%%dlf", s_len);
sprintf(f2, "%%%dlf", t_len);
sscanf(s_string, f1, &d1);
sscanf(t_string, f2, &d2);
if(d1 == d2)
{
comp = true;
num = true;
}
}
if(equal != NULL)
*equal = comp ? 0 : -1;
return num;
}
// Compare datetime values featched as strings
bool SqlDb::ValidateCompareDatetimes(SqlCol *s_col, const char *s_string, int s_len, SqlCol *t_col,
const char *t_string, int t_len, int *equal)
{
if(s_col == NULL || s_string == NULL || t_col == NULL || t_string == NULL)
return false;
bool datetime = false;
int comp = -1;
// Oracle TIMESTAMP compared with MySQL DATETIME without fraction
if((source_type == SQLDATA_ORACLE && s_col->_native_dt == SQLT_TIMESTAMP) ||
(source_type == SQLDATA_SYBASE && (s_col->_native_dt == CS_DATETIME_TYPE || s_col->_native_dt == CS_DATETIME4_TYPE || s_col->_native_dt == CS_DATE_TYPE))
&& (target_type == SQLDATA_MYSQL))
{
int s_len_new = s_len;
int t_len_new = t_len;
// All datetime data types are fetched with 26 length from Sybase ASE, so we need to correct the length
if(source_type == SQLDATA_SYBASE)
{
// Sybase ASE DATE that fetched with 00:00:00.000000 time part
if(s_col->_native_dt == CS_DATE_TYPE)
s_len_new = 10;
else
// Sybase ASE SMALLDATETIME contains minutes only, seconds always 00
if(s_col->_native_dt == CS_DATETIME4_TYPE)
s_len_new = 19;
}
// Number of fractional digits to compare
if(_validation_datetime_fraction != -1)
{
if(s_len_new > 20 + _validation_datetime_fraction)
s_len_new = 20 + _validation_datetime_fraction;
if(t_len_new > 19 + _validation_datetime_fraction)
t_len_new = 20 + _validation_datetime_fraction;
}
// If length are not equal allow only difference in number of 0s in fractional part, so consider .0 and .000 equal
if(s_len_new != t_len_new)
{
int l_len = s_len_new;
int m_len = t_len_new;
const char *m_string = t_string;
if(s_len_new > t_len_new)
{
l_len = t_len_new;
m_len = s_len_new;
m_string = s_string;
}
comp = memcmp(s_string, t_string, (size_t)l_len);
// Common part is equal
if(!comp)
{
// Larger part must contain 0s
for(int i = l_len; i < m_len; i++)
{
if(m_string[i] != '0')
{
comp = -1;
break;
}
}
}
}
else
comp = memcmp(s_string, t_string, (size_t)s_len_new);
datetime = true;
}
if(equal != NULL)
*equal = comp;
return datetime;
}
// Compare strings
bool SqlDb::ValidateCompareStrings(SqlCol *s_col, const char *s_string, int s_len, SqlCol *t_col, const char *t_string, int t_len, int *equal)
{
if(s_col == NULL || s_string == NULL || t_col == NULL || t_string == NULL)
return false;
const char *max_s = s_string;
int max_len = s_len;
int min_len = t_len;
if(s_len < t_len)
{
max_s = t_string;
max_len = t_len;
min_len = s_len;
}
// First compare data for matched size
int comp = memcmp(s_string, t_string, (size_t)min_len);
// Common part is equal
if(comp == 0)
{
// Larger part must contain spaces only
for(int i = min_len; i < max_len; i++)
{
if(max_s[i] != ' ')
{
comp = -1;
break;
}
}
}
if(equal != NULL)
*equal = comp;
return true;
}
// Compare LOB values
bool SqlDb::ValidateCompareLobs(SqlCol *s_col, int s_len, SqlCol *t_col, int t_len, int *equal)
{
if(s_col == NULL || t_col == NULL)
return false;
bool lob = false;
int comp = -1;
if(source_type == SQLDATA_ORACLE && (s_col->_native_dt == SQLT_CLOB || s_col->_native_dt == SQLT_BLOB))
{
if(s_len == t_len)
comp = 0;
lob = true;
}
if(lob && equal != NULL)
*equal = comp;
return lob;
}
// Dump differences in column
void SqlDb::ValidateDiffDump(SqlCol *s_col, SqlCol *t_col, int row, int s_len, int t_len, char *s_string, char *t_string)
{
if(s_col == NULL || t_col == NULL)
return;
_trace_diff.LogFile("Row %d, Column %s (src native type code %d, tgt native type code %d)\n", row, s_col->_name, s_col->_native_dt, t_col->_native_dt);
_trace_diff.LogFile("src len: %d; tgt len: %d;\n", s_len, t_len);
_trace_diff.LogFile("src val: ");
ValidateDiffDumpValue(s_len, s_string);
_trace_diff.LogFile("\n");
_trace_diff.LogFile("tgt val: ");
ValidateDiffDumpValue(t_len, t_string);
_trace_diff.LogFile("\n\n");
}
// Dump column value
void SqlDb::ValidateDiffDumpValue(int len, char *str)
{
if(len != -1)
{
if(str != NULL)
_trace_diff.LogFile(str, len);
}
else
_trace_diff.LogFile("NULL");
}
// Get the length of column data in the buffer
int SqlDb::GetColumnDataLen(SqlCol *cols, int row, int column, int db_type, SqlApiBase *db_api)
{
if(cols == NULL || db_api == NULL)
return -1;
size_t len = (size_t)-1;
if(db_type == SQLDATA_ORACLE)
{
if(cols[column]._ind2 == NULL || cols[column]._len_ind2 == NULL)
return -1;
// Check for NULL
if(cols[column]._ind2[row] == -1)
len = (size_t)-1;
else
// Get length for the CLOB or BLOB
if(cols[column]._native_dt == SQLT_CLOB || cols[column]._native_dt == SQLT_BLOB)
{
// LOB contains data
int rc = db_api->GetLobLength((size_t)row, (size_t)column, &len);
if(rc == -1)
return -1;
}
// Get the length for non-NULL non-LOB value
else
len = (size_t)cols[column]._len_ind2[row];
}
else
if(db_type == SQLDATA_SYBASE)
{
if(cols[column]._ind2 == NULL || cols[column]._len_ind4 == NULL)
return -1;
// Check for NULL
if(cols[column]._ind2[row] == -1)
len = (size_t)-1;
else
len = (size_t)cols[column]._len_ind4[row];
}
else
if(db_type == SQLDATA_MYSQL)
{
if(cols[column].ind != NULL && cols[column].ind[row] != -1)
len = cols[column].ind[row];
}
else
if(db_type == SQLDATA_POSTGRESQL)
{
if(cols[column].ind != NULL && cols[column].ind[row] != -1)
len = cols[column].ind[row];
}
else
if(db_type == SQLDATA_SQL_SERVER || db_type == SQLDATA_INFORMIX)
{
if(cols[column].ind != NULL && cols[column].ind[row] != -1)
len = cols[column].ind[row];
}
return (int)len;
}
// Get column data from the buffer
int SqlDb::GetColumnData(SqlCol *cols, int row, int column, int db_type, SqlApiBase *db_api,
char **str, bool *int_set, int *int_value, SQL_TIMESTAMP_STRUCT **ts_struct,
char **ora_date)
{
if(cols == NULL || db_api == NULL)
return -1;
char *s = NULL;
char *ora_d = NULL;
int int_v = 0;
bool int_s = false;
SQL_TIMESTAMP_STRUCT *ts = NULL;
if(db_type == SQLDATA_ORACLE)
{
if(cols[column]._native_fetch_dt == SQLT_STR || cols[column]._native_fetch_dt == SQLT_BIN)
s = cols[column]._data + cols[column]._fetch_len * row;
else
if(cols[column]._native_fetch_dt == SQLT_INT)
{
int_v = *((int*)(cols[column]._data + cols[column]._fetch_len * row));
int_s = true;
}
else
if(cols[column]._native_fetch_dt == SQLT_DAT)
ora_d = cols[column]._data + cols[column]._fetch_len * row;
}
else
if(db_type == SQLDATA_SYBASE)
{
if(cols[column]._native_fetch_dt == CS_CHAR_TYPE)
s = cols[column]._data + cols[column]._fetch_len * row;
}
else
if(db_type == SQLDATA_MYSQL)
{
// All columns are fetched as strings
s = cols[column]._data + cols[column]._fetch_len * row;
}
else
if(db_type == SQLDATA_POSTGRESQL)
{
s = cols[column]._data + cols[column]._fetch_len * row;
}
else
if(db_type == SQLDATA_SQL_SERVER || db_type == SQLDATA_INFORMIX)
{
if(cols[column]._native_fetch_dt == SQL_C_CHAR || cols[column]._native_fetch_dt == SQL_C_BINARY)
s = cols[column]._data + cols[column]._fetch_len * row;
else
if(cols[column]._native_fetch_dt == SQL_C_LONG)
{
int_v = *((int*)(cols[column]._data + cols[column]._fetch_len * row));
int_s = true;
}
else
if(cols[column]._native_fetch_dt == SQL_TYPE_TIMESTAMP)
ts = (SQL_TIMESTAMP_STRUCT*)(cols[column]._data + cols[column]._fetch_len * row);
}
if(str != NULL && s != NULL)
*str = s;
if(int_value != NULL && int_set != NULL && int_s == true)
{
*int_value = int_v;
*int_set = true;
}
if(ts_struct != NULL && ts != NULL)
*ts_struct = ts;
if(ora_date != NULL && ora_d != NULL)
*ora_date = ora_d;
return 0;
}
// Build transfer and data validation query
int SqlDb::BuildQuery(std::string &s_query, std::string &t_query, const char *s_table, const char *t_table,
bool transfer)
{
if(_source_ca.db_api == NULL)
return -1;
s_query = "SELECT ";
t_query = "SELECT ";
bool select_list = false;
// Check if SELECT expression is defined for the table
if(_tsel_exp_map != NULL )
{
std::map<std::string, std::string>::iterator i = _tsel_exp_map->find(s_table);
if(i != _tsel_exp_map->end())
{
if(s_table != NULL)
{
s_query += i->second;
s_query += " FROM ";
s_query += s_table;
}
if(t_table != NULL)
{
t_query += i->second;
t_query += " FROM ";
t_query += t_table;
}
select_list = true;
}
}
// Check if SELECT expression is defined for all tables
if(!select_list && _tsel_exp_all != NULL && !_tsel_exp_all->empty())
{
if(s_table != NULL)
{
s_query += *_tsel_exp_all;
s_query += " FROM ";
s_query += s_table;
}
if(t_table != NULL)
{
t_query += *_tsel_exp_all;
t_query += " FROM ";
t_query += t_table;
}
select_list = true;
}
// Metadata is not supported
if(!select_list && source_type != SQLDATA_ORACLE && source_type != SQLDATA_INFORMIX && source_type != SQLDATA_SYBASE
&& source_type != SQLDATA_ASA)
{
if(s_table != NULL)
{
s_query += "* FROM ";
s_query += s_table;
}
if(t_table != NULL)
{
t_query += "* FROM ";
t_query += t_table;
}
select_list = true;
}
std::string s_schema, t_schema;
std::string s_object, t_object;
if(!select_list)
{
SqlApiBase::SplitQualifiedName(s_table, s_schema, s_object);
SqlApiBase::SplitQualifiedName(t_table, t_schema, t_object);
std::list<SqlColMeta> *table_columns = _source_ca.db_api->GetTableColumns();
if(table_columns == NULL)
return -1;
int num = 0;
// Find table columns (already ordered by column number)
for(std::list<SqlColMeta>::iterator i = table_columns->begin(); i != table_columns->end(); i++)
{
char *s = (*i).schema;
char *t = (*i).table;
char *c = (*i).column;
char *d = (*i).data_type;
// Table found
if(s != NULL && t != NULL && c != NULL && strcmp(s, s_schema.c_str()) == 0 &&
strcmp(t, s_object.c_str()) == 0)
{
if(num > 0)
{
s_query += ", ";
t_query += ", ";
}
bool column_added = false;
if(d != NULL &&
// Oracle CHAR contains trailing spaces on retrieval
((source_type == SQLDATA_ORACLE && !_stricmp(d, "CHAR")) ||
// Sybase ASE CHAR (UDT ID, TID) also contains trailing spaces
(source_type == SQLDATA_SYBASE &&
(!_stricmp(d, "CHAR") || !_stricmp(d, "ID") || !_stricmp(d, "TID")))))
{
// MySQL by default trims spaces in CHAR, but PAD_CHAR_TO_FULL_LENGTH can be set, so trim both
if(transfer == false && target_type == SQLDATA_MYSQL)
{
s_query += "RTRIM(";
if(source_type == SQLDATA_ORACLE)
s_query += '"';
s_query += c;
if(source_type == SQLDATA_ORACLE)
s_query += '"';
s_query += ") AS ";
s_query += c;
t_query += "RTRIM(";
t_query += c;
t_query += ") AS ";
t_query += c;
column_added = true;
}
}
else
// Oracle TIMESTAMP WITH TIME ZONE column
if(source_type == SQLDATA_ORACLE && d != NULL && strstr(d, "WITH TIME ZONE") != NULL)
{
// Convert to UTC time zone for MySQL
if(target_type == SQLDATA_MYSQL)
{
s_query += "SYS_EXTRACT_UTC(\"";
s_query += c;
s_query += "\") AS ";
s_query += c;
t_query += c;
column_added = true;
}
}
else
// Oracle XMLTYPE column that fetched as object type in OCI
if(source_type == SQLDATA_ORACLE && d != NULL && !_stricmp(d, "XMLTYPE"))
{
s_query += "XMLSERIALIZE(CONTENT \"";
s_query += c;
s_query += "\" AS CLOB) AS ";
s_query += c;
t_query += c;
column_added = true;
}
else
// Oracle stores quoted columns without " but in the same case as they specified in CREATE TABLE
if(source_type == SQLDATA_ORACLE)
{
// Double quotes will not be returned when describing column name after open cursor
s_query += "\"";
s_query += c;
s_query += "\"";
if(target_type == SQLDATA_SQL_SERVER)
{
t_query += '[';
t_query += c;
t_query += "]";
}
else
if(target_type == SQLDATA_MYSQL)
{
t_query += '`';
t_query += c;
t_query += "`";
}
else
t_query += c;
column_added = true;
}
else
// Sybase ASE stores columns without [] even if they are reserved words or contain spaces
if(source_type == SQLDATA_SYBASE)
{
s_query += '[';
s_query += c;
s_query += ']';
t_query += c;
column_added = true;
}
else
// Sybase ASA stores columns that are reserved words without any quotes in catalog
if(source_type == SQLDATA_ASA && _source_ca.db_api->IsReservedWord(c))
{
s_query += '"';
s_query += c;
s_query += '"';
t_query += c;
column_added = true;
}
// Add column as is
if(column_added == false)
{
if(source_type == SQLDATA_ORACLE)
s_query += '"';
s_query += c;
if(source_type == SQLDATA_ORACLE)
s_query += '"';
t_query += c;
}
num++;
continue;
}
else
// Another table's columns started
if(num > 0)
break;
}
if(num == 0)
{
s_query += " *";
t_query += " *";
}
s_query += " FROM ";
t_query += " FROM ";
if(s_table != NULL)
s_query += s_table;
if(t_table != NULL)
t_query += t_table;
}
// Check if WHERE condition is defined for the table
if(_twhere_cond_map != NULL )
{
std::map<std::string, std::string>::iterator i = _twhere_cond_map->find(s_table);
if(i != _twhere_cond_map->end())
{
if(s_table != NULL)
{
s_query += " WHERE ";
s_query += i->second;
}
if(t_table != NULL)
{
t_query += " WHERE ";
t_query += i->second;
}
}
}
// Add sort order for validation
if(transfer == false)
BuildQueryAddOrder(s_query, s_schema, s_object, t_query, t_schema, t_object);
return 0;
}
// Add ORDER BY clause to data validation query
int SqlDb::BuildQueryAddOrder(std::string &s_query, std::string &s_schema, std::string &s_object,
std::string &t_query, std::string & /*t_schema*/, std::string & /*t_object*/)
{
if(_metaSqlDb == NULL || _metaSqlDb->_source_ca.db_api == NULL || _metaSqlDb->_target_ca.db_api == NULL)
return -1;
SqlApiBase *db_api = _metaSqlDb->_source_ca.db_api;
SqlApiBase *t_db_api = _metaSqlDb->_target_ca.db_api;
std::list<std::string> s_order, s_order_sorts;
std::list<std::string> s_order_types;
bool pk_exists = false;
std::list<SqlConstraints> *table_cns = db_api->GetTableConstraints();
std::list<SqlConsColumns> *table_cns_cols = db_api->GetConstraintColumns();
if(table_cns != NULL && table_cns_cols != NULL)
{
// Find a primary or unique key
for(std::list<SqlConstraints>::iterator i = table_cns->begin(); i != table_cns->end(); i++)
{
if((*i).type != 'P' && (*i).type != 'U')
continue;
char *s = (*i).schema;
char *t = (*i).table;
char *c = (*i).constraint;
if(s == NULL || t == NULL || c == NULL)
continue;
if(strcmp(t, s_object.c_str()) != 0 || strcmp(s, s_schema.c_str()) != 0)
continue;
// Now find the key columns
db_api->GetKeyConstraintColumns((*i), s_order, &s_order_types);
pk_exists = true;
break;
}
}
bool unique_exists = false;
std::list<SqlIndexes> *idx = db_api->GetTableIndexes();
if(pk_exists == false && idx != NULL)
{
// Find the first unique index
for(std::list<SqlIndexes>::iterator i = idx->begin(); i != idx->end(); i++)
{
if((*i).unique == false)
continue;
char *s = (*i).t_schema;
char *t = (*i).t_name;
if(s == NULL || t == NULL)
continue;
if(strcmp(t, s_object.c_str()) != 0 || strcmp(s, s_schema.c_str()) != 0)
continue;
// Get index columns
db_api->GetIndexColumns((*i), s_order, s_order_sorts);
unique_exists = true;
break;
}
}
std::list<SqlColMeta> *table_cols = db_api->GetTableColumns();
if(pk_exists == false && unique_exists == false && table_cols != NULL)
{
bool found = false;
// Find table columns
for(std::list<SqlColMeta>::iterator i = table_cols->begin(); i != table_cols->end(); i++)
{
char *s = (*i).schema;
char *t = (*i).table;
char *c = (*i).column;
char *d = (*i).data_type;
int dc = (*i).data_type_code;
if(s == NULL || t == NULL || c == NULL)
continue;
if(strcmp(t, s_object.c_str()) != 0 || strcmp(s, s_schema.c_str()) != 0)
{
if(found)
break;
else
continue;
}
// Data type as a string in Oracle, Sybase ASE
if(d != NULL)
{
// A numeric column
if(!_stricmp(d, "NUMBER") || !_stricmp(d, "INT") || !_stricmp(d, "SMALLINT") || !_stricmp(d, "BIGINT") ||
!_stricmp(d, "NUMERIC") || !_stricmp(d, "DECIMAL") || !_stricmp(d, "FLOAT") || !_stricmp(d, "MONEY") || !_stricmp(d, "SMALLMONEY"))
{
s_order.push_back(c);
s_order_types.push_back("Numeric");
}
else
// A string column CHAR, VARCHAR or VARCHAR2
if(!_stricmp(d, "CHAR") || !_stricmp(d, "VARCHAR"))
{
s_order.push_back(c);
s_order_types.push_back("String");
}
else
// A datetime column
if(strstr(d, "TIMESTAMP") != NULL || !_stricmp(d, "DATE") || !_stricmp(d, "DATETIME"))
{
s_order.push_back(c);
s_order_types.push_back("Datetime");
}
found = true;
}
else
// Data type as a code in Informix
if(source_type == SQLDATA_INFORMIX)
{
// A numeric column SMALLINT - 1, INTEGER - 2, FLOAT - 3, SMALLFLOAT - 4, DECIMAL - 5
// SERIAL - 6 (if NOT NULL +256)
if((dc >= 1 && dc <= 6) || (dc >= 257 && dc <= 262))
{
s_order.push_back(c);
s_order_types.push_back("Numeric");
}
else
// A string column CHAR - 0, CHAR NOT NULL - 256, VARCHAR - 13, VARCHAR NOT NULL 269
if(dc == 0 || dc == 13 || dc == 256 || dc == 269)
{
s_order.push_back(c);
s_order_types.push_back("String");
}
else
// A datetime column DATE - 7
if(dc == 7)
{
s_order.push_back(c);
s_order_types.push_back("Datetime");
}
found = true;
}
}
}
if(s_order.empty() == false)
{
int c = 0;
std::list<std::string>::iterator ti = s_order_types.begin();
for(std::list<std::string>::iterator i = s_order.begin(); i != s_order.end(); i++)
{
std::string type;
// Column type - String, Numeric or Datetime
if(ti != s_order_types.end())
{
type = (*ti);
ti++;
}
if(c == 0)
{
s_query += " ORDER BY ";
t_query += " ORDER BY ";
}
else
{
s_query += ", ";
t_query += ", ";
}
s_query += (*i);
t_query += (*i);
// In Oracle NULLs go last in ASC order, in MySQL and Informix first
if(source_type == SQLDATA_ORACLE && target_type == SQLDATA_MYSQL)
s_query += " NULLS FIRST";
else
if((source_type == SQLDATA_MYSQL || source_type == SQLDATA_INFORMIX) && target_type == SQLDATA_ORACLE)
t_query += " NULLS FIRST";
else
// MySQL/MariaDB uses collation defined in the table, for some reason it does not use COLLATION_CONNECTION session value
// so we redefine COLLATE in ORDER BY for strings
if(target_type == SQLDATA_MYSQL)
{
if(_mysql_validation_collate != NULL && type == "String")
t_query.append(" COLLATE ").append(_mysql_validation_collate);
}
else
if(target_type == SQLDATA_SQL_SERVER)
{
if(type == "String")
t_query.append(" COLLATE Latin1_General_bin");
}
else
// Informix and PostgreSQL have differences in string and NULL order
if(source_type == SQLDATA_INFORMIX && target_type == SQLDATA_POSTGRESQL)
{
// Informix sorts strings in ASCII order - space, digit, A,B,a, b;
// while PostgreSQL space, digit, a, A, b, B when collation is not "C"
if(type == "String")
{
// Collate "C" to use ASCII code sorting is available since PostgreSQL 9.1
if(t_db_api->GetMajorVersion() >= 9 && t_db_api->GetMinorVersion() >= 1)
t_query += " COLLATE \"C\" NULLS FIRST";
}
else
t_query += " NULLS FIRST";
}
c++;
}
}
return 0;
}
// Execute the statement that does not return any result
int SqlDb::ExecuteNonQuery(int db_types, SqlDataReply &reply, const char *query)
{
if(db_types == SQLDB_TARGET_ONLY)
{
reply.rc = _target_ca.db_api->ExecuteNonQuery(query, &reply._t_time_spent);
if(reply.rc == -1)
{
reply.t_error = _target_ca.db_api->GetError();
strcpy(reply.t_native_error_text, _target_ca.db_api->GetNativeErrorText());
}
}
return reply.rc;
}
// Create sequence object
int SqlDb::CreateSequence(int db_types, SqlDataReply &reply, const char *query, const char *seq_name)
{
if(seq_name == NULL)
return -1;
SqlDataReply drop_reply;
strcpy(reply.t_o_name, seq_name);
drop_reply = reply;
std::string drop_stmt = "DROP SEQUENCE ";
// IF EXISTS supported by PostgreSQL
if(target_type == SQLDATA_POSTGRESQL)
drop_stmt += "IF EXISTS ";
drop_stmt += seq_name;
// Execute drop sequence
int rc = ExecuteNonQuery(db_types, drop_reply, drop_stmt.c_str());
if(_callback != NULL)
{
drop_reply._cmd_subtype = SQLDATA_CMD_DROP_SEQUENCE;
drop_reply.t_sql = drop_stmt.c_str();
_callback(_callback_object, &drop_reply);
}
// Create the sequence
rc = ExecuteNonQuery(db_types, reply, query);
return rc;
}
// Drop foreign keys to the
int SqlDb::DropReferences(int db_types, const char *table, size_t *time_spent, int *keys)
{
SqlApiBase *api = (db_types == SQLDB_SOURCE_ONLY) ? _source_ca.db_api : _target_ca.db_api;
if(api == NULL)
return -1;
int rc = api->DropReferencesChild(table, time_spent, keys);
return rc;
}
// Get database type for ODBC API
short SqlDb::GetSubType(short db_types)
{
short subtype = 0;
SqlApiBase *api = (db_types == SQLDB_SOURCE_ONLY) ? _source_ca.db_api : _target_ca.db_api;
if(api != NULL)
subtype = api->GetSubType();
return subtype;
}
// Execute a command by database API threads
int SqlDb::Execute(int cmd)
{
return Execute(cmd, cmd);
}
// Execute one command for source, another for target in concurrent threads and wait
int SqlDb::Execute(int cmd1, int cmd2)
{
_source_ca._cmd = (short)cmd1;
_target_ca._cmd = (short)cmd2;
// Release the source and target threads to process the command
#if defined(WIN32) || defined(_WIN64)
SetEvent(_source_ca._wait_event);
SetEvent(_target_ca._wait_event);
#else
Os::SetEvent(&_source_ca._wait_event);
Os::SetEvent(&_target_ca._wait_event);
#endif
// Wait for the commands completion
#if defined(WIN32) || defined(_WIN64)
HANDLE handles[2] = { _source_ca._completed_event, _target_ca._completed_event };
WaitForMultipleObjects(2, handles, TRUE, INFINITE);
#else
Os::WaitForEvent(&_source_ca._completed_event);
Os::WaitForEvent(&_target_ca._completed_event);
#endif
if(_source_ca.cmd_rc == -1 || _target_ca.cmd_rc == -1)
return -1;
return 0;
}
// Start a worker thread
int SqlDb::StartWorker(SqlDbThreadCa *ca)
{
if(ca == NULL)
return -1;
bool more = true;
while(more)
{
size_t time_spent = 0;
// Wait for a new task
#if defined(WIN32) || defined(_WIN64)
WaitForSingleObject(ca->_wait_event, INFINITE);
#else
Os::WaitForEvent(&ca->_wait_event);
#endif
// Execute connection command
if(ca->_cmd == SQLDATA_CMD_CONNECT)
{
ca->cmd_rc = (short)ca->db_api->Connect(&ca->_time_spent);
}
else
// Execute row count command
if(ca->_cmd == SQLDATA_CMD_VALIDATE_ROW_COUNT)
{
ca->cmd_rc = (short)ca->db_api->GetRowCount(ca->_name, &ca->_int1, &ca->_time_spent);
}
else
// Open cursor for data validation
if(ca->_cmd == SQLDATA_CMD_OPEN_CURSOR)
{
size_t col_count;
size_t allocated_rows;
// Exact or less number of rows must be fetched
ca->cmd_rc = (short)ca->db_api->OpenCursor((const char*)ca->_void1, (size_t)ca->_int4, 0, &col_count, &allocated_rows,
&ca->_int3, (SqlCol**)&ca->_void2, &ca->_time_spent);
ca->_int1 = (int)col_count;
ca->_int2 = (int)allocated_rows;
}
else
// Fetch next portion of data
if(ca->_cmd == SQLDATA_CMD_FETCH_NEXT)
{
ca->cmd_rc = (short)ca->db_api->Fetch(&ca->_int1, &time_spent);
ca->_int4 = (int)time_spent;
}
else
// Insert the data from buffer
if(ca->_cmd == SQLDATA_CMD_INSERT_NEXT)
{
size_t bytes_written;
ca->cmd_rc = (short)ca->db_api->TransferRows((SqlCol*)ca->_void1, ca->_int2, &ca->_int1, &bytes_written,
&time_spent);
ca->_int3 = (int)bytes_written;
ca->_int4 = (int)time_spent;
}
else
// Close cursor for data validation
if(ca->_cmd == SQLDATA_CMD_CLOSE_CURSOR)
{
ca->cmd_rc = (short)ca->db_api->CloseCursor();
}
else
// Read the database schema
if(ca->_cmd == SQLDATA_CMD_READ_SCHEMA)
{
ca->cmd_rc = (short)ca->db_api->ReadSchema((const char*)ca->_void1, (const char*)ca->_void2);
}
else
// Read the schema of the database where transfer is performed to
if(ca->_cmd == SQLDATA_CMD_READ_SCHEMA_FOR_TRANSFER_TO)
{
ca->cmd_rc = (short)ca->db_api->ReadSchemaForTransferTo((const char*)ca->_void1, (const char*)ca->_void2);
}
// Get database API error code
if(ca->cmd_rc == -1)
{
ca->error = ca->db_api->GetError();
strcpy(ca->native_error_text, ca->db_api->GetNativeErrorText());
}
// Specify that the task is completed
#if defined(WIN32) || defined(_WIN64)
SetEvent(ca->_completed_event);
#else
Os::SetEvent(&ca->_completed_event);
#endif
}
return 0;
}
// Start a worker thread
#if defined(WIN32) || defined(_WIN64)
unsigned int __stdcall SqlDb::StartWorkerS(void *v_ca)
#else
void* SqlDb::StartWorkerS(void *v_ca)
#endif
{
SqlDbThreadCa *ca = (SqlDbThreadCa*)v_ca;
if(ca == NULL || ca->sqlDb == NULL)
#if defined(WIN32) || defined(_WIN64)
return (unsigned int)-1;
#else
return NULL;
#endif
int rc = ca->sqlDb->StartWorker(ca);
delete ca->db_api;
#if defined(WIN32) || defined(_WIN64)
return (unsigned int)rc;
#else
return NULL;
#endif
}
// Set parameters
void SqlDb::SetParameters(Parameters *p)
{
_parameters = p;
if(_parameters->GetTrue("-trace_diff_data") != NULL)
_trace_diff_data = true;
_validation_not_equal_max_rows = _parameters->GetInt("-validation_not_equal_max_rows", -1);
_validation_datetime_fraction = _parameters->GetInt("-validation_datetime_fraction", -1);
_mysql_validation_collate = _parameters->Get("-mysql_validation_collate");
}
// Get errors on the DB interface
void SqlDb::GetErrors(SqlDataReply &reply)
{
reply.rc = (_source_ca.cmd_rc == -1 || _target_ca.cmd_rc == -1) ? -1 : 0;
reply._s_rc = _source_ca.cmd_rc;
reply._t_rc = _target_ca.cmd_rc;
reply.s_error = _source_ca.error;
reply.t_error = _target_ca.error;
strcpy(reply.s_native_error_text, _source_ca.native_error_text);
strcpy(reply.t_native_error_text, _target_ca.native_error_text);
}
| [
"[email protected]"
] | |
0adcab4e274f1941b92df03e282b9e57e3de2efc | 04f52c481c7d6eb1b4156b296fe5d81ddccfb161 | /lib/opencv/OpenCVSocketUtils.cpp | 17d11d4308a8c53471370fde9b652b1b2e89011e | [] | no_license | starand/cpp_fw | 39c9d78439602b43498310e86f8bf704b4feceb2 | 5d2ebfe7dc3aef61558ed9f6f49293746499492c | refs/heads/master | 2021-01-11T23:59:05.013523 | 2017-02-20T09:36:05 | 2017-02-20T09:36:05 | 78,653,984 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,148 | cpp | #include "StdAfx.h"
#include "OpenCVSocketUtils.h"
#include "socket.h"
#include <opencv\cv.h>
#define BLOCK_HEIGHT 8
#define BLOCK_WIDTH 8
#define BLOCK_STRIDE 24
#define IMAGE_HEIGHT(pipImage) pipImage->height
#define IMAGE_WIDTH(pipImage) pipImage->width
#define IMAGE_DATA(pipImage) pipImage->imageData
static const sizeint g_siImageHeaderSize = sizeof(IplImage);
namespace OpenCVSocketUtils
{
bool RetrieveImageHeader(CSocket *psSocket, IplImage *pipOutImage)
{
ASSERTE(psSocket); ASSERTE(psSocket->IsConnected()); ASSERTE(pipOutImage);
bool bResult = psSocket->Recv((char*)pipOutImage, g_siImageHeaderSize);
return bResult;
}
bool RetrieveImageData(CSocket *psSocket, IplImage *pipVarImage)
{
ASSERTE(psSocket); ASSERTE(psSocket->IsConnected()); ASSERTE(pipVarImage); ASSERTE(pipVarImage->imageData);
bool bResult = psSocket->Recv(pipVarImage->imageData, pipVarImage->imageSize);
return bResult;
}
void SetImageBuffer(IplImage *pipVarImage, char *szBuffer)
{
ASSERTE(pipVarImage);
pipVarImage->imageData = pipVarImage->imageDataOrigin = szBuffer;
}
bool SendImageHeader(CSocket *psSocket, IplImage *pipImage)
{
ASSERTE(psSocket); ASSERTE(psSocket->IsConnected()); ASSERTE(pipImage);
bool bResult = psSocket->Send((char*)pipImage, g_siImageHeaderSize);
return bResult;
}
bool SendImageData(CSocket *psSocket, IplImage *pipImage)
{
ASSERTE(psSocket); ASSERTE(psSocket->IsConnected()); ASSERTE(pipImage); ASSERTE(pipImage->imageData);
bool bResult = psSocket->Send(pipImage->imageData, pipImage->imageSize);
return bResult;
}
IplImage *CloneImage(IplImage *piInputImage)
{
ASSERTE(piInputImage);
IplImage *pPrevImage = cvCloneImage(piInputImage);
cvCopyImage(piInputImage, pPrevImage);
return pPrevImage;
}
struct CUpdateBlock
{
CUpdateBlock(sizeint siBlockIndex) : m_siBlockIdx(siBlockIndex) { }
sizeint m_siBlockIdx;
char m_pvBlockData[BLOCK_HEIGHT * BLOCK_WIDTH];
};
bool SendImageDiffs(CSocket *psSocket, IplImage *pipImage, IplImage *pipPrevImage)
{
ASSERTE(psSocket); ASSERTE(psSocket->IsConnected()); ASSERTE(pipImage); ASSERTE(pipPrevImage);
sizeint siBlockIndex = 0;
sizeint siStrideSize = IMAGE_WIDTH(pipImage) * 3;
bool bAnyFault = false;
for (int Y = 0; Y < IMAGE_HEIGHT(pipImage); Y += BLOCK_HEIGHT)
{
for (int X = 0; X < IMAGE_WIDTH(pipImage); X += BLOCK_WIDTH)
{
CUpdateBlock ubUpdateBlock(siBlockIndex++);
char *szDstAddr = ubUpdateBlock.m_pvBlockData;
char *szSrcAddr = IMAGE_DATA(pipImage) + siStrideSize * Y + X * 3;
for (int idx = 0; idx < BLOCK_HEIGHT; ++idx, szDstAddr += BLOCK_STRIDE, szSrcAddr += siStrideSize)
{
memcpy(szDstAddr, szSrcAddr, BLOCK_STRIDE);
}
if (!psSocket->Send((char *)&ubUpdateBlock, sizeof(ubUpdateBlock)))
{
bAnyFault = true;
break;
}
}
if (bAnyFault)
{
break;
}
}
bool bResult = !bAnyFault;
return bResult;
}
bool RetrieveImageDiffs(CSocket *psSocket, IplImage *pipImage)
{
ASSERTE(psSocket); ASSERTE(psSocket->IsConnected()); ASSERTE(pipImage);
return RetrieveImageData(psSocket, pipImage);
}
};
| [
"[email protected]"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.